summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-20 17:12:29 +0300
committerAndrew Dolgov <[email protected]>2023-10-20 21:13:39 +0300
commitcdd7ad020e165fe680703b6d3319b908b682fb7a (patch)
treeb51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04
parent45a9ff0c88cbd33892ff16ab837e9059937d656e (diff)
jaeger-client -> opentelemetry
-rw-r--r--backend.php43
-rwxr-xr-xclasses/article.php14
-rw-r--r--classes/config.php8
-rw-r--r--classes/counters.php8
-rw-r--r--classes/digest.php2
-rw-r--r--classes/diskcache.php38
-rwxr-xr-xclasses/feeds.php38
-rwxr-xr-xclasses/pluginhost.php43
-rwxr-xr-xclasses/pref/feeds.php8
-rwxr-xr-xclasses/rpc.php2
-rwxr-xr-xclasses/rssutils.php20
-rw-r--r--classes/sanitizer.php5
-rw-r--r--classes/tracer.php79
-rw-r--r--classes/urlhelper.php62
-rw-r--r--composer.json8
-rw-r--r--composer.lock1621
-rw-r--r--index.php1
-rw-r--r--vendor/autoload.php18
-rw-r--r--vendor/composer/ClassLoader.php174
-rw-r--r--vendor/composer/InstalledVersions.php577
-rw-r--r--vendor/composer/LICENSE2
-rw-r--r--vendor/composer/autoload_classmap.php18
-rw-r--r--vendor/composer/autoload_files.php26
-rw-r--r--vendor/composer/autoload_namespaces.php2
-rw-r--r--vendor/composer/autoload_psr4.php28
-rw-r--r--vendor/composer/autoload_real.php49
-rw-r--r--vendor/composer/autoload_static.php162
-rw-r--r--vendor/composer/installed.json1712
-rw-r--r--vendor/composer/installed.php1098
-rw-r--r--vendor/google/protobuf/LICENSE29
-rw-r--r--vendor/google/protobuf/README.md2
-rw-r--r--vendor/google/protobuf/composer.json23
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php30
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php48
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php30
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php29
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php29
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php282
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php29
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.phpbin0 -> 1162 bytes
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php30
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.phpbin0 -> 2205 bytes
-rw-r--r--vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php49
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Any.php257
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Api.php360
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/BoolValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/BytesValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Descriptor.php108
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php76
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Duration.php173
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Enum.php213
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php79
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/EnumValue.php135
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php64
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Field.php381
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php71
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php176
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php144
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/FieldMask.php217
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/FloatValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php38
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Int32Value.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Int64Value.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php86
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php381
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php159
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php236
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php194
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php336
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php161
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php128
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php63
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php116
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php216
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php130
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php242
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php146
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php123
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php67
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php326
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php611
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php58
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php153
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php559
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php58
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php62
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_JSType.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php89
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php533
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php63
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php1106
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php64
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php47
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php304
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php40
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php55
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php663
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php622
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php43
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php75
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php255
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php41
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php43
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php71
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php298
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php146
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php2040
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php120
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php466
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php282
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php160
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php64
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptor.php87
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php109
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php77
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php67
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php50
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php264
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php125
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php136
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php123
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php230
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php448
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/TimestampBase.php32
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php300
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php116
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php16
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/ListValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Method.php271
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Mixin.php166
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/NullValue.php49
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php87
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Option.php136
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/SourceContext.php72
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/StringValue.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Struct.php73
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Syntax.php54
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Timestamp.php186
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Type.php247
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php68
-rw-r--r--vendor/google/protobuf/src/Google/Protobuf/Value.php244
-rw-r--r--vendor/google/protobuf/src/phpdoc.dist.xml15
-rw-r--r--vendor/guzzlehttp/guzzle/CHANGELOG.md1624
-rw-r--r--vendor/guzzlehttp/guzzle/LICENSE27
-rw-r--r--vendor/guzzlehttp/guzzle/README.md94
-rw-r--r--vendor/guzzlehttp/guzzle/UPGRADING.md1253
-rw-r--r--vendor/guzzlehttp/guzzle/composer.json103
-rw-r--r--vendor/guzzlehttp/guzzle/src/BodySummarizer.php28
-rw-r--r--vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php13
-rw-r--r--vendor/guzzlehttp/guzzle/src/Client.php483
-rw-r--r--vendor/guzzlehttp/guzzle/src/ClientInterface.php84
-rw-r--r--vendor/guzzlehttp/guzzle/src/ClientTrait.php241
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php307
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php80
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php101
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php77
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php488
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php39
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/ClientException.php10
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php56
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php9
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php7
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/RequestException.php166
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/ServerException.php10
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php7
-rw-r--r--vendor/guzzlehttp/guzzle/src/Exception/TransferException.php7
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php638
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php25
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php49
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php267
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php112
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php42
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php212
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/Proxy.php51
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php615
-rw-r--r--vendor/guzzlehttp/guzzle/src/HandlerStack.php275
-rw-r--r--vendor/guzzlehttp/guzzle/src/MessageFormatter.php199
-rw-r--r--vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php18
-rw-r--r--vendor/guzzlehttp/guzzle/src/Middleware.php268
-rw-r--r--vendor/guzzlehttp/guzzle/src/Pool.php125
-rw-r--r--vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php105
-rw-r--r--vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php228
-rw-r--r--vendor/guzzlehttp/guzzle/src/RequestOptions.php276
-rw-r--r--vendor/guzzlehttp/guzzle/src/RetryMiddleware.php119
-rw-r--r--vendor/guzzlehttp/guzzle/src/TransferStats.php133
-rw-r--r--vendor/guzzlehttp/guzzle/src/Utils.php385
-rw-r--r--vendor/guzzlehttp/guzzle/src/functions.php167
-rw-r--r--vendor/guzzlehttp/guzzle/src/functions_include.php6
-rw-r--r--vendor/guzzlehttp/promises/CHANGELOG.md145
-rw-r--r--vendor/guzzlehttp/promises/LICENSE24
-rw-r--r--vendor/guzzlehttp/promises/README.md559
-rw-r--r--vendor/guzzlehttp/promises/composer.json58
-rw-r--r--vendor/guzzlehttp/promises/src/AggregateException.php19
-rw-r--r--vendor/guzzlehttp/promises/src/CancellationException.php12
-rw-r--r--vendor/guzzlehttp/promises/src/Coroutine.php162
-rw-r--r--vendor/guzzlehttp/promises/src/Create.php79
-rw-r--r--vendor/guzzlehttp/promises/src/Each.php86
-rw-r--r--vendor/guzzlehttp/promises/src/EachPromise.php250
-rw-r--r--vendor/guzzlehttp/promises/src/FulfilledPromise.php89
-rw-r--r--vendor/guzzlehttp/promises/src/Is.php40
-rw-r--r--vendor/guzzlehttp/promises/src/Promise.php281
-rw-r--r--vendor/guzzlehttp/promises/src/PromiseInterface.php91
-rw-r--r--vendor/guzzlehttp/promises/src/PromisorInterface.php16
-rw-r--r--vendor/guzzlehttp/promises/src/RejectedPromise.php95
-rw-r--r--vendor/guzzlehttp/promises/src/RejectionException.php49
-rw-r--r--vendor/guzzlehttp/promises/src/TaskQueue.php71
-rw-r--r--vendor/guzzlehttp/promises/src/TaskQueueInterface.php24
-rw-r--r--vendor/guzzlehttp/promises/src/Utils.php259
-rw-r--r--vendor/guzzlehttp/psr7/CHANGELOG.md437
-rw-r--r--vendor/guzzlehttp/psr7/LICENSE26
-rw-r--r--vendor/guzzlehttp/psr7/README.md880
-rw-r--r--vendor/guzzlehttp/psr7/composer.json93
-rw-r--r--vendor/guzzlehttp/psr7/src/AppendStream.php248
-rw-r--r--vendor/guzzlehttp/psr7/src/BufferStream.php147
-rw-r--r--vendor/guzzlehttp/psr7/src/CachingStream.php153
-rw-r--r--vendor/guzzlehttp/psr7/src/DroppingStream.php49
-rw-r--r--vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php14
-rw-r--r--vendor/guzzlehttp/psr7/src/FnStream.php179
-rw-r--r--vendor/guzzlehttp/psr7/src/Header.php134
-rw-r--r--vendor/guzzlehttp/psr7/src/HttpFactory.php94
-rw-r--r--vendor/guzzlehttp/psr7/src/InflateStream.php37
-rw-r--r--vendor/guzzlehttp/psr7/src/LazyOpenStream.php49
-rw-r--r--vendor/guzzlehttp/psr7/src/LimitStream.php157
-rw-r--r--vendor/guzzlehttp/psr7/src/Message.php246
-rw-r--r--vendor/guzzlehttp/psr7/src/MessageTrait.php265
-rw-r--r--vendor/guzzlehttp/psr7/src/MimeType.php1259
-rw-r--r--vendor/guzzlehttp/psr7/src/MultipartStream.php157
-rw-r--r--vendor/guzzlehttp/psr7/src/NoSeekStream.php28
-rw-r--r--vendor/guzzlehttp/psr7/src/PumpStream.php179
-rw-r--r--vendor/guzzlehttp/psr7/src/Query.php113
-rw-r--r--vendor/guzzlehttp/psr7/src/Request.php159
-rw-r--r--vendor/guzzlehttp/psr7/src/Response.php161
-rw-r--r--vendor/guzzlehttp/psr7/src/Rfc7230.php23
-rw-r--r--vendor/guzzlehttp/psr7/src/ServerRequest.php340
-rw-r--r--vendor/guzzlehttp/psr7/src/Stream.php283
-rw-r--r--vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php156
-rw-r--r--vendor/guzzlehttp/psr7/src/StreamWrapper.php175
-rw-r--r--vendor/guzzlehttp/psr7/src/UploadedFile.php211
-rw-r--r--vendor/guzzlehttp/psr7/src/Uri.php741
-rw-r--r--vendor/guzzlehttp/psr7/src/UriComparator.php52
-rw-r--r--vendor/guzzlehttp/psr7/src/UriNormalizer.php220
-rw-r--r--vendor/guzzlehttp/psr7/src/UriResolver.php211
-rw-r--r--vendor/guzzlehttp/psr7/src/Utils.php463
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/.editorconfig16
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml44
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/.gitignore17
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md3
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/LICENSE21
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/README.md219
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/build/.gitignore2
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/composer.json62
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/examples/config.php26
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php51
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist37
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist47
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php39
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php36
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php41
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php184
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php85
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php390
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php100
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php171
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php51
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php47
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php35
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php51
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php32
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php46
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php28
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php23
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php35
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php44
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php10
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php46
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php68
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php88
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php62
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php29
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php71
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php45
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php236
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php12
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php305
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php476
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php120
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php76
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php30
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php55
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php65
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php31
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php55
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php61
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php105
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php31
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php74
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php55
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php66
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php88
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php55
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php86
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php28
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php65
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php87
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php38
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php106
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php246
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php108
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php190
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php71
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php27
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php60
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php102
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php66
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php74
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php84
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php82
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php134
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php40
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php56
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php30
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php70
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php70
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php161
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php83
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php28
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php110
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php34
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php151
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php420
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php128
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php170
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php104
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php257
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php30
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php169
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php52
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php24
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php31
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php29
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php46
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php43
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php68
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php48
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php49
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php58
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php126
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php116
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php37
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php293
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php166
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php262
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/README.md48
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh64
-rw-r--r--vendor/open-telemetry/api/Baggage/Baggage.php100
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageBuilder.php40
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php23
-rw-r--r--vendor/open-telemetry/api/Baggage/BaggageInterface.php62
-rw-r--r--vendor/open-telemetry/api/Baggage/Entry.php38
-rw-r--r--vendor/open-telemetry/api/Baggage/Metadata.php27
-rw-r--r--vendor/open-telemetry/api/Baggage/MetadataInterface.php13
-rw-r--r--vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php92
-rw-r--r--vendor/open-telemetry/api/Baggage/Propagation/Parser.php69
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php13
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php37
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php10
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php13
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php22
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php25
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php48
-rw-r--r--vendor/open-telemetry/api/Behavior/Internal/Logging.php90
-rw-r--r--vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php50
-rw-r--r--vendor/open-telemetry/api/Globals.php121
-rw-r--r--vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php97
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php77
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php14
-rw-r--r--vendor/open-telemetry/api/Instrumentation/Configurator.php113
-rw-r--r--vendor/open-telemetry/api/Instrumentation/ContextKeys.php58
-rw-r--r--vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php43
-rw-r--r--vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php193
-rw-r--r--vendor/open-telemetry/api/LoggerHolder.php53
-rw-r--r--vendor/open-telemetry/api/Logs/EventLogger.php26
-rw-r--r--vendor/open-telemetry/api/Logs/EventLoggerInterface.php13
-rw-r--r--vendor/open-telemetry/api/Logs/LogRecord.php108
-rw-r--r--vendor/open-telemetry/api/Logs/LoggerInterface.php10
-rw-r--r--vendor/open-telemetry/api/Logs/LoggerProviderInterface.php18
-rw-r--r--vendor/open-telemetry/api/Logs/Map/Psr3.php40
-rw-r--r--vendor/open-telemetry/api/Logs/NoopLogger.php33
-rw-r--r--vendor/open-telemetry/api/Logs/NoopLoggerProvider.php20
-rw-r--r--vendor/open-telemetry/api/Logs/README.md19
-rw-r--r--vendor/open-telemetry/api/Metrics/CounterInterface.php21
-rw-r--r--vendor/open-telemetry/api/Metrics/HistogramInterface.php21
-rw-r--r--vendor/open-telemetry/api/Metrics/MeterInterface.php111
-rw-r--r--vendor/open-telemetry/api/Metrics/MeterProviderInterface.php28
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php46
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php20
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php19
-rw-r--r--vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php56
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php16
-rw-r--r--vendor/open-telemetry/api/Metrics/ObserverInterface.php18
-rw-r--r--vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php19
-rw-r--r--vendor/open-telemetry/api/README.md14
-rw-r--r--vendor/open-telemetry/api/Signals.php21
-rw-r--r--vendor/open-telemetry/api/Trace/NonRecordingSpan.php76
-rw-r--r--vendor/open-telemetry/api/Trace/NoopSpanBuilder.php65
-rw-r--r--vendor/open-telemetry/api/Trace/NoopTracer.php26
-rw-r--r--vendor/open-telemetry/api/Trace/NoopTracerProvider.php17
-rw-r--r--vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php157
-rw-r--r--vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php31
-rw-r--r--vendor/open-telemetry/api/Trace/Span.php59
-rw-r--r--vendor/open-telemetry/api/Trace/SpanBuilderInterface.php51
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContext.php127
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContextInterface.php28
-rw-r--r--vendor/open-telemetry/api/Trace/SpanContextValidator.php35
-rw-r--r--vendor/open-telemetry/api/Trace/SpanInterface.php96
-rw-r--r--vendor/open-telemetry/api/Trace/SpanKind.php17
-rw-r--r--vendor/open-telemetry/api/Trace/StatusCode.php15
-rw-r--r--vendor/open-telemetry/api/Trace/TraceFlags.php11
-rw-r--r--vendor/open-telemetry/api/Trace/TraceState.php190
-rw-r--r--vendor/open-telemetry/api/Trace/TraceStateInterface.php61
-rw-r--r--vendor/open-telemetry/api/Trace/TracerInterface.php11
-rw-r--r--vendor/open-telemetry/api/Trace/TracerProviderInterface.php19
-rw-r--r--vendor/open-telemetry/api/Trace/functions.php44
-rw-r--r--vendor/open-telemetry/api/composer.json40
-rw-r--r--vendor/open-telemetry/context/Context.php131
-rw-r--r--vendor/open-telemetry/context/ContextInterface.php86
-rw-r--r--vendor/open-telemetry/context/ContextKey.php23
-rw-r--r--vendor/open-telemetry/context/ContextKeyInterface.php12
-rw-r--r--vendor/open-telemetry/context/ContextKeys.php25
-rw-r--r--vendor/open-telemetry/context/ContextStorage.php57
-rw-r--r--vendor/open-telemetry/context/ContextStorageHead.php19
-rw-r--r--vendor/open-telemetry/context/ContextStorageInterface.php32
-rw-r--r--vendor/open-telemetry/context/ContextStorageNode.php92
-rw-r--r--vendor/open-telemetry/context/ContextStorageScopeInterface.php22
-rw-r--r--vendor/open-telemetry/context/DebugScope.php94
-rw-r--r--vendor/open-telemetry/context/ExecutionContextAwareInterface.php23
-rw-r--r--vendor/open-telemetry/context/FiberBoundContextStorage.php84
-rw-r--r--vendor/open-telemetry/context/FiberBoundContextStorageScope.php67
-rw-r--r--vendor/open-telemetry/context/ImplicitContextKeyedInterface.php32
-rw-r--r--vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php129
-rw-r--r--vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php83
-rw-r--r--vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php36
-rw-r--r--vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php25
-rw-r--r--vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php16
-rw-r--r--vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php46
-rw-r--r--vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php40
-rw-r--r--vendor/open-telemetry/context/README.md63
-rw-r--r--vendor/open-telemetry/context/ScopeInterface.php32
-rw-r--r--vendor/open-telemetry/context/ZendObserverFiber.php67
-rw-r--r--vendor/open-telemetry/context/composer.json41
-rw-r--r--vendor/open-telemetry/context/fiber/initialize_fiber_handler.php20
-rw-r--r--vendor/open-telemetry/context/fiber/zend_observer_fiber.h9
-rw-r--r--vendor/open-telemetry/exporter-otlp/AttributesConverter.php62
-rw-r--r--vendor/open-telemetry/exporter-otlp/ContentTypes.php12
-rw-r--r--vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php145
-rw-r--r--vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php28
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsConverter.php142
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsExporter.php85
-rw-r--r--vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php85
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricConverter.php265
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricExporter.php97
-rw-r--r--vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php110
-rw-r--r--vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php33
-rw-r--r--vendor/open-telemetry/exporter-otlp/OtlpUtil.php45
-rw-r--r--vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php115
-rw-r--r--vendor/open-telemetry/exporter-otlp/Protocols.php36
-rw-r--r--vendor/open-telemetry/exporter-otlp/README.md45
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanConverter.php187
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanExporter.php81
-rw-r--r--vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php96
-rw-r--r--vendor/open-telemetry/exporter-otlp/_register.php9
-rw-r--r--vendor/open-telemetry/exporter-otlp/composer.json41
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/.gitignore1
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.phpbin0 -> 1361 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.phpbin0 -> 1438 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.phpbin0 -> 1380 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.phpbin0 -> 1411 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.phpbin0 -> 2512 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.phpbin0 -> 1714 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.phpbin0 -> 4526 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php32
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.phpbin0 -> 2533 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.phpbin0 -> 1465 bytes
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php127
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php81
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php119
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php53
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php240
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php68
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php98
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php164
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php98
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php83
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php88
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php541
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php58
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php167
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php201
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php149
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php114
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php61
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php269
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php718
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php141
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php67
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php565
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php227
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php235
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php60
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php99
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php393
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php132
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php358
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php309
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php133
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php65
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php336
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php117
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php113
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php60
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php61
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php156
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php67
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php153
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php726
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php189
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php225
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php94
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php102
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php126
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php66
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php16
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php297
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php68
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php90
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/README.md31
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/VERSION1
-rw-r--r--vendor/open-telemetry/gen-otlp-protobuf/composer.json37
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php83
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php29
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php88
-rw-r--r--vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php29
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php58
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php11
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/Attributes.php67
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php120
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php36
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php77
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php33
-rw-r--r--vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Configuration.php182
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Defaults.php122
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php208
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php34
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php28
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php45
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php38
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php68
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php40
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php41
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php133
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php62
-rw-r--r--vendor/open-telemetry/sdk/Common/Configuration/Variables.php142
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md14
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php93
-rw-r--r--vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php7
-rw-r--r--vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php155
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php168
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php74
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php175
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php97
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php118
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php32
-rw-r--r--vendor/open-telemetry/sdk/Common/Export/TransportInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php48
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php40
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/FutureInterface.php34
-rw-r--r--vendor/open-telemetry/sdk/Common/Future/NullCancellation.php20
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php52
-rw-r--r--vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php46
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php31
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockFactory.php30
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php16
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/ClockInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatch.php119
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php44
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/SystemClock.php49
-rw-r--r--vendor/open-telemetry/sdk/Common/Time/Util.php32
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php35
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php82
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/WeakMap.php175
-rw-r--r--vendor/open-telemetry/sdk/Common/Util/functions.php52
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php106
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php19
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php48
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php28
-rw-r--r--vendor/open-telemetry/sdk/Logs/Exporter/_register.php6
-rw-r--r--vendor/open-telemetry/sdk/Logs/ExporterFactory.php29
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordLimits.php29
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php58
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php62
-rw-r--r--vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Logs/Logger.php37
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProvider.php56
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php55
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php24
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Logs/LoggerSharedState.php60
-rw-r--r--vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php33
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php273
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php62
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php37
-rw-r--r--vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php38
-rw-r--r--vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php50
-rw-r--r--vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php9
-rw-r--r--vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php103
-rw-r--r--vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php83
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php167
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php81
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php91
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AggregationInterface.php57
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Counter.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php9
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php65
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Gauge.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Histogram.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php76
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Metric.php46
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php43
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Sum.php34
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Data/Temporality.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php26
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php92
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php38
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php21
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Histogram.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Instrument.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/InstrumentType.php25
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Meter.php314
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterInstruments.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProvider.php130
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php62
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php78
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php105
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php78
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php23
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php7
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php17
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php187
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php44
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php98
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php41
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php156
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php14
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php36
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php31
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php184
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php22
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php20
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php18
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php26
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCallback.php58
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php32
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableCounter.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableGauge.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php61
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php71
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php64
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php50
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php16
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php30
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php18
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php111
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/Delta.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php110
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/Metric.php44
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php73
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php58
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php126
-rw-r--r--vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php19
-rw-r--r--vendor/open-telemetry/sdk/Metrics/UpDownCounter.php37
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php40
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php33
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php28
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php29
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php24
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php13
-rw-r--r--vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php77
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ViewProjection.php47
-rw-r--r--vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php55
-rw-r--r--vendor/open-telemetry/sdk/Propagation/_register.php16
-rw-r--r--vendor/open-telemetry/sdk/README.md49
-rw-r--r--vendor/open-telemetry/sdk/Registry.php208
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Composer.php30
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Composite.php32
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Constant.php23
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Environment.php40
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Host.php27
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php32
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Process.php43
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php28
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php53
-rw-r--r--vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php25
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceInfo.php125
-rw-r--r--vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php95
-rw-r--r--vendor/open-telemetry/sdk/Sdk.php70
-rw-r--r--vendor/open-telemetry/sdk/SdkAutoloader.php76
-rw-r--r--vendor/open-telemetry/sdk/SdkBuilder.php98
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php41
-rw-r--r--vendor/open-telemetry/sdk/Trace/Event.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/EventInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/ExporterFactory.php32
-rw-r--r--vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/ImmutableSpan.php153
-rw-r--r--vendor/open-telemetry/sdk/Trace/Link.php30
-rw-r--r--vendor/open-telemetry/sdk/Trace/LinkInterface.php14
-rw-r--r--vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php21
-rw-r--r--vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php49
-rw-r--r--vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php11
-rw-r--r--vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php50
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php50
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php100
-rw-r--r--vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php70
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplerFactory.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplerInterface.php46
-rw-r--r--vendor/open-telemetry/sdk/Trace/SamplingResult.php71
-rw-r--r--vendor/open-telemetry/sdk/Trace/Span.php359
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanBuilder.php191
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php10
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanDataInterface.php46
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php57
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php18
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php173
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php40
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php58
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php96
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php12
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php7
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php29
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanLimits.php67
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php148
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php290
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php41
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php79
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php47
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php120
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php48
-rw-r--r--vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php38
-rw-r--r--vendor/open-telemetry/sdk/Trace/StatusData.php84
-rw-r--r--vendor/open-telemetry/sdk/Trace/StatusDataInterface.php18
-rw-r--r--vendor/open-telemetry/sdk/Trace/Tracer.php52
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProvider.php99
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php45
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php60
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php15
-rw-r--r--vendor/open-telemetry/sdk/Trace/TracerSharedState.php100
-rw-r--r--vendor/open-telemetry/sdk/_autoload.php5
-rw-r--r--vendor/open-telemetry/sdk/composer.json59
-rw-r--r--vendor/open-telemetry/sem-conv/README.md25
-rw-r--r--vendor/open-telemetry/sem-conv/ResourceAttributes.php1007
-rw-r--r--vendor/open-telemetry/sem-conv/TraceAttributes.php2052
-rw-r--r--vendor/open-telemetry/sem-conv/composer.json32
-rw-r--r--vendor/opentracing/opentracing/.github/ISSUE_TEMPLATE.md21
-rw-r--r--vendor/opentracing/opentracing/.github/PULL_REQUEST_TEMPLATE.md24
-rw-r--r--vendor/opentracing/opentracing/.github/workflows/ci.yml44
-rw-r--r--vendor/opentracing/opentracing/.gitignore4
-rw-r--r--vendor/opentracing/opentracing/CONTRIBUTING.md75
-rw-r--r--vendor/opentracing/opentracing/LICENSE201
-rw-r--r--vendor/opentracing/opentracing/README.md306
-rw-r--r--vendor/opentracing/opentracing/composer.json44
-rw-r--r--vendor/opentracing/opentracing/phpstan.neon5
-rw-r--r--vendor/opentracing/opentracing/phpunit.xml27
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Formats.php49
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php60
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/InvalidReferenceArgumentException.php33
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php30
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/InvalidSpanOptionException.php131
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php62
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScopeManager.php49
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpan.php145
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpanContext.php100
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Mock/MockTracer.php152
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/NoopScope.php23
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/NoopScopeManager.php24
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/NoopSpan.php67
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/NoopSpanContext.php35
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/NoopTracer.php62
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Reference.php77
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Scope.php32
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/ScopeManager.php40
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Span.php95
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/SpanContext.php37
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/StartSpanOptions.php206
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Tags.php124
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Tracer.php119
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/UnsupportedFormatException.php22
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockScopeManagerTest.php63
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanContextTest.php54
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanTest.php52
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockTracerTest.php139
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/ReferenceTest.php45
-rw-r--r--vendor/opentracing/opentracing/tests/OpenTracing/StartSpanOptionsTest.php129
-rw-r--r--vendor/packaged/thrift/.gitignore2
-rw-r--r--vendor/packaged/thrift/README.md44
-rw-r--r--vendor/packaged/thrift/composer.json16
-rw-r--r--vendor/packaged/thrift/src/Base/TBase.php382
-rw-r--r--vendor/packaged/thrift/src/ClassLoader/ThriftClassLoader.php206
-rw-r--r--vendor/packaged/thrift/src/Exception/TApplicationException.php76
-rw-r--r--vendor/packaged/thrift/src/Exception/TException.php384
-rw-r--r--vendor/packaged/thrift/src/Exception/TProtocolException.php50
-rw-r--r--vendor/packaged/thrift/src/Exception/TTransportException.php40
-rw-r--r--vendor/packaged/thrift/src/Factory/TBinaryProtocolFactory.php45
-rw-r--r--vendor/packaged/thrift/src/Factory/TCompactProtocolFactory.php40
-rw-r--r--vendor/packaged/thrift/src/Factory/TJSONProtocolFactory.php40
-rw-r--r--vendor/packaged/thrift/src/Factory/TProtocolFactory.php36
-rw-r--r--vendor/packaged/thrift/src/Factory/TStringFuncFactory.php66
-rw-r--r--vendor/packaged/thrift/src/Factory/TTransportFactory.php18
-rw-r--r--vendor/packaged/thrift/src/Protocol/JSON/BaseContext.php39
-rw-r--r--vendor/packaged/thrift/src/Protocol/JSON/ListContext.php54
-rw-r--r--vendor/packaged/thrift/src/Protocol/JSON/LookaheadReader.php57
-rw-r--r--vendor/packaged/thrift/src/Protocol/JSON/PairContext.php64
-rw-r--r--vendor/packaged/thrift/src/Protocol/SimpleJSON/CollectionMapKeyException.php33
-rw-r--r--vendor/packaged/thrift/src/Protocol/SimpleJSON/Context.php35
-rw-r--r--vendor/packaged/thrift/src/Protocol/SimpleJSON/ListContext.php45
-rw-r--r--vendor/packaged/thrift/src/Protocol/SimpleJSON/MapContext.php47
-rw-r--r--vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php52
-rw-r--r--vendor/packaged/thrift/src/Protocol/TBinaryProtocol.php453
-rw-r--r--vendor/packaged/thrift/src/Protocol/TBinaryProtocolAccelerated.php67
-rw-r--r--vendor/packaged/thrift/src/Protocol/TCompactProtocol.php739
-rw-r--r--vendor/packaged/thrift/src/Protocol/TJSONProtocol.php815
-rw-r--r--vendor/packaged/thrift/src/Protocol/TMultiplexedProtocol.php85
-rw-r--r--vendor/packaged/thrift/src/Protocol/TProtocol.php352
-rw-r--r--vendor/packaged/thrift/src/Protocol/TProtocolDecorator.php285
-rw-r--r--vendor/packaged/thrift/src/Protocol/TSimpleJSONProtocol.php374
-rw-r--r--vendor/packaged/thrift/src/Serializer/TBinarySerializer.php87
-rw-r--r--vendor/packaged/thrift/src/Server/TForkingServer.php125
-rw-r--r--vendor/packaged/thrift/src/Server/TSSLServerSocket.php97
-rw-r--r--vendor/packaged/thrift/src/Server/TServer.php102
-rw-r--r--vendor/packaged/thrift/src/Server/TServerSocket.php124
-rw-r--r--vendor/packaged/thrift/src/Server/TServerTransport.php56
-rw-r--r--vendor/packaged/thrift/src/Server/TSimpleServer.php60
-rw-r--r--vendor/packaged/thrift/src/StoredMessageProtocol.php53
-rw-r--r--vendor/packaged/thrift/src/StringFunc/Core.php40
-rw-r--r--vendor/packaged/thrift/src/StringFunc/Mbstring.php46
-rw-r--r--vendor/packaged/thrift/src/StringFunc/TStringFunc.php28
-rw-r--r--vendor/packaged/thrift/src/TMultiplexedProcessor.php118
-rw-r--r--vendor/packaged/thrift/src/Transport/TBufferedTransport.php206
-rw-r--r--vendor/packaged/thrift/src/Transport/TCurlClient.php281
-rw-r--r--vendor/packaged/thrift/src/Transport/TFramedTransport.php192
-rw-r--r--vendor/packaged/thrift/src/Transport/THttpClient.php258
-rw-r--r--vendor/packaged/thrift/src/Transport/TMemoryBuffer.php106
-rw-r--r--vendor/packaged/thrift/src/Transport/TNullTransport.php56
-rw-r--r--vendor/packaged/thrift/src/Transport/TPhpStream.php124
-rw-r--r--vendor/packaged/thrift/src/Transport/TSSLSocket.php117
-rw-r--r--vendor/packaged/thrift/src/Transport/TSocket.php366
-rw-r--r--vendor/packaged/thrift/src/Transport/TSocketPool.php310
-rw-r--r--vendor/packaged/thrift/src/Transport/TTransport.php98
-rw-r--r--vendor/packaged/thrift/src/Type/TConstant.php52
-rw-r--r--vendor/packaged/thrift/src/Type/TMessageType.php34
-rw-r--r--vendor/packaged/thrift/src/Type/TType.php47
-rw-r--r--vendor/packaged/thrift/update.sh22
-rw-r--r--vendor/php-http/discovery/.php-cs-fixer.php16
-rw-r--r--vendor/php-http/discovery/CHANGELOG.md374
-rw-r--r--vendor/php-http/discovery/LICENSE19
-rw-r--r--vendor/php-http/discovery/README.md122
-rw-r--r--vendor/php-http/discovery/composer.json63
-rw-r--r--vendor/php-http/discovery/src/ClassDiscovery.php255
-rw-r--r--vendor/php-http/discovery/src/Composer/Plugin.php465
-rw-r--r--vendor/php-http/discovery/src/Exception.php12
-rw-r--r--vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php14
-rw-r--r--vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php51
-rw-r--r--vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php47
-rw-r--r--vendor/php-http/discovery/src/Exception/NotFoundException.php16
-rw-r--r--vendor/php-http/discovery/src/Exception/PuliUnavailableException.php12
-rw-r--r--vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php15
-rw-r--r--vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php32
-rw-r--r--vendor/php-http/discovery/src/HttpClientDiscovery.php34
-rw-r--r--vendor/php-http/discovery/src/MessageFactoryDiscovery.php34
-rw-r--r--vendor/php-http/discovery/src/NotFoundException.php14
-rw-r--r--vendor/php-http/discovery/src/Psr17Factory.php303
-rw-r--r--vendor/php-http/discovery/src/Psr17FactoryDiscovery.php136
-rw-r--r--vendor/php-http/discovery/src/Psr18Client.php45
-rw-r--r--vendor/php-http/discovery/src/Psr18ClientDiscovery.php32
-rw-r--r--vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php180
-rw-r--r--vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php104
-rw-r--r--vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php23
-rw-r--r--vendor/php-http/discovery/src/Strategy/MockClientStrategy.php24
-rw-r--r--vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php90
-rw-r--r--vendor/php-http/discovery/src/StreamFactoryDiscovery.php34
-rw-r--r--vendor/php-http/discovery/src/UriFactoryDiscovery.php34
-rw-r--r--vendor/php-http/guzzle7-adapter/CHANGELOG.md18
-rw-r--r--vendor/php-http/guzzle7-adapter/LICENSE19
-rw-r--r--vendor/php-http/guzzle7-adapter/README.md45
-rw-r--r--vendor/php-http/guzzle7-adapter/composer.json43
-rw-r--r--vendor/php-http/guzzle7-adapter/phpstan.neon.dist5
-rw-r--r--vendor/php-http/guzzle7-adapter/psalm.baseline.xml8
-rw-r--r--vendor/php-http/guzzle7-adapter/psalm.xml16
-rw-r--r--vendor/php-http/guzzle7-adapter/src/Client.php75
-rw-r--r--vendor/php-http/guzzle7-adapter/src/Exception/UnexpectedValueException.php9
-rw-r--r--vendor/php-http/guzzle7-adapter/src/Promise.php132
-rw-r--r--vendor/php-http/httplug/.php-cs-fixer.dist.php16
-rw-r--r--vendor/php-http/httplug/CHANGELOG.md141
-rw-r--r--vendor/php-http/httplug/LICENSE20
-rw-r--r--vendor/php-http/httplug/README.md54
-rw-r--r--vendor/php-http/httplug/composer.json40
-rw-r--r--vendor/php-http/httplug/puli.json12
-rw-r--r--vendor/php-http/httplug/src/Exception.php14
-rw-r--r--vendor/php-http/httplug/src/Exception/HttpException.php65
-rw-r--r--vendor/php-http/httplug/src/Exception/NetworkException.php28
-rw-r--r--vendor/php-http/httplug/src/Exception/RequestAwareTrait.php26
-rw-r--r--vendor/php-http/httplug/src/Exception/RequestException.php29
-rw-r--r--vendor/php-http/httplug/src/Exception/TransferException.php14
-rw-r--r--vendor/php-http/httplug/src/HttpAsyncClient.php25
-rw-r--r--vendor/php-http/httplug/src/HttpClient.php17
-rw-r--r--vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php54
-rw-r--r--vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php58
-rw-r--r--vendor/php-http/promise/CHANGELOG.md48
-rw-r--r--vendor/php-http/promise/LICENSE19
-rw-r--r--vendor/php-http/promise/README.md48
-rw-r--r--vendor/php-http/promise/composer.json38
-rw-r--r--vendor/php-http/promise/src/FulfilledPromise.php58
-rw-r--r--vendor/php-http/promise/src/Promise.php69
-rw-r--r--vendor/php-http/promise/src/RejectedPromise.php58
-rw-r--r--vendor/psr/cache/CHANGELOG.md16
-rw-r--r--vendor/psr/cache/LICENSE.txt19
-rw-r--r--vendor/psr/cache/README.md12
-rw-r--r--vendor/psr/cache/composer.json25
-rw-r--r--vendor/psr/cache/src/CacheException.php10
-rw-r--r--vendor/psr/cache/src/CacheItemInterface.php105
-rw-r--r--vendor/psr/cache/src/CacheItemPoolInterface.php138
-rw-r--r--vendor/psr/cache/src/InvalidArgumentException.php13
-rw-r--r--vendor/psr/http-client/CHANGELOG.md31
-rw-r--r--vendor/psr/http-client/LICENSE19
-rw-r--r--vendor/psr/http-client/README.md12
-rw-r--r--vendor/psr/http-client/composer.json30
-rw-r--r--vendor/psr/http-client/src/ClientExceptionInterface.php10
-rw-r--r--vendor/psr/http-client/src/ClientInterface.php20
-rw-r--r--vendor/psr/http-client/src/NetworkExceptionInterface.php24
-rw-r--r--vendor/psr/http-client/src/RequestExceptionInterface.php24
-rw-r--r--vendor/psr/http-factory/LICENSE21
-rw-r--r--vendor/psr/http-factory/README.md12
-rw-r--r--vendor/psr/http-factory/composer.json35
-rw-r--r--vendor/psr/http-factory/src/RequestFactoryInterface.php18
-rw-r--r--vendor/psr/http-factory/src/ResponseFactoryInterface.php18
-rw-r--r--vendor/psr/http-factory/src/ServerRequestFactoryInterface.php24
-rw-r--r--vendor/psr/http-factory/src/StreamFactoryInterface.php45
-rw-r--r--vendor/psr/http-factory/src/UploadedFileFactoryInterface.php34
-rw-r--r--vendor/psr/http-factory/src/UriFactoryInterface.php17
-rw-r--r--vendor/psr/http-message/CHANGELOG.md36
-rw-r--r--vendor/psr/http-message/LICENSE19
-rw-r--r--vendor/psr/http-message/README.md16
-rw-r--r--vendor/psr/http-message/composer.json26
-rw-r--r--vendor/psr/http-message/docs/PSR7-Interfaces.md130
-rw-r--r--vendor/psr/http-message/docs/PSR7-Usage.md159
-rw-r--r--vendor/psr/http-message/src/MessageInterface.php187
-rw-r--r--vendor/psr/http-message/src/RequestInterface.php130
-rw-r--r--vendor/psr/http-message/src/ResponseInterface.php68
-rw-r--r--vendor/psr/http-message/src/ServerRequestInterface.php261
-rw-r--r--vendor/psr/http-message/src/StreamInterface.php158
-rw-r--r--vendor/psr/http-message/src/UploadedFileInterface.php123
-rw-r--r--vendor/psr/http-message/src/UriInterface.php324
-rw-r--r--vendor/ralouphie/getallheaders/LICENSE21
-rw-r--r--vendor/ralouphie/getallheaders/README.md27
-rw-r--r--vendor/ralouphie/getallheaders/composer.json26
-rw-r--r--vendor/ralouphie/getallheaders/src/getallheaders.php46
-rw-r--r--vendor/symfony/deprecation-contracts/.gitignore3
-rw-r--r--vendor/symfony/deprecation-contracts/CHANGELOG.md5
-rw-r--r--vendor/symfony/deprecation-contracts/LICENSE19
-rw-r--r--vendor/symfony/deprecation-contracts/README.md26
-rw-r--r--vendor/symfony/deprecation-contracts/composer.json35
-rw-r--r--vendor/symfony/deprecation-contracts/function.php27
-rw-r--r--vendor/symfony/polyfill-mbstring/LICENSE19
-rw-r--r--vendor/symfony/polyfill-mbstring/Mbstring.php947
-rw-r--r--vendor/symfony/polyfill-mbstring/README.md13
-rw-r--r--vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php119
-rw-r--r--vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php1397
-rw-r--r--vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php5
-rw-r--r--vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php1489
-rw-r--r--vendor/symfony/polyfill-mbstring/bootstrap.php151
-rw-r--r--vendor/symfony/polyfill-mbstring/bootstrap80.php147
-rw-r--r--vendor/symfony/polyfill-mbstring/composer.json41
-rw-r--r--vendor/symfony/polyfill-php80/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php80/Php80.php115
-rw-r--r--vendor/symfony/polyfill-php80/PhpToken.php103
-rw-r--r--vendor/symfony/polyfill-php80/README.md25
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php31
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php16
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php20
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php16
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php16
-rw-r--r--vendor/symfony/polyfill-php80/bootstrap.php42
-rw-r--r--vendor/symfony/polyfill-php80/composer.json40
-rw-r--r--vendor/symfony/polyfill-php81/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php81/Php81.php37
-rw-r--r--vendor/symfony/polyfill-php81/README.md18
-rw-r--r--vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php51
-rw-r--r--vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php20
-rw-r--r--vendor/symfony/polyfill-php81/bootstrap.php28
-rw-r--r--vendor/symfony/polyfill-php81/composer.json36
-rw-r--r--vendor/symfony/polyfill-php82/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php82/NoDynamicProperties.php23
-rw-r--r--vendor/symfony/polyfill-php82/Php82.php368
-rw-r--r--vendor/symfony/polyfill-php82/README.md23
-rw-r--r--vendor/symfony/polyfill-php82/Random/Engine/Secure.php50
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php20
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php18
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php18
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine.php19
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php20
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php21
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php21
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php20
-rw-r--r--vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php16
-rw-r--r--vendor/symfony/polyfill-php82/SensitiveParameterValue.php47
-rw-r--r--vendor/symfony/polyfill-php82/bootstrap.php36
-rw-r--r--vendor/symfony/polyfill-php82/composer.json36
1161 files changed, 93374 insertions, 24274 deletions
diff --git a/backend.php b/backend.php
index c322e1e55..220d0b7b7 100644
--- a/backend.php
+++ b/backend.php
@@ -30,14 +30,17 @@
$op = (string)clean($op);
$method = (string)clean($method);
- $scope = Tracer::start(__FILE__, ['tags' => json_encode($_REQUEST)]);
+ $scope = Tracer::start(__FILE__);
+
+ register_shutdown_function(function() use ($scope) {
+ $scope->end();
+ });
startup_gettext();
$script_started = microtime(true);
if (!init_plugins()) {
- $scope->close();
return;
}
@@ -52,8 +55,7 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
- $scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_UNAUTHORIZED);
return;
}
UserHelper::load_user_plugins($_SESSION["uid"]);
@@ -62,8 +64,7 @@
if (Config::is_migration_needed()) {
print Errors::to_json(Errors::E_SCHEMA_MISMATCH);
- $scope->getSpan()->setTag('error', Errors::E_SCHEMA_MISMATCH);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_SCHEMA_MISMATCH);
return;
}
@@ -126,8 +127,7 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
- $scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_UNAUTHORIZED);
return;
}
@@ -140,18 +140,16 @@
}
if (implements_interface($handler, 'IHandler')) {
- $h_scope = Tracer::start("construct/$op");
+ $scope->addEvent("construct/$op");
$handler->__construct($_REQUEST);
- $h_scope->close();
if (validate_csrf($csrf_token) || $handler->csrf_ignore($method)) {
- $b_scope = Tracer::start("before/$method");
+ $scope->addEvent("before/$method");
$before = $handler->before($method);
- $b_scope->close();
if ($before) {
- $m_scope = Tracer::start("method/$method");
+ $scope->addEvent("method/$method");
if ($method && method_exists($handler, $method)) {
$reflection = new ReflectionMethod($handler, $method);
@@ -161,7 +159,7 @@
user_error("Refusing to invoke method $method of handler $op which has required parameters.", E_USER_WARNING);
header("Content-Type: text/json");
- $m_scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
+ $scope->setAttribute('error', Errors::E_UNAUTHORIZED);
print Errors::to_json(Errors::E_UNAUTHORIZED);
}
} else {
@@ -170,24 +168,19 @@
} else {
header("Content-Type: text/json");
- $m_scope->getSpan()->setTag('error', Errors::E_UNKNOWN_METHOD);
+ $scope->setAttribute('error', Errors::E_UNKNOWN_METHOD);
print Errors::to_json(Errors::E_UNKNOWN_METHOD, ["info" => get_class($handler) . "->$method"]);
}
}
- $m_scope->close();
- $a_scope = Tracer::start("after/$method");
+ $scope->addEvent("after/$method");
$handler->after();
- $a_scope->close();
-
- $scope->close();
return;
} else {
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
- $scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_UNAUTHORIZED);
return;
}
} else {
@@ -195,8 +188,7 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
- $scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_UNAUTHORIZED);
return;
}
}
@@ -205,5 +197,4 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNKNOWN_METHOD, [ "info" => (isset($handler) ? get_class($handler) : "UNKNOWN:".$op) . "->$method"]);
- $scope->getSpan()->setTag('error', Errors::E_UNKNOWN_METHOD);
- $scope->close();
+ $scope->setAttribute('error', Errors::E_UNKNOWN_METHOD);
diff --git a/classes/article.php b/classes/article.php
index 63469ccd2..c14804485 100755
--- a/classes/article.php
+++ b/classes/article.php
@@ -326,7 +326,7 @@ class Article extends Handler_Protected {
$enclosures_formatted, $enclosures, $id, $always_display_enclosures, $article_content, $hide_images);
if (!empty($enclosures_formatted)) {
- $scope->close();
+ $scope->end();
return [
'formatted' => $enclosures_formatted,
'entries' => []
@@ -370,7 +370,7 @@ class Article extends Handler_Protected {
}
}
- $scope->close();
+ $scope->end();
return $rv;
}
@@ -427,7 +427,7 @@ class Article extends Handler_Protected {
$sth->execute([$tags_str, $id, $owner_uid]);
}
- $scope->close();
+ $scope->end();
return $tags;
}
@@ -569,7 +569,7 @@ class Article extends Handler_Protected {
else
Labels::update_cache($owner_uid, $id, array("no-labels" => 1));
- $scope->close();
+ $scope->end();
return $rv;
}
@@ -660,7 +660,7 @@ class Article extends Handler_Protected {
if ($article_stream && $cache->exists(sha1($article_stream)))
$article_stream = $cache->get_url(sha1($article_stream));
- $scope->close();
+ $scope->end();
return [$article_image, $article_stream, $article_kind];
}
@@ -696,7 +696,7 @@ class Article extends Handler_Protected {
}
}
- $scope->close();
+ $scope->end();
return array_unique($rv);
}
@@ -723,7 +723,7 @@ class Article extends Handler_Protected {
array_push($rv, $entry->feed_id);
}
- $scope->close();
+ $scope->end();
return array_unique($rv);
}
diff --git a/classes/config.php b/classes/config.php
index a8fc97124..302a5763e 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -193,10 +193,10 @@ class Config {
const HTTP_429_THROTTLE_INTERVAL = "HTTP_429_THROTTLE_INTERVAL";
/** host running Jaeger collector to receive traces (disabled if empty) */
- const JAEGER_REPORTING_HOST = "JAEGER_REPORTING_HOST";
+ const OPENTELEMETRY_HOST = "OPENTELEMETRY_HOST";
/** Jaeger service name */
- const JAEGER_SERVICE_NAME = "JAEGER_SERVICE_NAME";
+ const OPENTELEMETRY_SERVICE = "OPENTELEMETRY_SERVICE";
/** default values for all global configuration options */
private const _DEFAULTS = [
@@ -255,8 +255,8 @@ class Config {
Config::HTTP_USER_AGENT => [ 'Tiny Tiny RSS/%s (https://tt-rss.org/)',
Config::T_STRING ],
Config::HTTP_429_THROTTLE_INTERVAL => [ 3600, Config::T_INT ],
- Config::JAEGER_REPORTING_HOST => [ "", Config::T_STRING ],
- Config::JAEGER_SERVICE_NAME => [ "tt-rss", Config::T_STRING ],
+ Config::OPENTELEMETRY_HOST => [ "", Config::T_STRING ],
+ Config::OPENTELEMETRY_SERVICE => [ "tt-rss", Config::T_STRING ],
];
/** @var Config|null */
diff --git a/classes/counters.php b/classes/counters.php
index fcf28f938..1f5988568 100644
--- a/classes/counters.php
+++ b/classes/counters.php
@@ -212,7 +212,7 @@ class Counters {
}
- $scope->close();
+ $scope->end();
return $ret;
}
@@ -239,7 +239,7 @@ class Counters {
"counter" => $subcribed_feeds
]);
- $scope->close();
+ $scope->end();
return $ret;
}
@@ -295,7 +295,7 @@ class Counters {
}
}
- $scope->close();
+ $scope->end();
return $ret;
}
@@ -356,7 +356,7 @@ class Counters {
array_push($ret, $cv);
}
- $scope->close();
+ $scope->end();
return $ret;
}
}
diff --git a/classes/digest.php b/classes/digest.php
index d77a83b8c..02fa76bf0 100644
--- a/classes/digest.php
+++ b/classes/digest.php
@@ -77,7 +77,7 @@ class Digest
}
}
- $scope->close();
+ $scope->end();
Debug::log("All done.");
}
diff --git a/classes/diskcache.php b/classes/diskcache.php
index b5c10e89d..7bc5835a4 100644
--- a/classes/diskcache.php
+++ b/classes/diskcache.php
@@ -223,7 +223,7 @@ class DiskCache implements Cache_Adapter {
public function remove(string $filename): bool {
$scope = Tracer::start(__METHOD__, ['filename' => $filename]);
$rc = $this->adapter->remove($filename);
- $scope->close();
+ $scope->end();
return $rc;
}
@@ -249,9 +249,10 @@ class DiskCache implements Cache_Adapter {
}
public function exists(string $filename): bool {
- $scope = Tracer::start(__METHOD__, ['filename' => $filename]);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent("DiskCache::exists: $filename");
+
$rc = $this->adapter->exists(basename($filename));
- $scope->close();
return $rc;
}
@@ -262,7 +263,7 @@ class DiskCache implements Cache_Adapter {
public function get_size(string $filename) {
$scope = Tracer::start(__METHOD__, ['filename' => $filename]);
$rc = $this->adapter->get_size(basename($filename));
- $scope->close();
+ $scope->end();
return $rc;
}
@@ -275,7 +276,7 @@ class DiskCache implements Cache_Adapter {
public function put(string $filename, $data) {
$scope = Tracer::start(__METHOD__);
$rc = $this->adapter->put(basename($filename), $data);
- $scope->close();
+ $scope->end();
return $rc;
}
@@ -329,8 +330,8 @@ class DiskCache implements Cache_Adapter {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
echo "File not found.";
- $scope->getSpan()->setTag('error', '404 not found');
- $scope->close();
+ $scope->setAttribute('error', '404 not found');
+ $scope->end();
return false;
}
@@ -340,8 +341,8 @@ class DiskCache implements Cache_Adapter {
if (($_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? '') == $gmt_modified || ($_SERVER['HTTP_IF_NONE_MATCH'] ?? '') == $file_mtime) {
header('HTTP/1.1 304 Not Modified');
- $scope->getSpan()->setTag('error', '304 not modified');
- $scope->close();
+ $scope->setAttribute('error', '304 not modified');
+ $scope->end();
return false;
}
@@ -360,8 +361,8 @@ class DiskCache implements Cache_Adapter {
print "Stored file has disallowed content type ($mimetype)";
- $scope->getSpan()->setTag('error', '400 disallowed content type');
- $scope->close();
+ $scope->setAttribute('error', '400 disallowed content type');
+ $scope->end();
return false;
}
@@ -383,11 +384,11 @@ class DiskCache implements Cache_Adapter {
header_remove("Pragma");
- $scope->getSpan()->setTag('mimetype', $mimetype);
+ $scope->setAttribute('mimetype', $mimetype);
$rc = $this->adapter->send($filename);
- $scope->close();
+ $scope->end();
return $rc;
}
@@ -418,12 +419,13 @@ class DiskCache implements Cache_Adapter {
// plugins work on original source URLs used before caching
// NOTE: URLs should be already absolutized because this is called after sanitize()
static public function rewrite_urls(string $str): string {
- $scope = Tracer::start(__METHOD__);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent("DiskCache::rewrite_urls");
$res = trim($str);
if (!$res) {
- $scope->close();
+ $scope->end();
return '';
}
@@ -437,7 +439,7 @@ class DiskCache implements Cache_Adapter {
$need_saving = false;
foreach ($entries as $entry) {
- $e_scope = Tracer::start('entry', ['tagName' => $entry->tagName]);
+ $scope->addEvent("entry: " . $entry->tagName);
foreach (array('src', 'poster') as $attr) {
if ($entry->hasAttribute($attr)) {
@@ -470,8 +472,6 @@ class DiskCache implements Cache_Adapter {
$entry->setAttribute("srcset", RSSUtils::encode_srcset($matches));
}
-
- $e_scope->close();
}
if ($need_saving) {
@@ -482,8 +482,6 @@ class DiskCache implements Cache_Adapter {
}
}
- $scope->close();
-
return $res;
}
}
diff --git a/classes/feeds.php b/classes/feeds.php
index 3c55fcc25..b99be3d23 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -168,7 +168,7 @@ class Feeds extends Handler_Protected {
$reply['search_query'] = [$search, $search_language];
$reply['vfeed_group_enabled'] = $vfeed_group_enabled;
- $p_scope = Tracer::start('plugin_menu_items');
+ $scope->addEvent('plugin_menu_items');
$plugin_menu_items = "";
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM2,
@@ -202,15 +202,13 @@ class Feeds extends Handler_Protected {
},
$feed, $cat_view, $qfh_ret);
- $p_scope->close();
-
- $a_scope = Tracer::start('articles');
+ $scope->addEvent('articles');
$headlines_count = 0;
if ($result instanceof PDOStatement) {
while ($line = $result->fetch(PDO::FETCH_ASSOC)) {
- $aa_scope = Tracer::start('article', ['id' => $line['id']]);
+ $scope->addEvent('article: ' . $line['id']);
++$headlines_count;
@@ -370,7 +368,7 @@ class Feeds extends Handler_Protected {
//setting feed headline background color, needs to change text color based on dark/light
$fav_color = $line['favicon_avg_color'] ?? false;
- $c_scope = Tracer::start('colors');
+ $scope->addEvent("colors");
require_once "colors.php";
@@ -386,7 +384,7 @@ class Feeds extends Handler_Protected {
$line['feed_bg_color'] = 'rgba(' . implode(",", $rgba_cache[$feed_id]) . ',0.3)';
}
- $c_scope->close();
+ $scope->addEvent("HOOK_RENDER_ARTICLE_CDM");
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_CDM,
function ($result, $plugin) use (&$line) {
@@ -403,13 +401,9 @@ class Feeds extends Handler_Protected {
unset($line[$k]);
array_push($reply['content'], $line);
-
- $aa_scope->close();
}
}
- $a_scope->close();
-
if (!$headlines_count) {
if ($result instanceof PDOStatement) {
@@ -469,7 +463,7 @@ class Feeds extends Handler_Protected {
}
}
- $scope->close();
+ $scope->end();
return array($topmost_article_ids, $headlines_count, $feed, $disable_cache, $reply);
}
@@ -983,7 +977,9 @@ class Feeds extends Handler_Protected {
* @throws PDOException
*/
static function _get_counters($feed, bool $is_cat = false, bool $unread_only = false, ?int $owner_uid = null): int {
- $scope = Tracer::start(__METHOD__, [], func_get_args());
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+
+ $scope->addEvent(__METHOD__ . ": $feed ($is_cat)");
$n_feed = (int) $feed;
$need_entries = false;
@@ -1007,14 +1003,14 @@ class Feeds extends Handler_Protected {
$handler = PluginHost::getInstance()->get_feed_handler($feed_id);
if (implements_interface($handler, 'IVirtualFeed')) {
/** @var IVirtualFeed $handler */
- $scope->close();
+ //$scope->end();
return $handler->get_unread($feed_id);
} else {
- $scope->close();
+ //$scope->end();
return 0;
}
} else if ($n_feed == Feeds::FEED_RECENTLY_READ) {
- $scope->close();
+ //$scope->end();
return 0;
// tags
} else if ($feed != "0" && $n_feed == 0) {
@@ -1028,7 +1024,7 @@ class Feeds extends Handler_Protected {
$row = $sth->fetch();
// Handle 'SUM()' returning null if there are no results
- $scope->close();
+ //$scope->end();
return $row["count"] ?? 0;
} else if ($n_feed == Feeds::FEED_STARRED) {
@@ -1062,7 +1058,7 @@ class Feeds extends Handler_Protected {
$label_id = Labels::feed_to_label_id($feed);
- $scope->close();
+ //$scope->end();
return self::_get_label_unread($label_id, $owner_uid);
}
@@ -1082,7 +1078,7 @@ class Feeds extends Handler_Protected {
$sth->execute([$owner_uid]);
$row = $sth->fetch();
- $scope->close();
+ //$scope->end();
return $row["unread"];
} else {
@@ -1095,7 +1091,7 @@ class Feeds extends Handler_Protected {
$sth->execute([$feed, $owner_uid]);
$row = $sth->fetch();
- $scope->close();
+ //$scope->end();
return $row["unread"];
}
}
@@ -1987,7 +1983,7 @@ class Feeds extends Handler_Protected {
$res = $pdo->query($query);
}
- $scope->close();
+ $scope->end();
return array($res, $feed_title, $feed_site_url, $last_error, $last_updated, $search_words, $first_id, $vfeed_query_part != "", $query_error_override);
}
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 85b5f1df4..c2a949f5c 100755
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -339,12 +339,15 @@ class PluginHost {
*/
function chain_hooks_callback(string $hook, Closure $callback, &...$args): void {
$method = strtolower((string)$hook);
- $scope = Tracer::start(__METHOD__, ['hook' => $hook]);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent("chain_hooks_callback: $hook");
foreach ($this->get_hooks((string)$hook) as $plugin) {
//Debug::log("invoking: " . get_class($plugin) . "->$hook()", Debug::$LOG_VERBOSE);
- $p_scope = Tracer::start("$hook - " . get_class($plugin));
+ //$p_scope = Tracer::start("$hook - " . get_class($plugin));
+
+ $scope->addEvent("$hook - " . get_class($plugin));
try {
if ($callback($plugin->$method(...$args), $plugin))
@@ -355,10 +358,10 @@ class PluginHost {
user_error($err, E_USER_WARNING);
}
- $p_scope->close();
+ //$p_scope->end();
}
- $scope->close();
+ //$scope->end();
}
/**
@@ -448,7 +451,7 @@ class PluginHost {
$class = trim($class);
$class_file = strtolower(basename(clean($class)));
- $p_scope = Tracer::start("loading $class_file");
+ $scope->addEvent("$class_file: load");
// try system plugin directory first
$file = dirname(__DIR__) . "/plugins/$class_file/init.php";
@@ -457,7 +460,6 @@ class PluginHost {
$file = dirname(__DIR__) . "/plugins.local/$class_file/init.php";
if (!file_exists($file)) {
- $p_scope->close();
continue;
}
}
@@ -476,8 +478,7 @@ class PluginHost {
$_SESSION["safe_mode"] = 1;
- $p_scope->getSpan()->setTag('error', 'plugin is blacklisted');
- $p_scope->close();
+ $scope->setAttribute('error', 'plugin is blacklisted');
continue;
}
@@ -489,8 +490,7 @@ class PluginHost {
} catch (Error $err) {
user_error($err, E_USER_WARNING);
- $p_scope->getSpan()->setTag('error', $err);
- $p_scope->close();
+ $scope->setAttribute('error', $err);
continue;
}
@@ -501,8 +501,7 @@ class PluginHost {
if ($plugin_api < self::API_VERSION) {
user_error("Plugin $class is not compatible with current API version (need: " . self::API_VERSION . ", got: $plugin_api)", E_USER_WARNING);
- $p_scope->getSpan()->setTag('error', 'plugin is not compatible with API version');
- $p_scope->close();
+ $scope->setAttribute('error', 'plugin is not compatible with API version');
continue;
}
@@ -511,7 +510,7 @@ class PluginHost {
_bind_textdomain_codeset($class, "UTF-8");
}
- $i_scope = Tracer::start('init and register plugin');
+ $scope->addEvent("$class_file: initialize");
try {
switch ($kind) {
@@ -537,17 +536,12 @@ class PluginHost {
} catch (Error $err) {
user_error($err, E_USER_WARNING);
}
-
- $i_scope->close();
-
}
}
- $p_scope->close();
}
$this->load_data();
-
- $scope->close();
+ $scope->end();
}
function is_system(Plugin $plugin): bool {
@@ -640,7 +634,8 @@ class PluginHost {
}
private function load_data(): void {
- $scope = Tracer::start(__METHOD__);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent('load plugin data');
if ($this->owner_uid && !$this->data_loaded && Config::get_schema_version() > 100) {
$sth = $this->pdo->prepare("SELECT name, content FROM ttrss_plugin_storage
@@ -648,18 +643,19 @@ class PluginHost {
$sth->execute([$this->owner_uid]);
while ($line = $sth->fetch()) {
+ $scope->addEvent($line["name"] . ': unserialize');
+
$this->storage[$line["name"]] = unserialize($line["content"]);
}
$this->data_loaded = true;
}
-
- $scope->close();
}
private function save_data(string $plugin): void {
if ($this->owner_uid) {
- $scope = Tracer::start(__METHOD__);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent(__METHOD__ . ": $plugin");
if (!$this->pdo_data)
$this->pdo_data = Db::instance()->pdo_connect();
@@ -687,7 +683,6 @@ class PluginHost {
}
$this->pdo_data->commit();
- $scope->close();
}
}
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index b22b40ba5..a2b55b88c 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1080,6 +1080,9 @@ class Pref_Feeds extends Handler_Protected {
* @return array<string, mixed>
*/
private function feedlist_init_cat(int $cat_id): array {
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent(__METHOD__ . ": $cat_id");
+
return [
'id' => 'CAT:' . $cat_id,
'items' => array(),
@@ -1094,7 +1097,8 @@ class Pref_Feeds extends Handler_Protected {
* @return array<string, mixed>
*/
private function feedlist_init_feed(int $feed_id, ?string $title = null, bool $unread = false, string $error = '', string $updated = ''): array {
- $scope = Tracer::start(__METHOD__, []);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent(__METHOD__ . ": $feed_id");
if (!$title)
$title = Feeds::_get_title($feed_id, false);
@@ -1102,8 +1106,6 @@ class Pref_Feeds extends Handler_Protected {
if ($unread === false)
$unread = Feeds::_get_counters($feed_id, false, true);
- $scope->close();
-
return [
'id' => 'FEED:' . $feed_id,
'name' => $title,
diff --git a/classes/rpc.php b/classes/rpc.php
index afd3c0c79..929c6bda0 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -134,7 +134,7 @@ class RPC extends Handler_Protected {
'seq' => $seq
];
- $scope->close();
+ $scope->end();
print json_encode($reply);
}
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 30db08963..29368da1c 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -286,7 +286,7 @@ class RSSUtils {
// Send feed digests by email if needed.
Digest::send_headlines_digests();
- $scope->close();
+ $scope->end();
return $nf;
}
@@ -390,19 +390,19 @@ class RSSUtils {
if ($user) {
if ($user->access_level == UserHelper::ACCESS_LEVEL_READONLY) {
Debug::log("error: denied update for $feed: permission denied by owner access level");
- $scope->close();
+ $scope->end();
return false;
}
} else {
// this would indicate database corruption of some kind
Debug::log("error: owner not found for feed: $feed");
- $scope->close();
+ $scope->end();
return false;
}
} else {
Debug::log("error: feeds table record not found for feed: $feed");
- $scope->close();
+ $scope->end();
return false;
}
@@ -561,7 +561,7 @@ class RSSUtils {
$feed_obj->save();
}
- $scope->close();
+ $scope->end();
return $error_message == "";
}
@@ -703,7 +703,7 @@ class RSSUtils {
]);
$feed_obj->save();
- $scope->close();
+ $scope->end();
return true; // no articles
}
@@ -1305,7 +1305,7 @@ class RSSUtils {
Debug::log("article processed.", Debug::LOG_VERBOSE);
$pdo->commit();
- $a_scope->close();
+ $a_scope->end();
}
Debug::log(Debug::SEPARATOR, Debug::LOG_VERBOSE);
@@ -1346,12 +1346,12 @@ class RSSUtils {
unset($rss);
Debug::log("update failed.", Debug::LOG_VERBOSE);
- $scope->close();
+ $scope->end();
return false;
}
Debug::log("update done.", Debug::LOG_VERBOSE);
- $scope->close();
+ $scope->end();
return true;
}
@@ -1604,7 +1604,7 @@ class RSSUtils {
}
}
- $scope->close();
+ $scope->end();
return $matches;
}
diff --git a/classes/sanitizer.php b/classes/sanitizer.php
index 28874d16f..68bb91b9f 100644
--- a/classes/sanitizer.php
+++ b/classes/sanitizer.php
@@ -63,7 +63,8 @@ class Sanitizer {
* @return false|string The HTML, or false if an error occurred.
*/
public static function sanitize(string $str, ?bool $force_remove_images = false, int $owner = null, string $site_url = null, array $highlight_words = null, int $article_id = null) {
- $scope = Tracer::start(__METHOD__);
+ $scope = OpenTelemetry\API\Trace\Span::getCurrent();
+ $scope->addEvent("Sanitizer::sanitize");
if (!$owner && isset($_SESSION["uid"]))
$owner = $_SESSION["uid"];
@@ -224,8 +225,6 @@ class Sanitizer {
$res = $doc->saveHTML();
- $scope->close();
-
/* strip everything outside of <body>...</body> */
$res_frag = array();
diff --git a/classes/tracer.php b/classes/tracer.php
index 5a23dfeba..3a734641e 100644
--- a/classes/tracer.php
+++ b/classes/tracer.php
@@ -1,61 +1,72 @@
<?php
-use OpenTracing\GlobalTracer;
-use OpenTracing\Scope;
+
+use OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory;
+use OpenTelemetry\Contrib\Otlp\SpanExporter;
+use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor;
+use OpenTelemetry\SDK\Trace\TracerProvider;
+use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\SDK\Trace\SpanExporter\InMemoryExporter;
class Tracer {
/** @var Tracer $instance */
private static $instance;
+ private static $tracer;
public function __construct() {
- $jaeger_host = Config::get(Config::JAEGER_REPORTING_HOST);
-
- if ($jaeger_host) {
- $config = new \Jaeger\Config(
- [
- 'sampler' => [
- 'type' => \Jaeger\SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'logging' => true,
- "local_agent" => [
- "reporting_host" => $jaeger_host,
- "reporting_port" => 6832
- ],
- 'dispatch_mode' => \Jaeger\Config::JAEGER_OVER_BINARY_UDP,
- ],
- Config::get(Config::JAEGER_SERVICE_NAME)
- );
-
- $config->initializeTracer();
-
- register_shutdown_function(function() {
- $tracer = GlobalTracer::get();
- $tracer->flush();
- });
+ $opentelemetry_host = Config::get(Config::OPENTELEMETRY_HOST);
+
+ if ($opentelemetry_host) {
+ $transport = (new OtlpHttpTransportFactory())->create("http://$opentelemetry_host/v1/traces", 'application/x-protobuf');
+ $exporter = new SpanExporter($transport);
+ } else {
+ $exporter = new InMemoryExporter();
}
+
+ $tracerProvider = new TracerProvider(new SimpleSpanProcessor($exporter));
+ $this->tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php');
+
+ $context = TraceContextPropagator::getInstance()->extract(getallheaders());
+ $span = $this->tracer->spanBuilder(Config::get(Config::OPENTELEMETRY_SERVICE))
+ ->setParent($context)
+ ->startSpan();
+
+ $span->activate();
+
+ register_shutdown_function(function() use ($span, $tracerProvider) {
+ $span->end();
+
+ $tracerProvider->shutdown();
+ });
}
/**
* @param string $name
* @param array<string>|array<string, array<string, mixed>> $tags
* @param array<string> $args
- * @return Scope
+ * @return Span
*/
- private function _start(string $name, array $tags = [], array $args = []): Scope {
- $tracer = GlobalTracer::get();
+ private function _start(string $name, array $tags = [], array $args = []) {
+ $span = $this->tracer->spanBuilder($name)->startSpan();
+
+ foreach ($tags as $k => $v) {
+ $span->setAttribute($k, $v);
+ }
+
+ $span->setAttribute("func.args", json_encode($args));
- $tags['args'] = json_encode($args);
+ $span->activate();
- return $tracer->startActiveSpan($name, ['tags' => $tags]);
+ return $span;
}
/**
* @param string $name
* @param array<string>|array<string, array<string, mixed>> $tags
* @param array<string> $args
- * @return Scope
+ * @return Span
*/
- public static function start(string $name, array $tags = [], array $args = []) : Scope {
+ public static function start(string $name, array $tags = [], array $args = []) {
return self::get_instance()->_start($name, $tags, $args);
}
diff --git a/classes/urlhelper.php b/classes/urlhelper.php
index 6300e7346..ac585dd54 100644
--- a/classes/urlhelper.php
+++ b/classes/urlhelper.php
@@ -189,8 +189,8 @@ class UrlHelper {
// too many redirects
if ($nest > 10) {
- $scope->getSpan()->setTag('error', 'too many redirects');
- $scope->close();
+ $scope->setAttribute('error', 'too many redirects');
+ $scope->end();
return false;
}
@@ -226,12 +226,12 @@ class UrlHelper {
}
}
- $scope->close();
+ $scope->end();
return $url;
}
- $scope->getSpan()->setTag('error', 'request failed');
- $scope->close();
+ $scope->setAttribute('error', 'request failed');
+ $scope->end();
// request failed?
return false;
}
@@ -303,8 +303,8 @@ class UrlHelper {
if (!$url) {
self::$fetch_last_error = "Requested URL failed extended validation.";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -314,8 +314,8 @@ class UrlHelper {
if (!$ip_addr || strpos($ip_addr, "127.") === 0) {
self::$fetch_last_error = "URL hostname failed to resolve or resolved to a loopback address ($ip_addr)";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -327,8 +327,8 @@ class UrlHelper {
if (!$ch) {
self::$fetch_last_error = "curl_init() failed";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -432,8 +432,8 @@ class UrlHelper {
if (!self::validate(self::$fetch_effective_url, true)) {
self::$fetch_last_error = "URL received after redirection failed extended validation.";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -442,8 +442,8 @@ class UrlHelper {
if (!self::$fetch_effective_ip_addr || strpos(self::$fetch_effective_ip_addr, "127.") === 0) {
self::$fetch_last_error = "URL hostname received after redirection failed to resolve or resolved to a loopback address (".self::$fetch_effective_ip_addr.")";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -460,8 +460,8 @@ class UrlHelper {
self::$fetch_last_error_content = $contents;
curl_close($ch);
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -473,8 +473,8 @@ class UrlHelper {
}
curl_close($ch);
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -488,7 +488,7 @@ class UrlHelper {
if ($tmp) $contents = $tmp;
}
- $scope->close();
+ $scope->end();
return $contents;
} else {
@@ -543,8 +543,8 @@ class UrlHelper {
if (!self::validate(self::$fetch_effective_url, true)) {
self::$fetch_last_error = "URL received after redirection failed extended validation.";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -553,8 +553,8 @@ class UrlHelper {
if (!self::$fetch_effective_ip_addr || strpos(self::$fetch_effective_ip_addr, "127.") === 0) {
self::$fetch_last_error = "URL hostname received after redirection failed to resolve or resolved to a loopback address (".self::$fetch_effective_ip_addr.")";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -563,8 +563,8 @@ class UrlHelper {
if ($data === false) {
self::$fetch_last_error = "'file_get_contents' failed.";
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -600,8 +600,8 @@ class UrlHelper {
self::$fetch_last_error_content = $data;
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
@@ -614,13 +614,13 @@ class UrlHelper {
if ($tmp) $data = $tmp;
}
- $scope->close();
+ $scope->end();
return $data;
} else {
self::$fetch_last_error = 'Successful response, but no content was received.';
- $scope->getSpan()->setTag('error', self::$fetch_last_error);
- $scope->close();
+ $scope->setAttribute('error', self::$fetch_last_error);
+ $scope->end();
return false;
}
}
diff --git a/composer.json b/composer.json
index 68076f778..cc43065bb 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,9 @@
{
"config": {
- "platform-check": false
+ "platform-check": false,
+ "allow-plugins": {
+ "php-http/discovery": true
+ }
},
"repositories": [
{
@@ -14,7 +17,8 @@
"chillerlan/php-qrcode": "^4.3.3",
"mervick/material-design-icons": "^2.2",
"j4mie/idiorm": "dev-master",
- "jonahgeorge/jaeger-client-php": "^1.4"
+ "open-telemetry/exporter-otlp": "^1.0",
+ "php-http/guzzle7-adapter": "^1.0"
},
"require-dev": {
"phpstan/phpstan": "1.10.3",
diff --git a/composer.lock b/composer.lock
index 3793968c9..0818efd7a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "de4af0d5d452fc73fe4f5d584163af9a",
+ "content-hash": "2c8b76f35398131c362d125ed47c8102",
"packages": [
{
"name": "beberlei/assert",
@@ -216,6 +216,375 @@
"time": "2022-07-05T22:32:14+00:00"
},
{
+ "name": "google/protobuf",
+ "version": "v3.24.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "type": "library",
+ "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.24.4"
+ },
+ "time": "2023-10-04T17:22:47+00:00"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0",
+ "symfony/deprecation-contracts": "^2.2 || ^3.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "php-http/message-factory": "^1.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
+ "psr/log": "^1.1 || ^2.0 || ^3.0"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "[email protected]",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "psr-18",
+ "psr-7",
+ "rest",
+ "web service"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
+ },
+ "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"
+ }
+ ],
+ "time": "2023-08-27T10:20:53+00:00"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "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/2.0.1"
+ },
+ "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"
+ }
+ ],
+ "time": "2023-08-03T15:11:55+00:00"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "2.6.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0",
+ "ralouphie/getallheaders": "^3.0"
+ },
+ "provide": {
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "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/2.6.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"
+ }
+ ],
+ "time": "2023-08-27T10:13:57+00:00"
+ },
+ {
"name": "j4mie/idiorm",
"version": "dev-master",
"source": {
@@ -281,146 +650,353 @@
"time": "2022-03-26T15:19:01+00:00"
},
{
- "name": "jonahgeorge/jaeger-client-php",
- "version": "v1.4.4",
+ "name": "mervick/material-design-icons",
+ "version": "2.2.0",
"source": {
"type": "git",
- "url": "https://github.com/jonahgeorge/jaeger-client-php.git",
- "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b"
+ "url": "https://github.com/mervick/material-design-icons.git",
+ "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/jonahgeorge/jaeger-client-php/zipball/3173d9c68ad8cea16058f25337982b00cc3d1c2b",
- "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b",
+ "url": "https://api.github.com/repos/mervick/material-design-icons/zipball/635435c8d3df3a6da3241648caf8a65d1c07cc1a",
+ "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a",
"shasum": ""
},
- "require": {
- "ext-sockets": "*",
- "opentracing/opentracing": "^1.0",
- "packaged/thrift": "^0.13",
- "php": "^7.1 || ^8.0 || ^8.1",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "psr/log": "^1.0 || ^2.0 || ^3.0"
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT",
+ "CC-BY-4.0"
+ ],
+ "authors": [
+ {
+ "name": "Andrey Izman",
+ "email": "[email protected]"
+ }
+ ],
+ "description": "Google Material Design Icons For Using With Bootstrap",
+ "homepage": "http://github.com/mervick/material-design-icons",
+ "keywords": [
+ "bootstrap",
+ "google",
+ "icons",
+ "icons-web-font",
+ "material",
+ "material-design",
+ "web-font"
+ ],
+ "support": {
+ "issues": "https://github.com/mervick/material-design-icons/issues",
+ "source": "http://github.com/mervick/material-design-icons"
},
- "require-dev": {
- "cache/array-adapter": "^1.0",
- "phpunit/phpunit": "^7 || ^8 || ^9",
- "squizlabs/php_codesniffer": "3.*",
- "symfony/polyfill-php73": "^1.10"
+ "time": "2016-02-22T01:05:40+00:00"
+ },
+ {
+ "name": "open-telemetry/api",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/api.git",
+ "reference": "d577d732333d38a9a6c16936363ee25f1e3f1c3c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/d577d732333d38a9a6c16936363ee25f1e3f1c3c",
+ "reference": "d577d732333d38a9a6c16936363ee25f1e3f1c3c",
+ "shasum": ""
+ },
+ "require": {
+ "open-telemetry/context": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
"autoload": {
"files": [
- "./src/Jaeger/Constants.php"
+ "Trace/functions.php"
],
"psr-4": {
- "Jaeger\\": "src/Jaeger/"
+ "OpenTelemetry\\API\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "Apache-2.0"
],
"authors": [
{
- "name": "Jonah George",
- "homepage": "http://twitter.com/jonahgeorge"
- },
+ "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": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "time": "2023-09-27T23:15:51+00:00"
+ },
+ {
+ "name": "open-telemetry/context",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/context.git",
+ "reference": "99f3d54fa9f9ff67421774feeef5e5b1f209ea21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/99f3d54fa9f9ff67421774feeef5e5b1f209ea21",
+ "reference": "99f3d54fa9f9ff67421774feeef5e5b1f209ea21",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "suggest": {
+ "ext-ffi": "To allow context switching in Fibers"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "fiber/initialize_fiber_handler.php"
+ ],
+ "psr-4": {
+ "OpenTelemetry\\Context\\": "."
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
{
- "name": "José Carlos Chávez",
- "email": "[email protected]"
- },
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "Context implementation for OpenTelemetry PHP.",
+ "keywords": [
+ "Context",
+ "opentelemetry",
+ "otel"
+ ],
+ "support": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "time": "2023-09-05T03:38:44+00:00"
+ },
+ {
+ "name": "open-telemetry/exporter-otlp",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/exporter-otlp.git",
+ "reference": "756092bdff472ea49adb7843c74011606d065b36"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/756092bdff472ea49adb7843c74011606d065b36",
+ "reference": "756092bdff472ea49adb7843c74011606d065b36",
+ "shasum": ""
+ },
+ "require": {
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/gen-otlp-protobuf": "^1.0",
+ "open-telemetry/sdk": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "php-http/discovery": "^1.14"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "_register.php"
+ ],
+ "psr-4": {
+ "OpenTelemetry\\Contrib\\Otlp\\": "."
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
{
- "name": "Contributors",
- "homepage": "https://github.com/jonahgeorge/jaeger-client-php/graphs/contributors"
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
}
],
- "description": "Jaeger Bindings for PHP OpenTracing API",
+ "description": "OTLP exporter for OpenTelemetry.",
"keywords": [
- "jaeger",
- "opentracing",
- "trace",
+ "Metrics",
+ "exporter",
+ "gRPC",
+ "http",
+ "opentelemetry",
+ "otel",
+ "otlp",
"tracing"
],
"support": {
- "issues": "https://github.com/jonahgeorge/jaeger-client-php/issues",
- "source": "https://github.com/jonahgeorge/jaeger-client-php/tree/v1.4.4"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "time": "2023-01-31T13:40:20+00:00"
+ "time": "2023-10-13T00:48:23+00:00"
},
{
- "name": "mervick/material-design-icons",
- "version": "2.2.0",
+ "name": "open-telemetry/gen-otlp-protobuf",
+ "version": "1.0.0",
"source": {
"type": "git",
- "url": "https://github.com/mervick/material-design-icons.git",
- "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a"
+ "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git",
+ "reference": "30fe95f10c2ec1a577f78257c86fbbebe739ca5e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mervick/material-design-icons/zipball/635435c8d3df3a6da3241648caf8a65d1c07cc1a",
- "reference": "635435c8d3df3a6da3241648caf8a65d1c07cc1a",
+ "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/30fe95f10c2ec1a577f78257c86fbbebe739ca5e",
+ "reference": "30fe95f10c2ec1a577f78257c86fbbebe739ca5e",
"shasum": ""
},
+ "require": {
+ "google/protobuf": "^3.3.0",
+ "php": "^7.4 || ^8.0"
+ },
+ "suggest": {
+ "ext-protobuf": "For better performance, when dealing with the protobuf format"
+ },
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Opentelemetry\\Proto\\": "Opentelemetry/Proto/",
+ "GPBMetadata\\Opentelemetry\\": "GPBMetadata/Opentelemetry/"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT",
- "CC-BY-4.0"
+ "Apache-2.0"
],
"authors": [
{
- "name": "Andrey Izman",
- "email": "[email protected]"
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
}
],
- "description": "Google Material Design Icons For Using With Bootstrap",
- "homepage": "http://github.com/mervick/material-design-icons",
+ "description": "PHP protobuf files for communication with OpenTelemetry OTLP collectors/servers.",
"keywords": [
- "bootstrap",
- "google",
- "icons",
- "icons-web-font",
- "material",
- "material-design",
- "web-font"
+ "Metrics",
+ "apm",
+ "gRPC",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "otlp",
+ "protobuf",
+ "tracing"
],
"support": {
- "issues": "https://github.com/mervick/material-design-icons/issues",
- "source": "http://github.com/mervick/material-design-icons"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "time": "2016-02-22T01:05:40+00:00"
+ "time": "2023-09-05T03:38:44+00:00"
},
{
- "name": "opentracing/opentracing",
- "version": "1.0.2",
+ "name": "open-telemetry/sdk",
+ "version": "1.0.0",
"source": {
"type": "git",
- "url": "https://github.com/opentracing/opentracing-php.git",
- "reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116"
+ "url": "https://github.com/opentelemetry-php/sdk.git",
+ "reference": "1c6020b4f1b85fdd647538ee46f6c83360d7c11e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/opentracing/opentracing-php/zipball/cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
- "reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
+ "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c6020b4f1b85fdd647538ee46f6c83360d7c11e",
+ "reference": "1c6020b4f1b85fdd647538ee46f6c83360d7c11e",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "ext-json": "*",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/context": "^1.0",
+ "open-telemetry/sem-conv": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "php-http/discovery": "^1.14",
+ "psr/http-client": "^1.0",
+ "psr/http-client-implementation": "^1.0",
+ "psr/http-factory-implementation": "^1.0",
+ "psr/http-message": "^1.0.1|^2.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-mbstring": "^1.23",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
},
- "require-dev": {
- "phpstan/phpstan": "~0.12",
- "phpunit/phpunit": "^7.0 || ^9.0",
- "squizlabs/php_codesniffer": "3.*"
+ "suggest": {
+ "ext-gmp": "To support unlimited number of synchronous metric readers",
+ "ext-mbstring": "To increase performance of string operations"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
"autoload": {
"files": [
- "src/OpenTracing/Tags.php",
- "src/OpenTracing/Formats.php"
+ "Common/Util/functions.php",
+ "Logs/Exporter/_register.php",
+ "Metrics/MetricExporter/_register.php",
+ "Propagation/_register.php",
+ "Trace/SpanExporter/_register.php",
+ "Common/Dev/Compatibility/_load.php",
+ "_autoload.php"
],
"psr-4": {
- "OpenTracing\\": "src/OpenTracing/"
+ "OpenTelemetry\\SDK\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -429,55 +1005,84 @@
],
"authors": [
{
- "name": "José Carlos Chávez",
- "email": "[email protected]"
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
}
],
- "description": "OpenTracing API for PHP",
+ "description": "SDK for OpenTelemetry PHP.",
+ "keywords": [
+ "Metrics",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "sdk",
+ "tracing"
+ ],
"support": {
- "issues": "https://github.com/opentracing/opentracing-php/issues",
- "source": "https://github.com/opentracing/opentracing-php/tree/1.0.2"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "time": "2022-01-27T19:59:21+00:00"
+ "time": "2023-10-18T20:53:08+00:00"
},
{
- "name": "packaged/thrift",
- "version": "0.13.01",
+ "name": "open-telemetry/sem-conv",
+ "version": "1.22.1",
"source": {
"type": "git",
- "url": "https://github.com/packaged/thrift.git",
- "reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228"
+ "url": "https://github.com/opentelemetry-php/sem-conv.git",
+ "reference": "e582b874ee89bec544f962db212b3966fe9310a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/packaged/thrift/zipball/e3dbcfb79e319971d64264ffe9c340590cc8a228",
- "reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228",
+ "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/e582b874ee89bec544f962db212b3966fe9310a7",
+ "reference": "e582b874ee89bec544f962db212b3966fe9310a7",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7.0 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
- "Thrift\\": "src/"
+ "OpenTelemetry\\SemConv\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
- "description": "Apache Thrift",
- "homepage": "http://thrift.apache.org/",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "Semantic conventions for OpenTelemetry PHP.",
"keywords": [
- "apache",
- "thrift"
+ "Metrics",
+ "apm",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "semantic conventions",
+ "semconv",
+ "tracing"
],
"support": {
- "issues": "https://github.com/packaged/thrift/issues",
- "source": "https://github.com/packaged/thrift/tree/0.13.01"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "time": "2021-01-25T13:32:28+00:00"
+ "time": "2023-10-19T20:10:44+00:00"
},
{
"name": "paragonie/constant_time_encoding",
@@ -547,21 +1152,276 @@
"time": "2022-06-14T06:56:20+00:00"
},
{
- "name": "psr/cache",
- "version": "3.0.0",
+ "name": "php-http/discovery",
+ "version": "1.19.1",
"source": {
"type": "git",
- "url": "https://github.com/php-fig/cache.git",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
+ "url": "https://github.com/php-http/discovery.git",
+ "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e",
+ "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e",
"shasum": ""
},
"require": {
- "php": ">=8.0.0"
+ "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",
+ "symfony/phpunit-bridge": "^6.2"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Http\\Discovery\\Composer\\Plugin",
+ "plugin-optional": true
+ },
+ "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": "[email protected]"
+ }
+ ],
+ "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.1"
+ },
+ "time": "2023-07-11T07:02:26+00:00"
+ },
+ {
+ "name": "php-http/guzzle7-adapter",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/guzzle7-adapter.git",
+ "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/guzzle7-adapter/zipball/fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01",
+ "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/guzzle": "^7.0",
+ "php": "^7.2 | ^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": {
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.0|^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Adapter\\Guzzle7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]"
+ }
+ ],
+ "description": "Guzzle 7 HTTP Adapter",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "Guzzle",
+ "http"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/guzzle7-adapter/issues",
+ "source": "https://github.com/php-http/guzzle7-adapter/tree/1.0.0"
+ },
+ "time": "2021-03-09T07:35:15+00:00"
+ },
+ {
+ "name": "php-http/httplug",
+ "version": "2.4.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"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Http\\Client\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eric GELOEN",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "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"
+ },
+ "time": "2023-04-14T15:10:03+00:00"
+ },
+ {
+ "name": "php-http/promise",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/promise.git",
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "friends-of-phpspec/phpspec-code-coverage": "^4.3.2",
+ "phpspec/phpspec": "^5.1.2 || ^6.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joel Wurtz",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]"
+ }
+ ],
+ "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.1.0"
+ },
+ "time": "2020-07-07T09:29:14+00:00"
+ },
+ {
+ "name": "psr/http-client",
+ "version": "1.0.3",
+ "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"
},
"type": "library",
"extra": {
@@ -571,7 +1431,7 @@
},
"autoload": {
"psr-4": {
- "Psr\\Cache\\": "src/"
+ "Psr\\Http\\Client\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -584,16 +1444,126 @@
"homepage": "https://www.php-fig.org/"
}
],
- "description": "Common interface for caching libraries",
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
"keywords": [
- "cache",
+ "http",
+ "http-client",
"psr",
- "psr-6"
+ "psr-18"
],
"support": {
- "source": "https://github.com/php-fig/cache/tree/3.0.0"
+ "source": "https://github.com/php-fig/http-client"
},
- "time": "2021-02-03T23:26:27+00:00"
+ "time": "2023-09-23T14:17:50+00:00"
+ },
+ {
+ "name": "psr/http-factory",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "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": "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/tree/1.0.2"
+ },
+ "time": "2023-04-10T20:10:41+00:00"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "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": "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/2.0"
+ },
+ "time": "2023-04-04T09:54:51+00:00"
},
{
"name": "psr/log",
@@ -646,6 +1616,50 @@
"time": "2021-07-14T16:46:02+00:00"
},
{
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
+ "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"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/getallheaders.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "[email protected]"
+ }
+ ],
+ "description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
+ "time": "2019-03-08T08:55:37+00:00"
+ },
+ {
"name": "spomky-labs/otphp",
"version": "v10.0.3",
"source": {
@@ -721,6 +1735,397 @@
"time": "2022-03-17T08:00:35+00:00"
},
{
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
+ },
+ "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"
+ }
+ ],
+ "time": "2022-01-02T09:55:41+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.28.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "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.28.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"
+ }
+ ],
+ "time": "2023-07-28T09:04:16+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.28.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.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"
+ }
+ ],
+ "time": "2023-01-26T09:26:14+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.28.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.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"
+ }
+ ],
+ "time": "2023-01-26T09:26:14+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php82",
+ "version": "v1.28.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php82.git",
+ "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/7716bea9c86776fb3362d6b52fe1fc9471056a49",
+ "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php82\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php82/tree/v1.28.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"
+ }
+ ],
+ "time": "2023-08-25T17:27:25+00:00"
+ },
+ {
"name": "thecodingmachine/safe",
"version": "v2.2.2",
"source": {
@@ -2945,5 +4350,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
- "plugin-api-version": "2.0.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/index.php b/index.php
index b7c039d7a..276b79ec3 100644
--- a/index.php
+++ b/index.php
@@ -16,6 +16,7 @@
Config::sanity_check();
+
if (!init_plugins()) return;
UserHelper::login_sequence();
diff --git a/vendor/autoload.php b/vendor/autoload.php
index e6e3ad736..8235051f8 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -2,6 +2,24 @@
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
+}
+
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056::getLoader();
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 4d989a212..7824d8f7e 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -42,30 +42,76 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
private $vendorDir;
// PSR-4
+ /**
+ * @var array<string, array<string, int>>
+ */
private $prefixLengthsPsr4 = array();
+ /**
+ * @var array<string, list<string>>
+ */
private $prefixDirsPsr4 = array();
+ /**
+ * @var list<string>
+ */
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<string, array<string, list<string>>>
+ */
private $prefixesPsr0 = array();
+ /**
+ * @var list<string>
+ */
private $fallbackDirsPsr0 = array();
+ /** @var bool */
private $useIncludePath = false;
+
+ /**
+ * @var array<string, string>
+ */
private $classMap = array();
+
+ /** @var bool */
private $classMapAuthoritative = false;
+
+ /**
+ * @var array<string, bool>
+ */
private $missingClasses = array();
+
+ /** @var string|null */
private $apcuPrefix;
+ /**
+ * @var array<string, self>
+ */
private static $registeredLoaders = array();
+ /**
+ * @param string|null $vendorDir
+ */
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
}
+ /**
+ * @return array<string, list<string>>
+ */
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -75,28 +121,42 @@ class ClassLoader
return array();
}
+ /**
+ * @return array<string, list<string>>
+ */
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
+ /**
+ * @return list<string>
+ */
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
+ /**
+ * @return list<string>
+ */
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
+ /**
+ * @return array<string, string> Array of classname => path
+ */
public function getClassMap()
{
return $this->classMap;
}
/**
- * @param array $classMap Class to filename map
+ * @param array<string, string> $classMap Class to filename map
+ *
+ * @return void
*/
public function addClassMap(array $classMap)
{
@@ -111,22 +171,25 @@ class ClassLoader
* 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 array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param list<string>|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(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- (array) $paths
+ $paths
);
}
@@ -135,19 +198,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -156,25 +219,28 @@ class ClassLoader
* 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 array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|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(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- (array) $paths
+ $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -184,18 +250,18 @@ class ClassLoader
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;
+ $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -204,8 +270,10 @@ class ClassLoader
* 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 array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param list<string>|string $paths The PSR-0 base directories
+ *
+ * @return void
*/
public function set($prefix, $paths)
{
@@ -220,10 +288,12 @@ class ClassLoader
* 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 array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -243,6 +313,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
+ *
+ * @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -265,6 +337,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
+ *
+ * @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -285,6 +359,8 @@ class ClassLoader
* 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)
{
@@ -305,14 +381,18 @@ class ClassLoader
* 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) {
- //no-op
- } elseif ($prepend) {
+ return;
+ }
+
+ if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
@@ -322,6 +402,8 @@ class ClassLoader
/**
* Unregisters this instance as an autoloader.
+ *
+ * @return void
*/
public function unregister()
{
@@ -336,15 +418,18 @@ class ClassLoader
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- includeFile($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
+
+ return null;
}
/**
@@ -390,15 +475,20 @@ class ClassLoader
}
/**
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
*
- * @return self[]
+ * @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -464,14 +554,26 @@ class ClassLoader
return false;
}
-}
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- */
-function includeFile($file)
-{
- include $file;
+ /**
+ * @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/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index cf83ee179..51e734a77 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -18,459 +18,29 @@ use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
- * To require it's presence, you can require `composer-runtime-api ^2.0`
+ * 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
{
- private static $installed = array (
- 'root' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => 'a37eab2610a0a2bcb655258781c1c7e925dc94c0',
- 'name' => '__root__',
- ),
- 'versions' =>
- array (
- '__root__' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => 'a37eab2610a0a2bcb655258781c1c7e925dc94c0',
- ),
- 'beberlei/assert' =>
- array (
- 'pretty_version' => 'v3.3.2',
- 'version' => '3.3.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
- ),
- 'chillerlan/php-qrcode' =>
- array (
- 'pretty_version' => '4.3.4',
- 'version' => '4.3.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d',
- ),
- 'chillerlan/php-settings-container' =>
- array (
- 'pretty_version' => '2.1.4',
- 'version' => '2.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1beb7df3c14346d4344b0b2e12f6f9a74feabd4a',
- ),
- 'doctrine/instantiator' =>
- array (
- 'pretty_version' => '1.4.1',
- 'version' => '1.4.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
- ),
- 'j4mie/idiorm' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- 0 => '9999999-dev',
- ),
- 'reference' => 'efc8ea06698f53e2c479c7696f2b154c47c3a3cb',
- ),
- 'jonahgeorge/jaeger-client-php' =>
- array (
- 'pretty_version' => 'v1.4.4',
- 'version' => '1.4.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3173d9c68ad8cea16058f25337982b00cc3d1c2b',
- ),
- 'mervick/material-design-icons' =>
- array (
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
- ),
- 'myclabs/deep-copy' =>
- array (
- 'pretty_version' => '1.11.0',
- 'version' => '1.11.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
- ),
- 'nikic/php-parser' =>
- array (
- 'pretty_version' => 'v4.14.0',
- 'version' => '4.14.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1',
- ),
- 'opentracing/opentracing' =>
- array (
- 'pretty_version' => '1.0.2',
- 'version' => '1.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cd60bd1fb2a25280600bc74c7f9e0c13881a9116',
- ),
- 'packaged/thrift' =>
- array (
- 'pretty_version' => '0.13.01',
- 'version' => '0.13.01.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'e3dbcfb79e319971d64264ffe9c340590cc8a228',
- ),
- 'paragonie/constant_time_encoding' =>
- array (
- 'pretty_version' => 'v2.6.3',
- 'version' => '2.6.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '58c3f47f650c94ec05a151692652a868995d2938',
- ),
- 'phar-io/manifest' =>
- array (
- 'pretty_version' => '2.0.3',
- 'version' => '2.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
- ),
- 'phar-io/version' =>
- array (
- 'pretty_version' => '3.2.1',
- 'version' => '3.2.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
- ),
- 'phpdocumentor/reflection-common' =>
- array (
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
- ),
- 'phpdocumentor/reflection-docblock' =>
- array (
- 'pretty_version' => '5.3.0',
- 'version' => '5.3.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
- ),
- 'phpdocumentor/type-resolver' =>
- array (
- 'pretty_version' => '1.6.1',
- 'version' => '1.6.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '77a32518733312af16a44300404e945338981de3',
- ),
- 'phpspec/prophecy' =>
- array (
- 'pretty_version' => 'v1.15.0',
- 'version' => '1.15.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
- ),
- 'phpstan/phpstan' =>
- array (
- 'pretty_version' => '1.10.3',
- 'version' => '1.10.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5419375b5891add97dc74be71e6c1c34baaddf64',
- ),
- 'phpunit/php-code-coverage' =>
- array (
- 'pretty_version' => '9.2.15',
- 'version' => '9.2.15.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
- ),
- 'phpunit/php-file-iterator' =>
- array (
- 'pretty_version' => '3.0.6',
- 'version' => '3.0.6.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
- ),
- 'phpunit/php-invoker' =>
- array (
- 'pretty_version' => '3.1.1',
- 'version' => '3.1.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
- ),
- 'phpunit/php-text-template' =>
- array (
- 'pretty_version' => '2.0.4',
- 'version' => '2.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
- ),
- 'phpunit/php-timer' =>
- array (
- 'pretty_version' => '5.0.3',
- 'version' => '5.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
- ),
- 'phpunit/phpunit' =>
- array (
- 'pretty_version' => '9.5.16',
- 'version' => '9.5.16.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
- ),
- 'psr/cache' =>
- array (
- 'pretty_version' => '3.0.0',
- 'version' => '3.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf',
- ),
- 'psr/log' =>
- array (
- 'pretty_version' => '3.0.0',
- 'version' => '3.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
- ),
- 'sebastian/cli-parser' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
- ),
- 'sebastian/code-unit' =>
- array (
- 'pretty_version' => '1.0.8',
- 'version' => '1.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
- ),
- 'sebastian/code-unit-reverse-lookup' =>
- array (
- 'pretty_version' => '2.0.3',
- 'version' => '2.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
- ),
- 'sebastian/comparator' =>
- array (
- 'pretty_version' => '4.0.6',
- 'version' => '4.0.6.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
- ),
- 'sebastian/complexity' =>
- array (
- 'pretty_version' => '2.0.2',
- 'version' => '2.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
- ),
- 'sebastian/diff' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
- ),
- 'sebastian/environment' =>
- array (
- 'pretty_version' => '5.1.4',
- 'version' => '5.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7',
- ),
- 'sebastian/exporter' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
- ),
- 'sebastian/global-state' =>
- array (
- 'pretty_version' => '5.0.5',
- 'version' => '5.0.5.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
- ),
- 'sebastian/lines-of-code' =>
- array (
- 'pretty_version' => '1.0.3',
- 'version' => '1.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
- ),
- 'sebastian/object-enumerator' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
- ),
- 'sebastian/object-reflector' =>
- array (
- 'pretty_version' => '2.0.4',
- 'version' => '2.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
- ),
- 'sebastian/recursion-context' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
- ),
- 'sebastian/resource-operations' =>
- array (
- 'pretty_version' => '3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
- ),
- 'sebastian/type' =>
- array (
- 'pretty_version' => '2.3.4',
- 'version' => '2.3.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
- ),
- 'sebastian/version' =>
- array (
- 'pretty_version' => '3.0.2',
- 'version' => '3.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
- ),
- 'spomky-labs/otphp' =>
- array (
- 'pretty_version' => 'v10.0.3',
- 'version' => '10.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9784d9f7c790eed26e102d6c78f12c754036c366',
- ),
- 'thecodingmachine/safe' =>
- array (
- 'pretty_version' => 'v2.2.2',
- 'version' => '2.2.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '440284f9592c9df402832452a6871a8b3c48d97e',
- ),
- 'theseer/tokenizer' =>
- array (
- 'pretty_version' => '1.2.1',
- 'version' => '1.2.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
- ),
- 'webmozart/assert' =>
- array (
- 'pretty_version' => '1.11.0',
- 'version' => '1.11.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
- ),
- ),
-);
+ /**
+ * @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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
private static $installedByVendor = array();
/**
@@ -486,7 +56,6 @@ class InstalledVersions
$packages[] = array_keys($installed['versions']);
}
-
if (1 === \count($packages)) {
return $packages[0];
}
@@ -495,18 +64,41 @@ class InstalledVersions
}
/**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ 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)
+ public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
- return true;
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
@@ -520,15 +112,14 @@ class InstalledVersions
*
* 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
- *
+ * @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($constraint);
+ $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@@ -634,8 +225,25 @@ class InstalledVersions
}
/**
+ * @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, version: string, reference: string, pretty_version: string, aliases: string[]}
+ * @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()
{
@@ -647,15 +255,39 @@ class InstalledVersions
/**
* 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, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>}
+ * @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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
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<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ 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
@@ -671,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data
+ * @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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
@@ -681,6 +313,7 @@ class InstalledVersions
/**
* @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
@@ -691,17 +324,35 @@ class InstalledVersions
$installed = array();
if (self::$canGetVendors) {
- // @phpstan-ignore-next-line
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
- $installed[] = self::$installedByVendor[$vendorDir] = require $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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $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];
+ }
}
}
}
- $installed[] = self::$installed;
+ 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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $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/vendor/composer/LICENSE b/vendor/composer/LICENSE
index 62ecfd8d0..f27399a04 100644
--- a/vendor/composer/LICENSE
+++ b/vendor/composer/LICENSE
@@ -1,3 +1,4 @@
+
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -17,3 +18,4 @@ 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/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 9e751e17c..d51a256f0 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -2,10 +2,13 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
+ 'AllowDynamicProperties' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php',
+ 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
+ 'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'IdiormMethodMissingException' => $vendorDir . '/j4mie/idiorm/idiorm.php',
'IdiormResultSet' => $vendorDir . '/j4mie/idiorm/idiorm.php',
@@ -430,6 +433,14 @@ return array(
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
+ 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
+ 'Random\\BrokenRandomEngineError' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php',
+ 'Random\\CryptoSafeEngine' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php',
+ 'Random\\Engine' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/Engine.php',
+ 'Random\\Engine\\Secure' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php',
+ 'Random\\RandomError' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php',
+ 'Random\\RandomException' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php',
+ 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'Safe\\DateTime' => $vendorDir . '/thecodingmachine/safe/lib/DateTime.php',
'Safe\\DateTimeImmutable' => $vendorDir . '/thecodingmachine/safe/lib/DateTimeImmutable.php',
'Safe\\Exceptions\\ApacheException' => $vendorDir . '/thecodingmachine/safe/generated/Exceptions/ApacheException.php',
@@ -714,6 +725,9 @@ return array(
'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/UnknownType.php',
'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/VoidType.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
+ 'SensitiveParameter' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php',
+ 'SensitiveParameterValue' => $vendorDir . '/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php',
+ 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
@@ -722,4 +736,6 @@ return array(
'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
+ 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
+ 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index f940286e8..3c4b2e7a3 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -2,14 +2,28 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
- '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+ 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
+ '5897ea0ac4cccf14d323035e65887801' => $vendorDir . '/symfony/polyfill-php82/bootstrap.php',
+ '8e92226780215d0ec758aa7b73e0ede9' => $vendorDir . '/open-telemetry/context/fiber/initialize_fiber_handler.php',
+ 'c7b4a5d8b94d270f0f9a84f81e1dd63d' => $vendorDir . '/open-telemetry/api/Trace/functions.php',
+ '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ 'c695cb998ba36e4bafc3d028efc7d113' => $vendorDir . '/open-telemetry/sdk/Common/Util/functions.php',
+ 'd991bdbfe253499825156f17c4a721db' => $vendorDir . '/open-telemetry/sdk/Logs/Exporter/_register.php',
+ '01d424d2624f29a2eef00b09eb00935e' => $vendorDir . '/open-telemetry/sdk/Metrics/MetricExporter/_register.php',
+ '063d0a0034c5e2149209c15208de47e4' => $vendorDir . '/open-telemetry/sdk/Propagation/_register.php',
+ '2cc49ecec7e065b3a5423e964c0275e6' => $vendorDir . '/open-telemetry/sdk/Trace/SpanExporter/_register.php',
+ '062120a429d7568eacd495a8c34fcf09' => $vendorDir . '/open-telemetry/sdk/Common/Dev/Compatibility/_load.php',
+ '88e3b63cfb48eb8ea316a8a85a5f5c5f' => $vendorDir . '/open-telemetry/sdk/_autoload.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php',
'288267919fedd3829a7732b5fb202197' => $vendorDir . '/thecodingmachine/safe/deprecated/array.php',
'a88cd08cfbf1600f7d5de6e587eee1fa' => $vendorDir . '/thecodingmachine/safe/deprecated/datetime.php',
@@ -97,7 +111,7 @@ return array(
'4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php',
- 'ff1b7935a93a4a9517db3ebe0533892a' => $vendorDir . '/opentracing/opentracing/src/OpenTracing/Tags.php',
- '0db36546c71c357f5ee70c39bb03966f' => $vendorDir . '/opentracing/opentracing/src/OpenTracing/Formats.php',
- '822502b10d2c1dae82956ef999e8b4be' => $vendorDir . '/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php',
+ '157bbd0180425c7142fbaf1b1646bec3' => $vendorDir . '/open-telemetry/exporter-otlp/_register.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index b7fc0125d..15a2ff3ad 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 98ef4f1fd..3354c5d1f 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
@@ -10,15 +10,33 @@ return array(
'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'),
'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
- 'Thrift\\' => array($vendorDir . '/packaged/thrift/src'),
+ 'Symfony\\Polyfill\\Php82\\' => array($vendorDir . '/symfony/polyfill-php82'),
+ 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
+ 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
+ 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
- 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
+ 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'),
+ 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'),
- 'OpenTracing\\' => array($vendorDir . '/opentracing/opentracing/src/OpenTracing'),
+ 'Opentelemetry\\Proto\\' => array($vendorDir . '/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto'),
+ 'OpenTelemetry\\SemConv\\' => array($vendorDir . '/open-telemetry/sem-conv'),
+ 'OpenTelemetry\\SDK\\' => array($vendorDir . '/open-telemetry/sdk'),
+ 'OpenTelemetry\\Contrib\\Otlp\\' => array($vendorDir . '/open-telemetry/exporter-otlp'),
+ 'OpenTelemetry\\Context\\' => array($vendorDir . '/open-telemetry/context'),
+ 'OpenTelemetry\\API\\' => array($vendorDir . '/open-telemetry/api'),
'OTPHP\\' => array($vendorDir . '/spomky-labs/otphp/src'),
- 'Jaeger\\' => array($vendorDir . '/jonahgeorge/jaeger-client-php/src/Jaeger'),
+ 'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'),
+ 'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'),
+ 'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'),
+ 'Http\\Adapter\\Guzzle7\\' => array($vendorDir . '/php-http/guzzle7-adapter/src'),
+ 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
+ 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
+ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
+ 'Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/Google/Protobuf'),
+ 'GPBMetadata\\Opentelemetry\\' => array($vendorDir . '/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry'),
+ 'GPBMetadata\\Google\\Protobuf\\' => array($vendorDir . '/google/protobuf/src/GPBMetadata/Google/Protobuf'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Assert\\' => array($vendorDir . '/beberlei/assert/lib/Assert'),
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 51b54d2f0..ebee29895 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -23,51 +23,26 @@ class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056
}
spl_autoload_register(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'));
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require __DIR__ . '/autoload_static.php';
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
- call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
- } else {
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
+ $loader->register(true);
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
+ $filesToLoad = \Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
+ require $file;
}
- }
-
- $loader->register(true);
-
- if ($useStaticLoader) {
- $includeFiles = Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
- } else {
- $includeFiles = require __DIR__ . '/autoload_files.php';
- }
- foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file);
+ }, null, null);
+ foreach ($filesToLoad as $fileIdentifier => $file) {
+ $requireFile($fileIdentifier, $file);
}
return $loader;
}
}
-
-function composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file)
-{
- if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
- }
-}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 67d12d734..5dcd0fd72 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -7,10 +7,24 @@ namespace Composer\Autoload;
class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
{
public static $files = array (
- '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
+ 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
+ '5897ea0ac4cccf14d323035e65887801' => __DIR__ . '/..' . '/symfony/polyfill-php82/bootstrap.php',
+ '8e92226780215d0ec758aa7b73e0ede9' => __DIR__ . '/..' . '/open-telemetry/context/fiber/initialize_fiber_handler.php',
+ 'c7b4a5d8b94d270f0f9a84f81e1dd63d' => __DIR__ . '/..' . '/open-telemetry/api/Trace/functions.php',
+ '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
+ '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => __DIR__ . '/..' . '/beberlei/assert/lib/Assert/functions.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ 'c695cb998ba36e4bafc3d028efc7d113' => __DIR__ . '/..' . '/open-telemetry/sdk/Common/Util/functions.php',
+ 'd991bdbfe253499825156f17c4a721db' => __DIR__ . '/..' . '/open-telemetry/sdk/Logs/Exporter/_register.php',
+ '01d424d2624f29a2eef00b09eb00935e' => __DIR__ . '/..' . '/open-telemetry/sdk/Metrics/MetricExporter/_register.php',
+ '063d0a0034c5e2149209c15208de47e4' => __DIR__ . '/..' . '/open-telemetry/sdk/Propagation/_register.php',
+ '2cc49ecec7e065b3a5423e964c0275e6' => __DIR__ . '/..' . '/open-telemetry/sdk/Trace/SpanExporter/_register.php',
+ '062120a429d7568eacd495a8c34fcf09' => __DIR__ . '/..' . '/open-telemetry/sdk/Common/Dev/Compatibility/_load.php',
+ '88e3b63cfb48eb8ea316a8a85a5f5c5f' => __DIR__ . '/..' . '/open-telemetry/sdk/_autoload.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/apc.php',
'288267919fedd3829a7732b5fb202197' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/array.php',
'a88cd08cfbf1600f7d5de6e587eee1fa' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/datetime.php',
@@ -98,9 +112,9 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php',
- 'ff1b7935a93a4a9517db3ebe0533892a' => __DIR__ . '/..' . '/opentracing/opentracing/src/OpenTracing/Tags.php',
- '0db36546c71c357f5ee70c39bb03966f' => __DIR__ . '/..' . '/opentracing/opentracing/src/OpenTracing/Formats.php',
- '822502b10d2c1dae82956ef999e8b4be' => __DIR__ . '/..' . '/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php',
+ '157bbd0180425c7142fbaf1b1646bec3' => __DIR__ . '/..' . '/open-telemetry/exporter-otlp/_register.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
public static $prefixLengthsPsr4 = array (
@@ -117,26 +131,47 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
array (
'Webmozart\\Assert\\' => 17,
),
- 'T' =>
+ 'S' =>
array (
- 'Thrift\\' => 7,
+ 'Symfony\\Polyfill\\Php82\\' => 23,
+ 'Symfony\\Polyfill\\Php81\\' => 23,
+ 'Symfony\\Polyfill\\Php80\\' => 23,
+ 'Symfony\\Polyfill\\Mbstring\\' => 26,
),
'P' =>
array (
'Psr\\Log\\' => 8,
- 'Psr\\Cache\\' => 10,
+ 'Psr\\Http\\Message\\' => 17,
+ 'Psr\\Http\\Client\\' => 16,
'Prophecy\\' => 9,
'PhpParser\\' => 10,
'ParagonIE\\ConstantTime\\' => 23,
),
'O' =>
array (
- 'OpenTracing\\' => 12,
+ 'Opentelemetry\\Proto\\' => 20,
+ 'OpenTelemetry\\SemConv\\' => 22,
+ 'OpenTelemetry\\SDK\\' => 18,
+ 'OpenTelemetry\\Contrib\\Otlp\\' => 27,
+ 'OpenTelemetry\\Context\\' => 22,
+ 'OpenTelemetry\\API\\' => 18,
'OTPHP\\' => 6,
),
- 'J' =>
+ 'H' =>
+ array (
+ 'Http\\Promise\\' => 13,
+ 'Http\\Discovery\\' => 15,
+ 'Http\\Client\\' => 12,
+ 'Http\\Adapter\\Guzzle7\\' => 21,
+ ),
+ 'G' =>
array (
- 'Jaeger\\' => 7,
+ 'GuzzleHttp\\Psr7\\' => 16,
+ 'GuzzleHttp\\Promise\\' => 19,
+ 'GuzzleHttp\\' => 11,
+ 'Google\\Protobuf\\' => 16,
+ 'GPBMetadata\\Opentelemetry\\' => 26,
+ 'GPBMetadata\\Google\\Protobuf\\' => 28,
),
'D' =>
array (
@@ -168,17 +203,34 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
array (
0 => __DIR__ . '/..' . '/webmozart/assert/src',
),
- 'Thrift\\' =>
+ 'Symfony\\Polyfill\\Php82\\' =>
array (
- 0 => __DIR__ . '/..' . '/packaged/thrift/src',
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php82',
+ ),
+ 'Symfony\\Polyfill\\Php81\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php81',
+ ),
+ 'Symfony\\Polyfill\\Php80\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
+ ),
+ 'Symfony\\Polyfill\\Mbstring\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Psr\\Log\\' =>
array (
0 => __DIR__ . '/..' . '/psr/log/src',
),
- 'Psr\\Cache\\' =>
+ 'Psr\\Http\\Message\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/http-message/src',
+ 1 => __DIR__ . '/..' . '/psr/http-factory/src',
+ ),
+ 'Psr\\Http\\Client\\' =>
array (
- 0 => __DIR__ . '/..' . '/psr/cache/src',
+ 0 => __DIR__ . '/..' . '/psr/http-client/src',
),
'Prophecy\\' =>
array (
@@ -192,17 +244,73 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
array (
0 => __DIR__ . '/..' . '/paragonie/constant_time_encoding/src',
),
- 'OpenTracing\\' =>
+ 'Opentelemetry\\Proto\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto',
+ ),
+ 'OpenTelemetry\\SemConv\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/sem-conv',
+ ),
+ 'OpenTelemetry\\SDK\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/sdk',
+ ),
+ 'OpenTelemetry\\Contrib\\Otlp\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/exporter-otlp',
+ ),
+ 'OpenTelemetry\\Context\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/context',
+ ),
+ 'OpenTelemetry\\API\\' =>
array (
- 0 => __DIR__ . '/..' . '/opentracing/opentracing/src/OpenTracing',
+ 0 => __DIR__ . '/..' . '/open-telemetry/api',
),
'OTPHP\\' =>
array (
0 => __DIR__ . '/..' . '/spomky-labs/otphp/src',
),
- 'Jaeger\\' =>
+ 'Http\\Promise\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/promise/src',
+ ),
+ 'Http\\Discovery\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/discovery/src',
+ ),
+ 'Http\\Client\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/httplug/src',
+ ),
+ 'Http\\Adapter\\Guzzle7\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/php-http/guzzle7-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\\Protobuf\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/Google/Protobuf',
+ ),
+ 'GPBMetadata\\Opentelemetry\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry',
+ ),
+ 'GPBMetadata\\Google\\Protobuf\\' =>
array (
- 0 => __DIR__ . '/..' . '/jonahgeorge/jaeger-client-php/src/Jaeger',
+ 0 => __DIR__ . '/..' . '/google/protobuf/src/GPBMetadata/Google/Protobuf',
),
'Doctrine\\Instantiator\\' =>
array (
@@ -219,6 +327,9 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
);
public static $classMap = array (
+ 'AllowDynamicProperties' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php',
+ 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
+ 'CURLStringFile' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'IdiormMethodMissingException' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php',
'IdiormResultSet' => __DIR__ . '/..' . '/j4mie/idiorm/idiorm.php',
@@ -643,6 +754,14 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
+ 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
+ 'Random\\BrokenRandomEngineError' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php',
+ 'Random\\CryptoSafeEngine' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php',
+ 'Random\\Engine' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/Engine.php',
+ 'Random\\Engine\\Secure' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php',
+ 'Random\\RandomError' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php',
+ 'Random\\RandomException' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php',
+ 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'Safe\\DateTime' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/DateTime.php',
'Safe\\DateTimeImmutable' => __DIR__ . '/..' . '/thecodingmachine/safe/lib/DateTimeImmutable.php',
'Safe\\Exceptions\\ApacheException' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/Exceptions/ApacheException.php',
@@ -927,6 +1046,9 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/UnknownType.php',
'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/VoidType.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
+ 'SensitiveParameter' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php',
+ 'SensitiveParameterValue' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php',
+ 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
@@ -935,6 +1057,8 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
+ 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
+ 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);
public static function getInitializer(ClassLoader $loader)
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 0be499810..54f34fa7f 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -292,6 +292,387 @@
"install-path": "../doctrine/instantiator"
},
{
+ "name": "google/protobuf",
+ "version": "v3.24.4",
+ "version_normalized": "3.24.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "time": "2023-10-04T17:22:47+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.24.4"
+ },
+ "install-path": "../google/protobuf"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.8.0",
+ "version_normalized": "7.8.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0",
+ "symfony/deprecation-contracts": "^2.2 || ^3.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "php-http/message-factory": "^1.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
+ "psr/log": "^1.1 || ^2.0 || ^3.0"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "time": "2023-08-27T10:20:53+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "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": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "[email protected]",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "psr-18",
+ "psr-7",
+ "rest",
+ "web service"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
+ },
+ "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": "2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "time": "2023-08-03T15:11:55+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "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/2.0.1"
+ },
+ "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": "2.6.1",
+ "version_normalized": "2.6.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0",
+ "ralouphie/getallheaders": "^3.0"
+ },
+ "provide": {
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "time": "2023-08-27T10:13:57+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "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/2.6.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": "j4mie/idiorm",
"version": "dev-master",
"version_normalized": "dev-master",
@@ -360,77 +741,6 @@
"install-path": "../j4mie/idiorm"
},
{
- "name": "jonahgeorge/jaeger-client-php",
- "version": "v1.4.4",
- "version_normalized": "1.4.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/jonahgeorge/jaeger-client-php.git",
- "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/jonahgeorge/jaeger-client-php/zipball/3173d9c68ad8cea16058f25337982b00cc3d1c2b",
- "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b",
- "shasum": ""
- },
- "require": {
- "ext-sockets": "*",
- "opentracing/opentracing": "^1.0",
- "packaged/thrift": "^0.13",
- "php": "^7.1 || ^8.0 || ^8.1",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "psr/log": "^1.0 || ^2.0 || ^3.0"
- },
- "require-dev": {
- "cache/array-adapter": "^1.0",
- "phpunit/phpunit": "^7 || ^8 || ^9",
- "squizlabs/php_codesniffer": "3.*",
- "symfony/polyfill-php73": "^1.10"
- },
- "time": "2023-01-31T13:40:20+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "./src/Jaeger/Constants.php"
- ],
- "psr-4": {
- "Jaeger\\": "src/Jaeger/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jonah George",
- "homepage": "http://twitter.com/jonahgeorge"
- },
- {
- "name": "José Carlos Chávez",
- "email": "[email protected]"
- },
- {
- "name": "Contributors",
- "homepage": "https://github.com/jonahgeorge/jaeger-client-php/graphs/contributors"
- }
- ],
- "description": "Jaeger Bindings for PHP OpenTracing API",
- "keywords": [
- "jaeger",
- "opentracing",
- "trace",
- "tracing"
- ],
- "support": {
- "issues": "https://github.com/jonahgeorge/jaeger-client-php/issues",
- "source": "https://github.com/jonahgeorge/jaeger-client-php/tree/v1.4.4"
- },
- "install-path": "../jonahgeorge/jaeger-client-php"
- },
- {
"name": "mervick/material-design-icons",
"version": "2.2.0",
"version_normalized": "2.2.0.0",
@@ -598,38 +908,172 @@
"install-path": "../nikic/php-parser"
},
{
- "name": "opentracing/opentracing",
- "version": "1.0.2",
- "version_normalized": "1.0.2.0",
+ "name": "open-telemetry/api",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
"source": {
"type": "git",
- "url": "https://github.com/opentracing/opentracing-php.git",
- "reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116"
+ "url": "https://github.com/opentelemetry-php/api.git",
+ "reference": "d577d732333d38a9a6c16936363ee25f1e3f1c3c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/opentracing/opentracing-php/zipball/cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
- "reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
+ "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/d577d732333d38a9a6c16936363ee25f1e3f1c3c",
+ "reference": "d577d732333d38a9a6c16936363ee25f1e3f1c3c",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "open-telemetry/context": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "time": "2023-09-27T23:15:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
},
- "require-dev": {
- "phpstan/phpstan": "~0.12",
- "phpunit/phpunit": "^7.0 || ^9.0",
- "squizlabs/php_codesniffer": "3.*"
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "Trace/functions.php"
+ ],
+ "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": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "install-path": "../open-telemetry/api"
+ },
+ {
+ "name": "open-telemetry/context",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/context.git",
+ "reference": "99f3d54fa9f9ff67421774feeef5e5b1f209ea21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/99f3d54fa9f9ff67421774feeef5e5b1f209ea21",
+ "reference": "99f3d54fa9f9ff67421774feeef5e5b1f209ea21",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "suggest": {
+ "ext-ffi": "To allow context switching in Fibers"
+ },
+ "time": "2023-09-05T03:38:44+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "fiber/initialize_fiber_handler.php"
+ ],
+ "psr-4": {
+ "OpenTelemetry\\Context\\": "."
+ }
},
- "time": "2022-01-27T19:59:21+00:00",
+ "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",
+ "opentelemetry",
+ "otel"
+ ],
+ "support": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "install-path": "../open-telemetry/context"
+ },
+ {
+ "name": "open-telemetry/exporter-otlp",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/exporter-otlp.git",
+ "reference": "756092bdff472ea49adb7843c74011606d065b36"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/756092bdff472ea49adb7843c74011606d065b36",
+ "reference": "756092bdff472ea49adb7843c74011606d065b36",
+ "shasum": ""
+ },
+ "require": {
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/gen-otlp-protobuf": "^1.0",
+ "open-telemetry/sdk": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "php-http/discovery": "^1.14"
+ },
+ "time": "2023-10-13T00:48:23+00:00",
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
"installation-source": "dist",
"autoload": {
"files": [
- "src/OpenTracing/Tags.php",
- "src/OpenTracing/Formats.php"
+ "_register.php"
],
"psr-4": {
- "OpenTracing\\": "src/OpenTracing/"
+ "OpenTelemetry\\Contrib\\Otlp\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -638,58 +1082,240 @@
],
"authors": [
{
- "name": "José Carlos Chávez",
- "email": "[email protected]"
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
}
],
- "description": "OpenTracing API for PHP",
+ "description": "OTLP exporter for OpenTelemetry.",
+ "keywords": [
+ "Metrics",
+ "exporter",
+ "gRPC",
+ "http",
+ "opentelemetry",
+ "otel",
+ "otlp",
+ "tracing"
+ ],
"support": {
- "issues": "https://github.com/opentracing/opentracing-php/issues",
- "source": "https://github.com/opentracing/opentracing-php/tree/1.0.2"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "install-path": "../opentracing/opentracing"
+ "install-path": "../open-telemetry/exporter-otlp"
},
{
- "name": "packaged/thrift",
- "version": "0.13.01",
- "version_normalized": "0.13.01.0",
+ "name": "open-telemetry/gen-otlp-protobuf",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
"source": {
"type": "git",
- "url": "https://github.com/packaged/thrift.git",
- "reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228"
+ "url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git",
+ "reference": "30fe95f10c2ec1a577f78257c86fbbebe739ca5e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/packaged/thrift/zipball/e3dbcfb79e319971d64264ffe9c340590cc8a228",
- "reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228",
+ "url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/30fe95f10c2ec1a577f78257c86fbbebe739ca5e",
+ "reference": "30fe95f10c2ec1a577f78257c86fbbebe739ca5e",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7.0 || ^8.0"
+ "google/protobuf": "^3.3.0",
+ "php": "^7.4 || ^8.0"
},
- "time": "2021-01-25T13:32:28+00:00",
+ "suggest": {
+ "ext-protobuf": "For better performance, when dealing with the protobuf format"
+ },
+ "time": "2023-09-05T03:38:44+00:00",
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
"installation-source": "dist",
"autoload": {
"psr-4": {
- "Thrift\\": "src/"
+ "Opentelemetry\\Proto\\": "Opentelemetry/Proto/",
+ "GPBMetadata\\Opentelemetry\\": "GPBMetadata/Opentelemetry/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
- "description": "Apache Thrift",
- "homepage": "http://thrift.apache.org/",
+ "authors": [
+ {
+ "name": "opentelemetry-php contributors",
+ "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors"
+ }
+ ],
+ "description": "PHP protobuf files for communication with OpenTelemetry OTLP collectors/servers.",
"keywords": [
- "apache",
- "thrift"
+ "Metrics",
+ "apm",
+ "gRPC",
+ "logging",
+ "opentelemetry",
+ "otel",
+ "otlp",
+ "protobuf",
+ "tracing"
],
"support": {
- "issues": "https://github.com/packaged/thrift/issues",
- "source": "https://github.com/packaged/thrift/tree/0.13.01"
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
},
- "install-path": "../packaged/thrift"
+ "install-path": "../open-telemetry/gen-otlp-protobuf"
+ },
+ {
+ "name": "open-telemetry/sdk",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/sdk.git",
+ "reference": "1c6020b4f1b85fdd647538ee46f6c83360d7c11e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c6020b4f1b85fdd647538ee46f6c83360d7c11e",
+ "reference": "1c6020b4f1b85fdd647538ee46f6c83360d7c11e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/context": "^1.0",
+ "open-telemetry/sem-conv": "^1.0",
+ "php": "^7.4 || ^8.0",
+ "php-http/discovery": "^1.14",
+ "psr/http-client": "^1.0",
+ "psr/http-client-implementation": "^1.0",
+ "psr/http-factory-implementation": "^1.0",
+ "psr/http-message": "^1.0.1|^2.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-mbstring": "^1.23",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "suggest": {
+ "ext-gmp": "To support unlimited number of synchronous metric readers",
+ "ext-mbstring": "To increase performance of string operations"
+ },
+ "time": "2023-10-18T20:53:08+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "Common/Util/functions.php",
+ "Logs/Exporter/_register.php",
+ "Metrics/MetricExporter/_register.php",
+ "Propagation/_register.php",
+ "Trace/SpanExporter/_register.php",
+ "Common/Dev/Compatibility/_load.php",
+ "_autoload.php"
+ ],
+ "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": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "install-path": "../open-telemetry/sdk"
+ },
+ {
+ "name": "open-telemetry/sem-conv",
+ "version": "1.22.1",
+ "version_normalized": "1.22.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/opentelemetry-php/sem-conv.git",
+ "reference": "e582b874ee89bec544f962db212b3966fe9310a7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/e582b874ee89bec544f962db212b3966fe9310a7",
+ "reference": "e582b874ee89bec544f962db212b3966fe9310a7",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "time": "2023-10-19T20:10:44+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "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": {
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
+ "docs": "https://opentelemetry.io/docs/php",
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php"
+ },
+ "install-path": "../open-telemetry/sem-conv"
},
{
"name": "paragonie/constant_time_encoding",
@@ -879,6 +1505,272 @@
"install-path": "../phar-io/version"
},
{
+ "name": "php-http/discovery",
+ "version": "1.19.1",
+ "version_normalized": "1.19.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/discovery.git",
+ "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e",
+ "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e",
+ "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",
+ "symfony/phpunit-bridge": "^6.2"
+ },
+ "time": "2023-07-11T07:02:26+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": "[email protected]"
+ }
+ ],
+ "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.1"
+ },
+ "install-path": "../php-http/discovery"
+ },
+ {
+ "name": "php-http/guzzle7-adapter",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/guzzle7-adapter.git",
+ "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/guzzle7-adapter/zipball/fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01",
+ "reference": "fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/guzzle": "^7.0",
+ "php": "^7.2 | ^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": {
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.0|^9.3"
+ },
+ "time": "2021-03-09T07:35:15+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Adapter\\Guzzle7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]"
+ }
+ ],
+ "description": "Guzzle 7 HTTP Adapter",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "Guzzle",
+ "http"
+ ],
+ "support": {
+ "issues": "https://github.com/php-http/guzzle7-adapter/issues",
+ "source": "https://github.com/php-http/guzzle7-adapter/tree/1.0.0"
+ },
+ "install-path": "../php-http/guzzle7-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": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "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/promise",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/promise.git",
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
+ "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "friends-of-phpspec/phpspec-code-coverage": "^4.3.2",
+ "phpspec/phpspec": "^5.1.2 || ^6.2"
+ },
+ "time": "2020-07-07T09:29:14+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Http\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joel Wurtz",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]"
+ }
+ ],
+ "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.1.0"
+ },
+ "install-path": "../php-http/promise"
+ },
+ {
"name": "phpdocumentor/reflection-common",
"version": "2.2.0",
"version_normalized": "2.2.0.0",
@@ -1619,24 +2511,25 @@
"install-path": "../phpunit/phpunit"
},
{
- "name": "psr/cache",
- "version": "3.0.0",
- "version_normalized": "3.0.0.0",
+ "name": "psr/http-client",
+ "version": "1.0.3",
+ "version_normalized": "1.0.3.0",
"source": {
"type": "git",
- "url": "https://github.com/php-fig/cache.git",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
+ "url": "https://github.com/php-fig/http-client.git",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
"shasum": ""
},
"require": {
- "php": ">=8.0.0"
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0 || ^2.0"
},
- "time": "2021-02-03T23:26:27+00:00",
+ "time": "2023-09-23T14:17:50+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1646,7 +2539,7 @@
"installation-source": "dist",
"autoload": {
"psr-4": {
- "Psr\\Cache\\": "src/"
+ "Psr\\Http\\Client\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1659,16 +2552,132 @@
"homepage": "https://www.php-fig.org/"
}
],
- "description": "Common interface for caching libraries",
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
"keywords": [
- "cache",
+ "http",
+ "http-client",
"psr",
- "psr-6"
+ "psr-18"
],
"support": {
- "source": "https://github.com/php-fig/cache/tree/3.0.0"
+ "source": "https://github.com/php-fig/http-client"
},
- "install-path": "../psr/cache"
+ "install-path": "../psr/http-client"
+ },
+ {
+ "name": "psr/http-factory",
+ "version": "1.0.2",
+ "version_normalized": "1.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2023-04-10T20:10:41+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": "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/tree/1.0.2"
+ },
+ "install-path": "../psr/http-factory"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "2.0",
+ "version_normalized": "2.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2023-04-04T09:54:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.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": "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/2.0"
+ },
+ "install-path": "../psr/http-message"
},
{
"name": "psr/log",
@@ -1724,6 +2733,53 @@
"install-path": "../psr/log"
},
{
+ "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": "[email protected]"
+ }
+ ],
+ "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": "sebastian/cli-parser",
"version": "1.0.1",
"version_normalized": "1.0.1.0",
@@ -2814,6 +3870,412 @@
"install-path": "../spomky-labs/otphp"
},
{
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.0.2",
+ "version_normalized": "3.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.2"
+ },
+ "time": "2022-01-02T09:55:41+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
+ },
+ "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/deprecation-contracts"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.28.0",
+ "version_normalized": "1.28.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2023-07-28T09:04:16+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "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": "[email protected]"
+ },
+ {
+ "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.28.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-php80",
+ "version": "v1.28.0",
+ "version_normalized": "1.28.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2023-01-26T09:26:14+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.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-php80"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.28.0",
+ "version_normalized": "1.28.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2023-01-26T09:26:14+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.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-php81"
+ },
+ {
+ "name": "symfony/polyfill-php82",
+ "version": "v1.28.0",
+ "version_normalized": "1.28.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php82.git",
+ "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/7716bea9c86776fb3362d6b52fe1fc9471056a49",
+ "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2023-08-25T17:27:25+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php82\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php82/tree/v1.28.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-php82"
+ },
+ {
"name": "thecodingmachine/safe",
"version": "v2.2.2",
"version_normalized": "2.2.2.0",
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index cec06e2b7..627ad010d 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,448 +1,654 @@
-<?php return array (
- 'root' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
+<?php return array(
+ 'root' => array(
+ 'name' => '__root__',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '45a9ff0c88cbd33892ff16ab837e9059937d656e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ '__root__' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '45a9ff0c88cbd33892ff16ab837e9059937d656e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'beberlei/assert' => array(
+ 'pretty_version' => 'v3.3.2',
+ 'version' => '3.3.2.0',
+ 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../beberlei/assert',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'chillerlan/php-qrcode' => array(
+ 'pretty_version' => '4.3.4',
+ 'version' => '4.3.4.0',
+ 'reference' => '2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../chillerlan/php-qrcode',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'chillerlan/php-settings-container' => array(
+ 'pretty_version' => '2.1.4',
+ 'version' => '2.1.4.0',
+ 'reference' => '1beb7df3c14346d4344b0b2e12f6f9a74feabd4a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../chillerlan/php-settings-container',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'doctrine/instantiator' => array(
+ 'pretty_version' => '1.4.1',
+ 'version' => '1.4.1.0',
+ 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../doctrine/instantiator',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'google/protobuf' => array(
+ 'pretty_version' => 'v3.24.4',
+ 'version' => '3.24.4.0',
+ 'reference' => '672d69e25f71b9364fdf1810eb8a8573defdc404',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/protobuf',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/guzzle' => array(
+ 'pretty_version' => '7.8.0',
+ 'version' => '7.8.0.0',
+ 'reference' => '1110f66a6530a40fe7aea0378fe608ee2b2248f9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/promises' => array(
+ 'pretty_version' => '2.0.1',
+ 'version' => '2.0.1.0',
+ 'reference' => '111166291a0f8130081195ac4556a5587d7f1b5d',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/promises',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/psr7' => array(
+ 'pretty_version' => '2.6.1',
+ 'version' => '2.6.1.0',
+ 'reference' => 'be45764272e8873c72dbe3d2edcfdfcc3bc9f727',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'j4mie/idiorm' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'efc8ea06698f53e2c479c7696f2b154c47c3a3cb',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../j4mie/idiorm',
+ 'aliases' => array(
+ 0 => '9999999-dev',
+ ),
+ 'dev_requirement' => false,
+ ),
+ 'mervick/material-design-icons' => array(
+ 'pretty_version' => '2.2.0',
+ 'version' => '2.2.0.0',
+ 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../mervick/material-design-icons',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'myclabs/deep-copy' => array(
+ 'pretty_version' => '1.11.0',
+ 'version' => '1.11.0.0',
+ 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../myclabs/deep-copy',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'nikic/php-parser' => array(
+ 'pretty_version' => 'v4.14.0',
+ 'version' => '4.14.0.0',
+ 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../nikic/php-parser',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'open-telemetry/api' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => 'd577d732333d38a9a6c16936363ee25f1e3f1c3c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/api',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/context' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => '99f3d54fa9f9ff67421774feeef5e5b1f209ea21',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/context',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/exporter-otlp' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => '756092bdff472ea49adb7843c74011606d065b36',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/exporter-otlp',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/gen-otlp-protobuf' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => '30fe95f10c2ec1a577f78257c86fbbebe739ca5e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/gen-otlp-protobuf',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/sdk' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => '1c6020b4f1b85fdd647538ee46f6c83360d7c11e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/sdk',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'open-telemetry/sem-conv' => array(
+ 'pretty_version' => '1.22.1',
+ 'version' => '1.22.1.0',
+ 'reference' => 'e582b874ee89bec544f962db212b3966fe9310a7',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../open-telemetry/sem-conv',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'paragonie/constant_time_encoding' => array(
+ 'pretty_version' => 'v2.6.3',
+ 'version' => '2.6.3.0',
+ 'reference' => '58c3f47f650c94ec05a151692652a868995d2938',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'phar-io/manifest' => array(
+ 'pretty_version' => '2.0.3',
+ 'version' => '2.0.3.0',
+ 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phar-io/manifest',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phar-io/version' => array(
+ 'pretty_version' => '3.2.1',
+ 'version' => '3.2.1.0',
+ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phar-io/version',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ '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.1',
+ 'version' => '1.19.1.0',
+ 'reference' => '57f3de01d32085fea20865f9b16fb0e69347c39e',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/../php-http/discovery',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'php-http/guzzle7-adapter' => array(
+ 'pretty_version' => '1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => 'fb075a71dbfa4847cf0c2938c4e5a9c478ef8b01',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/guzzle7-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/promise' => array(
+ 'pretty_version' => '1.1.0',
+ 'version' => '1.1.0.0',
+ 'reference' => '4c4c1f9b7289a2ec57cde7f1e9762a5789506f88',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-http/promise',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'phpdocumentor/reflection-common' => array(
+ 'pretty_version' => '2.2.0',
+ 'version' => '2.2.0.0',
+ 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpdocumentor/reflection-docblock' => array(
+ 'pretty_version' => '5.3.0',
+ 'version' => '5.3.0.0',
+ 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpdocumentor/type-resolver' => array(
+ 'pretty_version' => '1.6.1',
+ 'version' => '1.6.1.0',
+ 'reference' => '77a32518733312af16a44300404e945338981de3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpspec/prophecy' => array(
+ 'pretty_version' => 'v1.15.0',
+ 'version' => '1.15.0.0',
+ 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpspec/prophecy',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpstan/phpstan' => array(
+ 'pretty_version' => '1.10.3',
+ 'version' => '1.10.3.0',
+ 'reference' => '5419375b5891add97dc74be71e6c1c34baaddf64',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpstan/phpstan',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-code-coverage' => array(
+ 'pretty_version' => '9.2.15',
+ 'version' => '9.2.15.0',
+ 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-file-iterator' => array(
+ 'pretty_version' => '3.0.6',
+ 'version' => '3.0.6.0',
+ 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-invoker' => array(
+ 'pretty_version' => '3.1.1',
+ 'version' => '3.1.1.0',
+ 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-invoker',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-text-template' => array(
+ 'pretty_version' => '2.0.4',
+ 'version' => '2.0.4.0',
+ 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-text-template',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/php-timer' => array(
+ 'pretty_version' => '5.0.3',
+ 'version' => '5.0.3.0',
+ 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/php-timer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'phpunit/phpunit' => array(
+ 'pretty_version' => '9.5.16',
+ 'version' => '9.5.16.0',
+ 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpunit/phpunit',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ '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.0.2',
+ 'version' => '1.0.2.0',
+ 'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
+ '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' => '2.0',
+ 'version' => '2.0.0.0',
+ 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
+ '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,
+ ),
+ '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,
+ ),
+ 'sebastian/cli-parser' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/cli-parser',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/code-unit' => array(
+ 'pretty_version' => '1.0.8',
+ 'version' => '1.0.8.0',
+ 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/code-unit',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/code-unit-reverse-lookup' => array(
+ 'pretty_version' => '2.0.3',
+ 'version' => '2.0.3.0',
+ 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/comparator' => array(
+ 'pretty_version' => '4.0.6',
+ 'version' => '4.0.6.0',
+ 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/comparator',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/complexity' => array(
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/complexity',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/diff' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/diff',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/environment' => array(
+ 'pretty_version' => '5.1.4',
+ 'version' => '5.1.4.0',
+ 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/environment',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/exporter' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/exporter',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/global-state' => array(
+ 'pretty_version' => '5.0.5',
+ 'version' => '5.0.5.0',
+ 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/global-state',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/lines-of-code' => array(
+ 'pretty_version' => '1.0.3',
+ 'version' => '1.0.3.0',
+ 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/lines-of-code',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/object-enumerator' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/object-enumerator',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/object-reflector' => array(
+ 'pretty_version' => '2.0.4',
+ 'version' => '2.0.4.0',
+ 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/object-reflector',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/recursion-context' => array(
+ 'pretty_version' => '4.0.4',
+ 'version' => '4.0.4.0',
+ 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/recursion-context',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/resource-operations' => array(
+ 'pretty_version' => '3.0.3',
+ 'version' => '3.0.3.0',
+ 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/resource-operations',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/type' => array(
+ 'pretty_version' => '2.3.4',
+ 'version' => '2.3.4.0',
+ 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/type',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'sebastian/version' => array(
+ 'pretty_version' => '3.0.2',
+ 'version' => '3.0.2.0',
+ 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../sebastian/version',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'spomky-labs/otphp' => array(
+ 'pretty_version' => 'v10.0.3',
+ 'version' => '10.0.3.0',
+ 'reference' => '9784d9f7c790eed26e102d6c78f12c754036c366',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../spomky-labs/otphp',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/deprecation-contracts' => array(
+ 'pretty_version' => 'v3.0.2',
+ 'version' => '3.0.2.0',
+ 'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-mbstring' => array(
+ 'pretty_version' => 'v1.28.0',
+ 'version' => '1.28.0.0',
+ 'reference' => '42292d99c55abe617799667f454222c54c60e229',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php80' => array(
+ 'pretty_version' => 'v1.28.0',
+ 'version' => '1.28.0.0',
+ 'reference' => '6caa57379c4aec19c0a12a38b59b26487dcfe4b5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php81' => array(
+ 'pretty_version' => 'v1.28.0',
+ 'version' => '1.28.0.0',
+ 'reference' => '7581cd600fa9fd681b797d00b02f068e2f13263b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php81',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php82' => array(
+ 'pretty_version' => 'v1.28.0',
+ 'version' => '1.28.0.0',
+ 'reference' => '7716bea9c86776fb3362d6b52fe1fc9471056a49',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php82',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'thecodingmachine/safe' => array(
+ 'pretty_version' => 'v2.2.2',
+ 'version' => '2.2.2.0',
+ 'reference' => '440284f9592c9df402832452a6871a8b3c48d97e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../thecodingmachine/safe',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'theseer/tokenizer' => array(
+ 'pretty_version' => '1.2.1',
+ 'version' => '1.2.1.0',
+ 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../theseer/tokenizer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'webmozart/assert' => array(
+ 'pretty_version' => '1.11.0',
+ 'version' => '1.11.0.0',
+ 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../webmozart/assert',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
),
- 'reference' => 'a37eab2610a0a2bcb655258781c1c7e925dc94c0',
- 'name' => '__root__',
- ),
- 'versions' =>
- array (
- '__root__' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => 'a37eab2610a0a2bcb655258781c1c7e925dc94c0',
- ),
- 'beberlei/assert' =>
- array (
- 'pretty_version' => 'v3.3.2',
- 'version' => '3.3.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
- ),
- 'chillerlan/php-qrcode' =>
- array (
- 'pretty_version' => '4.3.4',
- 'version' => '4.3.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d',
- ),
- 'chillerlan/php-settings-container' =>
- array (
- 'pretty_version' => '2.1.4',
- 'version' => '2.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1beb7df3c14346d4344b0b2e12f6f9a74feabd4a',
- ),
- 'doctrine/instantiator' =>
- array (
- 'pretty_version' => '1.4.1',
- 'version' => '1.4.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
- ),
- 'j4mie/idiorm' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- 0 => '9999999-dev',
- ),
- 'reference' => 'efc8ea06698f53e2c479c7696f2b154c47c3a3cb',
- ),
- 'jonahgeorge/jaeger-client-php' =>
- array (
- 'pretty_version' => 'v1.4.4',
- 'version' => '1.4.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3173d9c68ad8cea16058f25337982b00cc3d1c2b',
- ),
- 'mervick/material-design-icons' =>
- array (
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
- ),
- 'myclabs/deep-copy' =>
- array (
- 'pretty_version' => '1.11.0',
- 'version' => '1.11.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
- ),
- 'nikic/php-parser' =>
- array (
- 'pretty_version' => 'v4.14.0',
- 'version' => '4.14.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1',
- ),
- 'opentracing/opentracing' =>
- array (
- 'pretty_version' => '1.0.2',
- 'version' => '1.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cd60bd1fb2a25280600bc74c7f9e0c13881a9116',
- ),
- 'packaged/thrift' =>
- array (
- 'pretty_version' => '0.13.01',
- 'version' => '0.13.01.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'e3dbcfb79e319971d64264ffe9c340590cc8a228',
- ),
- 'paragonie/constant_time_encoding' =>
- array (
- 'pretty_version' => 'v2.6.3',
- 'version' => '2.6.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '58c3f47f650c94ec05a151692652a868995d2938',
- ),
- 'phar-io/manifest' =>
- array (
- 'pretty_version' => '2.0.3',
- 'version' => '2.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
- ),
- 'phar-io/version' =>
- array (
- 'pretty_version' => '3.2.1',
- 'version' => '3.2.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
- ),
- 'phpdocumentor/reflection-common' =>
- array (
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
- ),
- 'phpdocumentor/reflection-docblock' =>
- array (
- 'pretty_version' => '5.3.0',
- 'version' => '5.3.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
- ),
- 'phpdocumentor/type-resolver' =>
- array (
- 'pretty_version' => '1.6.1',
- 'version' => '1.6.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '77a32518733312af16a44300404e945338981de3',
- ),
- 'phpspec/prophecy' =>
- array (
- 'pretty_version' => 'v1.15.0',
- 'version' => '1.15.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
- ),
- 'phpstan/phpstan' =>
- array (
- 'pretty_version' => '1.10.3',
- 'version' => '1.10.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5419375b5891add97dc74be71e6c1c34baaddf64',
- ),
- 'phpunit/php-code-coverage' =>
- array (
- 'pretty_version' => '9.2.15',
- 'version' => '9.2.15.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
- ),
- 'phpunit/php-file-iterator' =>
- array (
- 'pretty_version' => '3.0.6',
- 'version' => '3.0.6.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
- ),
- 'phpunit/php-invoker' =>
- array (
- 'pretty_version' => '3.1.1',
- 'version' => '3.1.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
- ),
- 'phpunit/php-text-template' =>
- array (
- 'pretty_version' => '2.0.4',
- 'version' => '2.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
- ),
- 'phpunit/php-timer' =>
- array (
- 'pretty_version' => '5.0.3',
- 'version' => '5.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
- ),
- 'phpunit/phpunit' =>
- array (
- 'pretty_version' => '9.5.16',
- 'version' => '9.5.16.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
- ),
- 'psr/cache' =>
- array (
- 'pretty_version' => '3.0.0',
- 'version' => '3.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf',
- ),
- 'psr/log' =>
- array (
- 'pretty_version' => '3.0.0',
- 'version' => '3.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
- ),
- 'sebastian/cli-parser' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
- ),
- 'sebastian/code-unit' =>
- array (
- 'pretty_version' => '1.0.8',
- 'version' => '1.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
- ),
- 'sebastian/code-unit-reverse-lookup' =>
- array (
- 'pretty_version' => '2.0.3',
- 'version' => '2.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
- ),
- 'sebastian/comparator' =>
- array (
- 'pretty_version' => '4.0.6',
- 'version' => '4.0.6.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
- ),
- 'sebastian/complexity' =>
- array (
- 'pretty_version' => '2.0.2',
- 'version' => '2.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
- ),
- 'sebastian/diff' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
- ),
- 'sebastian/environment' =>
- array (
- 'pretty_version' => '5.1.4',
- 'version' => '5.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7',
- ),
- 'sebastian/exporter' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
- ),
- 'sebastian/global-state' =>
- array (
- 'pretty_version' => '5.0.5',
- 'version' => '5.0.5.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
- ),
- 'sebastian/lines-of-code' =>
- array (
- 'pretty_version' => '1.0.3',
- 'version' => '1.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
- ),
- 'sebastian/object-enumerator' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
- ),
- 'sebastian/object-reflector' =>
- array (
- 'pretty_version' => '2.0.4',
- 'version' => '2.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
- ),
- 'sebastian/recursion-context' =>
- array (
- 'pretty_version' => '4.0.4',
- 'version' => '4.0.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
- ),
- 'sebastian/resource-operations' =>
- array (
- 'pretty_version' => '3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
- ),
- 'sebastian/type' =>
- array (
- 'pretty_version' => '2.3.4',
- 'version' => '2.3.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
- ),
- 'sebastian/version' =>
- array (
- 'pretty_version' => '3.0.2',
- 'version' => '3.0.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
- ),
- 'spomky-labs/otphp' =>
- array (
- 'pretty_version' => 'v10.0.3',
- 'version' => '10.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9784d9f7c790eed26e102d6c78f12c754036c366',
- ),
- 'thecodingmachine/safe' =>
- array (
- 'pretty_version' => 'v2.2.2',
- 'version' => '2.2.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '440284f9592c9df402832452a6871a8b3c48d97e',
- ),
- 'theseer/tokenizer' =>
- array (
- 'pretty_version' => '1.2.1',
- 'version' => '1.2.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
- ),
- 'webmozart/assert' =>
- array (
- 'pretty_version' => '1.11.0',
- 'version' => '1.11.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
- ),
- ),
);
diff --git a/vendor/google/protobuf/LICENSE b/vendor/google/protobuf/LICENSE
new file mode 100644
index 000000000..ba32af4c2
--- /dev/null
+++ b/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/vendor/google/protobuf/README.md b/vendor/google/protobuf/README.md
new file mode 100644
index 000000000..3663050d4
--- /dev/null
+++ b/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/vendor/google/protobuf/composer.json b/vendor/google/protobuf/composer.json
new file mode 100644
index 000000000..70af0a033
--- /dev/null
+++ b/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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
new file mode 100644
index 000000000..fbce4bfdb
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Any.php
@@ -0,0 +1,30 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/any.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Any
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
new file mode 100644
index 000000000..75e0ec631
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
@@ -0,0 +1,48 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Api
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Google\Protobuf\SourceContext::initOnce();
+ \GPBMetadata\Google\Protobuf\Type::initOnce();
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
new file mode 100644
index 000000000..5d8023e4d
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Duration.php
@@ -0,0 +1,30 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/duration.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Duration
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
new file mode 100644
index 000000000..f31bcc001
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/FieldMask.php
@@ -0,0 +1,29 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/field_mask.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class FieldMask
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 000000000..5e42536f2
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,29 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/empty.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class GPBEmpty
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 000000000..4247c0954
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,282 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace GPBMetadata\Google\Protobuf\Internal;
+
+class Descriptor
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
new file mode 100644
index 000000000..797732d9f
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/SourceContext.php
@@ -0,0 +1,29 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/source_context.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class SourceContext
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
new file mode 100644
index 000000000..888a81ade
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Struct.php
Binary files differ
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
new file mode 100644
index 000000000..09437271a
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Timestamp.php
@@ -0,0 +1,30 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/timestamp.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Timestamp
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
new file mode 100644
index 000000000..7d0bfbb53
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Type.php
Binary files differ
diff --git a/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
new file mode 100644
index 000000000..e7ea1a3b9
--- /dev/null
+++ b/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Wrappers.php
@@ -0,0 +1,49 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace GPBMetadata\Google\Protobuf;
+
+class Wrappers
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ $pool->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/vendor/google/protobuf/src/Google/Protobuf/Any.php b/vendor/google/protobuf/src/Google/Protobuf/Any.php
new file mode 100644
index 000000000..feea41aad
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Any.php
@@ -0,0 +1,257 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/any.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
+ * URL that describes the type of the serialized message.
+ * Protobuf library provides support to pack/unpack Any values in the form
+ * of utility functions or additional generated methods of the Any type.
+ * Example 1: Pack and unpack a message in C++.
+ * Foo foo = ...;
+ * Any any;
+ * any.PackFrom(foo);
+ * ...
+ * if (any.UnpackTo(&foo)) {
+ * ...
+ * }
+ * Example 2: Pack and unpack a message in Java.
+ * Foo foo = ...;
+ * Any any = Any.pack(foo);
+ * ...
+ * if (any.is(Foo.class)) {
+ * foo = any.unpack(Foo.class);
+ * }
+ * // or ...
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ * foo = any.unpack(Foo.getDefaultInstance());
+ * }
+ * Example 3: Pack and unpack a message in Python.
+ * foo = Foo(...)
+ * any = Any()
+ * any.Pack(foo)
+ * ...
+ * if any.Is(Foo.DESCRIPTOR):
+ * any.Unpack(foo)
+ * ...
+ * Example 4: Pack and unpack a message in Go
+ * foo := &pb.Foo{...}
+ * any, err := anypb.New(foo)
+ * if err != nil {
+ * ...
+ * }
+ * ...
+ * foo := &pb.Foo{}
+ * if err := any.UnmarshalTo(foo); err != nil {
+ * ...
+ * }
+ * The pack methods provided by protobuf library will by default use
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
+ * methods only use the fully qualified type name after the last '/'
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
+ * name "y.z".
+ * JSON
+ * The JSON representation of an `Any` value uses the regular
+ * representation of the deserialized, embedded message, with an
+ * additional field `&#64;type` which contains the type URL. Example:
+ * package google.profile;
+ * message Person {
+ * string first_name = 1;
+ * string last_name = 2;
+ * }
+ * {
+ * "&#64;type": "type.googleapis.com/google.profile.Person",
+ * "firstName": <string>,
+ * "lastName": <string>
+ * }
+ * 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 `&#64;type`
+ * field. Example (for message [google.protobuf.Duration][]):
+ * {
+ * "&#64;type": "type.googleapis.com/google.protobuf.Duration",
+ * "value": "1.212s"
+ * }
+ *
+ * Generated from protobuf message <code>google.protobuf.Any</code>
+ */
+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 <code>string type_url = 1;</code>
+ */
+ protected $type_url = '';
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field <code>bytes value = 2;</code>
+ */
+ 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 <code>string type_url = 1;</code>
+ * @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 <code>string type_url = 1;</code>
+ * @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 <code>bytes value = 2;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Must be a valid serialized protocol buffer of the above specified type.
+ *
+ * Generated from protobuf field <code>bytes value = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Api.php b/vendor/google/protobuf/src/Google/Protobuf/Api.php
new file mode 100644
index 000000000..3784263cb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Api.php
@@ -0,0 +1,360 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Api is a light-weight descriptor for an API Interface.
+ * Interfaces are also described as "protocol buffer services" in some contexts,
+ * such as by the "service" keyword in a .proto file, but they are different
+ * from API Services, which represent a concrete implementation of an interface
+ * as opposed to simply a description of methods and bindings. They are also
+ * sometimes simply referred to as "APIs" in other contexts, such as the name of
+ * this message itself. See https://cloud.google.com/apis/design/glossary for
+ * detailed terminology.
+ *
+ * Generated from protobuf message <code>google.protobuf.Api</code>
+ */
+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 <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
+ */
+ private $methods;
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ 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<major-version>`, 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 <code>string version = 4;</code>
+ */
+ protected $version = '';
+ /**
+ * Source context for the protocol buffer service represented by this
+ * message.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
+ */
+ protected $source_context = null;
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ */
+ private $mixins;
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ */
+ 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<major-version>`, 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 <code>string name = 1;</code>
+ * @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 <code>string name = 1;</code>
+ * @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 <code>repeated .google.protobuf.Method methods = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethods()
+ {
+ return $this->methods;
+ }
+
+ /**
+ * The methods of this interface, in unspecified order.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
+ * @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 <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Any metadata attached to the interface.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @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<major-version>`, 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 <code>string version = 4;</code>
+ * @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<major-version>`, 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 <code>string version = 4;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @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 <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMixins()
+ {
+ return $this->mixins;
+ }
+
+ /**
+ * Included interfaces. See [Mixin][].
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
+ * @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 <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax of the service.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php b/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
new file mode 100644
index 000000000..ecdbf4dcc
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/BoolValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `bool`.
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
+ *
+ * Generated from protobuf message <code>google.protobuf.BoolValue</code>
+ */
+class BoolValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field <code>bool value = 1;</code>
+ */
+ 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 <code>bool value = 1;</code>
+ * @return bool
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bool value.
+ *
+ * Generated from protobuf field <code>bool value = 1;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php b/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
new file mode 100644
index 000000000..1582e14ac
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/BytesValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `bytes`.
+ * The JSON representation for `BytesValue` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.BytesValue</code>
+ */
+class BytesValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field <code>bytes value = 1;</code>
+ */
+ 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 <code>bytes value = 1;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The bytes value.
+ *
+ * Generated from protobuf field <code>bytes value = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
new file mode 100644
index 000000000..36436e2b7
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Descriptor.php
@@ -0,0 +1,108 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GetPublicDescriptorTrait;
+
+class Descriptor
+{
+ use GetPublicDescriptorTrait;
+
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php b/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
new file mode 100644
index 000000000..119f0e2e6
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/DescriptorPool.php
@@ -0,0 +1,76 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+class DescriptorPool
+{
+ private static $pool;
+
+ private $internal_pool;
+
+ /**
+ * @return DescriptorPool
+ */
+ public static function getGeneratedPool()
+ {
+ if (!isset(self::$pool)) {
+ self::$pool = new DescriptorPool(\Google\Protobuf\Internal\DescriptorPool::getGeneratedPool());
+ }
+ return self::$pool;
+ }
+
+ private function __construct($internal_pool)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php b/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
new file mode 100644
index 000000000..b72399f46
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/DoubleValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `double`.
+ * The JSON representation for `DoubleValue` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.DoubleValue</code>
+ */
+class DoubleValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field <code>double value = 1;</code>
+ */
+ 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 <code>double value = 1;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The double value.
+ *
+ * Generated from protobuf field <code>double value = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Duration.php b/vendor/google/protobuf/src/Google/Protobuf/Duration.php
new file mode 100644
index 000000000..531cd50b5
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Duration.php
@@ -0,0 +1,173 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/duration.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Duration represents a signed, fixed-length span of time represented
+ * as a count of seconds and fractions of seconds at nanosecond
+ * resolution. It is independent of any calendar and concepts like "day"
+ * or "month". It is related to Timestamp in that the difference between
+ * two Timestamp values is a Duration and it can be added or subtracted
+ * from a Timestamp. Range is approximately +-10,000 years.
+ * # Examples
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
+ * Timestamp start = ...;
+ * Timestamp end = ...;
+ * Duration duration = ...;
+ * duration.seconds = end.seconds - start.seconds;
+ * duration.nanos = end.nanos - start.nanos;
+ * if (duration.seconds < 0 && duration.nanos > 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 <code>google.protobuf.Duration</code>
+ */
+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 <code>int64 seconds = 1;</code>
+ */
+ 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 <code>int32 nanos = 2;</code>
+ */
+ 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 <code>int64 seconds = 1;</code>
+ * @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 <code>int64 seconds = 1;</code>
+ * @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 <code>int32 nanos = 2;</code>
+ * @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 <code>int32 nanos = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Enum.php b/vendor/google/protobuf/src/Google/Protobuf/Enum.php
new file mode 100644
index 000000000..185e54e03
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Enum.php
@@ -0,0 +1,213 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Enum type definition.
+ *
+ * Generated from protobuf message <code>google.protobuf.Enum</code>
+ */
+class Enum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ */
+ private $enumvalue;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ private $options;
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
+ */
+ protected $source_context = null;
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
+ */
+ 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 <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum type name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @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 <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumvalue()
+ {
+ return $this->enumvalue;
+ }
+
+ /**
+ * Enum value definitions.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
+ * @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 <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 4;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 4;</code>
+ * @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 <code>.google.protobuf.Syntax syntax = 5;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
new file mode 100644
index 000000000..a8b56c0d4
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumDescriptor.php
@@ -0,0 +1,79 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+class EnumDescriptor
+{
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php b/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
new file mode 100644
index 000000000..93c20f967
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
@@ -0,0 +1,135 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Enum value definition.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumValue</code>
+ */
+class EnumValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field <code>int32 number = 2;</code>
+ */
+ protected $number = 0;
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ */
+ 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 <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Enum value name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @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 <code>int32 number = 2;</code>
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * Enum value number.
+ *
+ * Generated from protobuf field <code>int32 number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
new file mode 100644
index 000000000..e76e19971
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/EnumValueDescriptor.php
@@ -0,0 +1,64 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+class EnumValueDescriptor
+{
+ private $name;
+ private $number;
+
+ /**
+ * @internal
+ */
+ public function __construct($name, $number)
+ {
+ $this->name = $name;
+ $this->number = $number;
+ }
+
+ /**
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field.php b/vendor/google/protobuf/src/Google/Protobuf/Field.php
new file mode 100644
index 000000000..ddae570c2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field.php
@@ -0,0 +1,381 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A single field of a message type.
+ *
+ * Generated from protobuf message <code>google.protobuf.Field</code>
+ */
+class Field extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
+ */
+ protected $kind = 0;
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ */
+ protected $cardinality = 0;
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field <code>int32 number = 3;</code>
+ */
+ protected $number = 0;
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ */
+ 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 <code>string type_url = 6;</code>
+ */
+ 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 <code>int32 oneof_index = 7;</code>
+ */
+ protected $oneof_index = 0;
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field <code>bool packed = 8;</code>
+ */
+ protected $packed = false;
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
+ */
+ private $options;
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field <code>string json_name = 10;</code>
+ */
+ protected $json_name = '';
+ /**
+ * The string value of the default value of this field. Proto2 syntax only.
+ *
+ * Generated from protobuf field <code>string default_value = 11;</code>
+ */
+ 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 <code>.google.protobuf.Field.Kind kind = 1;</code>
+ * @return int
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * The field type.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
+ * @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 <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ * @return int
+ */
+ public function getCardinality()
+ {
+ return $this->cardinality;
+ }
+
+ /**
+ * The field cardinality.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
+ * @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 <code>int32 number = 3;</code>
+ * @return int
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * The field number.
+ *
+ * Generated from protobuf field <code>int32 number = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The field name.
+ *
+ * Generated from protobuf field <code>string name = 4;</code>
+ * @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 <code>string type_url = 6;</code>
+ * @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 <code>string type_url = 6;</code>
+ * @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 <code>int32 oneof_index = 7;</code>
+ * @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 <code>int32 oneof_index = 7;</code>
+ * @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 <code>bool packed = 8;</code>
+ * @return bool
+ */
+ public function getPacked()
+ {
+ return $this->packed;
+ }
+
+ /**
+ * Whether to use alternative packed wire representation.
+ *
+ * Generated from protobuf field <code>bool packed = 8;</code>
+ * @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 <code>repeated .google.protobuf.Option options = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
+ * @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 <code>string json_name = 10;</code>
+ * @return string
+ */
+ public function getJsonName()
+ {
+ return $this->json_name;
+ }
+
+ /**
+ * The field JSON name.
+ *
+ * Generated from protobuf field <code>string json_name = 10;</code>
+ * @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 <code>string default_value = 11;</code>
+ * @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 <code>string default_value = 11;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDefaultValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->default_value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php b/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
new file mode 100644
index 000000000..a42219957
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field/Cardinality.php
@@ -0,0 +1,71 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf\Field;
+
+use UnexpectedValueException;
+
+/**
+ * Whether a field is optional, required, or repeated.
+ *
+ * Protobuf type <code>google.protobuf.Field.Cardinality</code>
+ */
+class Cardinality
+{
+ /**
+ * For fields with unknown cardinality.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_UNKNOWN = 0;</code>
+ */
+ const CARDINALITY_UNKNOWN = 0;
+ /**
+ * For optional fields.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_OPTIONAL = 1;</code>
+ */
+ const CARDINALITY_OPTIONAL = 1;
+ /**
+ * For required fields. Proto2 syntax only.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_REQUIRED = 2;</code>
+ */
+ const CARDINALITY_REQUIRED = 2;
+ /**
+ * For repeated fields.
+ *
+ * Generated from protobuf enum <code>CARDINALITY_REPEATED = 3;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php b/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
new file mode 100644
index 000000000..2d8dd77c1
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field/Kind.php
@@ -0,0 +1,176 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf\Field;
+
+use UnexpectedValueException;
+
+/**
+ * Basic field types.
+ *
+ * Protobuf type <code>google.protobuf.Field.Kind</code>
+ */
+class Kind
+{
+ /**
+ * Field type unknown.
+ *
+ * Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
+ */
+ const TYPE_UNKNOWN = 0;
+ /**
+ * Field type double.
+ *
+ * Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * Field type float.
+ *
+ * Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * Field type int64.
+ *
+ * Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * Field type uint64.
+ *
+ * Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * Field type int32.
+ *
+ * Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * Field type fixed64.
+ *
+ * Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * Field type fixed32.
+ *
+ * Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * Field type bool.
+ *
+ * Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * Field type string.
+ *
+ * Generated from protobuf enum <code>TYPE_STRING = 9;</code>
+ */
+ const TYPE_STRING = 9;
+ /**
+ * Field type group. Proto2 syntax only, and deprecated.
+ *
+ * Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * Field type message.
+ *
+ * Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * Field type bytes.
+ *
+ * Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * Field type uint32.
+ *
+ * Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * Field type enum.
+ *
+ * Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * Field type sfixed32.
+ *
+ * Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * Field type sfixed64.
+ *
+ * Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * Field type sint32.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * Field type sint64.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
new file mode 100644
index 000000000..ac919a24a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FieldDescriptor.php
@@ -0,0 +1,144 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GetPublicDescriptorTrait;
+use Google\Protobuf\Internal\GPBType;
+
+class FieldDescriptor
+{
+ use GetPublicDescriptorTrait;
+
+ /** @var \Google\Protobuf\Internal\FieldDescriptor $internal_desc */
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php b/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
new file mode 100644
index 000000000..a8e5243f8
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FieldMask.php
@@ -0,0 +1,217 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/field_mask.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `FieldMask` represents a set of symbolic field paths, for example:
+ * paths: "f.a"
+ * paths: "f.b.d"
+ * Here `f` represents a field in some root message, `a` and `b`
+ * fields in the message found in `f`, and `d` a field found in the
+ * message in `f.b`.
+ * Field masks are used to specify a subset of fields that should be
+ * returned by a get operation or modified by an update operation.
+ * Field masks also have a custom JSON encoding (see below).
+ * # Field Masks in Projections
+ * When used in the context of a projection, a response message or
+ * sub-message is filtered by the API to only contain those fields as
+ * specified in the mask. For example, if the mask in the previous
+ * example is applied to a response message as follows:
+ * f {
+ * a : 22
+ * b {
+ * d : 1
+ * x : 2
+ * }
+ * y : 13
+ * }
+ * z: 8
+ * The result will not contain specific values for fields x,y and z
+ * (their value will be set to the default, and omitted in proto text
+ * output):
+ * f {
+ * a : 22
+ * b {
+ * d : 1
+ * }
+ * }
+ * A repeated field is not allowed except at the last position of a
+ * paths string.
+ * If a FieldMask object is not present in a get operation, the
+ * operation applies to all fields (as if a FieldMask of all fields
+ * had been specified).
+ * Note that a field mask does not necessarily apply to the
+ * top-level response message. In case of a REST get operation, the
+ * field mask applies directly to the response, but in case of a REST
+ * list operation, the mask instead applies to each individual message
+ * in the returned resource list. In case of a REST custom method,
+ * other definitions may be used. Where the mask applies will be
+ * clearly documented together with its declaration in the API. In
+ * any case, the effect on the returned resource/resources is required
+ * behavior for APIs.
+ * # Field Masks in Update Operations
+ * A field mask in update operations specifies which fields of the
+ * targeted resource are going to be updated. The API is required
+ * to only change the values of the fields as specified in the mask
+ * and leave the others untouched. If a resource is passed in to
+ * describe the updated values, the API ignores the values of all
+ * fields not covered by the mask.
+ * If a repeated field is specified for an update operation, new values will
+ * be appended to the existing repeated field in the target resource. Note that
+ * a repeated field is only allowed in the last position of a `paths` string.
+ * If a sub-message is specified in the last position of the field mask for an
+ * update operation, then new value will be merged into the existing sub-message
+ * in the target resource.
+ * For example, given the target message:
+ * f {
+ * b {
+ * d: 1
+ * x: 2
+ * }
+ * c: [1]
+ * }
+ * And an update message:
+ * f {
+ * b {
+ * d: 10
+ * }
+ * c: [2]
+ * }
+ * then if the field mask is:
+ * paths: ["f.b", "f.c"]
+ * then the result will be:
+ * f {
+ * b {
+ * d: 10
+ * x: 2
+ * }
+ * c: [1, 2]
+ * }
+ * An implementation may provide options to override this default behavior for
+ * repeated and message fields.
+ * In order to reset a field's value to the default, the field must
+ * be in the mask and set to the default value in the provided resource.
+ * Hence, in order to reset all fields of a resource, provide a default
+ * instance of the resource and set all fields in the mask, or do
+ * not provide a mask as described below.
+ * If a field mask is not present on update, the operation applies to
+ * all fields (as if a field mask of all fields has been specified).
+ * Note that in the presence of schema evolution, this may mean that
+ * fields the client does not know and has therefore not filled into
+ * the request will be reset to their default. If this is unwanted
+ * behavior, a specific service may require a client to always specify
+ * a field mask, producing an error if not.
+ * As with get operations, the location of the resource which
+ * describes the updated values in the request message depends on the
+ * operation kind. In any case, the effect of the field mask is
+ * required to be honored by the API.
+ * ## Considerations for HTTP REST
+ * The HTTP kind of an update operation which uses a field mask must
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ * (PUT must only be used for full updates).
+ * # JSON Encoding of Field Masks
+ * In JSON, a field mask is encoded as a single string where paths are
+ * separated by a comma. Fields name in each path are converted
+ * to/from lower-camel naming conventions.
+ * As an example, consider the following message declarations:
+ * message Profile {
+ * User user = 1;
+ * Photo photo = 2;
+ * }
+ * message User {
+ * string display_name = 1;
+ * string address = 2;
+ * }
+ * In proto a field mask for `Profile` may look as such:
+ * mask {
+ * paths: "user.display_name"
+ * paths: "photo"
+ * }
+ * In JSON, the same mask is represented as below:
+ * {
+ * mask: "user.displayName,photo"
+ * }
+ * # Field Masks and Oneof Fields
+ * Field masks treat fields in oneofs just as regular fields. Consider the
+ * following message:
+ * message SampleMessage {
+ * oneof test_oneof {
+ * string name = 4;
+ * SubMessage sub_message = 9;
+ * }
+ * }
+ * The field mask can be:
+ * mask {
+ * paths: "name"
+ * }
+ * Or:
+ * mask {
+ * paths: "sub_message"
+ * }
+ * Note that oneof type names ("test_oneof" in this case) cannot be used in
+ * paths.
+ * ## Field Mask Verification
+ * The implementation of any API method which has a FieldMask type field in the
+ * request should verify the included field paths, and return an
+ * `INVALID_ARGUMENT` error if any path is unmappable.
+ *
+ * Generated from protobuf message <code>google.protobuf.FieldMask</code>
+ */
+class FieldMask extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field <code>repeated string paths = 1;</code>
+ */
+ private $paths;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<string>|\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 <code>repeated string paths = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * The set of field mask paths.
+ *
+ * Generated from protobuf field <code>repeated string paths = 1;</code>
+ * @param array<string>|\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/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php b/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
new file mode 100644
index 000000000..dff8f8931
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field_Cardinality.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Field\Cardinality instead.
+ * @deprecated
+ */
+ class Field_Cardinality {}
+}
+class_exists(Field\Cardinality::class);
+@trigger_error('Google\Protobuf\Field_Cardinality is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Cardinality instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php b/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
new file mode 100644
index 000000000..aa2023704
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Field_Kind.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Field\Kind instead.
+ * @deprecated
+ */
+ class Field_Kind {}
+}
+class_exists(Field\Kind::class);
+@trigger_error('Google\Protobuf\Field_Kind is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Kind instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php b/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
new file mode 100644
index 000000000..4285358d5
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/FloatValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `float`.
+ * The JSON representation for `FloatValue` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.FloatValue</code>
+ */
+class FloatValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field <code>float value = 1;</code>
+ */
+ 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 <code>float value = 1;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The float value.
+ *
+ * Generated from protobuf field <code>float value = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkFloat($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php b/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
new file mode 100644
index 000000000..4db69238b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/GPBEmpty.php
@@ -0,0 +1,38 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/empty.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A generic empty message that you can re-use to avoid defining duplicated
+ * empty messages in your APIs. A typical example is to use it as the request
+ * or the response type of an API method. For instance:
+ * service Foo {
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ * }
+ *
+ * Generated from protobuf message <code>google.protobuf.Empty</code>
+ */
+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/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php b/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
new file mode 100644
index 000000000..cfd73cdc9
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Int32Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `int32`.
+ * The JSON representation for `Int32Value` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.Int32Value</code>
+ */
+class Int32Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field <code>int32 value = 1;</code>
+ */
+ 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 <code>int32 value = 1;</code>
+ * @return int
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int32 value.
+ *
+ * Generated from protobuf field <code>int32 value = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php b/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
new file mode 100644
index 000000000..143474fcd
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Int64Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `int64`.
+ * The JSON representation for `Int64Value` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.Int64Value</code>
+ */
+class Int64Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field <code>int64 value = 1;</code>
+ */
+ 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 <code>int64 value = 1;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The int64 value.
+ *
+ * Generated from protobuf field <code>int64 value = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
new file mode 100644
index 000000000..5e9ab5705
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/AnyBase.php
@@ -0,0 +1,86 @@
+<?php
+
+namespace Google\Protobuf\Internal;
+
+/**
+ * Base class for Google\Protobuf\Any, this contains hand-written convenience
+ * methods like pack() and unpack().
+ */
+class AnyBase extends \Google\Protobuf\Internal\Message
+{
+ const TYPE_URL_PREFIX = 'type.googleapis.com/';
+
+ /**
+ * This method will try to resolve the type_url in Any message to get the
+ * targeted message type. If failed, an error will be thrown. Otherwise,
+ * the method will create a message of the targeted type and fill it with
+ * the decoded value in Any.
+ * @return Message unpacked message
+ * @throws \Exception Type url needs to be type.googleapis.com/fully-qualified.
+ * @throws \Exception Class hasn't been added to descriptor pool.
+ * @throws \Exception cannot decode data in value field.
+ */
+ public function unpack()
+ {
+ // Get fully qualified name from type url.
+ $url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
+ if (substr($this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
new file mode 100644
index 000000000..a33fec2f6
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedInputStream.php
@@ -0,0 +1,381 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\Uint64;
+
+class CodedInputStream
+{
+
+ private $buffer;
+ private $buffer_size_after_limit;
+ private $buffer_end;
+ private $current;
+ private $current_limit;
+ private $legitimate_message_end;
+ private $recursion_budget;
+ private $recursion_limit;
+ private $total_bytes_limit;
+ private $total_bytes_read;
+
+ const MAX_VARINT_BYTES = 10;
+ const DEFAULT_RECURSION_LIMIT = 100;
+ const DEFAULT_TOTAL_BYTES_LIMIT = 33554432; // 32 << 20, 32MB
+
+ public function __construct($buffer)
+ {
+ $start = 0;
+ $end = strlen($buffer);
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
new file mode 100644
index 000000000..f75e9c662
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/CodedOutputStream.php
@@ -0,0 +1,159 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class CodedOutputStream
+{
+
+ private $buffer;
+ private $buffer_size;
+ private $current;
+
+ const MAX_VARINT64_BYTES = 10;
+
+ public function __construct($size)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
new file mode 100644
index 000000000..51a34d6bc
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php
@@ -0,0 +1,236 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class Descriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $full_name;
+ private $field = [];
+ private $json_to_field = [];
+ private $name_to_field = [];
+ private $index_to_field = [];
+ private $nested_type = [];
+ private $enum_type = [];
+ private $klass;
+ private $legacy_klass;
+ private $previous_klass;
+ private $options;
+ private $oneof_decl = [];
+
+ public function __construct()
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
new file mode 100644
index 000000000..1be00e2ff
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php
@@ -0,0 +1,194 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\Descriptor;
+use Google\Protobuf\Internal\FileDescriptor;
+use Google\Protobuf\Internal\FileDescriptorSet;
+use Google\Protobuf\Internal\MessageBuilderContext;
+use Google\Protobuf\Internal\EnumBuilderContext;
+
+class DescriptorPool
+{
+ private static $pool;
+ // Map from message names to sub-maps, which are maps from field numbers to
+ // field descriptors.
+ private $class_to_desc = [];
+ private $class_to_enum_desc = [];
+ private $proto_to_class = [];
+
+ public static function getGeneratedPool()
+ {
+ if (!isset(self::$pool)) {
+ self::$pool = new DescriptorPool();
+ }
+ return self::$pool;
+ }
+
+ public function internalAddGeneratedFile($data, $use_nested = false)
+ {
+ $files = new FileDescriptorSet();
+ $files->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/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
new file mode 100644
index 000000000..2937c5a7c
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto.php
@@ -0,0 +1,336 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a message type.
+ *
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
+ */
+class DescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ */
+ private $field;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ */
+ private $extension;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ */
+ private $nested_type;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ */
+ private $enum_type;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ */
+ private $extension_range;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ */
+ private $oneof_decl;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ */
+ protected $options = null;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ */
+ 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 <code>repeated string reserved_name = 10;</code>
+ */
+ 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<string>|\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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
+ * @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 <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
+ * @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 <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getNestedType()
+ {
+ return $this->nested_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
+ * @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 <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
+ * @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 <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtensionRange()
+ {
+ return $this->extension_range;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
+ * @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 <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOneofDecl()
+ {
+ return $this->oneof_decl;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
+ * @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 <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ * @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 <code>optional .google.protobuf.MessageOptions options = 7;</code>
+ * @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 <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getReservedRange()
+ {
+ return $this->reserved_range;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
+ * @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 <code>repeated string reserved_name = 10;</code>
+ * @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 <code>repeated string reserved_name = 10;</code>
+ * @param array<string>|\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/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
new file mode 100644
index 000000000..43c33c4a9
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
@@ -0,0 +1,161 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\DescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
+ */
+class ExtensionRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = null;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ protected $end = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ */
+ 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 <code>optional int32 start = 1;</code>
+ * @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 <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @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 <code>optional int32 end = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @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 <code>optional .google.protobuf.ExtensionRangeOptions options = 3;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
new file mode 100644
index 000000000..f099cc345
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
@@ -0,0 +1,128 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\DescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Range of reserved tag numbers. Reserved tag numbers may not be used by
+ * fields or extension ranges in the same message. Reserved ranges may
+ * not overlap.
+ *
+ * Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
+ */
+class ReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = null;
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ 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 <code>optional int32 start = 1;</code>
+ * @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 <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Exclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @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 <code>optional int32 end = 2;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
new file mode 100644
index 000000000..c928fbe5b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ExtensionRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead.
+ * @deprecated
+ */
+ class DescriptorProto_ExtensionRange {}
+}
+class_exists(DescriptorProto\ExtensionRange::class);
+@trigger_error('Google\Protobuf\Internal\DescriptorProto_ExtensionRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
new file mode 100644
index 000000000..e49e945f9
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorProto_ReservedRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\DescriptorProto\ReservedRange instead.
+ * @deprecated
+ */
+ class DescriptorProto_ReservedRange {}
+}
+class_exists(DescriptorProto\ReservedRange::class);
+@trigger_error('Google\Protobuf\Internal\DescriptorProto_ReservedRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\DescriptorProto\ReservedRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
new file mode 100644
index 000000000..08397284e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumBuilderContext.php
@@ -0,0 +1,63 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\EnumDescriptor;
+use Google\Protobuf\EnumValueDescriptor;
+
+class EnumBuilderContext
+{
+
+ private $descriptor;
+ private $pool;
+
+ public function __construct($full_name, $klass, $pool)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
new file mode 100644
index 000000000..383f53b13
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptor.php
@@ -0,0 +1,116 @@
+<?php
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\EnumValueDescriptor;
+
+class EnumDescriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $klass;
+ private $legacy_klass;
+ private $full_name;
+ private $value;
+ private $name_to_value;
+ private $value_descriptor = [];
+
+ public function __construct()
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
new file mode 100644
index 000000000..cb2a42ae3
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php
@@ -0,0 +1,216 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes an enum type.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
+ */
+class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ */
+ private $value;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ */
+ 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 <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ */
+ private $reserved_range;
+ /**
+ * Reserved enum value names, which may not be reused. A given name may only
+ * be reserved once.
+ *
+ * Generated from protobuf field <code>repeated string reserved_name = 5;</code>
+ */
+ 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<string>|\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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
+ * @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 <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ * @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 <code>optional .google.protobuf.EnumOptions options = 3;</code>
+ * @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 <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ * @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 <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
+ * @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 <code>repeated string reserved_name = 5;</code>
+ * @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 <code>repeated string reserved_name = 5;</code>
+ * @param array<string>|\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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
new file mode 100644
index 000000000..7282fccb0
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
@@ -0,0 +1,130 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\EnumDescriptorProto;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Range of reserved numeric values. Reserved values may not be used by
+ * entries in the same enum. Reserved ranges may not overlap.
+ * Note that this is distinct from DescriptorProto.ReservedRange in that it
+ * is inclusive such that it can appropriately represent the entire int32
+ * domain.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
+ */
+class EnumReservedRange extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 start = 1;</code>
+ */
+ protected $start = null;
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ */
+ 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 <code>optional int32 start = 1;</code>
+ * @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 <code>optional int32 start = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setStart($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->start = $var;
+
+ return $this;
+ }
+
+ /**
+ * Inclusive.
+ *
+ * Generated from protobuf field <code>optional int32 end = 2;</code>
+ * @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 <code>optional int32 end = 2;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
new file mode 100644
index 000000000..b1b59ed91
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto_EnumReservedRange.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange instead.
+ * @deprecated
+ */
+ class EnumDescriptorProto_EnumReservedRange {}
+}
+class_exists(EnumDescriptorProto\EnumReservedRange::class);
+@trigger_error('Google\Protobuf\Internal\EnumDescriptorProto_EnumReservedRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
new file mode 100644
index 000000000..6146a6a3b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumOptions.php
@@ -0,0 +1,242 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.EnumOptions</code>
+ */
+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 <code>optional bool allow_alias = 2;</code>
+ */
+ 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 <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ 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(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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(b/261750190) 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 <code>optional bool allow_alias = 2;</code>
+ * @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 <code>optional bool allow_alias = 2;</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
+ * @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(b/261750190) Remove this legacy behavior once downstream teams have
+ * had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
new file mode 100644
index 000000000..0feaea6f1
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
@@ -0,0 +1,146 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a value within an enum.
+ *
+ * Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
+ */
+class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>optional int32 number = 2;</code>
+ */
+ protected $number = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ */
+ 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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional int32 number = 2;</code>
+ * @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 <code>optional int32 number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ * @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 <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
new file mode 100644
index 000000000..2db7fceea
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -0,0 +1,123 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
+ */
+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 <code>optional bool deprecated = 1 [default = false];</code>
+ */
+ protected $deprecated = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>optional bool deprecated = 1 [default = false];</code>
+ * @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 <code>optional bool deprecated = 1 [default = false];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
new file mode 100644
index 000000000..245173c3d
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
+ */
+class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
new file mode 100644
index 000000000..3a9a73b72
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptor.php
@@ -0,0 +1,326 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class FieldDescriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $name;
+ private $json_name;
+ private $setter;
+ private $getter;
+ private $number;
+ private $label;
+ private $type;
+ private $message_type;
+ private $enum_type;
+ private $packed;
+ private $oneof_index = -1;
+ private $proto3_optional;
+
+ /** @var OneofDescriptor $containing_oneof */
+ private $containing_oneof;
+
+ public function __construct()
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
new file mode 100644
index 000000000..5e99bff17
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto.php
@@ -0,0 +1,611 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a field within a message.
+ *
+ * Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code>
+ */
+class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>optional int32 number = 3;</code>
+ */
+ protected $number = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ */
+ 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 <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ */
+ 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 <code>optional string type_name = 6;</code>
+ */
+ 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 <code>optional string extendee = 2;</code>
+ */
+ 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 <code>optional string default_value = 7;</code>
+ */
+ 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 <code>optional int32 oneof_index = 9;</code>
+ */
+ 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 <code>optional string json_name = 10;</code>
+ */
+ protected $json_name = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ */
+ 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 <code>optional bool proto3_optional = 17;</code>
+ */
+ 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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional int32 number = 3;</code>
+ * @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 <code>optional int32 number = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNumber($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->number = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ * @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 <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code>
+ * @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 <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ * @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 <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
+ * @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 <code>optional string type_name = 6;</code>
+ * @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 <code>optional string type_name = 6;</code>
+ * @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 <code>optional string extendee = 2;</code>
+ * @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 <code>optional string extendee = 2;</code>
+ * @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 <code>optional string default_value = 7;</code>
+ * @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 <code>optional string default_value = 7;</code>
+ * @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 <code>optional int32 oneof_index = 9;</code>
+ * @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 <code>optional int32 oneof_index = 9;</code>
+ * @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 <code>optional string json_name = 10;</code>
+ * @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 <code>optional string json_name = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setJsonName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->json_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ * @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 <code>optional .google.protobuf.FieldOptions options = 8;</code>
+ * @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 <code>optional bool proto3_optional = 17;</code>
+ * @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 <code>optional bool proto3_optional = 17;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setProto3Optional($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->proto3_optional = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
new file mode 100644
index 000000000..a54b228f1
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Label.php
@@ -0,0 +1,58 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\FieldDescriptorProto;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>google.protobuf.FieldDescriptorProto.Label</code>
+ */
+class Label
+{
+ /**
+ * 0 is reserved for errors
+ *
+ * Generated from protobuf enum <code>LABEL_OPTIONAL = 1;</code>
+ */
+ const LABEL_OPTIONAL = 1;
+ /**
+ * Generated from protobuf enum <code>LABEL_REQUIRED = 2;</code>
+ */
+ const LABEL_REQUIRED = 2;
+ /**
+ * Generated from protobuf enum <code>LABEL_REPEATED = 3;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
new file mode 100644
index 000000000..6072e9990
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto/Type.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\FieldDescriptorProto;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>google.protobuf.FieldDescriptorProto.Type</code>
+ */
+class Type
+{
+ /**
+ * 0 is reserved for errors.
+ * Order is weird for historical reasons.
+ *
+ * Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
+ */
+ const TYPE_DOUBLE = 1;
+ /**
+ * Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
+ */
+ const TYPE_FLOAT = 2;
+ /**
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ * negative values are likely.
+ *
+ * Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
+ */
+ const TYPE_INT64 = 3;
+ /**
+ * Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
+ */
+ const TYPE_UINT64 = 4;
+ /**
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ * negative values are likely.
+ *
+ * Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
+ */
+ const TYPE_INT32 = 5;
+ /**
+ * Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
+ */
+ const TYPE_FIXED64 = 6;
+ /**
+ * Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
+ */
+ const TYPE_FIXED32 = 7;
+ /**
+ * Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
+ */
+ const TYPE_BOOL = 8;
+ /**
+ * Generated from protobuf enum <code>TYPE_STRING = 9;</code>
+ */
+ 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 <code>TYPE_GROUP = 10;</code>
+ */
+ const TYPE_GROUP = 10;
+ /**
+ * Length-delimited aggregate.
+ *
+ * Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
+ */
+ const TYPE_MESSAGE = 11;
+ /**
+ * New in version 2.
+ *
+ * Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
+ */
+ const TYPE_BYTES = 12;
+ /**
+ * Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
+ */
+ const TYPE_UINT32 = 13;
+ /**
+ * Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
+ */
+ const TYPE_ENUM = 14;
+ /**
+ * Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
+ */
+ const TYPE_SFIXED32 = 15;
+ /**
+ * Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
+ */
+ const TYPE_SFIXED64 = 16;
+ /**
+ * Uses ZigZag encoding.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
+ */
+ const TYPE_SINT32 = 17;
+ /**
+ * Uses ZigZag encoding.
+ *
+ * Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
new file mode 100644
index 000000000..218a846e1
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Label.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\FieldDescriptorProto\Label instead.
+ * @deprecated
+ */
+ class FieldDescriptorProto_Label {}
+}
+class_exists(FieldDescriptorProto\Label::class);
+@trigger_error('Google\Protobuf\Internal\FieldDescriptorProto_Label is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldDescriptorProto\Label instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
new file mode 100644
index 000000000..fd8d449a5
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldDescriptorProto_Type.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\FieldDescriptorProto\Type instead.
+ * @deprecated
+ */
+ class FieldDescriptorProto_Type {}
+}
+class_exists(FieldDescriptorProto\Type::class);
+@trigger_error('Google\Protobuf\Internal\FieldDescriptorProto_Type is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldDescriptorProto\Type instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
new file mode 100644
index 000000000..ea32e7f2a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
@@ -0,0 +1,559 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.FieldOptions</code>
+ */
+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 <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ */
+ 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 <code>optional bool packed = 2;</code>
+ */
+ 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 <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ */
+ 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 <code>optional bool lazy = 5 [default = false];</code>
+ */
+ 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 <code>optional bool unverified_lazy = 15 [default = false];</code>
+ */
+ 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 <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ protected $deprecated = null;
+ /**
+ * For Google-internal migration only. Do not use.
+ *
+ * Generated from protobuf field <code>optional bool weak = 10 [default = false];</code>
+ */
+ protected $weak = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ * @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 <code>optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];</code>
+ * @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 <code>optional bool packed = 2;</code>
+ * @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 <code>optional bool packed = 2;</code>
+ * @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 <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ * @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 <code>optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];</code>
+ * @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 <code>optional bool lazy = 5 [default = false];</code>
+ * @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 <code>optional bool lazy = 5 [default = false];</code>
+ * @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 <code>optional bool unverified_lazy = 15 [default = false];</code>
+ * @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 <code>optional bool unverified_lazy = 15 [default = false];</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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 <code>optional bool weak = 10 [default = false];</code>
+ * @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 <code>optional bool weak = 10 [default = false];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
new file mode 100644
index 000000000..ba9eb4adb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/CType.php
@@ -0,0 +1,58 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\FieldOptions;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>google.protobuf.FieldOptions.CType</code>
+ */
+class CType
+{
+ /**
+ * Default mode.
+ *
+ * Generated from protobuf enum <code>STRING = 0;</code>
+ */
+ const STRING = 0;
+ /**
+ * Generated from protobuf enum <code>CORD = 1;</code>
+ */
+ const CORD = 1;
+ /**
+ * Generated from protobuf enum <code>STRING_PIECE = 2;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
new file mode 100644
index 000000000..175a4330b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions/JSType.php
@@ -0,0 +1,62 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\FieldOptions;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>google.protobuf.FieldOptions.JSType</code>
+ */
+class JSType
+{
+ /**
+ * Use the default type.
+ *
+ * Generated from protobuf enum <code>JS_NORMAL = 0;</code>
+ */
+ const JS_NORMAL = 0;
+ /**
+ * Use JavaScript strings.
+ *
+ * Generated from protobuf enum <code>JS_STRING = 1;</code>
+ */
+ const JS_STRING = 1;
+ /**
+ * Use JavaScript numbers.
+ *
+ * Generated from protobuf enum <code>JS_NUMBER = 2;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php
new file mode 100644
index 000000000..4d18783ee
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_CType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\FieldOptions\CType instead.
+ * @deprecated
+ */
+ class FieldOptions_CType {}
+}
+class_exists(FieldOptions\CType::class);
+@trigger_error('Google\Protobuf\Internal\FieldOptions_CType is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldOptions\CType instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_JSType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_JSType.php
new file mode 100644
index 000000000..9db078222
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions_JSType.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\FieldOptions\JSType instead.
+ * @deprecated
+ */
+ class FieldOptions_JSType {}
+}
+class_exists(FieldOptions\JSType::class);
+@trigger_error('Google\Protobuf\Internal\FieldOptions_JSType is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldOptions\JSType instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php
new file mode 100644
index 000000000..038da38cf
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php
@@ -0,0 +1,89 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class FileDescriptor
+{
+
+ private $package;
+ private $message_type = [];
+ private $enum_type = [];
+
+ public function setPackage($package)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
new file mode 100644
index 000000000..d4c7f6bb8
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorProto.php
@@ -0,0 +1,533 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a complete .proto file.
+ *
+ * Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
+ */
+class FileDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * file name, relative to root of source tree
+ *
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * e.g. "foo", "foo.bar", etc.
+ *
+ * Generated from protobuf field <code>optional string package = 2;</code>
+ */
+ protected $package = null;
+ /**
+ * Names of files imported by this file.
+ *
+ * Generated from protobuf field <code>repeated string dependency = 3;</code>
+ */
+ private $dependency;
+ /**
+ * Indexes of the public imported files in the dependency list above.
+ *
+ * Generated from protobuf field <code>repeated int32 public_dependency = 10;</code>
+ */
+ 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 <code>repeated int32 weak_dependency = 11;</code>
+ */
+ private $weak_dependency;
+ /**
+ * All top-level definitions in this file.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ */
+ private $message_type;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ */
+ private $enum_type;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ */
+ private $service;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ */
+ private $extension;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FileOptions options = 8;</code>
+ */
+ 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 <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ */
+ 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 <code>optional string syntax = 12;</code>
+ */
+ protected $syntax = null;
+ /**
+ * The edition of the proto file, which is an opaque string.
+ *
+ * Generated from protobuf field <code>optional string edition = 13;</code>
+ */
+ 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<string>|\Google\Protobuf\Internal\RepeatedField $dependency
+ * Names of files imported by this file.
+ * @type array<int>|\Google\Protobuf\Internal\RepeatedField $public_dependency
+ * Indexes of the public imported files in the dependency list above.
+ * @type array<int>|\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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @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 <code>optional string package = 2;</code>
+ * @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 <code>optional string package = 2;</code>
+ * @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 <code>repeated string dependency = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDependency()
+ {
+ return $this->dependency;
+ }
+
+ /**
+ * Names of files imported by this file.
+ *
+ * Generated from protobuf field <code>repeated string dependency = 3;</code>
+ * @param array<string>|\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 <code>repeated int32 public_dependency = 10;</code>
+ * @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 <code>repeated int32 public_dependency = 10;</code>
+ * @param array<int>|\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 <code>repeated int32 weak_dependency = 11;</code>
+ * @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 <code>repeated int32 weak_dependency = 11;</code>
+ * @param array<int>|\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 <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMessageType()
+ {
+ return $this->message_type;
+ }
+
+ /**
+ * All top-level definitions in this file.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto message_type = 4;</code>
+ * @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 <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnumType()
+ {
+ return $this->enum_type;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 5;</code>
+ * @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 <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getService()
+ {
+ return $this->service;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.ServiceDescriptorProto service = 6;</code>
+ * @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 <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExtension()
+ {
+ return $this->extension;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 7;</code>
+ * @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 <code>optional .google.protobuf.FileOptions options = 8;</code>
+ * @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 <code>optional .google.protobuf.FileOptions options = 8;</code>
+ * @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 <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ * @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 <code>optional .google.protobuf.SourceCodeInfo source_code_info = 9;</code>
+ * @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 <code>optional string syntax = 12;</code>
+ * @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 <code>optional string syntax = 12;</code>
+ * @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 <code>optional string edition = 13;</code>
+ * @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 <code>optional string edition = 13;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setEdition($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->edition = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
new file mode 100644
index 000000000..1dae6fb3e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptorSet.php
@@ -0,0 +1,63 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * The protocol compiler can output a FileDescriptorSet containing the .proto
+ * files it parses.
+ *
+ * Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
+ */
+class FileDescriptorSet extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ */
+ 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 <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
new file mode 100644
index 000000000..43931be80
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions.php
@@ -0,0 +1,1106 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.FileOptions</code>
+ */
+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 <code>optional string java_package = 1;</code>
+ */
+ 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 <code>optional string java_outer_classname = 8;</code>
+ */
+ 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 <code>optional bool java_multiple_files = 10 [default = false];</code>
+ */
+ protected $java_multiple_files = null;
+ /**
+ * This option does nothing.
+ *
+ * Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ * @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 <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ */
+ protected $java_string_check_utf8 = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ */
+ 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 <code>optional string go_package = 11;</code>
+ */
+ 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 <code>optional bool cc_generic_services = 16 [default = false];</code>
+ */
+ protected $cc_generic_services = null;
+ /**
+ * Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
+ */
+ protected $java_generic_services = null;
+ /**
+ * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
+ */
+ protected $py_generic_services = null;
+ /**
+ * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
+ */
+ 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 <code>optional bool deprecated = 23 [default = false];</code>
+ */
+ 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 <code>optional bool cc_enable_arenas = 31 [default = true];</code>
+ */
+ 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 <code>optional string objc_class_prefix = 36;</code>
+ */
+ protected $objc_class_prefix = null;
+ /**
+ * Namespace for generated classes; defaults to the package.
+ *
+ * Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
+ */
+ 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 <code>optional string swift_prefix = 39;</code>
+ */
+ 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 <code>optional string php_class_prefix = 40;</code>
+ */
+ 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 <code>optional string php_namespace = 41;</code>
+ */
+ 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 <code>optional string php_metadata_namespace = 44;</code>
+ */
+ 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 <code>optional string ruby_package = 45;</code>
+ */
+ 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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>optional string java_package = 1;</code>
+ * @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 <code>optional string java_package = 1;</code>
+ * @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 <code>optional string java_outer_classname = 8;</code>
+ * @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 <code>optional string java_outer_classname = 8;</code>
+ * @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 <code>optional bool java_multiple_files = 10 [default = false];</code>
+ * @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 <code>optional bool java_multiple_files = 10 [default = false];</code>
+ * @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 <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ * @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 <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
+ * @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 <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ * @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 <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setJavaStringCheckUtf8($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_string_check_utf8 = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ * @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 <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
+ * @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 <code>optional string go_package = 11;</code>
+ * @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 <code>optional string go_package = 11;</code>
+ * @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 <code>optional bool cc_generic_services = 16 [default = false];</code>
+ * @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 <code>optional bool cc_generic_services = 16 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setCcGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->cc_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
+ * @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 <code>optional bool java_generic_services = 17 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setJavaGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->java_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
+ * @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 <code>optional bool py_generic_services = 18 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setPyGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->py_generic_services = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
+ * @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 <code>optional bool php_generic_services = 42 [default = false];</code>
+ * @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 <code>optional bool deprecated = 23 [default = false];</code>
+ * @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 <code>optional bool deprecated = 23 [default = false];</code>
+ * @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 <code>optional bool cc_enable_arenas = 31 [default = true];</code>
+ * @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 <code>optional bool cc_enable_arenas = 31 [default = true];</code>
+ * @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 <code>optional string objc_class_prefix = 36;</code>
+ * @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 <code>optional string objc_class_prefix = 36;</code>
+ * @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 <code>optional string csharp_namespace = 37;</code>
+ * @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 <code>optional string csharp_namespace = 37;</code>
+ * @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 <code>optional string swift_prefix = 39;</code>
+ * @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 <code>optional string swift_prefix = 39;</code>
+ * @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 <code>optional string php_class_prefix = 40;</code>
+ * @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 <code>optional string php_class_prefix = 40;</code>
+ * @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 <code>optional string php_namespace = 41;</code>
+ * @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 <code>optional string php_namespace = 41;</code>
+ * @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 <code>optional string php_metadata_namespace = 44;</code>
+ * @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 <code>optional string php_metadata_namespace = 44;</code>
+ * @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 <code>optional string ruby_package = 45;</code>
+ * @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 <code>optional string ruby_package = 45;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
new file mode 100644
index 000000000..0df27b533
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions/OptimizeMode.php
@@ -0,0 +1,64 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\FileOptions;
+
+use UnexpectedValueException;
+
+/**
+ * Generated classes can be optimized for speed or code size.
+ *
+ * Protobuf type <code>google.protobuf.FileOptions.OptimizeMode</code>
+ */
+class OptimizeMode
+{
+ /**
+ * Generate complete code for parsing, serialization,
+ *
+ * Generated from protobuf enum <code>SPEED = 1;</code>
+ */
+ const SPEED = 1;
+ /**
+ * etc.
+ *
+ * Generated from protobuf enum <code>CODE_SIZE = 2;</code>
+ */
+ const CODE_SIZE = 2;
+ /**
+ * Generate code using MessageLite and the lite runtime.
+ *
+ * Generated from protobuf enum <code>LITE_RUNTIME = 3;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
new file mode 100644
index 000000000..8926e63ba
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/FileOptions_OptimizeMode.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\FileOptions\OptimizeMode instead.
+ * @deprecated
+ */
+ class FileOptions_OptimizeMode {}
+}
+class_exists(FileOptions\OptimizeMode::class);
+@trigger_error('Google\Protobuf\Internal\FileOptions_OptimizeMode is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FileOptions\OptimizeMode instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
new file mode 100644
index 000000000..402d542f3
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
@@ -0,0 +1,47 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBDecodeException extends \Exception
+{
+ public function __construct(
+ $message,
+ $code = 0,
+ \Exception $previous = null)
+ {
+ parent::__construct(
+ "Error occurred during parsing: " . $message,
+ $code,
+ $previous);
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php
new file mode 100644
index 000000000..43f4745dd
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php
@@ -0,0 +1,304 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBJsonWire
+{
+
+ public static function serializeFieldToStream(
+ $value,
+ $field,
+ &$output, $has_field_name = true)
+ {
+ if ($has_field_name) {
+ $output->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/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
new file mode 100644
index 000000000..0fb238415
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBLabel.php
@@ -0,0 +1,40 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBLabel
+{
+ const OPTIONAL = 1;
+ const REQUIRED = 2;
+ const REPEATED = 3;
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php
new file mode 100644
index 000000000..fa849ceb0
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBType.php
@@ -0,0 +1,55 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBType
+{
+ const DOUBLE = 1;
+ const FLOAT = 2;
+ const INT64 = 3;
+ const UINT64 = 4;
+ const INT32 = 5;
+ const FIXED64 = 6;
+ const FIXED32 = 7;
+ const BOOL = 8;
+ const STRING = 9;
+ const GROUP = 10;
+ const MESSAGE = 11;
+ const BYTES = 12;
+ const UINT32 = 13;
+ const ENUM = 14;
+ const SFIXED32 = 15;
+ const SFIXED64 = 16;
+ const SINT32 = 17;
+ const SINT64 = 18;
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php
new file mode 100644
index 000000000..ffea90083
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBUtil.php
@@ -0,0 +1,663 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Duration;
+use Google\Protobuf\FieldMask;
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\MapField;
+use function bccomp;
+
+function camel2underscore($input) {
+ preg_match_all(
+ '!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!',
+ $input,
+ $matches);
+ $ret = $matches[0];
+ foreach ($ret as &$match) {
+ $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
+ }
+ return implode('_', $ret);
+}
+
+class GPBUtil
+{
+ const NANOS_PER_MILLISECOND = 1000000;
+ const NANOS_PER_MICROSECOND = 1000;
+ const TYPE_URL_PREFIX = 'type.googleapis.com/';
+
+ public static function divideInt64ToInt32($value, &$high, &$low, $trim = false)
+ {
+ $isNeg = (bccomp($value, 0) < 0);
+ if ($isNeg) {
+ $value = bcsub(0, $value);
+ }
+
+ $high = bcdiv($value, 4294967296);
+ $low = bcmod($value, 4294967296);
+ if (bccomp($high, 2147483647) > 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/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
new file mode 100644
index 000000000..034f5df92
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWire.php
@@ -0,0 +1,622 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBWire
+{
+
+ const TAG_TYPE_BITS = 3;
+
+ const WIRETYPE_VARINT = 0;
+ const WIRETYPE_FIXED64 = 1;
+ const WIRETYPE_LENGTH_DELIMITED = 2;
+ const WIRETYPE_START_GROUP = 3;
+ const WIRETYPE_END_GROUP = 4;
+ const WIRETYPE_FIXED32 = 5;
+
+ const UNKNOWN = 0;
+ const NORMAL_FORMAT = 1;
+ const PACKED_FORMAT = 2;
+
+ public static function getTagFieldNumber($tag)
+ {
+ // We have to mask because PHP has no arithmetic shift.
+ return ($tag >> 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('f', $data)[1];
+ return true;
+ }
+
+ public static function readDouble(&$input, &$value)
+ {
+ $data = null;
+ if (!$input->readRaw(8, $data)) {
+ return false;
+ }
+ $value = unpack('d', $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("f", $value);
+ return $output->writeRaw($data, 4);
+ }
+
+ public static function writeDouble(&$output, $value)
+ {
+ $data = pack("d", $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/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
new file mode 100644
index 000000000..c1ad370e0
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBWireType.php
@@ -0,0 +1,43 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class GPBWireType
+{
+ const VARINT = 0;
+ const FIXED64 = 1;
+ const LENGTH_DELIMITED = 2;
+ const START_GROUP = 3;
+ const END_GROUP = 4;
+ const FIXED32 = 5;
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
new file mode 100644
index 000000000..a1db269bf
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
@@ -0,0 +1,75 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes the relationship between generated code and its original source
+ * file. A GeneratedCodeInfo message is associated with only one generated
+ * source file, but may contain references to different source .proto files.
+ *
+ * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
+ */
+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 <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ */
+ 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 <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ * @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 <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
new file mode 100644
index 000000000..b1ef4ee95
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
@@ -0,0 +1,255 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\GeneratedCodeInfo;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
+ */
+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 <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ private $path;
+ /**
+ * Identifies the filesystem path to the original source .proto.
+ *
+ * Generated from protobuf field <code>optional string source_file = 2;</code>
+ */
+ protected $source_file = null;
+ /**
+ * Identifies the starting offset in bytes in the generated code
+ * that relates to the identified object.
+ *
+ * Generated from protobuf field <code>optional int32 begin = 3;</code>
+ */
+ 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 <code>optional int32 end = 4;</code>
+ */
+ protected $end = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
+ */
+ protected $semantic = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<int>|\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 <code>repeated int32 path = 1 [packed = true];</code>
+ * @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 <code>repeated int32 path = 1 [packed = true];</code>
+ * @param array<int>|\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 <code>optional string source_file = 2;</code>
+ * @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 <code>optional string source_file = 2;</code>
+ * @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 <code>optional int32 begin = 3;</code>
+ * @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 <code>optional int32 begin = 3;</code>
+ * @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 <code>optional int32 end = 4;</code>
+ * @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 <code>optional int32 end = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setEnd($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->end = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
+ * @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 <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
new file mode 100644
index 000000000..e36f1e573
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo_Annotation.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\GeneratedCodeInfo\Annotation instead.
+ * @deprecated
+ */
+ class GeneratedCodeInfo_Annotation {}
+}
+class_exists(GeneratedCodeInfo\Annotation::class);
+@trigger_error('Google\Protobuf\Internal\GeneratedCodeInfo_Annotation is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\GeneratedCodeInfo\Annotation instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php
new file mode 100644
index 000000000..d22bc305b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/GetPublicDescriptorTrait.php
@@ -0,0 +1,41 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+trait GetPublicDescriptorTrait
+{
+ private function getPublicDescriptor($desc)
+ {
+ return is_null($desc) ? null : $desc->getPublicDescriptor();
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
new file mode 100644
index 000000000..ed5d1660b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/HasPublicDescriptorTrait.php
@@ -0,0 +1,43 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+trait HasPublicDescriptorTrait
+{
+ private $public_desc;
+
+ public function getPublicDescriptor()
+ {
+ return $this->public_desc;
+ }
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
new file mode 100644
index 000000000..e89481f0a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapEntry.php
@@ -0,0 +1,71 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\Message;
+
+class MapEntry extends Message
+{
+ public $key;
+ public $value;
+
+ public function __construct($desc) {
+ parent::__construct($desc);
+ // For MapEntry, getValue should always return a valid value. Thus, we
+ // need to create a default instance value if the value type is
+ // message, in case no value is provided in data.
+ $value_field = $desc->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/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
new file mode 100644
index 000000000..d413c6d90
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapField.php
@@ -0,0 +1,298 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+/**
+ * MapField and MapFieldIter are used by generated protocol message classes to
+ * manipulate map fields.
+ */
+
+namespace Google\Protobuf\Internal;
+
+use Traversable;
+
+/**
+ * MapField is used by generated protocol message classes to manipulate map
+ * fields. It can be used like native PHP array.
+ */
+class MapField implements \ArrayAccess, \IteratorAggregate, \Countable
+{
+ /**
+ * @ignore
+ */
+ private $container;
+ /**
+ * @ignore
+ */
+ private $key_type;
+ /**
+ * @ignore
+ */
+ private $value_type;
+ /**
+ * @ignore
+ */
+ private $klass;
+ /**
+ * @ignore
+ */
+ private $legacy_klass;
+
+ /**
+ * Constructs an instance of MapField.
+ *
+ * @param long $key_type Type of the stored key element.
+ * @param long $value_type Type of the stored value element.
+ * @param string $klass Message/Enum class name of value instance
+ * (message/enum fields only).
+ * @ignore
+ */
+ public function __construct($key_type, $value_type, $klass = null)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
new file mode 100644
index 000000000..a56d27e2e
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MapFieldIter.php
@@ -0,0 +1,146 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+/**
+ * MapField and MapFieldIter are used by generated protocol message classes to
+ * manipulate map fields.
+ */
+
+namespace Google\Protobuf\Internal;
+
+/**
+ * MapFieldIter is used to iterate MapField. It is also need for the foreach
+ * syntax.
+ */
+class MapFieldIter implements \Iterator
+{
+
+ /**
+ * @ignore
+ */
+ private $container;
+
+ /**
+ * @ignore
+ */
+ private $key_type;
+
+ /**
+ * Create iterator instance for MapField.
+ *
+ * @param array $container
+ * @param GPBType $key_type Map key type.
+ * @ignore
+ */
+ public function __construct($container, $key_type)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
new file mode 100644
index 000000000..357f16d69
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php
@@ -0,0 +1,2040 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+/**
+ * Defines Message, the parent class extended by all protocol message classes.
+ */
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\CodedInputStream;
+use Google\Protobuf\Internal\CodedOutputStream;
+use Google\Protobuf\Internal\DescriptorPool;
+use Google\Protobuf\Internal\GPBLabel;
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\MapEntry;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\ListValue;
+use Google\Protobuf\Value;
+use Google\Protobuf\Struct;
+use Google\Protobuf\NullValue;
+
+/**
+ * Parent class of all proto messages. Users should not instantiate this class
+ * or extend this class or its child classes by their own. See the comment of
+ * specific functions for more details.
+ */
+#[\AllowDynamicProperties]
+class Message
+{
+
+ /**
+ * @ignore
+ */
+ private $desc;
+ private $unknown = "";
+
+ /**
+ * @ignore
+ */
+ public function __construct($data = NULL)
+ {
+ // MapEntry message is shared by all types of map fields, whose
+ // descriptors are different from each other. Thus, we cannot find a
+ // specific descriptor from the descriptor pool.
+ if ($this instanceof MapEntry) {
+ $this->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(teboring): 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(teboring): 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(teboring): 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(teboring): 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/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php
new file mode 100644
index 000000000..2724d2673
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageBuilderContext.php
@@ -0,0 +1,120 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBLabel;
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\Descriptor;
+use Google\Protobuf\Internal\FieldDescriptor;
+
+class MessageBuilderContext
+{
+
+ private $descriptor;
+ private $pool;
+
+ public function __construct($full_name, $klass, $pool)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php
new file mode 100644
index 000000000..f09e8de16
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php
@@ -0,0 +1,466 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.MessageOptions</code>
+ */
+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 <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ */
+ 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 <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ */
+ 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 <code>optional bool deprecated = 3 [default = false];</code>
+ */
+ 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<KeyType, ValueType> 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 <code>optional bool map_entry = 7;</code>
+ */
+ 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(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code>
+ * @deprecated
+ */
+ protected $deprecated_legacy_json_field_conflicts = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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<KeyType, ValueType> 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(b/261750190) 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 <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ * @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 <code>optional bool message_set_wire_format = 1 [default = false];</code>
+ * @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 <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ * @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 <code>optional bool no_standard_descriptor_accessor = 2 [default = false];</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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 <code>optional bool deprecated = 3 [default = false];</code>
+ * @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<KeyType, ValueType> 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 <code>optional bool map_entry = 7;</code>
+ * @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<KeyType, ValueType> 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 <code>optional bool map_entry = 7;</code>
+ * @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(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code>
+ * @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(b/261750190) This is legacy behavior we plan to remove once downstream
+ * teams have had time to migrate.
+ *
+ * Generated from protobuf field <code>optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php
new file mode 100644
index 000000000..96efb02d2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodDescriptorProto.php
@@ -0,0 +1,282 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a method of a service.
+ *
+ * Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
+ */
+class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ 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 <code>optional string input_type = 2;</code>
+ */
+ protected $input_type = null;
+ /**
+ * Generated from protobuf field <code>optional string output_type = 3;</code>
+ */
+ protected $output_type = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ */
+ protected $options = null;
+ /**
+ * Identifies if client streams multiple client messages
+ *
+ * Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
+ */
+ protected $client_streaming = null;
+ /**
+ * Identifies if server streams multiple server messages
+ *
+ * Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
+ */
+ 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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @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 <code>optional string input_type = 2;</code>
+ * @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 <code>optional string input_type = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setInputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->input_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string output_type = 3;</code>
+ * @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 <code>optional string output_type = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setOutputType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->output_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ * @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 <code>optional .google.protobuf.MethodOptions options = 4;</code>
+ * @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 <code>optional bool client_streaming = 5 [default = false];</code>
+ * @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 <code>optional bool client_streaming = 5 [default = false];</code>
+ * @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 <code>optional bool server_streaming = 6 [default = false];</code>
+ * @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 <code>optional bool server_streaming = 6 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setServerStreaming($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->server_streaming = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php
new file mode 100644
index 000000000..87af45167
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions.php
@@ -0,0 +1,160 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.MethodOptions</code>
+ */
+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 <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ protected $deprecated = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ */
+ protected $idempotency_level = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>optional bool deprecated = 33 [default = false];</code>
+ * @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 <code>optional bool deprecated = 33 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setDeprecated($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->deprecated = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ * @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 <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php
new file mode 100644
index 000000000..ce3c062c6
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions/IdempotencyLevel.php
@@ -0,0 +1,64 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\MethodOptions;
+
+use UnexpectedValueException;
+
+/**
+ * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
+ * or neither? HTTP based RPC implementation may choose GET verb for safe
+ * methods, and PUT verb for idempotent methods instead of the default POST.
+ *
+ * Protobuf type <code>google.protobuf.MethodOptions.IdempotencyLevel</code>
+ */
+class IdempotencyLevel
+{
+ /**
+ * Generated from protobuf enum <code>IDEMPOTENCY_UNKNOWN = 0;</code>
+ */
+ const IDEMPOTENCY_UNKNOWN = 0;
+ /**
+ * implies idempotent
+ *
+ * Generated from protobuf enum <code>NO_SIDE_EFFECTS = 1;</code>
+ */
+ const NO_SIDE_EFFECTS = 1;
+ /**
+ * idempotent, but may have side effects
+ *
+ * Generated from protobuf enum <code>IDEMPOTENT = 2;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
new file mode 100644
index 000000000..a29131145
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/MethodOptions_IdempotencyLevel.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\MethodOptions\IdempotencyLevel instead.
+ * @deprecated
+ */
+ class MethodOptions_IdempotencyLevel {}
+}
+class_exists(MethodOptions\IdempotencyLevel::class);
+@trigger_error('Google\Protobuf\Internal\MethodOptions_IdempotencyLevel is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\MethodOptions\IdempotencyLevel instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptor.php
new file mode 100644
index 000000000..432368571
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptor.php
@@ -0,0 +1,87 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class OneofDescriptor
+{
+ use HasPublicDescriptorTrait;
+
+ private $name;
+ /** @var \Google\Protobuf\FieldDescriptor[] $fields */
+ private $fields;
+
+ public function __construct()
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php
new file mode 100644
index 000000000..3cb9f25c2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptorProto.php
@@ -0,0 +1,109 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a oneof.
+ *
+ * Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
+ */
+class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ */
+ 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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ * @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 <code>optional .google.protobuf.OneofOptions options = 2;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php
new file mode 100644
index 000000000..2c689e836
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofField.php
@@ -0,0 +1,77 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class OneofField
+{
+
+ private $desc;
+ private $field_name;
+ private $number = 0;
+ private $value;
+
+ public function __construct($desc)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php
new file mode 100644
index 000000000..b44d19457
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/OneofOptions.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.OneofOptions</code>
+ */
+class OneofOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php
new file mode 100644
index 000000000..4e7ed5cb4
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/RawInputStream.php
@@ -0,0 +1,50 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf\Internal;
+
+class RawInputStream
+{
+
+ private $buffer;
+
+ public function __construct($buffer)
+ {
+ $this->buffer = $buffer;
+ }
+
+ public function getData()
+ {
+ return $this->buffer;
+ }
+
+}
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
new file mode 100644
index 000000000..f6ecd1c84
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
@@ -0,0 +1,264 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+/**
+ * RepeatedField and RepeatedFieldIter are used by generated protocol message
+ * classes to manipulate repeated fields.
+ */
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBUtil;
+use Traversable;
+
+/**
+ * RepeatedField is used by generated protocol message classes to manipulate
+ * repeated fields. It can be used like native PHP array.
+ */
+class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
+{
+
+ /**
+ * @ignore
+ */
+ private $container;
+ /**
+ * @ignore
+ */
+ private $type;
+ /**
+ * @ignore
+ */
+ private $klass;
+ /**
+ * @ignore
+ */
+ private $legacy_klass;
+
+ /**
+ * Constructs an instance of RepeatedField.
+ *
+ * @param integer $type Type of the stored element.
+ * @param string $klass Message/Enum class name (message/enum fields only).
+ * @ignore
+ */
+ public function __construct($type, $klass = null)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php
new file mode 100644
index 000000000..2b541862a
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedFieldIter.php
@@ -0,0 +1,125 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+/**
+ * RepeatedField and RepeatedFieldIter are used by generated protocol message
+ * classes to manipulate repeated fields.
+ */
+
+namespace Google\Protobuf\Internal;
+
+/**
+ * RepeatedFieldIter is used to iterate RepeatedField. It is also need for the
+ * foreach syntax.
+ */
+class RepeatedFieldIter implements \Iterator
+{
+
+ /**
+ * @ignore
+ */
+ private $position;
+ /**
+ * @ignore
+ */
+ private $container;
+
+ /**
+ * Create iterator instance for RepeatedField.
+ *
+ * @param array $container
+ * @ignore
+ */
+ public function __construct($container)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
new file mode 100644
index 000000000..e322e2abf
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
@@ -0,0 +1,136 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Describes a service.
+ *
+ * Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code>
+ */
+class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>optional string name = 1;</code>
+ */
+ protected $name = null;
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ */
+ private $method;
+ /**
+ * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ */
+ 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 <code>optional string name = 1;</code>
+ * @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 <code>optional string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
+ * @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 <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ * @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 <code>optional .google.protobuf.ServiceOptions options = 3;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php
new file mode 100644
index 000000000..8ac27ee80
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/ServiceOptions.php
@@ -0,0 +1,123 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.ServiceOptions</code>
+ */
+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 <code>optional bool deprecated = 33 [default = false];</code>
+ */
+ protected $deprecated = null;
+ /**
+ * The parser stores options it doesn't recognize here. See above.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ */
+ 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 <code>optional bool deprecated = 33 [default = false];</code>
+ * @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 <code>optional bool deprecated = 33 [default = false];</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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 <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php
new file mode 100644
index 000000000..0005bc669
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo.php
@@ -0,0 +1,230 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Encapsulates information about the original source file from which a
+ * FileDescriptorProto was generated.
+ *
+ * Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
+ */
+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 <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ */
+ 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 <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ * @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 <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
new file mode 100644
index 000000000..032be3921
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
@@ -0,0 +1,448 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\SourceCodeInfo;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>
+ */
+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 <code>repeated int32 path = 1 [packed = true];</code>
+ */
+ 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 <code>repeated int32 span = 2 [packed = true];</code>
+ */
+ 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;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field <code>optional string leading_comments = 3;</code>
+ */
+ protected $leading_comments = null;
+ /**
+ * Generated from protobuf field <code>optional string trailing_comments = 4;</code>
+ */
+ protected $trailing_comments = null;
+ /**
+ * Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
+ */
+ private $leading_detached_comments;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<int>|\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<int>|\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;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ * @type string $trailing_comments
+ * @type array<string>|\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 <code>repeated int32 path = 1 [packed = true];</code>
+ * @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 <code>repeated int32 path = 1 [packed = true];</code>
+ * @param array<int>|\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 <code>repeated int32 span = 2 [packed = true];</code>
+ * @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 <code>repeated int32 span = 2 [packed = true];</code>
+ * @param array<int>|\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;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field <code>optional string leading_comments = 3;</code>
+ * @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;
+ * /&#42; Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. *&#47;
+ * /&#42; Block comment attached to
+ * * grault. *&#47;
+ * optional int32 grault = 6;
+ * // ignored detached comments.
+ *
+ * Generated from protobuf field <code>optional string leading_comments = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setLeadingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->leading_comments = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string trailing_comments = 4;</code>
+ * @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 <code>optional string trailing_comments = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTrailingComments($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trailing_comments = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLeadingDetachedComments()
+ {
+ return $this->leading_detached_comments;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code>
+ * @param array<string>|\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/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
new file mode 100644
index 000000000..1346492d2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo_Location.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\SourceCodeInfo\Location instead.
+ * @deprecated
+ */
+ class SourceCodeInfo_Location {}
+}
+class_exists(SourceCodeInfo\Location::class);
+@trigger_error('Google\Protobuf\Internal\SourceCodeInfo_Location is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\SourceCodeInfo\Location instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/TimestampBase.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/TimestampBase.php
new file mode 100644
index 000000000..653d1e99d
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/TimestampBase.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Google\Protobuf\Internal;
+
+/**
+ * Base class for Google\Protobuf\Timestamp, this contains hand-written
+ * convenience methods.
+ */
+class TimestampBase extends \Google\Protobuf\Internal\Message
+{
+ /*
+ * Converts PHP DateTime to Timestamp.
+ *
+ * @param \DateTime $datetime
+ */
+ public function fromDateTime(\DateTime $datetime)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php
new file mode 100644
index 000000000..a1cdca573
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption.php
@@ -0,0 +1,300 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A message representing a option the parser does not recognize. This only
+ * appears in options protos created by the compiler::Parser class.
+ * DescriptorPool resolves these when building Descriptor objects. Therefore,
+ * options protos in descriptor objects (e.g. returned by Descriptor::options(),
+ * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+ * in them.
+ *
+ * Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
+ */
+class UninterpretedOption extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ */
+ 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 <code>optional string identifier_value = 3;</code>
+ */
+ protected $identifier_value = null;
+ /**
+ * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
+ */
+ protected $positive_int_value = null;
+ /**
+ * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
+ */
+ protected $negative_int_value = null;
+ /**
+ * Generated from protobuf field <code>optional double double_value = 6;</code>
+ */
+ protected $double_value = null;
+ /**
+ * Generated from protobuf field <code>optional bytes string_value = 7;</code>
+ */
+ protected $string_value = null;
+ /**
+ * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
+ */
+ 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 <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
+ * @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 <code>optional string identifier_value = 3;</code>
+ * @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 <code>optional string identifier_value = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setIdentifierValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->identifier_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
+ * @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 <code>optional uint64 positive_int_value = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setPositiveIntValue($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->positive_int_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
+ * @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 <code>optional int64 negative_int_value = 5;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setNegativeIntValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->negative_int_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional double double_value = 6;</code>
+ * @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 <code>optional double double_value = 6;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setDoubleValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->double_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional bytes string_value = 7;</code>
+ * @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 <code>optional bytes string_value = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->string_value = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional string aggregate_value = 8;</code>
+ * @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 <code>optional string aggregate_value = 8;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setAggregateValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->aggregate_value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
new file mode 100644
index 000000000..2debf83a6
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
@@ -0,0 +1,116 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal\UninterpretedOption;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\GPBWire;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\InputStream;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * The name of the uninterpreted option. Each string represents a segment in
+ * a dot-separated name. is_extension is true iff a segment represents an
+ * extension (denoted with parentheses in options specs in .proto files).
+ * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+ * "foo.(bar.baz).moo".
+ *
+ * Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
+ */
+class NamePart extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>required string name_part = 1;</code>
+ */
+ protected $name_part = null;
+ /**
+ * Generated from protobuf field <code>required bool is_extension = 2;</code>
+ */
+ 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 <code>required string name_part = 1;</code>
+ * @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 <code>required string name_part = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setNamePart($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name_part = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>required bool is_extension = 2;</code>
+ * @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 <code>required bool is_extension = 2;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
new file mode 100644
index 000000000..9750eb010
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Internal/UninterpretedOption_NamePart.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/descriptor.proto
+
+namespace Google\Protobuf\Internal;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Google\Protobuf\Internal\UninterpretedOption\NamePart instead.
+ * @deprecated
+ */
+ class UninterpretedOption_NamePart {}
+}
+class_exists(UninterpretedOption\NamePart::class);
+@trigger_error('Google\Protobuf\Internal\UninterpretedOption_NamePart is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\UninterpretedOption\NamePart instead', E_USER_DEPRECATED);
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/ListValue.php b/vendor/google/protobuf/src/Google/Protobuf/ListValue.php
new file mode 100644
index 000000000..891283c2b
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/ListValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/struct.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `ListValue` is a wrapper around a repeated field of values.
+ * The JSON representation for `ListValue` is JSON array.
+ *
+ * Generated from protobuf message <code>google.protobuf.ListValue</code>
+ */
+class ListValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Repeated field of dynamically typed values.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
+ */
+ 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 <code>repeated .google.protobuf.Value values = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Repeated field of dynamically typed values.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Method.php b/vendor/google/protobuf/src/Google/Protobuf/Method.php
new file mode 100644
index 000000000..eda00bf61
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Method.php
@@ -0,0 +1,271 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Method represents a method of an API interface.
+ *
+ * Generated from protobuf message <code>google.protobuf.Method</code>
+ */
+class Method extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The simple name of this method.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * A URL of the input message type.
+ *
+ * Generated from protobuf field <code>string request_type_url = 2;</code>
+ */
+ protected $request_type_url = '';
+ /**
+ * If true, the request is streamed.
+ *
+ * Generated from protobuf field <code>bool request_streaming = 3;</code>
+ */
+ protected $request_streaming = false;
+ /**
+ * The URL of the output message type.
+ *
+ * Generated from protobuf field <code>string response_type_url = 4;</code>
+ */
+ protected $response_type_url = '';
+ /**
+ * If true, the response is streamed.
+ *
+ * Generated from protobuf field <code>bool response_streaming = 5;</code>
+ */
+ protected $response_streaming = false;
+ /**
+ * Any metadata attached to the method.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code>
+ */
+ private $options;
+ /**
+ * The source syntax of this method.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ */
+ 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 <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The simple name of this method.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @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 <code>string request_type_url = 2;</code>
+ * @return string
+ */
+ public function getRequestTypeUrl()
+ {
+ return $this->request_type_url;
+ }
+
+ /**
+ * A URL of the input message type.
+ *
+ * Generated from protobuf field <code>string request_type_url = 2;</code>
+ * @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 <code>bool request_streaming = 3;</code>
+ * @return bool
+ */
+ public function getRequestStreaming()
+ {
+ return $this->request_streaming;
+ }
+
+ /**
+ * If true, the request is streamed.
+ *
+ * Generated from protobuf field <code>bool request_streaming = 3;</code>
+ * @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 <code>string response_type_url = 4;</code>
+ * @return string
+ */
+ public function getResponseTypeUrl()
+ {
+ return $this->response_type_url;
+ }
+
+ /**
+ * The URL of the output message type.
+ *
+ * Generated from protobuf field <code>string response_type_url = 4;</code>
+ * @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 <code>bool response_streaming = 5;</code>
+ * @return bool
+ */
+ public function getResponseStreaming()
+ {
+ return $this->response_streaming;
+ }
+
+ /**
+ * If true, the response is streamed.
+ *
+ * Generated from protobuf field <code>bool response_streaming = 5;</code>
+ * @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 <code>repeated .google.protobuf.Option options = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * Any metadata attached to the method.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code>
+ * @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 <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax of this method.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Mixin.php b/vendor/google/protobuf/src/Google/Protobuf/Mixin.php
new file mode 100644
index 000000000..4f7bf844c
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Mixin.php
@@ -0,0 +1,166 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/api.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Declares an API Interface to be included in this interface. The including
+ * interface must redeclare all the methods from the included interface, but
+ * documentation and options are inherited as follows:
+ * - If after comment and whitespace stripping, the documentation
+ * string of the redeclared method is empty, it will be inherited
+ * from the original method.
+ * - Each annotation belonging to the service config (http,
+ * visibility) which is not set in the redeclared method will be
+ * inherited.
+ * - If an http annotation is inherited, the path pattern will be
+ * modified as follows. Any version prefix will be replaced by the
+ * version of the including interface plus the [root][] path if
+ * specified.
+ * Example of a simple mixin:
+ * package google.acl.v1;
+ * service AccessControl {
+ * // Get the underlying ACL object.
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
+ * option (google.api.http).get = "/v1/{resource=**}:getAcl";
+ * }
+ * }
+ * package google.storage.v2;
+ * service Storage {
+ * rpc GetAcl(GetAclRequest) returns (Acl);
+ * // Get a data record.
+ * rpc GetData(GetDataRequest) returns (Data) {
+ * option (google.api.http).get = "/v2/{resource=**}";
+ * }
+ * }
+ * Example of a mixin configuration:
+ * apis:
+ * - name: google.storage.v2.Storage
+ * mixins:
+ * - name: google.acl.v1.AccessControl
+ * The mixin construct implies that all methods in `AccessControl` are
+ * also declared with same name and request/response types in
+ * `Storage`. A documentation generator or annotation processor will
+ * see the effective `Storage.GetAcl` method after inheriting
+ * documentation and annotations as follows:
+ * service Storage {
+ * // Get the underlying ACL object.
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
+ * option (google.api.http).get = "/v2/{resource=**}:getAcl";
+ * }
+ * ...
+ * }
+ * Note how the version in the path pattern changed from `v1` to `v2`.
+ * If the `root` field in the mixin is specified, it should be a
+ * relative path under which inherited HTTP paths are placed. Example:
+ * apis:
+ * - name: google.storage.v2.Storage
+ * mixins:
+ * - name: google.acl.v1.AccessControl
+ * root: acls
+ * This implies the following inherited HTTP annotation:
+ * service Storage {
+ * // Get the underlying ACL object.
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
+ * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+ * }
+ * ...
+ * }
+ *
+ * Generated from protobuf message <code>google.protobuf.Mixin</code>
+ */
+class Mixin extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified name of the interface which is included.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * If non-empty specifies a path under which inherited HTTP paths
+ * are rooted.
+ *
+ * Generated from protobuf field <code>string root = 2;</code>
+ */
+ 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 <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified name of the interface which is included.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @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 <code>string root = 2;</code>
+ * @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 <code>string root = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setRoot($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->root = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/NullValue.php b/vendor/google/protobuf/src/Google/Protobuf/NullValue.php
new file mode 100644
index 000000000..61569f8a3
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/NullValue.php
@@ -0,0 +1,49 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/struct.proto
+
+namespace Google\Protobuf;
+
+use UnexpectedValueException;
+
+/**
+ * `NullValue` is a singleton enumeration to represent the null value for the
+ * `Value` type union.
+ * The JSON representation for `NullValue` is JSON `null`.
+ *
+ * Protobuf type <code>google.protobuf.NullValue</code>
+ */
+class NullValue
+{
+ /**
+ * Null value.
+ *
+ * Generated from protobuf enum <code>NULL_VALUE = 0;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php b/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php
new file mode 100644
index 000000000..66ffbd5ca
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/OneofDescriptor.php
@@ -0,0 +1,87 @@
+<?php
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2017 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// 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 Google Inc. 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
+// 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.
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GetPublicDescriptorTrait;
+
+class OneofDescriptor
+{
+ use GetPublicDescriptorTrait;
+
+ /** @var \Google\Protobuf\Internal\OneofDescriptor $internal_desc */
+ private $internal_desc;
+
+ /**
+ * @internal
+ */
+ public function __construct($internal_desc)
+ {
+ $this->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/vendor/google/protobuf/src/Google/Protobuf/Option.php b/vendor/google/protobuf/src/Google/Protobuf/Option.php
new file mode 100644
index 000000000..31249e513
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Option.php
@@ -0,0 +1,136 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A protocol buffer option, which can be attached to a message, field,
+ * enumeration, etc.
+ *
+ * Generated from protobuf message <code>google.protobuf.Option</code>
+ */
+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 <code>string name = 1;</code>
+ */
+ 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 <code>.google.protobuf.Any value = 2;</code>
+ */
+ 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 <code>string name = 1;</code>
+ * @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 <code>string name = 1;</code>
+ * @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 <code>.google.protobuf.Any value = 2;</code>
+ * @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 <code>.google.protobuf.Any value = 2;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php b/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php
new file mode 100644
index 000000000..8b3ea1122
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/SourceContext.php
@@ -0,0 +1,72 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/source_context.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `SourceContext` represents information about the source of a
+ * protobuf element, like the file in which it is defined.
+ *
+ * Generated from protobuf message <code>google.protobuf.SourceContext</code>
+ */
+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 <code>string file_name = 1;</code>
+ */
+ 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 <code>string file_name = 1;</code>
+ * @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 <code>string file_name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFileName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->file_name = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/StringValue.php b/vendor/google/protobuf/src/Google/Protobuf/StringValue.php
new file mode 100644
index 000000000..ad98316b2
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/StringValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `string`.
+ * The JSON representation for `StringValue` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.StringValue</code>
+ */
+class StringValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The string value.
+ *
+ * Generated from protobuf field <code>string value = 1;</code>
+ */
+ 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 <code>string value = 1;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The string value.
+ *
+ * Generated from protobuf field <code>string value = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Struct.php b/vendor/google/protobuf/src/Google/Protobuf/Struct.php
new file mode 100644
index 000000000..0456541cb
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Struct.php
@@ -0,0 +1,73 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/struct.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `Struct` represents a structured data value, consisting of fields
+ * which map to dynamically typed values. In some languages, `Struct`
+ * might be supported by a native representation. For example, in
+ * scripting languages like JS a struct is represented as an
+ * object. The details of that representation are described together
+ * with the proto support for the language.
+ * The JSON representation for `Struct` is JSON object.
+ *
+ * Generated from protobuf message <code>google.protobuf.Struct</code>
+ */
+class Struct extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Unordered map of dynamically typed values.
+ *
+ * Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
+ */
+ 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 <code>map<string, .google.protobuf.Value> fields = 1;</code>
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getFields()
+ {
+ return $this->fields;
+ }
+
+ /**
+ * Unordered map of dynamically typed values.
+ *
+ * Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
+ * @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/vendor/google/protobuf/src/Google/Protobuf/Syntax.php b/vendor/google/protobuf/src/Google/Protobuf/Syntax.php
new file mode 100644
index 000000000..10952bfd4
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Syntax.php
@@ -0,0 +1,54 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use UnexpectedValueException;
+
+/**
+ * The syntax in which a protocol buffer element is defined.
+ *
+ * Protobuf type <code>google.protobuf.Syntax</code>
+ */
+class Syntax
+{
+ /**
+ * Syntax `proto2`.
+ *
+ * Generated from protobuf enum <code>SYNTAX_PROTO2 = 0;</code>
+ */
+ const SYNTAX_PROTO2 = 0;
+ /**
+ * Syntax `proto3`.
+ *
+ * Generated from protobuf enum <code>SYNTAX_PROTO3 = 1;</code>
+ */
+ 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/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php b/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
new file mode 100644
index 000000000..a12f48520
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
@@ -0,0 +1,186 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/timestamp.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Timestamp represents a point in time independent of any time zone or local
+ * calendar, encoded as a count of seconds and fractions of seconds at
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
+ * Gregorian calendar backwards to year one.
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+ * second table is needed for interpretation, using a [24-hour linear
+ * smear](https://developers.google.com/time/smear).
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+ * restricting to that range, we ensure that we can convert to and from [RFC
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
+ * # Examples
+ * Example 1: Compute Timestamp from POSIX `time()`.
+ * Timestamp timestamp;
+ * timestamp.set_seconds(time(NULL));
+ * timestamp.set_nanos(0);
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+ * struct timeval tv;
+ * gettimeofday(&tv, NULL);
+ * Timestamp timestamp;
+ * timestamp.set_seconds(tv.tv_sec);
+ * timestamp.set_nanos(tv.tv_usec * 1000);
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+ * FILETIME ft;
+ * GetSystemTimeAsFileTime(&ft);
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+ * Timestamp timestamp;
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+ * long millis = System.currentTimeMillis();
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
+ * Instant now = Instant.now();
+ * Timestamp timestamp =
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
+ * .setNanos(now.getNano()).build();
+ * Example 6: Compute Timestamp from current time in Python.
+ * timestamp = Timestamp()
+ * timestamp.GetCurrentTime()
+ * # JSON Mapping
+ * In JSON format, the Timestamp type is encoded as a string in the
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+ * where {year} is always expressed using four digits while {month}, {day},
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
+ * able to accept both UTC and other timezones (as indicated by an offset).
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+ * 01:30 UTC on January 15, 2017.
+ * In JavaScript, one can convert a Date object to this format using the
+ * standard
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
+ * method. In Python, a standard `datetime.datetime` object can be converted
+ * to this format using
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+ * ) to obtain a formatter capable of generating timestamps in this format.
+ *
+ * Generated from protobuf message <code>google.protobuf.Timestamp</code>
+ */
+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 <code>int64 seconds = 1;</code>
+ */
+ 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 <code>int32 nanos = 2;</code>
+ */
+ 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 <code>int64 seconds = 1;</code>
+ * @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 <code>int64 seconds = 1;</code>
+ * @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 <code>int32 nanos = 2;</code>
+ * @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 <code>int32 nanos = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setNanos($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->nanos = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Type.php b/vendor/google/protobuf/src/Google/Protobuf/Type.php
new file mode 100644
index 000000000..d4af7dfec
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Type.php
@@ -0,0 +1,247 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/type.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A protocol buffer message type.
+ *
+ * Generated from protobuf message <code>google.protobuf.Type</code>
+ */
+class Type extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The fully qualified message name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * The list of fields.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
+ */
+ private $fields;
+ /**
+ * The list of types appearing in `oneof` definitions in this type.
+ *
+ * Generated from protobuf field <code>repeated string oneofs = 3;</code>
+ */
+ private $oneofs;
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
+ */
+ private $options;
+ /**
+ * The source context.
+ *
+ * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
+ */
+ protected $source_context = null;
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
+ */
+ 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<string>|\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 <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * The fully qualified message name.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @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 <code>repeated .google.protobuf.Field fields = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFields()
+ {
+ return $this->fields;
+ }
+
+ /**
+ * The list of fields.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
+ * @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 <code>repeated string oneofs = 3;</code>
+ * @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 <code>repeated string oneofs = 3;</code>
+ * @param array<string>|\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 <code>repeated .google.protobuf.Option options = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getOptions()
+ {
+ return $this->options;
+ }
+
+ /**
+ * The protocol buffer options.
+ *
+ * Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @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 <code>.google.protobuf.SourceContext source_context = 5;</code>
+ * @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 <code>.google.protobuf.Syntax syntax = 6;</code>
+ * @return int
+ */
+ public function getSyntax()
+ {
+ return $this->syntax;
+ }
+
+ /**
+ * The source syntax.
+ *
+ * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSyntax($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
+ $this->syntax = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php b/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php
new file mode 100644
index 000000000..ae5fc5b42
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/UInt32Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `uint32`.
+ * The JSON representation for `UInt32Value` is JSON number.
+ *
+ * Generated from protobuf message <code>google.protobuf.UInt32Value</code>
+ */
+class UInt32Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The uint32 value.
+ *
+ * Generated from protobuf field <code>uint32 value = 1;</code>
+ */
+ 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 <code>uint32 value = 1;</code>
+ * @return int
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The uint32 value.
+ *
+ * Generated from protobuf field <code>uint32 value = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php b/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php
new file mode 100644
index 000000000..aa9686726
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/UInt64Value.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/wrappers.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Wrapper message for `uint64`.
+ * The JSON representation for `UInt64Value` is JSON string.
+ *
+ * Generated from protobuf message <code>google.protobuf.UInt64Value</code>
+ */
+class UInt64Value extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The uint64 value.
+ *
+ * Generated from protobuf field <code>uint64 value = 1;</code>
+ */
+ 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 <code>uint64 value = 1;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The uint64 value.
+ *
+ * Generated from protobuf field <code>uint64 value = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/google/protobuf/src/Google/Protobuf/Value.php b/vendor/google/protobuf/src/Google/Protobuf/Value.php
new file mode 100644
index 000000000..dcc0bdf7c
--- /dev/null
+++ b/vendor/google/protobuf/src/Google/Protobuf/Value.php
@@ -0,0 +1,244 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: google/protobuf/struct.proto
+
+namespace Google\Protobuf;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * `Value` represents a dynamically typed value which can be either
+ * null, a number, a string, a boolean, a recursive struct value, or a
+ * list of values. A producer of value is expected to set one of these
+ * variants. Absence of any variant indicates an error.
+ * The JSON representation for `Value` is JSON value.
+ *
+ * Generated from protobuf message <code>google.protobuf.Value</code>
+ */
+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 <code>.google.protobuf.NullValue null_value = 1;</code>
+ * @return int
+ */
+ public function getNullValue()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasNullValue()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Represents a null value.
+ *
+ * Generated from protobuf field <code>.google.protobuf.NullValue null_value = 1;</code>
+ * @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 <code>double number_value = 2;</code>
+ * @return float
+ */
+ public function getNumberValue()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasNumberValue()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Represents a double value.
+ *
+ * Generated from protobuf field <code>double number_value = 2;</code>
+ * @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 <code>string string_value = 3;</code>
+ * @return string
+ */
+ public function getStringValue()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasStringValue()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Represents a string value.
+ *
+ * Generated from protobuf field <code>string string_value = 3;</code>
+ * @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 <code>bool bool_value = 4;</code>
+ * @return bool
+ */
+ public function getBoolValue()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasBoolValue()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Represents a boolean value.
+ *
+ * Generated from protobuf field <code>bool bool_value = 4;</code>
+ * @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 <code>.google.protobuf.Struct struct_value = 5;</code>
+ * @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 <code>.google.protobuf.Struct struct_value = 5;</code>
+ * @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 <code>.google.protobuf.ListValue list_value = 6;</code>
+ * @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 <code>.google.protobuf.ListValue list_value = 6;</code>
+ * @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/vendor/google/protobuf/src/phpdoc.dist.xml b/vendor/google/protobuf/src/phpdoc.dist.xml
new file mode 100644
index 000000000..dd3130253
--- /dev/null
+++ b/vendor/google/protobuf/src/phpdoc.dist.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- Install phpDocumentor to generate docs. -->
+<phpdoc>
+ <parser>
+ <target>doc</target>
+ </parser>
+ <transformer>
+ <target>doc</target>
+ </transformer>
+ <files>
+ <file>Google/Protobuf/Internal/MapField.php</file>
+ <file>Google/Protobuf/Internal/Message.php</file>
+ <file>Google/Protobuf/Internal/RepeatedField.php</file>
+ </files>
+</phpdoc>
diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md
new file mode 100644
index 000000000..990b86c9e
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -0,0 +1,1624 @@
+# Change Log
+
+Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
+
+
+## 7.8.0 - 2023-08-27
+
+### Added
+
+- Support for PHP 8.3
+- Added automatic closing of handles on `CurlFactory` object destruction
+
+
+## 7.7.1 - 2023-08-27
+
+### Changed
+
+- Remove the need for `AllowDynamicProperties` in `CurlMultiHandler`
+
+
+## 7.7.0 - 2023-05-21
+
+### Added
+
+- Support `guzzlehttp/promises` v2
+
+
+## 7.6.1 - 2023-05-15
+
+### Fixed
+
+- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values
+
+
+## 7.6.0 - 2023-05-14
+
+### Added
+
+- Support for setting the minimum TLS version in a unified way
+- Apply on request the version set in options parameters
+
+
+## 7.5.2 - 2023-05-14
+
+### Fixed
+
+- Fixed set cookie constructor validation
+- Fixed handling of files with `'0'` body
+
+### Changed
+
+- Corrected docs and default connect timeout value to 300 seconds
+
+
+## 7.5.1 - 2023-04-17
+
+### Fixed
+
+- Fixed `NO_PROXY` settings so that setting the `proxy` option to `no` overrides the env variable
+
+### Changed
+
+- Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5`
+
+
+## 7.5.0 - 2022-08-28
+
+### Added
+
+- Support PHP 8.2
+- Add request to delay closure params
+
+
+## 7.4.5 - 2022-06-20
+
+### Fixed
+
+* Fix change in port should be considered a change in origin
+* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin
+
+
+## 7.4.4 - 2022-06-09
+
+### Fixed
+
+* Fix failure to strip Authorization header on HTTP downgrade
+* Fix failure to strip the Cookie header on change in host or HTTP downgrade
+
+
+## 7.4.3 - 2022-05-25
+
+### Fixed
+
+* Fix cross-domain cookie leakage
+
+
+## 7.4.2 - 2022-03-20
+
+### Fixed
+
+- Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
+- Reject non-HTTP schemes in StreamHandler
+- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve`
+
+
+## 7.4.1 - 2021-12-06
+
+### Changed
+
+- Replaced implicit URI to string coercion [#2946](https://github.com/guzzle/guzzle/pull/2946)
+- Allow `symfony/deprecation-contracts` version 3 [#2961](https://github.com/guzzle/guzzle/pull/2961)
+
+### Fixed
+
+- Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950)
+
+
+## 7.4.0 - 2021-10-18
+
+### Added
+
+- Support PHP 8.1 [#2929](https://github.com/guzzle/guzzle/pull/2929), [#2939](https://github.com/guzzle/guzzle/pull/2939)
+- Support `psr/log` version 2 and 3 [#2943](https://github.com/guzzle/guzzle/pull/2943)
+
+### Fixed
+
+- Make sure we always call `restore_error_handler()` [#2915](https://github.com/guzzle/guzzle/pull/2915)
+- Fix progress parameter type compatibility between the cURL and stream handlers [#2936](https://github.com/guzzle/guzzle/pull/2936)
+- Throw `InvalidArgumentException` when an incorrect `headers` array is provided [#2916](https://github.com/guzzle/guzzle/pull/2916), [#2942](https://github.com/guzzle/guzzle/pull/2942)
+
+### Changed
+
+- Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945)
+
+
+## 7.3.0 - 2021-03-23
+
+### Added
+
+- Support for DER and P12 certificates [#2413](https://github.com/guzzle/guzzle/pull/2413)
+- Support the cURL (http://) scheme for StreamHandler proxies [#2850](https://github.com/guzzle/guzzle/pull/2850)
+- Support for `guzzlehttp/psr7:^2.0` [#2878](https://github.com/guzzle/guzzle/pull/2878)
+
+### Fixed
+
+- Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872)
+
+
+## 7.2.0 - 2020-10-10
+
+### Added
+
+- Support for PHP 8 [#2712](https://github.com/guzzle/guzzle/pull/2712), [#2715](https://github.com/guzzle/guzzle/pull/2715), [#2789](https://github.com/guzzle/guzzle/pull/2789)
+- Support passing a body summarizer to the http errors middleware [#2795](https://github.com/guzzle/guzzle/pull/2795)
+
+### Fixed
+
+- Handle exceptions during response creation [#2591](https://github.com/guzzle/guzzle/pull/2591)
+- Fix CURLOPT_ENCODING not to be overwritten [#2595](https://github.com/guzzle/guzzle/pull/2595)
+- Make sure the Request always has a body object [#2804](https://github.com/guzzle/guzzle/pull/2804)
+
+### Changed
+
+- The `TooManyRedirectsException` has a response [#2660](https://github.com/guzzle/guzzle/pull/2660)
+- Avoid "functions" from dependencies [#2712](https://github.com/guzzle/guzzle/pull/2712)
+
+### Deprecated
+
+- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
+
+
+## 7.1.1 - 2020-09-30
+
+### Fixed
+
+- Incorrect EOF detection for response body streams on Windows.
+
+### Changed
+
+- We dont connect curl `sink` on HEAD requests.
+- Removed some PHP 5 workarounds
+
+
+## 7.1.0 - 2020-09-22
+
+### Added
+
+- `GuzzleHttp\MessageFormatterInterface`
+
+### Fixed
+
+- Fixed issue that caused cookies with no value not to be stored.
+- On redirects, we allow all safe methods like GET, HEAD and OPTIONS.
+- Fixed logging on empty responses.
+- Make sure MessageFormatter::format returns string
+
+### Deprecated
+
+- All functions in `GuzzleHttp` has been deprecated. Use static methods on `Utils` instead.
+- `ClientInterface::getConfig()`
+- `Client::getConfig()`
+- `Client::__call()`
+- `Utils::defaultCaBundle()`
+- `CurlFactory::LOW_CURL_VERSION_NUMBER`
+
+
+## 7.0.1 - 2020-06-27
+
+* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
+
+
+## 7.0.0 - 2020-06-27
+
+No changes since 7.0.0-rc1.
+
+
+## 7.0.0-rc1 - 2020-06-15
+
+### Changed
+
+* Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629)
+* Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675)
+
+
+## 7.0.0-beta2 - 2020-05-25
+
+### Added
+
+* Using `Utils` class instead of functions in the `GuzzleHttp` namespace. [#2546](https://github.com/guzzle/guzzle/pull/2546)
+* `ClientInterface::MAJOR_VERSION` [#2583](https://github.com/guzzle/guzzle/pull/2583)
+
+### Changed
+
+* Avoid the `getenv` function when unsafe [#2531](https://github.com/guzzle/guzzle/pull/2531)
+* Added real client methods [#2529](https://github.com/guzzle/guzzle/pull/2529)
+* Avoid functions due to global install conflicts [#2546](https://github.com/guzzle/guzzle/pull/2546)
+* Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
+* Adding methods for HTTP verbs like `Client::get()`, `Client::head()`, `Client::patch()` etc [#2529](https://github.com/guzzle/guzzle/pull/2529)
+* `ConnectException` extends `TransferException` [#2541](https://github.com/guzzle/guzzle/pull/2541)
+* Updated the default User Agent to "GuzzleHttp/7" [#2654](https://github.com/guzzle/guzzle/pull/2654)
+
+### Fixed
+
+* Various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
+
+### Removed
+
+* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
+
+
+## 7.0.0-beta1 - 2019-12-30
+
+The diff might look very big but 95% of Guzzle users will be able to upgrade without modification.
+Please see [the upgrade document](UPGRADING.md) that describes all BC breaking changes.
+
+### Added
+
+* Implement PSR-18 and dropped PHP 5 support [#2421](https://github.com/guzzle/guzzle/pull/2421) [#2474](https://github.com/guzzle/guzzle/pull/2474)
+* PHP 7 types [#2442](https://github.com/guzzle/guzzle/pull/2442) [#2449](https://github.com/guzzle/guzzle/pull/2449) [#2466](https://github.com/guzzle/guzzle/pull/2466) [#2497](https://github.com/guzzle/guzzle/pull/2497) [#2499](https://github.com/guzzle/guzzle/pull/2499)
+* IDN support for redirects [2424](https://github.com/guzzle/guzzle/pull/2424)
+
+### Changed
+
+* Dont allow passing null as third argument to `BadResponseException::__construct()` [#2427](https://github.com/guzzle/guzzle/pull/2427)
+* Use SAPI constant instead of method call [#2450](https://github.com/guzzle/guzzle/pull/2450)
+* Use native function invocation [#2444](https://github.com/guzzle/guzzle/pull/2444)
+* Better defaults for PHP installations with old ICU lib [2454](https://github.com/guzzle/guzzle/pull/2454)
+* Added visibility to all constants [#2462](https://github.com/guzzle/guzzle/pull/2462)
+* Dont allow passing `null` as URI to `Client::request()` and `Client::requestAsync()` [#2461](https://github.com/guzzle/guzzle/pull/2461)
+* Widen the exception argument to throwable [#2495](https://github.com/guzzle/guzzle/pull/2495)
+
+### Fixed
+
+* Logging when Promise rejected with a string [#2311](https://github.com/guzzle/guzzle/pull/2311)
+
+### Removed
+
+* Class `SeekException` [#2162](https://github.com/guzzle/guzzle/pull/2162)
+* `RequestException::getResponseBodySummary()` [#2425](https://github.com/guzzle/guzzle/pull/2425)
+* `CookieJar::getCookieValue()` [#2433](https://github.com/guzzle/guzzle/pull/2433)
+* `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440)
+* Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
+
+
+## 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 retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
+* 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 https://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: https://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 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 https://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/vendor/guzzlehttp/guzzle/LICENSE b/vendor/guzzlehttp/guzzle/LICENSE
new file mode 100644
index 000000000..fd2375d88
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/LICENSE
@@ -0,0 +1,27 @@
+The MIT License (MIT)
+
+Copyright (c) 2011 Michael Dowling <[email protected]>
+Copyright (c) 2012 Jeremy Lindblom <[email protected]>
+Copyright (c) 2014 Graham Campbell <[email protected]>
+Copyright (c) 2015 Márk Sági-Kazár <[email protected]>
+Copyright (c) 2015 Tobias Schultze <[email protected]>
+Copyright (c) 2016 Tobias Nyholm <[email protected]>
+Copyright (c) 2016 George Mponos <[email protected]>
+
+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/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md
new file mode 100644
index 000000000..0786462b3
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/README.md
@@ -0,0 +1,94 @@
+![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.
+- Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients.
+- 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
+composer require guzzlehttp/guzzle
+```
+
+
+## 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 only | `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.3 |
+
+[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/
+
+
+## Security
+
+If you discover a security vulnerability within this package, please send an email to [email protected]. 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/guzzle/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-guzzle?utm_source=packagist-guzzlehttp-guzzle&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md
new file mode 100644
index 000000000..8fa0afb5d
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/UPGRADING.md
@@ -0,0 +1,1253 @@
+Guzzle Upgrade Guide
+====================
+
+6.0 to 7.0
+----------
+
+In order to take advantage of the new features of PHP, Guzzle dropped the support
+of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return
+types for functions and methods have been added wherever possible.
+
+Please make sure:
+- You are calling a function or a method with the correct type.
+- If you extend a class of Guzzle; update all signatures on methods you override.
+
+#### Other backwards compatibility breaking changes
+
+- Class `GuzzleHttp\UriTemplate` is removed.
+- Class `GuzzleHttp\Exception\SeekException` is removed.
+- Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`,
+ `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty
+ Response as argument.
+- Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException`
+ instead of `GuzzleHttp\Exception\RequestException`.
+- Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed.
+- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed.
+- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead.
+- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
+ Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
+- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
+- Request option `exceptions` is removed. Please use `http_errors`.
+- Request option `save_to` is removed. Please use `sink`.
+- Pool option `pool_size` is removed. Please use `concurrency`.
+- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
+- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.
+- The `log` middleware will log the errors with level `error` instead of `notice`
+- Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher).
+
+#### Native functions calls
+
+All internal native functions calls of Guzzle are now prefixed with a slash. This
+change makes it impossible for method overloading by other libraries or applications.
+Example:
+
+```php
+// Before:
+curl_version();
+
+// After:
+\curl_version();
+```
+
+For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master).
+
+5.0 to 6.0
+----------
+
+Guzzle now uses [PSR-7](https://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](https://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 https://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
+<?xml version="1.0" encoding="UTF-8"?>
+<client>
+ <commands>
+ <!-- Groups -->
+ <command name="list_groups" method="GET" uri="groups.json">
+ <doc>Get a list of groups</doc>
+ </command>
+ <command name="search_groups" method="GET" uri='search.json?query="{{query}} type:group"'>
+ <doc>Uses a search query to get a list of groups</doc>
+ <param name="query" type="string" required="true" />
+ </command>
+ <command name="create_group" method="POST" uri="groups.json">
+ <doc>Create a group</doc>
+ <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
+ <param name="Content-Type" location="header" static="application/json"/>
+ </command>
+ <command name="delete_group" method="DELETE" uri="groups/{{id}}.json">
+ <doc>Delete a group by ID</doc>
+ <param name="id" type="integer" required="true"/>
+ </command>
+ <command name="get_group" method="GET" uri="groups/{{id}}.json">
+ <param name="id" type="integer" required="true"/>
+ </command>
+ <command name="update_group" method="PUT" uri="groups/{{id}}.json">
+ <doc>Update a group</doc>
+ <param name="id" type="integer" required="true"/>
+ <param name="data" type="array" location="body" filters="json_encode" doc="Group JSON"/>
+ <param name="Content-Type" location="header" static="application/json"/>
+ </command>
+ </commands>
+</client>
+```
+
+**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/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json
new file mode 100644
index 000000000..72defd614
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/composer.json
@@ -0,0 +1,103 @@
+{
+ "name": "guzzlehttp/guzzle",
+ "description": "Guzzle is a PHP HTTP client library",
+ "keywords": [
+ "framework",
+ "http",
+ "rest",
+ "web service",
+ "curl",
+ "client",
+ "HTTP client",
+ "PSR-7",
+ "PSR-18"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "[email protected]",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+ "psr/http-client": "^1.0",
+ "symfony/deprecation-contracts": "^2.2 || ^3.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "php-http/message-factory": "^1.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
+ "psr/log": "^1.1 || ^2.0 || ^3.0"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "config": {
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ },
+ "preferred-install": "dist",
+ "sort-packages": true
+ },
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\": "tests/"
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/BodySummarizer.php b/vendor/guzzlehttp/guzzle/src/BodySummarizer.php
new file mode 100644
index 000000000..6eca94ef9
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/BodySummarizer.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+
+final class BodySummarizer implements BodySummarizerInterface
+{
+ /**
+ * @var int|null
+ */
+ private $truncateAt;
+
+ public function __construct(int $truncateAt = null)
+ {
+ $this->truncateAt = $truncateAt;
+ }
+
+ /**
+ * Returns a summarized message body.
+ */
+ public function summarize(MessageInterface $message): ?string
+ {
+ return $this->truncateAt === null
+ ? \GuzzleHttp\Psr7\Message::bodySummary($message)
+ : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php b/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php
new file mode 100644
index 000000000..3e02e036e
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+
+interface BodySummarizerInterface
+{
+ /**
+ * Returns a summarized message body.
+ */
+ public function summarize(MessageInterface $message): ?string;
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php
new file mode 100644
index 000000000..bc6efc90f
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Client.php
@@ -0,0 +1,483 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Cookie\CookieJar;
+use GuzzleHttp\Exception\GuzzleException;
+use GuzzleHttp\Exception\InvalidArgumentException;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * @final
+ */
+class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
+{
+ use ClientTrait;
+
+ /**
+ * @var array Default request options
+ */
+ private $config;
+
+ /**
+ * Clients accept an array of constructor parameters.
+ *
+ * Here's an example of creating a client using a base_uri and an array of
+ * default request options to apply to each request:
+ *
+ * $client = new Client([
+ * 'base_uri' => '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\Utils::uriFor($config['base_uri']);
+ }
+
+ $this->configureDefaults($config);
+ }
+
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return PromiseInterface|ResponseInterface
+ *
+ * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0.
+ */
+ 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 = $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.
+ */
+ public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface
+ {
+ // 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.
+ *
+ * @throws GuzzleException
+ */
+ public function send(RequestInterface $request, array $options = []): ResponseInterface
+ {
+ $options[RequestOptions::SYNCHRONOUS] = true;
+
+ return $this->sendAsync($request, $options)->wait();
+ }
+
+ /**
+ * The HttpClient PSR (PSR-18) specify this method.
+ *
+ * {@inheritDoc}
+ */
+ public function sendRequest(RequestInterface $request): ResponseInterface
+ {
+ $options[RequestOptions::SYNCHRONOUS] = true;
+ $options[RequestOptions::ALLOW_REDIRECTS] = false;
+ $options[RequestOptions::HTTP_ERRORS] = false;
+
+ 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.
+ */
+ public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface
+ {
+ $options = $this->prepareDefaults($options);
+ // Remove request modifying parameter because it can be done up-front.
+ $headers = $options['headers'] ?? [];
+ $body = $options['body'] ?? null;
+ $version = $options['version'] ?? '1.1';
+ // Merge the URI into the base URI.
+ $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options);
+ if (\is_array($body)) {
+ throw $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.
+ *
+ * @throws GuzzleException
+ */
+ public function request(string $method, $uri = '', array $options = []): ResponseInterface
+ {
+ $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
+ *
+ * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
+ */
+ public function getConfig(string $option = null)
+ {
+ return $option === null
+ ? $this->config
+ : ($this->config[$option] ?? null);
+ }
+
+ private function buildUri(UriInterface $uri, array $config): UriInterface
+ {
+ if (isset($config['base_uri'])) {
+ $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($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.
+ */
+ private function configureDefaults(array $config): void
+ {
+ $defaults = [
+ 'allow_redirects' => RedirectMiddleware::$defaultSettings,
+ 'http_errors' => true,
+ 'decode_content' => true,
+ 'verify' => true,
+ 'cookies' => false,
+ 'idn_conversion' => false,
+ ];
+
+ // 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 === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) {
+ $defaults['proxy']['http'] = $proxy;
+ }
+
+ if ($proxy = Utils::getenv('HTTPS_PROXY')) {
+ $defaults['proxy']['https'] = $proxy;
+ }
+
+ if ($noProxy = Utils::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' => Utils::defaultUserAgent()];
+ } 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'] = Utils::defaultUserAgent();
+ }
+ }
+
+ /**
+ * Merges default options into the array.
+ *
+ * @param array $options Options to modify by reference
+ */
+ private function prepareDefaults(array $options): array
+ {
+ $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.
+ */
+ private function transfer(RequestInterface $request, array $options): PromiseInterface
+ {
+ $request = $this->applyOptions($request, $options);
+ /** @var HandlerStack $handler */
+ $handler = $options['handler'];
+
+ try {
+ return P\Create::promiseFor($handler($request, $options));
+ } catch (\Exception $e) {
+ return P\Create::rejectionFor($e);
+ }
+ }
+
+ /**
+ * Applies the array of request options to a request.
+ */
+ private function applyOptions(RequestInterface $request, array &$options): RequestInterface
+ {
+ $modify = [
+ 'set_headers' => [],
+ ];
+
+ if (isset($options['headers'])) {
+ if (array_keys($options['headers']) === range(0, count($options['headers']) - 1)) {
+ throw new InvalidArgumentException('The headers array must have header name as keys.');
+ }
+ $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\Utils::caselessRemove(['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'] = Utils::jsonEncode($options['json']);
+ unset($options['json']);
+ // Ensure that we don't have the header in different case and set the new value.
+ $options['_conditional'] = Psr7\Utils::caselessRemove(['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\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']);
+ $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
+ }
+
+ if (isset($options['body'])) {
+ if (\is_array($options['body'])) {
+ throw $this->invalidBody();
+ }
+ $modify['body'] = Psr7\Utils::streamFor($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\Utils::caselessRemove(['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, '', '&', \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');
+ }
+ }
+
+ if (isset($options['version'])) {
+ $modify['version'] = $options['version'];
+ }
+
+ $request = Psr7\Utils::modifyRequest($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\Utils::caselessRemove(['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\Utils::modifyRequest($request, $modify);
+ // Don't pass this internal value along to middleware/handlers.
+ unset($options['_conditional']);
+ }
+
+ return $request;
+ }
+
+ /**
+ * Return an InvalidArgumentException with pre-set message.
+ */
+ private function invalidBody(): InvalidArgumentException
+ {
+ return new InvalidArgumentException('Passing in the "body" request '
+ .'option as an array to send a request is not supported. '
+ .'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/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php
new file mode 100644
index 000000000..1788e16ab
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php
@@ -0,0 +1,84 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Exception\GuzzleException;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Client interface for sending HTTP requests.
+ */
+interface ClientInterface
+{
+ /**
+ * The Guzzle major version.
+ */
+ public const MAJOR_VERSION = 7;
+
+ /**
+ * Send an HTTP request.
+ *
+ * @param RequestInterface $request Request to send
+ * @param array $options Request options to apply to the given
+ * request and to the transfer.
+ *
+ * @throws GuzzleException
+ */
+ public function send(RequestInterface $request, array $options = []): ResponseInterface;
+
+ /**
+ * Asynchronously send an HTTP request.
+ *
+ * @param RequestInterface $request Request to send
+ * @param array $options Request options to apply to the given
+ * request and to the transfer.
+ */
+ public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface;
+
+ /**
+ * 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.
+ *
+ * @throws GuzzleException
+ */
+ public function request(string $method, $uri, array $options = []): ResponseInterface;
+
+ /**
+ * 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.
+ */
+ public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
+
+ /**
+ * 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
+ *
+ * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
+ */
+ public function getConfig(string $option = null);
+}
diff --git a/vendor/guzzlehttp/guzzle/src/ClientTrait.php b/vendor/guzzlehttp/guzzle/src/ClientTrait.php
new file mode 100644
index 000000000..c584c76cb
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/ClientTrait.php
@@ -0,0 +1,241 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Exception\GuzzleException;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Client interface for sending HTTP requests.
+ */
+trait ClientTrait
+{
+ /**
+ * 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.
+ *
+ * @throws GuzzleException
+ */
+ abstract public function request(string $method, $uri, array $options = []): ResponseInterface;
+
+ /**
+ * Create and send an HTTP GET 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function get($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('GET', $uri, $options);
+ }
+
+ /**
+ * Create and send an HTTP HEAD 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function head($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('HEAD', $uri, $options);
+ }
+
+ /**
+ * Create and send an HTTP PUT 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function put($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('PUT', $uri, $options);
+ }
+
+ /**
+ * Create and send an HTTP POST 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function post($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('POST', $uri, $options);
+ }
+
+ /**
+ * Create and send an HTTP PATCH 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function patch($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('PATCH', $uri, $options);
+ }
+
+ /**
+ * Create and send an HTTP DELETE 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ *
+ * @throws GuzzleException
+ */
+ public function delete($uri, array $options = []): ResponseInterface
+ {
+ return $this->request('DELETE', $uri, $options);
+ }
+
+ /**
+ * 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.
+ */
+ abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
+
+ /**
+ * Create and send an asynchronous HTTP GET 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function getAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('GET', $uri, $options);
+ }
+
+ /**
+ * Create and send an asynchronous HTTP HEAD 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function headAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('HEAD', $uri, $options);
+ }
+
+ /**
+ * Create and send an asynchronous HTTP PUT 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function putAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('PUT', $uri, $options);
+ }
+
+ /**
+ * Create and send an asynchronous HTTP POST 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function postAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('POST', $uri, $options);
+ }
+
+ /**
+ * Create and send an asynchronous HTTP PATCH 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function patchAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('PATCH', $uri, $options);
+ }
+
+ /**
+ * Create and send an asynchronous HTTP DELETE 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|UriInterface $uri URI object or string.
+ * @param array $options Request options to apply.
+ */
+ public function deleteAsync($uri, array $options = []): PromiseInterface
+ {
+ return $this->requestAsync('DELETE', $uri, $options);
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
new file mode 100644
index 000000000..fa2b10a8c
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
@@ -0,0 +1,307 @@
+<?php
+
+namespace GuzzleHttp\Cookie;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Cookie jar that stores cookies as an array
+ */
+class CookieJar implements CookieJarInterface
+{
+ /**
+ * @var SetCookie[] Loaded cookie data
+ */
+ private $cookies = [];
+
+ /**
+ * @var bool
+ */
+ private $strictMode;
+
+ /**
+ * @param bool $strictMode Set to true to throw exceptions when invalid
+ * cookies are added to the cookie jar.
+ * @param array $cookieArray Array of SetCookie objects or a hash of
+ * arrays that can be used with the SetCookie
+ * constructor
+ */
+ public function __construct(bool $strictMode = false, array $cookieArray = [])
+ {
+ $this->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
+ */
+ public static function fromArray(array $cookies, string $domain): self
+ {
+ $cookieJar = new self();
+ foreach ($cookies as $name => $value) {
+ $cookieJar->setCookie(new SetCookie([
+ 'Domain' => $domain,
+ 'Name' => $name,
+ 'Value' => $value,
+ 'Discard' => true,
+ ]));
+ }
+
+ return $cookieJar;
+ }
+
+ /**
+ * 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
+ */
+ public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool
+ {
+ 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(string $name): ?SetCookie
+ {
+ foreach ($this->cookies as $cookie) {
+ if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) {
+ return $cookie;
+ }
+ }
+
+ return null;
+ }
+
+ public function toArray(): array
+ {
+ return \array_map(static function (SetCookie $cookie): array {
+ return $cookie->toArray();
+ }, $this->getIterator()->getArrayCopy());
+ }
+
+ public function clear(string $domain = null, string $path = null, string $name = null): void
+ {
+ if (!$domain) {
+ $this->cookies = [];
+
+ return;
+ } elseif (!$path) {
+ $this->cookies = \array_filter(
+ $this->cookies,
+ static function (SetCookie $cookie) use ($domain): bool {
+ return !$cookie->matchesDomain($domain);
+ }
+ );
+ } elseif (!$name) {
+ $this->cookies = \array_filter(
+ $this->cookies,
+ static function (SetCookie $cookie) use ($path, $domain): bool {
+ return !($cookie->matchesPath($path)
+ && $cookie->matchesDomain($domain));
+ }
+ );
+ } else {
+ $this->cookies = \array_filter(
+ $this->cookies,
+ static function (SetCookie $cookie) use ($path, $domain, $name) {
+ return !($cookie->getName() == $name
+ && $cookie->matchesPath($path)
+ && $cookie->matchesDomain($domain));
+ }
+ );
+ }
+ }
+
+ public function clearSessionCookies(): void
+ {
+ $this->cookies = \array_filter(
+ $this->cookies,
+ static function (SetCookie $cookie): bool {
+ return !$cookie->getDiscard() && $cookie->getExpires();
+ }
+ );
+ }
+
+ public function setCookie(SetCookie $cookie): bool
+ {
+ // 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);
+ }
+ $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(): int
+ {
+ return \count($this->cookies);
+ }
+
+ /**
+ * @return \ArrayIterator<int, SetCookie>
+ */
+ public function getIterator(): \ArrayIterator
+ {
+ return new \ArrayIterator(\array_values($this->cookies));
+ }
+
+ public function extractCookies(RequestInterface $request, ResponseInterface $response): void
+ {
+ 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
+ *
+ * @see https://tools.ietf.org/html/rfc6265#section-5.1.4
+ */
+ private function getCookiePathFromRequest(RequestInterface $request): string
+ {
+ $uriPath = $request->getUri()->getPath();
+ if ('' === $uriPath) {
+ return '/';
+ }
+ if (0 !== \strpos($uriPath, '/')) {
+ return '/';
+ }
+ if ('/' === $uriPath) {
+ return '/';
+ }
+ $lastSlashPos = \strrpos($uriPath, '/');
+ if (0 === $lastSlashPos || false === $lastSlashPos) {
+ return '/';
+ }
+
+ return \substr($uriPath, 0, $lastSlashPos);
+ }
+
+ public function withCookieHeader(RequestInterface $request): RequestInterface
+ {
+ $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.
+ */
+ private function removeCookieIfEmpty(SetCookie $cookie): void
+ {
+ $cookieValue = $cookie->getValue();
+ if ($cookieValue === null || $cookieValue === '') {
+ $this->clear(
+ $cookie->getDomain(),
+ $cookie->getPath(),
+ $cookie->getName()
+ );
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
new file mode 100644
index 000000000..8c55cc6f7
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
@@ -0,0 +1,80 @@
+<?php
+
+namespace GuzzleHttp\Cookie;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Stores HTTP cookies.
+ *
+ * It extracts cookies from HTTP requests, and returns them in HTTP responses.
+ * CookieJarInterface instances automatically expire contained cookies when
+ * necessary. Subclasses are also responsible for storing and retrieving
+ * cookies from a file, database, etc.
+ *
+ * @see https://docs.python.org/2/library/cookielib.html Inspiration
+ *
+ * @extends \IteratorAggregate<SetCookie>
+ */
+interface CookieJarInterface extends \Countable, \IteratorAggregate
+{
+ /**
+ * Create a request with added cookie headers.
+ *
+ * If no matching cookies are found in the cookie jar, then no Cookie
+ * header is added to the request and the same request is returned.
+ *
+ * @param RequestInterface $request Request object to modify.
+ *
+ * @return RequestInterface returns the modified request.
+ */
+ public function withCookieHeader(RequestInterface $request): RequestInterface;
+
+ /**
+ * Extract cookies from an HTTP response and store them in the CookieJar.
+ *
+ * @param RequestInterface $request Request that was sent
+ * @param ResponseInterface $response Response that was received
+ */
+ public function extractCookies(RequestInterface $request, ResponseInterface $response): void;
+
+ /**
+ * Sets a cookie in the cookie jar.
+ *
+ * @param SetCookie $cookie Cookie to set.
+ *
+ * @return bool Returns true on success or false on failure
+ */
+ public function setCookie(SetCookie $cookie): bool;
+
+ /**
+ * Remove cookies currently held in the cookie jar.
+ *
+ * Invoking this method without arguments will empty the whole cookie jar.
+ * If given a $domain argument only cookies belonging to that domain will
+ * be removed. If given a $domain and $path argument, cookies belonging to
+ * the specified path within that domain are removed. If given all three
+ * arguments, then the cookie with the specified name, path and domain is
+ * removed.
+ *
+ * @param string|null $domain Clears cookies matching a domain
+ * @param string|null $path Clears cookies matching a domain and path
+ * @param string|null $name Clears cookies matching a domain, path, and name
+ */
+ public function clear(string $domain = null, string $path = null, string $name = null): void;
+
+ /**
+ * Discard all sessions cookies.
+ *
+ * Removes cookies that don't have an expire field or a have a discard
+ * field set to true. To be called when the user agent shuts down according
+ * to RFC 2965.
+ */
+ public function clearSessionCookies(): void;
+
+ /**
+ * Converts the cookie jar to an array.
+ */
+ public function toArray(): array;
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
new file mode 100644
index 000000000..290236d54
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
@@ -0,0 +1,101 @@
+<?php
+
+namespace GuzzleHttp\Cookie;
+
+use GuzzleHttp\Utils;
+
+/**
+ * Persists non-session cookies using a JSON formatted file
+ */
+class FileCookieJar extends CookieJar
+{
+ /**
+ * @var string filename
+ */
+ private $filename;
+
+ /**
+ * @var bool Control whether to persist session cookies or not.
+ */
+ private $storeSessionCookies;
+
+ /**
+ * Create a new FileCookieJar object
+ *
+ * @param string $cookieFile File to store the cookie data
+ * @param bool $storeSessionCookies Set to true to store session cookies
+ * in the cookie jar.
+ *
+ * @throws \RuntimeException if the file cannot be found or created
+ */
+ public function __construct(string $cookieFile, bool $storeSessionCookies = false)
+ {
+ parent::__construct();
+ $this->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(string $filename): void
+ {
+ $json = [];
+ /** @var SetCookie $cookie */
+ foreach ($this as $cookie) {
+ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
+ $json[] = $cookie->toArray();
+ }
+ }
+
+ $jsonStr = Utils::jsonEncode($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(string $filename): void
+ {
+ $json = \file_get_contents($filename);
+ if (false === $json) {
+ throw new \RuntimeException("Unable to load file {$filename}");
+ }
+ if ($json === '') {
+ return;
+ }
+
+ $data = Utils::jsonDecode($json, true);
+ if (\is_array($data)) {
+ foreach ($data as $cookie) {
+ $this->setCookie(new SetCookie($cookie));
+ }
+ } elseif (\is_scalar($data) && !empty($data)) {
+ throw new \RuntimeException("Invalid cookie file: {$filename}");
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
new file mode 100644
index 000000000..cb3e67c6a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
@@ -0,0 +1,77 @@
+<?php
+
+namespace GuzzleHttp\Cookie;
+
+/**
+ * Persists cookies in the client session
+ */
+class SessionCookieJar extends CookieJar
+{
+ /**
+ * @var string session key
+ */
+ private $sessionKey;
+
+ /**
+ * @var bool Control whether to persist session cookies or not.
+ */
+ private $storeSessionCookies;
+
+ /**
+ * Create a new SessionCookieJar object
+ *
+ * @param string $sessionKey Session key name to store the cookie
+ * data in session
+ * @param bool $storeSessionCookies Set to true to store session cookies
+ * in the cookie jar.
+ */
+ public function __construct(string $sessionKey, bool $storeSessionCookies = false)
+ {
+ parent::__construct();
+ $this->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(): void
+ {
+ $json = [];
+ /** @var SetCookie $cookie */
+ foreach ($this as $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(): void
+ {
+ 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/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
new file mode 100644
index 000000000..d74915bed
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
@@ -0,0 +1,488 @@
+<?php
+
+namespace GuzzleHttp\Cookie;
+
+/**
+ * Set-Cookie object
+ */
+class SetCookie
+{
+ /**
+ * @var array
+ */
+ private static $defaults = [
+ 'Name' => 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
+ */
+ public static function fromString(string $cookie): self
+ {
+ // 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 (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) {
+ 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 (!isset($data['Name'])) {
+ $data['Name'] = $key;
+ $data['Value'] = $value;
+ } else {
+ foreach (\array_keys(self::$defaults) as $search) {
+ if (!\strcasecmp($search, $key)) {
+ if ($search === 'Max-Age') {
+ if (is_numeric($value)) {
+ $data[$search] = (int) $value;
+ }
+ } else {
+ $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 = self::$defaults;
+
+ if (isset($data['Name'])) {
+ $this->setName($data['Name']);
+ }
+
+ if (isset($data['Value'])) {
+ $this->setValue($data['Value']);
+ }
+
+ if (isset($data['Domain'])) {
+ $this->setDomain($data['Domain']);
+ }
+
+ if (isset($data['Path'])) {
+ $this->setPath($data['Path']);
+ }
+
+ if (isset($data['Max-Age'])) {
+ $this->setMaxAge($data['Max-Age']);
+ }
+
+ if (isset($data['Expires'])) {
+ $this->setExpires($data['Expires']);
+ }
+
+ if (isset($data['Secure'])) {
+ $this->setSecure($data['Secure']);
+ }
+
+ if (isset($data['Discard'])) {
+ $this->setDiscard($data['Discard']);
+ }
+
+ if (isset($data['HttpOnly'])) {
+ $this->setHttpOnly($data['HttpOnly']);
+ }
+
+ // Set the remaining values that don't have extra validation logic
+ foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) {
+ $this->data[$key] = $data[$key];
+ }
+
+ // 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 (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) {
+ $this->setExpires($expires);
+ }
+ }
+
+ 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(): array
+ {
+ 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): void
+ {
+ if (!is_string($name)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Name'] = (string) $name;
+ }
+
+ /**
+ * Get the cookie value.
+ *
+ * @return string|null
+ */
+ public function getValue()
+ {
+ return $this->data['Value'];
+ }
+
+ /**
+ * Set the cookie value.
+ *
+ * @param string $value Cookie value
+ */
+ public function setValue($value): void
+ {
+ if (!is_string($value)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Value'] = (string) $value;
+ }
+
+ /**
+ * Get the domain.
+ *
+ * @return string|null
+ */
+ public function getDomain()
+ {
+ return $this->data['Domain'];
+ }
+
+ /**
+ * Set the domain of the cookie.
+ *
+ * @param string|null $domain
+ */
+ public function setDomain($domain): void
+ {
+ if (!is_string($domain) && null !== $domain) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Domain'] = null === $domain ? null : (string) $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): void
+ {
+ if (!is_string($path)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Path'] = (string) $path;
+ }
+
+ /**
+ * Maximum lifetime of the cookie in seconds.
+ *
+ * @return int|null
+ */
+ public function getMaxAge()
+ {
+ return null === $this->data['Max-Age'] ? null : (int) $this->data['Max-Age'];
+ }
+
+ /**
+ * Set the max-age of the cookie.
+ *
+ * @param int|null $maxAge Max age of the cookie in seconds
+ */
+ public function setMaxAge($maxAge): void
+ {
+ if (!is_int($maxAge) && null !== $maxAge) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Max-Age'] = $maxAge === null ? null : (int) $maxAge;
+ }
+
+ /**
+ * The UNIX timestamp when the cookie Expires.
+ *
+ * @return string|int|null
+ */
+ public function getExpires()
+ {
+ return $this->data['Expires'];
+ }
+
+ /**
+ * Set the unix timestamp for which the cookie will expire.
+ *
+ * @param int|string|null $timestamp Unix timestamp or any English textual datetime description.
+ */
+ public function setExpires($timestamp): void
+ {
+ if (!is_int($timestamp) && !is_string($timestamp) && null !== $timestamp) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Expires'] = null === $timestamp ? null : (\is_numeric($timestamp) ? (int) $timestamp : \strtotime((string) $timestamp));
+ }
+
+ /**
+ * Get whether or not this is a secure cookie.
+ *
+ * @return bool
+ */
+ 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): void
+ {
+ if (!is_bool($secure)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Secure'] = (bool) $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): void
+ {
+ if (!is_bool($discard)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['Discard'] = (bool) $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): void
+ {
+ if (!is_bool($httpOnly)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->data['HttpOnly'] = (bool) $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
+ */
+ public function matchesPath(string $requestPath): bool
+ {
+ $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
+ */
+ public function matchesDomain(string $domain): bool
+ {
+ $cookieDomain = $this->getDomain();
+ if (null === $cookieDomain) {
+ return true;
+ }
+
+ // Remove the leading '.' as per spec in RFC 6265.
+ // https://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.
+ // https://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.
+ */
+ public function isExpired(): bool
+ {
+ 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()
+ {
+ $name = $this->getName();
+ if ($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 null. 0 and empty string are valid. Empty strings
+ // are technically against RFC 6265, but known to happen in the wild.
+ $value = $this->getValue();
+ if ($value === null) {
+ return 'The cookie value must not be empty';
+ }
+
+ // Domains must not be empty, but can be 0. "0" is not a valid internet
+ // domain, but may be used as server name in a private network.
+ $domain = $this->getDomain();
+ if ($domain === null || $domain === '') {
+ return 'The cookie domain must not be empty';
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
new file mode 100644
index 000000000..a80956c9d
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Exception when an HTTP error occurs (4xx or 5xx error)
+ */
+class BadResponseException extends RequestException
+{
+ public function __construct(
+ string $message,
+ RequestInterface $request,
+ ResponseInterface $response,
+ \Throwable $previous = null,
+ array $handlerContext = []
+ ) {
+ parent::__construct($message, $request, $response, $previous, $handlerContext);
+ }
+
+ /**
+ * Current exception and the ones that extend it will always have a response.
+ */
+ public function hasResponse(): bool
+ {
+ return true;
+ }
+
+ /**
+ * This function narrows the return type from the parent class and does not allow it to be nullable.
+ */
+ public function getResponse(): ResponseInterface
+ {
+ /** @var ResponseInterface */
+ return parent::getResponse();
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php b/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php
new file mode 100644
index 000000000..12fa5e351
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+/**
+ * Exception when a client error is encountered (4xx codes)
+ */
+class ClientException extends BadResponseException
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php b/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
new file mode 100644
index 000000000..e1a31519c
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
@@ -0,0 +1,56 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Client\NetworkExceptionInterface;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Exception thrown when a connection cannot be established.
+ *
+ * Note that no response is present for a ConnectException
+ */
+class ConnectException extends TransferException implements NetworkExceptionInterface
+{
+ /**
+ * @var RequestInterface
+ */
+ private $request;
+
+ /**
+ * @var array
+ */
+ private $handlerContext;
+
+ public function __construct(
+ string $message,
+ RequestInterface $request,
+ \Throwable $previous = null,
+ array $handlerContext = []
+ ) {
+ parent::__construct($message, 0, $previous);
+ $this->request = $request;
+ $this->handlerContext = $handlerContext;
+ }
+
+ /**
+ * Get the request that caused the exception
+ */
+ public function getRequest(): RequestInterface
+ {
+ return $this->request;
+ }
+
+ /**
+ * 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.
+ */
+ public function getHandlerContext(): array
+ {
+ return $this->handlerContext;
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php b/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php
new file mode 100644
index 000000000..fa3ed6998
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+use Psr\Http\Client\ClientExceptionInterface;
+
+interface GuzzleException extends ClientExceptionInterface
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php b/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php
new file mode 100644
index 000000000..bfd20e232
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+final class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
new file mode 100644
index 000000000..c2d0a9ccc
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
@@ -0,0 +1,166 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+use GuzzleHttp\BodySummarizer;
+use GuzzleHttp\BodySummarizerInterface;
+use Psr\Http\Client\RequestExceptionInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * HTTP Request exception
+ */
+class RequestException extends TransferException implements RequestExceptionInterface
+{
+ /**
+ * @var RequestInterface
+ */
+ private $request;
+
+ /**
+ * @var ResponseInterface|null
+ */
+ private $response;
+
+ /**
+ * @var array
+ */
+ private $handlerContext;
+
+ public function __construct(
+ string $message,
+ RequestInterface $request,
+ ResponseInterface $response = null,
+ \Throwable $previous = null,
+ array $handlerContext = []
+ ) {
+ // Set the code of the exception if the response is set and not future.
+ $code = $response ? $response->getStatusCode() : 0;
+ parent::__construct($message, $code, $previous);
+ $this->request = $request;
+ $this->response = $response;
+ $this->handlerContext = $handlerContext;
+ }
+
+ /**
+ * Wrap non-RequestExceptions with a RequestException
+ */
+ public static function wrapException(RequestInterface $request, \Throwable $e): RequestException
+ {
+ 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 sent
+ * @param ResponseInterface $response Response received
+ * @param \Throwable|null $previous Previous exception
+ * @param array $handlerContext Optional handler context
+ * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer
+ */
+ public static function create(
+ RequestInterface $request,
+ ResponseInterface $response = null,
+ \Throwable $previous = null,
+ array $handlerContext = [],
+ BodySummarizerInterface $bodySummarizer = null
+ ): self {
+ if (!$response) {
+ return new self(
+ 'Error completing request',
+ $request,
+ null,
+ $previous,
+ $handlerContext
+ );
+ }
+
+ $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:
+ // <html> ... (truncated)
+ $message = \sprintf(
+ '%s: `%s %s` resulted in a `%s %s` response',
+ $label,
+ $request->getMethod(),
+ $uri->__toString(),
+ $response->getStatusCode(),
+ $response->getReasonPhrase()
+ );
+
+ $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response);
+
+ if ($summary !== null) {
+ $message .= ":\n{$summary}\n";
+ }
+
+ return new $className($message, $request, $response, $previous, $handlerContext);
+ }
+
+ /**
+ * Obfuscates URI if there is a username and a password present
+ */
+ private static function obfuscateUri(UriInterface $uri): UriInterface
+ {
+ $userInfo = $uri->getUserInfo();
+
+ if (false !== ($pos = \strpos($userInfo, ':'))) {
+ return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Get the request that caused the exception
+ */
+ public function getRequest(): RequestInterface
+ {
+ return $this->request;
+ }
+
+ /**
+ * Get the associated response
+ */
+ public function getResponse(): ?ResponseInterface
+ {
+ return $this->response;
+ }
+
+ /**
+ * Check if a response was received
+ */
+ public function hasResponse(): bool
+ {
+ 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.
+ */
+ public function getHandlerContext(): array
+ {
+ return $this->handlerContext;
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
new file mode 100644
index 000000000..8055e067c
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+/**
+ * Exception when a server error is encountered (5xx codes)
+ */
+class ServerException extends BadResponseException
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php b/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
new file mode 100644
index 000000000..fad3a57cf
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+class TooManyRedirectsException extends RequestException
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php b/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php
new file mode 100644
index 000000000..507633608
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace GuzzleHttp\Exception;
+
+class TransferException extends \RuntimeException implements GuzzleException
+{
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
new file mode 100644
index 000000000..be88d9e49
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
@@ -0,0 +1,638 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Exception\ConnectException;
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Psr7\LazyOpenStream;
+use GuzzleHttp\TransferStats;
+use GuzzleHttp\Utils;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Creates curl resources from a request
+ *
+ * @final
+ */
+class CurlFactory implements CurlFactoryInterface
+{
+ public const CURL_VERSION_STR = 'curl_version';
+
+ /**
+ * @deprecated
+ */
+ public const LOW_CURL_VERSION_NUMBER = '7.21.2';
+
+ /**
+ * @var resource[]|\CurlHandle[]
+ */
+ private $handles = [];
+
+ /**
+ * @var int Total number of idle handles to keep in cache
+ */
+ private $maxHandles;
+
+ /**
+ * @param int $maxHandles Maximum number of idle handles.
+ */
+ public function __construct(int $maxHandles)
+ {
+ $this->maxHandles = $maxHandles;
+ }
+
+ public function create(RequestInterface $request, array $options): EasyHandle
+ {
+ 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): void
+ {
+ $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(RequestInterface, array): PromiseInterface $handler
+ * @param CurlFactoryInterface $factory Dictates how the handle is released
+ */
+ public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
+ {
+ 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): void
+ {
+ $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
+ );
+ ($easy->options['on_stats'])($stats);
+ }
+
+ /**
+ * @param callable(RequestInterface, array): PromiseInterface $handler
+ */
+ private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
+ {
+ // 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): PromiseInterface
+ {
+ 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 ($easy->createResponseException) {
+ return P\Create::rejectionFor(
+ new RequestException(
+ 'An error was encountered while creating the response',
+ $easy->request,
+ $easy->response,
+ $easy->createResponseException,
+ $ctx
+ )
+ );
+ }
+
+ // If an exception was encountered during the onHeaders event, then
+ // return a rejected promise that wraps that exception.
+ if ($easy->onHeadersException) {
+ return P\Create::rejectionFor(
+ new RequestException(
+ 'An error was encountered during the on_headers event',
+ $easy->request,
+ $easy->response,
+ $easy->onHeadersException,
+ $ctx
+ )
+ );
+ }
+
+ $message = \sprintf(
+ 'cURL error %s: %s (%s)',
+ $ctx['errno'],
+ $ctx['error'],
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
+ );
+ $uriString = (string) $easy->request->getUri();
+ if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) {
+ $message .= \sprintf(' for %s', $uriString);
+ }
+
+ // 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 P\Create::rejectionFor($error);
+ }
+
+ /**
+ * @return array<int|string, mixed>
+ */
+ private function getDefaultConf(EasyHandle $easy): array
+ {
+ $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 => 300,
+ ];
+
+ 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): void
+ {
+ $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 https://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): void
+ {
+ $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] = static 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): void
+ {
+ 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(string $name, array &$options): void
+ {
+ foreach (\array_keys($options['_headers']) as $key) {
+ if (!\strcasecmp($key, $name)) {
+ unset($options['_headers'][$key]);
+
+ return;
+ }
+ }
+ }
+
+ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void
+ {
+ $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']) === true
+ && ($verifyLink = \readlink($options['verify'])) !== false
+ && \is_dir($verifyLink)
+ )
+ ) {
+ $conf[\CURLOPT_CAPATH] = $options['verify'];
+ } else {
+ $conf[\CURLOPT_CAINFO] = $options['verify'];
+ }
+ }
+ }
+ }
+
+ if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) {
+ $accept = $easy->request->getHeaderLine('Accept-Encoding');
+ if ($accept) {
+ $conf[\CURLOPT_ENCODING] = $accept;
+ } else {
+ // The empty string enables all available decoders and implicitly
+ // sets a matching 'Accept-Encoding' header.
+ $conf[\CURLOPT_ENCODING] = '';
+ // But as the user did not specify any acceptable encodings we need
+ // to overwrite this implicit header with an empty one.
+ $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
+ }
+ }
+
+ if (!isset($options['sink'])) {
+ // Use a default temp stream if no sink was set.
+ $options['sink'] = \GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+');
+ }
+ $sink = $options['sink'];
+ if (!\is_string($sink)) {
+ $sink = \GuzzleHttp\Psr7\Utils::streamFor($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] = static function ($ch, $write) use ($sink): int {
+ return $sink->write($write);
+ };
+
+ $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']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
+ unset($conf[\CURLOPT_PROXY]);
+ } else {
+ $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
+ }
+ }
+ }
+ }
+
+ if (isset($options['crypto_method'])) {
+ if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) {
+ if (!defined('CURL_SSLVERSION_TLSv1_0')) {
+ throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL');
+ }
+ $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0;
+ } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) {
+ if (!defined('CURL_SSLVERSION_TLSv1_1')) {
+ throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');
+ }
+ $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1;
+ } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) {
+ if (!defined('CURL_SSLVERSION_TLSv1_2')) {
+ throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL');
+ }
+ $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2;
+ } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) {
+ if (!defined('CURL_SSLVERSION_TLSv1_3')) {
+ throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL');
+ }
+ $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3;
+ } else {
+ throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
+ }
+ }
+
+ 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}");
+ }
+ // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files.
+ // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html
+ $ext = pathinfo($cert, \PATHINFO_EXTENSION);
+ if (preg_match('#^(der|p12)$#i', $ext)) {
+ $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext);
+ }
+ $conf[\CURLOPT_SSLCERT] = $cert;
+ }
+
+ if (isset($options['ssl_key'])) {
+ if (\is_array($options['ssl_key'])) {
+ if (\count($options['ssl_key']) === 2) {
+ [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key'];
+ } else {
+ [$sslKey] = $options['ssl_key'];
+ }
+ }
+
+ $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] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) {
+ $progress($downloadSize, $downloaded, $uploadSize, $uploaded);
+ };
+ }
+
+ if (!empty($options['debug'])) {
+ $conf[\CURLOPT_STDERR] = Utils::debugResource($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.
+ *
+ * @param callable(RequestInterface, array): PromiseInterface $handler
+ */
+ private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface
+ {
+ 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): callable
+ {
+ 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 static function ($ch, $h) use (
+ $onHeaders,
+ $easy,
+ &$startingResponse
+ ) {
+ $value = \trim($h);
+ if ($value === '') {
+ $startingResponse = true;
+ try {
+ $easy->createResponse();
+ } catch (\Exception $e) {
+ $easy->createResponseException = $e;
+
+ return -1;
+ }
+ 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);
+ };
+ }
+
+ public function __destruct()
+ {
+ foreach ($this->handles as $id => $handle) {
+ \curl_close($handle);
+ unset($this->handles[$id]);
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
new file mode 100644
index 000000000..fe57ed5d5
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use Psr\Http\Message\RequestInterface;
+
+interface CurlFactoryInterface
+{
+ /**
+ * Creates a cURL handle resource.
+ *
+ * @param RequestInterface $request Request
+ * @param array $options Transfer options
+ *
+ * @throws \RuntimeException when an option cannot be applied
+ */
+ public function create(RequestInterface $request, array $options): EasyHandle;
+
+ /**
+ * Release an easy handle, allowing it to be reused or closed.
+ *
+ * This function must call unset on the easy handle's "handle" property.
+ */
+ public function release(EasyHandle $easy): void;
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
new file mode 100644
index 000000000..9ad10a9b0
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * HTTP handler that uses cURL easy handles as a transport layer.
+ *
+ * When using the CurlHandler, custom curl options can be specified as an
+ * associative array of curl option constants mapping to values in the
+ * **curl** key of the "client" key of the request.
+ *
+ * @final
+ */
+class CurlHandler
+{
+ /**
+ * @var CurlFactoryInterface
+ */
+ private $factory;
+
+ /**
+ * Accepts an associative array of options:
+ *
+ * - handle_factory: Optional curl factory used to create cURL handles.
+ *
+ * @param array{handle_factory?: ?CurlFactoryInterface} $options Array of options to use with the handler
+ */
+ public function __construct(array $options = [])
+ {
+ $this->factory = $options['handle_factory']
+ ?? new CurlFactory(3);
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ 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/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
new file mode 100644
index 000000000..a64e1821a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -0,0 +1,267 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Utils;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Returns an asynchronous response using curl_multi_* functions.
+ *
+ * When using the CurlMultiHandler, custom curl options can be specified as an
+ * associative array of curl option constants mapping to values in the
+ * **curl** key of the provided request options.
+ *
+ * @final
+ */
+class CurlMultiHandler
+{
+ /**
+ * @var CurlFactoryInterface
+ */
+ private $factory;
+
+ /**
+ * @var int
+ */
+ private $selectTimeout;
+
+ /**
+ * @var int Will be higher than 0 when `curl_multi_exec` is still running.
+ */
+ private $active = 0;
+
+ /**
+ * @var array Request entry handles, indexed by handle id in `addRequest`.
+ *
+ * @see CurlMultiHandler::addRequest
+ */
+ private $handles = [];
+
+ /**
+ * @var array<int, float> An array of delay times, indexed by handle id in `addRequest`.
+ *
+ * @see CurlMultiHandler::addRequest
+ */
+ private $delays = [];
+
+ /**
+ * @var array<mixed> An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt()
+ */
+ private $options = [];
+
+ /** @var resource|\CurlMultiHandle */
+ private $_mh;
+
+ /**
+ * This handler accepts the following options:
+ *
+ * - handle_factory: An optional factory used to create curl handles
+ * - select_timeout: Optional timeout (in seconds) to block before timing
+ * out while selecting curl handles. Defaults to 1 second.
+ * - options: An associative array of CURLMOPT_* options and
+ * corresponding values for curl_multi_setopt()
+ */
+ public function __construct(array $options = [])
+ {
+ $this->factory = $options['handle_factory'] ?? new CurlFactory(50);
+
+ if (isset($options['select_timeout'])) {
+ $this->selectTimeout = $options['select_timeout'];
+ } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
+ @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED);
+ $this->selectTimeout = (int) $selectTimeout;
+ } else {
+ $this->selectTimeout = 1;
+ }
+
+ $this->options = $options['options'] ?? [];
+
+ // unsetting the property forces the first access to go through
+ // __get().
+ unset($this->_mh);
+ }
+
+ /**
+ * @param string $name
+ *
+ * @return resource|\CurlMultiHandle
+ *
+ * @throws \BadMethodCallException when another field as `_mh` will be gotten
+ * @throws \RuntimeException when curl can not initialize a multi handle
+ */
+ public function __get($name)
+ {
+ if ($name !== '_mh') {
+ throw new \BadMethodCallException("Can not get other property as '_mh'.");
+ }
+
+ $multiHandle = \curl_multi_init();
+
+ if (false === $multiHandle) {
+ throw new \RuntimeException('Can not initialize curl multi handle.');
+ }
+
+ $this->_mh = $multiHandle;
+
+ foreach ($this->options as $option => $value) {
+ // A warning is raised in case of a wrong option.
+ curl_multi_setopt($this->_mh, $option, $value);
+ }
+
+ return $this->_mh;
+ }
+
+ public function __destruct()
+ {
+ if (isset($this->_mh)) {
+ \curl_multi_close($this->_mh);
+ unset($this->_mh);
+ }
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ $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(): void
+ {
+ // 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\Utils::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(): void
+ {
+ $queue = P\Utils::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): void
+ {
+ $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): bool
+ {
+ if (!is_int($id)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ // 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(): void
+ {
+ while ($done = \curl_multi_info_read($this->_mh)) {
+ if ($done['msg'] !== \CURLMSG_DONE) {
+ // if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216
+ continue;
+ }
+ $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(): int
+ {
+ $currentTime = Utils::currentTime();
+ $nextTime = \PHP_INT_MAX;
+ foreach ($this->delays as $time) {
+ if ($time < $nextTime) {
+ $nextTime = $time;
+ }
+ }
+
+ return ((int) \max(0, $nextTime - $currentTime)) * 1000000;
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
new file mode 100644
index 000000000..1bc39f4b4
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
@@ -0,0 +1,112 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Psr7\Response;
+use GuzzleHttp\Utils;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Represents a cURL easy handle and the data it populates.
+ *
+ * @internal
+ */
+final class EasyHandle
+{
+ /**
+ * @var resource|\CurlHandle cURL resource
+ */
+ public $handle;
+
+ /**
+ * @var StreamInterface Where data is being written
+ */
+ public $sink;
+
+ /**
+ * @var array Received HTTP headers so far
+ */
+ public $headers = [];
+
+ /**
+ * @var ResponseInterface|null Received response (if any)
+ */
+ public $response;
+
+ /**
+ * @var RequestInterface Request being sent
+ */
+ public $request;
+
+ /**
+ * @var array Request options
+ */
+ public $options = [];
+
+ /**
+ * @var int cURL error number (if any)
+ */
+ public $errno = 0;
+
+ /**
+ * @var \Throwable|null Exception during on_headers (if any)
+ */
+ public $onHeadersException;
+
+ /**
+ * @var \Exception|null Exception during createResponse (if any)
+ */
+ public $createResponseException;
+
+ /**
+ * Attach a response to the easy handle based on the received headers.
+ *
+ * @throws \RuntimeException if no headers have been received or the first
+ * header line is invalid.
+ */
+ public function createResponse(): void
+ {
+ [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($this->headers);
+
+ $normalizedKeys = Utils::normalizeHeaderKeys($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(
+ $status,
+ $headers,
+ $this->sink,
+ $ver,
+ $reason
+ );
+ }
+
+ /**
+ * @param string $name
+ *
+ * @return void
+ *
+ * @throws \BadMethodCallException
+ */
+ public function __get($name)
+ {
+ $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name;
+ throw new \BadMethodCallException($msg);
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php
new file mode 100644
index 000000000..5554b8fa9
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Utils;
+
+/**
+ * @internal
+ */
+final class HeaderProcessor
+{
+ /**
+ * Returns the HTTP version, status code, reason phrase, and headers.
+ *
+ * @param string[] $headers
+ *
+ * @return array{0:string, 1:int, 2:?string, 3:array}
+ *
+ * @throws \RuntimeException
+ */
+ public static function parseHeaders(array $headers): array
+ {
+ if ($headers === []) {
+ throw new \RuntimeException('Expected a non-empty array of header data');
+ }
+
+ $parts = \explode(' ', \array_shift($headers), 3);
+ $version = \explode('/', $parts[0])[1] ?? null;
+
+ if ($version === null) {
+ throw new \RuntimeException('HTTP version missing from header data');
+ }
+
+ $status = $parts[1] ?? null;
+
+ if ($status === null) {
+ throw new \RuntimeException('HTTP status code missing from header data');
+ }
+
+ return [$version, (int) $status, $parts[2] ?? null, Utils::headersFromLines($headers)];
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
new file mode 100644
index 000000000..77ffed521
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
@@ -0,0 +1,212 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\TransferStats;
+use GuzzleHttp\Utils;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Handler that returns responses or throw exceptions from a queue.
+ *
+ * @final
+ */
+class MockHandler implements \Countable
+{
+ /**
+ * @var array
+ */
+ private $queue = [];
+
+ /**
+ * @var RequestInterface|null
+ */
+ private $lastRequest;
+
+ /**
+ * @var array
+ */
+ private $lastOptions = [];
+
+ /**
+ * @var callable|null
+ */
+ private $onFulfilled;
+
+ /**
+ * @var callable|null
+ */
+ private $onRejected;
+
+ /**
+ * Creates a new MockHandler that uses the default handler stack list of
+ * middlewares.
+ *
+ * @param array|null $queue Array of responses, callables, or exceptions.
+ * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
+ * @param callable|null $onRejected Callback to invoke when the return value is rejected.
+ */
+ public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack
+ {
+ return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
+ }
+
+ /**
+ * The passed in value must be an array of
+ * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
+ * callables, or Promises.
+ *
+ * @param array<int, mixed>|null $queue The parameters to be passed to the append function, as an indexed array.
+ * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
+ * @param callable|null $onRejected Callback to invoke when the return value is rejected.
+ */
+ public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
+ {
+ $this->onFulfilled = $onFulfilled;
+ $this->onRejected = $onRejected;
+
+ if ($queue) {
+ // array_values included for BC
+ $this->append(...array_values($queue));
+ }
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ if (!$this->queue) {
+ throw new \OutOfBoundsException('Mock queue is empty');
+ }
+
+ if (isset($options['delay']) && \is_numeric($options['delay'])) {
+ \usleep((int) $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 = $response($request, $options);
+ }
+
+ $response = $response instanceof \Throwable
+ ? P\Create::rejectionFor($response)
+ : P\Create::promiseFor($response);
+
+ return $response->then(
+ function (?ResponseInterface $value) use ($request, $options) {
+ $this->invokeStats($request, $options, $value);
+ if ($this->onFulfilled) {
+ ($this->onFulfilled)($value);
+ }
+
+ if ($value !== null && 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 StreamInterface) {
+ $sink->write($contents);
+ }
+ }
+
+ return $value;
+ },
+ function ($reason) use ($request, $options) {
+ $this->invokeStats($request, $options, null, $reason);
+ if ($this->onRejected) {
+ ($this->onRejected)($reason);
+ }
+
+ return P\Create::rejectionFor($reason);
+ }
+ );
+ }
+
+ /**
+ * Adds one or more variadic requests, exceptions, callables, or promises
+ * to the queue.
+ *
+ * @param mixed ...$values
+ */
+ public function append(...$values): void
+ {
+ foreach ($values as $value) {
+ if ($value instanceof ResponseInterface
+ || $value instanceof \Throwable
+ || $value instanceof PromiseInterface
+ || \is_callable($value)
+ ) {
+ $this->queue[] = $value;
+ } else {
+ throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value));
+ }
+ }
+ }
+
+ /**
+ * Get the last received request.
+ */
+ public function getLastRequest(): ?RequestInterface
+ {
+ return $this->lastRequest;
+ }
+
+ /**
+ * Get the last received request options.
+ */
+ public function getLastOptions(): array
+ {
+ return $this->lastOptions;
+ }
+
+ /**
+ * Returns the number of remaining items in the queue.
+ */
+ public function count(): int
+ {
+ return \count($this->queue);
+ }
+
+ public function reset(): void
+ {
+ $this->queue = [];
+ }
+
+ /**
+ * @param mixed $reason Promise or reason.
+ */
+ private function invokeStats(
+ RequestInterface $request,
+ array $options,
+ ResponseInterface $response = null,
+ $reason = null
+ ): void {
+ if (isset($options['on_stats'])) {
+ $transferTime = $options['transfer_time'] ?? 0;
+ $stats = new TransferStats($request, $response, $transferTime, $reason);
+ ($options['on_stats'])($stats);
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
new file mode 100644
index 000000000..f045b526c
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\RequestOptions;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Provides basic proxies for handlers.
+ *
+ * @final
+ */
+class Proxy
+{
+ /**
+ * Sends synchronous requests to a specific handler while sending all other
+ * requests to another handler.
+ *
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.
+ *
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
+ */
+ public static function wrapSync(callable $default, callable $sync): callable
+ {
+ return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface {
+ return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($request, $options);
+ };
+ }
+
+ /**
+ * Sends streaming requests to a streaming compatible handler while sending
+ * all other requests to a default handler.
+ *
+ * This, for example, could be useful for taking advantage of the
+ * performance benefits of curl while still supporting true streaming
+ * through the StreamHandler.
+ *
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses
+ * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
+ *
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
+ */
+ public static function wrapStreaming(callable $default, callable $streaming): callable
+ {
+ return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface {
+ return empty($options['stream']) ? $default($request, $options) : $streaming($request, $options);
+ };
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
new file mode 100644
index 000000000..61632f564
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
@@ -0,0 +1,615 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Exception\ConnectException;
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\FulfilledPromise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Psr7;
+use GuzzleHttp\TransferStats;
+use GuzzleHttp\Utils;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * HTTP handler that uses PHP's HTTP stream wrapper.
+ *
+ * @final
+ */
+class StreamHandler
+{
+ /**
+ * @var array
+ */
+ private $lastHeaders = [];
+
+ /**
+ * Sends an HTTP request.
+ *
+ * @param RequestInterface $request Request to send.
+ * @param array $options Request transfer options.
+ */
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ // Sleep if there is a delay specified.
+ if (isset($options['delay'])) {
+ \usleep($options['delay'] * 1000);
+ }
+
+ $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
+
+ try {
+ // Does not support the expect header.
+ $request = $request->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 (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed
+ || false !== \strpos($message, 'Connection refused')
+ || false !== \strpos($message, "couldn't connect to host") // error on HHVM
+ || false !== \strpos($message, 'connection attempt failed')
+ ) {
+ $e = new ConnectException($e->getMessage(), $request, $e);
+ } else {
+ $e = RequestException::wrapException($request, $e);
+ }
+ $this->invokeStats($options, $request, $startTime, null, $e);
+
+ return P\Create::rejectionFor($e);
+ }
+ }
+
+ private function invokeStats(
+ array $options,
+ RequestInterface $request,
+ ?float $startTime,
+ ResponseInterface $response = null,
+ \Throwable $error = null
+ ): void {
+ if (isset($options['on_stats'])) {
+ $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []);
+ ($options['on_stats'])($stats);
+ }
+ }
+
+ /**
+ * @param resource $stream
+ */
+ private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface
+ {
+ $hdrs = $this->lastHeaders;
+ $this->lastHeaders = [];
+
+ try {
+ [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs);
+ } catch (\Exception $e) {
+ return P\Create::rejectionFor(
+ new RequestException('An error was encountered while creating the response', $request, null, $e)
+ );
+ }
+
+ [$stream, $headers] = $this->checkDecode($options, $headers, $stream);
+ $stream = Psr7\Utils::streamFor($stream);
+ $sink = $stream;
+
+ if (\strcasecmp('HEAD', $request->getMethod())) {
+ $sink = $this->createSink($stream, $options);
+ }
+
+ try {
+ $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
+ } catch (\Exception $e) {
+ return P\Create::rejectionFor(
+ new RequestException('An error was encountered while creating the response', $request, null, $e)
+ );
+ }
+
+ if (isset($options['on_headers'])) {
+ try {
+ $options['on_headers']($response);
+ } catch (\Exception $e) {
+ return P\Create::rejectionFor(
+ new RequestException('An error was encountered during the on_headers event', $request, $response, $e)
+ );
+ }
+ }
+
+ // 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): StreamInterface
+ {
+ if (!empty($options['stream'])) {
+ return $stream;
+ }
+
+ $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+');
+
+ return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink);
+ }
+
+ /**
+ * @param resource $stream
+ */
+ private function checkDecode(array $options, array $headers, $stream): array
+ {
+ // Automatically decode responses when instructed.
+ if (!empty($options['decode_content'])) {
+ $normalizedKeys = Utils::normalizeHeaderKeys($headers);
+ if (isset($normalizedKeys['content-encoding'])) {
+ $encoding = $headers[$normalizedKeys['content-encoding']];
+ if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
+ $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($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 string $contentLength Header specifying the amount of
+ * data to read.
+ *
+ * @throws \RuntimeException when the sink option is invalid.
+ */
+ private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface
+ {
+ // 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\Utils::copyToStream(
+ $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 = [];
+ \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool {
+ $errors[] = [
+ 'message' => $msg,
+ 'file' => $file,
+ 'line' => $line,
+ ];
+
+ return true;
+ });
+
+ try {
+ $resource = $callback();
+ } finally {
+ \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;
+ }
+
+ /**
+ * @return resource
+ */
+ private function createStream(RequestInterface $request, array $options)
+ {
+ static $methods;
+ if (!$methods) {
+ $methods = \array_flip(\get_class_methods(__CLASS__));
+ }
+
+ if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) {
+ throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request);
+ }
+
+ // 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'][2]) && 'ntlm' === $options['auth'][2]) {
+ throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
+ }
+
+ $uri = $this->resolveHost($request, $options);
+
+ $contextResource = $this->createResource(
+ static function () use ($context, $params) {
+ return \stream_context_create($context, $params);
+ }
+ );
+
+ return $this->createResource(
+ function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
+ $resource = @\fopen((string) $uri, 'r', false, $contextResource);
+ $this->lastHeaders = $http_response_header ?? [];
+
+ if (false === $resource) {
+ throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context);
+ }
+
+ 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): UriInterface
+ {
+ $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 (false === $records || !isset($records[0]['ip'])) {
+ throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
+ }
+
+ return $uri->withHost($records[0]['ip']);
+ }
+ if ('v6' === $options['force_ip_resolve']) {
+ $records = \dns_get_record($uri->getHost(), \DNS_AAAA);
+ if (false === $records || !isset($records[0]['ipv6'])) {
+ throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
+ }
+
+ return $uri->withHost('['.$records[0]['ipv6'].']');
+ }
+ }
+
+ return $uri;
+ }
+
+ private function getDefaultContext(RequestInterface $request): array
+ {
+ $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,
+ ],
+ 'ssl' => [
+ 'peer_name' => $request->getUri()->getHost(),
+ ],
+ ];
+
+ $body = (string) $request->getBody();
+
+ if ('' !== $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;
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ $uri = null;
+
+ if (!\is_array($value)) {
+ $uri = $value;
+ } else {
+ $scheme = $request->getUri()->getScheme();
+ if (isset($value[$scheme])) {
+ if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) {
+ $uri = $value[$scheme];
+ }
+ }
+ }
+
+ if (!$uri) {
+ return;
+ }
+
+ $parsed = $this->parse_proxy($uri);
+ $options['http']['proxy'] = $parsed['proxy'];
+
+ if ($parsed['auth']) {
+ if (!isset($options['http']['header'])) {
+ $options['http']['header'] = [];
+ }
+ $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}";
+ }
+ }
+
+ /**
+ * Parses the given proxy URL to make it compatible with the format PHP's stream context expects.
+ */
+ private function parse_proxy(string $url): array
+ {
+ $parsed = \parse_url($url);
+
+ if ($parsed !== false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') {
+ if (isset($parsed['host']) && isset($parsed['port'])) {
+ $auth = null;
+ if (isset($parsed['user']) && isset($parsed['pass'])) {
+ $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}");
+ }
+
+ return [
+ 'proxy' => "tcp://{$parsed['host']}:{$parsed['port']}",
+ 'auth' => $auth ? "Basic {$auth}" : null,
+ ];
+ }
+ }
+
+ // Return proxy as-is.
+ return [
+ 'proxy' => $url,
+ 'auth' => null,
+ ];
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ if ($value > 0) {
+ $options['http']['timeout'] = $value;
+ }
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ if (
+ $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT
+ || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT
+ || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
+ || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT)
+ ) {
+ $options['http']['crypto_method'] = $value;
+
+ return;
+ }
+
+ throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided');
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ if ($value === false) {
+ $options['ssl']['verify_peer'] = false;
+ $options['ssl']['verify_peer_name'] = false;
+
+ return;
+ }
+
+ if (\is_string($value)) {
+ $options['ssl']['cafile'] = $value;
+ if (!\file_exists($value)) {
+ throw new \RuntimeException("SSL CA bundle not found: $value");
+ }
+ } elseif ($value !== true) {
+ throw new \InvalidArgumentException('Invalid verify request option');
+ }
+
+ $options['ssl']['verify_peer'] = true;
+ $options['ssl']['verify_peer_name'] = true;
+ $options['ssl']['allow_self_signed'] = false;
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ 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;
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ self::addNotification(
+ $params,
+ static function ($code, $a, $b, $c, $transferred, $total) use ($value) {
+ if ($code == \STREAM_NOTIFY_PROGRESS) {
+ // The upload progress cannot be determined. Use 0 for cURL compatibility:
+ // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html
+ $value($total, $transferred, 0, 0);
+ }
+ }
+ );
+ }
+
+ /**
+ * @param mixed $value as passed via Request transfer options.
+ */
+ private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void
+ {
+ 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 = Utils::debugResource($value);
+ $ident = $request->getMethod().' '.$request->getUri()->withFragment('');
+ self::addNotification(
+ $params,
+ static function (int $code, ...$passed) use ($ident, $value, $map, $args): void {
+ \fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
+ foreach (\array_filter($passed) as $i => $v) {
+ \fwrite($value, $args[$i].': "'.$v.'" ');
+ }
+ \fwrite($value, "\n");
+ }
+ );
+ }
+
+ private static function addNotification(array &$params, callable $notify): void
+ {
+ // Wrap the existing function if needed.
+ if (!isset($params['notification'])) {
+ $params['notification'] = $notify;
+ } else {
+ $params['notification'] = self::callArray([
+ $params['notification'],
+ $notify,
+ ]);
+ }
+ }
+
+ private static function callArray(array $functions): callable
+ {
+ return static function (...$args) use ($functions) {
+ foreach ($functions as $fn) {
+ $fn(...$args);
+ }
+ };
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php
new file mode 100644
index 000000000..6cb12f07a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php
@@ -0,0 +1,275 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Creates a composed Guzzle handler function by stacking middlewares on top of
+ * an HTTP handler function.
+ *
+ * @final
+ */
+class HandlerStack
+{
+ /**
+ * @var (callable(RequestInterface, array): PromiseInterface)|null
+ */
+ private $handler;
+
+ /**
+ * @var array{(callable(callable(RequestInterface, array): PromiseInterface): callable), (string|null)}[]
+ */
+ private $stack = [];
+
+ /**
+ * @var (callable(RequestInterface, array): PromiseInterface)|null
+ */
+ private $cached;
+
+ /**
+ * Creates a default handler stack that can be used by clients.
+ *
+ * The returned handler will wrap the provided handler or use the most
+ * appropriate default handler for your system. The returned HandlerStack has
+ * support for cookies, redirects, HTTP error exceptions, and preparing a body
+ * before sending.
+ *
+ * The returned handler stack can be passed to a client in the "handler"
+ * option.
+ *
+ * @param (callable(RequestInterface, array): PromiseInterface)|null $handler HTTP handler function to use with the stack. If no
+ * handler is provided, the best handler for your
+ * system will be utilized.
+ */
+ public static function create(callable $handler = null): self
+ {
+ $stack = new self($handler ?: Utils::chooseHandler());
+ $stack->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(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler.
+ */
+ public function __construct(callable $handler = null)
+ {
+ $this->handler = $handler;
+ }
+
+ /**
+ * Invokes the handler stack as a composed handler
+ *
+ * @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 !== null) {
+ $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(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and
+ * returns a Promise.
+ */
+ public function setHandler(callable $handler): void
+ {
+ $this->handler = $handler;
+ $this->cached = null;
+ }
+
+ /**
+ * Returns true if the builder has a handler.
+ */
+ public function hasHandler(): bool
+ {
+ return $this->handler !== null;
+ }
+
+ /**
+ * Unshift a middleware to the bottom of the stack.
+ *
+ * @param callable(callable): callable $middleware Middleware function
+ * @param string $name Name to register for this middleware.
+ */
+ public function unshift(callable $middleware, string $name = null): void
+ {
+ \array_unshift($this->stack, [$middleware, $name]);
+ $this->cached = null;
+ }
+
+ /**
+ * Push a middleware to the top of the stack.
+ *
+ * @param callable(callable): callable $middleware Middleware function
+ * @param string $name Name to register for this middleware.
+ */
+ public function push(callable $middleware, string $name = ''): void
+ {
+ $this->stack[] = [$middleware, $name];
+ $this->cached = null;
+ }
+
+ /**
+ * Add a middleware before another middleware by name.
+ *
+ * @param string $findName Middleware to find
+ * @param callable(callable): callable $middleware Middleware function
+ * @param string $withName Name to register for this middleware.
+ */
+ public function before(string $findName, callable $middleware, string $withName = ''): void
+ {
+ $this->splice($findName, $withName, $middleware, true);
+ }
+
+ /**
+ * Add a middleware after another middleware by name.
+ *
+ * @param string $findName Middleware to find
+ * @param callable(callable): callable $middleware Middleware function
+ * @param string $withName Name to register for this middleware.
+ */
+ public function after(string $findName, callable $middleware, string $withName = ''): void
+ {
+ $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): void
+ {
+ if (!is_string($remove) && !is_callable($remove)) {
+ trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
+ }
+
+ $this->cached = null;
+ $idx = \is_callable($remove) ? 0 : 1;
+ $this->stack = \array_values(\array_filter(
+ $this->stack,
+ static function ($tuple) use ($idx, $remove) {
+ return $tuple[$idx] !== $remove;
+ }
+ ));
+ }
+
+ /**
+ * Compose the middleware and handler into a single callable function.
+ *
+ * @return callable(RequestInterface, array): PromiseInterface
+ */
+ public function resolve(): callable
+ {
+ if ($this->cached === null) {
+ if (($prev = $this->handler) === null) {
+ throw new \LogicException('No handler has been specified');
+ }
+
+ foreach (\array_reverse($this->stack) as $fn) {
+ /** @var callable(RequestInterface, array): PromiseInterface $prev */
+ $prev = $fn[0]($prev);
+ }
+
+ $this->cached = $prev;
+ }
+
+ return $this->cached;
+ }
+
+ private function findByName(string $name): int
+ {
+ 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.
+ */
+ private function splice(string $findName, string $withName, callable $middleware, bool $before): void
+ {
+ $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 callable|string $fn Function to write as a string.
+ */
+ private function debugCallable($fn): string
+ {
+ 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]}'])";
+ }
+
+ /** @var object $fn */
+ return 'callable('.\spl_object_hash($fn).')';
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
new file mode 100644
index 000000000..04e9eb37a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Formats log messages using variable substitutions for requests, responses,
+ * and other transactional data.
+ *
+ * The following variable substitutions are supported:
+ *
+ * - {request}: Full HTTP request message
+ * - {response}: Full HTTP response message
+ * - {ts}: ISO 8601 date in GMT
+ * - {date_iso_8601} ISO 8601 date in GMT
+ * - {date_common_log} Apache common log date using the configured timezone.
+ * - {host}: Host of the request
+ * - {method}: Method of the request
+ * - {uri}: URI of the request
+ * - {version}: Protocol version
+ * - {target}: Request target of the request (path + query + fragment)
+ * - {hostname}: Hostname of the machine that sent the request
+ * - {code}: Status code of the response (if available)
+ * - {phrase}: Reason phrase of the response (if available)
+ * - {error}: Any error messages (if available)
+ * - {req_header_*}: Replace `*` with the lowercased name of a request header to add to the message
+ * - {res_header_*}: Replace `*` with the lowercased name of a response header to add to the message
+ * - {req_headers}: Request headers
+ * - {res_headers}: Response headers
+ * - {req_body}: Request body
+ * - {res_body}: Response body
+ *
+ * @final
+ */
+class MessageFormatter implements MessageFormatterInterface
+{
+ /**
+ * Apache Common Log Format.
+ *
+ * @see https://httpd.apache.org/docs/2.4/logs.html#common
+ *
+ * @var string
+ */
+ public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}';
+ public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
+ public 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(?string $template = self::CLF)
+ {
+ $this->template = $template ?: self::CLF;
+ }
+
+ /**
+ * Returns a formatted message string.
+ *
+ * @param RequestInterface $request Request that was sent
+ * @param ResponseInterface|null $response Response that was received
+ * @param \Throwable|null $error Exception that was received
+ */
+ public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string
+ {
+ $cache = [];
+
+ /** @var string */
+ 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\Message::toString($request);
+ break;
+ case 'response':
+ $result = $response ? Psr7\Message::toString($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()->__toString();
+ break;
+ case 'res_body':
+ if (!$response instanceof ResponseInterface) {
+ $result = 'NULL';
+ break;
+ }
+
+ $body = $response->getBody();
+
+ if (!$body->isSeekable()) {
+ $result = 'RESPONSE_NOT_LOGGEABLE';
+ break;
+ }
+
+ $result = $response->getBody()->__toString();
+ 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()->__toString();
+ 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
+ */
+ private function headers(MessageInterface $message): string
+ {
+ $result = '';
+ foreach ($message->getHeaders() as $name => $values) {
+ $result .= $name.': '.\implode(', ', $values)."\r\n";
+ }
+
+ return \trim($result);
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
new file mode 100644
index 000000000..47934614a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+interface MessageFormatterInterface
+{
+ /**
+ * Returns a formatted message string.
+ *
+ * @param RequestInterface $request Request that was sent
+ * @param ResponseInterface|null $response Response that was received
+ * @param \Throwable|null $error Exception that was received
+ */
+ public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string;
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php
new file mode 100644
index 000000000..7e3eb6b3a
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Middleware.php
@@ -0,0 +1,268 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Cookie\CookieJarInterface;
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Functions used to create and wrap handlers with handler middleware.
+ */
+final class Middleware
+{
+ /**
+ * Middleware that adds cookies to requests.
+ *
+ * The options array must be set to a CookieJarInterface in order to use
+ * cookies. This is typically handled for you by a client.
+ *
+ * @return callable Returns a function that accepts the next handler.
+ */
+ public static function cookies(): callable
+ {
+ return static function (callable $handler): callable {
+ return static function ($request, array $options) use ($handler) {
+ if (empty($options['cookies'])) {
+ return $handler($request, $options);
+ } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
+ throw new \InvalidArgumentException('cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface');
+ }
+ $cookieJar = $options['cookies'];
+ $request = $cookieJar->withCookieHeader($request);
+
+ return $handler($request, $options)
+ ->then(
+ static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface {
+ $cookieJar->extractCookies($request, $response);
+
+ return $response;
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * Middleware that throws exceptions for 4xx or 5xx responses when the
+ * "http_errors" request option is set to true.
+ *
+ * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages.
+ *
+ * @return callable(callable): callable Returns a function that accepts the next handler.
+ */
+ public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable
+ {
+ return static function (callable $handler) use ($bodySummarizer): callable {
+ return static function ($request, array $options) use ($handler, $bodySummarizer) {
+ if (empty($options['http_errors'])) {
+ return $handler($request, $options);
+ }
+
+ return $handler($request, $options)->then(
+ static function (ResponseInterface $response) use ($request, $bodySummarizer) {
+ $code = $response->getStatusCode();
+ if ($code < 400) {
+ return $response;
+ }
+ throw RequestException::create($request, $response, null, [], $bodySummarizer);
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * Middleware that pushes history data to an ArrayAccess container.
+ *
+ * @param array|\ArrayAccess<int, array> $container Container to hold the history (by reference).
+ *
+ * @return callable(callable): callable Returns a function that accepts the next handler.
+ *
+ * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
+ */
+ public static function history(&$container): callable
+ {
+ if (!\is_array($container) && !$container instanceof \ArrayAccess) {
+ throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
+ }
+
+ return static function (callable $handler) use (&$container): callable {
+ return static function (RequestInterface $request, array $options) use ($handler, &$container) {
+ return $handler($request, $options)->then(
+ static function ($value) use ($request, &$container, $options) {
+ $container[] = [
+ 'request' => $request,
+ 'response' => $value,
+ 'error' => null,
+ 'options' => $options,
+ ];
+
+ return $value;
+ },
+ static function ($reason) use ($request, &$container, $options) {
+ $container[] = [
+ 'request' => $request,
+ 'response' => null,
+ 'error' => $reason,
+ 'options' => $options,
+ ];
+
+ return P\Create::rejectionFor($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): callable
+ {
+ return static function (callable $handler) use ($before, $after): callable {
+ return static function (RequestInterface $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(): callable
+ {
+ return static function (callable $handler): RedirectMiddleware {
+ 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): callable
+ {
+ return static function (callable $handler) use ($decider, $delay): RetryMiddleware {
+ return new RetryMiddleware($decider, $handler, $delay);
+ };
+ }
+
+ /**
+ * Middleware that logs requests, responses, and errors using a message
+ * formatter.
+ *
+ * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
+ *
+ * @param LoggerInterface $logger Logs messages.
+ * @param MessageFormatterInterface|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, $formatter, string $logLevel = 'info'): callable
+ {
+ // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter
+ if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) {
+ throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class));
+ }
+
+ return static function (callable $handler) use ($logger, $formatter, $logLevel): callable {
+ return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) {
+ return $handler($request, $options)->then(
+ static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface {
+ $message = $formatter->format($request, $response);
+ $logger->log($logLevel, $message);
+
+ return $response;
+ },
+ static function ($reason) use ($logger, $request, $formatter): PromiseInterface {
+ $response = $reason instanceof RequestException ? $reason->getResponse() : null;
+ $message = $formatter->format($request, $response, P\Create::exceptionFor($reason));
+ $logger->error($message);
+
+ return P\Create::rejectionFor($reason);
+ }
+ );
+ };
+ };
+ }
+
+ /**
+ * This middleware adds a default content-type if possible, a default
+ * content-length or transfer-encoding header, and the expect header.
+ */
+ public static function prepareBody(): callable
+ {
+ return static function (callable $handler): PrepareBodyMiddleware {
+ 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.
+ */
+ public static function mapRequest(callable $fn): callable
+ {
+ return static function (callable $handler) use ($fn): callable {
+ return static function (RequestInterface $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.
+ */
+ public static function mapResponse(callable $fn): callable
+ {
+ return static function (callable $handler) use ($fn): callable {
+ return static function (RequestInterface $request, array $options) use ($handler, $fn) {
+ return $handler($request, $options)->then($fn);
+ };
+ };
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php
new file mode 100644
index 000000000..6277c61fb
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -0,0 +1,125 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\EachPromise;
+use GuzzleHttp\Promise\PromiseInterface;
+use GuzzleHttp\Promise\PromisorInterface;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Sends an iterator of requests concurrently using a capped pool size.
+ *
+ * The pool will read from an iterator until it is cancelled or until the
+ * iterator is consumed. When a request is yielded, the request is sent after
+ * applying the "request_options" request options (if provided in the ctor).
+ *
+ * When a function is yielded by the iterator, the function is provided the
+ * "request_options" array that should be merged on top of any existing
+ * options, and the function MUST then return a wait-able promise.
+ *
+ * @final
+ */
+class Pool implements PromisorInterface
+{
+ /**
+ * @var EachPromise
+ */
+ private $each;
+
+ /**
+ * @param ClientInterface $client Client used to send the requests.
+ * @param array|\Iterator $requests Requests or functions that return
+ * requests to send concurrently.
+ * @param array $config Associative array of options
+ * - concurrency: (int) Maximum number of requests to send concurrently
+ * - options: Array of request options to apply to each request.
+ * - fulfilled: (callable) Function to invoke when a request completes.
+ * - rejected: (callable) Function to invoke when a request is rejected.
+ */
+ public function __construct(ClientInterface $client, $requests, array $config = [])
+ {
+ if (!isset($config['concurrency'])) {
+ $config['concurrency'] = 25;
+ }
+
+ if (isset($config['options'])) {
+ $opts = $config['options'];
+ unset($config['options']);
+ } else {
+ $opts = [];
+ }
+
+ $iterable = P\Create::iterFor($requests);
+ $requests = static function () use ($iterable, $client, $opts) {
+ foreach ($iterable as $key => $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
+ */
+ public function promise(): PromiseInterface
+ {
+ 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 = []): array
+ {
+ $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)
+ */
+ private static function cmpCallback(array &$options, string $name, array &$results): void
+ {
+ if (!isset($options[$name])) {
+ $options[$name] = static function ($v, $k) use (&$results) {
+ $results[$k] = $v;
+ };
+ } else {
+ $currentFn = $options[$name];
+ $options[$name] = static function ($v, $k) use (&$results, $currentFn) {
+ $currentFn($v, $k);
+ $results[$k] = $v;
+ };
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
new file mode 100644
index 000000000..0a8de8128
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
@@ -0,0 +1,105 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Prepares requests that contain a body, adding the Content-Length,
+ * Content-Type, and Expect headers.
+ *
+ * @final
+ */
+class PrepareBodyMiddleware
+{
+ /**
+ * @var callable(RequestInterface, array): PromiseInterface
+ */
+ private $nextHandler;
+
+ /**
+ * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
+ */
+ public function __construct(callable $nextHandler)
+ {
+ $this->nextHandler = $nextHandler;
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ $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 (is_string($uri) && $type = Psr7\MimeType::fromFilename($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\Utils::modifyRequest($request, $modify), $options);
+ }
+
+ /**
+ * Add expect header
+ */
+ private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void
+ {
+ // Determine if the Expect header should be used
+ if ($request->hasHeader('Expect')) {
+ return;
+ }
+
+ $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/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
new file mode 100644
index 000000000..7aa21a623
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
@@ -0,0 +1,228 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Exception\BadResponseException;
+use GuzzleHttp\Exception\TooManyRedirectsException;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Request redirect middleware.
+ *
+ * Apply this middleware like other middleware using
+ * {@see \GuzzleHttp\Middleware::redirect()}.
+ *
+ * @final
+ */
+class RedirectMiddleware
+{
+ public const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
+
+ public const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
+
+ /**
+ * @var array
+ */
+ public static $defaultSettings = [
+ 'max' => 5,
+ 'protocols' => ['http', 'https'],
+ 'strict' => false,
+ 'referer' => false,
+ 'track_redirects' => false,
+ ];
+
+ /**
+ * @var callable(RequestInterface, array): PromiseInterface
+ */
+ private $nextHandler;
+
+ /**
+ * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
+ */
+ public function __construct(callable $nextHandler)
+ {
+ $this->nextHandler = $nextHandler;
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ $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);
+ });
+ }
+
+ /**
+ * @return ResponseInterface|PromiseInterface
+ */
+ public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response)
+ {
+ if (\strpos((string) $response->getStatusCode(), '3') !== 0
+ || !$response->hasHeader('Location')
+ ) {
+ return $response;
+ }
+
+ $this->guardMax($request, $response, $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'])) {
+ ($options['allow_redirects']['on_redirect'])(
+ $request,
+ $response,
+ $nextRequest->getUri()
+ );
+ }
+
+ $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.
+ */
+ private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface
+ {
+ return $promise->then(
+ static 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, (string) $statusCode);
+
+ return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
+ ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
+ }
+ );
+ }
+
+ /**
+ * Check for too many redirects.
+ *
+ * @throws TooManyRedirectsException Too many redirects.
+ */
+ private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void
+ {
+ $current = $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, $response);
+ }
+ }
+
+ public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface
+ {
+ // 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'])
+ ) {
+ $safeMethods = ['GET', 'HEAD', 'OPTIONS'];
+ $requestMethod = $request->getMethod();
+
+ $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : '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\Message::rewindBody($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\Utils::modifyRequest($request, $modify);
+ }
+
+ /**
+ * Set the appropriate URL on the request based on the location header.
+ */
+ private static function redirectUri(
+ RequestInterface $request,
+ ResponseInterface $response,
+ array $protocols
+ ): UriInterface {
+ $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/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php
new file mode 100644
index 000000000..bf3b02b6b
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php
@@ -0,0 +1,276 @@
+<?php
+
+namespace GuzzleHttp;
+
+/**
+ * This class contains a list of built-in Guzzle request options.
+ *
+ * More documentation for each option can be found at http://guzzlephp.org/.
+ *
+ * @see http://docs.guzzlephp.org/en/v6/request-options.html
+ */
+final class RequestOptions
+{
+ /**
+ * allow_redirects: (bool|array) Controls redirect behavior. Pass false
+ * to disable redirects, pass true to enable redirects, pass an
+ * associative to provide custom redirect settings. Defaults to "false".
+ * This option only works if your handler has the RedirectMiddleware. When
+ * passing an associative array, you can provide the following key value
+ * pairs:
+ *
+ * - max: (int, default=5) maximum number of allowed redirects.
+ * - strict: (bool, default=false) Set to true to use strict redirects
+ * meaning redirect POST requests with POST requests vs. doing what most
+ * browsers do which is redirect POST requests with GET requests
+ * - referer: (bool, default=false) Set to true to enable the Referer
+ * header.
+ * - protocols: (array, default=['http', 'https']) Allowed redirect
+ * protocols.
+ * - on_redirect: (callable) PHP callable that is invoked when a redirect
+ * is encountered. The callable is invoked with the request, the redirect
+ * response that was received, and the effective URI. Any return value
+ * from the on_redirect function is ignored.
+ */
+ public const ALLOW_REDIRECTS = 'allow_redirects';
+
+ /**
+ * auth: (array) Pass an array of HTTP authentication parameters to use
+ * with the request. The array must contain the username in index [0],
+ * the password in index [1], and you can optionally provide a built-in
+ * authentication type in index [2]. Pass null to disable authentication
+ * for a request.
+ */
+ public const AUTH = 'auth';
+
+ /**
+ * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
+ * Body to send in the request.
+ */
+ public const BODY = 'body';
+
+ /**
+ * cert: (string|array) Set to a string to specify the path to a file
+ * containing a PEM formatted SSL client side certificate. If a password
+ * is required, then set cert to an array containing the path to the PEM
+ * file in the first array element followed by the certificate password
+ * in the second array element.
+ */
+ public const CERT = 'cert';
+
+ /**
+ * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
+ * Specifies whether or not cookies are used in a request or what cookie
+ * jar to use or what cookies to send. This option only works if your
+ * handler has the `cookie` middleware. Valid values are `false` and
+ * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
+ */
+ public const COOKIES = 'cookies';
+
+ /**
+ * connect_timeout: (float, default=0) Float describing the number of
+ * seconds to wait while trying to connect to a server. Use 0 to wait
+ * 300 seconds (the default behavior).
+ */
+ public const CONNECT_TIMEOUT = 'connect_timeout';
+
+ /**
+ * crypto_method: (int) A value describing the minimum TLS protocol
+ * version to use.
+ *
+ * This setting must be set to one of the
+ * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is
+ * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required
+ * in order to specify a crypto method, with cURL 7.52.0 or higher being
+ * required to use TLS 1.3.
+ */
+ public const CRYPTO_METHOD = 'crypto_method';
+
+ /**
+ * debug: (bool|resource) Set to true or set to a PHP stream returned by
+ * fopen() enable debug output with the HTTP handler used to send a
+ * request.
+ */
+ public const DEBUG = 'debug';
+
+ /**
+ * decode_content: (bool, default=true) Specify whether or not
+ * Content-Encoding responses (gzip, deflate, etc.) are automatically
+ * decoded.
+ */
+ public const DECODE_CONTENT = 'decode_content';
+
+ /**
+ * delay: (int) The amount of time to delay before sending in milliseconds.
+ */
+ public const DELAY = 'delay';
+
+ /**
+ * expect: (bool|integer) Controls the behavior of the
+ * "Expect: 100-Continue" header.
+ *
+ * Set to `true` to enable the "Expect: 100-Continue" header for all
+ * requests that sends a body. Set to `false` to disable the
+ * "Expect: 100-Continue" header for all requests. Set to a number so that
+ * the size of the payload must be greater than the number in order to send
+ * the Expect header. Setting to a number will send the Expect header for
+ * all requests in which the size of the payload cannot be determined or
+ * where the body is not rewindable.
+ *
+ * By default, Guzzle will add the "Expect: 100-Continue" header when the
+ * size of the body of a request is greater than 1 MB and a request is
+ * using HTTP/1.1.
+ */
+ public const EXPECT = 'expect';
+
+ /**
+ * form_params: (array) Associative array of form field names to values
+ * where each value is a string or array of strings. Sets the Content-Type
+ * header to application/x-www-form-urlencoded when no Content-Type header
+ * is already present.
+ */
+ public const FORM_PARAMS = 'form_params';
+
+ /**
+ * headers: (array) Associative array of HTTP headers. Each value MUST be
+ * a string or array of strings.
+ */
+ public const HEADERS = 'headers';
+
+ /**
+ * http_errors: (bool, default=true) Set to false to disable exceptions
+ * when a non- successful HTTP response is received. By default,
+ * exceptions will be thrown for 4xx and 5xx responses. This option only
+ * works if your handler has the `httpErrors` middleware.
+ */
+ public const HTTP_ERRORS = 'http_errors';
+
+ /**
+ * idn: (bool|int, default=true) A combination of IDNA_* constants for
+ * idn_to_ascii() PHP's function (see "options" parameter). Set to false to
+ * disable IDN support completely, or to true to use the default
+ * configuration (IDNA_DEFAULT constant).
+ */
+ public const IDN_CONVERSION = 'idn_conversion';
+
+ /**
+ * json: (mixed) Adds JSON data to a request. The provided value is JSON
+ * encoded and a Content-Type header of application/json will be added to
+ * the request if no Content-Type header is already present.
+ */
+ public const JSON = 'json';
+
+ /**
+ * multipart: (array) Array of associative arrays, each containing a
+ * required "name" key mapping to the form field, name, a required
+ * "contents" key mapping to a StreamInterface|resource|string, an
+ * optional "headers" associative array of custom headers, and an
+ * optional "filename" key mapping to a string to send as the filename in
+ * the part. If no "filename" key is present, then no "filename" attribute
+ * will be added to the part.
+ */
+ public const MULTIPART = 'multipart';
+
+ /**
+ * on_headers: (callable) A callable that is invoked when the HTTP headers
+ * of the response have been received but the body has not yet begun to
+ * download.
+ */
+ public const ON_HEADERS = 'on_headers';
+
+ /**
+ * on_stats: (callable) allows you to get access to transfer statistics of
+ * a request and access the lower level transfer details of the handler
+ * associated with your client. ``on_stats`` is a callable that is invoked
+ * when a handler has finished sending a request. The callback is invoked
+ * with transfer statistics about the request, the response received, or
+ * the error encountered. Included in the data is the total amount of time
+ * taken to send the request.
+ */
+ public const ON_STATS = 'on_stats';
+
+ /**
+ * progress: (callable) Defines a function to invoke when transfer
+ * progress is made. The function accepts the following positional
+ * arguments: the total number of bytes expected to be downloaded, the
+ * number of bytes downloaded so far, the number of bytes expected to be
+ * uploaded, the number of bytes uploaded so far.
+ */
+ public const PROGRESS = 'progress';
+
+ /**
+ * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
+ * array to specify different proxies for different protocols (where the
+ * key is the protocol and the value is a proxy string).
+ */
+ public const PROXY = 'proxy';
+
+ /**
+ * query: (array|string) Associative array of query string values to add
+ * to the request. This option uses PHP's http_build_query() to create
+ * the string representation. Pass a string value if you need more
+ * control than what this method provides
+ */
+ public const QUERY = 'query';
+
+ /**
+ * sink: (resource|string|StreamInterface) Where the data of the
+ * response is written to. Defaults to a PHP temp stream. Providing a
+ * string will write data to a file by the given name.
+ */
+ public const SINK = 'sink';
+
+ /**
+ * synchronous: (bool) Set to true to inform HTTP handlers that you intend
+ * on waiting on the response. This can be useful for optimizations. Note
+ * that a promise is still returned if you are using one of the async
+ * client methods.
+ */
+ public const SYNCHRONOUS = 'synchronous';
+
+ /**
+ * ssl_key: (array|string) Specify the path to a file containing a private
+ * SSL key in PEM format. If a password is required, then set to an array
+ * containing the path to the SSL key in the first array element followed
+ * by the password required for the certificate in the second element.
+ */
+ public const SSL_KEY = 'ssl_key';
+
+ /**
+ * stream: Set to true to attempt to stream a response rather than
+ * download it all up-front.
+ */
+ public const STREAM = 'stream';
+
+ /**
+ * verify: (bool|string, default=true) Describes the SSL certificate
+ * verification behavior of a request. Set to true to enable SSL
+ * certificate verification using the system CA bundle when available
+ * (the default). Set to false to disable certificate verification (this
+ * is insecure!). Set to a string to provide the path to a CA bundle on
+ * disk to enable verification using a custom certificate.
+ */
+ public const VERIFY = 'verify';
+
+ /**
+ * timeout: (float, default=0) Float describing the timeout of the
+ * request in seconds. Use 0 to wait indefinitely (the default behavior).
+ */
+ public const TIMEOUT = 'timeout';
+
+ /**
+ * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
+ * the body read timeout, for stream requests.
+ */
+ public const READ_TIMEOUT = 'read_timeout';
+
+ /**
+ * version: (float) Specifies the HTTP protocol version to attempt to use.
+ */
+ public const VERSION = 'version';
+
+ /**
+ * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
+ */
+ public const FORCE_IP_RESOLVE = 'force_ip_resolve';
+}
diff --git a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
new file mode 100644
index 000000000..8f4d93ac4
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
@@ -0,0 +1,119 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Promise as P;
+use GuzzleHttp\Promise\PromiseInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Middleware that retries requests based on the boolean result of
+ * invoking the provided "decider" function.
+ *
+ * @final
+ */
+class RetryMiddleware
+{
+ /**
+ * @var callable(RequestInterface, array): PromiseInterface
+ */
+ private $nextHandler;
+
+ /**
+ * @var callable
+ */
+ private $decider;
+
+ /**
+ * @var callable(int)
+ */
+ private $delay;
+
+ /**
+ * @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(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
+ * @param (callable(int): int)|null $delay Function that accepts the number of retries
+ * and returns the number of
+ * milliseconds to delay.
+ */
+ public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
+ {
+ $this->decider = $decider;
+ $this->nextHandler = $nextHandler;
+ $this->delay = $delay ?: __CLASS__.'::exponentialDelay';
+ }
+
+ /**
+ * Default exponential backoff delay function.
+ *
+ * @return int milliseconds.
+ */
+ public static function exponentialDelay(int $retries): int
+ {
+ return (int) 2 ** ($retries - 1) * 1000;
+ }
+
+ public function __invoke(RequestInterface $request, array $options): PromiseInterface
+ {
+ 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
+ */
+ private function onFulfilled(RequestInterface $request, array $options): callable
+ {
+ return function ($value) use ($request, $options) {
+ if (!($this->decider)(
+ $options['retries'],
+ $request,
+ $value,
+ null
+ )) {
+ return $value;
+ }
+
+ return $this->doRetry($request, $options, $value);
+ };
+ }
+
+ /**
+ * Execute rejected closure
+ */
+ private function onRejected(RequestInterface $req, array $options): callable
+ {
+ return function ($reason) use ($req, $options) {
+ if (!($this->decider)(
+ $options['retries'],
+ $req,
+ null,
+ $reason
+ )) {
+ return P\Create::rejectionFor($reason);
+ }
+
+ return $this->doRetry($req, $options);
+ };
+ }
+
+ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
+ {
+ $options['delay'] = ($this->delay)(++$options['retries'], $response, $request);
+
+ return $this($request, $options);
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php
new file mode 100644
index 000000000..2ce9e38f2
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php
@@ -0,0 +1,133 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Represents data at the point after it was transferred either successfully
+ * or after a network error.
+ */
+final class TransferStats
+{
+ /**
+ * @var RequestInterface
+ */
+ private $request;
+
+ /**
+ * @var ResponseInterface|null
+ */
+ private $response;
+
+ /**
+ * @var float|null
+ */
+ private $transferTime;
+
+ /**
+ * @var array
+ */
+ private $handlerStats;
+
+ /**
+ * @var mixed|null
+ */
+ private $handlerErrorData;
+
+ /**
+ * @param RequestInterface $request Request that was sent.
+ * @param ResponseInterface|null $response Response received (if any)
+ * @param float|null $transferTime Total handler transfer time.
+ * @param mixed $handlerErrorData Handler error data.
+ * @param array $handlerStats Handler specific stats.
+ */
+ public function __construct(
+ RequestInterface $request,
+ ResponseInterface $response = null,
+ float $transferTime = null,
+ $handlerErrorData = null,
+ array $handlerStats = []
+ ) {
+ $this->request = $request;
+ $this->response = $response;
+ $this->transferTime = $transferTime;
+ $this->handlerErrorData = $handlerErrorData;
+ $this->handlerStats = $handlerStats;
+ }
+
+ public function getRequest(): RequestInterface
+ {
+ return $this->request;
+ }
+
+ /**
+ * Returns the response that was received (if any).
+ */
+ public function getResponse(): ?ResponseInterface
+ {
+ return $this->response;
+ }
+
+ /**
+ * Returns true if a response was received.
+ */
+ public function hasResponse(): bool
+ {
+ 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.
+ */
+ public function getEffectiveUri(): UriInterface
+ {
+ 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(): ?float
+ {
+ return $this->transferTime;
+ }
+
+ /**
+ * Gets an array of all of the handler specific transfer data.
+ */
+ public function getHandlerStats(): array
+ {
+ 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(string $stat)
+ {
+ return $this->handlerStats[$stat] ?? null;
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php
new file mode 100644
index 000000000..fcf571d6b
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/Utils.php
@@ -0,0 +1,385 @@
+<?php
+
+namespace GuzzleHttp;
+
+use GuzzleHttp\Exception\InvalidArgumentException;
+use GuzzleHttp\Handler\CurlHandler;
+use GuzzleHttp\Handler\CurlMultiHandler;
+use GuzzleHttp\Handler\Proxy;
+use GuzzleHttp\Handler\StreamHandler;
+use Psr\Http\Message\UriInterface;
+
+final class Utils
+{
+ /**
+ * 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.
+ */
+ public static function describeType($input): string
+ {
+ 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
+ /** @var string $varDumpContent */
+ $varDumpContent = \ob_get_clean();
+
+ return \str_replace('double(', 'float(', \rtrim($varDumpContent));
+ }
+ }
+
+ /**
+ * 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"
+ */
+ public static function headersFromLines(iterable $lines): array
+ {
+ $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
+ */
+ public static function debugResource($value = null)
+ {
+ if (\is_resource($value)) {
+ return $value;
+ }
+ if (\defined('STDOUT')) {
+ return \STDOUT;
+ }
+
+ return \GuzzleHttp\Psr7\Utils::tryFopen('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(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
+ *
+ * @throws \RuntimeException if no viable Handler is available.
+ */
+ public static function chooseHandler(): callable
+ {
+ $handler = null;
+
+ if (\defined('CURLOPT_CUSTOMREQUEST')) {
+ 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.
+ */
+ public static function defaultUserAgent(): string
+ {
+ return sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION);
+ }
+
+ /**
+ * 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.
+ *
+ * @throws \RuntimeException if no bundle can be found.
+ *
+ * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+.
+ */
+ public static function defaultCaBundle(): string
+ {
+ 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://curl.haxx.se/ca/cacert.pem. 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 https://curl.haxx.se/docs/sslcerts.html for more
+information.
+EOT
+ );
+ }
+
+ /**
+ * Creates an associative array of lowercase header names to the actual
+ * header casing.
+ */
+ public static function normalizeHeaderKeys(array $headers): array
+ {
+ $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 string[] $noProxyArray An array of host patterns.
+ *
+ * @throws InvalidArgumentException
+ */
+ public static function isHostInNoProxy(string $host, array $noProxyArray): bool
+ {
+ if (\strlen($host) === 0) {
+ throw new InvalidArgumentException('Empty host provided');
+ }
+
+ // Strip port if present.
+ [$host] = \explode(':', $host, 2);
+
+ foreach ($noProxyArray as $area) {
+ // Always match on wildcards.
+ if ($area === '*') {
+ return true;
+ }
+
+ if (empty($area)) {
+ // Don't match on empty values.
+ continue;
+ }
+
+ if ($area === $host) {
+ // Exact matches.
+ return true;
+ }
+ // 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 object|array|string|int|float|bool|null
+ *
+ * @throws InvalidArgumentException if the JSON cannot be decoded.
+ *
+ * @see https://www.php.net/manual/en/function.json-decode.php
+ */
+ public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
+ {
+ $data = \json_decode($json, $assoc, $depth, $options);
+ if (\JSON_ERROR_NONE !== \json_last_error()) {
+ throw new 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.
+ *
+ * @throws InvalidArgumentException if the JSON cannot be encoded.
+ *
+ * @see https://www.php.net/manual/en/function.json-encode.php
+ */
+ public static function jsonEncode($value, int $options = 0, int $depth = 512): string
+ {
+ $json = \json_encode($value, $options, $depth);
+ if (\JSON_ERROR_NONE !== \json_last_error()) {
+ throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg());
+ }
+
+ /** @var string */
+ return $json;
+ }
+
+ /**
+ * Wrapper for the hrtime() or microtime() functions
+ * (depending on the PHP version, one of the two is used)
+ *
+ * @return float UNIX timestamp
+ *
+ * @internal
+ */
+ public static function currentTime(): float
+ {
+ return (float) \function_exists('hrtime') ? \hrtime(true) / 1e9 : \microtime(true);
+ }
+
+ /**
+ * @throws InvalidArgumentException
+ *
+ * @internal
+ */
+ public static function idnUriConvert(UriInterface $uri, int $options = 0): UriInterface
+ {
+ if ($uri->getHost()) {
+ $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
+ if ($asciiHost === false) {
+ $errorBitSet = $info['errors'] ?? 0;
+
+ $errorConstants = array_filter(array_keys(get_defined_constants()), static function (string $name): bool {
+ 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);
+ }
+ if ($uri->getHost() !== $asciiHost) {
+ // Replace URI only if the ASCII version is different
+ $uri = $uri->withHost($asciiHost);
+ }
+ }
+
+ return $uri;
+ }
+
+ /**
+ * @internal
+ */
+ public static function getenv(string $name): ?string
+ {
+ if (isset($_SERVER[$name])) {
+ return (string) $_SERVER[$name];
+ }
+
+ if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) {
+ return (string) $value;
+ }
+
+ return null;
+ }
+
+ /**
+ * @return string|false
+ */
+ private static function idnToAsci(string $domain, int $options, ?array &$info = [])
+ {
+ if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
+ return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info);
+ }
+
+ throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old');
+ }
+}
diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php
new file mode 100644
index 000000000..5edc66ab1
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/functions.php
@@ -0,0 +1,167 @@
+<?php
+
+namespace GuzzleHttp;
+
+/**
+ * Debug function used to describe the provided value type and class.
+ *
+ * @param mixed $input Any type of variable to describe the type of. This
+ * parameter misses a typehint because of that.
+ *
+ * @return string Returns a string containing the type of the variable and
+ * if a class is provided, the class name.
+ *
+ * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead.
+ */
+function describe_type($input): string
+{
+ return Utils::describeType($input);
+}
+
+/**
+ * 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"
+ *
+ * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead.
+ */
+function headers_from_lines(iterable $lines): array
+{
+ return Utils::headersFromLines($lines);
+}
+
+/**
+ * Returns a debug stream based on the provided variable.
+ *
+ * @param mixed $value Optional value
+ *
+ * @return resource
+ *
+ * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead.
+ */
+function debug_resource($value = null)
+{
+ return Utils::debugResource($value);
+}
+
+/**
+ * Chooses and creates a default handler to use based on the environment.
+ *
+ * The returned handler is not wrapped by any default middlewares.
+ *
+ * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
+ *
+ * @throws \RuntimeException if no viable Handler is available.
+ *
+ * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
+ */
+function choose_handler(): callable
+{
+ return Utils::chooseHandler();
+}
+
+/**
+ * Get the default User-Agent string to use with Guzzle.
+ *
+ * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead.
+ */
+function default_user_agent(): string
+{
+ return Utils::defaultUserAgent();
+}
+
+/**
+ * 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.
+ *
+ * @throws \RuntimeException if no bundle can be found.
+ *
+ * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+.
+ */
+function default_ca_bundle(): string
+{
+ return Utils::defaultCaBundle();
+}
+
+/**
+ * Creates an associative array of lowercase header names to the actual
+ * header casing.
+ *
+ * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead.
+ */
+function normalize_header_keys(array $headers): array
+{
+ return Utils::normalizeHeaderKeys($headers);
+}
+
+/**
+ * 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 string[] $noProxyArray An array of host patterns.
+ *
+ * @throws Exception\InvalidArgumentException
+ *
+ * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead.
+ */
+function is_host_in_noproxy(string $host, array $noProxyArray): bool
+{
+ return Utils::isHostInNoProxy($host, $noProxyArray);
+}
+
+/**
+ * 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 object|array|string|int|float|bool|null
+ *
+ * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
+ *
+ * @see https://www.php.net/manual/en/function.json-decode.php
+ * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
+ */
+function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
+{
+ return Utils::jsonDecode($json, $assoc, $depth, $options);
+}
+
+/**
+ * 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.
+ *
+ * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
+ *
+ * @see https://www.php.net/manual/en/function.json-encode.php
+ * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
+ */
+function json_encode($value, int $options = 0, int $depth = 512): string
+{
+ return Utils::jsonEncode($value, $options, $depth);
+}
diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php
new file mode 100644
index 000000000..394f95347
--- /dev/null
+++ b/vendor/guzzlehttp/guzzle/src/functions_include.php
@@ -0,0 +1,6 @@
+<?php
+
+// Don't redefine the functions if included multiple times.
+if (!\function_exists('GuzzleHttp\describe_type')) {
+ require __DIR__.'/functions.php';
+}
diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md
new file mode 100644
index 000000000..eaf2af426
--- /dev/null
+++ b/vendor/guzzlehttp/promises/CHANGELOG.md
@@ -0,0 +1,145 @@
+# CHANGELOG
+
+
+## 2.0.1 - 2023-08-03
+
+### Changed
+
+- PHP 8.3 support
+
+
+## 2.0.0 - 2023-05-21
+
+### Added
+
+- Added PHP 7 type hints
+
+### Changed
+
+- All previously non-final non-exception classes have been marked as soft-final
+
+### Removed
+
+- Dropped PHP < 7.2 support
+- All functions in the `GuzzleHttp\Promise` namespace
+
+
+## 1.5.3 - 2023-05-21
+
+### Changed
+
+- Removed remaining usage of deprecated functions
+
+
+## 1.5.2 - 2022-08-07
+
+### Changed
+
+- Officially support PHP 8.2
+
+
+## 1.5.1 - 2021-10-22
+
+### Fixed
+
+- Revert "Call handler when waiting on fulfilled/rejected Promise"
+- Fix pool memory leak when empty array of promises provided
+
+
+## 1.5.0 - 2021-10-07
+
+### Changed
+
+- Call handler when waiting on fulfilled/rejected Promise
+- Officially support PHP 8.1
+
+### Fixed
+
+- Fix manually settle promises generated with `Utils::task`
+
+
+## 1.4.1 - 2021-02-18
+
+### Fixed
+
+- Fixed `each_limit` skipping promises and failing
+
+
+## 1.4.0 - 2020-09-30
+
+### Added
+
+- Support for PHP 8
+- Optional `$recursive` flag to `all`
+- Replaced functions by static methods
+
+### Fixed
+
+- Fix empty `each` processing
+- Fix promise handling for Iterators of non-unique keys
+- Fixed `method_exists` crashes on PHP 8
+- Memory leak on exceptions
+
+
+## 1.3.1 - 2016-12-20
+
+### Fixed
+
+- `wait()` foreign promise compatibility
+
+
+## 1.3.0 - 2016-11-18
+
+### Added
+
+- Adds support for custom task queues.
+
+### Fixed
+
+- Fixed coroutine promise memory leak.
+
+
+## 1.2.0 - 2016-05-18
+
+### Changed
+
+- Update to now catch `\Throwable` on PHP 7+
+
+
+## 1.1.0 - 2016-03-07
+
+### Changed
+
+- Update EachPromise to prevent recurring on a iterator when advancing, as this
+ could trigger fatal generator errors.
+- Update Promise to allow recursive waiting without unwrapping exceptions.
+
+
+## 1.0.3 - 2015-10-15
+
+### Changed
+
+- Update EachPromise to immediately resolve when the underlying promise iterator
+ is empty. Previously, such a promise would throw an exception when its `wait`
+ function was called.
+
+
+## 1.0.2 - 2015-05-15
+
+### Changed
+
+- Conditionally require functions.php.
+
+
+## 1.0.1 - 2015-06-24
+
+### Changed
+
+- Updating EachPromise to call next on the underlying promise iterator as late
+ as possible to ensure that generators that generate new requests based on
+ callbacks are not iterated until after callbacks are invoked.
+
+
+## 1.0.0 - 2015-05-12
+
+- Initial release
diff --git a/vendor/guzzlehttp/promises/LICENSE b/vendor/guzzlehttp/promises/LICENSE
new file mode 100644
index 000000000..9f0f943be
--- /dev/null
+++ b/vendor/guzzlehttp/promises/LICENSE
@@ -0,0 +1,24 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Michael Dowling <[email protected]>
+Copyright (c) 2015 Graham Campbell <[email protected]>
+Copyright (c) 2017 Tobias Schultze <[email protected]>
+Copyright (c) 2020 Tobias Nyholm <[email protected]>
+
+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/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md
new file mode 100644
index 000000000..a32d3d29c
--- /dev/null
+++ b/vendor/guzzlehttp/promises/README.md
@@ -0,0 +1,559 @@
+# 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()`.
+
+
+## Installation
+
+```shell
+composer require guzzlehttp/promises
+```
+
+
+## Version Guidance
+
+| Version | Status | PHP Version |
+|---------|------------------------|--------------|
+| 1.x | Bug and security fixes | >=5.5,<8.3 |
+| 2.x | Latest | >=7.2.5,<8.4 |
+
+
+## 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']);
+```
+
+
+## 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
+<?php
+require 'vendor/autoload.php';
+
+use GuzzleHttp\Promise\Promise;
+
+$parent = new Promise();
+$p = $parent;
+
+for ($i = 0; $i < 1000; $i++) {
+ $p = $p->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 was 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 [email protected]. 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/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json
new file mode 100644
index 000000000..fc1989ec1
--- /dev/null
+++ b/vendor/guzzlehttp/promises/composer.json
@@ -0,0 +1,58 @@
+{
+ "name": "guzzlehttp/promises",
+ "description": "Guzzle promises library",
+ "keywords": ["promise"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\Tests\\": "tests/"
+ }
+ },
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ },
+ "preferred-install": "dist",
+ "sort-packages": true
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php
new file mode 100644
index 000000000..40ffdbcf1
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/AggregateException.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * Exception thrown when too many errors occur in the some() or any() methods.
+ */
+class AggregateException extends RejectionException
+{
+ public function __construct(string $msg, array $reasons)
+ {
+ parent::__construct(
+ $reasons,
+ sprintf('%s; %d rejected promises', $msg, count($reasons))
+ );
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/CancellationException.php b/vendor/guzzlehttp/promises/src/CancellationException.php
new file mode 100644
index 000000000..ad8f51d48
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/CancellationException.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * Exception that is set as the reason for a promise that has been cancelled.
+ */
+class CancellationException extends RejectionException
+{
+}
diff --git a/vendor/guzzlehttp/promises/src/Coroutine.php b/vendor/guzzlehttp/promises/src/Coroutine.php
new file mode 100644
index 000000000..0b5b9c0a4
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Coroutine.php
@@ -0,0 +1,162 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+use Generator;
+use Throwable;
+
+/**
+ * Creates a promise that is resolved using a generator that yields values or
+ * promises (somewhat similar to C#'s async keyword).
+ *
+ * When called, the Coroutine::of method will start an instance of the generator
+ * and returns a promise that is fulfilled with its final yielded value.
+ *
+ * Control is returned back to the generator when the yielded promise settles.
+ * This can lead to less verbose code when doing lots of sequential async calls
+ * with minimal processing in between.
+ *
+ * use GuzzleHttp\Promise;
+ *
+ * function createPromise($value) {
+ * return new Promise\FulfilledPromise($value);
+ * }
+ *
+ * $promise = Promise\Coroutine::of(function () {
+ * $value = (yield createPromise('a'));
+ * try {
+ * $value = (yield createPromise($value . 'b'));
+ * } catch (\Throwable $e) {
+ * // The promise was rejected.
+ * }
+ * yield $value . 'c';
+ * });
+ *
+ * // Outputs "abc"
+ * $promise->then(function ($v) { echo $v; });
+ *
+ * @param callable $generatorFn Generator function to wrap into a promise.
+ *
+ * @return Promise
+ *
+ * @see 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 (): void {
+ while (isset($this->currentPromise)) {
+ $this->currentPromise->wait();
+ }
+ });
+ try {
+ $this->nextCoroutine($this->generator->current());
+ } catch (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+
+ /**
+ * Create a new coroutine.
+ */
+ public static function of(callable $generatorFn): self
+ {
+ return new self($generatorFn);
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ return $this->result->then($onFulfilled, $onRejected);
+ }
+
+ public function otherwise(callable $onRejected): PromiseInterface
+ {
+ return $this->result->otherwise($onRejected);
+ }
+
+ public function wait(bool $unwrap = true)
+ {
+ return $this->result->wait($unwrap);
+ }
+
+ public function getState(): string
+ {
+ return $this->result->getState();
+ }
+
+ public function resolve($value): void
+ {
+ $this->result->resolve($value);
+ }
+
+ public function reject($reason): void
+ {
+ $this->result->reject($reason);
+ }
+
+ public function cancel(): void
+ {
+ $this->currentPromise->cancel();
+ $this->result->cancel();
+ }
+
+ private function nextCoroutine($yielded): void
+ {
+ $this->currentPromise = Create::promiseFor($yielded)
+ ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
+ }
+
+ /**
+ * @internal
+ */
+ public function _handleSuccess($value): void
+ {
+ unset($this->currentPromise);
+ try {
+ $next = $this->generator->send($value);
+ if ($this->generator->valid()) {
+ $this->nextCoroutine($next);
+ } else {
+ $this->result->resolve($value);
+ }
+ } catch (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+
+ /**
+ * @internal
+ */
+ public function _handleFailure($reason): void
+ {
+ 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 (Throwable $throwable) {
+ $this->result->reject($throwable);
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/Create.php b/vendor/guzzlehttp/promises/src/Create.php
new file mode 100644
index 000000000..9d3fc4a1e
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Create.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+final class Create
+{
+ /**
+ * Creates a promise for a value if the value is not a promise.
+ *
+ * @param mixed $value Promise or value.
+ */
+ public static function promiseFor($value): PromiseInterface
+ {
+ if ($value instanceof PromiseInterface) {
+ return $value;
+ }
+
+ // Return a Guzzle promise that shadows the given promise.
+ if (is_object($value) && method_exists($value, 'then')) {
+ $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
+ $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
+ $promise = new Promise($wfn, $cfn);
+ $value->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.
+ */
+ public static function rejectionFor($reason): PromiseInterface
+ {
+ if ($reason instanceof PromiseInterface) {
+ return $reason;
+ }
+
+ return new RejectedPromise($reason);
+ }
+
+ /**
+ * Create an exception for a rejected promise value.
+ *
+ * @param mixed $reason
+ */
+ public static function exceptionFor($reason): \Throwable
+ {
+ if ($reason instanceof \Throwable) {
+ return $reason;
+ }
+
+ return new RejectionException($reason);
+ }
+
+ /**
+ * Returns an iterator for the given value.
+ *
+ * @param mixed $value
+ */
+ public static function iterFor($value): \Iterator
+ {
+ if ($value instanceof \Iterator) {
+ return $value;
+ }
+
+ if (is_array($value)) {
+ return new \ArrayIterator($value);
+ }
+
+ return new \ArrayIterator([$value]);
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php
new file mode 100644
index 000000000..1a7aa0fb6
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Each.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+final class Each
+{
+ /**
+ * 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
+ */
+ public static function of(
+ $iterable,
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ return (new EachPromise($iterable, [
+ 'fulfilled' => $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
+ */
+ public static function ofLimit(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ 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
+ */
+ public static function ofLimitAll(
+ $iterable,
+ $concurrency,
+ callable $onFulfilled = null
+ ): PromiseInterface {
+ return self::ofLimit(
+ $iterable,
+ $concurrency,
+ $onFulfilled,
+ function ($reason, $idx, PromiseInterface $aggregate): void {
+ $aggregate->reject($reason);
+ }
+ );
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php
new file mode 100644
index 000000000..28dd9793a
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/EachPromise.php
@@ -0,0 +1,250 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * Represents a promise that iterates over many promises and invokes
+ * side-effect functions in the process.
+ *
+ * @final
+ */
+class EachPromise implements PromisorInterface
+{
+ private $pending = [];
+
+ private $nextPendingIndex = 0;
+
+ /** @var \Iterator|null */
+ private $iterable;
+
+ /** @var callable|int|null */
+ private $concurrency;
+
+ /** @var callable|null */
+ private $onFulfilled;
+
+ /** @var callable|null */
+ private $onRejected;
+
+ /** @var Promise|null */
+ private $aggregate;
+
+ /** @var bool|null */
+ private $mutex;
+
+ /**
+ * Configuration hash can include the following key value pairs:
+ *
+ * - fulfilled: (callable) Invoked when a promise fulfills. The function
+ * is invoked with three arguments: the fulfillment value, the index
+ * position from the iterable list of the promise, and the aggregate
+ * promise that manages all of the promises. The aggregate promise may
+ * be resolved from within the callback to short-circuit the promise.
+ * - rejected: (callable) Invoked when a promise is rejected. The
+ * function is invoked with three arguments: the rejection reason, the
+ * index position from the iterable list of the promise, and the
+ * aggregate promise that manages all of the promises. The aggregate
+ * promise may be resolved from within the callback to short-circuit
+ * the promise.
+ * - concurrency: (integer) Pass this configuration option to limit the
+ * allowed number of outstanding concurrently executing promises,
+ * creating a capped pool of promises. There is no limit by default.
+ *
+ * @param mixed $iterable Promises or values to iterate.
+ * @param array $config Configuration options
+ */
+ public function __construct($iterable, array $config = [])
+ {
+ $this->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(): PromiseInterface
+ {
+ 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);
+ }
+
+ /**
+ * @psalm-suppress NullableReturnStatement
+ */
+ return $this->aggregate;
+ }
+
+ private function createPromise(): void
+ {
+ $this->mutex = false;
+ $this->aggregate = new Promise(function (): void {
+ 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 (): void {
+ $this->iterable = $this->concurrency = $this->pending = null;
+ $this->onFulfilled = $this->onRejected = null;
+ $this->nextPendingIndex = 0;
+ };
+
+ $this->aggregate->then($clearFn, $clearFn);
+ }
+
+ private function refillPending(): void
+ {
+ 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(): bool
+ {
+ 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): void {
+ if ($this->onFulfilled) {
+ call_user_func(
+ $this->onFulfilled,
+ $value,
+ $key,
+ $this->aggregate
+ );
+ }
+ $this->step($idx);
+ },
+ function ($reason) use ($idx, $key): void {
+ if ($this->onRejected) {
+ call_user_func(
+ $this->onRejected,
+ $reason,
+ $key,
+ $this->aggregate
+ );
+ }
+ $this->step($idx);
+ }
+ );
+
+ return true;
+ }
+
+ private function advanceIterator(): bool
+ {
+ // 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;
+ }
+ }
+
+ private function step(int $idx): void
+ {
+ // 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(): bool
+ {
+ 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/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php
new file mode 100644
index 000000000..ab7129659
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * A promise that has been fulfilled.
+ *
+ * Thenning off of this promise will invoke the onFulfilled callback
+ * immediately and ignore other callbacks.
+ *
+ * @final
+ */
+class FulfilledPromise implements PromiseInterface
+{
+ private $value;
+
+ /**
+ * @param mixed $value
+ */
+ public function __construct($value)
+ {
+ if (is_object($value) && method_exists($value, 'then')) {
+ throw new \InvalidArgumentException(
+ 'You cannot create a FulfilledPromise with a promise.'
+ );
+ }
+
+ $this->value = $value;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ // 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): void {
+ if (Is::pending($p)) {
+ try {
+ $p->resolve($onFulfilled($value));
+ } catch (\Throwable $e) {
+ $p->reject($e);
+ }
+ }
+ });
+
+ return $p;
+ }
+
+ public function otherwise(callable $onRejected): PromiseInterface
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait(bool $unwrap = true)
+ {
+ return $unwrap ? $this->value : null;
+ }
+
+ public function getState(): string
+ {
+ return self::FULFILLED;
+ }
+
+ public function resolve($value): void
+ {
+ if ($value !== $this->value) {
+ throw new \LogicException('Cannot resolve a fulfilled promise');
+ }
+ }
+
+ public function reject($reason): void
+ {
+ throw new \LogicException('Cannot reject a fulfilled promise');
+ }
+
+ public function cancel(): void
+ {
+ // pass
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/Is.php b/vendor/guzzlehttp/promises/src/Is.php
new file mode 100644
index 000000000..f3f050384
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Is.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+final class Is
+{
+ /**
+ * Returns true if a promise is pending.
+ */
+ public static function pending(PromiseInterface $promise): bool
+ {
+ return $promise->getState() === PromiseInterface::PENDING;
+ }
+
+ /**
+ * Returns true if a promise is fulfilled or rejected.
+ */
+ public static function settled(PromiseInterface $promise): bool
+ {
+ return $promise->getState() !== PromiseInterface::PENDING;
+ }
+
+ /**
+ * Returns true if a promise is fulfilled.
+ */
+ public static function fulfilled(PromiseInterface $promise): bool
+ {
+ return $promise->getState() === PromiseInterface::FULFILLED;
+ }
+
+ /**
+ * Returns true if a promise is rejected.
+ */
+ public static function rejected(PromiseInterface $promise): bool
+ {
+ return $promise->getState() === PromiseInterface::REJECTED;
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php
new file mode 100644
index 000000000..1b07bdc9a
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Promise.php
@@ -0,0 +1,281 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * Promises/A+ implementation that avoids recursion when possible.
+ *
+ * @see https://promisesaplus.com/
+ *
+ * @final
+ */
+class Promise implements PromiseInterface
+{
+ private $state = self::PENDING;
+ private $result;
+ private $cancelFn;
+ private $waitFn;
+ private $waitList;
+ private $handlers = [];
+
+ /**
+ * @param callable $waitFn Fn that when invoked resolves the promise.
+ * @param callable $cancelFn Fn that when invoked cancels the promise.
+ */
+ public function __construct(
+ callable $waitFn = null,
+ callable $cancelFn = null
+ ) {
+ $this->waitFn = $waitFn;
+ $this->cancelFn = $cancelFn;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ 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): PromiseInterface
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait(bool $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(): string
+ {
+ return $this->state;
+ }
+
+ public function cancel(): void
+ {
+ 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);
+ }
+ }
+
+ // 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): void
+ {
+ $this->settle(self::FULFILLED, $value);
+ }
+
+ public function reject($reason): void
+ {
+ $this->settle(self::REJECTED, $reason);
+ }
+
+ private function settle(string $state, $value): void
+ {
+ 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): void {
+ 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): void {
+ foreach ($handlers as $handler) {
+ self::callHandler(1, $value, $handler);
+ }
+ },
+ static function ($reason) use ($handlers): void {
+ 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(int $index, $value, array $handler): void
+ {
+ /** @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);
+ }
+ }
+
+ private function waitIfPending(): void
+ {
+ 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(): void
+ {
+ try {
+ $wfn = $this->waitFn;
+ $this->waitFn = null;
+ $wfn(true);
+ } catch (\Throwable $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(): void
+ {
+ $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/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php
new file mode 100644
index 000000000..2824802bb
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * 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.
+ *
+ * @see https://promisesaplus.com/
+ */
+interface PromiseInterface
+{
+ public const PENDING = 'pending';
+ public const FULFILLED = 'fulfilled';
+ public const REJECTED = 'rejected';
+
+ /**
+ * Appends fulfillment and rejection handlers to the promise, and returns
+ * a new promise resolving to the return value of the called handler.
+ *
+ * @param callable $onFulfilled Invoked when the promise fulfills.
+ * @param callable $onRejected Invoked when the promise is rejected.
+ */
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): 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.
+ *
+ * @param callable $onRejected Invoked when the promise is rejected.
+ */
+ public function otherwise(callable $onRejected): PromiseInterface;
+
+ /**
+ * Get the state of the promise ("pending", "rejected", or "fulfilled").
+ *
+ * The three states can be checked against the constants defined on
+ * PromiseInterface: PENDING, FULFILLED, and REJECTED.
+ */
+ public function getState(): string;
+
+ /**
+ * Resolve the promise with the given value.
+ *
+ * @param mixed $value
+ *
+ * @throws \RuntimeException if the promise is already resolved.
+ */
+ public function resolve($value): void;
+
+ /**
+ * Reject the promise with the given reason.
+ *
+ * @param mixed $reason
+ *
+ * @throws \RuntimeException if the promise is already resolved.
+ */
+ public function reject($reason): void;
+
+ /**
+ * Cancels the promise if possible.
+ *
+ * @see https://github.com/promises-aplus/cancellation-spec/issues/7
+ */
+ public function cancel(): void;
+
+ /**
+ * Waits until the promise completes if possible.
+ *
+ * Pass $unwrap as true to unwrap the result of the promise, either
+ * returning the resolved value or throwing the rejected exception.
+ *
+ * If the promise cannot be waited on, then the promise will be rejected.
+ *
+ * @return mixed
+ *
+ * @throws \LogicException if the promise has no wait function or if the
+ * promise does not settle after waiting.
+ */
+ public function wait(bool $unwrap = true);
+}
diff --git a/vendor/guzzlehttp/promises/src/PromisorInterface.php b/vendor/guzzlehttp/promises/src/PromisorInterface.php
new file mode 100644
index 000000000..5e8c51264
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/PromisorInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * Interface used with classes that return a promise.
+ */
+interface PromisorInterface
+{
+ /**
+ * Returns a promise.
+ */
+ public function promise(): PromiseInterface;
+}
diff --git a/vendor/guzzlehttp/promises/src/RejectedPromise.php b/vendor/guzzlehttp/promises/src/RejectedPromise.php
new file mode 100644
index 000000000..d947da1f5
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/RejectedPromise.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * A promise that has been rejected.
+ *
+ * Thenning off of this promise will invoke the onRejected callback
+ * immediately and ignore other callbacks.
+ *
+ * @final
+ */
+class RejectedPromise implements PromiseInterface
+{
+ private $reason;
+
+ /**
+ * @param mixed $reason
+ */
+ public function __construct($reason)
+ {
+ if (is_object($reason) && method_exists($reason, 'then')) {
+ throw new \InvalidArgumentException(
+ 'You cannot create a RejectedPromise with a promise.'
+ );
+ }
+
+ $this->reason = $reason;
+ }
+
+ public function then(
+ callable $onFulfilled = null,
+ callable $onRejected = null
+ ): PromiseInterface {
+ // 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): void {
+ 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);
+ }
+ }
+ });
+
+ return $p;
+ }
+
+ public function otherwise(callable $onRejected): PromiseInterface
+ {
+ return $this->then(null, $onRejected);
+ }
+
+ public function wait(bool $unwrap = true)
+ {
+ if ($unwrap) {
+ throw Create::exceptionFor($this->reason);
+ }
+
+ return null;
+ }
+
+ public function getState(): string
+ {
+ return self::REJECTED;
+ }
+
+ public function resolve($value): void
+ {
+ throw new \LogicException('Cannot resolve a rejected promise');
+ }
+
+ public function reject($reason): void
+ {
+ if ($reason !== $this->reason) {
+ throw new \LogicException('Cannot reject a rejected promise');
+ }
+ }
+
+ public function cancel(): void
+ {
+ // pass
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php
new file mode 100644
index 000000000..47dca8624
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/RejectionException.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * A special exception that is thrown when waiting on a rejected promise.
+ *
+ * The reason value is available via the getReason() method.
+ */
+class RejectionException extends \RuntimeException
+{
+ /** @var mixed Rejection reason. */
+ private $reason;
+
+ /**
+ * @param mixed $reason Rejection reason.
+ * @param string|null $description Optional description.
+ */
+ public function __construct($reason, ?string $description = null)
+ {
+ $this->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/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php
new file mode 100644
index 000000000..503e0b2da
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/TaskQueue.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+/**
+ * A task queue that executes tasks in a FIFO order.
+ *
+ * This task queue class is used to settle promises asynchronously and
+ * maintains a constant stack size. You can use the task queue asynchronously
+ * by calling the `run()` function of the global task queue in an event loop.
+ *
+ * GuzzleHttp\Promise\Utils::queue()->run();
+ *
+ * @final
+ */
+class TaskQueue implements TaskQueueInterface
+{
+ private $enableShutdown = true;
+ private $queue = [];
+
+ public function __construct(bool $withShutdown = true)
+ {
+ if ($withShutdown) {
+ register_shutdown_function(function (): void {
+ 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(): bool
+ {
+ return !$this->queue;
+ }
+
+ public function add(callable $task): void
+ {
+ $this->queue[] = $task;
+ }
+
+ public function run(): void
+ {
+ 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(): void
+ {
+ $this->enableShutdown = false;
+ }
+}
diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
new file mode 100644
index 000000000..34c561a48
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+interface TaskQueueInterface
+{
+ /**
+ * Returns true if the queue is empty.
+ */
+ public function isEmpty(): bool;
+
+ /**
+ * Adds a task to the queue that will be executed the next time run is
+ * called.
+ */
+ public function add(callable $task): void;
+
+ /**
+ * Execute all of the pending task in the queue.
+ */
+ public function run(): void;
+}
diff --git a/vendor/guzzlehttp/promises/src/Utils.php b/vendor/guzzlehttp/promises/src/Utils.php
new file mode 100644
index 000000000..e1570d727
--- /dev/null
+++ b/vendor/guzzlehttp/promises/src/Utils.php
@@ -0,0 +1,259 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Promise;
+
+final class Utils
+{
+ /**
+ * Get the global task queue used for promise resolution.
+ *
+ * This task queue MUST be run in an event loop in order for promises to be
+ * settled asynchronously. It will be automatically run when synchronously
+ * waiting on a promise.
+ *
+ * <code>
+ * while ($eventLoop->isRunning()) {
+ * GuzzleHttp\Promise\Utils::queue()->run();
+ * }
+ * </code>
+ *
+ * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
+ */
+ public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
+ {
+ 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.
+ */
+ public static function task(callable $task): PromiseInterface
+ {
+ $queue = self::queue();
+ $promise = new Promise([$queue, 'run']);
+ $queue->add(function () use ($task, $promise): void {
+ try {
+ if (Is::pending($promise)) {
+ $promise->resolve($task());
+ }
+ } catch (\Throwable $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.
+ */
+ public static function inspect(PromiseInterface $promise): array
+ {
+ 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];
+ }
+ }
+
+ /**
+ * 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.
+ */
+ public static function inspectAll($promises): array
+ {
+ $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<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
+ *
+ * @throws \Throwable on error
+ */
+ public static function unwrap($promises): array
+ {
+ $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.
+ */
+ public static function all($promises, bool $recursive = false): PromiseInterface
+ {
+ $results = [];
+ $promise = Each::of(
+ $promises,
+ function ($value, $idx) use (&$results): void {
+ $results[$idx] = $value;
+ },
+ function ($reason, $idx, Promise $aggregate): void {
+ $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.
+ */
+ public static function some(int $count, $promises): PromiseInterface
+ {
+ $results = [];
+ $rejections = [];
+
+ return Each::of(
+ $promises,
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count): void {
+ if (Is::settled($p)) {
+ return;
+ }
+ $results[$idx] = $value;
+ if (count($results) >= $count) {
+ $p->resolve(null);
+ }
+ },
+ function ($reason) use (&$rejections): void {
+ $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.
+ */
+ public static function any($promises): PromiseInterface
+ {
+ 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.
+ */
+ public static function settle($promises): PromiseInterface
+ {
+ $results = [];
+
+ return Each::of(
+ $promises,
+ function ($value, $idx) use (&$results): void {
+ $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
+ },
+ function ($reason, $idx) use (&$results): void {
+ $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
+ }
+ )->then(function () use (&$results) {
+ ksort($results);
+
+ return $results;
+ });
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md
new file mode 100644
index 000000000..d897feedd
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -0,0 +1,437 @@
+# 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).
+
+## 2.6.1 - 2023-08-27
+
+### Fixed
+
+- Properly handle the fact that PHP transforms numeric strings in array keys to ints
+
+## 2.6.0 - 2023-08-03
+
+### Changed
+
+- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry
+- Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload
+
+## 2.5.1 - 2023-08-03
+
+### Fixed
+
+- Corrected mime type for `.acc` files to `audio/aac`
+
+### Changed
+
+- PHP 8.3 support
+
+## 2.5.0 - 2023-04-17
+
+### Changed
+
+- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0`
+
+## 2.4.5 - 2023-04-17
+
+### Fixed
+
+- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec`
+- Fixed `Message::bodySummary` when `preg_match` fails
+- Fixed header validation issue
+
+## 2.4.4 - 2023-03-09
+
+### Changed
+
+- Removed the need for `AllowDynamicProperties` in `LazyOpenStream`
+
+## 2.4.3 - 2022-10-26
+
+### Changed
+
+- Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))`
+
+## 2.4.2 - 2022-10-25
+
+### Fixed
+
+- Fixed erroneous behaviour when combining host and relative path
+
+## 2.4.1 - 2022-08-28
+
+### Fixed
+
+- Rewind body before reading in `Message::bodySummary`
+
+## 2.4.0 - 2022-06-20
+
+### Added
+
+- Added provisional PHP 8.2 support
+- Added `UriComparator::isCrossOrigin` method
+
+## 2.3.0 - 2022-06-09
+
+### Fixed
+
+- Added `Header::splitList` method
+- Added `Utils::tryGetContents` method
+- Improved `Stream::getContents` method
+- Updated mimetype mappings
+
+## 2.2.2 - 2022-06-08
+
+### Fixed
+
+- Fix `Message::parseRequestUri` for numeric headers
+- Re-wrap exceptions thrown in `fread` into runtime exceptions
+- Throw an exception when multipart options is misformatted
+
+## 2.2.1 - 2022-03-20
+
+### Fixed
+
+- Correct header value validation
+
+## 2.2.0 - 2022-03-20
+
+### Added
+
+- A more compressive list of mime types
+- Add JsonSerializable to Uri
+- Missing return types
+
+### Fixed
+
+- Bug MultipartStream no `uri` metadata
+- Bug MultipartStream with filename for `data://` streams
+- Fixed new line handling in MultipartStream
+- Reduced RAM usage when copying streams
+- Updated parsing in `Header::normalize()`
+
+## 2.1.1 - 2022-03-20
+
+### Fixed
+
+- Validate header values properly
+
+## 2.1.0 - 2021-10-06
+
+### Changed
+
+- Attempting to create a `Uri` object from a malformed URI will no longer throw a generic
+ `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former
+ for backwards compatibility. Callers relying on the exception being thrown to detect invalid
+ URIs should catch the new exception.
+
+### Fixed
+
+- Return `null` in caching stream size if remote size is `null`
+
+## 2.0.0 - 2021-06-30
+
+Identical to the RC release.
+
+## 2.0.0@RC-1 - 2021-04-29
+
+### Fixed
+
+- Handle possibly unset `url` in `stream_get_meta_data`
+
+## 2.0.0@beta-1 - 2021-03-21
+
+### Added
+
+- PSR-17 factories
+- Made classes final
+- PHP7 type hints
+
+### Changed
+
+- When building a query string, booleans are represented as 1 and 0.
+
+### Removed
+
+- PHP < 7.2 support
+- All functions in the `GuzzleHttp\Psr7` namespace
+
+## 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/vendor/guzzlehttp/psr7/LICENSE b/vendor/guzzlehttp/psr7/LICENSE
new file mode 100644
index 000000000..51c7ec81c
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/LICENSE
@@ -0,0 +1,26 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Michael Dowling <[email protected]>
+Copyright (c) 2015 Márk Sági-Kazár <[email protected]>
+Copyright (c) 2015 Graham Campbell <[email protected]>
+Copyright (c) 2016 Tobias Schultze <[email protected]>
+Copyright (c) 2016 George Mponos <[email protected]>
+Copyright (c) 2018 Tobias Nyholm <[email protected]>
+
+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/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md
new file mode 100644
index 000000000..a64ec9046
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/README.md
@@ -0,0 +1,880 @@
+# 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.
+
+![CI](https://github.com/guzzle/psr7/workflows/CI/badge.svg)
+![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg)
+
+
+## Features
+
+This package comes with a number of stream implementations and stream
+decorators.
+
+
+## Installation
+
+```shell
+composer require guzzlehttp/psr7
+```
+
+## Version Guidance
+
+| Version | Status | PHP Version |
+|---------|---------------------|--------------|
+| 1.x | Security fixes only | >=5.4,<8.1 |
+| 2.x | Latest | >=7.2.5,<8.4 |
+
+
+## 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 zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content.
+
+This stream decorator 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;
+
+ private $stream;
+
+ 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::splitList`
+
+`public static function splitList(string|string[] $header): string[]`
+
+Splits a HTTP header defined to contain a comma-separated list into
+each individual value:
+
+```
+$knownEtags = Header::splitList($request->getHeader('if-none-match'));
+```
+
+Example headers include `accept`, `cache-control` and `if-none-match`.
+
+
+## `GuzzleHttp\Psr7\Header::normalize` (deprecated)
+
+`public static function normalize(string|array $header): array`
+
+`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist)
+which performs the same operation with a cleaned up API and improved
+documentation.
+
+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<string> $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::tryGetContents`
+
+`public static function tryGetContents(resource $stream): string`
+
+Safely gets the contents of a given stream.
+
+When stream_get_contents 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 was 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.
+
+
+## Security
+
+If you discover a security vulnerability within this package, please send an email to [email protected]. 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/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json
new file mode 100644
index 000000000..d51dd622e
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/composer.json
@@ -0,0 +1,93 @@
+{
+ "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": "[email protected]",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "[email protected]",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "[email protected]",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "[email protected]",
+ "homepage": "https://github.com/Tobion"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0",
+ "ralouphie/getallheaders": "^3.0"
+ },
+ "provide": {
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\Psr7\\": "tests/"
+ }
+ },
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ },
+ "preferred-install": "dist",
+ "sort-packages": true
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php
new file mode 100644
index 000000000..ee8f37882
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/AppendStream.php
@@ -0,0 +1,248 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Reads from multiple streams, one after the other.
+ *
+ * This is a read-only stream decorator.
+ */
+final class AppendStream implements StreamInterface
+{
+ /** @var StreamInterface[] Streams being decorated */
+ private $streams = [];
+
+ /** @var bool */
+ private $seekable = true;
+
+ /** @var int */
+ private $current = 0;
+
+ /** @var int */
+ private $pos = 0;
+
+ /**
+ * @param StreamInterface[] $streams Streams to decorate. Each stream must
+ * be readable.
+ */
+ public function __construct(array $streams = [])
+ {
+ foreach ($streams as $stream) {
+ $this->addStream($stream);
+ }
+ }
+
+ public function __toString(): string
+ {
+ try {
+ $this->rewind();
+
+ return $this->getContents();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ 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): void
+ {
+ 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(): string
+ {
+ return Utils::copyToString($this);
+ }
+
+ /**
+ * Closes each attached stream.
+ */
+ public function close(): void
+ {
+ $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.
+ */
+ 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(): int
+ {
+ 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.
+ */
+ public function getSize(): ?int
+ {
+ $size = 0;
+
+ foreach ($this->streams as $stream) {
+ $s = $stream->getSize();
+ if ($s === null) {
+ return null;
+ }
+ $size += $s;
+ }
+
+ return $size;
+ }
+
+ public function eof(): bool
+ {
+ return !$this->streams
+ || ($this->current >= count($this->streams) - 1
+ && $this->streams[$this->current]->eof());
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ /**
+ * Attempts to seek to the given position. Only supports SEEK_SET.
+ */
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ 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.
+ */
+ public function read($length): string
+ {
+ $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);
+
+ if ($result === '') {
+ $progressToNext = true;
+ continue;
+ }
+
+ $buffer .= $result;
+ $remaining = $length - strlen($buffer);
+ }
+
+ $this->pos += strlen($buffer);
+
+ return $buffer;
+ }
+
+ public function isReadable(): bool
+ {
+ return true;
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ public function isSeekable(): bool
+ {
+ return $this->seekable;
+ }
+
+ public function write($string): int
+ {
+ throw new \RuntimeException('Cannot write to an AppendStream');
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ return $key ? null : [];
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php
new file mode 100644
index 000000000..2b0eb77be
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/BufferStream.php
@@ -0,0 +1,147 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Provides a buffer stream that can be written to 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.
+ */
+final class BufferStream implements StreamInterface
+{
+ /** @var int */
+ private $hwm;
+
+ /** @var string */
+ private $buffer = '';
+
+ /**
+ * @param int $hwm High water mark, representing the preferred maximum
+ * buffer size. If the size of the buffer exceeds the high
+ * water mark, then calls to write will continue to succeed
+ * but will return 0 to inform writers to slow down
+ * until the buffer has been drained by reading from it.
+ */
+ public function __construct(int $hwm = 16384)
+ {
+ $this->hwm = $hwm;
+ }
+
+ public function __toString(): string
+ {
+ return $this->getContents();
+ }
+
+ public function getContents(): string
+ {
+ $buffer = $this->buffer;
+ $this->buffer = '';
+
+ return $buffer;
+ }
+
+ public function close(): void
+ {
+ $this->buffer = '';
+ }
+
+ public function detach()
+ {
+ $this->close();
+
+ return null;
+ }
+
+ public function getSize(): ?int
+ {
+ return strlen($this->buffer);
+ }
+
+ public function isReadable(): bool
+ {
+ return true;
+ }
+
+ public function isWritable(): bool
+ {
+ return true;
+ }
+
+ public function isSeekable(): bool
+ {
+ return false;
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ throw new \RuntimeException('Cannot seek a BufferStream');
+ }
+
+ public function eof(): bool
+ {
+ return strlen($this->buffer) === 0;
+ }
+
+ public function tell(): int
+ {
+ throw new \RuntimeException('Cannot determine the position of a BufferStream');
+ }
+
+ /**
+ * Reads data from the buffer.
+ */
+ public function read($length): string
+ {
+ $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): int
+ {
+ $this->buffer .= $string;
+
+ if (strlen($this->buffer) >= $this->hwm) {
+ return 0;
+ }
+
+ return strlen($string);
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ if ($key === 'hwm') {
+ return $this->hwm;
+ }
+
+ return $key ? null : [];
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php
new file mode 100644
index 000000000..f34722cff
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/CachingStream.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that can cache previously read bytes from a sequentially
+ * read stream.
+ */
+final class CachingStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var StreamInterface Stream being wrapped */
+ private $remoteStream;
+
+ /** @var int Number of bytes to skip reading due to a write on the buffer */
+ private $skipReadBytes = 0;
+
+ /**
+ * @var StreamInterface
+ */
+ private $stream;
+
+ /**
+ * We will treat the buffer object as the body of the stream
+ *
+ * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
+ * @param StreamInterface $target Optionally specify where data is cached
+ */
+ public function __construct(
+ StreamInterface $stream,
+ StreamInterface $target = null
+ ) {
+ $this->remoteStream = $stream;
+ $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
+ }
+
+ public function getSize(): ?int
+ {
+ $remoteSize = $this->remoteStream->getSize();
+
+ if (null === $remoteSize) {
+ return null;
+ }
+
+ return max($this->stream->getSize(), $remoteSize);
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ 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): string
+ {
+ // 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): int
+ {
+ // 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(): bool
+ {
+ return $this->stream->eof() && $this->remoteStream->eof();
+ }
+
+ /**
+ * Close both the remote stream and buffer stream
+ */
+ public function close(): void
+ {
+ $this->remoteStream->close();
+ $this->stream->close();
+ }
+
+ private function cacheEntireStream(): int
+ {
+ $target = new FnStream(['write' => 'strlen']);
+ Utils::copyToStream($this, $target);
+
+ return $this->tell();
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php
new file mode 100644
index 000000000..6e3d209d0
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that begins dropping data once the size of the underlying
+ * stream becomes too full.
+ */
+final class DroppingStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var int */
+ private $maxLength;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ /**
+ * @param StreamInterface $stream Underlying stream to decorate.
+ * @param int $maxLength Maximum size before dropping data.
+ */
+ public function __construct(StreamInterface $stream, int $maxLength)
+ {
+ $this->stream = $stream;
+ $this->maxLength = $maxLength;
+ }
+
+ public function write($string): int
+ {
+ $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/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php b/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php
new file mode 100644
index 000000000..3a084779a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7\Exception;
+
+use InvalidArgumentException;
+
+/**
+ * Exception thrown if a URI cannot be parsed because it's malformed.
+ */
+class MalformedUriException extends InvalidArgumentException
+{
+}
diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php
new file mode 100644
index 000000000..9fdddb9c6
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/FnStream.php
@@ -0,0 +1,179 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * 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.
+ */
+#[\AllowDynamicProperties]
+final class FnStream implements StreamInterface
+{
+ private const SLOTS = [
+ '__toString', 'close', 'detach', 'rewind',
+ 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write',
+ 'isReadable', 'read', 'getContents', 'getMetadata',
+ ];
+
+ /** @var array<string, callable> */
+ private $methods;
+
+ /**
+ * @param array<string, callable> $methods Hash of method name to a callable.
+ */
+ public function __construct(array $methods)
+ {
+ $this->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(string $name): void
+ {
+ 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(): void
+ {
+ 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<string, callable> $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) {
+ /** @var callable $callable */
+ $callable = [$stream, $diff];
+ $methods[$diff] = $callable;
+ }
+
+ return new self($methods);
+ }
+
+ public function __toString(): string
+ {
+ try {
+ return call_user_func($this->_fn___toString);
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function close(): void
+ {
+ call_user_func($this->_fn_close);
+ }
+
+ public function detach()
+ {
+ return call_user_func($this->_fn_detach);
+ }
+
+ public function getSize(): ?int
+ {
+ return call_user_func($this->_fn_getSize);
+ }
+
+ public function tell(): int
+ {
+ return call_user_func($this->_fn_tell);
+ }
+
+ public function eof(): bool
+ {
+ return call_user_func($this->_fn_eof);
+ }
+
+ public function isSeekable(): bool
+ {
+ return call_user_func($this->_fn_isSeekable);
+ }
+
+ public function rewind(): void
+ {
+ call_user_func($this->_fn_rewind);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ call_user_func($this->_fn_seek, $offset, $whence);
+ }
+
+ public function isWritable(): bool
+ {
+ return call_user_func($this->_fn_isWritable);
+ }
+
+ public function write($string): int
+ {
+ return call_user_func($this->_fn_write, $string);
+ }
+
+ public function isReadable(): bool
+ {
+ return call_user_func($this->_fn_isReadable);
+ }
+
+ public function read($length): string
+ {
+ return call_user_func($this->_fn_read, $length);
+ }
+
+ public function getContents(): string
+ {
+ return call_user_func($this->_fn_getContents);
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ return call_user_func($this->_fn_getMetadata, $key);
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php
new file mode 100644
index 000000000..6e38e0031
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Header.php
@@ -0,0 +1,134 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+final class Header
+{
+ /**
+ * 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.
+ *
+ * @param string|array $header Header to parse into components.
+ */
+ public static function parse($header): array
+ {
+ static $trimmed = "\"' \n\t\r";
+ $params = $matches = [];
+
+ foreach ((array) $header as $value) {
+ foreach (self::splitList($value) as $val) {
+ $part = [];
+ foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
+ if (preg_match_all('/<[^>]+>|[^=]+/', $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.
+ *
+ * @deprecated Use self::splitList() instead.
+ */
+ public static function normalize($header): array
+ {
+ $result = [];
+ foreach ((array) $header as $value) {
+ foreach (self::splitList($value) as $parsed) {
+ $result[] = $parsed;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Splits a HTTP header defined to contain a comma-separated list into
+ * each individual value. Empty values will be removed.
+ *
+ * Example headers include 'accept', 'cache-control' and 'if-none-match'.
+ *
+ * This method must not be used to parse headers that are not defined as
+ * a list, such as 'user-agent' or 'set-cookie'.
+ *
+ * @param string|string[] $values Header value as returned by MessageInterface::getHeader()
+ *
+ * @return string[]
+ */
+ public static function splitList($values): array
+ {
+ if (!\is_array($values)) {
+ $values = [$values];
+ }
+
+ $result = [];
+ foreach ($values as $value) {
+ if (!\is_string($value)) {
+ throw new \TypeError('$header must either be a string or an array containing strings.');
+ }
+
+ $v = '';
+ $isQuoted = false;
+ $isEscaped = false;
+ for ($i = 0, $max = \strlen($value); $i < $max; ++$i) {
+ if ($isEscaped) {
+ $v .= $value[$i];
+ $isEscaped = false;
+
+ continue;
+ }
+
+ if (!$isQuoted && $value[$i] === ',') {
+ $v = \trim($v);
+ if ($v !== '') {
+ $result[] = $v;
+ }
+
+ $v = '';
+ continue;
+ }
+
+ if ($isQuoted && $value[$i] === '\\') {
+ $isEscaped = true;
+ $v .= $value[$i];
+
+ continue;
+ }
+ if ($value[$i] === '"') {
+ $isQuoted = !$isQuoted;
+ $v .= $value[$i];
+
+ continue;
+ }
+
+ $v .= $value[$i];
+ }
+
+ $v = \trim($v);
+ if ($v !== '') {
+ $result[] = $v;
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/HttpFactory.php b/vendor/guzzlehttp/psr7/src/HttpFactory.php
new file mode 100644
index 000000000..73d17e337
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/HttpFactory.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UploadedFileInterface;
+use Psr\Http\Message\UriFactoryInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Implements all of the PSR-17 interfaces.
+ *
+ * Note: in consuming code it is recommended to require the implemented interfaces
+ * and inject the instance of this class multiple times.
+ */
+final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface
+{
+ public function createUploadedFile(
+ StreamInterface $stream,
+ int $size = null,
+ int $error = \UPLOAD_ERR_OK,
+ string $clientFilename = null,
+ string $clientMediaType = null
+ ): UploadedFileInterface {
+ if ($size === null) {
+ $size = $stream->getSize();
+ }
+
+ return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
+ }
+
+ public function createStream(string $content = ''): StreamInterface
+ {
+ return Utils::streamFor($content);
+ }
+
+ public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface
+ {
+ try {
+ $resource = Utils::tryFopen($file, $mode);
+ } catch (\RuntimeException $e) {
+ if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) {
+ throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e);
+ }
+
+ throw $e;
+ }
+
+ return Utils::streamFor($resource);
+ }
+
+ public function createStreamFromResource($resource): StreamInterface
+ {
+ return Utils::streamFor($resource);
+ }
+
+ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
+ {
+ if (empty($method)) {
+ if (!empty($serverParams['REQUEST_METHOD'])) {
+ $method = $serverParams['REQUEST_METHOD'];
+ } else {
+ throw new \InvalidArgumentException('Cannot determine HTTP method');
+ }
+ }
+
+ return new ServerRequest($method, $uri, [], null, '1.1', $serverParams);
+ }
+
+ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
+ {
+ return new Response($code, [], null, '1.1', $reasonPhrase);
+ }
+
+ public function createRequest(string $method, $uri): RequestInterface
+ {
+ return new Request($method, $uri);
+ }
+
+ public function createUri(string $uri = ''): UriInterface
+ {
+ return new Uri($uri);
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php
new file mode 100644
index 000000000..599b55da3
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content.
+ *
+ * This stream decorator 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.
+ *
+ * @see http://tools.ietf.org/html/rfc1950
+ * @see http://tools.ietf.org/html/rfc1952
+ * @see http://php.net/manual/en/filters.compression.php
+ */
+final class InflateStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ public function __construct(StreamInterface $stream)
+ {
+ $resource = StreamWrapper::getResource($stream);
+ // Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data
+ // See http://www.zlib.net/manual.html#Advanced definition of inflateInit2
+ // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection"
+ // Default window size is 15.
+ stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]);
+ $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
new file mode 100644
index 000000000..f6c84904e
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Lazily reads or writes to a file that is opened only after an IO operation
+ * take place on the stream.
+ */
+final class LazyOpenStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var string */
+ private $filename;
+
+ /** @var string */
+ private $mode;
+
+ /**
+ * @var StreamInterface
+ */
+ private $stream;
+
+ /**
+ * @param string $filename File to lazily open
+ * @param string $mode fopen mode to use when opening the stream
+ */
+ public function __construct(string $filename, string $mode)
+ {
+ $this->filename = $filename;
+ $this->mode = $mode;
+
+ // unsetting the property forces the first access to go through
+ // __get().
+ unset($this->stream);
+ }
+
+ /**
+ * Creates the underlying stream lazily when required.
+ */
+ protected function createStream(): StreamInterface
+ {
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php
new file mode 100644
index 000000000..fb2232557
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/LimitStream.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Decorator used to return only a subset of a stream.
+ */
+final class LimitStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var int Offset to start reading from */
+ private $offset;
+
+ /** @var int Limit the number of bytes that can be read */
+ private $limit;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ /**
+ * @param StreamInterface $stream Stream to wrap
+ * @param int $limit Total number of bytes to allow to be read
+ * from the stream. Pass -1 for no limit.
+ * @param int $offset Position to seek to before reading (only
+ * works on seekable streams).
+ */
+ public function __construct(
+ StreamInterface $stream,
+ int $limit = -1,
+ int $offset = 0
+ ) {
+ $this->stream = $stream;
+ $this->setLimit($limit);
+ $this->setOffset($offset);
+ }
+
+ public function eof(): bool
+ {
+ // 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
+ */
+ public function getSize(): ?int
+ {
+ 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
+ */
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ 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()
+ */
+ public function tell(): int
+ {
+ 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(int $offset): void
+ {
+ $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(int $limit): void
+ {
+ $this->limit = $limit;
+ }
+
+ public function read($length): string
+ {
+ 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/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php
new file mode 100644
index 000000000..6e6c3e51b
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Message.php
@@ -0,0 +1,246 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+final class Message
+{
+ /**
+ * Returns the string representation of an HTTP message.
+ *
+ * @param MessageInterface $message Message to convert to a string.
+ */
+ public static function toString(MessageInterface $message): string
+ {
+ if ($message instanceof RequestInterface) {
+ $msg = trim($message->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 (is_string($name) && 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
+ */
+ public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string
+ {
+ $body = $message->getBody();
+
+ if (!$body->isSeekable() || !$body->isReadable()) {
+ return null;
+ }
+
+ $size = $body->getSize();
+
+ if ($size === 0) {
+ return null;
+ }
+
+ $body->rewind();
+ $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) !== 0) {
+ 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): void
+ {
+ $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.
+ */
+ public static function parseMessage(string $message): array
+ {
+ 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');
+ }
+
+ [$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');
+ }
+
+ [$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).
+ */
+ public static function parseRequestUri(string $path, array $headers): string
+ {
+ $hostKey = array_filter(array_keys($headers), function ($k) {
+ // Numeric array keys are converted to int by PHP.
+ $k = (string) $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.
+ */
+ public static function parseRequest(string $message): RequestInterface
+ {
+ $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.
+ */
+ public static function parseResponse(string $message): ResponseInterface
+ {
+ $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],
+ $parts[2] ?? null
+ );
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php
new file mode 100644
index 000000000..e05ebea88
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -0,0 +1,265 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Trait implementing functionality common to requests and responses.
+ */
+trait MessageTrait
+{
+ /** @var string[][] Map of all registered headers, as original name => array of values */
+ private $headers = [];
+
+ /** @var string[] 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;
+ }
+
+ public function withProtocolVersion($version): MessageInterface
+ {
+ if ($this->protocol === $version) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->protocol = $version;
+
+ return $new;
+ }
+
+ public function getHeaders(): array
+ {
+ return $this->headers;
+ }
+
+ public function hasHeader($header): bool
+ {
+ return isset($this->headerNames[strtolower($header)]);
+ }
+
+ public function getHeader($header): array
+ {
+ $header = strtolower($header);
+
+ if (!isset($this->headerNames[$header])) {
+ return [];
+ }
+
+ $header = $this->headerNames[$header];
+
+ return $this->headers[$header];
+ }
+
+ public function getHeaderLine($header): string
+ {
+ return implode(', ', $this->getHeader($header));
+ }
+
+ public function withHeader($header, $value): MessageInterface
+ {
+ $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): MessageInterface
+ {
+ $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): MessageInterface
+ {
+ $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(): StreamInterface
+ {
+ if (!$this->stream) {
+ $this->stream = Utils::streamFor('');
+ }
+
+ return $this->stream;
+ }
+
+ public function withBody(StreamInterface $body): MessageInterface
+ {
+ if ($body === $this->stream) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->stream = $body;
+
+ return $new;
+ }
+
+ /**
+ * @param array<string|int, string|string[]> $headers
+ */
+ private function setHeaders(array $headers): void
+ {
+ $this->headerNames = $this->headers = [];
+ foreach ($headers as $header => $value) {
+ // Numeric array keys are converted to int by PHP.
+ $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): array
+ {
+ 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): array
+ {
+ 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
+ */
+ private function assertHeader($header): void
+ {
+ 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 (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" is not valid header name.', $header)
+ );
+ }
+ }
+
+ /**
+ * @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(string $value): void
+ {
+ // 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/vendor/guzzlehttp/psr7/src/MimeType.php b/vendor/guzzlehttp/psr7/src/MimeType.php
new file mode 100644
index 000000000..b131bdbe7
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MimeType.php
@@ -0,0 +1,1259 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+final class MimeType
+{
+ private const MIME_TYPES = [
+ '1km' => 'application/vnd.1000minds.decision-model+xml',
+ '3dml' => 'text/vnd.in3d.3dml',
+ '3ds' => 'image/x-3ds',
+ '3g2' => 'video/3gpp2',
+ '3gp' => 'video/3gp',
+ '3gpp' => 'video/3gpp',
+ '3mf' => 'model/3mf',
+ '7z' => 'application/x-7z-compressed',
+ '7zip' => 'application/x-7z-compressed',
+ '123' => 'application/vnd.lotus-1-2-3',
+ 'aab' => 'application/x-authorware-bin',
+ 'aac' => 'audio/aac',
+ 'aam' => 'application/x-authorware-map',
+ 'aas' => 'application/x-authorware-seg',
+ 'abw' => 'application/x-abiword',
+ 'ac' => 'application/vnd.nokia.n-gage.ac+xml',
+ 'ac3' => 'audio/ac3',
+ 'acc' => 'application/vnd.americandynamics.acc',
+ 'ace' => 'application/x-ace-compressed',
+ 'acu' => 'application/vnd.acucobol',
+ 'acutc' => 'application/vnd.acucorp',
+ 'adp' => 'audio/adpcm',
+ 'adts' => 'audio/aac',
+ 'aep' => 'application/vnd.audiograph',
+ 'afm' => 'application/x-font-type1',
+ 'afp' => 'application/vnd.ibm.modcap',
+ 'age' => 'application/vnd.age',
+ 'ahead' => 'application/vnd.ahead.space',
+ 'ai' => 'application/pdf',
+ 'aif' => 'audio/x-aiff',
+ 'aifc' => 'audio/x-aiff',
+ 'aiff' => 'audio/x-aiff',
+ 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
+ 'ait' => 'application/vnd.dvb.ait',
+ 'ami' => 'application/vnd.amiga.ami',
+ 'aml' => 'application/automationml-aml+xml',
+ 'amlx' => 'application/automationml-amlx+zip',
+ 'amr' => 'audio/amr',
+ 'apk' => 'application/vnd.android.package-archive',
+ 'apng' => 'image/apng',
+ 'appcache' => 'text/cache-manifest',
+ 'appinstaller' => 'application/appinstaller',
+ 'application' => 'application/x-ms-application',
+ 'appx' => 'application/appx',
+ 'appxbundle' => 'application/appxbundle',
+ 'apr' => 'application/vnd.lotus-approach',
+ 'arc' => 'application/x-freearc',
+ 'arj' => 'application/x-arj',
+ 'asc' => 'application/pgp-signature',
+ 'asf' => 'video/x-ms-asf',
+ 'asm' => 'text/x-asm',
+ 'aso' => 'application/vnd.accpac.simply.aso',
+ 'asx' => 'video/x-ms-asf',
+ 'atc' => 'application/vnd.acucorp',
+ 'atom' => 'application/atom+xml',
+ 'atomcat' => 'application/atomcat+xml',
+ 'atomdeleted' => 'application/atomdeleted+xml',
+ 'atomsvc' => 'application/atomsvc+xml',
+ 'atx' => 'application/vnd.antix.game-component',
+ 'au' => 'audio/x-au',
+ 'avci' => 'image/avci',
+ 'avcs' => 'image/avcs',
+ 'avi' => 'video/x-msvideo',
+ 'avif' => 'image/avif',
+ 'aw' => 'application/applixware',
+ 'azf' => 'application/vnd.airzip.filesecure.azf',
+ 'azs' => 'application/vnd.airzip.filesecure.azs',
+ 'azv' => 'image/vnd.airzip.accelerator.azv',
+ 'azw' => 'application/vnd.amazon.ebook',
+ 'b16' => 'image/vnd.pco.b16',
+ 'bat' => 'application/x-msdownload',
+ 'bcpio' => 'application/x-bcpio',
+ 'bdf' => 'application/x-font-bdf',
+ 'bdm' => 'application/vnd.syncml.dm+wbxml',
+ 'bdoc' => 'application/x-bdoc',
+ 'bed' => 'application/vnd.realvnc.bed',
+ 'bh2' => 'application/vnd.fujitsu.oasysprs',
+ 'bin' => 'application/octet-stream',
+ 'blb' => 'application/x-blorb',
+ 'blorb' => 'application/x-blorb',
+ 'bmi' => 'application/vnd.bmi',
+ 'bmml' => 'application/vnd.balsamiq.bmml+xml',
+ 'bmp' => 'image/bmp',
+ 'book' => 'application/vnd.framemaker',
+ 'box' => 'application/vnd.previewsystems.box',
+ 'boz' => 'application/x-bzip2',
+ 'bpk' => 'application/octet-stream',
+ 'bpmn' => 'application/octet-stream',
+ 'bsp' => 'model/vnd.valve.source.compiled-map',
+ 'btf' => 'image/prs.btif',
+ 'btif' => 'image/prs.btif',
+ 'buffer' => 'application/octet-stream',
+ 'bz' => 'application/x-bzip',
+ 'bz2' => 'application/x-bzip2',
+ 'c' => 'text/x-c',
+ 'c4d' => 'application/vnd.clonk.c4group',
+ 'c4f' => 'application/vnd.clonk.c4group',
+ 'c4g' => 'application/vnd.clonk.c4group',
+ 'c4p' => 'application/vnd.clonk.c4group',
+ 'c4u' => 'application/vnd.clonk.c4group',
+ 'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
+ 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
+ 'cab' => 'application/vnd.ms-cab-compressed',
+ 'caf' => 'audio/x-caf',
+ 'cap' => 'application/vnd.tcpdump.pcap',
+ 'car' => 'application/vnd.curl.car',
+ 'cat' => 'application/vnd.ms-pki.seccat',
+ 'cb7' => 'application/x-cbr',
+ 'cba' => 'application/x-cbr',
+ 'cbr' => 'application/x-cbr',
+ 'cbt' => 'application/x-cbr',
+ 'cbz' => 'application/x-cbr',
+ 'cc' => 'text/x-c',
+ 'cco' => 'application/x-cocoa',
+ 'cct' => 'application/x-director',
+ 'ccxml' => 'application/ccxml+xml',
+ 'cdbcmsg' => 'application/vnd.contact.cmsg',
+ 'cdf' => 'application/x-netcdf',
+ 'cdfx' => 'application/cdfx+xml',
+ 'cdkey' => 'application/vnd.mediastation.cdkey',
+ 'cdmia' => 'application/cdmi-capability',
+ 'cdmic' => 'application/cdmi-container',
+ 'cdmid' => 'application/cdmi-domain',
+ 'cdmio' => 'application/cdmi-object',
+ 'cdmiq' => 'application/cdmi-queue',
+ 'cdr' => 'application/cdr',
+ 'cdx' => 'chemical/x-cdx',
+ 'cdxml' => 'application/vnd.chemdraw+xml',
+ 'cdy' => 'application/vnd.cinderella',
+ 'cer' => 'application/pkix-cert',
+ 'cfs' => 'application/x-cfs-compressed',
+ 'cgm' => 'image/cgm',
+ 'chat' => 'application/x-chat',
+ 'chm' => 'application/vnd.ms-htmlhelp',
+ 'chrt' => 'application/vnd.kde.kchart',
+ 'cif' => 'chemical/x-cif',
+ 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
+ 'cil' => 'application/vnd.ms-artgalry',
+ 'cjs' => 'application/node',
+ 'cla' => 'application/vnd.claymore',
+ 'class' => 'application/octet-stream',
+ 'cld' => 'model/vnd.cld',
+ 'clkk' => 'application/vnd.crick.clicker.keyboard',
+ 'clkp' => 'application/vnd.crick.clicker.palette',
+ 'clkt' => 'application/vnd.crick.clicker.template',
+ 'clkw' => 'application/vnd.crick.clicker.wordbank',
+ 'clkx' => 'application/vnd.crick.clicker',
+ 'clp' => 'application/x-msclip',
+ 'cmc' => 'application/vnd.cosmocaller',
+ 'cmdf' => 'chemical/x-cmdf',
+ 'cml' => 'chemical/x-cml',
+ 'cmp' => 'application/vnd.yellowriver-custom-menu',
+ 'cmx' => 'image/x-cmx',
+ 'cod' => 'application/vnd.rim.cod',
+ 'coffee' => 'text/coffeescript',
+ 'com' => 'application/x-msdownload',
+ 'conf' => 'text/plain',
+ 'cpio' => 'application/x-cpio',
+ 'cpl' => 'application/cpl+xml',
+ 'cpp' => 'text/x-c',
+ 'cpt' => 'application/mac-compactpro',
+ 'crd' => 'application/x-mscardfile',
+ 'crl' => 'application/pkix-crl',
+ 'crt' => 'application/x-x509-ca-cert',
+ 'crx' => 'application/x-chrome-extension',
+ 'cryptonote' => 'application/vnd.rig.cryptonote',
+ 'csh' => 'application/x-csh',
+ 'csl' => 'application/vnd.citationstyles.style+xml',
+ 'csml' => 'chemical/x-csml',
+ 'csp' => 'application/vnd.commonspace',
+ 'csr' => 'application/octet-stream',
+ 'css' => 'text/css',
+ 'cst' => 'application/x-director',
+ 'csv' => 'text/csv',
+ 'cu' => 'application/cu-seeme',
+ 'curl' => 'text/vnd.curl',
+ 'cwl' => 'application/cwl',
+ 'cww' => 'application/prs.cww',
+ 'cxt' => 'application/x-director',
+ 'cxx' => 'text/x-c',
+ 'dae' => 'model/vnd.collada+xml',
+ 'daf' => 'application/vnd.mobius.daf',
+ 'dart' => 'application/vnd.dart',
+ 'dataless' => 'application/vnd.fdsn.seed',
+ 'davmount' => 'application/davmount+xml',
+ 'dbf' => 'application/vnd.dbf',
+ 'dbk' => 'application/docbook+xml',
+ 'dcr' => 'application/x-director',
+ 'dcurl' => 'text/vnd.curl.dcurl',
+ 'dd2' => 'application/vnd.oma.dd2+xml',
+ 'ddd' => 'application/vnd.fujixerox.ddd',
+ 'ddf' => 'application/vnd.syncml.dmddf+xml',
+ 'dds' => 'image/vnd.ms-dds',
+ 'deb' => 'application/x-debian-package',
+ 'def' => 'text/plain',
+ 'deploy' => 'application/octet-stream',
+ 'der' => 'application/x-x509-ca-cert',
+ 'dfac' => 'application/vnd.dreamfactory',
+ 'dgc' => 'application/x-dgc-compressed',
+ 'dib' => 'image/bmp',
+ 'dic' => 'text/x-c',
+ 'dir' => 'application/x-director',
+ 'dis' => 'application/vnd.mobius.dis',
+ 'disposition-notification' => 'message/disposition-notification',
+ 'dist' => 'application/octet-stream',
+ 'distz' => 'application/octet-stream',
+ 'djv' => 'image/vnd.djvu',
+ 'djvu' => 'image/vnd.djvu',
+ 'dll' => 'application/octet-stream',
+ 'dmg' => 'application/x-apple-diskimage',
+ 'dmn' => 'application/octet-stream',
+ 'dmp' => 'application/vnd.tcpdump.pcap',
+ 'dms' => 'application/octet-stream',
+ 'dna' => 'application/vnd.dna',
+ 'doc' => 'application/msword',
+ 'docm' => 'application/vnd.ms-word.template.macroEnabled.12',
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dot' => 'application/msword',
+ 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
+ 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'dp' => 'application/vnd.osgi.dp',
+ 'dpg' => 'application/vnd.dpgraph',
+ 'dpx' => 'image/dpx',
+ 'dra' => 'audio/vnd.dra',
+ 'drle' => 'image/dicom-rle',
+ 'dsc' => 'text/prs.lines.tag',
+ 'dssc' => 'application/dssc+der',
+ 'dtb' => 'application/x-dtbook+xml',
+ 'dtd' => 'application/xml-dtd',
+ 'dts' => 'audio/vnd.dts',
+ 'dtshd' => 'audio/vnd.dts.hd',
+ 'dump' => 'application/octet-stream',
+ 'dvb' => 'video/vnd.dvb.file',
+ 'dvi' => 'application/x-dvi',
+ 'dwd' => 'application/atsc-dwd+xml',
+ 'dwf' => 'model/vnd.dwf',
+ 'dwg' => 'image/vnd.dwg',
+ 'dxf' => 'image/vnd.dxf',
+ 'dxp' => 'application/vnd.spotfire.dxp',
+ 'dxr' => 'application/x-director',
+ 'ear' => 'application/java-archive',
+ 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
+ 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
+ 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
+ 'ecma' => 'application/ecmascript',
+ 'edm' => 'application/vnd.novadigm.edm',
+ 'edx' => 'application/vnd.novadigm.edx',
+ 'efif' => 'application/vnd.picsel',
+ 'ei6' => 'application/vnd.pg.osasli',
+ 'elc' => 'application/octet-stream',
+ 'emf' => 'image/emf',
+ 'eml' => 'message/rfc822',
+ 'emma' => 'application/emma+xml',
+ 'emotionml' => 'application/emotionml+xml',
+ 'emz' => 'application/x-msmetafile',
+ 'eol' => 'audio/vnd.digital-winds',
+ 'eot' => 'application/vnd.ms-fontobject',
+ 'eps' => 'application/postscript',
+ 'epub' => 'application/epub+zip',
+ 'es3' => 'application/vnd.eszigno3+xml',
+ 'esa' => 'application/vnd.osgi.subsystem',
+ 'esf' => 'application/vnd.epson.esf',
+ 'et3' => 'application/vnd.eszigno3+xml',
+ 'etx' => 'text/x-setext',
+ 'eva' => 'application/x-eva',
+ 'evy' => 'application/x-envoy',
+ 'exe' => 'application/octet-stream',
+ 'exi' => 'application/exi',
+ 'exp' => 'application/express',
+ 'exr' => 'image/aces',
+ 'ext' => 'application/vnd.novadigm.ext',
+ 'ez' => 'application/andrew-inset',
+ 'ez2' => 'application/vnd.ezpix-album',
+ 'ez3' => 'application/vnd.ezpix-package',
+ 'f' => 'text/x-fortran',
+ 'f4v' => 'video/mp4',
+ 'f77' => 'text/x-fortran',
+ 'f90' => 'text/x-fortran',
+ 'fbs' => 'image/vnd.fastbidsheet',
+ 'fcdt' => 'application/vnd.adobe.formscentral.fcdt',
+ 'fcs' => 'application/vnd.isac.fcs',
+ 'fdf' => 'application/vnd.fdf',
+ 'fdt' => 'application/fdt+xml',
+ 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
+ 'fg5' => 'application/vnd.fujitsu.oasysgp',
+ 'fgd' => 'application/x-director',
+ 'fh' => 'image/x-freehand',
+ 'fh4' => 'image/x-freehand',
+ 'fh5' => 'image/x-freehand',
+ 'fh7' => 'image/x-freehand',
+ 'fhc' => 'image/x-freehand',
+ 'fig' => 'application/x-xfig',
+ 'fits' => 'image/fits',
+ 'flac' => 'audio/x-flac',
+ 'fli' => 'video/x-fli',
+ 'flo' => 'application/vnd.micrografx.flo',
+ 'flv' => 'video/x-flv',
+ 'flw' => 'application/vnd.kde.kivio',
+ 'flx' => 'text/vnd.fmi.flexstor',
+ 'fly' => 'text/vnd.fly',
+ 'fm' => 'application/vnd.framemaker',
+ 'fnc' => 'application/vnd.frogans.fnc',
+ 'fo' => 'application/vnd.software602.filler.form+xml',
+ 'for' => 'text/x-fortran',
+ 'fpx' => 'image/vnd.fpx',
+ 'frame' => 'application/vnd.framemaker',
+ 'fsc' => 'application/vnd.fsc.weblaunch',
+ 'fst' => 'image/vnd.fst',
+ 'ftc' => 'application/vnd.fluxtime.clip',
+ 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
+ 'fvt' => 'video/vnd.fvt',
+ 'fxp' => 'application/vnd.adobe.fxp',
+ 'fxpl' => 'application/vnd.adobe.fxp',
+ 'fzs' => 'application/vnd.fuzzysheet',
+ 'g2w' => 'application/vnd.geoplan',
+ 'g3' => 'image/g3fax',
+ 'g3w' => 'application/vnd.geospace',
+ 'gac' => 'application/vnd.groove-account',
+ 'gam' => 'application/x-tads',
+ 'gbr' => 'application/rpki-ghostbusters',
+ 'gca' => 'application/x-gca-compressed',
+ 'gdl' => 'model/vnd.gdl',
+ 'gdoc' => 'application/vnd.google-apps.document',
+ 'ged' => 'text/vnd.familysearch.gedcom',
+ 'geo' => 'application/vnd.dynageo',
+ 'geojson' => 'application/geo+json',
+ 'gex' => 'application/vnd.geometry-explorer',
+ 'ggb' => 'application/vnd.geogebra.file',
+ 'ggt' => 'application/vnd.geogebra.tool',
+ 'ghf' => 'application/vnd.groove-help',
+ 'gif' => 'image/gif',
+ 'gim' => 'application/vnd.groove-identity-message',
+ 'glb' => 'model/gltf-binary',
+ 'gltf' => 'model/gltf+json',
+ 'gml' => 'application/gml+xml',
+ 'gmx' => 'application/vnd.gmx',
+ 'gnumeric' => 'application/x-gnumeric',
+ 'gpg' => 'application/gpg-keys',
+ 'gph' => 'application/vnd.flographit',
+ 'gpx' => 'application/gpx+xml',
+ 'gqf' => 'application/vnd.grafeq',
+ 'gqs' => 'application/vnd.grafeq',
+ 'gram' => 'application/srgs',
+ 'gramps' => 'application/x-gramps-xml',
+ 'gre' => 'application/vnd.geometry-explorer',
+ 'grv' => 'application/vnd.groove-injector',
+ 'grxml' => 'application/srgs+xml',
+ 'gsf' => 'application/x-font-ghostscript',
+ 'gsheet' => 'application/vnd.google-apps.spreadsheet',
+ 'gslides' => 'application/vnd.google-apps.presentation',
+ 'gtar' => 'application/x-gtar',
+ 'gtm' => 'application/vnd.groove-tool-message',
+ 'gtw' => 'model/vnd.gtw',
+ 'gv' => 'text/vnd.graphviz',
+ 'gxf' => 'application/gxf',
+ 'gxt' => 'application/vnd.geonext',
+ 'gz' => 'application/gzip',
+ 'gzip' => 'application/gzip',
+ 'h' => 'text/x-c',
+ 'h261' => 'video/h261',
+ 'h263' => 'video/h263',
+ 'h264' => 'video/h264',
+ 'hal' => 'application/vnd.hal+xml',
+ 'hbci' => 'application/vnd.hbci',
+ 'hbs' => 'text/x-handlebars-template',
+ 'hdd' => 'application/x-virtualbox-hdd',
+ 'hdf' => 'application/x-hdf',
+ 'heic' => 'image/heic',
+ 'heics' => 'image/heic-sequence',
+ 'heif' => 'image/heif',
+ 'heifs' => 'image/heif-sequence',
+ 'hej2' => 'image/hej2k',
+ 'held' => 'application/atsc-held+xml',
+ 'hh' => 'text/x-c',
+ 'hjson' => 'application/hjson',
+ 'hlp' => 'application/winhlp',
+ 'hpgl' => 'application/vnd.hp-hpgl',
+ 'hpid' => 'application/vnd.hp-hpid',
+ 'hps' => 'application/vnd.hp-hps',
+ 'hqx' => 'application/mac-binhex40',
+ 'hsj2' => 'image/hsj2',
+ 'htc' => 'text/x-component',
+ 'htke' => 'application/vnd.kenameaapp',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'hvd' => 'application/vnd.yamaha.hv-dic',
+ 'hvp' => 'application/vnd.yamaha.hv-voice',
+ 'hvs' => 'application/vnd.yamaha.hv-script',
+ 'i2g' => 'application/vnd.intergeo',
+ 'icc' => 'application/vnd.iccprofile',
+ 'ice' => 'x-conference/x-cooltalk',
+ 'icm' => 'application/vnd.iccprofile',
+ 'ico' => 'image/x-icon',
+ 'ics' => 'text/calendar',
+ 'ief' => 'image/ief',
+ 'ifb' => 'text/calendar',
+ 'ifm' => 'application/vnd.shana.informed.formdata',
+ 'iges' => 'model/iges',
+ 'igl' => 'application/vnd.igloader',
+ 'igm' => 'application/vnd.insors.igm',
+ 'igs' => 'model/iges',
+ 'igx' => 'application/vnd.micrografx.igx',
+ 'iif' => 'application/vnd.shana.informed.interchange',
+ 'img' => 'application/octet-stream',
+ 'imp' => 'application/vnd.accpac.simply.imp',
+ 'ims' => 'application/vnd.ms-ims',
+ 'in' => 'text/plain',
+ 'ini' => 'text/plain',
+ 'ink' => 'application/inkml+xml',
+ 'inkml' => 'application/inkml+xml',
+ 'install' => 'application/x-install-instructions',
+ 'iota' => 'application/vnd.astraea-software.iota',
+ 'ipfix' => 'application/ipfix',
+ 'ipk' => 'application/vnd.shana.informed.package',
+ 'irm' => 'application/vnd.ibm.rights-management',
+ 'irp' => 'application/vnd.irepository.package+xml',
+ 'iso' => 'application/x-iso9660-image',
+ 'itp' => 'application/vnd.shana.informed.formtemplate',
+ 'its' => 'application/its+xml',
+ 'ivp' => 'application/vnd.immervision-ivp',
+ 'ivu' => 'application/vnd.immervision-ivu',
+ 'jad' => 'text/vnd.sun.j2me.app-descriptor',
+ 'jade' => 'text/jade',
+ 'jam' => 'application/vnd.jam',
+ 'jar' => 'application/java-archive',
+ 'jardiff' => 'application/x-java-archive-diff',
+ 'java' => 'text/x-java-source',
+ 'jhc' => 'image/jphc',
+ 'jisp' => 'application/vnd.jisp',
+ 'jls' => 'image/jls',
+ 'jlt' => 'application/vnd.hp-jlyt',
+ 'jng' => 'image/x-jng',
+ 'jnlp' => 'application/x-java-jnlp-file',
+ 'joda' => 'application/vnd.joost.joda-archive',
+ 'jp2' => 'image/jp2',
+ 'jpe' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'jpf' => 'image/jpx',
+ 'jpg' => 'image/jpeg',
+ 'jpg2' => 'image/jp2',
+ 'jpgm' => 'video/jpm',
+ 'jpgv' => 'video/jpeg',
+ 'jph' => 'image/jph',
+ 'jpm' => 'video/jpm',
+ 'jpx' => 'image/jpx',
+ 'js' => 'application/javascript',
+ 'json' => 'application/json',
+ 'json5' => 'application/json5',
+ 'jsonld' => 'application/ld+json',
+ 'jsonml' => 'application/jsonml+json',
+ 'jsx' => 'text/jsx',
+ 'jt' => 'model/jt',
+ 'jxr' => 'image/jxr',
+ 'jxra' => 'image/jxra',
+ 'jxrs' => 'image/jxrs',
+ 'jxs' => 'image/jxs',
+ 'jxsc' => 'image/jxsc',
+ 'jxsi' => 'image/jxsi',
+ 'jxss' => 'image/jxss',
+ 'kar' => 'audio/midi',
+ 'karbon' => 'application/vnd.kde.karbon',
+ 'kdb' => 'application/octet-stream',
+ 'kdbx' => 'application/x-keepass2',
+ 'key' => 'application/x-iwork-keynote-sffkey',
+ 'kfo' => 'application/vnd.kde.kformula',
+ 'kia' => 'application/vnd.kidspiration',
+ 'kml' => 'application/vnd.google-earth.kml+xml',
+ 'kmz' => 'application/vnd.google-earth.kmz',
+ 'kne' => 'application/vnd.kinar',
+ 'knp' => 'application/vnd.kinar',
+ 'kon' => 'application/vnd.kde.kontour',
+ 'kpr' => 'application/vnd.kde.kpresenter',
+ 'kpt' => 'application/vnd.kde.kpresenter',
+ 'kpxx' => 'application/vnd.ds-keypoint',
+ 'ksp' => 'application/vnd.kde.kspread',
+ 'ktr' => 'application/vnd.kahootz',
+ 'ktx' => 'image/ktx',
+ 'ktx2' => 'image/ktx2',
+ 'ktz' => 'application/vnd.kahootz',
+ 'kwd' => 'application/vnd.kde.kword',
+ 'kwt' => 'application/vnd.kde.kword',
+ 'lasxml' => 'application/vnd.las.las+xml',
+ 'latex' => 'application/x-latex',
+ 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
+ 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
+ 'les' => 'application/vnd.hhe.lesson-player',
+ 'less' => 'text/less',
+ 'lgr' => 'application/lgr+xml',
+ 'lha' => 'application/octet-stream',
+ 'link66' => 'application/vnd.route66.link66+xml',
+ 'list' => 'text/plain',
+ 'list3820' => 'application/vnd.ibm.modcap',
+ 'listafp' => 'application/vnd.ibm.modcap',
+ 'litcoffee' => 'text/coffeescript',
+ 'lnk' => 'application/x-ms-shortcut',
+ 'log' => 'text/plain',
+ 'lostxml' => 'application/lost+xml',
+ 'lrf' => 'application/octet-stream',
+ 'lrm' => 'application/vnd.ms-lrm',
+ 'ltf' => 'application/vnd.frogans.ltf',
+ 'lua' => 'text/x-lua',
+ 'luac' => 'application/x-lua-bytecode',
+ 'lvp' => 'audio/vnd.lucent.voice',
+ 'lwp' => 'application/vnd.lotus-wordpro',
+ 'lzh' => 'application/octet-stream',
+ 'm1v' => 'video/mpeg',
+ 'm2a' => 'audio/mpeg',
+ 'm2v' => 'video/mpeg',
+ 'm3a' => 'audio/mpeg',
+ 'm3u' => 'text/plain',
+ 'm3u8' => 'application/vnd.apple.mpegurl',
+ 'm4a' => 'audio/x-m4a',
+ 'm4p' => 'application/mp4',
+ 'm4s' => 'video/iso.segment',
+ 'm4u' => 'application/vnd.mpegurl',
+ 'm4v' => 'video/x-m4v',
+ 'm13' => 'application/x-msmediaview',
+ 'm14' => 'application/x-msmediaview',
+ 'm21' => 'application/mp21',
+ 'ma' => 'application/mathematica',
+ 'mads' => 'application/mads+xml',
+ 'maei' => 'application/mmt-aei+xml',
+ 'mag' => 'application/vnd.ecowin.chart',
+ 'maker' => 'application/vnd.framemaker',
+ 'man' => 'text/troff',
+ 'manifest' => 'text/cache-manifest',
+ 'map' => 'application/json',
+ 'mar' => 'application/octet-stream',
+ 'markdown' => 'text/markdown',
+ 'mathml' => 'application/mathml+xml',
+ 'mb' => 'application/mathematica',
+ 'mbk' => 'application/vnd.mobius.mbk',
+ 'mbox' => 'application/mbox',
+ 'mc1' => 'application/vnd.medcalcdata',
+ 'mcd' => 'application/vnd.mcd',
+ 'mcurl' => 'text/vnd.curl.mcurl',
+ 'md' => 'text/markdown',
+ 'mdb' => 'application/x-msaccess',
+ 'mdi' => 'image/vnd.ms-modi',
+ 'mdx' => 'text/mdx',
+ 'me' => 'text/troff',
+ 'mesh' => 'model/mesh',
+ 'meta4' => 'application/metalink4+xml',
+ 'metalink' => 'application/metalink+xml',
+ 'mets' => 'application/mets+xml',
+ 'mfm' => 'application/vnd.mfmp',
+ 'mft' => 'application/rpki-manifest',
+ 'mgp' => 'application/vnd.osgeo.mapguide.package',
+ 'mgz' => 'application/vnd.proteus.magazine',
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mie' => 'application/x-mie',
+ 'mif' => 'application/vnd.mif',
+ 'mime' => 'message/rfc822',
+ 'mj2' => 'video/mj2',
+ 'mjp2' => 'video/mj2',
+ 'mjs' => 'text/javascript',
+ 'mk3d' => 'video/x-matroska',
+ 'mka' => 'audio/x-matroska',
+ 'mkd' => 'text/x-markdown',
+ 'mks' => 'video/x-matroska',
+ 'mkv' => 'video/x-matroska',
+ 'mlp' => 'application/vnd.dolby.mlp',
+ 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
+ 'mmf' => 'application/vnd.smaf',
+ 'mml' => 'text/mathml',
+ 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
+ 'mng' => 'video/x-mng',
+ 'mny' => 'application/x-msmoney',
+ 'mobi' => 'application/x-mobipocket-ebook',
+ 'mods' => 'application/mods+xml',
+ 'mov' => 'video/quicktime',
+ 'movie' => 'video/x-sgi-movie',
+ 'mp2' => 'audio/mpeg',
+ 'mp2a' => 'audio/mpeg',
+ 'mp3' => 'audio/mpeg',
+ 'mp4' => 'video/mp4',
+ 'mp4a' => 'audio/mp4',
+ 'mp4s' => 'application/mp4',
+ 'mp4v' => 'video/mp4',
+ 'mp21' => 'application/mp21',
+ 'mpc' => 'application/vnd.mophun.certificate',
+ 'mpd' => 'application/dash+xml',
+ 'mpe' => 'video/mpeg',
+ 'mpeg' => 'video/mpeg',
+ 'mpf' => 'application/media-policy-dataset+xml',
+ 'mpg' => 'video/mpeg',
+ 'mpg4' => 'video/mp4',
+ 'mpga' => 'audio/mpeg',
+ 'mpkg' => 'application/vnd.apple.installer+xml',
+ 'mpm' => 'application/vnd.blueice.multipass',
+ 'mpn' => 'application/vnd.mophun.application',
+ 'mpp' => 'application/vnd.ms-project',
+ 'mpt' => 'application/vnd.ms-project',
+ 'mpy' => 'application/vnd.ibm.minipay',
+ 'mqy' => 'application/vnd.mobius.mqy',
+ 'mrc' => 'application/marc',
+ 'mrcx' => 'application/marcxml+xml',
+ 'ms' => 'text/troff',
+ 'mscml' => 'application/mediaservercontrol+xml',
+ 'mseed' => 'application/vnd.fdsn.mseed',
+ 'mseq' => 'application/vnd.mseq',
+ 'msf' => 'application/vnd.epson.msf',
+ 'msg' => 'application/vnd.ms-outlook',
+ 'msh' => 'model/mesh',
+ 'msi' => 'application/x-msdownload',
+ 'msix' => 'application/msix',
+ 'msixbundle' => 'application/msixbundle',
+ 'msl' => 'application/vnd.mobius.msl',
+ 'msm' => 'application/octet-stream',
+ 'msp' => 'application/octet-stream',
+ 'msty' => 'application/vnd.muvee.style',
+ 'mtl' => 'model/mtl',
+ 'mts' => 'model/vnd.mts',
+ 'mus' => 'application/vnd.musician',
+ 'musd' => 'application/mmt-usd+xml',
+ 'musicxml' => 'application/vnd.recordare.musicxml+xml',
+ 'mvb' => 'application/x-msmediaview',
+ 'mvt' => 'application/vnd.mapbox-vector-tile',
+ 'mwf' => 'application/vnd.mfer',
+ 'mxf' => 'application/mxf',
+ 'mxl' => 'application/vnd.recordare.musicxml',
+ 'mxmf' => 'audio/mobile-xmf',
+ 'mxml' => 'application/xv+xml',
+ 'mxs' => 'application/vnd.triscape.mxs',
+ 'mxu' => 'video/vnd.mpegurl',
+ 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
+ 'n3' => 'text/n3',
+ 'nb' => 'application/mathematica',
+ 'nbp' => 'application/vnd.wolfram.player',
+ 'nc' => 'application/x-netcdf',
+ 'ncx' => 'application/x-dtbncx+xml',
+ 'nfo' => 'text/x-nfo',
+ 'ngdat' => 'application/vnd.nokia.n-gage.data',
+ 'nitf' => 'application/vnd.nitf',
+ 'nlu' => 'application/vnd.neurolanguage.nlu',
+ 'nml' => 'application/vnd.enliven',
+ 'nnd' => 'application/vnd.noblenet-directory',
+ 'nns' => 'application/vnd.noblenet-sealer',
+ 'nnw' => 'application/vnd.noblenet-web',
+ 'npx' => 'image/vnd.net-fpx',
+ 'nq' => 'application/n-quads',
+ 'nsc' => 'application/x-conference',
+ 'nsf' => 'application/vnd.lotus-notes',
+ 'nt' => 'application/n-triples',
+ 'ntf' => 'application/vnd.nitf',
+ 'numbers' => 'application/x-iwork-numbers-sffnumbers',
+ 'nzb' => 'application/x-nzb',
+ 'oa2' => 'application/vnd.fujitsu.oasys2',
+ 'oa3' => 'application/vnd.fujitsu.oasys3',
+ 'oas' => 'application/vnd.fujitsu.oasys',
+ 'obd' => 'application/x-msbinder',
+ 'obgx' => 'application/vnd.openblox.game+xml',
+ 'obj' => 'model/obj',
+ 'oda' => 'application/oda',
+ 'odb' => 'application/vnd.oasis.opendocument.database',
+ 'odc' => 'application/vnd.oasis.opendocument.chart',
+ 'odf' => 'application/vnd.oasis.opendocument.formula',
+ 'odft' => 'application/vnd.oasis.opendocument.formula-template',
+ 'odg' => 'application/vnd.oasis.opendocument.graphics',
+ 'odi' => 'application/vnd.oasis.opendocument.image',
+ 'odm' => 'application/vnd.oasis.opendocument.text-master',
+ 'odp' => 'application/vnd.oasis.opendocument.presentation',
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
+ 'odt' => 'application/vnd.oasis.opendocument.text',
+ 'oga' => 'audio/ogg',
+ 'ogex' => 'model/vnd.opengex',
+ 'ogg' => 'audio/ogg',
+ 'ogv' => 'video/ogg',
+ 'ogx' => 'application/ogg',
+ 'omdoc' => 'application/omdoc+xml',
+ 'onepkg' => 'application/onenote',
+ 'onetmp' => 'application/onenote',
+ 'onetoc' => 'application/onenote',
+ 'onetoc2' => 'application/onenote',
+ 'opf' => 'application/oebps-package+xml',
+ 'opml' => 'text/x-opml',
+ 'oprc' => 'application/vnd.palm',
+ 'opus' => 'audio/ogg',
+ 'org' => 'text/x-org',
+ 'osf' => 'application/vnd.yamaha.openscoreformat',
+ 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
+ 'osm' => 'application/vnd.openstreetmap.data+xml',
+ 'otc' => 'application/vnd.oasis.opendocument.chart-template',
+ 'otf' => 'font/otf',
+ 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
+ 'oth' => 'application/vnd.oasis.opendocument.text-web',
+ 'oti' => 'application/vnd.oasis.opendocument.image-template',
+ 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
+ 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
+ 'ott' => 'application/vnd.oasis.opendocument.text-template',
+ 'ova' => 'application/x-virtualbox-ova',
+ 'ovf' => 'application/x-virtualbox-ovf',
+ 'owl' => 'application/rdf+xml',
+ 'oxps' => 'application/oxps',
+ 'oxt' => 'application/vnd.openofficeorg.extension',
+ 'p' => 'text/x-pascal',
+ 'p7a' => 'application/x-pkcs7-signature',
+ 'p7b' => 'application/x-pkcs7-certificates',
+ 'p7c' => 'application/pkcs7-mime',
+ 'p7m' => 'application/pkcs7-mime',
+ 'p7r' => 'application/x-pkcs7-certreqresp',
+ 'p7s' => 'application/pkcs7-signature',
+ 'p8' => 'application/pkcs8',
+ 'p10' => 'application/x-pkcs10',
+ 'p12' => 'application/x-pkcs12',
+ 'pac' => 'application/x-ns-proxy-autoconfig',
+ 'pages' => 'application/x-iwork-pages-sffpages',
+ 'pas' => 'text/x-pascal',
+ 'paw' => 'application/vnd.pawaafile',
+ 'pbd' => 'application/vnd.powerbuilder6',
+ 'pbm' => 'image/x-portable-bitmap',
+ 'pcap' => 'application/vnd.tcpdump.pcap',
+ 'pcf' => 'application/x-font-pcf',
+ 'pcl' => 'application/vnd.hp-pcl',
+ 'pclxl' => 'application/vnd.hp-pclxl',
+ 'pct' => 'image/x-pict',
+ 'pcurl' => 'application/vnd.curl.pcurl',
+ 'pcx' => 'image/x-pcx',
+ 'pdb' => 'application/x-pilot',
+ 'pde' => 'text/x-processing',
+ 'pdf' => 'application/pdf',
+ 'pem' => 'application/x-x509-user-cert',
+ 'pfa' => 'application/x-font-type1',
+ 'pfb' => 'application/x-font-type1',
+ 'pfm' => 'application/x-font-type1',
+ 'pfr' => 'application/font-tdpfr',
+ 'pfx' => 'application/x-pkcs12',
+ 'pgm' => 'image/x-portable-graymap',
+ 'pgn' => 'application/x-chess-pgn',
+ 'pgp' => 'application/pgp',
+ 'phar' => 'application/octet-stream',
+ 'php' => 'application/x-httpd-php',
+ 'php3' => 'application/x-httpd-php',
+ 'php4' => 'application/x-httpd-php',
+ 'phps' => 'application/x-httpd-php-source',
+ 'phtml' => 'application/x-httpd-php',
+ 'pic' => 'image/x-pict',
+ 'pkg' => 'application/octet-stream',
+ 'pki' => 'application/pkixcmp',
+ 'pkipath' => 'application/pkix-pkipath',
+ 'pkpass' => 'application/vnd.apple.pkpass',
+ 'pl' => 'application/x-perl',
+ 'plb' => 'application/vnd.3gpp.pic-bw-large',
+ 'plc' => 'application/vnd.mobius.plc',
+ 'plf' => 'application/vnd.pocketlearn',
+ 'pls' => 'application/pls+xml',
+ 'pm' => 'application/x-perl',
+ 'pml' => 'application/vnd.ctc-posml',
+ 'png' => 'image/png',
+ 'pnm' => 'image/x-portable-anymap',
+ 'portpkg' => 'application/vnd.macports.portpkg',
+ 'pot' => 'application/vnd.ms-powerpoint',
+ 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
+ 'ppa' => 'application/vnd.ms-powerpoint',
+ 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
+ 'ppd' => 'application/vnd.cups-ppd',
+ 'ppm' => 'image/x-portable-pixmap',
+ 'pps' => 'application/vnd.ms-powerpoint',
+ 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
+ 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+ 'ppt' => 'application/powerpoint',
+ 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'pqa' => 'application/vnd.palm',
+ 'prc' => 'model/prc',
+ 'pre' => 'application/vnd.lotus-freelance',
+ 'prf' => 'application/pics-rules',
+ 'provx' => 'application/provenance+xml',
+ 'ps' => 'application/postscript',
+ 'psb' => 'application/vnd.3gpp.pic-bw-small',
+ 'psd' => 'application/x-photoshop',
+ 'psf' => 'application/x-font-linux-psf',
+ 'pskcxml' => 'application/pskc+xml',
+ 'pti' => 'image/prs.pti',
+ 'ptid' => 'application/vnd.pvi.ptid1',
+ 'pub' => 'application/x-mspublisher',
+ 'pvb' => 'application/vnd.3gpp.pic-bw-var',
+ 'pwn' => 'application/vnd.3m.post-it-notes',
+ 'pya' => 'audio/vnd.ms-playready.media.pya',
+ 'pyo' => 'model/vnd.pytha.pyox',
+ 'pyox' => 'model/vnd.pytha.pyox',
+ 'pyv' => 'video/vnd.ms-playready.media.pyv',
+ 'qam' => 'application/vnd.epson.quickanime',
+ 'qbo' => 'application/vnd.intu.qbo',
+ 'qfx' => 'application/vnd.intu.qfx',
+ 'qps' => 'application/vnd.publishare-delta-tree',
+ 'qt' => 'video/quicktime',
+ 'qwd' => 'application/vnd.quark.quarkxpress',
+ 'qwt' => 'application/vnd.quark.quarkxpress',
+ 'qxb' => 'application/vnd.quark.quarkxpress',
+ 'qxd' => 'application/vnd.quark.quarkxpress',
+ 'qxl' => 'application/vnd.quark.quarkxpress',
+ 'qxt' => 'application/vnd.quark.quarkxpress',
+ 'ra' => 'audio/x-realaudio',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'raml' => 'application/raml+yaml',
+ 'rapd' => 'application/route-apd+xml',
+ 'rar' => 'application/x-rar',
+ 'ras' => 'image/x-cmu-raster',
+ 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
+ 'rdf' => 'application/rdf+xml',
+ 'rdz' => 'application/vnd.data-vision.rdz',
+ 'relo' => 'application/p2p-overlay+xml',
+ 'rep' => 'application/vnd.businessobjects',
+ 'res' => 'application/x-dtbresource+xml',
+ 'rgb' => 'image/x-rgb',
+ 'rif' => 'application/reginfo+xml',
+ 'rip' => 'audio/vnd.rip',
+ 'ris' => 'application/x-research-info-systems',
+ 'rl' => 'application/resource-lists+xml',
+ 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
+ 'rld' => 'application/resource-lists-diff+xml',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rmi' => 'audio/midi',
+ 'rmp' => 'audio/x-pn-realaudio-plugin',
+ 'rms' => 'application/vnd.jcp.javame.midlet-rms',
+ 'rmvb' => 'application/vnd.rn-realmedia-vbr',
+ 'rnc' => 'application/relax-ng-compact-syntax',
+ 'rng' => 'application/xml',
+ 'roa' => 'application/rpki-roa',
+ 'roff' => 'text/troff',
+ 'rp9' => 'application/vnd.cloanto.rp9',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'rpss' => 'application/vnd.nokia.radio-presets',
+ 'rpst' => 'application/vnd.nokia.radio-preset',
+ 'rq' => 'application/sparql-query',
+ 'rs' => 'application/rls-services+xml',
+ 'rsa' => 'application/x-pkcs7',
+ 'rsat' => 'application/atsc-rsat+xml',
+ 'rsd' => 'application/rsd+xml',
+ 'rsheet' => 'application/urc-ressheet+xml',
+ 'rss' => 'application/rss+xml',
+ 'rtf' => 'text/rtf',
+ 'rtx' => 'text/richtext',
+ 'run' => 'application/x-makeself',
+ 'rusd' => 'application/route-usd+xml',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 's' => 'text/x-asm',
+ 's3m' => 'audio/s3m',
+ 'saf' => 'application/vnd.yamaha.smaf-audio',
+ 'sass' => 'text/x-sass',
+ 'sbml' => 'application/sbml+xml',
+ 'sc' => 'application/vnd.ibm.secure-container',
+ 'scd' => 'application/x-msschedule',
+ 'scm' => 'application/vnd.lotus-screencam',
+ 'scq' => 'application/scvp-cv-request',
+ 'scs' => 'application/scvp-cv-response',
+ 'scss' => 'text/x-scss',
+ 'scurl' => 'text/vnd.curl.scurl',
+ 'sda' => 'application/vnd.stardivision.draw',
+ 'sdc' => 'application/vnd.stardivision.calc',
+ 'sdd' => 'application/vnd.stardivision.impress',
+ 'sdkd' => 'application/vnd.solent.sdkm+xml',
+ 'sdkm' => 'application/vnd.solent.sdkm+xml',
+ 'sdp' => 'application/sdp',
+ 'sdw' => 'application/vnd.stardivision.writer',
+ 'sea' => 'application/octet-stream',
+ 'see' => 'application/vnd.seemail',
+ 'seed' => 'application/vnd.fdsn.seed',
+ 'sema' => 'application/vnd.sema',
+ 'semd' => 'application/vnd.semd',
+ 'semf' => 'application/vnd.semf',
+ 'senmlx' => 'application/senml+xml',
+ 'sensmlx' => 'application/sensml+xml',
+ 'ser' => 'application/java-serialized-object',
+ 'setpay' => 'application/set-payment-initiation',
+ 'setreg' => 'application/set-registration-initiation',
+ 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
+ 'sfs' => 'application/vnd.spotfire.sfs',
+ 'sfv' => 'text/x-sfv',
+ 'sgi' => 'image/sgi',
+ 'sgl' => 'application/vnd.stardivision.writer-global',
+ 'sgm' => 'text/sgml',
+ 'sgml' => 'text/sgml',
+ 'sh' => 'application/x-sh',
+ 'shar' => 'application/x-shar',
+ 'shex' => 'text/shex',
+ 'shf' => 'application/shf+xml',
+ 'shtml' => 'text/html',
+ 'sid' => 'image/x-mrsid-image',
+ 'sieve' => 'application/sieve',
+ 'sig' => 'application/pgp-signature',
+ 'sil' => 'audio/silk',
+ 'silo' => 'model/mesh',
+ 'sis' => 'application/vnd.symbian.install',
+ 'sisx' => 'application/vnd.symbian.install',
+ 'sit' => 'application/x-stuffit',
+ 'sitx' => 'application/x-stuffitx',
+ 'siv' => 'application/sieve',
+ 'skd' => 'application/vnd.koan',
+ 'skm' => 'application/vnd.koan',
+ 'skp' => 'application/vnd.koan',
+ 'skt' => 'application/vnd.koan',
+ 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
+ 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
+ 'slim' => 'text/slim',
+ 'slm' => 'text/slim',
+ 'sls' => 'application/route-s-tsid+xml',
+ 'slt' => 'application/vnd.epson.salt',
+ 'sm' => 'application/vnd.stepmania.stepchart',
+ 'smf' => 'application/vnd.stardivision.math',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'smv' => 'video/x-smv',
+ 'smzip' => 'application/vnd.stepmania.package',
+ 'snd' => 'audio/basic',
+ 'snf' => 'application/x-font-snf',
+ 'so' => 'application/octet-stream',
+ 'spc' => 'application/x-pkcs7-certificates',
+ 'spdx' => 'text/spdx',
+ 'spf' => 'application/vnd.yamaha.smaf-phrase',
+ 'spl' => 'application/x-futuresplash',
+ 'spot' => 'text/vnd.in3d.spot',
+ 'spp' => 'application/scvp-vp-response',
+ 'spq' => 'application/scvp-vp-request',
+ 'spx' => 'audio/ogg',
+ 'sql' => 'application/x-sql',
+ 'src' => 'application/x-wais-source',
+ 'srt' => 'application/x-subrip',
+ 'sru' => 'application/sru+xml',
+ 'srx' => 'application/sparql-results+xml',
+ 'ssdl' => 'application/ssdl+xml',
+ 'sse' => 'application/vnd.kodak-descriptor',
+ 'ssf' => 'application/vnd.epson.ssf',
+ 'ssml' => 'application/ssml+xml',
+ 'sst' => 'application/octet-stream',
+ 'st' => 'application/vnd.sailingtracker.track',
+ 'stc' => 'application/vnd.sun.xml.calc.template',
+ 'std' => 'application/vnd.sun.xml.draw.template',
+ 'step' => 'application/STEP',
+ 'stf' => 'application/vnd.wt.stf',
+ 'sti' => 'application/vnd.sun.xml.impress.template',
+ 'stk' => 'application/hyperstudio',
+ 'stl' => 'model/stl',
+ 'stp' => 'application/STEP',
+ 'stpx' => 'model/step+xml',
+ 'stpxz' => 'model/step-xml+zip',
+ 'stpz' => 'model/step+zip',
+ 'str' => 'application/vnd.pg.format',
+ 'stw' => 'application/vnd.sun.xml.writer.template',
+ 'styl' => 'text/stylus',
+ 'stylus' => 'text/stylus',
+ 'sub' => 'text/vnd.dvb.subtitle',
+ 'sus' => 'application/vnd.sus-calendar',
+ 'susp' => 'application/vnd.sus-calendar',
+ 'sv4cpio' => 'application/x-sv4cpio',
+ 'sv4crc' => 'application/x-sv4crc',
+ 'svc' => 'application/vnd.dvb.service',
+ 'svd' => 'application/vnd.svd',
+ 'svg' => 'image/svg+xml',
+ 'svgz' => 'image/svg+xml',
+ 'swa' => 'application/x-director',
+ 'swf' => 'application/x-shockwave-flash',
+ 'swi' => 'application/vnd.aristanetworks.swi',
+ 'swidtag' => 'application/swid+xml',
+ 'sxc' => 'application/vnd.sun.xml.calc',
+ 'sxd' => 'application/vnd.sun.xml.draw',
+ 'sxg' => 'application/vnd.sun.xml.writer.global',
+ 'sxi' => 'application/vnd.sun.xml.impress',
+ 'sxm' => 'application/vnd.sun.xml.math',
+ 'sxw' => 'application/vnd.sun.xml.writer',
+ 't' => 'text/troff',
+ 't3' => 'application/x-t3vm-image',
+ 't38' => 'image/t38',
+ 'taglet' => 'application/vnd.mynfc',
+ 'tao' => 'application/vnd.tao.intent-module-archive',
+ 'tap' => 'image/vnd.tencent.tap',
+ 'tar' => 'application/x-tar',
+ 'tcap' => 'application/vnd.3gpp2.tcap',
+ 'tcl' => 'application/x-tcl',
+ 'td' => 'application/urc-targetdesc+xml',
+ 'teacher' => 'application/vnd.smart.teacher',
+ 'tei' => 'application/tei+xml',
+ 'teicorpus' => 'application/tei+xml',
+ 'tex' => 'application/x-tex',
+ 'texi' => 'application/x-texinfo',
+ 'texinfo' => 'application/x-texinfo',
+ 'text' => 'text/plain',
+ 'tfi' => 'application/thraud+xml',
+ 'tfm' => 'application/x-tex-tfm',
+ 'tfx' => 'image/tiff-fx',
+ 'tga' => 'image/x-tga',
+ 'tgz' => 'application/x-tar',
+ 'thmx' => 'application/vnd.ms-officetheme',
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'tk' => 'application/x-tcl',
+ 'tmo' => 'application/vnd.tmobile-livetv',
+ 'toml' => 'application/toml',
+ 'torrent' => 'application/x-bittorrent',
+ 'tpl' => 'application/vnd.groove-tool-template',
+ 'tpt' => 'application/vnd.trid.tpt',
+ 'tr' => 'text/troff',
+ 'tra' => 'application/vnd.trueapp',
+ 'trig' => 'application/trig',
+ 'trm' => 'application/x-msterminal',
+ 'ts' => 'video/mp2t',
+ 'tsd' => 'application/timestamped-data',
+ 'tsv' => 'text/tab-separated-values',
+ 'ttc' => 'font/collection',
+ 'ttf' => 'font/ttf',
+ 'ttl' => 'text/turtle',
+ 'ttml' => 'application/ttml+xml',
+ 'twd' => 'application/vnd.simtech-mindmapper',
+ 'twds' => 'application/vnd.simtech-mindmapper',
+ 'txd' => 'application/vnd.genomatix.tuxedo',
+ 'txf' => 'application/vnd.mobius.txf',
+ 'txt' => 'text/plain',
+ 'u3d' => 'model/u3d',
+ 'u8dsn' => 'message/global-delivery-status',
+ 'u8hdr' => 'message/global-headers',
+ 'u8mdn' => 'message/global-disposition-notification',
+ 'u8msg' => 'message/global',
+ 'u32' => 'application/x-authorware-bin',
+ 'ubj' => 'application/ubjson',
+ 'udeb' => 'application/x-debian-package',
+ 'ufd' => 'application/vnd.ufdl',
+ 'ufdl' => 'application/vnd.ufdl',
+ 'ulx' => 'application/x-glulx',
+ 'umj' => 'application/vnd.umajin',
+ 'unityweb' => 'application/vnd.unity',
+ 'uo' => 'application/vnd.uoml+xml',
+ 'uoml' => 'application/vnd.uoml+xml',
+ 'uri' => 'text/uri-list',
+ 'uris' => 'text/uri-list',
+ 'urls' => 'text/uri-list',
+ 'usda' => 'model/vnd.usda',
+ 'usdz' => 'model/vnd.usdz+zip',
+ 'ustar' => 'application/x-ustar',
+ 'utz' => 'application/vnd.uiq.theme',
+ 'uu' => 'text/x-uuencode',
+ 'uva' => 'audio/vnd.dece.audio',
+ 'uvd' => 'application/vnd.dece.data',
+ 'uvf' => 'application/vnd.dece.data',
+ 'uvg' => 'image/vnd.dece.graphic',
+ 'uvh' => 'video/vnd.dece.hd',
+ 'uvi' => 'image/vnd.dece.graphic',
+ 'uvm' => 'video/vnd.dece.mobile',
+ 'uvp' => 'video/vnd.dece.pd',
+ 'uvs' => 'video/vnd.dece.sd',
+ 'uvt' => 'application/vnd.dece.ttml+xml',
+ 'uvu' => 'video/vnd.uvvu.mp4',
+ 'uvv' => 'video/vnd.dece.video',
+ 'uvva' => 'audio/vnd.dece.audio',
+ 'uvvd' => 'application/vnd.dece.data',
+ 'uvvf' => 'application/vnd.dece.data',
+ 'uvvg' => 'image/vnd.dece.graphic',
+ 'uvvh' => 'video/vnd.dece.hd',
+ 'uvvi' => 'image/vnd.dece.graphic',
+ 'uvvm' => 'video/vnd.dece.mobile',
+ 'uvvp' => 'video/vnd.dece.pd',
+ 'uvvs' => 'video/vnd.dece.sd',
+ 'uvvt' => 'application/vnd.dece.ttml+xml',
+ 'uvvu' => 'video/vnd.uvvu.mp4',
+ 'uvvv' => 'video/vnd.dece.video',
+ 'uvvx' => 'application/vnd.dece.unspecified',
+ 'uvvz' => 'application/vnd.dece.zip',
+ 'uvx' => 'application/vnd.dece.unspecified',
+ 'uvz' => 'application/vnd.dece.zip',
+ 'vbox' => 'application/x-virtualbox-vbox',
+ 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack',
+ 'vcard' => 'text/vcard',
+ 'vcd' => 'application/x-cdlink',
+ 'vcf' => 'text/x-vcard',
+ 'vcg' => 'application/vnd.groove-vcard',
+ 'vcs' => 'text/x-vcalendar',
+ 'vcx' => 'application/vnd.vcx',
+ 'vdi' => 'application/x-virtualbox-vdi',
+ 'vds' => 'model/vnd.sap.vds',
+ 'vhd' => 'application/x-virtualbox-vhd',
+ 'vis' => 'application/vnd.visionary',
+ 'viv' => 'video/vnd.vivo',
+ 'vlc' => 'application/videolan',
+ 'vmdk' => 'application/x-virtualbox-vmdk',
+ 'vob' => 'video/x-ms-vob',
+ 'vor' => 'application/vnd.stardivision.writer',
+ 'vox' => 'application/x-authorware-bin',
+ 'vrml' => 'model/vrml',
+ 'vsd' => 'application/vnd.visio',
+ 'vsf' => 'application/vnd.vsf',
+ 'vss' => 'application/vnd.visio',
+ 'vst' => 'application/vnd.visio',
+ 'vsw' => 'application/vnd.visio',
+ 'vtf' => 'image/vnd.valve.source.texture',
+ 'vtt' => 'text/vtt',
+ 'vtu' => 'model/vnd.vtu',
+ 'vxml' => 'application/voicexml+xml',
+ 'w3d' => 'application/x-director',
+ 'wad' => 'application/x-doom',
+ 'wadl' => 'application/vnd.sun.wadl+xml',
+ 'war' => 'application/java-archive',
+ 'wasm' => 'application/wasm',
+ 'wav' => 'audio/x-wav',
+ 'wax' => 'audio/x-ms-wax',
+ 'wbmp' => 'image/vnd.wap.wbmp',
+ 'wbs' => 'application/vnd.criticaltools.wbs+xml',
+ 'wbxml' => 'application/wbxml',
+ 'wcm' => 'application/vnd.ms-works',
+ 'wdb' => 'application/vnd.ms-works',
+ 'wdp' => 'image/vnd.ms-photo',
+ 'weba' => 'audio/webm',
+ 'webapp' => 'application/x-web-app-manifest+json',
+ 'webm' => 'video/webm',
+ 'webmanifest' => 'application/manifest+json',
+ 'webp' => 'image/webp',
+ 'wg' => 'application/vnd.pmi.widget',
+ 'wgsl' => 'text/wgsl',
+ 'wgt' => 'application/widget',
+ 'wif' => 'application/watcherinfo+xml',
+ 'wks' => 'application/vnd.ms-works',
+ 'wm' => 'video/x-ms-wm',
+ 'wma' => 'audio/x-ms-wma',
+ 'wmd' => 'application/x-ms-wmd',
+ 'wmf' => 'image/wmf',
+ 'wml' => 'text/vnd.wap.wml',
+ 'wmlc' => 'application/wmlc',
+ 'wmls' => 'text/vnd.wap.wmlscript',
+ 'wmlsc' => 'application/vnd.wap.wmlscriptc',
+ 'wmv' => 'video/x-ms-wmv',
+ 'wmx' => 'video/x-ms-wmx',
+ 'wmz' => 'application/x-msmetafile',
+ 'woff' => 'font/woff',
+ 'woff2' => 'font/woff2',
+ 'word' => 'application/msword',
+ 'wpd' => 'application/vnd.wordperfect',
+ 'wpl' => 'application/vnd.ms-wpl',
+ 'wps' => 'application/vnd.ms-works',
+ 'wqd' => 'application/vnd.wqd',
+ 'wri' => 'application/x-mswrite',
+ 'wrl' => 'model/vrml',
+ 'wsc' => 'message/vnd.wfa.wsc',
+ 'wsdl' => 'application/wsdl+xml',
+ 'wspolicy' => 'application/wspolicy+xml',
+ 'wtb' => 'application/vnd.webturbo',
+ 'wvx' => 'video/x-ms-wvx',
+ 'x3d' => 'model/x3d+xml',
+ 'x3db' => 'model/x3d+fastinfoset',
+ 'x3dbz' => 'model/x3d+binary',
+ 'x3dv' => 'model/x3d-vrml',
+ 'x3dvz' => 'model/x3d+vrml',
+ 'x3dz' => 'model/x3d+xml',
+ 'x32' => 'application/x-authorware-bin',
+ 'x_b' => 'model/vnd.parasolid.transmit.binary',
+ 'x_t' => 'model/vnd.parasolid.transmit.text',
+ 'xaml' => 'application/xaml+xml',
+ 'xap' => 'application/x-silverlight-app',
+ 'xar' => 'application/vnd.xara',
+ 'xav' => 'application/xcap-att+xml',
+ 'xbap' => 'application/x-ms-xbap',
+ 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
+ 'xbm' => 'image/x-xbitmap',
+ 'xca' => 'application/xcap-caps+xml',
+ 'xcs' => 'application/calendar+xml',
+ 'xdf' => 'application/xcap-diff+xml',
+ 'xdm' => 'application/vnd.syncml.dm+xml',
+ 'xdp' => 'application/vnd.adobe.xdp+xml',
+ 'xdssc' => 'application/dssc+xml',
+ 'xdw' => 'application/vnd.fujixerox.docuworks',
+ 'xel' => 'application/xcap-el+xml',
+ 'xenc' => 'application/xenc+xml',
+ 'xer' => 'application/patch-ops-error+xml',
+ 'xfdf' => 'application/xfdf',
+ 'xfdl' => 'application/vnd.xfdl',
+ 'xht' => 'application/xhtml+xml',
+ 'xhtm' => 'application/vnd.pwg-xhtml-print+xml',
+ 'xhtml' => 'application/xhtml+xml',
+ 'xhvml' => 'application/xv+xml',
+ 'xif' => 'image/vnd.xiff',
+ 'xl' => 'application/excel',
+ 'xla' => 'application/vnd.ms-excel',
+ 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
+ 'xlc' => 'application/vnd.ms-excel',
+ 'xlf' => 'application/xliff+xml',
+ 'xlm' => 'application/vnd.ms-excel',
+ 'xls' => 'application/vnd.ms-excel',
+ 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
+ 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xlt' => 'application/vnd.ms-excel',
+ 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
+ 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
+ 'xlw' => 'application/vnd.ms-excel',
+ 'xm' => 'audio/xm',
+ 'xml' => 'application/xml',
+ 'xns' => 'application/xcap-ns+xml',
+ 'xo' => 'application/vnd.olpc-sugar',
+ 'xop' => 'application/xop+xml',
+ 'xpi' => 'application/x-xpinstall',
+ 'xpl' => 'application/xproc+xml',
+ 'xpm' => 'image/x-xpixmap',
+ 'xpr' => 'application/vnd.is-xpr',
+ 'xps' => 'application/vnd.ms-xpsdocument',
+ 'xpw' => 'application/vnd.intercon.formnet',
+ 'xpx' => 'application/vnd.intercon.formnet',
+ 'xsd' => 'application/xml',
+ 'xsf' => 'application/prs.xsf+xml',
+ 'xsl' => 'application/xml',
+ 'xslt' => 'application/xslt+xml',
+ 'xsm' => 'application/vnd.syncml+xml',
+ 'xspf' => 'application/xspf+xml',
+ 'xul' => 'application/vnd.mozilla.xul+xml',
+ 'xvm' => 'application/xv+xml',
+ 'xvml' => 'application/xv+xml',
+ 'xwd' => 'image/x-xwindowdump',
+ 'xyz' => 'chemical/x-xyz',
+ 'xz' => 'application/x-xz',
+ 'yaml' => 'text/yaml',
+ 'yang' => 'application/yang',
+ 'yin' => 'application/yin+xml',
+ 'yml' => 'text/yaml',
+ 'ymp' => 'text/x-suse-ymp',
+ 'z' => 'application/x-compress',
+ 'z1' => 'application/x-zmachine',
+ 'z2' => 'application/x-zmachine',
+ 'z3' => 'application/x-zmachine',
+ 'z4' => 'application/x-zmachine',
+ 'z5' => 'application/x-zmachine',
+ 'z6' => 'application/x-zmachine',
+ 'z7' => 'application/x-zmachine',
+ 'z8' => 'application/x-zmachine',
+ 'zaz' => 'application/vnd.zzazz.deck+xml',
+ 'zip' => 'application/zip',
+ 'zir' => 'application/vnd.zul',
+ 'zirz' => 'application/vnd.zul',
+ 'zmm' => 'application/vnd.handheld-entertainment+xml',
+ 'zsh' => 'text/x-scriptzsh',
+ ];
+
+ /**
+ * Determines the mimetype of a file by looking at its extension.
+ *
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ */
+ public static function fromFilename(string $filename): ?string
+ {
+ return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
+ }
+
+ /**
+ * Maps a file extensions to a mimetype.
+ *
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ */
+ public static function fromExtension(string $extension): ?string
+ {
+ return self::MIME_TYPES[strtolower($extension)] ?? null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php
new file mode 100644
index 000000000..41c48eef8
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream that when read returns bytes for a streaming multipart or
+ * multipart/form-data stream.
+ */
+final class MultipartStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var string */
+ private $boundary;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ /**
+ * @param array $elements Array of associative arrays, each containing a
+ * required "name" key mapping to the form field,
+ * name, a required "contents" key mapping to a
+ * StreamInterface/resource/string, an optional
+ * "headers" associative array of custom headers,
+ * and an optional "filename" key mapping to a
+ * string to send as the filename in the part.
+ * @param string $boundary You can optionally provide a specific boundary
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct(array $elements = [], string $boundary = null)
+ {
+ $this->boundary = $boundary ?: bin2hex(random_bytes(20));
+ $this->stream = $this->createStream($elements);
+ }
+
+ public function getBoundary(): string
+ {
+ return $this->boundary;
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ /**
+ * Get the headers needed before transferring the content of a POST file
+ *
+ * @param array<string, string> $headers
+ */
+ private function getHeaders(array $headers): string
+ {
+ $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 = []): StreamInterface
+ {
+ $stream = new AppendStream();
+
+ foreach ($elements as $element) {
+ if (!is_array($element)) {
+ throw new \UnexpectedValueException('An array is expected');
+ }
+ $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): void
+ {
+ 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 ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') {
+ $element['filename'] = $uri;
+ }
+ }
+
+ [$body, $headers] = $this->createElement(
+ $element['name'],
+ $element['contents'],
+ $element['filename'] ?? null,
+ $element['headers'] ?? []
+ );
+
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
+ $stream->addStream($body);
+ $stream->addStream(Utils::streamFor("\r\n"));
+ }
+
+ private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array
+ {
+ // 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)) {
+ $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
+ }
+
+ return [$stream, $headers];
+ }
+
+ private function getHeader(array $headers, string $key)
+ {
+ $lowercaseHeader = strtolower($key);
+ foreach ($headers as $k => $v) {
+ if (strtolower($k) === $lowercaseHeader) {
+ return $v;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
new file mode 100644
index 000000000..161a224f0
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that prevents a stream from being seeked.
+ */
+final class NoSeekStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ throw new \RuntimeException('Cannot seek a NoSeekStream');
+ }
+
+ public function isSeekable(): bool
+ {
+ return false;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php
new file mode 100644
index 000000000..5585190cf
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/PumpStream.php
@@ -0,0 +1,179 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * 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.
+ */
+final class PumpStream implements StreamInterface
+{
+ /** @var callable|null */
+ private $source;
+
+ /** @var int|null */
+ private $size;
+
+ /** @var int */
+ private $tellPos = 0;
+
+ /** @var array */
+ private $metadata;
+
+ /** @var BufferStream */
+ private $buffer;
+
+ /**
+ * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY
+ * accept an integer argument used to control the
+ * amount of data to return. The callable MUST
+ * return a string when called, or false|null on error
+ * or EOF.
+ * @param array{size?: int, metadata?: array} $options Stream options:
+ * - metadata: Hash of metadata to use with stream.
+ * - size: Size of the stream, if known.
+ */
+ public function __construct(callable $source, array $options = [])
+ {
+ $this->source = $source;
+ $this->size = $options['size'] ?? null;
+ $this->metadata = $options['metadata'] ?? [];
+ $this->buffer = new BufferStream();
+ }
+
+ public function __toString(): string
+ {
+ try {
+ return Utils::copyToString($this);
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function close(): void
+ {
+ $this->detach();
+ }
+
+ public function detach()
+ {
+ $this->tellPos = 0;
+ $this->source = null;
+
+ return null;
+ }
+
+ public function getSize(): ?int
+ {
+ return $this->size;
+ }
+
+ public function tell(): int
+ {
+ return $this->tellPos;
+ }
+
+ public function eof(): bool
+ {
+ return $this->source === null;
+ }
+
+ public function isSeekable(): bool
+ {
+ return false;
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ throw new \RuntimeException('Cannot seek a PumpStream');
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ public function write($string): int
+ {
+ throw new \RuntimeException('Cannot write to a PumpStream');
+ }
+
+ public function isReadable(): bool
+ {
+ return true;
+ }
+
+ public function read($length): string
+ {
+ $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(): string
+ {
+ $result = '';
+ while (!$this->eof()) {
+ $result .= $this->read(1000000);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ if (!$key) {
+ return $this->metadata;
+ }
+
+ return $this->metadata[$key] ?? null;
+ }
+
+ private function pump(int $length): void
+ {
+ 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/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php
new file mode 100644
index 000000000..8b9492797
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Query.php
@@ -0,0 +1,113 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+final class Query
+{
+ /**
+ * 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'])`.
+ *
+ * @param string $str Query string to parse
+ * @param int|bool $urlEncoding How the query string is encoded
+ */
+ public static function parse(string $str, $urlEncoding = true): array
+ {
+ $result = [];
+
+ if ($str === '') {
+ return $result;
+ }
+
+ if ($urlEncoding === true) {
+ $decoder = function ($value) {
+ return rawurldecode(str_replace('+', ' ', (string) $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 (!array_key_exists($key, $result)) {
+ $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.
+ */
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string
+ {
+ if (!$params) {
+ return '';
+ }
+
+ if ($encoding === false) {
+ $encoder = function (string $str): string {
+ 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((string) $k);
+ if (!is_array($v)) {
+ $qs .= $k;
+ $v = is_bool($v) ? (int) $v : $v;
+ if ($v !== null) {
+ $qs .= '='.$encoder((string) $v);
+ }
+ $qs .= '&';
+ } else {
+ foreach ($v as $vv) {
+ $qs .= $k;
+ $vv = is_bool($vv) ? (int) $vv : $vv;
+ if ($vv !== null) {
+ $qs .= '='.$encoder((string) $vv);
+ }
+ $qs .= '&';
+ }
+ }
+ }
+
+ return $qs ? (string) substr($qs, 0, -1) : '';
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php
new file mode 100644
index 000000000..db29d95d3
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Request.php
@@ -0,0 +1,159 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use InvalidArgumentException;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * PSR-7 request implementation.
+ */
+class Request implements RequestInterface
+{
+ use MessageTrait;
+
+ /** @var string */
+ private $method;
+
+ /** @var string|null */
+ private $requestTarget;
+
+ /** @var UriInterface */
+ private $uri;
+
+ /**
+ * @param string $method HTTP method
+ * @param string|UriInterface $uri URI
+ * @param array<string, string|string[]> $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'
+ ) {
+ $this->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(): string
+ {
+ 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): RequestInterface
+ {
+ 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;
+ }
+
+ public function withMethod($method): RequestInterface
+ {
+ $this->assertMethod($method);
+ $new = clone $this;
+ $new->method = strtoupper($method);
+
+ return $new;
+ }
+
+ public function getUri(): UriInterface
+ {
+ return $this->uri;
+ }
+
+ public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface
+ {
+ 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(): void
+ {
+ $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;
+ }
+
+ /**
+ * @param mixed $method
+ */
+ private function assertMethod($method): void
+ {
+ if (!is_string($method) || $method === '') {
+ throw new InvalidArgumentException('Method must be a non-empty string.');
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php
new file mode 100644
index 000000000..8fc11478b
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Response.php
@@ -0,0 +1,161 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * PSR-7 response implementation.
+ */
+class Response implements ResponseInterface
+{
+ use MessageTrait;
+
+ /** 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',
+ 308 => 'Permanent 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',
+ 510 => 'Not Extended',
+ 511 => 'Network Authentication Required',
+ ];
+
+ /** @var string */
+ private $reasonPhrase;
+
+ /** @var int */
+ private $statusCode;
+
+ /**
+ * @param int $status Status code
+ * @param array<string, string|string[]> $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
+ ) {
+ $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(): int
+ {
+ return $this->statusCode;
+ }
+
+ public function getReasonPhrase(): string
+ {
+ return $this->reasonPhrase;
+ }
+
+ public function withStatus($code, $reasonPhrase = ''): ResponseInterface
+ {
+ $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;
+ }
+
+ /**
+ * @param mixed $statusCode
+ */
+ private function assertStatusCodeIsInteger($statusCode): void
+ {
+ if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
+ throw new \InvalidArgumentException('Status code must be an integer value.');
+ }
+ }
+
+ private function assertStatusCodeRange(int $statusCode): void
+ {
+ if ($statusCode < 100 || $statusCode >= 600) {
+ throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php
new file mode 100644
index 000000000..8219dba4d
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+/**
+ * @internal
+ */
+final class Rfc7230
+{
+ /**
+ * Header related regular expressions (based on amphp/http package)
+ *
+ * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
+ *
+ * @see https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
+ *
+ * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
+ */
+ public const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
+ public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
+}
diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php
new file mode 100644
index 000000000..c852d96f5
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -0,0 +1,340 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use InvalidArgumentException;
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UploadedFileInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Server-side HTTP request
+ *
+ * Extends the Request definition to add methods for accessing incoming data,
+ * specifically server parameters, cookies, matched path parameters, query
+ * string arguments, body parameters, and upload file information.
+ *
+ * "Attributes" are discovered via decomposing the request (and usually
+ * specifically the URI path), and typically will be injected by the application.
+ *
+ * Requests are considered immutable; all methods that might change state are
+ * implemented such that they retain the internal state of the current
+ * message and return a new instance that contains the changed state.
+ */
+class ServerRequest extends Request implements ServerRequestInterface
+{
+ /**
+ * @var array
+ */
+ private $attributes = [];
+
+ /**
+ * @var array
+ */
+ private $cookieParams = [];
+
+ /**
+ * @var array|object|null
+ */
+ private $parsedBody;
+
+ /**
+ * @var array
+ */
+ private $queryParams = [];
+
+ /**
+ * @var array
+ */
+ private $serverParams;
+
+ /**
+ * @var array
+ */
+ private $uploadedFiles = [];
+
+ /**
+ * @param string $method HTTP method
+ * @param string|UriInterface $uri URI
+ * @param array<string, string|string[]> $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;
+
+ parent::__construct($method, $uri, $headers, $body, $version);
+ }
+
+ /**
+ * Return an UploadedFile instance array.
+ *
+ * @param array $files An array which respect $_FILES structure
+ *
+ * @throws InvalidArgumentException for unrecognized values
+ */
+ public static function normalizeFiles(array $files): array
+ {
+ $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 UploadedFileInterface|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.
+ *
+ * @return UploadedFileInterface[]
+ */
+ private static function normalizeNestedFileSpec(array $files = []): array
+ {
+ $normalizedFiles = [];
+
+ foreach (array_keys($files['tmp_name']) as $key) {
+ $spec = [
+ 'tmp_name' => $files['tmp_name'][$key],
+ 'size' => $files['size'][$key] ?? null,
+ 'error' => $files['error'][$key] ?? null,
+ 'name' => $files['name'][$key] ?? null,
+ 'type' => $files['type'][$key] ?? null,
+ ];
+ $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
+ }
+
+ return $normalizedFiles;
+ }
+
+ /**
+ * Return a ServerRequest populated with superglobals:
+ * $_GET
+ * $_POST
+ * $_COOKIE
+ * $_FILES
+ * $_SERVER
+ */
+ public static function fromGlobals(): ServerRequestInterface
+ {
+ $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(string $authority): array
+ {
+ $uri = 'http://'.$authority;
+ $parts = parse_url($uri);
+ if (false === $parts) {
+ return [null, null];
+ }
+
+ $host = $parts['host'] ?? null;
+ $port = $parts['port'] ?? null;
+
+ return [$host, $port];
+ }
+
+ /**
+ * Get a Uri populated with values from $_SERVER.
+ */
+ public static function getUriFromGlobals(): UriInterface
+ {
+ $uri = new Uri('');
+
+ $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
+
+ $hasPort = false;
+ if (isset($_SERVER['HTTP_HOST'])) {
+ [$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;
+ }
+
+ public function getServerParams(): array
+ {
+ return $this->serverParams;
+ }
+
+ public function getUploadedFiles(): array
+ {
+ return $this->uploadedFiles;
+ }
+
+ public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->uploadedFiles = $uploadedFiles;
+
+ return $new;
+ }
+
+ public function getCookieParams(): array
+ {
+ return $this->cookieParams;
+ }
+
+ public function withCookieParams(array $cookies): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->cookieParams = $cookies;
+
+ return $new;
+ }
+
+ public function getQueryParams(): array
+ {
+ return $this->queryParams;
+ }
+
+ public function withQueryParams(array $query): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->queryParams = $query;
+
+ return $new;
+ }
+
+ /**
+ * @return array|object|null
+ */
+ public function getParsedBody()
+ {
+ return $this->parsedBody;
+ }
+
+ public function withParsedBody($data): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->parsedBody = $data;
+
+ return $new;
+ }
+
+ public function getAttributes(): array
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getAttribute($attribute, $default = null)
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $default;
+ }
+
+ return $this->attributes[$attribute];
+ }
+
+ public function withAttribute($attribute, $value): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->attributes[$attribute] = $value;
+
+ return $new;
+ }
+
+ public function withoutAttribute($attribute): ServerRequestInterface
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $this;
+ }
+
+ $new = clone $this;
+ unset($new->attributes[$attribute]);
+
+ return $new;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php
new file mode 100644
index 000000000..f730ddacf
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Stream.php
@@ -0,0 +1,283 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * PHP stream implementation.
+ */
+class Stream implements StreamInterface
+{
+ /**
+ * @see http://php.net/manual/function.fopen.php
+ * @see http://php.net/manual/en/function.gzopen.php
+ */
+ private const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
+ private const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
+
+ /** @var resource */
+ private $stream;
+ /** @var int|null */
+ private $size;
+ /** @var bool */
+ private $seekable;
+ /** @var bool */
+ private $readable;
+ /** @var bool */
+ private $writable;
+ /** @var string|null */
+ private $uri;
+ /** @var mixed[] */
+ private $customMetadata;
+
+ /**
+ * This constructor accepts an associative array of options.
+ *
+ * - size: (int) If a read stream would otherwise have an indeterminate
+ * size, but the size is known due to foreknowledge, then you can
+ * provide that size, in bytes.
+ * - metadata: (array) Any additional metadata to return when the metadata
+ * of the stream is accessed.
+ *
+ * @param resource $stream Stream resource to wrap.
+ * @param array{size?: int, metadata?: array} $options Associative array of options.
+ *
+ * @throws \InvalidArgumentException if the stream is not a stream resource
+ */
+ public function __construct($stream, array $options = [])
+ {
+ if (!is_resource($stream)) {
+ throw new \InvalidArgumentException('Stream must be a resource');
+ }
+
+ if (isset($options['size'])) {
+ $this->size = $options['size'];
+ }
+
+ $this->customMetadata = $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(): string
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+
+ return $this->getContents();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function getContents(): string
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ if (!$this->readable) {
+ throw new \RuntimeException('Cannot read from non-readable stream');
+ }
+
+ return Utils::tryGetContents($this->stream);
+ }
+
+ 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;
+ }
+
+ public function getSize(): ?int
+ {
+ 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 (is_array($stats) && isset($stats['size'])) {
+ $this->size = $stats['size'];
+
+ return $this->size;
+ }
+
+ return null;
+ }
+
+ public function isReadable(): bool
+ {
+ return $this->readable;
+ }
+
+ public function isWritable(): bool
+ {
+ return $this->writable;
+ }
+
+ public function isSeekable(): bool
+ {
+ return $this->seekable;
+ }
+
+ public function eof(): bool
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ return feof($this->stream);
+ }
+
+ public function tell(): int
+ {
+ 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(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ $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): string
+ {
+ 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 '';
+ }
+
+ try {
+ $string = fread($this->stream, $length);
+ } catch (\Exception $e) {
+ throw new \RuntimeException('Unable to read from stream', 0, $e);
+ }
+
+ if (false === $string) {
+ throw new \RuntimeException('Unable to read from stream');
+ }
+
+ return $string;
+ }
+
+ 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;
+ $result = fwrite($this->stream, $string);
+
+ if ($result === false) {
+ throw new \RuntimeException('Unable to write to stream');
+ }
+
+ return $result;
+ }
+
+ /**
+ * @return mixed
+ */
+ 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 $meta[$key] ?? null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
new file mode 100644
index 000000000..96196a3ea
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -0,0 +1,156 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator trait
+ *
+ * @property StreamInterface $stream
+ */
+trait StreamDecoratorTrait
+{
+ /**
+ * @param StreamInterface $stream Stream to decorate
+ */
+ public function __construct(StreamInterface $stream)
+ {
+ $this->stream = $stream;
+ }
+
+ /**
+ * Magic method used to create a new stream if streams are not added in
+ * the constructor of a decorator (e.g., LazyOpenStream).
+ *
+ * @return StreamInterface
+ */
+ public function __get(string $name)
+ {
+ if ($name === 'stream') {
+ $this->stream = $this->createStream();
+
+ return $this->stream;
+ }
+
+ throw new \UnexpectedValueException("$name not found on class");
+ }
+
+ public function __toString(): string
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+
+ return $this->getContents();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function getContents(): string
+ {
+ return Utils::copyToString($this);
+ }
+
+ /**
+ * Allow decorators to implement custom methods
+ *
+ * @return mixed
+ */
+ public function __call(string $method, array $args)
+ {
+ /** @var callable $callable */
+ $callable = [$this->stream, $method];
+ $result = call_user_func_array($callable, $args);
+
+ // Always return the wrapped object if the result is a return $this
+ return $result === $this->stream ? $this : $result;
+ }
+
+ public function close(): void
+ {
+ $this->stream->close();
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ return $this->stream->getMetadata($key);
+ }
+
+ public function detach()
+ {
+ return $this->stream->detach();
+ }
+
+ public function getSize(): ?int
+ {
+ return $this->stream->getSize();
+ }
+
+ public function eof(): bool
+ {
+ return $this->stream->eof();
+ }
+
+ public function tell(): int
+ {
+ return $this->stream->tell();
+ }
+
+ public function isReadable(): bool
+ {
+ return $this->stream->isReadable();
+ }
+
+ public function isWritable(): bool
+ {
+ return $this->stream->isWritable();
+ }
+
+ public function isSeekable(): bool
+ {
+ return $this->stream->isSeekable();
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ $this->stream->seek($offset, $whence);
+ }
+
+ public function read($length): string
+ {
+ return $this->stream->read($length);
+ }
+
+ public function write($string): int
+ {
+ return $this->stream->write($string);
+ }
+
+ /**
+ * Implement in subclasses to dynamically create streams when requested.
+ *
+ * @throws \BadMethodCallException
+ */
+ protected function createStream(): StreamInterface
+ {
+ throw new \BadMethodCallException('Not implemented');
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
new file mode 100644
index 000000000..b3655cb3a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -0,0 +1,175 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Converts Guzzle streams into PHP stream resources.
+ *
+ * @see https://www.php.net/streamwrapper
+ */
+final class StreamWrapper
+{
+ /** @var resource */
+ public $context;
+
+ /** @var StreamInterface */
+ private $stream;
+
+ /** @var string r, r+, or w */
+ private $mode;
+
+ /**
+ * Returns a resource representing the stream.
+ *
+ * @param StreamInterface $stream The stream to get a resource for
+ *
+ * @return resource
+ *
+ * @throws \InvalidArgumentException if stream is not readable or writable
+ */
+ public static function getResource(StreamInterface $stream)
+ {
+ self::register();
+
+ if ($stream->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, false, self::createStreamContext($stream));
+ }
+
+ /**
+ * Creates a stream context that can be used to open a stream as a php stream resource.
+ *
+ * @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(): void
+ {
+ if (!in_array('guzzle', stream_get_wrappers())) {
+ stream_wrapper_register('guzzle', __CLASS__);
+ }
+ }
+
+ public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool
+ {
+ $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(int $count): string
+ {
+ return $this->stream->read($count);
+ }
+
+ public function stream_write(string $data): int
+ {
+ return $this->stream->write($data);
+ }
+
+ public function stream_tell(): int
+ {
+ return $this->stream->tell();
+ }
+
+ public function stream_eof(): bool
+ {
+ return $this->stream->eof();
+ }
+
+ public function stream_seek(int $offset, int $whence): bool
+ {
+ $this->stream->seek($offset, $whence);
+
+ return true;
+ }
+
+ /**
+ * @return resource|false
+ */
+ public function stream_cast(int $cast_as)
+ {
+ $stream = clone $this->stream;
+ $resource = $stream->detach();
+
+ return $resource ?? false;
+ }
+
+ /**
+ * @return array<int|string, int>
+ */
+ public function stream_stat(): array
+ {
+ 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,
+ ];
+ }
+
+ /**
+ * @return array<int|string, int>
+ */
+ public function url_stat(string $path, int $flags): array
+ {
+ 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/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php
new file mode 100644
index 000000000..b1521bcf8
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php
@@ -0,0 +1,211 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use InvalidArgumentException;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UploadedFileInterface;
+use RuntimeException;
+
+class UploadedFile implements UploadedFileInterface
+{
+ private const ERRORS = [
+ UPLOAD_ERR_OK,
+ UPLOAD_ERR_INI_SIZE,
+ UPLOAD_ERR_FORM_SIZE,
+ UPLOAD_ERR_PARTIAL,
+ UPLOAD_ERR_NO_FILE,
+ UPLOAD_ERR_NO_TMP_DIR,
+ UPLOAD_ERR_CANT_WRITE,
+ UPLOAD_ERR_EXTENSION,
+ ];
+
+ /**
+ * @var string|null
+ */
+ private $clientFilename;
+
+ /**
+ * @var string|null
+ */
+ private $clientMediaType;
+
+ /**
+ * @var int
+ */
+ private $error;
+
+ /**
+ * @var string|null
+ */
+ private $file;
+
+ /**
+ * @var bool
+ */
+ private $moved = false;
+
+ /**
+ * @var int|null
+ */
+ private $size;
+
+ /**
+ * @var StreamInterface|null
+ */
+ private $stream;
+
+ /**
+ * @param StreamInterface|string|resource $streamOrFile
+ */
+ public function __construct(
+ $streamOrFile,
+ ?int $size,
+ int $errorStatus,
+ string $clientFilename = null,
+ string $clientMediaType = null
+ ) {
+ $this->setError($errorStatus);
+ $this->size = $size;
+ $this->clientFilename = $clientFilename;
+ $this->clientMediaType = $clientMediaType;
+
+ if ($this->isOk()) {
+ $this->setStreamOrFile($streamOrFile);
+ }
+ }
+
+ /**
+ * Depending on the value set file or stream variable
+ *
+ * @param StreamInterface|string|resource $streamOrFile
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setStreamOrFile($streamOrFile): void
+ {
+ 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'
+ );
+ }
+ }
+
+ /**
+ * @throws InvalidArgumentException
+ */
+ private function setError(int $error): void
+ {
+ if (false === in_array($error, UploadedFile::ERRORS, true)) {
+ throw new InvalidArgumentException(
+ 'Invalid error status for UploadedFile'
+ );
+ }
+
+ $this->error = $error;
+ }
+
+ private function isStringNotEmpty($param): bool
+ {
+ return is_string($param) && false === empty($param);
+ }
+
+ /**
+ * Return true if there is no upload error
+ */
+ private function isOk(): bool
+ {
+ return $this->error === UPLOAD_ERR_OK;
+ }
+
+ public function isMoved(): bool
+ {
+ return $this->moved;
+ }
+
+ /**
+ * @throws RuntimeException if is moved or not ok
+ */
+ private function validateActive(): void
+ {
+ 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');
+ }
+ }
+
+ public function getStream(): StreamInterface
+ {
+ $this->validateActive();
+
+ if ($this->stream instanceof StreamInterface) {
+ return $this->stream;
+ }
+
+ /** @var string $file */
+ $file = $this->file;
+
+ return new LazyOpenStream($file, 'r+');
+ }
+
+ public function moveTo($targetPath): void
+ {
+ $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 === '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)
+ );
+ }
+ }
+
+ 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/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php
new file mode 100644
index 000000000..fbba7f123
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Uri.php
@@ -0,0 +1,741 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use GuzzleHttp\Psr7\Exception\MalformedUriException;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * PSR-7 URI implementation.
+ *
+ * @author Michael Dowling
+ * @author Tobias Schultze
+ * @author Matthew Weier O'Phinney
+ */
+class Uri implements UriInterface, \JsonSerializable
+{
+ /**
+ * Absolute http and https URIs require a host per RFC 7230 Section 2.7
+ * but in generic URIs the host can be empty. So for http(s) URIs
+ * we apply this default host when no host is given yet to form a
+ * valid URI.
+ */
+ private const HTTP_DEFAULT_HOST = 'localhost';
+
+ private const DEFAULT_PORTS = [
+ 'http' => 80,
+ 'https' => 443,
+ 'ftp' => 21,
+ 'gopher' => 70,
+ 'nntp' => 119,
+ 'news' => 119,
+ 'telnet' => 23,
+ 'tn3270' => 23,
+ 'imap' => 143,
+ 'pop' => 110,
+ 'ldap' => 389,
+ ];
+
+ /**
+ * Unreserved characters for use in a regex.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2.3
+ */
+ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
+
+ /**
+ * Sub-delims for use in a regex.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2.2
+ */
+ private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
+ private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%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 = '';
+
+ /** @var string|null String representation */
+ private $composedComponents;
+
+ public function __construct(string $uri = '')
+ {
+ if ($uri !== '') {
+ $parts = self::parse($uri);
+ if ($parts === false) {
+ throw new MalformedUriException("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
+ *
+ * @return array|false
+ */
+ private static function parse(string $url)
+ {
+ // If IPv6
+ $prefix = '';
+ if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
+ /** @var array{0:string, 1:string, 2:string} $matches */
+ $prefix = $matches[1];
+ $url = $matches[2];
+ }
+
+ /** @var string */
+ $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(): string
+ {
+ if ($this->composedComponents === null) {
+ $this->composedComponents = self::composeComponents(
+ $this->scheme,
+ $this->getAuthority(),
+ $this->path,
+ $this->query,
+ $this->fragment
+ );
+ }
+
+ return $this->composedComponents;
+ }
+
+ /**
+ * 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).
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-5.3
+ */
+ public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
+ {
+ $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;
+ }
+
+ if ($authority != '' && $path != '' && $path[0] != '/') {
+ $path = '/'.$path;
+ }
+
+ $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.
+ */
+ public static function isDefaultPort(UriInterface $uri): bool
+ {
+ return $uri->getPort() === null
+ || (isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$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'
+ *
+ * @see Uri::isNetworkPathReference
+ * @see Uri::isAbsolutePathReference
+ * @see Uri::isRelativePathReference
+ * @see https://tools.ietf.org/html/rfc3986#section-4
+ */
+ public static function isAbsolute(UriInterface $uri): bool
+ {
+ 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.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isNetworkPathReference(UriInterface $uri): bool
+ {
+ 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.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isAbsolutePathReference(UriInterface $uri): bool
+ {
+ 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.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ */
+ public static function isRelativePathReference(UriInterface $uri): bool
+ {
+ 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
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-4.4
+ */
+ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
+ {
+ 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() === '';
+ }
+
+ /**
+ * 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.
+ */
+ public static function withoutQueryValue(UriInterface $uri, string $key): UriInterface
+ {
+ $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
+ */
+ public static function withQueryValue(UriInterface $uri, string $key, ?string $value): UriInterface
+ {
+ $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<string, string|null> $keyValueArray Associative array of key and values
+ */
+ public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface
+ {
+ $result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
+
+ foreach ($keyValueArray as $key => $value) {
+ $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null);
+ }
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a URI from a hash of `parse_url` components.
+ *
+ * @see http://php.net/manual/en/function.parse-url.php
+ *
+ * @throws MalformedUriException If the components do not form a valid URI.
+ */
+ public static function fromParts(array $parts): UriInterface
+ {
+ $uri = new self();
+ $uri->applyParts($parts);
+ $uri->validateState();
+
+ return $uri;
+ }
+
+ public function getScheme(): string
+ {
+ return $this->scheme;
+ }
+
+ public function getAuthority(): string
+ {
+ $authority = $this->host;
+ if ($this->userInfo !== '') {
+ $authority = $this->userInfo.'@'.$authority;
+ }
+
+ if ($this->port !== null) {
+ $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
+ {
+ return $this->path;
+ }
+
+ public function getQuery(): string
+ {
+ return $this->query;
+ }
+
+ public function getFragment(): string
+ {
+ return $this->fragment;
+ }
+
+ public function withScheme($scheme): UriInterface
+ {
+ $scheme = $this->filterScheme($scheme);
+
+ if ($this->scheme === $scheme) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->scheme = $scheme;
+ $new->composedComponents = null;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withUserInfo($user, $password = null): UriInterface
+ {
+ $info = $this->filterUserInfoComponent($user);
+ if ($password !== null) {
+ $info .= ':'.$this->filterUserInfoComponent($password);
+ }
+
+ if ($this->userInfo === $info) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->userInfo = $info;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withHost($host): UriInterface
+ {
+ $host = $this->filterHost($host);
+
+ if ($this->host === $host) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->host = $host;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPort($port): UriInterface
+ {
+ $port = $this->filterPort($port);
+
+ if ($this->port === $port) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->port = $port;
+ $new->composedComponents = null;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPath($path): UriInterface
+ {
+ $path = $this->filterPath($path);
+
+ if ($this->path === $path) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->path = $path;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withQuery($query): UriInterface
+ {
+ $query = $this->filterQueryAndFragment($query);
+
+ if ($this->query === $query) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->query = $query;
+ $new->composedComponents = null;
+
+ return $new;
+ }
+
+ public function withFragment($fragment): UriInterface
+ {
+ $fragment = $this->filterQueryAndFragment($fragment);
+
+ if ($this->fragment === $fragment) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->fragment = $fragment;
+ $new->composedComponents = null;
+
+ return $new;
+ }
+
+ public function jsonSerialize(): string
+ {
+ return $this->__toString();
+ }
+
+ /**
+ * Apply parse_url parts to a URI.
+ *
+ * @param array $parts Array of parse_url parts to apply.
+ */
+ private function applyParts(array $parts): void
+ {
+ $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 mixed $scheme
+ *
+ * @throws \InvalidArgumentException If the scheme is invalid.
+ */
+ private function filterScheme($scheme): string
+ {
+ if (!is_string($scheme)) {
+ throw new \InvalidArgumentException('Scheme must be a string');
+ }
+
+ return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param mixed $component
+ *
+ * @throws \InvalidArgumentException If the user info is invalid.
+ */
+ private function filterUserInfoComponent($component): string
+ {
+ if (!is_string($component)) {
+ throw new \InvalidArgumentException('User info must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $component
+ );
+ }
+
+ /**
+ * @param mixed $host
+ *
+ * @throws \InvalidArgumentException If the host is invalid.
+ */
+ private function filterHost($host): string
+ {
+ if (!is_string($host)) {
+ throw new \InvalidArgumentException('Host must be a string');
+ }
+
+ return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param mixed $port
+ *
+ * @throws \InvalidArgumentException If the port is invalid.
+ */
+ private function filterPort($port): ?int
+ {
+ 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 string[] $keys
+ *
+ * @return string[]
+ */
+ private static function getFilteredQueryString(UriInterface $uri, array $keys): array
+ {
+ $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);
+ });
+ }
+
+ private static function generateQueryString(string $key, ?string $value): string
+ {
+ // 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::QUERY_SEPARATORS_REPLACEMENT);
+
+ if ($value !== null) {
+ $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT);
+ }
+
+ return $queryString;
+ }
+
+ private function removeDefaultPort(): void
+ {
+ if ($this->port !== null && self::isDefaultPort($this)) {
+ $this->port = null;
+ }
+ }
+
+ /**
+ * Filters the path of a URI
+ *
+ * @param mixed $path
+ *
+ * @throws \InvalidArgumentException If the path is invalid.
+ */
+ 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}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $path
+ );
+ }
+
+ /**
+ * Filters the query string or fragment of a URI.
+ *
+ * @param mixed $str
+ *
+ * @throws \InvalidArgumentException If the query or fragment is invalid.
+ */
+ 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}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $str
+ );
+ }
+
+ private function rawurlencodeMatchZero(array $match): string
+ {
+ return rawurlencode($match[0]);
+ }
+
+ private function validateState(): void
+ {
+ 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 MalformedUriException('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 MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon');
+ }
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UriComparator.php b/vendor/guzzlehttp/psr7/src/UriComparator.php
new file mode 100644
index 000000000..70c582aa0
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriComparator.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Provides methods to determine if a modified URL should be considered cross-origin.
+ *
+ * @author Graham Campbell
+ */
+final class UriComparator
+{
+ /**
+ * Determines if a modified URL should be considered cross-origin with
+ * respect to an original URL.
+ */
+ public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool
+ {
+ if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
+ return true;
+ }
+
+ if ($original->getScheme() !== $modified->getScheme()) {
+ return true;
+ }
+
+ if (self::computePort($original) !== self::computePort($modified)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ private static function computePort(UriInterface $uri): int
+ {
+ $port = $uri->getPort();
+
+ if (null !== $port) {
+ return $port;
+ }
+
+ return 'https' === $uri->getScheme() ? 443 : 80;
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
new file mode 100644
index 000000000..cd4c383aa
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -0,0 +1,220 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Provides methods to normalize and compare URIs.
+ *
+ * @author Tobias Schultze
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-6
+ */
+final class UriNormalizer
+{
+ /**
+ * Default normalizations which only include the ones that preserve semantics.
+ */
+ public const PRESERVING_NORMALIZATIONS =
+ self::CAPITALIZE_PERCENT_ENCODING |
+ self::DECODE_UNRESERVED_CHARACTERS |
+ self::CONVERT_EMPTY_PATH |
+ self::REMOVE_DEFAULT_HOST |
+ self::REMOVE_DEFAULT_PORT |
+ self::REMOVE_DOT_SEGMENTS;
+
+ /**
+ * 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
+ */
+ public const CAPITALIZE_PERCENT_ENCODING = 1;
+
+ /**
+ * 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/
+ */
+ public const DECODE_UNRESERVED_CHARACTERS = 2;
+
+ /**
+ * Converts the empty path to "/" for http and https URIs.
+ *
+ * Example: http://example.org → http://example.org/
+ */
+ public const CONVERT_EMPTY_PATH = 4;
+
+ /**
+ * 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. The first format is not accepted
+ * by PHPs stream functions and thus already normalized implicitly to the
+ * second format in the Uri class. See `GuzzleHttp\Psr7\Uri::composeComponents`.
+ *
+ * Example: file://localhost/myfile → file:///myfile
+ */
+ public const REMOVE_DEFAULT_HOST = 8;
+
+ /**
+ * Removes the default port of the given URI scheme from the URI.
+ *
+ * Example: http://example.org:80/ → http://example.org/
+ */
+ public const REMOVE_DEFAULT_PORT = 16;
+
+ /**
+ * 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
+ */
+ public const REMOVE_DOT_SEGMENTS = 32;
+
+ /**
+ * 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
+ */
+ public const REMOVE_DUPLICATE_SLASHES = 64;
+
+ /**
+ * 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
+ *
+ * Note: The sorting is neither locale nor Unicode aware (the URI query does not get decoded at all) as the
+ * purpose is to be able to compare URIs in a reproducible way, not to have the params sorted perfectly.
+ */
+ public const SORT_QUERY_PARAMETERS = 128;
+
+ /**
+ * 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.
+ *
+ * PSR-7 UriInterface cannot distinguish between an empty component and a missing component as
+ * getQuery(), getFragment() etc. always return a string. This means the URIs "/?#" and "/" are
+ * treated equivalent which is not necessarily true according to RFC 3986. But that difference
+ * is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well.
+ *
+ * @param UriInterface $uri The URI to normalize
+ * @param int $flags A bitmask of normalizations to apply, see constants
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-6.2
+ */
+ public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface
+ {
+ if ($flags & self::CAPITALIZE_PERCENT_ENCODING) {
+ $uri = self::capitalizePercentEncoding($uri);
+ }
+
+ if ($flags & self::DECODE_UNRESERVED_CHARACTERS) {
+ $uri = self::decodeUnreservedCharacters($uri);
+ }
+
+ if ($flags & self::CONVERT_EMPTY_PATH && $uri->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
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-6.1
+ */
+ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool
+ {
+ return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
+ }
+
+ private static function capitalizePercentEncoding(UriInterface $uri): UriInterface
+ {
+ $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): UriInterface
+ {
+ $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/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php
new file mode 100644
index 000000000..38d5793c7
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -0,0 +1,211 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Resolves a URI reference in the context of a base URI and the opposite way.
+ *
+ * @author Tobias Schultze
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-5
+ */
+final class UriResolver
+{
+ /**
+ * Removes dot segments from a path and returns the new path.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-5.2.4
+ */
+ public static function removeDotSegments(string $path): string
+ {
+ if ($path === '' || $path === '/') {
+ return $path;
+ }
+
+ $results = [];
+ $segments = explode('/', $path);
+ foreach ($segments as $segment) {
+ if ($segment === '..') {
+ array_pop($results);
+ } elseif ($segment !== '.') {
+ $results[] = $segment;
+ }
+ }
+
+ $newPath = implode('/', $results);
+
+ if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) {
+ // Re-add the leading slash if necessary for cases like "/.."
+ $newPath = '/'.$newPath;
+ } elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) {
+ // Add the trailing slash if necessary
+ // If newPath is not empty, then $segment must be set and is the last segment from the foreach
+ $newPath .= '/';
+ }
+
+ return $newPath;
+ }
+
+ /**
+ * Converts the relative URI into a new URI that is resolved against the base URI.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-5.2
+ */
+ public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
+ {
+ if ((string) $rel === '') {
+ // we can simply return the same base URI instance for this same-document reference
+ return $base;
+ }
+
+ if ($rel->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
+ */
+ public static function relativize(UriInterface $base, UriInterface $target): UriInterface
+ {
+ 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());
+ /** @var string $lastSegment */
+ $lastSegment = end($segments);
+
+ return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment);
+ }
+
+ return $emptyPathUri;
+ }
+
+ private static function getRelativePath(UriInterface $base, UriInterface $target): string
+ {
+ $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/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php
new file mode 100644
index 000000000..917c05e30
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Utils.php
@@ -0,0 +1,463 @@
+<?php
+
+declare(strict_types=1);
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UriInterface;
+
+final class Utils
+{
+ /**
+ * Remove the items given by the keys, case insensitively from the data.
+ *
+ * @param string[] $keys
+ */
+ public static function caselessRemove(array $keys, array $data): array
+ {
+ $result = [];
+
+ foreach ($keys as &$key) {
+ $key = strtolower($key);
+ }
+
+ foreach ($data as $k => $v) {
+ if (!is_string($k) || !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, int $maxLen = -1): void
+ {
+ $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.
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function copyToString(StreamInterface $stream, int $maxLen = -1): string
+ {
+ $buffer = '';
+
+ if ($maxLen === -1) {
+ while (!$stream->eof()) {
+ $buf = $stream->read(1048576);
+ if ($buf === '') {
+ break;
+ }
+ $buffer .= $buf;
+ }
+
+ return $buffer;
+ }
+
+ $len = 0;
+ while (!$stream->eof() && $len < $maxLen) {
+ $buf = $stream->read($maxLen - $len);
+ if ($buf === '') {
+ 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
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string
+ {
+ $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, $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.
+ */
+ public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface
+ {
+ 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(
+ $changes['method'] ?? $request->getMethod(),
+ $uri,
+ $headers,
+ $changes['body'] ?? $request->getBody(),
+ $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(
+ $changes['method'] ?? $request->getMethod(),
+ $uri,
+ $headers,
+ $changes['body'] ?? $request->getBody(),
+ $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
+ */
+ public static function readLine(StreamInterface $stream, int $maxLength = null): string
+ {
+ $buffer = '';
+ $size = 0;
+
+ while (!$stream->eof()) {
+ if ('' === ($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{size?: int, metadata?: array} $options Additional options
+ *
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
+ */
+ public static function streamFor($resource = '', array $options = []): StreamInterface
+ {
+ if (is_scalar($resource)) {
+ $stream = self::tryFopen('php://temp', 'r+');
+ if ($resource !== '') {
+ fwrite($stream, (string) $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
+ */
+
+ /** @var resource $resource */
+ if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') {
+ $stream = self::tryFopen('php://temp', 'w+');
+ stream_copy_to_stream($resource, $stream);
+ fseek($stream, 0);
+ $resource = $stream;
+ }
+
+ return new Stream($resource, $options);
+ case 'object':
+ /** @var object $resource */
+ 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 self::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(string $filename, string $mode)
+ {
+ $ex = null;
+ set_error_handler(static function (int $errno, string $errstr) use ($filename, $mode, &$ex): bool {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to open "%s" using mode "%s": %s',
+ $filename,
+ $mode,
+ $errstr
+ ));
+
+ return true;
+ });
+
+ try {
+ /** @var resource $handle */
+ $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;
+ }
+
+ /**
+ * Safely gets the contents of a given stream.
+ *
+ * When stream_get_contents fails, PHP normally raises a warning. This
+ * function adds an error handler that checks for errors and throws an
+ * exception instead.
+ *
+ * @param resource $stream
+ *
+ * @throws \RuntimeException if the stream cannot be read
+ */
+ public static function tryGetContents($stream): string
+ {
+ $ex = null;
+ set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to read stream contents: %s',
+ $errstr
+ ));
+
+ return true;
+ });
+
+ try {
+ /** @var string|false $contents */
+ $contents = stream_get_contents($stream);
+
+ if ($contents === false) {
+ $ex = new \RuntimeException('Unable to read stream contents');
+ }
+ } catch (\Throwable $e) {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to read stream contents: %s',
+ $e->getMessage()
+ ), 0, $e);
+ }
+
+ restore_error_handler();
+
+ if ($ex) {
+ /** @var $ex \RuntimeException */
+ throw $ex;
+ }
+
+ return $contents;
+ }
+
+ /**
+ * 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
+ *
+ * @throws \InvalidArgumentException
+ */
+ public static function uriFor($uri): UriInterface
+ {
+ 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/vendor/jonahgeorge/jaeger-client-php/.editorconfig b/vendor/jonahgeorge/jaeger-client-php/.editorconfig
deleted file mode 100644
index 1492202b4..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/.editorconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-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
diff --git a/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml b/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml
deleted file mode 100644
index d0e5dc1f5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Test
-
-on: [push, pull_request]
-
-jobs:
- run:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
- name: PHP ${{ matrix.php-versions }}
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-versions }}
- coverage: xdebug
-
- - name: Get composer cache directory
- id: composercache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
- - name: Cache dependencies
- uses: actions/cache@v2
- with:
- path: ${{ steps.composercache.outputs.dir }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
-
- - name: Install dependencies
- run: |
- composer install \
- --no-interaction \
- --no-ansi \
- --no-progress
-
- - name: Run lint
- run: composer lint
-
- - name: Run test
- run: composer test
diff --git a/vendor/jonahgeorge/jaeger-client-php/.gitignore b/vendor/jonahgeorge/jaeger-client-php/.gitignore
deleted file mode 100644
index 07dc555db..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-# Please do not use this ignore file to define platform specific files.
-#
-# For these purposes create a global .gitignore file, which is a list of rules
-# for ignoring files in every Git repository on your computer.
-#
-# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
-
-jaeger-idl
-vendor
-
-composer.lock
-composer.phar
-
-jaeger-client-php.iml
-
-phpunit.xml
-phpcs.xml
diff --git a/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md b/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md
deleted file mode 100644
index e5ec5ed4f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# How to Contribute to Jaeger
-
-We'd love your help!
diff --git a/vendor/jonahgeorge/jaeger-client-php/LICENSE b/vendor/jonahgeorge/jaeger-client-php/LICENSE
deleted file mode 100644
index 8e37af0cb..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2018 Jonah George, José Carlos Chávez
-
-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/vendor/jonahgeorge/jaeger-client-php/README.md b/vendor/jonahgeorge/jaeger-client-php/README.md
deleted file mode 100644
index 6396bb70f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/README.md
+++ /dev/null
@@ -1,219 +0,0 @@
-![Build Status](https://github.com/jonahgeorge/jaeger-client-php/workflows/Test/badge.svg) [![PHP version][packagist-img]][packagist]
-
-# Jaeger Bindings for PHP OpenTracing API
-
-This is a client-side library that can be used to instrument PHP apps for distributed trace collection,
-and to send those traces to Jaeger. See the [OpenTracing PHP API](https://github.com/opentracing/opentracing-php)
-for additional detail.
-
-## Contributing and Developing
-
-Please see [CONTRIBUTING.md](./CONTRIBUTING.md).
-
-## Installation
-
-Jaeger client can be installed via Composer:
-
-```bash
-composer require jonahgeorge/jaeger-client-php
-```
-
-## Getting Started
-
-```php
-<?php
-
-require_once 'vendor/autoload.php';
-
-use Jaeger\Config;
-use OpenTracing\GlobalTracer;
-
-$config = new Config(
- [
- 'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'logging' => true,
- ],
- 'your-app-name'
-);
-$config->initializeTracer();
-
-$tracer = GlobalTracer::get();
-
-$scope = $tracer->startActiveSpan('TestSpan', []);
-$scope->close();
-
-$tracer->flush();
-```
-
-### Samplers
-
-List of supported samplers, for more info about samplers, please read [Jaeger Sampling](https://www.jaegertracing.io/docs/1.9/sampling/) guide.
-
-#### Const sampler
-This sampler either samples everything, or nothing.
-
-##### Configuration
-```
-'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_CONST,
- 'param' => true, // boolean wheter to trace or not
-],
-```
-
-#### Probabilistic sampler
-This sampler samples request by given rate.
-
-##### Configuration
-```
-'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_PROBABILISTIC,
- 'param' => 0.5, // float [0.0, 1.0]
-],
-```
-
-#### Rate limiting sampler
-Samples maximum specified number of traces (requests) per second.
-
-##### Requirements
-* `psr/cache` PSR-6 cache component to store and retrieve sampler state between requests.
-Cache component is passed to `Jaeger\Config` trough its constructor.
-* `hrtime()` function, that can retrieve time in nanoseconds. You need either `php 7.3` or [PECL/hrtime](http://pecl.php.net/package/hrtime) extension.
-
-##### Configuration
-```
-'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_RATE_LIMITING,
- 'param' => 100 // integer maximum number of traces per second,
- 'cache' => [
- 'currentBalanceKey' => 'rate.currentBalance' // string
- 'lastTickKey' => 'rate.lastTick' // string
- ]
-],
-```
-## Dispatch mode
-
-The library supports 3 ways of sending data to Jaeger Agent:
-
-1. `Zipkin.thrift` over Compact protocol (socket - UDP) - default
-2. `Jaeger.thrift` over Binary protocol (socket - UDP)
-2. `Jaeger.thrift` over Binary protocol (HTTP)
-
-If you want to enable "`Jaeger.thrift` over Binary protocol" one or other, than
-you need to set `dispatch_mode` config option or `JAEGER_DISPATCH_MODE` env
-variable.
-
-Allowed values for `dispatch_mode` are:
-- `jaeger_over_binary_udp`
-- `jaeger_over_binary_http`
-- `zipkin_over_compact_udp`
-
-There are 3 constants available, so it is better to use them:
-```php
-class Config
-{
- const ZIPKIN_OVER_COMPACT_UDP = "zipkin_over_compact_udp";
- const JAEGER_OVER_BINARY_UDP = "jaeger_over_binary_udp";
- const JAEGER_OVER_BINARY_HTTP = "jaeger_over_binary_http";
- ...
-}
-```
-
-A possible config with custom `dispatch_mode` can look like this:
-```php
-// config.php
-
-use Jaeger\Config;
-
-return [
- 'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'logging' => true,
- "tags" => [
- // process. prefix works only with JAEGER_OVER_HTTP, JAEGER_OVER_BINARY
- // otherwise it will be shown as simple global tag
- "process.process-tag-key-1" => "process-value-1", // all tags with `process.` prefix goes to process section
- "process.process-tag-key-2" => "process-value-2", // all tags with `process.` prefix goes to process section
- "global-tag-key-1" => "global-tag-value-1", // this tag will be appended to all spans
- "global-tag-key-2" => "global-tag-value-2", // this tag will be appended to all spans
- ],
- "local_agent" => [
- "reporting_host" => "localhost",
-// You can override port by setting local_agent.reporting_port value
- "reporting_port" => 6832
- ],
-// Different ways to send data to Jaeger. Config::ZIPKIN_OVER_COMPACT - default):
- 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP,
-];
-```
-The full example you can see at `examples` directory.
-
-By default, for each `dispatch_mode` there is default `reporting_port` config value. Table with
-default values you can see below:
-
-`dispatch_mode` | default `reporting_port`
------------------------- | ----------------
-ZIPKIN_OVER_COMPACT_UDP | 5775
-JAEGER_OVER_BINARY_UDP | 6832
-JAEGER_OVER_BINARY_HTTP | 14268
-
-## IPv6
-
-In case you need IPv6 support you need to set `ip_version` Config variable.
-By default, IPv4 is used. There is an alias `Config::IP_VERSION` which you can use
-as an alternative to raw `ip_version`.
-
-Example:
-
-```php
-use Jaeger\Config;
-
-$config = new Config(
- [
- "ip_version" => Config::IPV6, // <-- or use Config::IP_VERSION constant
- 'logging' => true,
- 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP,
- ],
- 'serviceNameExample',
-);
-$config->initializeTracer();
-```
-or
-
-```php
-use Jaeger\Config;
-
-$config = new Config(
- [
- Config::IP_VERSION => Config::IPV6, // <--
- 'logging' => true,
- 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP,
- ],
- 'serviceNameExample',
-);
-$config->initializeTracer();
-```
-
-
-## Testing
-
-Tests are located in the `tests` directory. See [tests/README.md](./tests/README.md).
-
-## Roadmap
-
-- [Support Span baggage](https://github.com/jonahgeorge/jaeger-client-php/issues/5)
-- [Support Tracer metrics](https://github.com/jonahgeorge/jaeger-client-php/issues/12)
-- [Support Tracer error reporting](https://github.com/jonahgeorge/jaeger-client-php/issues/13)
-
-## License
-
-[MIT License](./LICENSE).
-
-[ci-img]: https://travis-ci.org/jonahgeorge/jaeger-client-php.svg?branch=travis
-[ci]: https://travis-ci.org/jonahgeorge/jaeger-client-php
-[packagist-img]: https://badge.fury.io/ph/jonahgeorge%2Fjaeger-client-php.svg
-[packagist]: https://badge.fury.io/ph/jonahgeorge%2Fjaeger-client-php
diff --git a/vendor/jonahgeorge/jaeger-client-php/build/.gitignore b/vendor/jonahgeorge/jaeger-client-php/build/.gitignore
deleted file mode 100644
index d6b7ef32c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/build/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/vendor/jonahgeorge/jaeger-client-php/composer.json b/vendor/jonahgeorge/jaeger-client-php/composer.json
deleted file mode 100644
index a9bb99a06..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/composer.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "name": "jonahgeorge/jaeger-client-php",
- "description": "Jaeger Bindings for PHP OpenTracing API",
- "keywords": [
- "jaeger",
- "opentracing",
- "trace",
- "tracing"
- ],
- "license": "MIT",
- "authors": [
- {
- "name": "Jonah George",
- "homepage": "http://twitter.com/jonahgeorge"
- },
- {
- "name": "José Carlos Chávez",
- "email": "[email protected]"
- },
- {
- "name": "Contributors",
- "homepage": "https://github.com/jonahgeorge/jaeger-client-php/graphs/contributors"
- }
- ],
- "require": {
- "php": "^7.1 || ^8.0 || ^8.1",
- "ext-sockets": "*",
- "opentracing/opentracing": "^1.0",
- "packaged/thrift": "^0.13",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "psr/log": "^1.0 || ^2.0 || ^3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^7 || ^8 || ^9",
- "squizlabs/php_codesniffer": "3.*",
- "cache/array-adapter": "^1.0",
- "symfony/polyfill-php73": "^1.10"
- },
- "config": {
- "optimize-autoloader": true,
- "preferred-install": "dist",
- "sort-packages": true
- },
- "autoload": {
- "psr-4": {
- "Jaeger\\": "src/Jaeger/"
- },
- "files": [
- "./src/Jaeger/Constants.php"
- ]
- },
- "autoload-dev": {
- "Jaeger\\Tests\\": "tests/Jaeger/"
- },
- "minimum-stability": "dev",
- "prefer-stable": true,
- "scripts": {
- "fix-lint": "./vendor/bin/phpcbf",
- "lint": "./vendor/bin/phpcs",
- "test": "./vendor/bin/phpunit"
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/examples/config.php b/vendor/jonahgeorge/jaeger-client-php/examples/config.php
deleted file mode 100644
index 5c4726165..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/examples/config.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-use Jaeger\Config;
-
-return [
- 'sampler' => [
- 'type' => Jaeger\SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'logging' => true,
- "tags" => [
- // process. prefix works only with JAEGER_OVER_HTTP, JAEGER_OVER_BINARY
- // otherwise it will be shown as simple global tag
- "process.process-tag-key-1" => "process-value-1", // all tags with `process.` prefix goes to process section
- "process.process-tag-key-2" => "process-value-2", // all tags with `process.` prefix goes to process section
- "global-tag-key-1" => "global-tag-value-1", // this tag will be appended to all spans
- "global-tag-key-2" => "global-tag-value-2", // this tag will be appended to all spans
- ],
- "local_agent" => [
- "reporting_host" => "localhost",
-// You can override port by setting local_agent.reporting_port value
-// "reporting_port" => 6832
- ],
-// Different ways to send data to Jaeger. Config::ZIPKIN_OVER_COMPACT - default):
- 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP,
-];
diff --git a/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php b/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php
deleted file mode 100644
index ed9304fe2..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-require_once __DIR__.'/../vendor/autoload.php';
-
-use Jaeger\Config;
-use OpenTracing\GlobalTracer;
-
-$config = new Config(
- require_once __DIR__.'/config.php',
- 'your-app-name'
-);
-
-$config->initializeTracer();
-
-$tracer = GlobalTracer::get();
-
-$scope = $tracer->startActiveSpan('JaegerSpan', []);
-$scope->getSpan()->setTag("tag1", "value1");
-$scope->getSpan()->setTag("tag2", "value2");
-$scope->getSpan()->setTag("tag3", "value2");
-$scope->getSpan()->log([
- "key1" => "value1",
- "key2" => 2,
- "key3" => true
-]);
-
-$scope->getSpan()->addBaggageItem("baggage-item1", "baggage-value1");
-$scope->getSpan()->addBaggageItem("baggage-item2", "baggage-value2");
-$scope->getSpan()->addBaggageItem("baggage-item3", "baggage-value3");
-
- $nestedSpanScope = $tracer->startActiveSpan("Nested1");
- $nestedSpanScope->getSpan()->setTag("tag1", "value1");
- $nestedSpanScope->getSpan()->setTag("tag2", "value2");
- $nestedSpanScope->getSpan()->setTag("tag3", "value2");
- $nestedSpanScope->getSpan()->log([
- "key1" => "value1",
- "key2" => 2,
- "key3" => true
- ]);
-
- $nestedSpanScope->getSpan()->addBaggageItem("baggage-item1", "baggage-value1");
- $nestedSpanScope->getSpan()->addBaggageItem("baggage-item2", "baggage-value2");
- $nestedSpanScope->getSpan()->addBaggageItem("baggage-item3", "baggage-value3");
-
- sleep(1);
-
- $nestedSpanScope->close();
-
-sleep(1);
-$scope->close();
-$tracer->flush();
diff --git a/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist b/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist
deleted file mode 100644
index 7d5db0974..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<ruleset name="Jaeger">
-
- <!--
- The name attribute of the ruleset tag is displayed
- when running PHP_CodeSniffer with the -v command line
- argument. The description tag below is not displayed anywhere
- except in this file, so it can contain information for
- developers who may change this file in the future.
- -->
- <description>The coding standard for Jaeger Client</description>
-
- <!-- Show sniff codes in all reports -->
- <arg value="s"/>
-
- <!-- Use PSR-2 as a base -->
- <rule ref="PSR2"/>
-
- <!-- Uncomment to use colors in progress or report -->
- <!-- arg name="colors" / -->
-
- <!--
- If no files or directories are specified on the command line
- your custom standard can specify what files should be checked
- instead.
- Note that specifying any file or directory path
- on the command line will ignore all file tags.
- -->
- <file>src</file>
-
- <!--
- You can hard-code ignore patterns directly into your
- custom standard so you don't have to specify the
- patterns on the command line.
- -->
- <exclude-pattern>src/Jaeger/Thrift/*</exclude-pattern>
-</ruleset>
diff --git a/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist b/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist
deleted file mode 100644
index d6795d99b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
- bootstrap="vendor/autoload.php"
- colors="true"
->
- <filter>
- <whitelist>
- <directory suffix=".php">src/Jaeger</directory>
- <exclude>
- <directory suffix="Interface.php">src/</directory>
- <file>src/Jaeger/Constants.php</file>
- <file>src/Jaeger/Thrift/Agent/AgentIf.php</file>
- <file>src/Jaeger/Thrift/Agent/AggregationValidatorIf.php</file>
- <file>src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php</file>
- <file>src/Jaeger/Thrift/Agent/DependencyIf.php</file>
- <file>src/Jaeger/Thrift/Agent/SamplingManagerIf.php</file>
- <file>src/Jaeger/Thrift/CollectorIf.php</file>
- <file>src/Jaeger/Thrift/Crossdock/TracedServiceIf.php</file>
- </exclude>
- </whitelist>
- </filter>
-
- <testsuites>
- <testsuite name="Jaeger Test Suite">
- <directory suffix=".php">tests/Jaeger</directory>
- </testsuite>
- </testsuites>
-
- <php>
- <ini name="date.timezone" value="UTC"/>
- <ini name="display_errors" value="on"/>
- <ini name="display_startup_errors" value="on"/>
- </php>
-
- <logging>
- <log
- type="coverage-text"
- target="php://stdout"
- lowUpperBound="60"
- highLowerBound="90"/>
-
- <log
- type="coverage-clover"
- target="build/coverage.xml"/>
- </logging>
-</phpunit>
diff --git a/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh b/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh
deleted file mode 100644
index 7420f915f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-set -e
-
-cd "$(dirname "$0")/.."
-
-# checkout jaeger thrift files
-rm -rf jaeger-idl
-git clone https://github.com/jaegertracing/jaeger-idl
-
-# define thrift cmd
-THRIFT="docker run -u $(id -u) -v '${PWD}:/data' thrift:0.11.0 thrift -o /data/jaeger-idl"
-THRIFT_CMD="${THRIFT} --gen php:psr4,oop"
-
-# generate php files
-FILES=$(find jaeger-idl/thrift -type f -name \*.thrift)
-for f in ${FILES}; do
- echo "${THRIFT_CMD} "/data/${f}""
- eval $THRIFT_CMD "/data/${f}"
-done
-
-# move generated files
-rm -rf src/Jaeger/Thrift
-mv jaeger-idl/gen-php/Jaeger/Thrift src/Jaeger/Thrift
-
-# remove thrift files
-rm -rf jaeger-idl
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php
deleted file mode 100644
index e270b76ac..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-namespace Jaeger\AgentClient;
-
-class HttpAgentClient implements \Jaeger\Thrift\Agent\AgentIf
-{
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output = null)
- {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function emitZipkinBatch(array $spans)
- {
- }
-
- public function emitBatch(\Jaeger\Thrift\Batch $batch)
- {
- $batch->write($this->output_);
- $this->output_->getTransport()->flush();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php
deleted file mode 100644
index 36c2ffe2c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-namespace Jaeger\Codec;
-
-use Jaeger\SpanContext;
-use OpenTracing\UnsupportedFormatException;
-
-class BinaryCodec implements CodecInterface
-{
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::inject
- *
- * @param SpanContext $spanContext
- * @param mixed $carrier
- *
- * @return void
- */
- public function inject(SpanContext $spanContext, &$carrier)
- {
- throw new UnsupportedFormatException('Binary encoding not implemented');
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::extract
- *
- * @param mixed $carrier
- * @return SpanContext|null
- *
- * @throws UnsupportedFormatException
- */
- public function extract($carrier)
- {
- throw new UnsupportedFormatException('Binary encoding not implemented');
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php
deleted file mode 100644
index 2aa7d690d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace Jaeger\Codec;
-
-use Jaeger\SpanContext;
-
-interface CodecInterface
-{
- /**
- * Handle the logic behind injecting propagation scheme specific information into the carrier
- * (e.g. http request headers, amqp message headers, etc.).
- *
- * This method can modify the carrier.
- *
- * @see \Jaeger\Tracer::inject
- *
- * @param SpanContext $spanContext
- * @param mixed $carrier
- *
- * @return void
- */
- public function inject(SpanContext $spanContext, &$carrier);
-
- /**
- * Handle the logic behind extracting propagation-scheme specific information from carrier
- * (e.g. http request headers, amqp message headers, etc.).
- *
- * This method must not modify the carrier.
- *
- * @see \Jaeger\Tracer::extract
- *
- * @param mixed $carrier
- * @return SpanContext|null
- */
- public function extract($carrier);
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php
deleted file mode 100644
index eb86a1cde..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-namespace Jaeger\Codec;
-
-class CodecUtility
-{
-
- /**
- * Incoming trace/span IDs are hex representations of 64-bit values. PHP
- * represents ints internally as signed 32- or 64-bit values, but base_convert
- * converts to string representations of arbitrarily large positive numbers.
- * This means at least half the incoming IDs will be larger than PHP_INT_MAX.
- *
- * Thrift, while building a binary representation of the IDs, performs bitwise
- * operations on the string values, implicitly casting to int and capping them
- * at PHP_INT_MAX. So, incoming IDs larger than PHP_INT_MAX will be serialized
- * and sent to the agent as PHP_INT_MAX, breaking trace/span correlation.
- *
- * This method therefore, on 64-bit architectures, splits the hex string into
- * high and low values, converts them separately to ints, and manually combines
- * them into a proper signed int. This int is then handled properly by the
- * Thrift package.
- *
- * On 32-bit architectures, it falls back to base_convert.
- *
- * @param string $hex
- * @return string|int
- */
- public static function hexToInt64($hex)
- {
- // If we're on a 32-bit architecture, fall back to base_convert.
- if (PHP_INT_SIZE === 4) {
- return base_convert($hex, 16, 10);
- }
-
- $hi = intval(substr($hex, -16, -8), 16);
- $lo = intval(substr($hex, -8, 8), 16);
-
- return $hi << 32 | $lo;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php
deleted file mode 100644
index d437f3812..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php
+++ /dev/null
@@ -1,184 +0,0 @@
-<?php
-
-namespace Jaeger\Codec;
-
-use Exception;
-use Jaeger\SpanContext;
-
-use const Jaeger\TRACE_ID_HEADER;
-use const Jaeger\BAGGAGE_HEADER_PREFIX;
-use const Jaeger\DEBUG_ID_HEADER_KEY;
-
-class TextCodec implements CodecInterface
-{
- private $urlEncoding;
- private $traceIdHeader;
- private $baggagePrefix;
- private $debugIdHeader;
- private $prefixLength;
-
- /**
- * @param bool $urlEncoding
- * @param string $traceIdHeader
- * @param string $baggageHeaderPrefix
- * @param string $debugIdHeader
- */
- public function __construct(
- bool $urlEncoding = false,
- string $traceIdHeader = TRACE_ID_HEADER,
- string $baggageHeaderPrefix = BAGGAGE_HEADER_PREFIX,
- string $debugIdHeader = DEBUG_ID_HEADER_KEY
- ) {
- $this->urlEncoding = $urlEncoding;
- $this->traceIdHeader = str_replace('_', '-', strtolower($traceIdHeader));
- $this->baggagePrefix = str_replace('_', '-', strtolower($baggageHeaderPrefix));
- $this->debugIdHeader = str_replace('_', '-', strtolower($debugIdHeader));
- $this->prefixLength = strlen($baggageHeaderPrefix);
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::inject
- *
- * @param SpanContext $spanContext
- * @param mixed $carrier
- *
- * @return void
- */
- public function inject(SpanContext $spanContext, &$carrier)
- {
- $carrier[$this->traceIdHeader] = $this->spanContextToString(
- $spanContext->getTraceId(),
- $spanContext->getSpanId(),
- $spanContext->getParentId(),
- $spanContext->getFlags()
- );
-
- $baggage = $spanContext->getBaggage();
- if (empty($baggage)) {
- return;
- }
-
- foreach ($baggage as $key => $value) {
- $encodedValue = $value;
-
- if ($this->urlEncoding) {
- $encodedValue = urlencode($value);
- }
-
- $carrier[$this->baggagePrefix . $key] = $encodedValue;
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::extract
- *
- * @param mixed $carrier
- * @return SpanContext|null
- *
- * @throws Exception
- */
- public function extract($carrier)
- {
- $traceId = null;
- $spanId = null;
- $parentId = null;
- $flags = null;
- $baggage = null;
- $debugId = null;
-
- foreach ($carrier as $key => $value) {
- $ucKey = strtolower($key);
-
- if ($ucKey === $this->traceIdHeader) {
- if ($this->urlEncoding) {
- $value = urldecode($value);
- }
- list($traceId, $spanId, $parentId, $flags) =
- $this->spanContextFromString($value);
- } elseif ($this->startsWith($ucKey, $this->baggagePrefix)) {
- if ($this->urlEncoding) {
- $value = urldecode($value);
- }
- $attrKey = substr($key, $this->prefixLength);
- if ($baggage === null) {
- $baggage = [strtolower($attrKey) => $value];
- } else {
- $baggage[strtolower($attrKey)] = $value;
- }
- } elseif ($ucKey === $this->debugIdHeader) {
- if ($this->urlEncoding) {
- $value = urldecode($value);
- }
- $debugId = $value;
- }
- }
-
- if ($traceId === null && $baggage !== null) {
- throw new Exception('baggage without trace ctx');
- }
-
- if ($traceId === null) {
- if ($debugId !== null) {
- return new SpanContext(null, null, null, null, [], $debugId);
- }
- return null;
- }
-
- return new SpanContext($traceId, $spanId, $parentId, $flags, $baggage);
- }
-
- /**
- * Store a span context to a string.
- *
- * @param int $traceId
- * @param int $spanId
- * @param int $parentId
- * @param int $flags
- * @return string
- */
- private function spanContextToString($traceId, $spanId, $parentId, $flags)
- {
- $parentId = $parentId ?? 0;
- return sprintf('%x:%x:%x:%x', $traceId, $spanId, $parentId, $flags);
- }
-
- /**
- * Create a span context from a string.
- *
- * @param string $value
- * @return array
- *
- * @throws Exception
- */
- private function spanContextFromString($value): array
- {
- $parts = explode(':', $value);
-
- if (count($parts) != 4) {
- throw new Exception('Malformed tracer state string.');
- }
-
- return [
- CodecUtility::hexToInt64($parts[0]),
- CodecUtility::hexToInt64($parts[1]),
- CodecUtility::hexToInt64($parts[2]),
- $parts[3],
- ];
- }
-
- /**
- * Checks that a string ($haystack) starts with a given prefix ($needle).
- *
- * @param string $haystack
- * @param string $needle
- * @return bool
- */
- private function startsWith(string $haystack, string $needle): bool
- {
- return substr($haystack, 0, strlen($needle)) == $needle;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php
deleted file mode 100644
index 1ea5d7c0b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-
-namespace Jaeger\Codec;
-
-use Jaeger\SpanContext;
-
-use const Jaeger\DEBUG_FLAG;
-use const Jaeger\SAMPLED_FLAG;
-
-class ZipkinCodec implements CodecInterface
-{
- const SAMPLED_NAME = 'X-B3-Sampled';
- const TRACE_ID_NAME = 'X-B3-TraceId';
- const SPAN_ID_NAME = 'X-B3-SpanId';
- const PARENT_ID_NAME = 'X-B3-ParentSpanId';
- const FLAGS_NAME = 'X-B3-Flags';
-
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::inject
- *
- * @param SpanContext $spanContext
- * @param mixed $carrier
- *
- * @return void
- */
- public function inject(SpanContext $spanContext, &$carrier)
- {
- $carrier[self::TRACE_ID_NAME] = dechex($spanContext->getTraceId());
- $carrier[self::SPAN_ID_NAME] = dechex($spanContext->getSpanId());
- if ($spanContext->getParentId() != null) {
- $carrier[self::PARENT_ID_NAME] = dechex($spanContext->getParentId());
- }
- $carrier[self::FLAGS_NAME] = (int) $spanContext->getFlags();
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Jaeger\Tracer::extract
- *
- * @param mixed $carrier
- * @return SpanContext|null
- */
- public function extract($carrier)
- {
- $traceId = "0";
- $spanId = "0";
- $parentId = "0";
- $flags = 0;
-
- if (isset($carrier[strtolower(self::SAMPLED_NAME)])) {
- if ($carrier[strtolower(self::SAMPLED_NAME)] === "1" ||
- strtolower($carrier[strtolower(self::SAMPLED_NAME)] === "true")
- ) {
- $flags = $flags | SAMPLED_FLAG;
- }
- }
-
- if (isset($carrier[strtolower(self::TRACE_ID_NAME)])) {
- $traceId = CodecUtility::hexToInt64($carrier[strtolower(self::TRACE_ID_NAME)], 16, 10);
- }
-
- if (isset($carrier[strtolower(self::PARENT_ID_NAME)])) {
- $parentId = CodecUtility::hexToInt64($carrier[strtolower(self::PARENT_ID_NAME)], 16, 10);
- }
-
- if (isset($carrier[strtolower(self::SPAN_ID_NAME)])) {
- $spanId = CodecUtility::hexToInt64($carrier[strtolower(self::SPAN_ID_NAME)], 16, 10);
- }
-
- if (isset($carrier[strtolower(self::FLAGS_NAME)])) {
- if ($carrier[strtolower(self::FLAGS_NAME)] === "1") {
- $flags = $flags | DEBUG_FLAG;
- }
- }
-
- if ($traceId != "0" && $spanId != "0") {
- return new SpanContext($traceId, $spanId, $parentId, $flags);
- }
-
- return null;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php
deleted file mode 100644
index 28fb972da..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php
+++ /dev/null
@@ -1,390 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use Exception;
-use Jaeger\Reporter\CompositeReporter;
-use Jaeger\Reporter\LoggingReporter;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\ReporterFactory\JaegerHttpReporterFactory;
-use Jaeger\ReporterFactory\JaegerReporterFactory;
-use Jaeger\ReporterFactory\ZipkinReporterFactory;
-use Jaeger\Sampler\ConstSampler;
-use Jaeger\Sampler\ProbabilisticSampler;
-use Jaeger\Sampler\RateLimitingSampler;
-use Jaeger\Sampler\SamplerInterface;
-use Jaeger\Util\RateLimiter;
-use OpenTracing\GlobalTracer;
-use Psr\Cache\CacheItemPoolInterface;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-
-class Config
-{
- const IP_VERSION = "ip_version";
-
- const ZIPKIN_OVER_COMPACT_UDP = "zipkin_over_compact_udp";
- const JAEGER_OVER_BINARY_UDP = "jaeger_over_binary_udp";
- const JAEGER_OVER_BINARY_HTTP = "jaeger_over_binary_http";
-
- const IPV6 = "IPv6";
- const IPV4 = "IPv4";
-
- /**
- * @return string[]
- */
- public static function getAvailableDispatchModes()
- {
- return [self::ZIPKIN_OVER_COMPACT_UDP, self::JAEGER_OVER_BINARY_UDP, self::JAEGER_OVER_BINARY_HTTP];
- }
-
- /**
- * @var array
- */
- private $config;
-
- /**
- * @var string
- */
- private $serviceName;
-
- /**
- * @var bool
- */
- private $initialized = false;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @return LoggerInterface
- */
- public function getLogger()
- {
- return $this->logger;
- }
-
- /**
- * @var CacheItemPoolInterface
- */
- private $cache;
-
- /**
- * Config constructor.
- * @param array $config
- * @param string|null $serviceName
- * @param LoggerInterface|null $logger
- * @param CacheItemPoolInterface|null $cache
- * @throws Exception
- */
- public function __construct(
- array $config,
- string $serviceName = null,
- LoggerInterface $logger = null,
- CacheItemPoolInterface $cache = null
- ) {
- $this->config = $config;
-
- $this->setConfigFromEnv();
-
- if (empty($this->config["dispatch_mode"])) {
- $this->config["dispatch_mode"] = self::ZIPKIN_OVER_COMPACT_UDP;
- }
-
- if (empty($this->config[Config::IP_VERSION])) {
- $this->config[Config::IP_VERSION] = self::IPV4;
- }
-
- $this->serviceName = $this->config['service_name'] ?? $serviceName;
-
- if ($this->serviceName === null) {
- throw new Exception('service_name required in the config or param.');
- }
-
- $this->logger = $logger ?: new NullLogger();
- $this->cache = $cache;
- }
-
- /**
- * @return Tracer|null
- * @throws Exception
- */
- public function initializeTracer()
- {
- if ($this->initialized) {
- $this->logger->warning('Jaeger tracer already initialized, skipping');
- return null;
- }
-
- $reporter = $this->getReporter();
- $sampler = $this->getSampler();
-
-
- $tracer = $this->createTracer($reporter, $sampler);
-
- $this->initializeGlobalTracer($tracer);
-
- return $tracer;
- }
-
- /**
- * @param ReporterInterface $reporter
- * @param SamplerInterface $sampler
- * @return Tracer
- */
- public function createTracer(ReporterInterface $reporter, SamplerInterface $sampler): Tracer
- {
- return new Tracer(
- $this->serviceName,
- $reporter,
- $sampler,
- $this->shouldUseOneSpanPerRpc(),
- $this->logger,
- null,
- $this->getTraceIdHeader(),
- $this->getBaggageHeaderPrefix(),
- $this->getDebugIdHeaderKey(),
- $this->getConfiguredTags()
- );
- }
-
- /**
- * @return string
- */
- public function getServiceName(): string
- {
- return $this->serviceName;
- }
-
- /**
- * @param Tracer $tracer
- */
- private function initializeGlobalTracer(Tracer $tracer)
- {
- GlobalTracer::set($tracer);
- $this->logger->debug('OpenTracing\GlobalTracer initialized to ' . $tracer->getServiceName());
- }
-
- /**
- * @return bool
- */
- private function getLogging(): bool
- {
- return (bool)($this->config['logging'] ?? false);
- }
-
- /**
- * @return ReporterInterface
- */
- private function getReporter(): ReporterInterface
- {
- switch ($this->config["dispatch_mode"]) {
- case self::JAEGER_OVER_BINARY_UDP:
- $reporter = (new JaegerReporterFactory($this))->createReporter();
- break;
- case self::ZIPKIN_OVER_COMPACT_UDP:
- $reporter = (new ZipkinReporterFactory($this))->createReporter();
- break;
- case self::JAEGER_OVER_BINARY_HTTP:
- $reporter = (new JaegerHttpReporterFactory($this))->createReporter();
- break;
- default:
- throw new \RuntimeException(
- sprintf(
- "Unsupported `dispatch_mode` value: %s. Allowed values are: %s",
- $this->config["dispatch_mode"],
- implode(", ", Config::getAvailableDispatchModes())
- )
- );
- }
-
- if ($this->getLogging()) {
- $reporter = new CompositeReporter($reporter, new LoggingReporter($this->logger));
- }
-
- return $reporter;
- }
-
- /**
- * @return SamplerInterface
- * @throws \Psr\Cache\InvalidArgumentException
- * @throws Exception
- */
- private function getSampler(): SamplerInterface
- {
- $samplerConfig = $this->config['sampler'] ?? [];
- $samplerType = $samplerConfig['type'] ?? null;
- $samplerParam = $samplerConfig['param'] ?? null;
-
- if ($samplerType === null || $samplerType === SAMPLER_TYPE_REMOTE) {
- // todo: implement remote sampling
- return new ProbabilisticSampler((float)$samplerParam);
- } elseif ($samplerType === SAMPLER_TYPE_CONST) {
- return new ConstSampler($samplerParam ?? false);
- } elseif ($samplerType === SAMPLER_TYPE_PROBABILISTIC) {
- return new ProbabilisticSampler((float)$samplerParam);
- } elseif ($samplerType === SAMPLER_TYPE_RATE_LIMITING) {
- if (!$this->cache) {
- throw new Exception('You cannot use RateLimitingSampler without cache component');
- }
- $cacheConfig = $samplerConfig['cache'] ?? [];
- return new RateLimitingSampler(
- $samplerParam ?? 0,
- new RateLimiter(
- $this->cache,
- $cacheConfig['currentBalanceKey'] ?? 'rate.currentBalance',
- $cacheConfig['lastTickKey'] ?? 'rate.lastTick'
- )
- );
- }
- throw new Exception('Unknown sampler type ' . $samplerType);
- }
-
- /**
- * The UDP max buffer length.
- *
- * @return int
- */
- public function getMaxBufferLength(): int
- {
- return (int)($this->config['max_buffer_length'] ?? 64000);
- }
-
- /**
- * @return string
- */
- public function getLocalAgentReportingHost(): string
- {
- return $this->getLocalAgentGroup()['reporting_host'] ?? DEFAULT_REPORTING_HOST;
- }
-
- /**
- * @return int
- */
- public function getLocalAgentReportingPort(): int
- {
- $port = $this->getLocalAgentGroup()['reporting_port'] ?? null;
- if (empty($this->getLocalAgentGroup()['reporting_port'])) {
- switch ($this->config['dispatch_mode']) {
- case self::JAEGER_OVER_BINARY_UDP:
- $port = DEFAULT_JAEGER_UDP_BINARY_REPORTING_PORT;
- break;
- case self::JAEGER_OVER_BINARY_HTTP:
- $port = DEFAULT_JAEGER_HTTP_BINARY_REPORTING_PORT;
- break;
- default:
- $port = DEFAULT_ZIPKIN_UDP_COMPACT_REPORTING_PORT;
- }
- }
- return (int)$port;
- }
-
- /**
- * @return array
- */
- private function getLocalAgentGroup(): array
- {
- return $this->config['local_agent'] ?? [];
- }
-
- /**
- * @return string
- */
- private function getTraceIdHeader(): string
- {
- return $this->config['trace_id_header'] ?? TRACE_ID_HEADER;
- }
-
- /**
- * @return string
- */
- private function getBaggageHeaderPrefix(): string
- {
- return $this->config['baggage_header_prefix'] ?? BAGGAGE_HEADER_PREFIX;
- }
-
- /**
- * @return string
- */
- private function getDebugIdHeaderKey(): string
- {
- return $this->config['debug_id_header_key'] ?? DEBUG_ID_HEADER_KEY;
- }
-
- /**
- * Get a list of user-defined tags to be added to each span created by the tracer initialized by this config.
- * @return string[]
- */
- private function getConfiguredTags(): array
- {
- return $this->config['tags'] ?? [];
- }
-
- /**
- * Whether to follow the Zipkin model of using one span per RPC,
- * as opposed to the model of using separate spans on the RPC client and server.
- * Defaults to true.
- *
- * @return bool
- */
- private function shouldUseOneSpanPerRpc(): bool
- {
- return $this->config['one_span_per_rpc'] ?? true;
- }
-
- public function ipProtocolVersion(): string
- {
- return $this->config[self::IP_VERSION] ?? self::IPV4;
- }
-
- /**
- * Sets values from env vars into config props, unless ones has been already set.
- */
- private function setConfigFromEnv()
- {
- // general
- if (isset($_ENV['JAEGER_SERVICE_NAME']) && !isset($this->config['service_name'])) {
- $this->config['service_name'] = $_ENV['JAEGER_SERVICE_NAME'];
- }
-
- if (isset($_ENV['JAEGER_TAGS']) && !isset($this->config["tags"])) {
- $this->config['tags'] = $_ENV['JAEGER_TAGS'];
- }
-
- if (isset($_ENV['JAEGER_DISPATCH_MODE']) && !isset($this->config['dispatch_mode'])) {
- $this->config['dispatch_mode'] = $_ENV['JAEGER_DISPATCH_MODE'];
- }
-
- // reporting
- if (isset($_ENV['JAEGER_AGENT_HOST']) && !isset($this->config['local_agent']['reporting_host'])) {
- $this->config['local_agent']['reporting_host'] = $_ENV['JAEGER_AGENT_HOST'];
- }
-
- if (isset($_ENV['JAEGER_AGENT_PORT']) && !isset($this->config['local_agent']['reporting_port'])) {
- $this->config['local_agent']['reporting_port'] = intval($_ENV['JAEGER_AGENT_PORT']);
- }
-
- if (isset($_ENV['JAEGER_REPORTER_LOG_SPANS']) && !isset($this->config['logging'])) {
- $this->config['logging'] = filter_var($_ENV['JAEGER_REPORTER_LOG_SPANS'], FILTER_VALIDATE_BOOLEAN);
- }
-
- if (isset($_ENV['JAEGER_REPORTER_MAX_QUEUE_SIZE']) && !isset($this->config['max_buffer_length'])) {
- $this->config['max_buffer_length'] = intval($_ENV['JAEGER_REPORTER_MAX_QUEUE_SIZE']);
- }
-
- // sampling
- if (isset($_ENV['JAEGER_SAMPLER_TYPE']) && !isset($this->config['sampler']['type'])) {
- $this->config['sampler']['type'] = $_ENV['JAEGER_SAMPLER_TYPE'];
- }
-
- if (isset($_ENV['JAEGER_SAMPLER_PARAM']) && !isset($this->config['sampler']['param'])) {
- $this->config['sampler']['param'] = $_ENV['JAEGER_SAMPLER_PARAM'];
- }
-
- if (isset($_ENV['IP_VERSION']) && !isset($this->config[Config::IP_VERSION])) {
- $this->config[Config::IP_VERSION] = $_ENV['IP_VERSION'];
- }
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php
deleted file mode 100644
index 1e4be65f5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-// Max number of bits to use when generating random ID
-const MAX_ID_BITS = 64;
-
-// How often remotely controller sampler polls for sampling strategy
-const DEFAULT_SAMPLING_INTERVAL = 60;
-
-// How often remote reporter does a preemptive flush of its buffers
-const DEFAULT_FLUSH_INTERVAL = 1;
-
-// Name of the HTTP header used to encode trace ID
-const TRACE_ID_HEADER = 'uber-trace-id';
-
-// Prefix for HTTP headers used to record baggage items
-const BAGGAGE_HEADER_PREFIX = 'uberctx-';
-
-// The name of HTTP header or a TextMap carrier key which, if found in the
-// carrier, forces the trace to be sampled as "debug" trace. The value of the
-// header is recorded as the tag on the # root span, so that the trace can
-// be found in the UI using this value as a correlation ID.
-const DEBUG_ID_HEADER_KEY = 'jaeger-debug-id';
-
-const JAEGER_CLIENT_VERSION = 'PHP-' . PHP_VERSION;
-
-// Tracer-scoped tag that tells the version of Jaeger client library
-const JAEGER_VERSION_TAG_KEY = 'jaeger.version';
-
-// Tracer-scoped tag that contains the hostname
-const JAEGER_HOSTNAME_TAG_KEY = 'jaeger.hostname';
-
-const SAMPLER_TYPE_TAG_KEY = 'sampler.type';
-
-const SAMPLER_PARAM_TAG_KEY = 'sampler.param';
-
-const DEFAULT_SAMPLING_PROBABILITY = 0.001;
-
-const DEFAULT_LOWER_BOUND = 1.0 / (10.0 * 60.0); # sample once every 10 minutes
-
-const DEFAULT_MAX_OPERATIONS = 2000;
-
-const STRATEGIES_STR = 'perOperationStrategies';
-
-const OPERATION_STR = 'operation';
-
-const DEFAULT_LOWER_BOUND_STR = 'defaultLowerBoundTracesPerSecond';
-
-const PROBABILISTIC_SAMPLING_STR = 'probabilisticSampling';
-
-const SAMPLING_RATE_STR = 'samplingRate';
-
-const DEFAULT_SAMPLING_PROBABILITY_STR = 'defaultSamplingProbability';
-
-const OPERATION_SAMPLING_STR = 'operationSampling';
-
-const MAX_TRACES_PER_SECOND_STR = 'maxTracesPerSecond';
-
-const RATE_LIMITING_SAMPLING_STR = 'rateLimitingSampling';
-
-const STRATEGY_TYPE_STR = 'strategyType';
-
-// the type of sampler that always makes the same decision.
-const SAMPLER_TYPE_CONST = 'const';
-
-// the type of sampler that polls Jaeger agent for sampling strategy.
-const SAMPLER_TYPE_REMOTE = 'remote';
-
-// the type of sampler that samples traces with a certain fixed probability.
-const SAMPLER_TYPE_PROBABILISTIC = 'probabilistic';
-
-// the type of sampler that samples only up to a fixed number
-// of traces per second.
-// noinspection SpellCheckingInspection
-const SAMPLER_TYPE_RATE_LIMITING = 'ratelimiting';
-
-// the type of sampler that samples only up to a fixed number
-// of traces per second.
-// noinspection SpellCheckingInspection
-const SAMPLER_TYPE_LOWER_BOUND = 'lowerbound';
-
-const DEFAULT_REPORTING_HOST = 'localhost';
-
-/** @deprecated */
-const DEFAULT_REPORTING_PORT = 5775;
-
-const DEFAULT_ZIPKIN_UDP_COMPACT_REPORTING_PORT = 5775;
-const DEFAULT_JAEGER_UDP_BINARY_REPORTING_PORT = 6832;
-const DEFAULT_JAEGER_HTTP_BINARY_REPORTING_PORT = 14268;
-
-const DEFAULT_SAMPLING_PORT = 5778;
-
-const LOCAL_AGENT_DEFAULT_ENABLED = true;
-
-const ZIPKIN_SPAN_FORMAT = 'zipkin-span-format';
-
-const SAMPLED_FLAG = 0x01;
-
-const DEBUG_FLAG = 0x02;
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php
deleted file mode 100644
index da5871904..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-
-namespace Jaeger\Mapper;
-
-use Jaeger\Span;
-use Jaeger\Thrift\Agent\Zipkin\AnnotationType;
-use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation;
-use Jaeger\Thrift\Log;
-use Jaeger\Thrift\Span as JaegerThriftSpan;
-use Jaeger\Thrift\Tag;
-use Jaeger\Thrift\TagType;
-use const OpenTracing\Tags\COMPONENT;
-use const OpenTracing\Tags\PEER_HOST_IPV4;
-use const OpenTracing\Tags\PEER_PORT;
-use const OpenTracing\Tags\PEER_SERVICE;
-use const OpenTracing\Tags\SPAN_KIND;
-
-class SpanToJaegerMapper
-{
- private $specialSpanTags = ["jaeger.hostname", "jaeger.version"];
-
- private $processTagsPrefix = "process.";
-
- /**
- * @return string[]
- */
- public function getSpecialSpanTags(): array
- {
- return $this->specialSpanTags;
- }
-
- /**
- * @return string
- */
- public function getProcessTagsPrefix(): string
- {
- return $this->processTagsPrefix;
- }
-
- public function mapSpanToJaeger(Span $span) : JaegerThriftSpan
- {
- $timestamp = $span->getStartTime();
- $duration = $span->getEndTime() - $span->getStartTime();
-
- /** @var Tag[] $tags */
- $tags = [];
-
- $tags[] = new Tag([
- "key" => COMPONENT,
- "vType" => TagType::STRING,
- "vStr" => $span->getComponent() ?? $span->getTracer()->getServiceName(),
- ]);
-
- // Handle special tags
- $peerService = $span->peer['service_name'] ?? null;
- if ($peerService !== null) {
- $tags[] = new Tag([
- "key" => PEER_SERVICE,
- "vType" => TagType::STRING,
- "vStr" => $peerService,
- ]);
- }
-
- $peerHostIpv4 = $span->peer['ipv4'] ?? null;
- if ($peerHostIpv4 !== null) {
- $tags[] = new Tag([
- "key" => PEER_HOST_IPV4,
- "vType" => TagType::STRING,
- "vStr" => $peerHostIpv4,
- ]);
- }
-
- $peerPort = $span->peer['port'] ?? null;
- if ($peerPort !== null) {
- $tags[] = new Tag([
- "key" => PEER_PORT,
- "vType" => TagType::LONG,
- "vLong" => $peerPort,
- ]);
- }
-
- $spanKind = $span->getKind();
- if ($spanKind !== null) {
- $tags[] = new Tag([
- "key" => SPAN_KIND,
- "vType" => TagType::STRING,
- "vStr" => $spanKind,
- ]);
- }
-
- /** @var BinaryAnnotation[] $binaryAnnotationTags */
- $binaryAnnotationTags = $span->getTags();
- foreach ($binaryAnnotationTags as $binaryAnnotationTag) {
- if (in_array($binaryAnnotationTag->key, $this->specialSpanTags, true)) {
- continue ;
- }
-
- if (strpos($binaryAnnotationTag->key, $this->processTagsPrefix) === 0) {
- continue;
- }
-
- $type = "";
- $vkey = "";
- switch ($binaryAnnotationTag->annotation_type) {
- case AnnotationType::BOOL:
- $type = TagType::BOOL;
- $vkey = "vBool";
- break;
- case AnnotationType::BYTES:
- $type = TagType::BINARY;
- $vkey = "vBinary";
- break;
- case AnnotationType::DOUBLE:
- $type = TagType::DOUBLE;
- $vkey = "vDouble";
- break;
- case AnnotationType::I16:
- case AnnotationType::I32:
- case AnnotationType::I64:
- $type = TagType::LONG;
- $vkey = "vLong";
- break;
- default:
- $type = TagType::STRING;
- $vkey = "vStr";
- }
-
- $tags[] = new Tag([
- "key" => $binaryAnnotationTag->key,
- "vType" => $type,
- $vkey => $binaryAnnotationTag->value,
- ]);
- }
-
- /** @var Log[] $logs */
- $logs = [];
-
- $spanLogs = $span->getLogs();
-
- foreach ($spanLogs as $spanLog) {
- /** @var Tag $fields */
- $fields = [];
-
- if (!empty($spanLog["fields"])) {
- $fields[] = new Tag([
- "key" => "event",
- "vType" => TagType::STRING,
- "vStr" => json_encode($spanLog["fields"])
- ]);
- }
-
- $logs[] = new Log([
- "timestamp" => $spanLog["timestamp"],
- "fields" => $fields
- ]);
- }
-
- return new JaegerThriftSpan([
- "traceIdLow" => (int)$span->getContext()->getTraceId(),
- "traceIdHigh" => 0,
- "spanId" => (int)$span->getContext()->getSpanId(),
- "parentSpanId" => (int)$span->getContext()->getParentId(),
- "operationName" => $span->getOperationName(),
- "startTime" => $timestamp,
- "duration" => $duration,
- "flags" => (int)$span->isDebug(),
- "tags" => $tags,
- "logs" => $logs
- ]);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php
deleted file mode 100644
index 78533cc76..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Span;
-
-/**
- * CompositeReporter delegates reporting to one or more underlying reporters.
- */
-class CompositeReporter implements ReporterInterface
-{
- /**
- * @var ReporterInterface[]
- */
- private $reporters;
-
- /**
- * CompositeReporter constructor.
- *
- * @param ReporterInterface ...$reporters
- */
- public function __construct(ReporterInterface ...$reporters)
- {
- $this->reporters = $reporters;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span)
- {
- foreach ($this->reporters as $reporter) {
- $reporter->reportSpan($span);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @return void
- */
- public function close()
- {
- foreach ($this->reporters as $reporter) {
- $reporter->close();
- }
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php
deleted file mode 100644
index 8aabe2ee8..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Span;
-
-/**
- * InMemoryReporter stores spans in memory and returns them via getSpans().
- */
-class InMemoryReporter implements ReporterInterface
-{
- /**
- * @var Span[]
- */
- private $spans = [];
-
- /**
- * {@inheritdoc}
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span)
- {
- $this->spans[] = $span;
- }
-
- /**
- * @return Span[]
- */
- public function getSpans(): array
- {
- return $this->spans;
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php
deleted file mode 100644
index 999d69e0a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Sender\SenderInterface;
-use Jaeger\Span;
-
-class JaegerReporter implements ReporterInterface
-{
- /**
- * @var SenderInterface
- */
- private $sender;
-
- /**
- * RemoteReporter constructor.
- *
- * @param SenderInterface $sender
- */
- public function __construct(SenderInterface $sender)
- {
- $this->sender = $sender;
- }
-
- public function reportSpan(Span $span)
- {
- $this->sender->append($span);
- }
-
- public function close()
- {
- $this->sender->flush();
- $this->sender->close();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php
deleted file mode 100644
index 264ea94c5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Span;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-
-/**
- * LoggingReporter logs all spans.
- */
-class LoggingReporter implements ReporterInterface
-{
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * LoggingReporter constructor.
- *
- * @param LoggerInterface|null $logger
- */
- public function __construct(LoggerInterface $logger = null)
- {
- $this->logger = $logger ?? new NullLogger();
- }
-
- /**
- * {@inheritdoc}
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span)
- {
- $this->logger->debug('Reporting span ' . $span->getOperationName());
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php
deleted file mode 100644
index 84a953bef..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Span;
-
-/**
- * NullReporter ignores all spans.
- */
-class NullReporter implements ReporterInterface
-{
- /**
- * {@inheritdoc}
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span)
- {
- // nothing to do
- }
-
- /**
- * {@inheritdoc}
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php
deleted file mode 100644
index 9b78aa3d1..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Sender\UdpSender;
-use Jaeger\Span;
-
-class RemoteReporter implements ReporterInterface
-{
- /**
- * @var UdpSender
- */
- private $transport;
-
- /**
- * RemoteReporter constructor.
- *
- * @param UdpSender $transport
- */
- public function __construct(UdpSender $transport)
- {
- $this->transport = $transport;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span)
- {
- $this->transport->append($span);
- }
-
- /**
- * {@inheritdoc}
- *
- * @return void
- */
- public function close()
- {
- $this->transport->flush();
- $this->transport->close();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php
deleted file mode 100644
index fea8a8713..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-namespace Jaeger\Reporter;
-
-use Jaeger\Span;
-
-/**
- * Uses to report finished span to something that collects those spans.
- *
- * @package Jaeger\Reporter
- */
-interface ReporterInterface
-{
- /**
- * Report finished span.
- *
- * @param Span $span
- * @return void
- */
- public function reportSpan(Span $span);
-
- /**
- * Release any resources used by the reporter and flushes/sends the data.
- *
- * @return void
- */
- public function close();
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php
deleted file mode 100644
index e34adc5dc..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-namespace Jaeger\ReporterFactory;
-
-use Jaeger\Config;
-use Thrift\Transport\TTransport;
-
-abstract class AbstractReporterFactory implements ReporterFactoryInterface
-{
- /**
- * @var Config
- */
- protected $config;
-
- /**
- * AbstractReporterFactory constructor.
- * @param Config $config
- */
- public function __construct($config)
- {
- $this->config = $config;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php
deleted file mode 100644
index 038e81161..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-namespace Jaeger\ReporterFactory;
-
-use Jaeger\AgentClient\HttpAgentClient;
-use Jaeger\Reporter\JaegerReporter;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sender\JaegerSender;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\THttpClient;
-
-class JaegerHttpReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface
-{
- public function createReporter() : ReporterInterface
- {
- $transport = new THttpClient(
- $this->config->getLocalAgentReportingHost(),
- $this->config->getLocalAgentReportingPort(),
- "/api/traces"
- );
-
- try {
- $transport->open();
- } catch (TTransportException $e) {
- $this->config->getLogger()->warning($e->getMessage());
- }
- $protocol = new TBinaryProtocol($transport);
- $client = new HttpAgentClient($protocol);
- $this->config->getLogger()->debug('Initializing HTTP Jaeger Tracer with Jaeger.Thrift over Binary protocol');
- $sender = new JaegerSender($client, $this->config->getLogger());
- $sender->setMaxBufferLength($this->config->getMaxBufferLength());
- return new JaegerReporter($sender);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php
deleted file mode 100644
index 9865884b5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-namespace Jaeger\ReporterFactory;
-
-use Jaeger\AgentClient\HttpAgentClient;
-use Jaeger\Reporter\JaegerReporter;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sender\JaegerSender;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\ThriftUdpTransport;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-
-class JaegerReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface
-{
- public function createReporter() : ReporterInterface
- {
- $udp = new ThriftUdpTransport(
- $this->config->getLocalAgentReportingHost(),
- $this->config->getLocalAgentReportingPort(),
- $this->config->getLogger(),
- $this->config
- );
-
- $transport = new TBufferedTransport(
- $udp,
- $this->config->getMaxBufferLength(),
- $this->config->getMaxBufferLength()
- );
-
- try {
- $transport->open();
- } catch (TTransportException $e) {
- $this->config->getLogger()->warning($e->getMessage());
- }
- $protocol = new TBinaryProtocol($transport);
- $client = new AgentClient($protocol);
- $this->config->getLogger()->debug('Initializing UDP Jaeger Tracer with Jaeger.Thrift over Binary protocol');
- $sender = new JaegerSender($client, $this->config->getLogger());
- $sender->setMaxBufferLength($this->config->getMaxBufferLength());
- return new JaegerReporter($sender);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php
deleted file mode 100644
index 4bfd3204f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace Jaeger\ReporterFactory;
-
-use Jaeger\Reporter\ReporterInterface;
-
-interface ReporterFactoryInterface
-{
- public function createReporter() : ReporterInterface;
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php
deleted file mode 100644
index 736977b4d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-namespace Jaeger\ReporterFactory;
-
-use Jaeger\Reporter\JaegerReporter;
-use Jaeger\Reporter\RemoteReporter;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sender\JaegerSender;
-use Jaeger\Sender\UdpSender;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\ThriftUdpTransport;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Protocol\TCompactProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TTransport;
-
-class ZipkinReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface
-{
- public function createReporter() : ReporterInterface
- {
- $udp = new ThriftUdpTransport(
- $this->config->getLocalAgentReportingHost(),
- $this->config->getLocalAgentReportingPort(),
- $this->config->getLogger(),
- $this->config
- );
-
- $transport = new TBufferedTransport(
- $udp,
- $this->config->getMaxBufferLength(),
- $this->config->getMaxBufferLength()
- );
-
- try {
- $transport->open();
- } catch (TTransportException $e) {
- $this->config->getLogger()->warning($e->getMessage());
- }
- $protocol = new TCompactProtocol($transport);
- $client = new AgentClient($protocol);
- $this->config->getLogger()->debug('Initializing UDP Jaeger Tracer with Zipkin.Thrift over Compact protocol');
- $sender = new UdpSender($client, $this->config->getMaxBufferLength(), $this->config->getLogger());
- return new RemoteReporter($sender);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
deleted file mode 100644
index 7c6ba3d62..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-namespace Jaeger\Sampler;
-
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_CONST;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-/**
- * ConstSampler always returns the same decision.
- *
- * @package Jaeger\Sampler
- */
-class ConstSampler implements SamplerInterface
-{
- /**
- * Whether or not the new trace should be sampled.
- *
- * @var bool
- */
- private $decision;
-
- /**
- * A list of the sampler tags.
- *
- * @var array
- */
- private $tags = [];
-
- /**
- * ConstSampler constructor.
- *
- * @param bool $decision
- */
- public function __construct(bool $decision = true)
- {
- $this->tags = [
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_CONST,
- SAMPLER_PARAM_TAG_KEY => $decision,
- ];
-
- $this->decision = $decision;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $traceId The traceId on the span.
- * @param string $operation The operation name set on the span.
- * @return array
- */
- public function isSampled(string $traceId, string $operation = ''): array
- {
- return [$this->decision, $this->tags];
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php
deleted file mode 100644
index cb265d01e..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-namespace Jaeger\Sampler;
-
-use OutOfBoundsException;
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_PROBABILISTIC;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-/**
- * A sampler that randomly samples a certain percentage of traces specified
- * by the samplingRate, in the range between 0.0 and 1.0.
- *
- * @package Jaeger\Sampler
- */
-class ProbabilisticSampler implements SamplerInterface
-{
- /**
- * The sampling rate rate between 0.0 and 1.0.
- *
- * @var float
- */
- private $rate;
-
- /**
- * A list of the sampler tags.
- *
- * @var array
- */
- private $tags = [];
-
- /**
- * The boundary of the sample sampling rate.
- *
- * @var float
- */
- private $boundary;
-
- /**
- * ProbabilisticSampler constructor.
- *
- * @param float $rate
- * @throws OutOfBoundsException
- */
- public function __construct(float $rate)
- {
- $this->tags = [
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_PROBABILISTIC,
- SAMPLER_PARAM_TAG_KEY => $rate,
- ];
-
- if ($rate < 0.0 || $rate > 1.0) {
- throw new OutOfBoundsException('Sampling rate must be between 0.0 and 1.0.');
- }
-
- $this->rate = $rate;
- if ($rate < 0.5) {
- $this->boundary = (int)($rate * PHP_INT_MAX);
- } else {
- // more precise calculation due to int and float having different precision near PHP_INT_MAX
- $this->boundary = PHP_INT_MAX - (int)((1 - $rate) * PHP_INT_MAX);
- }
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $traceId The traceId on the span.
- * @param string $operation The operation name set on the span.
- * @return array
- */
- public function isSampled(string $traceId, string $operation = ''): array
- {
- return [($traceId < $this->boundary), $this->tags];
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php
deleted file mode 100644
index d0ea0f180..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-namespace Jaeger\Sampler;
-
-use Jaeger\Util\RateLimiter;
-
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_RATE_LIMITING;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-class RateLimitingSampler implements SamplerInterface
-{
- /**
- * @var RateLimiter
- */
- private $rateLimiter;
-
- /**
- * A list of the sampler tags.
- *
- * @var array
- */
- private $tags = [];
-
- public function __construct($maxTracesPerSecond, RateLimiter $rateLimiter)
- {
- $this->tags = [
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_RATE_LIMITING,
- SAMPLER_PARAM_TAG_KEY => $maxTracesPerSecond,
- ];
-
- $maxTracesPerNanosecond = $maxTracesPerSecond / 1000000000.0;
- $this->rateLimiter = $rateLimiter;
- $this->rateLimiter->initialize($maxTracesPerNanosecond, $maxTracesPerSecond > 1.0 ? 1.0 : $maxTracesPerSecond);
- }
-
- /**
- * Whether or not the new trace should be sampled.
- *
- * Implementations should return an array in the format [$decision, $tags].
- *
- * @param string $traceId The traceId on the span.
- * @param string $operation The operation name set on the span.
- * @return array
- */
- public function isSampled(string $traceId = '', string $operation = '')
- {
- return [$this->rateLimiter->checkCredit(1.0), $this->tags];
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php
deleted file mode 100644
index b6d44e783..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace Jaeger\Sampler;
-
-/**
- * Sampler is responsible for deciding if a new trace should be sampled and captured for storage.
- *
- * @package Jaeger\Sampler
- */
-interface SamplerInterface
-{
- /**
- * Whether or not the new trace should be sampled.
- *
- * Implementations should return an array in the format [$decision, $tags].
- *
- * @param string $traceId The traceId on the span.
- * @param string $operation The operation name set on the span.
- * @return array
- */
- public function isSampled(string $traceId, string $operation);
-
- /**
- * Release any resources used by the sampler.
- *
- * @return void
- */
- public function close();
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php
deleted file mode 100644
index 86511bae0..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use OpenTracing\Scope as OTScope;
-use OpenTracing\Span as OTSpan;
-
-/**
- * {@inheritdoc}
- */
-class Scope implements OTScope
-{
- /**
- * @var ScopeManager
- */
- private $scopeManager;
-
- /**
- * @var OTSpan
- */
- private $wrapped;
-
- /**
- * @var OTScope|null
- */
- private $toRestore;
-
- /**
- * @var bool
- */
- private $finishSpanOnClose;
-
- /**
- * Scope constructor.
- * @param ScopeManager $scopeManager
- * @param OTSpan $wrapped
- * @param bool $finishSpanOnClose
- */
- public function __construct(ScopeManager $scopeManager, OTSpan $wrapped, bool $finishSpanOnClose)
- {
- $this->scopeManager = $scopeManager;
- $this->wrapped = $wrapped;
- $this->finishSpanOnClose = $finishSpanOnClose;
- $this->toRestore = $scopeManager->getActive();
- }
-
- /**
- * {@inheritdoc}
- */
- public function close(): void
- {
- if ($this->scopeManager->getActive() !== $this) {
- // This shouldn't happen if users call methods in expected order
- return;
- }
-
- if ($this->finishSpanOnClose) {
- $this->wrapped->finish();
- }
-
- $this->scopeManager->setActive($this->toRestore);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getSpan(): OTSpan
- {
- return $this->wrapped;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php
deleted file mode 100644
index eb5c27676..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use OpenTracing\ScopeManager as OTScopeManager;
-use OpenTracing\Span as OTSpan;
-use OpenTracing\Scope as OTScope;
-
-/**
- * {@inheritdoc}
- */
-class ScopeManager implements OTScopeManager
-{
- /**
- * @var OTScope
- */
- private $active;
-
- /**
- * {@inheritdoc}
- */
- public function activate(OTSpan $span, bool $finishSpanOnClose = self::DEFAULT_FINISH_SPAN_ON_CLOSE): OTScope
- {
- $this->active = new Scope($this, $span, $finishSpanOnClose);
-
- return $this->active;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getActive(): ?OTScope
- {
- return $this->active;
- }
-
- /**
- * Sets the scope as active.
- * @param OTScope|null $scope
- */
- public function setActive(OTScope $scope = null)
- {
- $this->active = $scope;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php
deleted file mode 100644
index dfce510b8..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php
+++ /dev/null
@@ -1,236 +0,0 @@
-<?php
-
-
-namespace Jaeger\Sender;
-
-use Jaeger\Mapper\SpanToJaegerMapper;
-use Jaeger\Span as JaegerSpan;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\Thrift\Agent\AgentIf;
-use Jaeger\Thrift\Batch;
-use Jaeger\Thrift\Process;
-use Jaeger\Thrift\Span as JaegerThriftSpan;
-use Jaeger\Thrift\Tag;
-use Jaeger\Thrift\TagType;
-use Jaeger\Tracer;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Protocol\TCompactProtocol;
-use Thrift\Transport\TMemoryBuffer;
-use const Jaeger\JAEGER_HOSTNAME_TAG_KEY;
-
-class JaegerSender implements SenderInterface
-{
- /**
- * @var JaegerSpan[]
- */
- private $spans = [];
-
- /**
- * @var AgentIf
- */
- private $agentClient;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @var Tracer
- */
- private $tracer;
-
- /**
- * @var SpanToJaegerMapper
- */
- private $mapper;
-
- /**
- * @var int
- */
- private $jaegerBatchOverheadLength = 512;
-
- /**
- * The maximum length of the thrift-objects for a jaeger-batch.
- *
- * @var int
- */
- private $maxBufferLength = 64000;
-
- /**
- * @param AgentIf $agentClient
- * @param LoggerInterface|null $logger
- * @param SpanToJaegerMapper|null $mapper
- */
- public function __construct(
- AgentIf $agentClient,
- LoggerInterface $logger = null,
- SpanToJaegerMapper $mapper = null
- ) {
- $this->agentClient = $agentClient;
- $this->logger = $logger ?? new NullLogger();
- $this->mapper = $mapper ?? new SpanToJaegerMapper();
- }
-
-
- public function flush(): int
- {
- $count = count($this->spans);
- if ($count === 0) {
- return 0;
- }
-
- $jaegerThriftSpans = $this->makeJaegerBatch($this->spans);
-
- try {
- $this->send($jaegerThriftSpans);
- } catch (\Exception $e) {
- $this->logger->warning($e->getMessage());
- }
-
- $this->spans = [];
-
- return $count;
- }
-
- public function setMaxBufferLength($maxBufferLength)
- {
- $this->maxBufferLength = $maxBufferLength;
- }
-
- /**
- * @param JaegerSpan[] $spans
- * @return array
- */
- private function makeJaegerBatch(array $spans) : array
- {
- /** @var JaegerThriftSpan[] $jaegerSpans */
- $jaegerSpans = [];
-
- foreach ($spans as $span) {
- if (empty($this->tracer)) {
- $this->tracer = $span->getTracer();
- }
-
- $jaegerSpans[] = $this->mapper->mapSpanToJaeger($span);
- }
-
- return $jaegerSpans;
- }
-
- /**
- * @param JaegerThriftSpan[] $spans
- */
- private function send(array $spans)
- {
- if (empty($this->tracer)) {
- return ;
- }
-
- $chunks = $this->chunkSplit($spans);
- foreach ($chunks as $chunk) {
- /** @var JaegerThriftSpan[] $chunk */
- $this->emitJaegerBatch($chunk);
- }
- }
-
- /**
- * @param JaegerThriftSpan $span
- */
- private function getBufferLength($span)
- {
- $memoryBuffer = new TMemoryBuffer();
- $span->write(new TBinaryProtocol($memoryBuffer));
- return $memoryBuffer->available();
- }
-
- private function chunkSplit(array $spans): array
- {
- $actualBufferSize = $this->jaegerBatchOverheadLength;
- $chunkId = 0;
- $chunks = [];
-
- foreach ($spans as $span) {
- $spanBufferLength = $this->getBufferLength($span);
- if (!empty($chunks[$chunkId]) && ($actualBufferSize + $spanBufferLength) > $this->maxBufferLength) {
- // point to next chunk
- ++$chunkId;
-
- // reset buffer size
- $actualBufferSize = $this->jaegerBatchOverheadLength;
- }
-
- if (!isset($chunks[$chunkId])) {
- $chunks[$chunkId] = [];
- }
-
- $chunks[$chunkId][] = $span;
- $actualBufferSize += $spanBufferLength;
- }
-
- return $chunks;
- }
-
- protected function emitJaegerBatch(array $spans)
- {
- /** @var Tag[] $tags */
- $tags = [];
-
- foreach ($this->tracer->getTags() as $k => $v) {
- if (!in_array($k, $this->mapper->getSpecialSpanTags())) {
- if (strpos($k, $this->mapper->getProcessTagsPrefix()) !== 0) {
- continue ;
- }
-
- $quoted = preg_quote($this->mapper->getProcessTagsPrefix());
- $k = preg_replace(sprintf('/^%s/', $quoted), '', $k);
- }
-
- if ($k === JAEGER_HOSTNAME_TAG_KEY) {
- $k = "hostname";
- }
-
- $tags[] = new Tag([
- "key" => $k,
- "vType" => TagType::STRING,
- "vStr" => $v
- ]);
- }
-
- $tags[] = new Tag([
- "key" => "format",
- "vType" => TagType::STRING,
- "vStr" => "jaeger.thrift"
- ]);
-
- $tags[] = new Tag([
- "key" => "ip",
- "vType" => TagType::STRING,
- "vStr" => $this->tracer->getIpAddress()
- ]);
-
- $batch = new Batch([
- "spans" => $spans,
- "process" => new Process([
- "serviceName" => $this->tracer->getServiceName(),
- "tags" => $tags
- ])
- ]);
-
- $this->agentClient->emitBatch($batch);
- }
-
- /**
- * @param JaegerSpan $span
- */
- public function append(JaegerSpan $span)
- {
- $this->spans[] = $span;
- }
-
- public function close()
- {
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php
deleted file mode 100644
index 24dc4fbfa..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-namespace Jaeger\Sender;
-
-use Jaeger\Span as JaegerSpan;
-
-interface SenderInterface
-{
- public function flush(): int;
- public function append(JaegerSpan $span);
- public function close();
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php
deleted file mode 100644
index ff0e4cf3e..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php
+++ /dev/null
@@ -1,305 +0,0 @@
-<?php
-
-namespace Jaeger\Sender;
-
-use Exception;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\Thrift\Agent\Zipkin\Annotation;
-use Jaeger\Thrift\Agent\Zipkin\AnnotationType;
-use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation;
-use Jaeger\Thrift\Agent\Zipkin\Endpoint;
-use Jaeger\Thrift\Agent\Zipkin\Span as ThriftSpan;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Thrift\Base\TBase;
-use Thrift\Protocol\TCompactProtocol;
-use Thrift\Transport\TMemoryBuffer;
-use Jaeger\Span as JaegerSpan;
-
-use const OpenTracing\Tags\COMPONENT;
-
-class UdpSender
-{
- const CLIENT_ADDR = "ca";
- const SERVER_ADDR = "sa";
-
- /**
- * @var JaegerSpan[]
- */
- private $spans = [];
-
- /**
- * @var AgentClient
- */
- private $client;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * The maximum length of the thrift-objects for a zipkin-batch.
- *
- * @var int
- */
- private $maxBufferLength;
-
- /**
- * The length of the zipkin-batch overhead.
- *
- * @var int
- */
- private $zipkinBatchOverheadLength = 30;
-
- /**
- * UdpSender constructor.
- *
- * @param AgentClient $client
- * @param int $maxBufferLength
- * @param LoggerInterface|null $logger
- */
- public function __construct(
- AgentClient $client,
- int $maxBufferLength,
- LoggerInterface $logger = null
- ) {
- $this->client = $client;
- $this->maxBufferLength = $maxBufferLength;
- $this->logger = $logger ?? new NullLogger();
- }
-
- /**
- * @param JaegerSpan $span
- */
- public function append(JaegerSpan $span)
- {
- $this->spans[] = $span;
- }
-
- /**
- * @return int the number of flushed spans
- */
- public function flush(): int
- {
- $count = count($this->spans);
- if ($count === 0) {
- return 0;
- }
-
- $zipkinSpans = $this->makeZipkinBatch($this->spans);
-
- try {
- $this->send($zipkinSpans);
- } catch (Exception $e) {
- $this->logger->warning($e->getMessage());
- }
-
- $this->spans = [];
-
- return $count;
- }
-
- public function close()
- {
- }
-
- /**
- * Emits the thrift-objects.
- *
- * @param array|ThriftSpan[]|TBase[] $thrifts
- */
- private function send(array $thrifts)
- {
- foreach ($this->chunkSplit($thrifts) as $chunk) {
- /* @var $chunk ThriftSpan[] */
- $this->client->emitZipkinBatch($chunk);
- }
- }
-
- /**
- * @param JaegerSpan[] $spans
- * @return ThriftSpan[]
- */
- private function makeZipkinBatch(array $spans): array
- {
- /** @var ThriftSpan[] */
- $zipkinSpans = [];
-
- foreach ($spans as $span) {
- /** @var JaegerSpan $span */
-
- $endpoint = $this->makeEndpoint(
- $span->getTracer()->getIpAddress(),
- 0, // span.port,
- $span->getTracer()->getServiceName()
- );
-
- $timestamp = $span->getStartTime();
- $duration = $span->getEndTime() - $span->getStartTime();
-
- $this->addZipkinAnnotations($span, $endpoint);
-
- $zipkinSpan = new ThriftSpan([
- 'name' => $span->getOperationName(),
- 'id' => $span->getContext()->getSpanId(),
- 'parent_id' => $span->getContext()->getParentId() ?? null,
- 'trace_id' => $span->getContext()->getTraceId(),
- 'annotations' => $this->createAnnotations($span, $endpoint),
- 'binary_annotations' => $span->getTags(),
- 'debug' => $span->isDebug(),
- 'timestamp' => $timestamp,
- 'duration' => $duration,
- ]);
-
- $zipkinSpans[] = $zipkinSpan;
- }
-
- return $zipkinSpans;
- }
-
- private function addZipkinAnnotations(JaegerSpan $span, Endpoint $endpoint)
- {
- if ($span->isRpc() && $span->peer) {
- $isClient = $span->isRpcClient();
-
- $host = $this->makeEndpoint(
- $span->peer['ipv4'] ?? 0,
- $span->peer['port'] ?? 0,
- $span->peer['service_name'] ?? ''
- );
-
- $key = ($isClient) ? self::SERVER_ADDR : self::CLIENT_ADDR;
-
- $peer = $this->makePeerAddressTag($key, $host);
- $span->tags[$key] = $peer;
- } else {
- $tag = $this->makeLocalComponentTag(
- $span->getComponent() ?? $span->getTracer()->getServiceName(),
- $endpoint
- );
-
- $span->tags[COMPONENT] = $tag;
- }
- }
-
- private function makeLocalComponentTag(string $componentName, Endpoint $endpoint): BinaryAnnotation
- {
- return new BinaryAnnotation([
- 'key' => "lc",
- 'value' => $componentName,
- 'annotation_type' => AnnotationType::STRING,
- 'host' => $endpoint,
- ]);
- }
-
- private function makeEndpoint(string $ipv4, int $port, string $serviceName): Endpoint
- {
- $ipv4 = $this->ipv4ToInt($ipv4);
-
- return new Endpoint([
- 'ipv4' => $ipv4,
- 'port' => $port,
- 'service_name' => $serviceName,
- ]);
- }
-
- private function ipv4ToInt(string $ipv4): int
- {
- if ($ipv4 == 'localhost') {
- $ipv4 = '127.0.0.1';
- } elseif ($ipv4 == '::1') {
- $ipv4 = '127.0.0.1';
- }
-
- $long = ip2long($ipv4);
- if (PHP_INT_SIZE === 8) {
- return $long >> 31 ? $long - (1 << 32) : $long;
- }
- return $long;
- }
-
- // Used for Zipkin binary annotations like CA/SA (client/server address).
- // They are modeled as Boolean type with '0x01' as the value.
- private function makePeerAddressTag(string $key, Endpoint $host): BinaryAnnotation
- {
- return new BinaryAnnotation([
- "key" => $key,
- "value" => '0x01',
- "annotation_type" => AnnotationType::BOOL,
- "host" => $host,
- ]);
- }
-
- /**
- * Splits an array of thrift-objects into several chunks when the buffer limit has been reached.
- *
- * @param array|ThriftSpan[]|TBase[] $thrifts
- *
- * @return array
- */
- private function chunkSplit(array $thrifts): array
- {
- $actualBufferSize = $this->zipkinBatchOverheadLength;
- $chunkId = 0;
- $chunks = [];
-
- foreach ($thrifts as $thrift) {
- $spanBufferLength = $this->getBufferLength($thrift);
-
- if (!empty($chunks[$chunkId]) && ($actualBufferSize + $spanBufferLength) > $this->maxBufferLength) {
- // point to next chunk
- ++$chunkId;
-
- // reset buffer size
- $actualBufferSize = $this->zipkinBatchOverheadLength;
- }
-
- if (!isset($chunks[$chunkId])) {
- $chunks[$chunkId] = [];
- }
-
- $chunks[$chunkId][] = $thrift;
- $actualBufferSize += $spanBufferLength;
- }
-
- return $chunks;
- }
-
- /**
- * Returns the length of a thrift-object.
- *
- * @param ThriftSpan|TBase $thrift
- *
- * @return int
- */
- private function getBufferLength($thrift): int
- {
- $memoryBuffer = new TMemoryBuffer();
-
- $thrift->write(new TCompactProtocol($memoryBuffer));
-
- return $memoryBuffer->available();
- }
-
- /*
- * @param JaegerSpan $span
- * @param Endpoint $endpoint
- *
- * @return array|Annotation[]
- */
- private function createAnnotations(JaegerSpan $span, Endpoint $endpoint): array
- {
- $annotations = [];
-
- foreach ($span->getLogs() as $values) {
- $annotations[] = new Annotation([
- 'timestamp' => $values['timestamp'],
- 'value' => json_encode($values['fields']),
- 'host' => $endpoint,
- ]);
- }
-
- return $annotations;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php
deleted file mode 100644
index abcb07c89..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php
+++ /dev/null
@@ -1,476 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use Jaeger\Thrift\Agent\Zipkin\AnnotationType;
-use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation;
-use OpenTracing\Span as OTSpan;
-use DateTime;
-use DateTimeInterface;
-use OpenTracing\SpanContext as OTSpanContext;
-use const OpenTracing\Tags\COMPONENT;
-use const OpenTracing\Tags\PEER_HOST_IPV4;
-use const OpenTracing\Tags\PEER_PORT;
-use const OpenTracing\Tags\PEER_SERVICE;
-use const OpenTracing\Tags\SPAN_KIND;
-use const OpenTracing\Tags\SPAN_KIND_MESSAGE_BUS_CONSUMER;
-use const OpenTracing\Tags\SPAN_KIND_MESSAGE_BUS_PRODUCER;
-use const OpenTracing\Tags\SPAN_KIND_RPC_CLIENT;
-use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER;
-
-class Span implements OTSpan
-{
- /**
- * @var Tracer
- */
- private $tracer;
-
- /**
- * @var SpanContext
- */
- private $context;
-
- /**
- * @var string
- */
- private $operationName;
-
- /**
- * @var int|float|DateTime|null
- */
- private $startTime;
-
- /**
- * @var int|float|DateTime|null
- */
- private $endTime;
-
- /**
- * SPAN_RPC_CLIENT
- * @var null|string
- */
- private $kind;
-
- /**
- * @var array|null
- */
- public $peer;
-
- /**
- * @var string|null
- */
- private $component;
-
- /**
- * @var array
- */
- private $logs = [];
-
- /**
- * @var BinaryAnnotation[]
- */
- public $tags = [];
-
- /**
- * @var bool
- */
- private $debug = false;
-
- /**
- * Span constructor.
- * @param SpanContext $context
- * @param Tracer $tracer
- * @param string $operationName
- * @param array $tags
- * @param int|float|DateTime|null $startTime
- */
- public function __construct(
- SpanContext $context,
- Tracer $tracer,
- string $operationName,
- array $tags = [],
- $startTime = null
- ) {
- $this->context = $context;
- $this->tracer = $tracer;
-
- $this->operationName = $operationName;
- $this->startTime = $this->microTime($startTime);
- $this->endTime = null;
- $this->kind = null;
- $this->peer = null;
- $this->component = null;
-
- foreach ($tags as $key => $value) {
- $this->setTag($key, $value);
- }
- }
-
- /**
- * Converts time to microtime int
- * - int represents microseconds
- * - float represents seconds
- *
- * @param int|float|DateTime|null $time
- * @return int
- */
- protected function microTime($time): int
- {
- if ($time === null) {
- return $this->timestampMicro();
- }
-
- if ($time instanceof \DateTimeInterface) {
- return (int)round($time->format('U.u') * 1000000, 0);
- }
-
- if (is_int($time)) {
- return $time;
- }
-
- if (is_float($time)) {
- return (int)round($time * 1000000, 0);
- }
-
- throw new \InvalidArgumentException(sprintf(
- 'Time should be one of the types int|float|DateTime|null, got %s.',
- gettype($time)
- ));
- }
-
- /**
- * @return Tracer
- */
- public function getTracer(): Tracer
- {
- return $this->tracer;
- }
-
- /**
- * @return bool
- */
- public function isDebug(): bool
- {
- return $this->debug;
- }
-
- /**
- * @return int
- */
- public function getStartTime(): int
- {
- return $this->startTime;
- }
-
- /**
- * @return int|null
- */
- public function getEndTime()
- {
- return $this->endTime;
- }
-
- /**
- * @return string
- */
- public function getOperationName(): string
- {
- return $this->operationName;
- }
-
- /**
- * @return mixed
- */
- public function getComponent()
- {
- // TODO
- return $this->component;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return SpanContext
- */
- public function getContext(): OTSpanContext
- {
- return $this->context;
- }
-
- /**
- * {@inheritdoc}
- */
- public function finish($finishTime = null, array $logRecords = []): void
- {
- if (!$this->isSampled()) {
- return;
- }
-
- foreach ($logRecords as $logRecord) {
- $this->log($logRecord);
- }
-
- $this->endTime = $this->microTime($finishTime);
- $this->tracer->reportSpan($this);
- }
-
- /**
- * Returns true if the trace should be measured.
- *
- * @return bool
- */
- public function isSampled(): bool
- {
- $context = $this->getContext();
-
- return ($context->getFlags() & SAMPLED_FLAG) == SAMPLED_FLAG;
- }
-
- /**
- * {@inheritdoc}
- */
- public function overwriteOperationName(string $newOperationName): void
- {
- // TODO log warning
- $this->operationName = $newOperationName;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param array $tags
- * @return void
- */
- public function setTags($tags)
- {
- foreach ($tags as $key => $value) {
- $this->setTag($key, $value);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function setTag(string $key, $value): void
- {
- if ($this->isSampled()) {
- $special = self::SPECIAL_TAGS[$key] ?? null;
- $handled = false;
-
- if ($special !== null && is_callable([$this, $special])) {
- $handled = $this->$special($value);
- }
-
- if (!$handled) {
- $tag = $this->makeTag($key, $value);
- $this->tags[$key] = $tag;
- }
- }
- }
-
- const SPECIAL_TAGS = [
- PEER_SERVICE => 'setPeerService',
- PEER_HOST_IPV4 => 'setPeerHostIpv4',
- PEER_PORT => 'setPeerPort',
- SPAN_KIND => 'setSpanKind',
- COMPONENT => 'setComponent',
- ];
-
- /**
- * Sets a low-cardinality identifier of the module, library,
- * or package that is generating a span.
- *
- * @see Span::setTag()
- *
- * @param string $value
- * @return bool
- */
- private function setComponent($value): bool
- {
- $this->component = $value;
- return true;
- }
-
- /**
- * @return bool
- */
- private function setSpanKind($value): bool
- {
- $validSpanKinds = [
- SPAN_KIND_RPC_CLIENT,
- SPAN_KIND_RPC_SERVER,
- SPAN_KIND_MESSAGE_BUS_CONSUMER,
- SPAN_KIND_MESSAGE_BUS_PRODUCER,
- ];
-
- if ($value === null || in_array($value, $validSpanKinds, true)) {
- $this->kind = $value;
- return true;
- }
- return false;
- }
-
- /**
- * @return string|null
- */
- public function getKind(): ?string
- {
- return $this->kind;
- }
-
- /**
- * @return bool
- */
- private function setPeerPort($value): bool
- {
- if ($this->peer === null) {
- $this->peer = ['port' => $value];
- } else {
- $this->peer['port'] = $value;
- }
- return true;
- }
-
- /**
- * @return bool
- */
- private function setPeerHostIpv4($value): bool
- {
- if ($this->peer === null) {
- $this->peer = ['ipv4' => $value];
- } else {
- $this->peer['ipv4'] = $value;
- }
- return true;
- }
-
- /**
- * @return bool
- */
- private function setPeerService($value): bool
- {
- if ($this->peer === null) {
- $this->peer = ['service_name' => $value];
- } else {
- $this->peer['service_name'] = $value;
- }
- return true;
- }
-
- /**
- * @return bool
- */
- public function isRpc(): bool
- {
- return $this->kind == SPAN_KIND_RPC_CLIENT || $this->kind == SPAN_KIND_RPC_SERVER;
- }
-
- /**
- * @return bool
- */
- public function isRpcClient(): bool
- {
- return $this->kind == SPAN_KIND_RPC_CLIENT;
- }
-
- /**
- * {@inheritdoc}
- */
- public function log(array $fields = [], $timestamp = null): void
- {
- $timestamp = $this->microTime($timestamp);
- if ($timestamp < $this->getStartTime()) {
- $timestamp = $this->timestampMicro();
- }
-
- $this->logs[] = [
- 'fields' => $fields,
- 'timestamp' => $timestamp,
- ];
- }
-
- /**
- * Returns the logs.
- *
- * [
- * [
- * 'timestamp' => timestamp in microsecond,
- * 'fields' => [
- * 'error' => 'message',
- * ]
- * ]
- * ]
- *
- * @return array
- */
- public function getLogs(): array
- {
- return $this->logs;
- }
-
- /**
- * {@inheritdoc}
- */
- public function addBaggageItem(string $key, string $value): void
- {
- $this->context = $this->context->withBaggageItem($key, $value);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return $this->context->getBaggageItem($key);
- }
-
- /**
- * @return array
- */
- public function getTags(): array
- {
- return $this->tags;
- }
-
- /**
- * @return int
- */
- private function timestampMicro(): int
- {
- return round(microtime(true) * 1000000);
- }
-
- /**
- * @param string $key
- * @param mixed $value
- * @return BinaryAnnotation
- */
- private function makeTag(string $key, $value): BinaryAnnotation
- {
- $valueType = gettype($value);
- $annotationType = null;
- switch ($valueType) {
- case "boolean":
- $annotationType = AnnotationType::BOOL;
- break;
- case "integer":
- $annotationType = AnnotationType::I64;
- break;
- case "double":
- $annotationType = AnnotationType::DOUBLE;
- break;
- default:
- $annotationType = AnnotationType::STRING;
- $value = (string)$value;
- if (strlen($value) > 1024) {
- $value = substr($value, 0, 1024);
- }
- }
-
- return new BinaryAnnotation([
- 'key' => $key,
- 'value' => $value,
- 'annotation_type' => $annotationType,
- ]);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
deleted file mode 100644
index 447ffd1a5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use ArrayIterator;
-use OpenTracing\SpanContext as OTSpanContext;
-
-class SpanContext implements OTSpanContext
-{
- private $traceId;
-
- private $spanId;
-
- private $parentId;
-
- private $flags;
-
- /**
- * @var array
- */
- private $baggage;
-
- private $debugId;
-
- /**
- * SpanContext constructor.
- *
- * @param string $traceId
- * @param string $spanId
- * @param string $parentId
- * @param int|null $flags
- * @param array $baggage
- * @param int|null $debugId
- */
- public function __construct($traceId, $spanId, $parentId, $flags = null, $baggage = [], $debugId = null)
- {
- $this->traceId = $traceId;
- $this->spanId = $spanId;
- $this->parentId = $parentId;
- $this->flags = $flags;
- $this->baggage = is_array($baggage) ? $baggage : [];
- $this->debugId = $debugId;
- }
-
- /**
- * {@inheritdoc}
- * @return ArrayIterator
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new ArrayIterator($this->baggage);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return array_key_exists($key, $this->baggage) ? $this->baggage[$key] : null;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $key
- * @param string $value
- * @return SpanContext
- */
- public function withBaggageItem(string $key, string $value): OTSpanContext
- {
- return new self(
- $this->traceId,
- $this->spanId,
- $this->parentId,
- $this->flags,
- [$key => $value] + $this->baggage
- );
- }
-
- public function getTraceId()
- {
- return $this->traceId;
- }
-
- public function getParentId()
- {
- return $this->parentId;
- }
-
- public function getSpanId()
- {
- return $this->spanId;
- }
-
- /**
- * Get the span context flags.
- *
- * @return int|null
- */
- public function getFlags()
- {
- return $this->flags;
- }
-
- public function getBaggage()
- {
- return $this->baggage;
- }
-
- public function getDebugId()
- {
- return $this->debugId;
- }
-
- public function isDebugIdContainerOnly(): bool
- {
- return ($this->traceId === null) && ($this->debugId !== null);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php
deleted file mode 100644
index 640df4598..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class AgentClient implements \Jaeger\Thrift\Agent\AgentIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function emitZipkinBatch(array $spans)
- {
- $this->send_emitZipkinBatch($spans);
- }
-
- public function send_emitZipkinBatch(array $spans)
- {
- $args = new \Jaeger\Thrift\Agent\Agent_emitZipkinBatch_args();
- $args->spans = $spans;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'emitZipkinBatch', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('emitZipkinBatch', TMessageType::ONEWAY, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
- public function emitBatch(\Jaeger\Thrift\Batch $batch)
- {
- $this->send_emitBatch($batch);
- }
-
- public function send_emitBatch(\Jaeger\Thrift\Batch $batch)
- {
- $args = new \Jaeger\Thrift\Agent\Agent_emitBatch_args();
- $args->batch = $batch;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'emitBatch', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('emitBatch', TMessageType::ONEWAY, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php
deleted file mode 100644
index 30efc8cf3..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface AgentIf {
- /**
- * @param \Jaeger\Thrift\Agent\Zipkin\Span[] $spans
- */
- public function emitZipkinBatch(array $spans);
- /**
- * @param \Jaeger\Thrift\Batch $batch
- */
- public function emitBatch(\Jaeger\Thrift\Batch $batch);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php
deleted file mode 100644
index 9d11b409c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Agent_emitBatch_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'batch',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Batch',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Batch
- */
- public $batch = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Agent_emitBatch_args';
- }
-
- public function read($input)
- {
- return $this->_read('Agent_emitBatch_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Agent_emitBatch_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php
deleted file mode 100644
index cc58527bb..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Agent_emitZipkinBatch_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'spans',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Span',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\Zipkin\Span[]
- */
- public $spans = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Agent_emitZipkinBatch_args';
- }
-
- public function read($input)
- {
- return $this->_read('Agent_emitZipkinBatch_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Agent_emitZipkinBatch_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php
deleted file mode 100644
index 73825978a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class AggregationValidatorClient implements \Jaeger\Thrift\Agent\AggregationValidatorIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function validateTrace($traceId)
- {
- $this->send_validateTrace($traceId);
- return $this->recv_validateTrace();
- }
-
- public function send_validateTrace($traceId)
- {
- $args = new \Jaeger\Thrift\Agent\AggregationValidator_validateTrace_args();
- $args->traceId = $traceId;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'validateTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('validateTrace', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_validateTrace()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\AggregationValidator_validateTrace_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Agent\AggregationValidator_validateTrace_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("validateTrace failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php
deleted file mode 100644
index 853cd2a4f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface AggregationValidatorIf {
- /**
- * @param string $traceId
- * @return \Jaeger\Thrift\Agent\ValidateTraceResponse
- */
- public function validateTrace($traceId);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php
deleted file mode 100644
index 2f4d1171c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class AggregationValidator_validateTrace_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'traceId',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $traceId = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'AggregationValidator_validateTrace_args';
- }
-
- public function read($input)
- {
- return $this->_read('AggregationValidator_validateTrace_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('AggregationValidator_validateTrace_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php
deleted file mode 100644
index 6060c5ae3..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class AggregationValidator_validateTrace_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\ValidateTraceResponse',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\ValidateTraceResponse
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'AggregationValidator_validateTrace_result';
- }
-
- public function read($input)
- {
- return $this->_read('AggregationValidator_validateTrace_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('AggregationValidator_validateTrace_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php
deleted file mode 100644
index 27593c4c1..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class BaggageRestriction extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'baggageKey',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'maxValueLength',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- );
-
- /**
- * @var string
- */
- public $baggageKey = null;
- /**
- * @var int
- */
- public $maxValueLength = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'BaggageRestriction';
- }
-
- public function read($input)
- {
- return $this->_read('BaggageRestriction', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('BaggageRestriction', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php
deleted file mode 100644
index 379153534..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class BaggageRestrictionManagerClient implements \Jaeger\Thrift\Agent\BaggageRestrictionManagerIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function getBaggageRestrictions($serviceName)
- {
- $this->send_getBaggageRestrictions($serviceName);
- return $this->recv_getBaggageRestrictions();
- }
-
- public function send_getBaggageRestrictions($serviceName)
- {
- $args = new \Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_args();
- $args->serviceName = $serviceName;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'getBaggageRestrictions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('getBaggageRestrictions', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_getBaggageRestrictions()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("getBaggageRestrictions failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php
deleted file mode 100644
index 010bda741..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface BaggageRestrictionManagerIf {
- /**
- * getBaggageRestrictions retrieves the baggage restrictions for a specific service.
- * Usually, baggageRestrictions apply to all services however there may be situations
- * where a baggageKey might only be allowed to be set by a specific service.
- *
- * @param string $serviceName
- * @return \Jaeger\Thrift\Agent\BaggageRestriction[]
- */
- public function getBaggageRestrictions($serviceName);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php
deleted file mode 100644
index 6f2b4650a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class BaggageRestrictionManager_getBaggageRestrictions_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serviceName',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $serviceName = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'BaggageRestrictionManager_getBaggageRestrictions_args';
- }
-
- public function read($input)
- {
- return $this->_read('BaggageRestrictionManager_getBaggageRestrictions_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('BaggageRestrictionManager_getBaggageRestrictions_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php
deleted file mode 100644
index a3c52b37c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class BaggageRestrictionManager_getBaggageRestrictions_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\BaggageRestriction',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\BaggageRestriction[]
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'BaggageRestrictionManager_getBaggageRestrictions_result';
- }
-
- public function read($input)
- {
- return $this->_read('BaggageRestrictionManager_getBaggageRestrictions_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('BaggageRestrictionManager_getBaggageRestrictions_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php
deleted file mode 100644
index 4295b9798..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Dependencies extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'links',
- 'isRequired' => true,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\DependencyLink',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\DependencyLink[]
- */
- public $links = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Dependencies';
- }
-
- public function read($input)
- {
- return $this->_read('Dependencies', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Dependencies', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php
deleted file mode 100644
index 2c247633d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class DependencyClient implements \Jaeger\Thrift\Agent\DependencyIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function getDependenciesForTrace($traceId)
- {
- $this->send_getDependenciesForTrace($traceId);
- return $this->recv_getDependenciesForTrace();
- }
-
- public function send_getDependenciesForTrace($traceId)
- {
- $args = new \Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_args();
- $args->traceId = $traceId;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'getDependenciesForTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('getDependenciesForTrace', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_getDependenciesForTrace()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("getDependenciesForTrace failed: unknown result");
- }
-
- public function saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies)
- {
- $this->send_saveDependencies($dependencies);
- }
-
- public function send_saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies)
- {
- $args = new \Jaeger\Thrift\Agent\Dependency_saveDependencies_args();
- $args->dependencies = $dependencies;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'saveDependencies', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('saveDependencies', TMessageType::ONEWAY, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php
deleted file mode 100644
index c9432e7d8..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface DependencyIf {
- /**
- * @param string $traceId
- * @return \Jaeger\Thrift\Agent\Dependencies
- */
- public function getDependenciesForTrace($traceId);
- /**
- * @param \Jaeger\Thrift\Agent\Dependencies $dependencies
- */
- public function saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php
deleted file mode 100644
index 14cfa5132..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class DependencyLink extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'parent',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'child',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'callCount',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- );
-
- /**
- * @var string
- */
- public $parent = null;
- /**
- * @var string
- */
- public $child = null;
- /**
- * @var int
- */
- public $callCount = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'DependencyLink';
- }
-
- public function read($input)
- {
- return $this->_read('DependencyLink', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('DependencyLink', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php
deleted file mode 100644
index 5100ea77b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Dependency_getDependenciesForTrace_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'traceId',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $traceId = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Dependency_getDependenciesForTrace_args';
- }
-
- public function read($input)
- {
- return $this->_read('Dependency_getDependenciesForTrace_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Dependency_getDependenciesForTrace_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php
deleted file mode 100644
index ebdd1303e..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Dependency_getDependenciesForTrace_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Dependencies',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\Dependencies
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Dependency_getDependenciesForTrace_result';
- }
-
- public function read($input)
- {
- return $this->_read('Dependency_getDependenciesForTrace_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Dependency_getDependenciesForTrace_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php
deleted file mode 100644
index 0d250c297..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Dependency_saveDependencies_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'dependencies',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Dependencies',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\Dependencies
- */
- public $dependencies = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Dependency_saveDependencies_args';
- }
-
- public function read($input)
- {
- return $this->_read('Dependency_saveDependencies_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Dependency_saveDependencies_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php
deleted file mode 100644
index 7532a7b50..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class OperationSamplingStrategy extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'operation',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'probabilisticSampling',
- 'isRequired' => true,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy',
- ),
- );
-
- /**
- * @var string
- */
- public $operation = null;
- /**
- * @var \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy
- */
- public $probabilisticSampling = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'OperationSamplingStrategy';
- }
-
- public function read($input)
- {
- return $this->_read('OperationSamplingStrategy', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('OperationSamplingStrategy', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php
deleted file mode 100644
index 2a6ae8a61..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class PerOperationSamplingStrategies extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'defaultSamplingProbability',
- 'isRequired' => true,
- 'type' => TType::DOUBLE,
- ),
- 2 => array(
- 'var' => 'defaultLowerBoundTracesPerSecond',
- 'isRequired' => true,
- 'type' => TType::DOUBLE,
- ),
- 3 => array(
- 'var' => 'perOperationStrategies',
- 'isRequired' => true,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\OperationSamplingStrategy',
- ),
- ),
- 4 => array(
- 'var' => 'defaultUpperBoundTracesPerSecond',
- 'isRequired' => false,
- 'type' => TType::DOUBLE,
- ),
- );
-
- /**
- * @var double
- */
- public $defaultSamplingProbability = null;
- /**
- * @var double
- */
- public $defaultLowerBoundTracesPerSecond = null;
- /**
- * @var \Jaeger\Thrift\Agent\OperationSamplingStrategy[]
- */
- public $perOperationStrategies = null;
- /**
- * @var double
- */
- public $defaultUpperBoundTracesPerSecond = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'PerOperationSamplingStrategies';
- }
-
- public function read($input)
- {
- return $this->_read('PerOperationSamplingStrategies', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('PerOperationSamplingStrategies', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php
deleted file mode 100644
index 708ceb9a4..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ProbabilisticSamplingStrategy extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'samplingRate',
- 'isRequired' => true,
- 'type' => TType::DOUBLE,
- ),
- );
-
- /**
- * @var double
- */
- public $samplingRate = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'ProbabilisticSamplingStrategy';
- }
-
- public function read($input)
- {
- return $this->_read('ProbabilisticSamplingStrategy', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('ProbabilisticSamplingStrategy', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php
deleted file mode 100644
index d5502e8ee..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class RateLimitingSamplingStrategy extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'maxTracesPerSecond',
- 'isRequired' => true,
- 'type' => TType::I16,
- ),
- );
-
- /**
- * @var int
- */
- public $maxTracesPerSecond = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'RateLimitingSamplingStrategy';
- }
-
- public function read($input)
- {
- return $this->_read('RateLimitingSamplingStrategy', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('RateLimitingSamplingStrategy', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php
deleted file mode 100644
index 9f5494a91..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class SamplingManagerClient implements \Jaeger\Thrift\Agent\SamplingManagerIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function getSamplingStrategy($serviceName)
- {
- $this->send_getSamplingStrategy($serviceName);
- return $this->recv_getSamplingStrategy();
- }
-
- public function send_getSamplingStrategy($serviceName)
- {
- $args = new \Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_args();
- $args->serviceName = $serviceName;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'getSamplingStrategy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('getSamplingStrategy', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_getSamplingStrategy()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("getSamplingStrategy failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php
deleted file mode 100644
index ef17cf308..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface SamplingManagerIf {
- /**
- * @param string $serviceName
- * @return \Jaeger\Thrift\Agent\SamplingStrategyResponse
- */
- public function getSamplingStrategy($serviceName);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php
deleted file mode 100644
index f39203efe..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class SamplingManager_getSamplingStrategy_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serviceName',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $serviceName = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'SamplingManager_getSamplingStrategy_args';
- }
-
- public function read($input)
- {
- return $this->_read('SamplingManager_getSamplingStrategy_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('SamplingManager_getSamplingStrategy_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php
deleted file mode 100644
index 79e6dce58..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class SamplingManager_getSamplingStrategy_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\SamplingStrategyResponse',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\SamplingStrategyResponse
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'SamplingManager_getSamplingStrategy_result';
- }
-
- public function read($input)
- {
- return $this->_read('SamplingManager_getSamplingStrategy_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('SamplingManager_getSamplingStrategy_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php
deleted file mode 100644
index bc807a57d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class SamplingStrategyResponse extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'strategyType',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- 2 => array(
- 'var' => 'probabilisticSampling',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy',
- ),
- 3 => array(
- 'var' => 'rateLimitingSampling',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\RateLimitingSamplingStrategy',
- ),
- 4 => array(
- 'var' => 'operationSampling',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\PerOperationSamplingStrategies',
- ),
- );
-
- /**
- * @var int
- */
- public $strategyType = null;
- /**
- * @var \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy
- */
- public $probabilisticSampling = null;
- /**
- * @var \Jaeger\Thrift\Agent\RateLimitingSamplingStrategy
- */
- public $rateLimitingSampling = null;
- /**
- * @var \Jaeger\Thrift\Agent\PerOperationSamplingStrategies
- */
- public $operationSampling = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'SamplingStrategyResponse';
- }
-
- public function read($input)
- {
- return $this->_read('SamplingStrategyResponse', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('SamplingStrategyResponse', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php
deleted file mode 100644
index c8dff918a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class SamplingStrategyType {
- const PROBABILISTIC = 0;
- const RATE_LIMITING = 1;
- static public $__names = array(
- 0 => 'PROBABILISTIC',
- 1 => 'RATE_LIMITING',
- );
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php
deleted file mode 100644
index 226f61e80..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ValidateTraceResponse extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'ok',
- 'isRequired' => true,
- 'type' => TType::BOOL,
- ),
- 2 => array(
- 'var' => 'traceCount',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- );
-
- /**
- * @var bool
- */
- public $ok = null;
- /**
- * @var int
- */
- public $traceCount = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'ValidateTraceResponse';
- }
-
- public function read($input)
- {
- return $this->_read('ValidateTraceResponse', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('ValidateTraceResponse', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php
deleted file mode 100644
index e7e48dade..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-/**
- * An annotation is similar to a log statement. It includes a host field which
- * allows these events to be attributed properly, and also aggregatable.
- */
-class Annotation extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'timestamp',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 2 => array(
- 'var' => 'value',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'host',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Endpoint',
- ),
- );
-
- /**
- * Microseconds from epoch.
- *
- * This value should use the most precise value possible. For example,
- * gettimeofday or syncing nanoTime against a tick of currentTimeMillis.
- *
- * @var int
- */
- public $timestamp = null;
- /**
- * @var string
- */
- public $value = null;
- /**
- * Always the host that recorded the event. By specifying the host you allow
- * rollup of all events (such as client requests to a service) by IP address.
- *
- * @var \Jaeger\Thrift\Agent\Zipkin\Endpoint
- */
- public $host = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Annotation';
- }
-
- public function read($input)
- {
- return $this->_read('Annotation', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Annotation', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php
deleted file mode 100644
index e21c0b0d8..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class AnnotationType {
- const BOOL = 0;
- const BYTES = 1;
- const I16 = 2;
- const I32 = 3;
- const I64 = 4;
- const DOUBLE = 5;
- const STRING = 6;
- static public $__names = array(
- 0 => 'BOOL',
- 1 => 'BYTES',
- 2 => 'I16',
- 3 => 'I32',
- 4 => 'I64',
- 5 => 'DOUBLE',
- 6 => 'STRING',
- );
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php
deleted file mode 100644
index 806a74831..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-/**
- * Binary annotations are tags applied to a Span to give it context. For
- * example, a binary annotation of "http.uri" could the path to a resource in a
- * RPC call.
- *
- * Binary annotations of type STRING are always queryable, though more a
- * historical implementation detail than a structural concern.
- *
- * Binary annotations can repeat, and vary on the host. Similar to Annotation,
- * the host indicates who logged the event. This allows you to tell the
- * difference between the client and server side of the same key. For example,
- * the key "http.uri" might be different on the client and server side due to
- * rewriting, like "/api/v1/myresource" vs "/myresource. Via the host field,
- * you can see the different points of view, which often help in debugging.
- */
-class BinaryAnnotation extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'key',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'value',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'annotation_type',
- 'isRequired' => false,
- 'type' => TType::I32,
- ),
- 4 => array(
- 'var' => 'host',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Endpoint',
- ),
- );
-
- /**
- * @var string
- */
- public $key = null;
- /**
- * @var string
- */
- public $value = null;
- /**
- * @var int
- */
- public $annotation_type = null;
- /**
- * The host that recorded tag, which allows you to differentiate between
- * multiple tags with the same key. There are two exceptions to this.
- *
- * When the key is CLIENT_ADDR or SERVER_ADDR, host indicates the source or
- * destination of an RPC. This exception allows zipkin to display network
- * context of uninstrumented services, or clients such as web browsers.
- *
- * @var \Jaeger\Thrift\Agent\Zipkin\Endpoint
- */
- public $host = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'BinaryAnnotation';
- }
-
- public function read($input)
- {
- return $this->_read('BinaryAnnotation', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('BinaryAnnotation', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php
deleted file mode 100644
index ebfcebe48..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php
+++ /dev/null
@@ -1,246 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class Constant extends \Thrift\Type\TConstant {
- static protected $CLIENT_SEND;
- static protected $CLIENT_RECV;
- static protected $SERVER_SEND;
- static protected $SERVER_RECV;
- static protected $MESSAGE_SEND;
- static protected $MESSAGE_RECV;
- static protected $WIRE_SEND;
- static protected $WIRE_RECV;
- static protected $CLIENT_SEND_FRAGMENT;
- static protected $CLIENT_RECV_FRAGMENT;
- static protected $SERVER_SEND_FRAGMENT;
- static protected $SERVER_RECV_FRAGMENT;
- static protected $LOCAL_COMPONENT;
- static protected $CLIENT_ADDR;
- static protected $SERVER_ADDR;
- static protected $MESSAGE_ADDR;
-
- static protected function init_CLIENT_SEND() {
- return /**
- * The client sent ("cs") a request to a server. There is only one send per
- * span. For example, if there's a transport error, each attempt can be logged
- * as a WIRE_SEND annotation.
- *
- * If chunking is involved, each chunk could be logged as a separate
- * CLIENT_SEND_FRAGMENT in the same span.
- *
- * Annotation.host is not the server. It is the host which logged the send
- * event, almost always the client. When logging CLIENT_SEND, instrumentation
- * should also log the SERVER_ADDR.
- */
-"cs";
- }
-
- static protected function init_CLIENT_RECV() {
- return /**
- * The client received ("cr") a response from a server. There is only one
- * receive per span. For example, if duplicate responses were received, each
- * can be logged as a WIRE_RECV annotation.
- *
- * If chunking is involved, each chunk could be logged as a separate
- * CLIENT_RECV_FRAGMENT in the same span.
- *
- * Annotation.host is not the server. It is the host which logged the receive
- * event, almost always the client. The actual endpoint of the server is
- * recorded separately as SERVER_ADDR when CLIENT_SEND is logged.
- */
-"cr";
- }
-
- static protected function init_SERVER_SEND() {
- return /**
- * The server sent ("ss") a response to a client. There is only one response
- * per span. If there's a transport error, each attempt can be logged as a
- * WIRE_SEND annotation.
- *
- * Typically, a trace ends with a server send, so the last timestamp of a trace
- * is often the timestamp of the root span's server send.
- *
- * If chunking is involved, each chunk could be logged as a separate
- * SERVER_SEND_FRAGMENT in the same span.
- *
- * Annotation.host is not the client. It is the host which logged the send
- * event, almost always the server. The actual endpoint of the client is
- * recorded separately as CLIENT_ADDR when SERVER_RECV is logged.
- */
-"ss";
- }
-
- static protected function init_SERVER_RECV() {
- return /**
- * The server received ("sr") a request from a client. There is only one
- * request per span. For example, if duplicate responses were received, each
- * can be logged as a WIRE_RECV annotation.
- *
- * Typically, a trace starts with a server receive, so the first timestamp of a
- * trace is often the timestamp of the root span's server receive.
- *
- * If chunking is involved, each chunk could be logged as a separate
- * SERVER_RECV_FRAGMENT in the same span.
- *
- * Annotation.host is not the client. It is the host which logged the receive
- * event, almost always the server. When logging SERVER_RECV, instrumentation
- * should also log the CLIENT_ADDR.
- */
-"sr";
- }
-
- static protected function init_MESSAGE_SEND() {
- return /**
- * Message send ("ms") is a request to send a message to a destination, usually
- * a broker. This may be the only annotation in a messaging span. If WIRE_SEND
- * exists in the same span, it follows this moment and clarifies delays sending
- * the message, such as batching.
- *
- * Unlike RPC annotations like CLIENT_SEND, messaging spans never share a span
- * ID. For example, "ms" should always be the parent of "mr".
- *
- * Annotation.host is not the destination, it is the host which logged the send
- * event: the producer. When annotating MESSAGE_SEND, instrumentation should
- * also tag the MESSAGE_ADDR.
- */
-"ms";
- }
-
- static protected function init_MESSAGE_RECV() {
- return /**
- * A consumer received ("mr") a message from a broker. This may be the only
- * annotation in a messaging span. If WIRE_RECV exists in the same span, it
- * precedes this moment and clarifies any local queuing delay.
- *
- * Unlike RPC annotations like SERVER_RECV, messaging spans never share a span
- * ID. For example, "mr" should always be a child of "ms" unless it is a root
- * span.
- *
- * Annotation.host is not the broker, it is the host which logged the receive
- * event: the consumer. When annotating MESSAGE_RECV, instrumentation should
- * also tag the MESSAGE_ADDR.
- */
-"mr";
- }
-
- static protected function init_WIRE_SEND() {
- return /**
- * Optionally logs an attempt to send a message on the wire. Multiple wire send
- * events could indicate network retries. A lag between client or server send
- * and wire send might indicate queuing or processing delay.
- */
-"ws";
- }
-
- static protected function init_WIRE_RECV() {
- return /**
- * Optionally logs an attempt to receive a message from the wire. Multiple wire
- * receive events could indicate network retries. A lag between wire receive
- * and client or server receive might indicate queuing or processing delay.
- */
-"wr";
- }
-
- static protected function init_CLIENT_SEND_FRAGMENT() {
- return /**
- * Optionally logs progress of a (CLIENT_SEND, WIRE_SEND). For example, this
- * could be one chunk in a chunked request.
- */
-"csf";
- }
-
- static protected function init_CLIENT_RECV_FRAGMENT() {
- return /**
- * Optionally logs progress of a (CLIENT_RECV, WIRE_RECV). For example, this
- * could be one chunk in a chunked response.
- */
-"crf";
- }
-
- static protected function init_SERVER_SEND_FRAGMENT() {
- return /**
- * Optionally logs progress of a (SERVER_SEND, WIRE_SEND). For example, this
- * could be one chunk in a chunked response.
- */
-"ssf";
- }
-
- static protected function init_SERVER_RECV_FRAGMENT() {
- return /**
- * Optionally logs progress of a (SERVER_RECV, WIRE_RECV). For example, this
- * could be one chunk in a chunked request.
- */
-"srf";
- }
-
- static protected function init_LOCAL_COMPONENT() {
- return /**
- * The value of "lc" is the component or namespace of a local span.
- *
- * BinaryAnnotation.host adds service context needed to support queries.
- *
- * Local Component("lc") supports three key features: flagging, query by
- * service and filtering Span.name by namespace.
- *
- * While structurally the same, local spans are fundamentally different than
- * RPC spans in how they should be interpreted. For example, zipkin v1 tools
- * center on RPC latency and service graphs. Root local-spans are neither
- * indicative of critical path RPC latency, nor have impact on the shape of a
- * service graph. By flagging with "lc", tools can special-case local spans.
- *
- * Zipkin v1 Spans are unqueryable unless they can be indexed by service name.
- * The only path to a service name is by (Binary)?Annotation.host.serviceName.
- * By logging "lc", a local span can be queried even if no other annotations
- * are logged.
- *
- * The value of "lc" is the namespace of Span.name. For example, it might be
- * "finatra2", for a span named "bootstrap". "lc" allows you to resolves
- * conflicts for the same Span.name, for example "finatra/bootstrap" vs
- * "finch/bootstrap". Using local component, you'd search for spans named
- * "bootstrap" where "lc=finch"
- */
-"lc";
- }
-
- static protected function init_CLIENT_ADDR() {
- return /**
- * Indicates a client address ("ca") in a span. Most likely, there's only one.
- * Multiple addresses are possible when a client changes its ip or port within
- * a span.
- */
-"ca";
- }
-
- static protected function init_SERVER_ADDR() {
- return /**
- * Indicates a server address ("sa") in a span. Most likely, there's only one.
- * Multiple addresses are possible when a client is redirected, or fails to a
- * different server ip or port.
- */
-"sa";
- }
-
- static protected function init_MESSAGE_ADDR() {
- return /**
- * Indicates the remote address of a messaging span, usually the broker.
- */
-"ma";
- }
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php
deleted file mode 100644
index 12ff02f96..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-/**
- * Indicates the network context of a service recording an annotation with two
- * exceptions.
- *
- * When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR,
- * the endpoint indicates the source or destination of an RPC. This exception
- * allows zipkin to display network context of uninstrumented services, or
- * clients such as web browsers.
- */
-class Endpoint extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'ipv4',
- 'isRequired' => false,
- 'type' => TType::I32,
- ),
- 2 => array(
- 'var' => 'port',
- 'isRequired' => false,
- 'type' => TType::I16,
- ),
- 3 => array(
- 'var' => 'service_name',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'ipv6',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * IPv4 host address packed into 4 bytes.
- *
- * Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
- *
- * @var int
- */
- public $ipv4 = null;
- /**
- * IPv4 port
- *
- * Note: this is to be treated as an unsigned integer, so watch for negatives.
- *
- * Conventionally, when the port isn't known, port = 0.
- *
- * @var int
- */
- public $port = null;
- /**
- * Service name in lowercase, such as "memcache" or "zipkin-web"
- *
- * Conventionally, when the service name isn't known, service_name = "unknown".
- *
- * @var string
- */
- public $service_name = null;
- /**
- * IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes()
- *
- * @var string
- */
- public $ipv6 = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Endpoint';
- }
-
- public function read($input)
- {
- return $this->_read('Endpoint', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Endpoint', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php
deleted file mode 100644
index 88c7f5e5d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Response extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'ok',
- 'isRequired' => true,
- 'type' => TType::BOOL,
- ),
- );
-
- /**
- * @var bool
- */
- public $ok = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Response';
- }
-
- public function read($input)
- {
- return $this->_read('Response', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Response', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php
deleted file mode 100644
index 32a69b645..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php
+++ /dev/null
@@ -1,190 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-/**
- * A trace is a series of spans (often RPC calls) which form a latency tree.
- *
- * The root span is where trace_id = id and parent_id = Nil. The root span is
- * usually the longest interval in the trace, starting with a SERVER_RECV
- * annotation and ending with a SERVER_SEND.
- */
-class Span extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'trace_id',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 3 => array(
- 'var' => 'name',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'id',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 5 => array(
- 'var' => 'parent_id',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 6 => array(
- 'var' => 'annotations',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Annotation',
- ),
- ),
- 8 => array(
- 'var' => 'binary_annotations',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation',
- ),
- ),
- 9 => array(
- 'var' => 'debug',
- 'isRequired' => false,
- 'type' => TType::BOOL,
- ),
- 10 => array(
- 'var' => 'timestamp',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 11 => array(
- 'var' => 'duration',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 12 => array(
- 'var' => 'trace_id_high',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- );
-
- /**
- * @var int
- */
- public $trace_id = null;
- /**
- * Span name in lowercase, rpc method for example
- *
- * Conventionally, when the span name isn't known, name = "unknown".
- *
- * @var string
- */
- public $name = null;
- /**
- * @var int
- */
- public $id = null;
- /**
- * @var int
- */
- public $parent_id = null;
- /**
- * @var \Jaeger\Thrift\Agent\Zipkin\Annotation[]
- */
- public $annotations = null;
- /**
- * @var \Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation[]
- */
- public $binary_annotations = null;
- /**
- * @var bool
- */
- public $debug = false;
- /**
- * Microseconds from epoch of the creation of this span.
- *
- * This value should be set directly by instrumentation, using the most
- * precise value possible. For example, gettimeofday or syncing nanoTime
- * against a tick of currentTimeMillis.
- *
- * For compatibilty with instrumentation that precede this field, collectors
- * or span stores can derive this via Annotation.timestamp.
- * For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
- *
- * This field is optional for compatibility with old data: first-party span
- * stores are expected to support this at time of introduction.
- *
- * @var int
- */
- public $timestamp = null;
- /**
- * Measurement of duration in microseconds, used to support queries.
- *
- * This value should be set directly, where possible. Doing so encourages
- * precise measurement decoupled from problems of clocks, such as skew or NTP
- * updates causing time to move backwards.
- *
- * For compatibilty with instrumentation that precede this field, collectors
- * or span stores can derive this by subtracting Annotation.timestamp.
- * For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
- *
- * If this field is persisted as unset, zipkin will continue to work, except
- * duration query support will be implementation-specific. Similarly, setting
- * this field non-atomically is implementation-specific.
- *
- * This field is i64 vs i32 to support spans longer than 35 minutes.
- *
- * @var int
- */
- public $duration = null;
- /**
- * Optional unique 8-byte additional identifier for a trace. If non zero, this
- * means the trace uses 128 bit traceIds instead of 64 bit.
- *
- * @var int
- */
- public $trace_id_high = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Span';
- }
-
- public function read($input)
- {
- return $this->_read('Span', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Span', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php
deleted file mode 100644
index 2978675c4..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ZipkinCollectorClient implements \Jaeger\Thrift\Agent\Zipkin\ZipkinCollectorIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function submitZipkinBatch(array $spans)
- {
- $this->send_submitZipkinBatch($spans);
- return $this->recv_submitZipkinBatch();
- }
-
- public function send_submitZipkinBatch(array $spans)
- {
- $args = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_args();
- $args->spans = $spans;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'submitZipkinBatch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('submitZipkinBatch', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_submitZipkinBatch()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("submitZipkinBatch failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php
deleted file mode 100644
index 83abf8119..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface ZipkinCollectorIf {
- /**
- * @param \Jaeger\Thrift\Agent\Zipkin\Span[] $spans
- * @return \Jaeger\Thrift\Agent\Zipkin\Response[]
- */
- public function submitZipkinBatch(array $spans);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php
deleted file mode 100644
index 24d25b078..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ZipkinCollector_submitZipkinBatch_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'spans',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Span',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\Zipkin\Span[]
- */
- public $spans = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'ZipkinCollector_submitZipkinBatch_args';
- }
-
- public function read($input)
- {
- return $this->_read('ZipkinCollector_submitZipkinBatch_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('ZipkinCollector_submitZipkinBatch_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php
deleted file mode 100644
index faf165446..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Agent\Zipkin;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ZipkinCollector_submitZipkinBatch_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Agent\Zipkin\Response',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Agent\Zipkin\Response[]
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'ZipkinCollector_submitZipkinBatch_result';
- }
-
- public function read($input)
- {
- return $this->_read('ZipkinCollector_submitZipkinBatch_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('ZipkinCollector_submitZipkinBatch_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php
deleted file mode 100644
index 56e9e5206..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Batch extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'process',
- 'isRequired' => true,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Process',
- ),
- 2 => array(
- 'var' => 'spans',
- 'isRequired' => true,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Span',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Process
- */
- public $process = null;
- /**
- * @var \Jaeger\Thrift\Span[]
- */
- public $spans = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Batch';
- }
-
- public function read($input)
- {
- return $this->_read('Batch', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Batch', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php
deleted file mode 100644
index 7ddc25eb5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class BatchSubmitResponse extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'ok',
- 'isRequired' => true,
- 'type' => TType::BOOL,
- ),
- );
-
- /**
- * @var bool
- */
- public $ok = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'BatchSubmitResponse';
- }
-
- public function read($input)
- {
- return $this->_read('BatchSubmitResponse', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('BatchSubmitResponse', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php
deleted file mode 100644
index e3c6e14c1..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class CollectorClient implements \Jaeger\Thrift\CollectorIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function submitBatches(array $batches)
- {
- $this->send_submitBatches($batches);
- return $this->recv_submitBatches();
- }
-
- public function send_submitBatches(array $batches)
- {
- $args = new \Jaeger\Thrift\Collector_submitBatches_args();
- $args->batches = $batches;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'submitBatches', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('submitBatches', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_submitBatches()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Collector_submitBatches_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Collector_submitBatches_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("submitBatches failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php
deleted file mode 100644
index da4f023ec..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface CollectorIf {
- /**
- * @param \Jaeger\Thrift\Batch[] $batches
- * @return \Jaeger\Thrift\BatchSubmitResponse[]
- */
- public function submitBatches(array $batches);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php
deleted file mode 100644
index 014e3720d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Collector_submitBatches_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'batches',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Batch',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Batch[]
- */
- public $batches = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Collector_submitBatches_args';
- }
-
- public function read($input)
- {
- return $this->_read('Collector_submitBatches_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Collector_submitBatches_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php
deleted file mode 100644
index aae083707..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Collector_submitBatches_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\BatchSubmitResponse',
- ),
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\BatchSubmitResponse[]
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Collector_submitBatches_result';
- }
-
- public function read($input)
- {
- return $this->_read('Collector_submitBatches_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Collector_submitBatches_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php
deleted file mode 100644
index 92b269aa6..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Downstream extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serviceName',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'serverRole',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'host',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'port',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'transport',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- 6 => array(
- 'var' => 'downstream',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\Downstream',
- ),
- );
-
- /**
- * @var string
- */
- public $serviceName = null;
- /**
- * @var string
- */
- public $serverRole = null;
- /**
- * @var string
- */
- public $host = null;
- /**
- * @var string
- */
- public $port = null;
- /**
- * @var int
- */
- public $transport = null;
- /**
- * @var \Jaeger\Thrift\Crossdock\Downstream
- */
- public $downstream = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Downstream';
- }
-
- public function read($input)
- {
- return $this->_read('Downstream', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Downstream', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php
deleted file mode 100644
index 39e6242b7..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class JoinTraceRequest extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serverRole',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'downstream',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\Downstream',
- ),
- );
-
- /**
- * @var string
- */
- public $serverRole = null;
- /**
- * @var \Jaeger\Thrift\Crossdock\Downstream
- */
- public $downstream = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'JoinTraceRequest';
- }
-
- public function read($input)
- {
- return $this->_read('JoinTraceRequest', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('JoinTraceRequest', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php
deleted file mode 100644
index d60331851..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class ObservedSpan extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'traceId',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'sampled',
- 'isRequired' => true,
- 'type' => TType::BOOL,
- ),
- 3 => array(
- 'var' => 'baggage',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $traceId = null;
- /**
- * @var bool
- */
- public $sampled = null;
- /**
- * @var string
- */
- public $baggage = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'ObservedSpan';
- }
-
- public function read($input)
- {
- return $this->_read('ObservedSpan', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('ObservedSpan', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php
deleted file mode 100644
index 50b9c6668..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class StartTraceRequest extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serverRole',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'sampled',
- 'isRequired' => true,
- 'type' => TType::BOOL,
- ),
- 3 => array(
- 'var' => 'baggage',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'downstream',
- 'isRequired' => true,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\Downstream',
- ),
- );
-
- /**
- * @var string
- */
- public $serverRole = null;
- /**
- * @var bool
- */
- public $sampled = null;
- /**
- * @var string
- */
- public $baggage = null;
- /**
- * @var \Jaeger\Thrift\Crossdock\Downstream
- */
- public $downstream = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'StartTraceRequest';
- }
-
- public function read($input)
- {
- return $this->_read('StartTraceRequest', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('StartTraceRequest', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php
deleted file mode 100644
index 107d4e26d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-/**
- * Each server must include the information about the span it observed.
- * It can only be omitted from the response if notImplementedError field is not empty.
- * If the server was instructed to make a downstream call, it must embed the
- * downstream response in its own response.
- */
-class TraceResponse extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'span',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\ObservedSpan',
- ),
- 2 => array(
- 'var' => 'downstream',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse',
- ),
- 3 => array(
- 'var' => 'notImplementedError',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Crossdock\ObservedSpan
- */
- public $span = null;
- /**
- * @var \Jaeger\Thrift\Crossdock\TraceResponse
- */
- public $downstream = null;
- /**
- * @var string
- */
- public $notImplementedError = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'TraceResponse';
- }
-
- public function read($input)
- {
- return $this->_read('TraceResponse', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('TraceResponse', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php
deleted file mode 100644
index 2fd8b4fc9..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php
+++ /dev/null
@@ -1,134 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class TracedServiceClient implements \Jaeger\Thrift\Crossdock\TracedServiceIf {
- protected $input_ = null;
- protected $output_ = null;
-
- protected $seqid_ = 0;
-
- public function __construct($input, $output=null) {
- $this->input_ = $input;
- $this->output_ = $output ? $output : $input;
- }
-
- public function startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request)
- {
- $this->send_startTrace($request);
- return $this->recv_startTrace();
- }
-
- public function send_startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request)
- {
- $args = new \Jaeger\Thrift\Crossdock\TracedService_startTrace_args();
- $args->request = $request;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'startTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('startTrace', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_startTrace()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Crossdock\TracedService_startTrace_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Crossdock\TracedService_startTrace_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("startTrace failed: unknown result");
- }
-
- public function joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request)
- {
- $this->send_joinTrace($request);
- return $this->recv_joinTrace();
- }
-
- public function send_joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request)
- {
- $args = new \Jaeger\Thrift\Crossdock\TracedService_joinTrace_args();
- $args->request = $request;
- $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
- if ($bin_accel)
- {
- thrift_protocol_write_binary($this->output_, 'joinTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
- }
- else
- {
- $this->output_->writeMessageBegin('joinTrace', TMessageType::CALL, $this->seqid_);
- $args->write($this->output_);
- $this->output_->writeMessageEnd();
- $this->output_->getTransport()->flush();
- }
- }
-
- public function recv_joinTrace()
- {
- $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
- if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Crossdock\TracedService_joinTrace_result', $this->input_->isStrictRead());
- else
- {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
-
- $this->input_->readMessageBegin($fname, $mtype, $rseqid);
- if ($mtype == TMessageType::EXCEPTION) {
- $x = new TApplicationException();
- $x->read($this->input_);
- $this->input_->readMessageEnd();
- throw $x;
- }
- $result = new \Jaeger\Thrift\Crossdock\TracedService_joinTrace_result();
- $result->read($this->input_);
- $this->input_->readMessageEnd();
- }
- if ($result->success !== null) {
- return $result->success;
- }
- throw new \Exception("joinTrace failed: unknown result");
- }
-
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php
deleted file mode 100644
index e2dd9a8eb..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface TracedServiceIf {
- /**
- * @param \Jaeger\Thrift\Crossdock\StartTraceRequest $request
- * @return \Jaeger\Thrift\Crossdock\TraceResponse Each server must include the information about the span it observed.
- * It can only be omitted from the response if notImplementedError field is not empty.
- * If the server was instructed to make a downstream call, it must embed the
- * downstream response in its own response.
- *
- */
- public function startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request);
- /**
- * @param \Jaeger\Thrift\Crossdock\JoinTraceRequest $request
- * @return \Jaeger\Thrift\Crossdock\TraceResponse Each server must include the information about the span it observed.
- * It can only be omitted from the response if notImplementedError field is not empty.
- * If the server was instructed to make a downstream call, it must embed the
- * downstream response in its own response.
- *
- */
- public function joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request);
-}
-
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php
deleted file mode 100644
index fb82b43c7..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class TracedService_joinTrace_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'request',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\JoinTraceRequest',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Crossdock\JoinTraceRequest
- */
- public $request = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'TracedService_joinTrace_args';
- }
-
- public function read($input)
- {
- return $this->_read('TracedService_joinTrace_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('TracedService_joinTrace_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php
deleted file mode 100644
index 26ebd7124..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class TracedService_joinTrace_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Crossdock\TraceResponse
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'TracedService_joinTrace_result';
- }
-
- public function read($input)
- {
- return $this->_read('TracedService_joinTrace_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('TracedService_joinTrace_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php
deleted file mode 100644
index cabc260ea..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class TracedService_startTrace_args extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'request',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\StartTraceRequest',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Crossdock\StartTraceRequest
- */
- public $request = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'TracedService_startTrace_args';
- }
-
- public function read($input)
- {
- return $this->_read('TracedService_startTrace_args', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('TracedService_startTrace_args', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php
deleted file mode 100644
index f4b114e64..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class TracedService_startTrace_result extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'isRequired' => false,
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse',
- ),
- );
-
- /**
- * @var \Jaeger\Thrift\Crossdock\TraceResponse
- */
- public $success = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'TracedService_startTrace_result';
- }
-
- public function read($input)
- {
- return $this->_read('TracedService_startTrace_result', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('TracedService_startTrace_result', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php
deleted file mode 100644
index 1b71e686b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace Jaeger\Thrift\Crossdock;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class Transport {
- const HTTP = 0;
- const TCHANNEL = 1;
- const DUMMY = 2;
- static public $__names = array(
- 0 => 'HTTP',
- 1 => 'TCHANNEL',
- 2 => 'DUMMY',
- );
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php
deleted file mode 100644
index 809a92d7c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Log extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'timestamp',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 2 => array(
- 'var' => 'fields',
- 'isRequired' => true,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Tag',
- ),
- ),
- );
-
- /**
- * @var int
- */
- public $timestamp = null;
- /**
- * @var \Jaeger\Thrift\Tag[]
- */
- public $fields = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Log';
- }
-
- public function read($input)
- {
- return $this->_read('Log', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Log', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php
deleted file mode 100644
index 3b925220a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Process extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'serviceName',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'tags',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Tag',
- ),
- ),
- );
-
- /**
- * @var string
- */
- public $serviceName = null;
- /**
- * @var \Jaeger\Thrift\Tag[]
- */
- public $tags = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Process';
- }
-
- public function read($input)
- {
- return $this->_read('Process', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Process', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php
deleted file mode 100644
index cff0c324d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php
+++ /dev/null
@@ -1,161 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Span extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'traceIdLow',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 2 => array(
- 'var' => 'traceIdHigh',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 3 => array(
- 'var' => 'spanId',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 4 => array(
- 'var' => 'parentSpanId',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 5 => array(
- 'var' => 'operationName',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 6 => array(
- 'var' => 'references',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\SpanRef',
- ),
- ),
- 7 => array(
- 'var' => 'flags',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- 8 => array(
- 'var' => 'startTime',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 9 => array(
- 'var' => 'duration',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 10 => array(
- 'var' => 'tags',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Tag',
- ),
- ),
- 11 => array(
- 'var' => 'logs',
- 'isRequired' => false,
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => '\Jaeger\Thrift\Log',
- ),
- ),
- );
-
- /**
- * @var int
- */
- public $traceIdLow = null;
- /**
- * @var int
- */
- public $traceIdHigh = null;
- /**
- * @var int
- */
- public $spanId = null;
- /**
- * @var int
- */
- public $parentSpanId = null;
- /**
- * @var string
- */
- public $operationName = null;
- /**
- * @var \Jaeger\Thrift\SpanRef[]
- */
- public $references = null;
- /**
- * @var int
- */
- public $flags = null;
- /**
- * @var int
- */
- public $startTime = null;
- /**
- * @var int
- */
- public $duration = null;
- /**
- * @var \Jaeger\Thrift\Tag[]
- */
- public $tags = null;
- /**
- * @var \Jaeger\Thrift\Log[]
- */
- public $logs = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Span';
- }
-
- public function read($input)
- {
- return $this->_read('Span', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Span', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php
deleted file mode 100644
index cb5ee78db..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class SpanRef extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'refType',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- 2 => array(
- 'var' => 'traceIdLow',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 3 => array(
- 'var' => 'traceIdHigh',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- 4 => array(
- 'var' => 'spanId',
- 'isRequired' => true,
- 'type' => TType::I64,
- ),
- );
-
- /**
- * @var int
- */
- public $refType = null;
- /**
- * @var int
- */
- public $traceIdLow = null;
- /**
- * @var int
- */
- public $traceIdHigh = null;
- /**
- * @var int
- */
- public $spanId = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'SpanRef';
- }
-
- public function read($input)
- {
- return $this->_read('SpanRef', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('SpanRef', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php
deleted file mode 100644
index d6d6f20c3..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class SpanRefType {
- const CHILD_OF = 0;
- const FOLLOWS_FROM = 1;
- static public $__names = array(
- 0 => 'CHILD_OF',
- 1 => 'FOLLOWS_FROM',
- );
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php
deleted file mode 100644
index 06af59939..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Tag extends TBase {
- static $isValidate = false;
-
- static $_TSPEC = array(
- 1 => array(
- 'var' => 'key',
- 'isRequired' => true,
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'vType',
- 'isRequired' => true,
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'vStr',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- 4 => array(
- 'var' => 'vDouble',
- 'isRequired' => false,
- 'type' => TType::DOUBLE,
- ),
- 5 => array(
- 'var' => 'vBool',
- 'isRequired' => false,
- 'type' => TType::BOOL,
- ),
- 6 => array(
- 'var' => 'vLong',
- 'isRequired' => false,
- 'type' => TType::I64,
- ),
- 7 => array(
- 'var' => 'vBinary',
- 'isRequired' => false,
- 'type' => TType::STRING,
- ),
- );
-
- /**
- * @var string
- */
- public $key = null;
- /**
- * @var int
- */
- public $vType = null;
- /**
- * @var string
- */
- public $vStr = null;
- /**
- * @var double
- */
- public $vDouble = null;
- /**
- * @var bool
- */
- public $vBool = null;
- /**
- * @var int
- */
- public $vLong = null;
- /**
- * @var string
- */
- public $vBinary = null;
-
- public function __construct($vals=null) {
- if (is_array($vals)) {
- parent::__construct(self::$_TSPEC, $vals);
- }
- }
-
- public function getName() {
- return 'Tag';
- }
-
- public function read($input)
- {
- return $this->_read('Tag', self::$_TSPEC, $input);
- }
-
- public function write($output) {
- return $this->_write('Tag', self::$_TSPEC, $output);
- }
-
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php
deleted file mode 100644
index 3b1f69f9f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-namespace Jaeger\Thrift;
-
-/**
- * Autogenerated by Thrift Compiler (0.11.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class TagType {
- const STRING = 0;
- const DOUBLE = 1;
- const BOOL = 2;
- const LONG = 3;
- const BINARY = 4;
- static public $__names = array(
- 0 => 'STRING',
- 1 => 'DOUBLE',
- 2 => 'BOOL',
- 3 => 'LONG',
- 4 => 'BINARY',
- );
-}
-
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php
deleted file mode 100644
index babc689dc..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Thrift\Transport\TTransport;
-
-class ThriftUdpTransport extends TTransport
-{
- private $socket;
-
- /**
- * @var string
- */
- private $host;
-
- /**
- * @var int
- */
- private $port;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @var Config
- */
- private $config;
-
- /**
- * ThriftUdpTransport constructor.
- * @param string $host
- * @param int $port
- * @param LoggerInterface $logger
- */
- public function __construct(string $host, int $port, LoggerInterface $logger = null, Config $config = null)
- {
- $this->setLogger($logger);
-
- $this->config = $config;
-
- $ipProtocol = $this->ipProtocolVersion();
- $this->socket = $this->createSocket($ipProtocol);
-
- $this->host = $host;
- $this->port = $port;
- }
-
- protected function setLogger($logger)
- {
- $this->logger = $logger ?? new NullLogger();
- }
-
- protected function createSocket(string $ipProtocol)
- {
- $socketDomain = AF_INET;
- if ($ipProtocol === Config::IPV6) {
- $socketDomain = AF_INET6;
- }
-
- $socket = @socket_create($socketDomain, SOCK_DGRAM, SOL_UDP);
- if ($socket === false) {
- $this->handleSocketError("socket_create failed");
- }
- return $socket;
- }
-
- protected function ipProtocolVersion()
- {
- if (!empty($this->config)) {
- return $this->config->ipProtocolVersion();
- }
- return "";
- }
-
- /**
- * Whether this transport is open.
- *
- * @return boolean true if open
- */
- public function isOpen()
- {
- return $this->socket !== null;
- }
-
- /**
- * Open the transport for reading/writing
- */
- public function open()
- {
- $ok = @socket_connect($this->socket, $this->host, $this->port);
- if ($ok === false) {
- $this->handleSocketError('socket_connect failed');
- }
- }
-
- /**
- * Close the transport.
- */
- public function close()
- {
- if (is_null($this->socket)) {
- $this->logger->warning("can't close empty socket");
- return ;
- }
-
- @socket_close($this->socket);
- $this->socket = null;
- }
-
- /**
- * Read some data into the array.
- *
- * @todo
- *
- * @param int $len How much to read
- * @return string The data that has been read
- */
- public function read($len)
- {
- }
-
- /**
- * Writes the given data out.
- *
- * @param string $buf The data to write
- */
- public function write($buf)
- {
- if (!$this->isOpen()) {
- $this->logger->warning('transport is closed');
- return ;
- }
-
- $ok = @socket_write($this->socket, $buf);
- if ($ok === false) {
- $this->handleSocketError("socket_write failed");
- }
- }
-
- public function handleSocketError($msg)
- {
- $errorCode = socket_last_error($this->socket);
- $errorMsg = socket_strerror($errorCode);
-
- $this->logger->warning(sprintf('%s: [code - %d] %s', $msg, $errorCode, $errorMsg));
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php
deleted file mode 100644
index bb0649a0b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php
+++ /dev/null
@@ -1,420 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use Exception;
-use OpenTracing\Scope as OTScope;
-use OpenTracing\Span as OTSpan;
-use OpenTracing\UnsupportedFormatException;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use Jaeger\Codec\BinaryCodec;
-use Jaeger\Codec\CodecInterface;
-use Jaeger\Codec\TextCodec;
-use Jaeger\Codec\ZipkinCodec;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sampler\SamplerInterface;
-use OpenTracing\Tracer as OTTracer;
-use OpenTracing\SpanContext as OTSpanContext;
-use OpenTracing\Reference;
-use OpenTracing\StartSpanOptions;
-use OpenTracing\Exceptions\UnsupportedFormat;
-use const OpenTracing\Formats\BINARY;
-use const OpenTracing\Formats\HTTP_HEADERS;
-use const OpenTracing\Formats\TEXT_MAP;
-use const OpenTracing\Tags\SPAN_KIND;
-use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER;
-use OpenTracing\ScopeManager as OTScopeManager;
-
-class Tracer implements OTTracer
-{
- /**
- * @var string
- */
- private $serviceName;
-
- /**
- * @var ReporterInterface
- */
- private $reporter;
-
- /**
- * @var SamplerInterface
- */
- private $sampler;
-
- /**
- * @var string
- */
- private $ipAddress;
-
- /**
- * @var string
- */
- private $debugIdHeader;
-
- /**
- * @var CodecInterface[]
- */
- private $codecs;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @var bool
- */
- private $oneSpanPerRpc;
-
- /**
- * @var string[]
- */
- private $tags;
-
- /**
- * @var ScopeManager
- */
- private $scopeManager;
-
- /**
- * Tracer constructor.
- * @param string $serviceName
- * @param ReporterInterface $reporter
- * @param SamplerInterface $sampler
- * @param bool $oneSpanPerRpc
- * @param LoggerInterface|null $logger
- * @param ScopeManager|null $scopeManager
- * @param string $traceIdHeader
- * @param string $baggageHeaderPrefix
- * @param string $debugIdHeader
- * @param array|null $tags
- */
- public function __construct(
- $serviceName,
- ReporterInterface $reporter,
- SamplerInterface $sampler,
- $oneSpanPerRpc = true,
- LoggerInterface $logger = null,
- ScopeManager $scopeManager = null,
- $traceIdHeader = TRACE_ID_HEADER,
- $baggageHeaderPrefix = BAGGAGE_HEADER_PREFIX,
- $debugIdHeader = DEBUG_ID_HEADER_KEY,
- $tags = null
- ) {
- $this->serviceName = $serviceName;
- $this->reporter = $reporter;
- $this->sampler = $sampler;
- $this->oneSpanPerRpc = $oneSpanPerRpc;
-
- $this->logger = $logger ?? new NullLogger();
- $this->scopeManager = $scopeManager ?? new ScopeManager();
-
- $this->debugIdHeader = $debugIdHeader;
-
- $this->codecs = [
- TEXT_MAP => new TextCodec(
- false,
- $traceIdHeader,
- $baggageHeaderPrefix,
- $debugIdHeader
- ),
- HTTP_HEADERS => new TextCodec(
- true,
- $traceIdHeader,
- $baggageHeaderPrefix,
- $debugIdHeader
- ),
- BINARY => new BinaryCodec(),
- ZIPKIN_SPAN_FORMAT => new ZipkinCodec(),
- ];
-
- $this->tags = [
- JAEGER_VERSION_TAG_KEY => JAEGER_CLIENT_VERSION,
- ];
- if ($tags !== null) {
- $this->tags = array_merge($this->tags, $tags);
- }
-
- $hostname = $this->getHostName();
- $this->ipAddress = $this->getHostByName($hostname);
-
- if (!empty($hostname)) {
- $this->tags[JAEGER_HOSTNAME_TAG_KEY] = $hostname;
- }
- }
-
- /**
- * @return string[]
- */
- public function getTags(): array
- {
- return $this->tags;
- }
-
- /**
- * {@inheritdoc}
- */
- public function startSpan(string $operationName, $options = []): OTSpan
- {
- if (!($options instanceof StartSpanOptions)) {
- $options = StartSpanOptions::create($options);
- }
-
- $parent = $this->getParentSpanContext($options);
- $tags = $options->getTags();
-
- $rpcServer = ($tags[SPAN_KIND] ?? null) == SPAN_KIND_RPC_SERVER;
-
- if ($parent == null || $parent->isDebugIdContainerOnly()) {
- $traceId = $this->randomId();
- $spanId = $traceId;
- $parentId = null;
- $flags = 0;
- $baggage = null;
- if ($parent == null) {
- list($sampled, $samplerTags) = $this->sampler->isSampled($traceId, $operationName);
- if ($sampled) {
- $flags = SAMPLED_FLAG;
- $tags = $tags ?? [];
- foreach ($samplerTags as $key => $value) {
- $tags[$key] = $value;
- }
- }
- } else { // have debug id
- $flags = SAMPLED_FLAG | DEBUG_FLAG;
- $tags = $tags ?? [];
- $tags[$this->debugIdHeader] = $parent->getDebugId();
- }
- } else {
- $traceId = $parent->getTraceId();
- if ($rpcServer && $this->oneSpanPerRpc) {
- // Zipkin-style one-span-per-RPC
- $spanId = $parent->getSpanId();
- $parentId = $parent->getParentId();
- } else {
- $spanId = $this->randomId();
- $parentId = $parent->getSpanId();
- }
-
- $flags = $parent->getFlags();
- $baggage = $parent->getBaggage();
- }
-
- $spanContext = new SpanContext(
- $traceId,
- $spanId,
- $parentId,
- $flags,
- $baggage
- );
-
- $span = new Span(
- $spanContext,
- $this,
- $operationName,
- $tags ?? [],
- $options->getStartTime()
- );
-
- $mergedTags = array_merge($this->tags, $tags);
- $span->setTags($mergedTags);
-
- return $span;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param SpanContext $spanContext
- * @param string $format
- * @param mixed $carrier
- * @return void
- *
- * @throws UnsupportedFormat
- */
- public function inject(OTSpanContext $spanContext, string $format, &$carrier): void
- {
- if ($spanContext instanceof SpanContext) {
- $codec = $this->codecs[$format] ?? null;
-
- if ($codec == null) {
- throw UnsupportedFormatException::forFormat(is_scalar($format) ? $format : gettype($format));
- }
-
-
- $codec->inject($spanContext, $carrier);
- return;
- }
-
- $message = sprintf(
- 'Invalid span context. Expected Jaeger\SpanContext, got %s.',
- is_object($spanContext) ? get_class($spanContext) : gettype($spanContext)
- );
-
- $this->logger->warning($message);
- }
-
- /**
- * {@inheritdoc}
- *
- * @param mixed $carrier
- * @return SpanContext|null
- *
- * @throws UnsupportedFormat
- */
- public function extract(string $format, $carrier): ?OTSpanContext
- {
- $codec = $this->codecs[$format] ?? null;
-
- if ($codec == null) {
- throw UnsupportedFormatException::forFormat(is_scalar($format) ? $format : gettype($format));
- }
-
- try {
- return $codec->extract($carrier);
- } catch (\Throwable $e) {
- $this->logger->warning($e->getMessage());
-
- return null;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function flush(): void
- {
- $this->sampler->close();
- $this->reporter->close();
- }
-
- public function reportSpan(Span $span)
- {
- $this->reporter->reportSpan($span);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getScopeManager(): OTScopeManager
- {
- return $this->scopeManager;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getActiveSpan(): ?OTSpan
- {
- $activeScope = $this->getScopeManager()->getActive();
- if ($activeScope === null) {
- return null;
- }
-
- return $activeScope->getSpan();
- }
-
- /**
- * {@inheritdoc}
- */
- public function startActiveSpan(string $operationName, $options = []): OTScope
- {
- if (!$options instanceof StartSpanOptions) {
- $options = StartSpanOptions::create($options);
- }
-
- if (!$this->getParentSpanContext($options) && $this->getActiveSpan() !== null) {
- $parent = $this->getActiveSpan()->getContext();
- $options = $options->withParent($parent);
- }
-
- $span = $this->startSpan($operationName, $options);
- $scope = $this->scopeManager->activate($span, $options->shouldFinishSpanOnClose());
-
- return $scope;
- }
-
- /**
- * Gets parent span context (if any).
- *
- * @param StartSpanOptions $options
- * @return null|OTSpanContext|SpanContext
- */
- private function getParentSpanContext(StartSpanOptions $options)
- {
- $references = $options->getReferences();
- foreach ($references as $ref) {
- if ($ref->isType(Reference::CHILD_OF)) {
- return $ref->getSpanContext();
- }
- }
-
- return null;
- }
-
- /**
- * @return string
- * @throws Exception
- */
- private function randomId(): string
- {
- return (string) random_int(0, PHP_INT_MAX);
- }
-
- /**
- * The facade to get the host name.
- *
- * @return string
- */
- protected function getHostName()
- {
- return gethostname();
- }
-
- /**
- * The facade to get IPv4 address corresponding to a given Internet host name.
- *
- * NOTE: DNS Resolution may take too long, and during this time your script is NOT being executed.
- *
- * @param string|null $hostname
- * @return string
- */
- protected function getHostByName($hostname)
- {
- if (empty($hostname)) {
- $this->logger->error('Unable to determine host name');
- return '127.0.0.1';
- }
-
- return gethostbyname($hostname);
- }
-
- /**
- * @param SamplerInterface $sampler
- * @return $this
- */
- public function setSampler(SamplerInterface $sampler)
- {
- $this->sampler = $sampler;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getServiceName()
- {
- return $this->serviceName;
- }
-
- /**
- * @return string
- */
- public function getIpAddress()
- {
- return $this->ipAddress;
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php
deleted file mode 100644
index d767ad40f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-namespace Jaeger\Util;
-
-use Psr\Cache\CacheItemInterface;
-use Psr\Cache\CacheItemPoolInterface;
-
-class RateLimiter
-{
- /**
- * @var CacheItemPoolInterface
- */
- private $cache;
-
- /**
- * @var CacheItemInterface
- */
- private $balance;
-
- /**
- * @var CacheItemInterface
- */
- private $lastTick;
-
- /**
- * @var float
- */
- private $creditsPerNanosecond = 0;
-
- /**
- * @var float
- */
- private $maxBalance = 0;
-
- /**
- * RateLimiter constructor.
- *
- * @param CacheItemPoolInterface $cache
- * @param string $currentBalanceKey key of current balance value in $cache
- * @param string $lastTickKey key of last tick value in $cache
- * @throws \Psr\Cache\InvalidArgumentException
- */
- public function __construct(
- CacheItemPoolInterface $cache,
- string $currentBalanceKey,
- string $lastTickKey
- ) {
- $this->cache = $cache;
- $this->balance = $this->cache->getItem($currentBalanceKey);
- $this->lastTick = $this->cache->getItem($lastTickKey);
- }
-
- /**
- * @param $itemCost
- * @return bool
- */
- public function checkCredit($itemCost)
- {
- if (!$this->creditsPerNanosecond) {
- return false;
- }
-
- list($lastTick, $balance) = $this->getState();
-
- if (!$lastTick) {
- $this->saveState(hrtime(true), 0);
- return true;
- }
-
- $currentTick = hrtime(true);
- $elapsedTime = $currentTick - $lastTick;
- $balance += $elapsedTime * $this->creditsPerNanosecond;
- if ($balance > $this->maxBalance) {
- $balance = $this->maxBalance;
- }
-
- $result = false;
- if ($balance >= $itemCost) {
- $balance -= $itemCost;
- $result = true;
- }
-
- $this->saveState($currentTick, $balance);
-
- return $result;
- }
-
-
- /**
- * Initializes limiter costs and boundaries
- *
- * @param float $creditsPerNanosecond
- * @param float $maxBalance
- */
- public function initialize(float $creditsPerNanosecond, float $maxBalance)
- {
- $this->creditsPerNanosecond = $creditsPerNanosecond;
- $this->maxBalance = $maxBalance;
- }
-
- /**
- * Method loads last tick and current balance from cache
- *
- * @return array [$lastTick, $balance]
- */
- private function getState() : array
- {
- return [
- $this->lastTick->get(),
- $this->balance->get()
- ];
- }
-
- /**
- * Method saves last tick and current balance into cache
- *
- * @param integer $lastTick
- * @param float $balance
- */
- private function saveState($lastTick, $balance)
- {
- $this->lastTick->set($lastTick);
- $this->balance->set($balance);
- $this->cache->saveDeferred($this->lastTick);
- $this->cache->saveDeferred($this->balance);
- $this->cache->commit();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php
deleted file mode 100644
index 79a1dd96f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php
+++ /dev/null
@@ -1,170 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Codec;
-
-use Exception;
-use const Jaeger\BAGGAGE_HEADER_PREFIX;
-use Jaeger\Codec\TextCodec;
-use const Jaeger\DEBUG_ID_HEADER_KEY;
-use Jaeger\SpanContext;
-use const Jaeger\TRACE_ID_HEADER;
-use PHPUnit\Framework\TestCase;
-
-class TextCodecTest extends TestCase
-{
- /** @var TextCodec */
- private $textCodec;
-
- public function setUp(): void
- {
- $this->textCodec = new TextCodec();
- }
-
- public function testCanInjectSimpleContextInCarrier(): void
- {
- $context = new SpanContext('trace-id', 'span-id', null, null);
- $carrier = [];
-
- $this->textCodec->inject($context, $carrier);
-
- $this->assertCount(1 , $carrier);
- $this->assertArrayHasKey(TRACE_ID_HEADER, $carrier);
- }
-
- /**
- * @dataProvider contextDataProvider
- * @param bool $urlEncode
- * @param $baggage
- */
- public function testCanInjectContextBaggageInCarrier(bool $urlEncode, $baggage, $injectedBaggage): void
- {
- $carrier = [];
-
- $context = new SpanContext('trace-id', 'span-id', null, null, $baggage);
- $textCodec = new TextCodec($urlEncode);
- $textCodec->inject($context, $carrier);
-
- $this->assertCount(1 + count($baggage) , $carrier);
- $this->assertArrayHasKey(TRACE_ID_HEADER, $carrier);
- foreach ($injectedBaggage as $key => $value) {
- $this->assertArrayHasKey(BAGGAGE_HEADER_PREFIX . $key, $carrier);
- $this->assertEquals($carrier[BAGGAGE_HEADER_PREFIX . $key], $value);
- }
- }
-
- public function contextDataProvider()
- {
- return [
- [false, ['baggage-1' => 'baggage value'], ['baggage-1' => 'baggage value']],
- [false, ['baggage-1' => 'https://testdomain.sk'], ['baggage-1' => 'https://testdomain.sk']],
- [true, ['baggage-1' => 'https://testdomain.sk'], ['baggage-1' => 'https%3A%2F%2Ftestdomain.sk']],
- ];
- }
-
- /**
- * @dataProvider carrierDataProvider
- * @param $urlEncode
- * @param $carrier
- * @param $traceId
- * @param $spanId
- * @param $parentId
- * @param $flags
- * @param $baggage
- * @throws \Exception
- */
- public function testSpanContextParsingFromHeader($urlEncode, $carrier, $traceId, $spanId, $parentId, $flags, $baggage): void
- {
- $textCodec = new TextCodec($urlEncode);
- $spanContext = $textCodec->extract($carrier);
-
- $this->assertEquals($traceId, $spanContext->getTraceId());
- $this->assertEquals($spanId, $spanContext->getSpanId());
- $this->assertEquals($parentId, $spanContext->getParentId());
- $this->assertEquals($flags, $spanContext->getFlags());
- $this->assertCount(count($baggage), $spanContext->getBaggage() ? $spanContext->getBaggage() : []);
- foreach ($baggage as $key => $value) {
- $this->assertEquals($value, $spanContext->getBaggageItem($key));
- }
- }
-
- public function carrierDataProvider(): array
- {
- return [
- [
- false,
- [
- TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1'
- ],
- "3639838965278119798",
- "1114643325879075213",
- "-1070935975401544891",
- 1,
- []
- ],
- [
- false,
- [
- TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1',
- BAGGAGE_HEADER_PREFIX . 'baggage-1' => 'https://testdomain.sk',
- ],
- "3639838965278119798",
- "1114643325879075213",
- "-1070935975401544891",
- 1,
- ['baggage-1' => 'https://testdomain.sk']
- ],
- [
- true,
- [
- TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1',
- BAGGAGE_HEADER_PREFIX . 'baggage-1' => 'https%3A%2F%2Ftestdomain.sk',
- ],
- "3639838965278119798",
- "1114643325879075213",
- "-1070935975401544891",
- 1,
- ['baggage-1' => 'https://testdomain.sk']
- ]
- ];
- }
-
- public function testBaggageWithoutTraceContext(): void
- {
- $carrier = [BAGGAGE_HEADER_PREFIX.'test' => 'some data'];
-
- $this->expectException(Exception::class);
- $this->expectExceptionMessage('baggage without trace ctx');
-
- $this->textCodec->extract($carrier);
- }
-
- public function testInvalidSpanContextParsingFromHeader(): void
- {
- $carrier = [TRACE_ID_HEADER => 'invalid_data'];
-
- $this->expectException(Exception::class);
- $this->expectExceptionMessage('Malformed tracer state string.');
-
- $this->textCodec->extract($carrier);
- }
-
- public function testExtractDebugSpanContext(): void
- {
- $carrier = [DEBUG_ID_HEADER_KEY => 'debugId'];
-
- $spanContext = $this->textCodec->extract($carrier);
-
- $this->assertEquals('debugId', $spanContext->getDebugId());
- $this->assertNull($spanContext->getTraceId());
- $this->assertNull($spanContext->getSpanId());
- $this->assertNull($spanContext->getParentId());
- $this->assertNull($spanContext->getFlags());
- }
-
-
- public function testExtractEmptySpanContext(): void
- {
- $spanContext = $this->textCodec->extract([]);
- $this->assertNull($spanContext);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php
deleted file mode 100644
index 047caac2e..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Codec;
-
-use Jaeger\Codec\ZipkinCodec;
-use Jaeger\SpanContext;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\DEBUG_FLAG;
-use const Jaeger\SAMPLED_FLAG;
-
-class ZipkinCodecTest extends TestCase
-{
- /** @var ZipkinCodec */
- private $codec;
-
- function setUp(): void
- {
- $this->codec = new ZipkinCodec;
- }
-
- function testInject()
- {
- // Given
- $traceId = 123;
- $spanId = 456;
- $parentId = 789;
-
- $spanContext = new SpanContext(
- $traceId,
- $spanId,
- $parentId,
- SAMPLED_FLAG
- );
- $carrier = [];
-
- // When
- $this->codec->inject($spanContext, $carrier);
-
- // Then
- $this->assertEquals('7b', $carrier['X-B3-TraceId']);
- $this->assertEquals('1c8', $carrier['X-B3-SpanId']);
- $this->assertEquals('315', $carrier['X-B3-ParentSpanId']);
- $this->assertSame(1, $carrier['X-B3-Flags']);
- }
-
- function testExtract()
- {
- // Given
- $carrier = [
- 'x-b3-traceid' => 'a53bf337d7e455e1',
- 'x-b3-spanid' => '153bf227d1f455a1',
- 'x-b3-parentspanid' => 'a53bf337d7e455e1',
- 'x-b3-flags' => '1',
- ];
-
- // When
- $spanContext = $this->codec->extract($carrier);
-
- // Then
- $this->assertEquals(new SpanContext(
- '-6540366612654696991',
- '1530082751262512545',
- '-6540366612654696991',
- DEBUG_FLAG
- ), $spanContext);
- }
-
- function testExtractWithoutParentSpanId()
- {
- // Given
- $carrier = [
- 'x-b3-traceid' => '8d824d69da5f50d9',
- 'x-b3-spanid' => '8d824d69da5f50d9',
- 'x-b3-flags' => '1',
- ];
-
- // When
- $spanContext = $this->codec->extract($carrier);
-
- // Then
- $this->assertEquals(new SpanContext(
- '-8249946450358742823',
- '-8249946450358742823',
- '0',
- DEBUG_FLAG
- ), $spanContext);
- }
-
- function testExtractInvalidHeader()
- {
- // Given
- $carrier = [
- 'x-b3-traceid' => 'zzzz',
- 'x-b3-spanid' => '463ac35c9f6413ad48485a3953bb6124',
- 'x-b3-flags' => '1',
- ];
-
- // When
- $spanContext = $this->codec->extract($carrier);
-
- // Then
- $this->assertEquals(null, $spanContext);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php
deleted file mode 100644
index da1a9781e..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php
+++ /dev/null
@@ -1,257 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Exception;
-use Jaeger\Config;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sampler\SamplerInterface;
-use Jaeger\Tracer;
-use OpenTracing\GlobalTracer;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\SAMPLER_TYPE_CONST;
-
-class ConfigTest extends TestCase
-{
- /**
- * @var Config
- */
- private $config;
-
- /**
- * @var ReporterInterface
- */
- private $reporter;
-
- /**
- * @var SamplerInterface
- */
- private $sampler;
-
- /**
- * @var string
- */
- private $serviceName = 'test-service';
-
- function setUp(): void
- {
- $this->config = new Config([], $this->serviceName);
- $this->reporter = $this->createMock(ReporterInterface::class);
- $this->sampler = $this->createmock(SamplerInterface::class);
- }
-
- function testCreateTracer()
- {
- $tracer = $this->config->createTracer($this->reporter, $this->sampler);
-
- $this->assertEquals(Tracer::class, get_class($tracer));
- $this->assertEquals($this->serviceName, $tracer->getServiceName());
- }
-
- function testThrowExceptionWhenServiceNameIsNotDefined()
- {
- $this->expectException(Exception::class);
- $this->expectExceptionMessage('service_name required in the config or param.');
-
- new Config([]);
- }
-
- function testSetServiceNameFromConfig()
- {
- $config = new Config(['service_name' => 'test-service-name-from-config']);
-
- $serviceName = $config->getServiceName();
-
- $this->assertEquals('test-service-name-from-config', $serviceName);
- }
-
- /**
- * @test
- */
- public function shouldSetGlobalTracerAfterInitialize()
- {
- //given
- $config = new Config(['service_name' => 'test-service-name']);
-
- //when
- $config->initializeTracer();
-
- //then
- $tracer = GlobalTracer::get();
- $this->assertInstanceOf(Tracer::class, $tracer);
- }
-
- /** @test */
- public function shouldThrowExceptionWhenCreatingNotSupportedSampler()
- {
- $config = new Config(['service_name' => 'test-service-name', 'sampler' => ['type' => 'unsupportedSampler']]);
-
- $this->expectException(Exception::class);
- $this->expectExceptionMessage('Unknown sampler type unsupportedSampler');
-
- $config->initializeTracer();
- }
-
- /** @test */
- public function shouldThrowExceptionWhenCreatingRateLimitingSamplerWithoutCacheComponent()
- {
- $config = new Config([
- 'service_name' => 'test-service-name',
- 'sampler' => ['type' => \Jaeger\SAMPLER_TYPE_RATE_LIMITING]
- ]);
-
- $this->expectException(Exception::class);
- $this->expectExceptionMessage('You cannot use RateLimitingSampler without cache component');
-
- $config->initializeTracer();
- }
-
- /** @test */
- public function shouldPassDifferentDispatchMode() {
- foreach (Config::getAvailableDispatchModes() as $dispatchMode) {
- $config = new Config(
- [
- 'sampler' => [
- 'type' => SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'logging' => false,
- "local_agent" => [
- "reporting_host" => "localhost",
- ],
- 'dispatch_mode' => $dispatchMode,
- ],
- 'your-app-name'
- );
- $config->initializeTracer();
- $this->expectNotToPerformAssertions();
- }
- }
-
- /** @test */
- public function shouldPassConfiguredTagsToTracer()
- {
- $tags = [
- 'bar' => 'a-value',
- 'other.tag' => 'foo',
- ];
-
- $config = new Config([
- 'sampler' => [
- 'type' => SAMPLER_TYPE_CONST,
- 'param' => true,
- ],
- 'service_name' => 'test-service-name',
- 'tags' => $tags,
- ]);
-
- $tracer = $config->initializeTracer();
- $span = $tracer->startSpan('test-span');
- $spanTags = $span->getTags();
-
- foreach ($tags as $name => $value) {
- $this->assertArrayHasKey($name, $spanTags, "Tag '$name' should be set on span");
- $this->assertEquals($value, $spanTags[$name]->value, "Tag '$name' should have configured value");
- }
- }
-
- /**
- * @test
- * @dataProvider shouldSetConfigPropertiesFromEnvVarsProvider
- */
- public function shouldSetConfigPropertiesFromEnvVars($varName, $varVal, $initialConfig, $valueGetter, $expectedVal)
- {
- $_ENV[$varName] = $varVal;
-
- $config = new Config([]);
- $configProperty = (new \ReflectionObject($config))->getProperty('config');
- $configProperty->setAccessible('true');
- $configArray = $configProperty->getValue($config);
-
- $this->assertSame($expectedVal, $valueGetter($configArray));
- }
-
- /**
- * @test
- * @dataProvider shouldSetConfigPropertiesFromEnvVarsProvider
- */
- public function shouldNotSetConfigPropertiesFromEnvVars($varName, $varVal, $initialConfig, $valueGetter, $expectedVal)
- {
- $_ENV[$varName] = $varVal;
-
- $config = new Config($initialConfig);
- $configProperty = (new \ReflectionObject($config))->getProperty('config');
- $configProperty->setAccessible('true');
- $configArray = $configProperty->getValue($config);
-
- $this->assertNotEquals($expectedVal, $valueGetter($configArray));
- }
-
- /**
- * 0 -> varName
- * 1 -> varVal
- * 2 -> initialConfig
- * 3 -> valueGetter
- * 4 -> expectedVal
- */
- public function shouldSetConfigPropertiesFromEnvVarsProvider() {
- return [
- [
- 'JAEGER_SERVICE_NAME',
- 'some-str',
- ['service_name' => 'some-other-str'],
- function ($a) { return $a['service_name']; },
- 'some-str',
- ],
- [
- 'JAEGER_TAGS',
- 'some-str',
- ['tags' => 'some-other-str'],
- function ($a) { return $a['tags']; },
- 'some-str',
- ],
- [
- 'JAEGER_AGENT_HOST',
- 'some-str',
- ['local_agent' => ['reporting_host' => 'some-other-str']],
- function ($a) { return $a['local_agent']['reporting_host'];},
- 'some-str',
- ],
- [
- 'JAEGER_AGENT_PORT',
- '2222',
- ['local_agent' => ['reporting_port' => 1111]],
- function ($a) { return $a['local_agent']['reporting_port']; },
- 2222,
- ],
- [
- 'JAEGER_REPORTER_LOG_SPANS',
- 'true',
- ['logging' => false],
- function ($a) { return $a['logging']; },
- true,
- ],
- [
- 'JAEGER_REPORTER_MAX_QUEUE_SIZE',
- '2222',
- ['max_buffer_length' => 1111],
- function ($a) { return $a['max_buffer_length']; },
- 2222,
- ],
- [
- 'JAEGER_SAMPLER_TYPE',
- 'some-str',
- ['sampler' => ['type' => 'some-other-str']],
- function ($a) { return $a['sampler']['type']; },
- 'some-str',
- ],
- [
- 'JAEGER_SAMPLER_PARAM',
- 'some-str',
- ['sampler' => ['param' => 'some-other-str']],
- function ($a) { return $a['sampler']['param']; },
- 'some-str',
- ],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php
deleted file mode 100644
index fd8789dc3..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Logger;
-
-use Psr\Log\LoggerTrait;
-
-class StackLogger implements \Psr\Log\LoggerInterface
-{
- /** @var array */
- protected $messagesStack = [];
-
- use LoggerTrait;
-
- public function log($level, $message, array $context = array()): void
- {
- $this->messagesStack[] = $message;
- }
-
- public function getLastMessage() {
- return array_pop($this->messagesStack);
- }
-
- public function getMessagesCount() {
- return count($this->messagesStack);
- }
-
- public function clear() {
- $this->messagesStack = [];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php
deleted file mode 100644
index d536cb63a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-
-use Jaeger\Mapper\SpanToJaegerMapper;
-use Jaeger\Reporter\NullReporter;
-use Jaeger\Sampler\ConstSampler;
-use Jaeger\Span;
-use Jaeger\SpanContext;
-use Jaeger\Thrift\TagType;
-use Jaeger\Tracer;
-use const Jaeger\SAMPLED_FLAG;
-use const OpenTracing\Tags\COMPONENT;
-use const OpenTracing\Tags\PEER_HOST_IPV4;
-use const OpenTracing\Tags\PEER_PORT;
-use const OpenTracing\Tags\PEER_SERVICE;
-use const OpenTracing\Tags\SPAN_KIND;
-use const OpenTracing\Tags\SPAN_KIND_RPC_CLIENT;
-
-class SpanToJaegerMapperTest extends \PHPUnit\Framework\TestCase
-{
- private $serviceName = "test-service";
- /**
- * @var Tracer
- */
- private $tracer;
-
- /**
- * @var SpanContext
- */
- private $context;
-
- /**
- * {@inheritdoc}
- */
- public function setUp(): void
- {
- $this->tracer = new Tracer($this->serviceName, new NullReporter, new ConstSampler);
- $this->context = new SpanContext(0, 0, 0, SAMPLED_FLAG);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function tearDown(): void
- {
- $this->tracer = null;
- $this->context = null;
- }
-
- /** @test */
- public function shouldProperlyInitializeAtConstructTime(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $span->setTags([
- "tag-bool1" => true,
- "tag-bool2" => false,
- "tag-int" => 1234567,
- "tag-float" => 1.23456,
- "tag-string" => "hello-world"
- ]);
-
- $mapper = new SpanToJaegerMapper();
- $thriftSpan = $mapper->mapSpanToJaeger($span);
-
- $index = 0;
- $this->assertEquals($thriftSpan->tags[$index]->key, "component");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::STRING);
- $this->assertEquals($thriftSpan->tags[$index]->vStr, $this->serviceName);
- $index++;
-
- $this->assertEquals($thriftSpan->tags[$index]->key, "tag-bool1");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::BOOL);
- $this->assertEquals($thriftSpan->tags[$index]->vBool, true);
- $index++;
-
- $this->assertEquals($thriftSpan->tags[$index]->key, "tag-bool2");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::BOOL);
- $this->assertEquals($thriftSpan->tags[$index]->vBool, false);
- $index++;
-
- $this->assertEquals($thriftSpan->tags[$index]->key, "tag-int");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::LONG);
- $this->assertEquals($thriftSpan->tags[$index]->vLong, 1234567);
- $index++;
-
- $this->assertEquals($thriftSpan->tags[$index]->key, "tag-float");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::DOUBLE);
- $this->assertEquals($thriftSpan->tags[$index]->vDouble, 1.23456);
- $index++;
-
- $this->assertEquals($thriftSpan->tags[$index]->key, "tag-string");
- $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::STRING);
- $this->assertEquals($thriftSpan->tags[$index]->vStr, "hello-world");
- $index++;
- }
-
- /**
- * @dataProvider specialTagProvider
- * @param array<string, mixed> $tags
- * @return void
- */
- public function testSpecialTagsAreAdded(array $tags): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $span->setTags($tags);
-
- // The component tag is always added, even if it's not specified in tags
- $expectedTagValues = array_merge([COMPONENT => $this->serviceName], $tags);
-
- $mapper = new SpanToJaegerMapper();
- $thriftSpan = $mapper->mapSpanToJaeger($span);
-
- $foundTags = [];
-
- foreach ($thriftSpan->tags as $tag) {
- $foundTags[] = $tag->key;
-
- switch ($tag->key) {
- case PEER_SERVICE:
- case PEER_HOST_IPV4:
- case SPAN_KIND:
- case COMPONENT:
- $this->assertEquals(TagType::STRING, $tag->vType, 'Incorrect tag value type');
- $this->assertEquals($expectedTagValues[$tag->key], $tag->vStr, 'Incorrect tag value');
- break;
- case PEER_PORT:
- $this->assertEquals(TagType::LONG, $tag->vType, 'Incorrect tag value type');
- $this->assertEquals($expectedTagValues[$tag->key], $tag->vLong, 'Incorrect tag value');
- break;
- }
- }
-
- $this->assertEqualsCanonicalizing(array_keys($expectedTagValues), $foundTags, 'Some of the tags are missing');
- }
-
- public function specialTagProvider(): array
- {
- return [
- [
- [
- 'bool_tag' => true,
- PEER_SERVICE => 'my_service',
- PEER_HOST_IPV4 => '127.0.0.1',
- PEER_PORT => 443,
- SPAN_KIND => SPAN_KIND_RPC_CLIENT,
- COMPONENT => 'grpc',
- ],
- ],
- [
- [
- 'int_tag' => 5,
- PEER_HOST_IPV4 => '192.168.0.1',
- PEER_PORT => 80,
- ],
- ],
- [
- [
- 'string_tag' => 'testing-tag',
- PEER_PORT => 80,
- COMPONENT => 'grpc',
- ],
- ],
- [
- [
- 'string_tag' => 'testing-tag',
- ],
- ],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php
deleted file mode 100644
index ef95ebfe7..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Reporter;
-
-use Jaeger\Reporter\CompositeReporter;
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class CompositeReporterTest extends TestCase
-{
- /** @var CompositeReporter */
- private $reporter;
-
- /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */
- private $childReporter1;
-
- /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */
- private $childReporter2;
-
- /**
- * {@inheritdoc}
- */
- public function setUp(): void
- {
- $this->childReporter1 = $this->createMock(ReporterInterface::class);
- $this->childReporter2 = $this->createMock(ReporterInterface::class);
-
- $this->reporter = new CompositeReporter($this->childReporter1, $this->childReporter2);
- }
-
- /** @test */
- public function shouldReportSpan()
- {
- /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */
- $span = $this->createMock(Span::class);
-
- $this->childReporter1->expects($this->once())->method('reportSpan')->with($span);
- $this->childReporter2->expects($this->once())->method('reportSpan')->with($span);
-
- $this->reporter->reportSpan($span);
- }
-
- /** @test */
- public function shouldCloseReporter()
- {
- $this->childReporter1->expects($this->once())->method('close');
- $this->childReporter2->expects($this->once())->method('close');
-
- $this->reporter->close();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php
deleted file mode 100644
index 966a62fa4..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Reporter;
-
-use Jaeger\Reporter\InMemoryReporter;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class InMemoryReporterTest extends TestCase
-{
- /** @test */
- public function shouldReportSpan()
- {
- /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */
- $span = $this->createMock(Span::class);
- $reporter = new InMemoryReporter();
-
- $reporter->reportSpan($span);
- $reporter->close();
-
- $spans = $reporter->getSpans();
- $this->assertEquals([$span], $spans);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php
deleted file mode 100644
index dc7c490d2..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Reporter;
-
-use Jaeger\Reporter\LoggingReporter;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-use Psr\Log\NullLogger;
-
-class LoggingReporterTest extends TestCase
-{
- /** @test */
- public function shouldReportSpan()
- {
- /**
- * @var NullLogger|\PHPUnit\Framework\MockObject\MockObject v
- * @var Span|\PHPUnit\Framework\MockObject\MockObject $span
- */
- $logger = $this->createMock(NullLogger::class);
- $span = $this->createMock(Span::class);
-
- $reporter = new LoggingReporter($logger);
-
- $logger->expects($this->once())
- ->method('debug')
- ->with($this->stringStartsWith('Reporting span'));
-
- $reporter->reportSpan($span);
- $reporter->close();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php
deleted file mode 100644
index e6a66cb8a..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Reporter;
-
-use Jaeger\Reporter\NullReporter;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class NullReporterTest extends TestCase
-{
- /**
- * Nothing to test because NullReporter doing nothing.
- *
- * @test
- */
- public function shouldReportSpan()
- {
- /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */
- $span = $this->createMock(Span::class);
-
- $reporter = new NullReporter();
-
- $reporter->reportSpan($span);
- $reporter->close();
-
- // Only needed to avoid PhpUnit message: "This test did not perform any assertions"
- $this->assertTrue(true);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php
deleted file mode 100644
index 0b85f06d0..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Reporter;
-
-use Jaeger\Reporter\RemoteReporter;
-use Jaeger\Sender\UdpSender;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class RemoteReporterTest extends TestCase
-{
- /** @var RemoteReporter */
- private $reporter;
-
- /** @var UdpSender|\PHPUnit\Framework\MockObject\MockObject */
- private $transport;
-
- /**
- * {@inheritdoc}
- */
- public function setUp(): void
- {
- $this->transport = $this->createMock(UdpSender::class);
- $this->reporter = new RemoteReporter($this->transport);
- }
-
- /** @test */
- public function shouldReportSpan()
- {
- /** @var Span|\PHPUnit\Framework\MockObject\MockObject $span */
- $span = $this->createMock(Span::class);
-
- $this->transport->expects($this->once())->method('append')->with($span);
-
- $this->reporter->reportSpan($span);
- }
-
- /** @test */
- public function shouldCloseReporter()
- {
- $this->transport->expects($this->once())->method('flush');
- $this->transport->expects($this->once())->method('close');
-
- $this->reporter->close();
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php
deleted file mode 100644
index 85cb80504..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Sampler;
-
-use Jaeger\Sampler\ConstSampler;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_CONST;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-class ConstSamplerTest extends TestCase
-{
- /**
- * @test
- * @dataProvider samplerProvider
- * @param bool $decision
- * @param mixed $traceId
- */
- public function shouldDetermineWhetherOrTraceShouldBeSampled($decision, $traceId)
- {
- $sampler = new ConstSampler($decision);
-
- list($sampled, $tags) = $sampler->isSampled($traceId);
-
- $this->assertEquals($decision, $sampled);
- $this->assertEquals([
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_CONST,
- SAMPLER_PARAM_TAG_KEY => $decision,
- ], $tags);
-
- $sampler->close();
- }
-
- public function samplerProvider()
- {
- return [
- [true, 1],
- [true, PHP_INT_MAX],
- [false, 1],
- [false, PHP_INT_MAX],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php
deleted file mode 100644
index 2840ebf8c..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Sampler;
-
-use Jaeger\Sampler\ProbabilisticSampler;
-use OutOfBoundsException;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_PROBABILISTIC;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-class ProbablisticSamplerTest extends TestCase
-{
- /**
- * @test
- * @dataProvider samplerProvider
- * @param float $rate
- * @param mixed $traceId
- * @param bool $decision
- */
- public function shouldDetermineWhetherOrTraceShouldBeSampled($rate, $traceId, $decision)
- {
- $sampler = new ProbabilisticSampler($rate);
-
- list($sampled, $tags) = $sampler->isSampled($traceId);
-
- $this->assertEquals($decision, $sampled);
- $this->assertEquals([
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_PROBABILISTIC,
- SAMPLER_PARAM_TAG_KEY => $rate,
- ], $tags);
-
- $sampler->close();
- }
-
- public function samplerProvider()
- {
- return [
- [1.0, PHP_INT_MAX-1, true],
- [0, 0, false],
- [0.5, PHP_INT_MIN + 10, true],
- [0.5, PHP_INT_MAX - 10, false],
- ];
- }
-
- /**
- * @test
- * @dataProvider rateProvider
- * @param mixed $rate
- */
- public function shouldThrowOutOfBoundsExceptionInCaseOfInvalidRate($rate)
- {
- $this->expectException(OutOfBoundsException::class);
- $this->expectExceptionMessage('Sampling rate must be between 0.0 and 1.0.');
-
- new ProbabilisticSampler($rate);
- }
-
- public function rateProvider()
- {
- return [
- [1.1],
- [-0.1],
- [PHP_INT_MAX],
- [PHP_INT_MIN],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php
deleted file mode 100644
index 4f6b8a632..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Sampler;
-
-use Cache\Adapter\PHPArray\ArrayCachePool;
-use Jaeger\Sampler\RateLimitingSampler;
-use Jaeger\Util\RateLimiter;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_RATE_LIMITING;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-class RateLimitSamplerTest extends TestCase
-{
- /**
- * @test
- * @dataProvider maxRateProvider
- * @param integer $maxTracesPerSecond
- * @param bool $decision
- * @throws
- */
- public function shouldDetermineWhetherOrTraceShouldBeSampled($maxTracesPerSecond, $decision)
- {
- $sampler = new RateLimitingSampler(
- $maxTracesPerSecond,
- new RateLimiter(new ArrayCachePool(), 'balance', 'lastTick')
- );
-
- $sampler->isSampled();
- list($sampled, $tags) = $sampler->isSampled();
- $this->assertEquals($decision, $sampled);
- $this->assertEquals([
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_RATE_LIMITING,
- SAMPLER_PARAM_TAG_KEY => $maxTracesPerSecond,
- ], $tags);
-
- $sampler->close();
- }
-
- public function maxRateProvider()
- {
- return [
- [1000000, true],
- [1, false],
- [0, false],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php
deleted file mode 100644
index 43a303642..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\ScopeManager;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class ScopeManagerTest extends TestCase
-{
- /**
- * @var ScopeManager
- */
- private $scopeManager;
-
- function setUp(): void
- {
- $this->scopeManager = new ScopeManager();
- }
-
- function testActivate()
- {
- $span = $this->createMock(Span::class);
-
- $scope = $this->scopeManager->activate($span, true);
-
- $this->assertEquals($scope->getSpan(), $span);
- }
-
- function testAbleGetActiveScope()
- {
- $span = $this->createMock(Span::class);
-
- $this->assertNull($this->scopeManager->getActive());
- $scope = $this->scopeManager->activate($span, false);
-
- $this->assertEquals($scope, $this->scopeManager->getActive());
- }
-
- function testScopeClosingDeactivates()
- {
- $span = $this->createMock(Span::class);
-
- $scope = $this->scopeManager->activate($span, false);
- $scope->close();
-
- $this->assertNull($this->scopeManager->getActive());
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php
deleted file mode 100644
index e36a8de3d..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\Scope;
-use Jaeger\ScopeManager;
-use Jaeger\Span;
-use PHPUnit\Framework\TestCase;
-
-class ScopeTest extends TestCase
-{
- /**
- * @var ScopeManager|\PHPUnit\Framework\MockObject\MockObject
- */
- private $scopeManager;
-
- /**
- * @var Span|\PHPUnit\Framework\MockObject\MockObject
- */
- private $span;
-
- function setUp(): void
- {
- $this->scopeManager = $this->createMock(ScopeManager::class);
- $this->span = $this->createMock(Span::class);
- }
-
- function testCloseDoNotFinishSpanOnClose()
- {
- $scope = new Scope($this->scopeManager, $this->span, false);
-
- $this->scopeManager->method('getActive')->willReturn($scope);
- $this->scopeManager->expects($this->once())->method('getActive');
- $this->span->expects($this->never())->method('finish');
- $this->scopeManager->expects($this->once())->method('setActive');
-
- $scope->close();
- }
-
- function testCloseFinishSpanOnClose()
- {
- $scope = new Scope($this->scopeManager, $this->span, true);
-
- $this->scopeManager->method('getActive')->willReturn($scope);
- $this->scopeManager->expects($this->once())->method('getActive');
- $this->span->expects($this->once())->method('finish');
- $this->scopeManager->expects($this->once())->method('setActive');
-
- $scope->close();
- }
-
- function testGetSpan()
- {
- $scope = new Scope($this->scopeManager, $this->span, false);
-
- $this->assertEquals($this->span, $scope->getSpan());
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php
deleted file mode 100644
index 5bd6d0a7b..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-
-
-namespace Jaeger\Tests\Sender;
-
-use Jaeger\Sender\JaegerSender;
-use Jaeger\Sender\UdpSender;
-use Jaeger\Span;
-use Jaeger\SpanContext;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\Thrift\Batch;
-use Jaeger\Tracer;
-use PHPUnit\Framework\TestCase;
-
-class JaegerThriftSenderTest extends TestCase
-{
- /** @var Tracer|\PHPUnit\Framework\MockObject\MockObject */
- private $tracer;
-
- /** @var SpanContext|\PHPUnit\Framework\MockObject\MockObject */
- private $context;
-
- public function setUp(): void
- {
- $tracer = $this->createMock(Tracer::class);
- $tracer->method('getIpAddress')->willReturn('');
- $tracer->method('getServiceName')->willReturn('');
-
- $this->tracer = $tracer;
-
- $context = $this->createMock(SpanContext::class);
- $this->context = $context;
- }
-
- public function testFlush(): void
- {
-
- $span = $this->createMock(Span::class);
- $span->method('getOperationName')->willReturn('dummy-operation');
- $span->method('getTracer')->willReturn($this->tracer);
- $span->method('getContext')->willReturn($this->context);
-
- $client = $this->createMock(AgentClient::class);
- $sender = new JaegerSender($client);
- $sender->setMaxBufferLength(64000);
-
- $client
- ->expects(self::exactly(1))
- ->method('emitBatch');
-
- $sender->append($span);
- $sender->append($span);
- $sender->append($span);
-
- self::assertEquals(3, $sender->flush());
- }
-
- public function testEmitBatch() {
- $client = $this->createMock(AgentClient::class);
- $sender = new JaegerSender($client);
- $sender->setMaxBufferLength(64000);
-
- $span = $this->createMock(Span::class);
- $span->method('getOperationName')->willReturn('dummy-operation');
- $span->method('getTracer')->willReturn($this->tracer);
- $span->method('getContext')->willReturn($this->context);
-
- $client
- ->expects($this->once())
- ->method('emitBatch')
- ->with($this->callback(function ($batch) {
- /** @var Batch $batch */
- $this->assertInstanceOf(Batch::class, $batch);
- $this->assertCount(1, $batch->spans);
-
- /** @var \Jaeger\Thrift\Span $span */
- $span = $batch->spans[0];
- $this->assertInstanceOf(\Jaeger\Thrift\Span::class, $span);
- $this->assertSame("dummy-operation", $span->operationName);
-
- return true;
-
- }));
-
- $sender->append($span);
- $this->assertEquals(1, $sender->flush());
- }
-
- public function testMaxBufferLength() {
- $tracer = $this->createMock(Tracer::class);
- $tracer->method('getIpAddress')->willReturn('');
- $tracer->method('getServiceName')->willReturn('');
-
- $context = $this->createMock(SpanContext::class);
-
- $span = $this->createMock(Span::class);
- $span->method('getOperationName')->willReturn('dummy-operation');
- $span->method('getTracer')->willReturn($tracer);
- $span->method('getContext')->willReturn($context);
-
- $client = $this->createMock(AgentClient::class);
-
- $mockBuilder = $this->getMockBuilder(JaegerSender::class);
- $mockMethods = ['emitJaegerBatch'];
- if (method_exists($mockBuilder, "onlyMethods")) {
- $mockBuilder = $mockBuilder->onlyMethods($mockMethods);
- } else {
- $mockBuilder = $mockBuilder->setMethods($mockMethods);
- }
- $sender = $mockBuilder->setConstructorArgs([$client])->getMock();
- $sender->setMaxBufferLength(800);
- $sender->expects(self::exactly(2))
- ->method('emitJaegerBatch')
- ->withConsecutive(
- [self::countOf(2)],
- [self::countOf(1)]
- );
-
- // jaeger batch overhead parameter = 512
- $sender->append($span); // 512 + 143 < 800 - chunk 1
- $sender->append($span); // 512 + 143*2 => 798 < 800 - chunk 1
- $sender->append($span); // 512 + 143*3 > 800 - chunk 2
-
- self::assertEquals(3, $sender->flush());
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php
deleted file mode 100644
index 9011d00e3..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-
-namespace Jaeger\Tests\Sender;
-
-use Jaeger\Sender\UdpSender;
-use Jaeger\Span;
-use Jaeger\SpanContext;
-use Jaeger\Thrift\Agent\AgentClient;
-use Jaeger\Thrift\Agent\Zipkin\Annotation as ZipkinAnnotation;
-use Jaeger\Thrift\Agent\Zipkin\Span as ZipkinSpan;
-use Jaeger\Tracer;
-use PHPUnit\Framework\TestCase;
-
-class UdpSenderTest extends TestCase
-{
- /**
- * @var UdpSender
- */
- private $sender;
-
- /**
- * @var AgentClient
- */
- private $client;
-
- public function setUp(): void
- {
- $this->client = $this->createMock(AgentClient::class);
- $this->sender = new UdpSender($this->client, 64000);
- }
-
- public function testMaxBufferLength(): void
- {
- $tracer = $this->createMock(Tracer::class);
- $tracer->method('getIpAddress')->willReturn('');
- $tracer->method('getServiceName')->willReturn('');
-
- $context = $this->createMock(SpanContext::class);
-
- $span = $this->createMock(Span::class);
- $span->method('getOperationName')->willReturn('dummy-operation');
- $span->method('getTracer')->willReturn($tracer);
- $span->method('getContext')->willReturn($context);
-
- $sender = new UdpSender($this->client, 100);
-
- $this->client
- ->expects(self::exactly(2))
- ->method('emitZipkinBatch')
- ->withConsecutive(
- [self::countOf(2)],
- [self::countOf(1)]
- );
-
- // one span has a length of ~25
- $sender->append($span); // 30 + 25 < 100 - chunk 1
- $sender->append($span); // 30 + 25 * 2 < 100 - chunk 1
- $sender->append($span); // 30 + 25 * 3 > 100 - chunk 2
-
- self::assertEquals(3, $sender->flush());
- }
-
- public function testFlush(): void
- {
- $this->assertEquals(0, $this->sender->flush());
-
- $logTimeStamp = (int) (microtime(true) * 1000000);
-
- $tracer = $this->createMock(Tracer::class);
- $tracer->method('getIpAddress')->willReturn('');
- $tracer->method('getServiceName')->willReturn('');
- $context = $this->createMock(SpanContext::class);
- $span = $this->createMock(Span::class);
- $span->method('getTracer')->willReturn($tracer);
- $span->method('getContext')->willReturn($context);
- $span
- ->expects($this->atLeastOnce())
- ->method('getLogs')
- ->willReturn([
- [
- 'timestamp' => $logTimeStamp,
- 'fields' => [
- 'foo' => 'bar',
- ],
- ],
- ]);
-
- $this->client
- ->expects($this->once())
- ->method('emitZipkinBatch')
- ->with($this->callback(function ($spans) use ($logTimeStamp) {
- $this->assertCount(1, $spans);
-
- /* @var $annotation ZipkinSpan */
- $span = $spans[0];
- $this->assertInstanceOf(ZipkinSpan::class, $span);
- $this->assertCount(1, $span->annotations);
-
- /* @var $annotation ZipkinAnnotation */
- $annotation = $span->annotations[0];
- $this->assertInstanceOf(ZipkinAnnotation::class, $annotation);
- $this->assertSame($logTimeStamp, $annotation->timestamp);
- $this->assertSame(
- json_encode([
- 'foo' => 'bar',
- ]),
- $annotation->value
- );
-
- return true;
- }));
-
- $this->sender->append($span);
- $this->assertEquals(1, $this->sender->flush());
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php
deleted file mode 100644
index 998061088..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\SpanContext;
-use PHPUnit\Framework\TestCase;
-
-class SpanContextTest extends TestCase
-{
- public function testIsDebugIdContainerOnly()
- {
- $ctx = new SpanContext(null, null, null, null, null, 'value1');
- $this->assertTrue($ctx->isDebugIdContainerOnly());
- $this->assertEquals($ctx->getDebugId(), 'value1');
-
- $ctx = new SpanContext(1, 2, 3, 1);
- $this->assertFalse($ctx->isDebugIdContainerOnly());
- }
-
- /**
- * @dataProvider contextDataProvider
- */
- public function testBaggageInit($traceId, $spanId, $parentId, $flags, $baggage, $expected)
- {
- $ctx = new SpanContext($traceId, $spanId, $parentId, $flags, $baggage);
- $this->assertEquals($expected, $ctx->getBaggage());
- }
-
- public function contextDataProvider()
- {
- return [
- [null, null, null, null, [], []],
- [null, null, null, null, null, []],
- [null, null, null, null, ['key' => 'val'], ['key' => 'val']],
- ];
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php
deleted file mode 100644
index d23879680..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php
+++ /dev/null
@@ -1,293 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\Reporter\NullReporter;
-use Jaeger\Sampler\ConstSampler;
-use Jaeger\Span;
-use Jaeger\SpanContext;
-use Jaeger\Thrift\Agent\Zipkin\AnnotationType;
-use Jaeger\Tracer;
-use PHPUnit\Framework\TestCase;
-use const Jaeger\SAMPLED_FLAG;
-
-class SpanTest extends TestCase
-{
- /**
- * @var Tracer
- */
- private $tracer;
-
- /**
- * @var SpanContext
- */
- private $context;
-
- /**
- * {@inheritdoc}
- */
- public function setUp(): void
- {
- $this->tracer = new Tracer('test-service', new NullReporter, new ConstSampler);
- $this->context = new SpanContext(0, 0,0, SAMPLED_FLAG);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function tearDown(): void
- {
- $this->tracer = null;
- $this->context = null;
- }
-
- /** @test */
- public function shouldProperlyInitializeAtConstructTime(): void
- {
- $tags = [
- 'foo-1' => 'test-component-1',
- 'foo-2' => 'test-component-2',
- 'foo-3' => 'test-component-3',
- ];
-
- $span = new Span($this->context, $this->tracer, 'test-operation', $tags);
-
- $this->assertEquals( 3, count($span->getTags()));
- $this->assertEquals($this->tracer, $span->getTracer());
- $this->assertEquals(false, $span->isDebug());
- $this->assertEquals(null, $span->getEndTime());
- }
-
- /** @test */
- public function shouldSetComponentThroughTag(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- $span->setTag('component', 'libredis');
-
- $spanReflection = new \ReflectionClass(Span::class);
- $component = $spanReflection->getProperty('component');
- $component->setAccessible(true);
-
- $this->assertEquals( 0, count($span->getTags()));
- $this->assertEquals( 'libredis', $component->getValue($span));
- $this->assertEquals( 'libredis', $span->getComponent());
- }
-
- /** @test */
- public function shouldSetTags(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- $this->assertEquals( 0, count($span->getTags()));
-
- $span->setTags([
- 'foo-1' => 'test-component-1',
- 'foo-2' => 'test-component-2',
- 'foo-3' => 'test-component-3',
- ]);
-
- $this->assertEquals( 3, count($span->getTags()));
- }
-
- /** @test */
- public function shouldSetDifferentTypeOfTags() {
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- $this->assertEquals( 0, count($span->getTags()));
-
- $span->setTags([
- 'tag-bool1' => true,
- 'tag-bool2' => false,
- 'tag-int' => 1234567,
- 'tag-float' => 1.23456,
- 'tag-string' => "hello-world"
- ]);
-
- $tags = array_values($span->getTags());
- $this->assertEquals( 5, count($tags));
-
- $index = 0;
- $this->assertTrue($tags[$index]->annotation_type === AnnotationType::BOOL);
- $this->assertTrue($tags[$index]->value === true);
- $this->assertTrue($tags[$index]->key === 'tag-bool1');
- $index++;
-
- $this->assertTrue($tags[$index]->annotation_type === AnnotationType::BOOL);
- $this->assertTrue($tags[$index]->value === false);
- $this->assertTrue($tags[$index]->key === 'tag-bool2');
- $index++;
-
- $this->assertTrue($tags[$index]->annotation_type === AnnotationType::I64);
- $this->assertTrue($tags[$index]->value === 1234567);
- $this->assertTrue($tags[$index]->key === 'tag-int');
- $index++;
-
- $this->assertTrue($tags[$index]->annotation_type === AnnotationType::DOUBLE);
- $this->assertTrue($tags[$index]->value === 1.23456);
- $this->assertTrue($tags[$index]->key === 'tag-float');
- $index++;
-
- $this->assertTrue($tags[$index]->annotation_type === AnnotationType::STRING);
- $this->assertTrue($tags[$index]->value === "hello-world");
- $this->assertTrue($tags[$index]->key === 'tag-string');
- }
-
- /** @test */
- public function shouldOverwriteTheSameTag(): void
- {
- // Given
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- // When
- $span->setTag('foo', 'test-component-1');
- $span->setTag('foo', 'test-component-2');
-
- // Then
- $this->assertEquals( 1, count($span->getTags()));
- $this->assertEquals( 'test-component-2', $span->getTags()['foo']->value);
- }
- /** @test */
- public function shouldAddLogRecordsToTheSpan(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- $fields01 = [
- 'event' => 'error',
- 'message' => 'dummy error message',
- ];
- $fields02 = [
- 'foo' => 'bar',
- ];
-
- $dateTime01 = new \DateTime('+5 seconds');
- $dateTime02 = $dateTime01->getTimestamp();
- $dateTime03 = microtime(true) + 5;
-
- $span->log($fields01, $dateTime01);
- $span->log($fields02, $dateTime01->getTimestamp()*1000000);
- $span->log($fields02, $dateTime03);
- $span->log($fields02);
-
- $logs = $span->getLogs();
-
- $this->assertCount(4, $logs);
-
- $this->assertIsInt($logs[0]['timestamp']);
- $this->assertEquals((int)($dateTime01->format('U.u')*1000000), $logs[0]['timestamp']);
- $this->assertSame($fields01, $logs[0]['fields']);
-
- $this->assertIsInt($logs[1]['timestamp']);
- $this->assertSame($dateTime02*1000000, $logs[1]['timestamp']);
- $this->assertSame($fields02, $logs[1]['fields']);
-
- $this->assertIsInt($logs[2]['timestamp']);
- $this->assertSame((int) ($dateTime03 * 1000000), $logs[2]['timestamp']);
- $this->assertSame($fields02, $logs[2]['fields']);
-
- $this->assertIsInt($logs[3]['timestamp']);
- $this->assertSame($fields02, $logs[3]['fields']);
- }
-
- /** @test */
- public function timingDefaultTimes(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $span->finish();
-
- $this->assertEquals(0.0, round(($span->getEndTime() - $span->getStartTime()) / 1000000));
- }
-
- /** @test */
- public function timingSetStartTimeAsDateTime(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation', [], new \DateTime('-2 seconds'));
- $span->finish();
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetEndTimeAsDateTime(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
-
- $endTime = new \DateTime('+2 seconds');
- // add microseconds because php < 7.1 has a bug
- // https://bugs.php.net/bug.php?id=48225
- if (version_compare(phpversion(), '7.1', '<')) {
- list($usec) = explode(' ', microtime());
- $endTime = \DateTime::createFromFormat('U.u', $endTime->format('U')+$usec);
- }
- $span->finish($endTime);
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetStartTimeAsInt(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation', [], (int) round((microtime(true) - 2) * 1000000));
- $span->finish();
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetEndTimeAsInt(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $span->finish((int) round((microtime(true) + 2) * 1000000));
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetStartTimeAsFloat(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation', [], microtime(true) - 2);
- $span->finish();
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetEndTimeAsFloat(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $span->finish(microtime(true) + 2);
-
- $this->assertSpanDuration($span);
- }
-
- /** @test */
- public function timingSetMixedTimes(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation', [], new \DateTime());
- $span->finish(microtime(true) + 2);
-
- $this->assertSpanDuration($span);
- }
-
- protected function assertSpanDuration(Span $span): void
- {
- $this->assertEquals(2, (int)(($span->getEndTime() - $span->getStartTime()) / 1000000));
- }
-
- /** @test */
- public function invalidStartTime(): void
- {
- $this->expectException(\InvalidArgumentException::class);
- $this->expectExceptionMessage('Time should be one of the types int|float|DateTime|null, got string.');
- $span = new Span($this->context, $this->tracer, 'test-operation', [], 'string');
- }
-
- /** @test */
- public function invalidEndTime(): void
- {
- $span = new Span($this->context, $this->tracer, 'test-operation');
- $this->expectException(\InvalidArgumentException::class);
- $this->expectExceptionMessage('Time should be one of the types int|float|DateTime|null, got array.');
- $span->finish([]);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php
deleted file mode 100644
index abc4e32aa..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\Config;
-use Jaeger\Tests\Logger\StackLogger;
-use Jaeger\ThriftUdpTransport;
-use Jaeger\Tracer;
-use PHPUnit\Framework\TestCase;
-use Thrift\Exception\TTransportException;
-
-class ThriftUdpTransportTest extends TestCase
-{
- /**
- * @var ThriftUdpTransport
- */
- private $transport;
-
- /**
- * @var StackLogger
- */
- private $logger;
-
- public function setUp(): void
- {
- $this->logger = new StackLogger();
- $this->transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger);
- }
-
- public function testisOpenWhenOpen()
- {
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->assertTrue($this->transport->isOpen());
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- }
-
- public function testisOpenWhenClosed()
- {
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->close();
- $this->assertFalse($this->transport->isOpen());
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- }
-
- public function testClose()
- {
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->close();
-
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->write('hello');
- $this->assertEquals($this->logger->getMessagesCount(), 1);
- $this->assertEquals($this->logger->getLastMessage(), 'transport is closed');
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- }
-
- public function testDoubleClose()
- {
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->close();
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->close();
- $this->assertEquals($this->logger->getMessagesCount(), 1);
- $this->assertEquals(
- $this->logger->getLastMessage(),
- "can't close empty socket"
- );
- }
-
- public function testException()
- {
- $this->assertEquals($this->logger->getMessagesCount(), 0);
- $this->transport->open();
- $this->assertEquals($this->logger->getMessagesCount(), 0);
-
- $this->transport->write(str_repeat("some string", 10000));
-
- $this->assertEquals($this->logger->getMessagesCount(), 1);
- $msg = $this->logger->getLastMessage();
- $pattern = "/socket_write failed: \[code - \d+\] Message too long/";
-
- if (method_exists($this, "assertMatchesRegularExpression")) {
- $this->assertMatchesRegularExpression($pattern, $msg);
- } else {
- $this->assertRegExp($pattern, $msg);
- }
- }
-
- public function testProtocolVersionIPv4()
- {
- $config = new Config([
- Config::IP_VERSION => Config::IPV4
- ], "testServiceName");
-
- $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config);
-
- $reflectionTransport = new \ReflectionClass($transport);
- $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion");
- $ipProtocolVersionMethod->setAccessible(true);
-
- $this->assertEquals(Config::IPV4, $ipProtocolVersionMethod->invoke($transport));
- }
-
- public function testProtocolVersionIPv6()
- {
- $config = new Config([
- Config::IP_VERSION => Config::IPV6
- ], "testServiceName");
-
- $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config);
-//
- $reflectionTransport = new \ReflectionClass($transport);
- $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion");
- $ipProtocolVersionMethod->setAccessible(true);
-//
- $this->assertEquals(Config::IPV6, $ipProtocolVersionMethod->invoke($transport));
- }
-
- public function testProtocolVersionDefault()
- {
- $config = new Config([
- ], "testServiceName");
-
- $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config);
-
- $reflectionTransport = new \ReflectionClass($transport);
- $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion");
- $ipProtocolVersionMethod->setAccessible(true);
-
- $this->assertEquals(Config::IPV4, $ipProtocolVersionMethod->invoke($transport));
- }
-
- public function testCreateSocket()
- {
- $transport = $this->getMockBuilder(ThriftUdpTransport::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $reflectionClass = new \ReflectionClass($transport);
- $method = $reflectionClass->getMethod("setLogger");
- $method->setAccessible(true);
- $method->invokeArgs($transport, [$this->logger]);
-
- $method = $reflectionClass->getMethod("createSocket");
- $method->setAccessible(true);
- $res = $method->invokeArgs($transport, [Config::IPV6]);
-
- $this->assertNotFalse($res);
-
-
- $transport = $this->getMockBuilder(ThriftUdpTransport::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $reflectionClass = new \ReflectionClass($transport);
- $method = $reflectionClass->getMethod("setLogger");
- $method->setAccessible(true);
- $method->invokeArgs($transport, [$this->logger]);
-
- $method = $reflectionClass->getMethod("createSocket");
- $method->setAccessible(true);
- $res = $method->invokeArgs($transport, [Config::IPV4]);
-
- $this->assertNotFalse($res);
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php
deleted file mode 100644
index 3e7b4c05f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php
+++ /dev/null
@@ -1,262 +0,0 @@
-<?php
-
-namespace Jaeger\Tests;
-
-use Jaeger\Reporter\ReporterInterface;
-use Jaeger\Sampler\SamplerInterface;
-use Jaeger\Scope;
-use Jaeger\ScopeManager;
-use Jaeger\Span;
-use Jaeger\SpanContext;
-use Jaeger\Tracer;
-use OpenTracing\Exceptions\UnsupportedFormat;
-use OpenTracing\NoopSpanContext;
-use OpenTracing\UnsupportedFormatException;
-use PHPUnit\Framework\TestCase;
-use Psr\Log\LoggerInterface;
-use Psr\Log\NullLogger;
-use const Jaeger\BAGGAGE_HEADER_PREFIX;
-use const Jaeger\DEBUG_ID_HEADER_KEY;
-use const Jaeger\TRACE_ID_HEADER;
-use const Jaeger\ZIPKIN_SPAN_FORMAT;
-use const OpenTracing\Formats\TEXT_MAP;
-
-class TracerTest extends TestCase
-{
- /**
- * @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject
- */
- private $reporter;
-
- /**
- * @var SamplerInterface|\PHPUnit\Framework\MockObject\MockObject
- */
- private $sampler;
-
- /**
- * @var LoggerInterface
- */
- private $logger;
-
- /**
- * @var ScopeManager|\PHPUnit\Framework\MockObject\MockObject
- */
- private $scopeManager;
-
- /**
- * @var Tracer
- */
- private $tracer;
-
- /**
- * @var string
- */
- private $serviceName = 'test-service';
-
- /**
- * @var string
- */
- private $operationName = 'test-operation';
-
- public function setUp(): void
- {
- $this->scopeManager = $this->createMock(ScopeManager::class);
- $this->sampler = $this->createMock(SamplerInterface::class);
- $this->reporter = $this->createMock(ReporterInterface::class);
- $this->logger = new NullLogger();
-
- $this->tracer = new Tracer($this->serviceName, $this->reporter, $this->sampler, true, $this->logger, $this->scopeManager);
- }
-
- public function testStartSpan(): void
- {
- $span = $this->tracer->startSpan($this->operationName);
-
- $this->assertEquals($this->operationName, $span->getOperationName());
- }
-
- public function testStartActiveSpan(): void
- {
- $tracer = new Tracer($this->serviceName, $this->reporter, $this->sampler);
-
- $tracer->startActiveSpan('test-operation1');
- $this->assertEquals('test-operation1', $tracer->getActiveSpan()->getOperationName());
-
- $scope = $tracer->startActiveSpan('test-operation2');
- $this->assertEquals('test-operation2', $tracer->getActiveSpan()->getOperationName());
- $scope->close();
-
- $this->assertEquals('test-operation1', $tracer->getActiveSpan()->getOperationName());
- }
-
- /** @test */
- public function shouldAddConfiguredTagsToStartedSpanWhenSampled(): void
- {
- $this->sampler->expects($this->any())
- ->method('isSampled')
- ->willReturn([true, []]);
-
- $tags = [
- 'bar' => 'a-value',
- 'other.tag' => 'foo',
- ];
-
- $tracer = new Tracer(
- $this->serviceName,
- $this->reporter,
- $this->sampler,
- true,
- $this->logger,
- $this->scopeManager,
- TRACE_ID_HEADER,
- BAGGAGE_HEADER_PREFIX,
- DEBUG_ID_HEADER_KEY,
- $tags
- );
-
- $span = $tracer->startSpan('test-span');
- $spanTags = $span->getTags();
-
- foreach ($tags as $name => $value) {
- $this->assertArrayHasKey($name, $spanTags, "Tag '$name' should be set on span");
- $this->assertEquals($value, $spanTags[$name]->value, "Tag '$name' should have configured value");
- }
- }
-
- /** @test */
- public function shouldAddNoConfiguredTagsToStartedSpanWhenNotSampled(): void
- {
- $this->sampler->expects($this->any())
- ->method('isSampled')
- ->willReturn([false, []]);
-
- $tags = [
- 'bar' => 'a-value',
- 'other.tag' => 'foo',
- ];
-
- $tracer = new Tracer(
- $this->serviceName,
- $this->reporter,
- $this->sampler,
- true,
- $this->logger,
- $this->scopeManager,
- TRACE_ID_HEADER,
- BAGGAGE_HEADER_PREFIX,
- DEBUG_ID_HEADER_KEY,
- $tags
- );
-
- $span = $tracer->startSpan('test-span');
-
- $this->assertEquals([], $span->getTags(), 'No tags should be set when not sampled');
- }
-
- /** @test */
- public function shouldThrowExceptionOnInvalidFormat(): void
- {
- $spanContext = new SpanContext(0, 0, 0, 0);
- $carrier = [];
-
- $this->expectException(UnsupportedFormatException::class);
- $this->expectExceptionMessage('The format "bad-format" is not supported.');
-
- $this->tracer->inject($spanContext, 'bad-format', $carrier);
- $this->assertSame([], $carrier);
- }
-
- /** @test */
- public function shouldNotThrowExceptionOnInvalidContext(): void
- {
- $spanContext = new NoopSpanContext();
- $carrier = [];
-
- $this->tracer->inject($spanContext, ZIPKIN_SPAN_FORMAT, $carrier);
- $this->assertSame([], $carrier);
- }
-
- /** @test */
- public function shouldInjectSpanContextToCarrier(): void
- {
- $spanContext = new SpanContext(0, 0, 0, 0);
- $carrier = [];
-
- $this->tracer->inject($spanContext, TEXT_MAP, $carrier);
-
- $this->assertCount(1, $carrier);
- $this->assertEquals('0:0:0:0', $carrier[TRACE_ID_HEADER]);
- }
-
- /** @test */
- public function shouldThrowExceptionOnExtractInvalidFormat(): void
- {
- $this->expectException(UnsupportedFormatException::class);
- $this->expectExceptionMessage('The format "bad-format" is not supported.');
-
- $this->tracer->extract('bad-format', []);
- }
-
- /** @test */
- public function shouldNotThrowExceptionOnExtractFromMalformedState(): void
- {
- $this->assertNull($this->tracer->extract(TEXT_MAP, ['uber-trace-id' => '']));
- }
-
- /** @test */
- public function shouldExtractSpanContextFromCarrier(): void
- {
- $carrier = ['uber-trace-id' => '32834e4115071776:f7802330248418d:f123456789012345:1'];
-
- $this->assertInstanceOf(SpanContext::class, $this->tracer->extract(TEXT_MAP, $carrier));
- }
-
- public function testGetScopeManager()
- {
- $this->assertEquals($this->scopeManager, $this->tracer->getScopeManager());
- }
-
- public function testGetActiveSpan(): void
- {
- $span = $this->createMock(Span::class);
- $scope = $this->createMock(Scope::class);
- $scope->expects($this->once())->method('getSpan')->willReturn($span);
-
- $this->scopeManager->expects($this->once())->method('getActive')->willReturn($scope);
-
- $this->assertEquals($span, $this->tracer->getActiveSpan());
- }
-
- public function testGetActiveSpanNull(): void
- {
- $this->scopeManager->expects($this->once())->method('getActive')->willReturn(null);
-
- $this->assertEquals(null, $this->tracer->getActiveSpan());
- }
-
- public function testFlush(): void
- {
- $this->reporter->expects($this->once())->method('close');
-
- $this->tracer->flush();
- }
-
- /** @test */
- public function shouldHandleEmptyHostName(): void
- {
- $tracer = new \ReflectionClass(Tracer::class);
-
- $getHostByName = $tracer->getMethod('getHostByName');
- $getHostByName->setAccessible(true);
-
- $stub = $this->getMockBuilder(Tracer::class)
- ->disableOriginalConstructor()
- ->getMockForAbstractClass();
-
- $logger = $tracer->getProperty('logger');
- $logger->setAccessible(true);
- $logger->setValue($stub, $this->logger);
-
- $this->assertEquals('127.0.0.1', $getHostByName->invokeArgs($stub, [null]));
- }
-}
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/README.md b/vendor/jonahgeorge/jaeger-client-php/tests/README.md
deleted file mode 100644
index aa828030f..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Jaeger Bindings for PHP OpenTracing API: Unit Tests
-
-Welcome to the Jaeger Testing Suite.
-
-This folder includes all the unit tests that test Jaeger components, ensuring that you enjoy a bug free library.
-
-## Current PHP Support
-
-| version | status |
-|---------|--------|
-| 7.0 | ✔ |
-| 7.1 | ✔ |
-| 7.2 | ✔ |
-
-
-## Getting Started
-
-This testing suite uses [Travis CI](https://travis-ci.org/) for each run.
-Every commit pushed to this repository will queue a build into the continuous integration service and will run all tests
-to ensure that everything is going well and the project is stable.
-
-The testing suite can be run on your own machine. The main dependency is [PHPUnit](https://phpunit.de/)
-which can be installed using [Composer](https://getcomposer.org/):
-
-```bash
-# run this command from project root
-$ composer install
-```
-
-Then run the tests by calling command from the terminal as follows:
-
-```bash
-$ composer test
-```
-
-## Run Tests for Supported Versions
-
-There is also an ability to run tests for different PHP versions. To achieve this we offer use
-[docker](https://docs.docker.com/install/)-based approach:
-
-```bash
-
-$ docker run --rm -it -v $(pwd):/usr/app php:7.0 ./usr/app/tests/php-test.sh
-
-$ docker run --rm -it -v $(pwd):/usr/app php:7.1 ./usr/app/tests/php-test.sh
-
-$ docker run --rm -it -v $(pwd):/usr/app php:7.2 ./usr/app/tests/php-test.sh
-```
diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh b/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh
deleted file mode 100644
index 99a522856..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env bash
-
-# trace ERR through pipes
-set -o pipefail
-
-# trace ERR through 'time command' and other functions
-set -o errtrace
-
-# set -u : exit the script if you try to use an uninitialised variable
-set -o nounset
-
-# set -e : exit the script if any statement returns a non-true return value
-set -o errexit
-
-# to avoid message:
-# "Do not run Composer as root/super user! See https://getcomposer.org/root for details"
-export COMPOSER_ALLOW_SUPERUSER=1
-
-export TERM=xterm-256color
-
-echo "[INFO]: Install OS dependencies..."
-apt-get update -yq > /dev/null 2>&1
-apt-get install -yq git wget unzip zip > /dev/null 2>&1
-
-echo "[INFO]: Install PHP extensions..."
-docker-php-ext-install bcmath sockets > /dev/null 2>&1
-pecl install hrtime > /dev/null 2>&1
-docker-php-ext-enable hrtime > /dev/null 2>&1
-
-echo "[INFO]: Install Xdebug to enable code coverage..."
-pecl install xdebug > /dev/null 2>&1
-docker-php-ext-enable xdebug > /dev/null 2>&1
-
-cd /tmp
-
-echo "[INFO]: Install Composer..."
-EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
-php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
-ACTUAL_SIGNATURE="$(php -r "echo hash_file('SHA384', 'composer-setup.php');")"
-
-if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then
- >&2 echo '[ERROR]: Invalid installer signature'
- rm composer-setup.php
- exit 1
-fi
-
-php composer-setup.php --quiet
-rm composer-setup.php
-
-# this step is required to be able to overwrite composer.lock
-cp -R /usr/app /usr/tests
-
-cd /usr/tests
-rm -f composer.lock
-
-echo "[INFO]: Install library dependencies..."
-php /tmp/composer.phar install \
- --no-interaction \
- --no-ansi \
- --no-progress \
- --no-suggest
-
-echo -e "[INFO]: Run tests...\n"
-/tmp/composer.phar test
diff --git a/vendor/open-telemetry/api/Baggage/Baggage.php b/vendor/open-telemetry/api/Baggage/Baggage.php
new file mode 100644
index 000000000..06c701605
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Baggage.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextKeys;
+use OpenTelemetry\Context\ScopeInterface;
+
+final class Baggage implements BaggageInterface
+{
+ private static ?self $emptyBaggage = null;
+
+ /** @inheritDoc */
+ public static function fromContext(ContextInterface $context): BaggageInterface
+ {
+ return $context->get(ContextKeys::baggage()) ?? 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<string, Entry> */
+ private array $entries;
+
+ /** @param array<string, Entry> $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)) !== null) {
+ 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 $this->entries === [];
+ }
+
+ /** @inheritDoc */
+ public function toBuilder(): BaggageBuilderInterface
+ {
+ return new BaggageBuilder($this->entries);
+ }
+
+ /** @inheritDoc */
+ public function storeInContext(ContextInterface $context): ContextInterface
+ {
+ return $context->with(ContextKeys::baggage(), $this);
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageBuilder.php b/vendor/open-telemetry/api/Baggage/BaggageBuilder.php
new file mode 100644
index 000000000..d4500eac5
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageBuilder.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class BaggageBuilder implements BaggageBuilderInterface
+{
+ /** @var array<string, Entry> */
+ private array $entries;
+
+ /** @param array<string, Entry> $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::getEmpty();
+
+ $this->entries[$key] = new Entry($value, $metadata);
+
+ return $this;
+ }
+
+ public function build(): BaggageInterface
+ {
+ return new Baggage($this->entries);
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php b/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php
new file mode 100644
index 000000000..301cfbc3c
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageBuilderInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\API\Baggage as API;
+
+interface BaggageBuilderInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#set-value
+ * @param mixed $value
+ */
+ public function set(string $key, $value, API\MetadataInterface $metadata = null): API\BaggageBuilderInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#remove-value
+ */
+ public function remove(string $key): API\BaggageBuilderInterface;
+
+ public function build(): API\BaggageInterface;
+}
diff --git a/vendor/open-telemetry/api/Baggage/BaggageInterface.php b/vendor/open-telemetry/api/Baggage/BaggageInterface.php
new file mode 100644
index 000000000..83f45755d
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/BaggageInterface.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+use OpenTelemetry\API\Baggage as API;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#operations
+ */
+interface BaggageInterface extends ImplicitContextKeyedInterface
+{
+ /**
+ * Returns the {@see API\BaggageInterface} from the provided *$context*,
+ * falling back on {@see API\BaggageInterface::getEmpty()} if there is no baggage in the provided context.
+ */
+ public static function fromContext(ContextInterface $context): API\BaggageInterface;
+
+ /**
+ * Returns a new empty {@see API\BaggageBuilderInterface}.
+ */
+ public static function getBuilder(): API\BaggageBuilderInterface;
+
+ /**
+ * Returns the current {@see Baggage} from the current {@see ContextInterface},
+ * falling back on {@see API\BaggageInterface::getEmpty()} if there is no baggage in the current context.
+ */
+ public static function getCurrent(): API\BaggageInterface;
+
+ /**
+ * Returns a new {@see API\BaggageInterface} with no entries.
+ */
+ public static function getEmpty(): API\BaggageInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#get-value
+ */
+ public function getEntry(string $key): ?API\Entry;
+
+ /**
+ * Returns the value from the {@see API\Entry} with the provided *key*.
+ * @see getEntry
+ *
+ * @return mixed
+ */
+ public function getValue(string $key);
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#get-all-values
+ */
+ public function getAll(): iterable;
+
+ public function isEmpty(): bool;
+
+ /**
+ * Returns a new {@see API\BaggageBuilderInterface} pre-initialized with the contents of `$this`.
+ */
+ public function toBuilder(): API\BaggageBuilderInterface;
+}
diff --git a/vendor/open-telemetry/api/Baggage/Entry.php b/vendor/open-telemetry/api/Baggage/Entry.php
new file mode 100644
index 000000000..eb3d0de5b
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Entry.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class Entry
+{
+ /** @var mixed */
+ private $value;
+
+ private MetadataInterface $metadata;
+
+ /**
+ * @param mixed $value
+ * @param MetadataInterface $metadata
+ */
+ public function __construct(
+ $value,
+ MetadataInterface $metadata
+ ) {
+ $this->value = $value;
+ $this->metadata = $metadata;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function getMetadata(): MetadataInterface
+ {
+ return $this->metadata;
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/Metadata.php b/vendor/open-telemetry/api/Baggage/Metadata.php
new file mode 100644
index 000000000..043c96a8a
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Metadata.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class Metadata implements MetadataInterface
+{
+ private static ?self $instance = null;
+
+ public static function getEmpty(): Metadata
+ {
+ return self::$instance ??= new self('');
+ }
+
+ private string $metadata;
+
+ public function __construct(string $metadata)
+ {
+ $this->metadata = $metadata;
+ }
+
+ public function getValue(): string
+ {
+ return $this->metadata;
+ }
+}
diff --git a/vendor/open-telemetry/api/Baggage/MetadataInterface.php b/vendor/open-telemetry/api/Baggage/MetadataInterface.php
new file mode 100644
index 000000000..cd0a6d1ec
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/MetadataInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#set-value
+ */
+interface MetadataInterface
+{
+ public function getValue(): string;
+}
diff --git a/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php b/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php
new file mode 100644
index 000000000..fae62dcab
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Propagation/BaggagePropagator.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage\Propagation;
+
+use OpenTelemetry\API\Baggage\Baggage;
+use OpenTelemetry\API\Baggage\BaggageBuilderInterface;
+use OpenTelemetry\API\Baggage\Entry; /** @phan-suppress-current-line PhanUnreferencedUseNormal */
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\Propagation\ArrayAccessGetterSetter;
+use OpenTelemetry\Context\Propagation\PropagationGetterInterface;
+use OpenTelemetry\Context\Propagation\PropagationSetterInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use function rtrim;
+use function urlencode;
+
+/**
+ * @see https://www.w3.org/TR/baggage
+ */
+final class BaggagePropagator implements TextMapPropagatorInterface
+{
+ public const BAGGAGE = 'baggage';
+
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function fields(): array
+ {
+ return [self::BAGGAGE];
+ }
+
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ $setter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+
+ $baggage = Baggage::fromContext($context);
+
+ if ($baggage->isEmpty()) {
+ return;
+ }
+
+ $headerString = '';
+
+ /** @var Entry $entry */
+ foreach ($baggage->getAll() as $key => $entry) {
+ $value = urlencode($entry->getValue());
+ $headerString.= "{$key}={$value}";
+
+ if (($metadata = $entry->getMetadata()->getValue()) !== '' && ($metadata = $entry->getMetadata()->getValue()) !== '0') {
+ $headerString .= ";{$metadata}";
+ }
+
+ $headerString .= ',';
+ }
+
+ if ($headerString !== '' && $headerString !== '0') {
+ $headerString = rtrim($headerString, ',');
+ $setter->set($carrier, self::BAGGAGE, $headerString);
+ }
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ $getter ??= ArrayAccessGetterSetter::getInstance();
+ $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/vendor/open-telemetry/api/Baggage/Propagation/Parser.php b/vendor/open-telemetry/api/Baggage/Propagation/Parser.php
new file mode 100644
index 000000000..3518b858d
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Propagation/Parser.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage\Propagation;
+
+use function explode;
+use OpenTelemetry\API\Baggage\BaggageBuilderInterface;
+use OpenTelemetry\API\Baggage\Metadata;
+use function str_replace;
+use function trim;
+use function urldecode;
+
+final class Parser
+{
+ private const EXCLUDED_KEY_CHARS = [' ', '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}'];
+ private const EXCLUDED_VALUE_CHARS = [' ', '"', ',', ';', '\\'];
+ private const EQUALS = '=';
+
+ /** @readonly */
+ private string $baggageHeader;
+
+ public function __construct(string $baggageHeader)
+ {
+ $this->baggageHeader = $baggageHeader;
+ }
+
+ 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/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php
new file mode 100644
index 000000000..1b9f785aa
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/ErrorLogWriter.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class ErrorLogWriter implements LogWriterInterface
+{
+ public function write($level, string $message, array $context): void
+ {
+ error_log(Formatter::format($level, $message, $context));
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php
new file mode 100644
index 000000000..4cfd6f9d4
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class Formatter
+{
+ public static function format($level, string $message, array $context): string
+ {
+ $exception = (array_key_exists('exception', $context) && $context['exception'] instanceof \Throwable)
+ ? $context['exception']
+ : null;
+ if ($exception) {
+ $message = sprintf(
+ 'OpenTelemetry: [%s] %s [exception] %s%s%s',
+ $level,
+ $message,
+ $exception->getMessage(),
+ PHP_EOL,
+ $exception->getTraceAsString()
+ );
+ } else {
+ //get calling location, skipping over trait, formatter etc
+ $caller = debug_backtrace()[3];
+ $message = sprintf(
+ 'OpenTelemetry: [%s] %s in %s(%s)',
+ $level,
+ $message,
+ $caller['file'],
+ $caller['line'],
+ );
+ }
+
+ return $message;
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php
new file mode 100644
index 000000000..046d21fc9
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/LogWriterInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+interface LogWriterInterface
+{
+ public function write($level, string $message, array $context): void;
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php
new file mode 100644
index 000000000..f7529c082
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/NoopLogWriter.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class NoopLogWriter implements LogWriterInterface
+{
+ public function write($level, string $message, array $context): void
+ {
+ //do nothing
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php
new file mode 100644
index 000000000..5b2d19c15
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+use Psr\Log\LoggerInterface;
+
+class Psr3LogWriter implements LogWriterInterface
+{
+ private LoggerInterface $logger;
+
+ public function __construct(LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
+
+ public function write($level, string $message, array $context): void
+ {
+ $this->logger->log($level, $message, $context);
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php
new file mode 100644
index 000000000..f65f1e856
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriter/StreamLogWriter.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal\LogWriter;
+
+class StreamLogWriter implements LogWriterInterface
+{
+ private $stream;
+
+ public function __construct(string $destination)
+ {
+ $stream = fopen($destination, 'a');
+ if ($stream) {
+ $this->stream = $stream;
+ } else {
+ throw new \RuntimeException(sprintf('Unable to open %s for writing', $destination));
+ }
+ }
+
+ public function write($level, string $message, array $context): void
+ {
+ fwrite($this->stream, Formatter::format($level, $message, $context));
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php b/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php
new file mode 100644
index 000000000..07c48cea5
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/LogWriterFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal;
+
+use OpenTelemetry\API\Behavior\Internal\LogWriter\ErrorLogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\LogWriterInterface;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\NoopLogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\Psr3LogWriter;
+use OpenTelemetry\API\Behavior\Internal\LogWriter\StreamLogWriter;
+use OpenTelemetry\API\Instrumentation\ConfigurationResolver;
+use OpenTelemetry\API\LoggerHolder;
+
+class LogWriterFactory
+{
+ private const OTEL_PHP_LOG_DESTINATION = 'OTEL_PHP_LOG_DESTINATION';
+
+ public function create(): LogWriterInterface
+ {
+ $dest = (new ConfigurationResolver())->getString(self::OTEL_PHP_LOG_DESTINATION);
+ $logger = LoggerHolder::get();
+
+ switch ($dest) {
+ case 'none':
+ return new NoopLogWriter();
+ case 'stderr':
+ return new StreamLogWriter('php://stderr');
+ case 'stdout':
+ return new StreamLogWriter('php://stdout');
+ case 'psr3':
+ if ($logger) {
+ return new Psr3LogWriter($logger);
+ }
+ error_log('OpenTelemetry: cannot use OTEL_PHP_LOG_DESTINATION=psr3 without providing a PSR-3 logger');
+ //default to error log
+ return new ErrorLogWriter();
+ case 'error_log':
+ return new ErrorLogWriter();
+ default:
+ if ($logger) {
+ return new Psr3LogWriter($logger);
+ }
+
+ return new ErrorLogWriter();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/Internal/Logging.php b/vendor/open-telemetry/api/Behavior/Internal/Logging.php
new file mode 100644
index 000000000..e5bec7ab5
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/Internal/Logging.php
@@ -0,0 +1,90 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior\Internal;
+
+use OpenTelemetry\API\Behavior\Internal\LogWriter\LogWriterInterface;
+use Psr\Log\LogLevel;
+
+/**
+ * Logging utility functions for internal logging (of OpenTelemetry errors/warnings etc).
+ * This is not part of SDK configuration to avoid creating a dependency on SDK from any package which does logging.
+ * @todo this should be `@internal`, but deptrac is not happy with that.
+ */
+class Logging
+{
+ private const OTEL_LOG_LEVEL = 'OTEL_LOG_LEVEL';
+ private const DEFAULT_LEVEL = LogLevel::INFO;
+ private const NONE = 'none';
+ private const LEVELS = [
+ LogLevel::DEBUG,
+ LogLevel::INFO,
+ LogLevel::NOTICE,
+ LogLevel::WARNING,
+ LogLevel::ERROR,
+ LogLevel::CRITICAL,
+ LogLevel::ALERT,
+ LogLevel::EMERGENCY,
+ self::NONE, //highest priority so that nothing is logged
+ ];
+
+ /**
+ * The minimum log level. Messages with lower severity than this will be ignored.
+ */
+ private static ?int $logLevel = null;
+ private static ?LogWriterInterface $writer = null;
+
+ public static function setLogWriter(LogWriterInterface $writer): void
+ {
+ self::$writer = $writer;
+ }
+
+ public static function logWriter(): LogWriterInterface
+ {
+ self::$writer ??= (new LogWriterFactory())->create();
+
+ return self::$writer;
+ }
+
+ /**
+ * Get level priority from level name
+ */
+ public static function level(string $level): int
+ {
+ $value = array_search($level, self::LEVELS);
+
+ return $value ?: 1; //'info'
+ }
+
+ /**
+ * Get defined OTEL_LOG_LEVEL, or default
+ */
+ public static function logLevel(): int
+ {
+ self::$logLevel ??= self::getLogLevel();
+
+ return self::$logLevel;
+ }
+
+ private static function getLogLevel(): int
+ {
+ $level = array_key_exists(self::OTEL_LOG_LEVEL, $_SERVER)
+ ? $_SERVER[self::OTEL_LOG_LEVEL]
+ : getenv(self::OTEL_LOG_LEVEL);
+ if (!$level) {
+ $level = ini_get(self::OTEL_LOG_LEVEL);
+ }
+ if (!$level) {
+ $level = self::DEFAULT_LEVEL;
+ }
+
+ return self::level($level);
+ }
+
+ public static function reset(): void
+ {
+ self::$logLevel = null;
+ self::$writer = null;
+ }
+}
diff --git a/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php b/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php
new file mode 100644
index 000000000..d0207e4b1
--- /dev/null
+++ b/vendor/open-telemetry/api/Behavior/LogsMessagesTrait.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Behavior;
+
+use OpenTelemetry\API\Behavior\Internal\Logging;
+use Psr\Log\LogLevel;
+
+trait LogsMessagesTrait
+{
+ private static function shouldLog(string $level): bool
+ {
+ return Logging::level($level) >= Logging::logLevel();
+ }
+
+ private static function doLog(string $level, string $message, array $context): void
+ {
+ $writer = Logging::logWriter();
+ if (self::shouldLog($level)) {
+ $context['source'] = get_called_class();
+ $writer->write($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/vendor/open-telemetry/api/Globals.php b/vendor/open-telemetry/api/Globals.php
new file mode 100644
index 000000000..8f04b0b42
--- /dev/null
+++ b/vendor/open-telemetry/api/Globals.php
@@ -0,0 +1,121 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+use function assert;
+use Closure;
+use const E_USER_WARNING;
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\API\Instrumentation\ContextKeys;
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use function sprintf;
+use Throwable;
+use function trigger_error;
+
+/**
+ * Provides access to the globally configured instrumentation instances.
+ */
+final class Globals
+{
+ /** @var Closure[] */
+ private static array $initializers = [];
+ private static ?self $globals = null;
+
+ private TracerProviderInterface $tracerProvider;
+ private MeterProviderInterface $meterProvider;
+ private TextMapPropagatorInterface $propagator;
+ private LoggerProviderInterface $loggerProvider;
+
+ public function __construct(
+ TracerProviderInterface $tracerProvider,
+ MeterProviderInterface $meterProvider,
+ LoggerProviderInterface $loggerProvider,
+ TextMapPropagatorInterface $propagator
+ ) {
+ $this->tracerProvider = $tracerProvider;
+ $this->meterProvider = $meterProvider;
+ $this->loggerProvider = $loggerProvider;
+ $this->propagator = $propagator;
+ }
+
+ public static function tracerProvider(): TracerProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::tracerProvider()) ?? self::globals()->tracerProvider;
+ }
+
+ public static function meterProvider(): MeterProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::meterProvider()) ?? self::globals()->meterProvider;
+ }
+
+ public static function propagator(): TextMapPropagatorInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::propagator()) ?? self::globals()->propagator;
+ }
+
+ public static function loggerProvider(): LoggerProviderInterface
+ {
+ return Context::getCurrent()->get(ContextKeys::loggerProvider()) ?? self::globals()->loggerProvider;
+ }
+
+ /**
+ * @param Closure(Configurator): Configurator $initializer
+ *
+ * @interal
+ * @psalm-internal OpenTelemetry
+ */
+ public static function registerInitializer(Closure $initializer): void
+ {
+ self::$initializers[] = $initializer;
+ }
+
+ /**
+ * @phan-suppress PhanTypeMismatchReturnNullable
+ */
+ private static function globals(): self
+ {
+ if (self::$globals !== null) {
+ return self::$globals;
+ }
+
+ $configurator = Configurator::createNoop();
+ $scope = $configurator->activate();
+
+ try {
+ foreach (self::$initializers as $initializer) {
+ try {
+ $configurator = $initializer($configurator);
+ } catch (Throwable $e) {
+ trigger_error(sprintf("Error during opentelemetry initialization: %s\n%s", $e->getMessage(), $e->getTraceAsString()), E_USER_WARNING);
+ }
+ }
+ } finally {
+ $scope->detach();
+ }
+
+ $context = $configurator->storeInContext();
+ $tracerProvider = $context->get(ContextKeys::tracerProvider());
+ $meterProvider = $context->get(ContextKeys::meterProvider());
+ $propagator = $context->get(ContextKeys::propagator());
+ $loggerProvider = $context->get(ContextKeys::loggerProvider());
+
+ assert(isset($tracerProvider, $meterProvider, $loggerProvider, $propagator));
+
+ return self::$globals = new self($tracerProvider, $meterProvider, $loggerProvider, $propagator);
+ }
+
+ /**
+ * @internal
+ */
+ public static function reset(): void
+ {
+ self::$globals = null;
+ self::$initializers = [];
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php b/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php
new file mode 100644
index 000000000..5ffb3950d
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/CachedInstrumentation.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use ArrayAccess;
+use function assert;
+use function class_exists;
+use OpenTelemetry\API\Globals;
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use const PHP_VERSION_ID;
+
+/**
+ * Provides access to cached {@link TracerInterface} and {@link MeterInterface}
+ * instances.
+ *
+ * Autoinstrumentation should prefer using a {@link CachedInstrumentation}
+ * instance over repeatedly obtaining instrumentation instances from
+ * {@link Globals}.
+ */
+final class CachedInstrumentation
+{
+ private string $name;
+ private ?string $version;
+ private ?string $schemaUrl;
+ private iterable $attributes;
+ /** @var ArrayAccess<TracerProviderInterface, TracerInterface>|null */
+ private ?ArrayAccess $tracers;
+ /** @var ArrayAccess<MeterProviderInterface, MeterInterface>|null */
+ private ?ArrayAccess $meters;
+ /** @var ArrayAccess<LoggerProviderInterface, LoggerInterface>|null */
+ private ?ArrayAccess $loggers;
+
+ public function __construct(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = [])
+ {
+ $this->name = $name;
+ $this->version = $version;
+ $this->schemaUrl = $schemaUrl;
+ $this->attributes = $attributes;
+ $this->tracers = self::createWeakMap();
+ $this->meters = self::createWeakMap();
+ $this->loggers = self::createWeakMap();
+ }
+
+ private static function createWeakMap(): ?ArrayAccess
+ {
+ if (PHP_VERSION_ID < 80000) {
+ return null;
+ }
+
+ /** @phan-suppress-next-line PhanUndeclaredClassReference */
+ assert(class_exists(\WeakMap::class, false));
+ /** @phan-suppress-next-line PhanUndeclaredClassMethod */
+ $map = new \WeakMap();
+ assert($map instanceof ArrayAccess);
+
+ return $map;
+ }
+
+ public function tracer(): TracerInterface
+ {
+ $tracerProvider = Globals::tracerProvider();
+
+ if ($this->tracers === null) {
+ return $tracerProvider->getTracer($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->tracers[$tracerProvider] ??= $tracerProvider->getTracer($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ public function meter(): MeterInterface
+ {
+ $meterProvider = Globals::meterProvider();
+
+ if ($this->meters === null) {
+ return $meterProvider->getMeter($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->meters[$meterProvider] ??= $meterProvider->getMeter($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+ public function logger(): LoggerInterface
+ {
+ $loggerProvider = Globals::loggerProvider();
+
+ if ($this->loggers === null) {
+ return $loggerProvider->getLogger($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+
+ return $this->loggers[$loggerProvider] ??= $loggerProvider->getLogger($this->name, $this->version, $this->schemaUrl, $this->attributes);
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
new file mode 100644
index 000000000..bb5619c30
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+class ConfigurationResolver implements ConfigurationResolverInterface
+{
+ public function has(string $name): bool
+ {
+ return $this->getVariable($name) !== null;
+ }
+
+ public function getString(string $name): ?string
+ {
+ return $this->getVariable($name);
+ }
+
+ public function getBoolean(string $name): ?bool
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return null;
+ }
+
+ return ($value === 'true');
+ }
+
+ public function getInt(string $name): ?int
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return null;
+ }
+ if (filter_var($value, FILTER_VALIDATE_INT) === false) {
+ //log warning
+ return null;
+ }
+
+ return (int) $value;
+ }
+
+ public function getList(string $name): array
+ {
+ $value = $this->getVariable($name);
+ if ($value === null) {
+ return [];
+ }
+
+ return explode(',', $value);
+ }
+
+ private function getVariable(string $name): ?string
+ {
+ $value = $_SERVER[$name] ?? null;
+ if ($value !== false && !self::isEmpty($value)) {
+ assert(is_string($value));
+
+ return $value;
+ }
+ $value = getenv($name);
+ if ($value !== false && !self::isEmpty($value)) {
+ return $value;
+ }
+ $value = ini_get($name);
+ if ($value !== false && !self::isEmpty($value)) {
+ return $value;
+ }
+
+ return null;
+ }
+
+ private static function isEmpty($value): bool
+ {
+ return $value === false || $value === null || $value === '';
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php
new file mode 100644
index 000000000..79bd94047
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ConfigurationResolverInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+interface ConfigurationResolverInterface
+{
+ public function has(string $name): bool;
+ public function getString(string $name): ?string;
+ public function getBoolean(string $name): ?bool;
+ public function getInt(string $name): ?int;
+ public function getList(string $name): array;
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/Configurator.php b/vendor/open-telemetry/api/Instrumentation/Configurator.php
new file mode 100644
index 000000000..71d301363
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/Configurator.php
@@ -0,0 +1,113 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Logs\NoopLoggerProvider;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeterProvider;
+use OpenTelemetry\API\Trace\NoopTracerProvider;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\Context\ScopeInterface;
+
+/**
+ * Configures the global (context scoped) instrumentation instances.
+ *
+ * @see Configurator::activate()
+ */
+final class Configurator implements ImplicitContextKeyedInterface
+{
+ private ?TracerProviderInterface $tracerProvider = null;
+ private ?MeterProviderInterface $meterProvider = null;
+ private ?TextMapPropagatorInterface $propagator = null;
+ private ?LoggerProviderInterface $loggerProvider = null;
+
+ private function __construct()
+ {
+ }
+
+ /**
+ * Creates a configurator that uses parent instances for not configured values.
+ */
+ public static function create(): Configurator
+ {
+ return new self();
+ }
+
+ /**
+ * Creates a configurator that uses noop instances for not configured values.
+ */
+ public static function createNoop(): Configurator
+ {
+ return self::create()
+ ->withTracerProvider(new NoopTracerProvider())
+ ->withMeterProvider(new NoopMeterProvider())
+ ->withPropagator(new NoopTextMapPropagator())
+ ->withLoggerProvider(new NoopLoggerProvider())
+ ;
+ }
+
+ public function activate(): ScopeInterface
+ {
+ return $this->storeInContext()->activate();
+ }
+
+ public function storeInContext(?ContextInterface $context = null): ContextInterface
+ {
+ $context ??= Context::getCurrent();
+
+ if ($this->tracerProvider !== null) {
+ $context = $context->with(ContextKeys::tracerProvider(), $this->tracerProvider);
+ }
+ if ($this->meterProvider !== null) {
+ $context = $context->with(ContextKeys::meterProvider(), $this->meterProvider);
+ }
+ if ($this->propagator !== null) {
+ $context = $context->with(ContextKeys::propagator(), $this->propagator);
+ }
+ if ($this->loggerProvider !== null) {
+ $context = $context->with(ContextKeys::loggerProvider(), $this->loggerProvider);
+ }
+
+ return $context;
+ }
+
+ public function withTracerProvider(?TracerProviderInterface $tracerProvider): Configurator
+ {
+ $self = clone $this;
+ $self->tracerProvider = $tracerProvider;
+
+ return $self;
+ }
+
+ public function withMeterProvider(?MeterProviderInterface $meterProvider): Configurator
+ {
+ $self = clone $this;
+ $self->meterProvider = $meterProvider;
+
+ return $self;
+ }
+
+ public function withPropagator(?TextMapPropagatorInterface $propagator): Configurator
+ {
+ $self = clone $this;
+ $self->propagator = $propagator;
+
+ return $self;
+ }
+
+ public function withLoggerProvider(?LoggerProviderInterface $loggerProvider): Configurator
+ {
+ $self = clone $this;
+ $self->loggerProvider = $loggerProvider;
+
+ return $self;
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/ContextKeys.php b/vendor/open-telemetry/api/Instrumentation/ContextKeys.php
new file mode 100644
index 000000000..ea1a66416
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/ContextKeys.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Logs\LoggerProviderInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextKeyInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+
+/**
+ * @internal
+ */
+final class ContextKeys
+{
+ /**
+ * @return ContextKeyInterface<TracerProviderInterface>
+ */
+ public static function tracerProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(TracerProviderInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<MeterProviderInterface>
+ */
+ public static function meterProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(MeterProviderInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<TextMapPropagatorInterface>
+ */
+ public static function propagator(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(TextMapPropagatorInterface::class);
+ }
+
+ /**
+ * @return ContextKeyInterface<LoggerProviderInterface>
+ */
+ public static function loggerProvider(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey(LoggerProviderInterface::class);
+ }
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php b/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php
new file mode 100644
index 000000000..d67bc8d6d
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/InstrumentationInterface.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use Psr\Log\LoggerInterface;
+
+interface InstrumentationInterface
+{
+ public function getName(): string;
+
+ public function getVersion(): ?string;
+
+ public function getSchemaUrl(): ?string;
+
+ public function init(): bool;
+
+ public function activate(): bool;
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): void;
+
+ public function getPropagator(): TextMapPropagatorInterface;
+
+ public function setTracerProvider(TracerProviderInterface $tracerProvider): void;
+
+ public function getTracerProvider(): TracerProviderInterface;
+
+ public function getTracer(): TracerInterface;
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): void;
+
+ public function getMeter(): MeterInterface;
+
+ public function setLogger(LoggerInterface $logger): void;
+
+ public function getLogger(): LoggerInterface;
+}
diff --git a/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php b/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php
new file mode 100644
index 000000000..1e695adb5
--- /dev/null
+++ b/vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php
@@ -0,0 +1,193 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Instrumentation;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+use OpenTelemetry\API\Trace\NoopTracer;
+use OpenTelemetry\API\Trace\NoopTracerProvider;
+use OpenTelemetry\API\Trace\TracerInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+use RuntimeException;
+
+/**
+ This trait in conjunction with the InstrumentationInterface is meant as a base for instrumentations for the
+ OpenTelemetry API.
+ Instrumentations need to implement the abstract methods of this trait (besides any instrumentation specific code)
+
+ A very simplified instrumentation could look like this:
+
+class Instrumentation implements InstrumentationInterface
+{
+ use InstrumentationTrait;
+
+ public function getName(): string
+ {
+ return 'foo-instrumentation';
+ }
+
+ public function getVersion(): ?string
+ {
+ return '0.0.1';
+ }
+
+ public function getSchemaUrl(): ?string
+ {
+ return null;
+ }
+
+ public function init(): bool
+ {
+ // This is just an example. In a real-world scenario one should only create spans in reaction of things
+ // happening in the instrumented code, not just for the sake of it.
+ $span = $this->getTracer()->spanBuilder($this->getName())->startSpan();
+ // do stuff
+ $span->end();
+ }
+}
+
+An user of the instrumentation and API/SDK would the call:
+
+$instrumentation = new Instrumentation;
+$instrumentation->activate()
+
+to activate and use the instrumentation with the API/SDK.
+ **/
+
+trait InstrumentationTrait
+{
+ private TextMapPropagatorInterface $propagator;
+ private TracerProviderInterface $tracerProvider;
+ private TracerInterface $tracer;
+ private MeterInterface $meter;
+ private LoggerInterface $logger;
+
+ public function __construct()
+ {
+ $this->initDefaults();
+ }
+
+ /**
+ * The name of the instrumenting/instrumented library/package/project.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getName(): string;
+
+ /**
+ * The version of the instrumenting/instrumented library/package/project.
+ * If unknown or a lookup is too expensive simply return NULL.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getVersion(): ?string;
+
+ /**
+ * The version of the instrumenting/instrumented library/package/project.
+ * If unknown simply return NULL.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-scope
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/glossary.md#instrumentation-library
+ */
+ abstract public function getSchemaUrl(): ?string;
+
+ /**
+ * This method will be called from the API when the instrumentation has been activated (via activate()).
+ * Here you can put any bootstrapping code needed by the instrumentation.
+ * If not needed simply implement a method which returns TRUE.
+ */
+ abstract public function init(): bool;
+
+ /**
+ * This method registers and activates the instrumentation with the OpenTelemetry API/SDK and thus
+ * the instrumentation will be used to generate telemetry data.
+ */
+ public function activate(): bool
+ {
+ $this->validateImplementation();
+ // activate instrumentation with the API. not implemented yet.
+ return true;
+ }
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): void
+ {
+ $this->propagator = $propagator;
+ }
+
+ public function getPropagator(): TextMapPropagatorInterface
+ {
+ return $this->propagator;
+ }
+
+ public function setTracerProvider(TracerProviderInterface $tracerProvider): void
+ {
+ $this->tracerProvider = $tracerProvider;
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/trace/api.md#get-a-tracer
+ $this->tracer = $tracerProvider->getTracer(
+ $this->getName(),
+ $this->getVersion(),
+ $this->getSchemaUrl(),
+ );
+ }
+
+ public function getTracerProvider(): TracerProviderInterface
+ {
+ return $this->tracerProvider;
+ }
+
+ public function getTracer(): TracerInterface
+ {
+ return $this->tracer;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): void
+ {
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.12.0/specification/metrics/api.md#get-a-meter
+ $this->meter = $meterProvider->getMeter(
+ $this->getName(),
+ $this->getVersion(),
+ );
+ }
+
+ public function getMeter(): MeterInterface
+ {
+ return $this->meter;
+ }
+
+ public function setLogger(LoggerInterface $logger): void
+ {
+ $this->logger = $logger;
+ }
+
+ public function getLogger(): LoggerInterface
+ {
+ return $this->logger;
+ }
+
+ private function validateImplementation(): void
+ {
+ if (!$this instanceof InstrumentationInterface) {
+ throw new RuntimeException(sprintf(
+ '"%s" is meant to implement "%s"',
+ InstrumentationTrait::class,
+ InstrumentationInterface::class
+ ));
+ }
+ }
+
+ private function initDefaults(): void
+ {
+ $this->propagator = new NoopTextMapPropagator();
+ $this->tracer = new NoopTracer();
+ $this->tracerProvider = new NoopTracerProvider();
+ /** @phan-suppress-next-line PhanAccessMethodInternal */
+ $this->meter = new NoopMeter();
+ $this->logger = new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/api/LoggerHolder.php b/vendor/open-telemetry/api/LoggerHolder.php
new file mode 100644
index 000000000..99f916a23
--- /dev/null
+++ b/vendor/open-telemetry/api/LoggerHolder.php
@@ -0,0 +1,53 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\NullLogger;
+
+final class LoggerHolder
+{
+ private static ?LoggerInterface $logger = null;
+
+ /**
+ * This constructor is a temporary solution to ease the setup of the logger with DI libraries
+ */
+ public function __construct(?LoggerInterface $logger = null)
+ {
+ self::$logger = $logger;
+ }
+
+ /**
+ * @suppress PhanTypeMismatchReturnNullable
+ * @internal
+ */
+ public static function get(): ?LoggerInterface
+ {
+ return self::$logger;
+ }
+
+ public static function set(?LoggerInterface $logger): void
+ {
+ self::$logger = $logger;
+ }
+
+ public static function isSet(): bool
+ {
+ return null !== self::$logger;
+ }
+
+ public static function unset(): void
+ {
+ self::$logger = null;
+ }
+
+ /**
+ * Disable psr-3 logging
+ */
+ public static function disable(): void
+ {
+ self::$logger = new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/EventLogger.php b/vendor/open-telemetry/api/Logs/EventLogger.php
new file mode 100644
index 000000000..68deb865c
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/EventLogger.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+class EventLogger implements EventLoggerInterface
+{
+ private LoggerInterface $logger;
+ private string $domain;
+
+ public function __construct(LoggerInterface $logger, string $domain)
+ {
+ $this->logger = $logger;
+ $this->domain = $domain;
+ }
+
+ public function logEvent(string $eventName, LogRecord $logRecord): void
+ {
+ $logRecord->setAttributes([
+ 'event.name' => $eventName,
+ 'event.domain' => $this->domain,
+ ]);
+ $this->logger->emit($logRecord);
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/EventLoggerInterface.php b/vendor/open-telemetry/api/Logs/EventLoggerInterface.php
new file mode 100644
index 000000000..a2096b9b7
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/EventLoggerInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/event-api.md#events-api-interface
+ */
+interface EventLoggerInterface
+{
+ public function logEvent(string $eventName, LogRecord $logRecord): void;
+}
diff --git a/vendor/open-telemetry/api/Logs/LogRecord.php b/vendor/open-telemetry/api/Logs/LogRecord.php
new file mode 100644
index 000000000..6833c71f9
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LogRecord.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+use OpenTelemetry\Context\ContextInterface;
+
+class LogRecord
+{
+ public const NANOS_PER_SECOND = 1_000_000_000;
+
+ protected ?int $timestamp = null;
+ protected ?int $observedTimestamp = null;
+ protected ?ContextInterface $context = null;
+ protected int $severityNumber = 0;
+ protected ?string $severityText = null;
+ protected $body = null;
+ protected array $attributes = [];
+
+ /**
+ * @param mixed $body
+ */
+ public function __construct($body = null)
+ {
+ $this->body = $body;
+ }
+
+ /**
+ * @param int $timestamp Timestamp, in nanoseconds since the unix epoch, when the event occurred.
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-timestamp
+ */
+ public function setTimestamp(int $timestamp): self
+ {
+ $this->timestamp = $timestamp;
+
+ return $this;
+ }
+
+ public function setContext(?ContextInterface $context = null): self
+ {
+ $this->context = $context;
+
+ return $this;
+ }
+
+ /**
+ * @param int $severityNumber Severity number
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-severitynumber
+ */
+ public function setSeverityNumber(int $severityNumber): self
+ {
+ $this->severityNumber = $severityNumber;
+
+ return $this;
+ }
+
+ /**
+ * @param string $severityText Severity text, also known as log level
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-severitynumber
+ */
+ public function setSeverityText(string $severityText): self
+ {
+ $this->severityText = $severityText;
+
+ return $this;
+ }
+
+ /**
+ * @param iterable $attributes Additional information about the specific event occurrence.
+ * @see https://opentelemetry.io/docs/reference/specification/logs/data-model/#field-attributes
+ */
+ public function setAttributes(iterable $attributes): self
+ {
+ foreach ($attributes as $name => $value) {
+ $this->setAttribute($name, $value);
+ }
+
+ return $this;
+ }
+
+ public function setAttribute(string $name, $value): self
+ {
+ $this->attributes[$name] = $value;
+
+ return $this;
+ }
+
+ /**
+ * @param mixed $body The log record body
+ */
+ public function setBody($body = null): self
+ {
+ $this->body = $body;
+
+ return $this;
+ }
+
+ /**
+ * @param int|null $observedTimestamp Time, in nanoseconds since the unix epoch, when the event was observed by the collection system.
+ */
+ public function setObservedTimestamp(int $observedTimestamp = null): self
+ {
+ $this->observedTimestamp = $observedTimestamp;
+
+ return $this;
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/LoggerInterface.php b/vendor/open-telemetry/api/Logs/LoggerInterface.php
new file mode 100644
index 000000000..89477c8d2
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LoggerInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+interface LoggerInterface
+{
+ public function emit(LogRecord $logRecord): void;
+}
diff --git a/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php b/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php
new file mode 100644
index 000000000..e60353de2
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/LoggerProviderInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#get-a-logger
+ */
+interface LoggerProviderInterface
+{
+ public function getLogger(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = [] //instrumentation scope attributes
+ ): LoggerInterface;
+}
diff --git a/vendor/open-telemetry/api/Logs/Map/Psr3.php b/vendor/open-telemetry/api/Logs/Map/Psr3.php
new file mode 100644
index 000000000..8fd85fad0
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/Map/Psr3.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs\Map;
+
+use Psr\Log\LogLevel;
+
+class Psr3
+{
+ /**
+ * Maps PSR-3 severity level (string) to the appropriate opentelemetry severity number
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model-appendix.md#appendix-b-severitynumber-example-mappings
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitynumber
+ */
+ public static function severityNumber(string $level): int
+ {
+ switch (strtolower($level)) {
+ case LogLevel::DEBUG:
+ return 5;
+ case LogLevel::INFO:
+ return 9;
+ case LogLevel::NOTICE:
+ return 10;
+ case LogLevel::WARNING:
+ return 13;
+ case LogLevel::ERROR:
+ return 17;
+ case LogLevel::CRITICAL:
+ return 18;
+ case LogLevel::ALERT:
+ return 19;
+ case LogLevel::EMERGENCY:
+ return 21;
+ default:
+ return 0;
+ }
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/NoopLogger.php b/vendor/open-telemetry/api/Logs/NoopLogger.php
new file mode 100644
index 000000000..faacd5e10
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/NoopLogger.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+use Psr\Log\LoggerTrait;
+
+class NoopLogger implements LoggerInterface
+{
+ use LoggerTrait;
+
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function emit(LogRecord $logRecord): void
+ {
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function log($level, $message, array $context = []): void
+ {
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php b/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php
new file mode 100644
index 000000000..8b00b6637
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Logs;
+
+class NoopLoggerProvider implements LoggerProviderInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ return NoopLogger::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/api/Logs/README.md b/vendor/open-telemetry/api/Logs/README.md
new file mode 100644
index 000000000..d0bdb923e
--- /dev/null
+++ b/vendor/open-telemetry/api/Logs/README.md
@@ -0,0 +1,19 @@
+# Logs API
+
+This `Logger` API is not designed to be used by application developers, but rather by library developers for the purpose
+of integrating existing logging libraries with OpenTelemetry.
+
+## Logging from 3rd party loggers
+
+3rd party loggers should log to OpenTelemetry in accordance with the
+[logs bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
+specification.
+
+This means that a "log appender" in the 3rd party logging library (sometimes known as a "handler") should:
+- accept an `OpenTelemetry\API\Logs\LoggerProviderInterface`, or obtain a globally registered one from `OpenTelemetry\API\Instrumentation\Globals`
+- obtain a `Logger` from the logger provider (optionally adding any resources that should be associated with logs emitted)
+- convert logs from its own log format into OpenTelemetry's `LogRecord` format
+- send the logs to OpenTelemetry via `Logger::logRecord()`
+
+See [monolog-otel-integration](/examples/logs/features/monolog-otel-integration.php) for an example.
+
diff --git a/vendor/open-telemetry/api/Metrics/CounterInterface.php b/vendor/open-telemetry/api/Metrics/CounterInterface.php
new file mode 100644
index 000000000..f0da706e1
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/CounterInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface CounterInterface
+{
+
+ /**
+ * @param float|int $amount non-negative amount to increment by
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#add
+ */
+ public function add($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/HistogramInterface.php b/vendor/open-telemetry/api/Metrics/HistogramInterface.php
new file mode 100644
index 000000000..22ddd1f3c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/HistogramInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface HistogramInterface
+{
+
+ /**
+ * @param float|int $amount non-negative amount to record
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#record
+ */
+ public function record($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/MeterInterface.php b/vendor/open-telemetry/api/Metrics/MeterInterface.php
new file mode 100644
index 000000000..6e06d9085
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/MeterInterface.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface MeterInterface
+{
+
+ /**
+ * Creates a `Counter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return CounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#counter-creation
+ */
+ public function createCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): CounterInterface;
+
+ /**
+ * Creates an `ObservableCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-counter-creation
+ */
+ public function createObservableCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableCounterInterface;
+
+ /**
+ * Creates a `Histogram`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return HistogramInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#histogram-creation
+ */
+ public function createHistogram(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): HistogramInterface;
+
+ /**
+ * Creates an `ObservableGauge`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableGaugeInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-gauge-creation
+ */
+ public function createObservableGauge(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableGaugeInterface;
+
+ /**
+ * Creates an `UpDownCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @return UpDownCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#updowncounter-creation
+ */
+ public function createUpDownCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null
+ ): UpDownCounterInterface;
+
+ /**
+ * Creates an `ObservableUpDownCounter`.
+ *
+ * @param string $name name of the instrument
+ * @param string|null $unit unit of measure
+ * @param string|null $description description of the instrument
+ * @param callable ...$callbacks responsible for reporting measurements
+ * @return ObservableUpDownCounterInterface created instrument
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-updowncounter-creation
+ */
+ public function createObservableUpDownCounter(
+ string $name,
+ ?string $unit = null,
+ ?string $description = null,
+ callable ...$callbacks
+ ): ObservableUpDownCounterInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php b/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php
new file mode 100644
index 000000000..f8fa07a2e
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface MeterProviderInterface
+{
+
+ /**
+ * Returns a `Meter` for the given instrumentation scope.
+ *
+ * @param string $name name of the instrumentation scope
+ * @param string|null $version version of the instrumentation scope
+ * @param string|null $schemaUrl schema url to record in the emitted telemetry
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * instrumentation scope attributes
+ * @return MeterInterface meter instance for the instrumentation scope
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#get-a-meter
+ */
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php
new file mode 100644
index 000000000..d47fc2166
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopCounter implements CounterInterface
+{
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php b/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php
new file mode 100644
index 000000000..79f0e60ce
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\HistogramInterface;
+
+/**
+ * @internal
+ */
+final class NoopHistogram implements HistogramInterface
+{
+ public function record($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php
new file mode 100644
index 000000000..31e3bd35c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+
+final class NoopMeter implements MeterInterface
+{
+ public function createCounter(string $name, ?string $unit = null, ?string $description = null): CounterInterface
+ {
+ return new NoopCounter();
+ }
+
+ public function createObservableCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableCounterInterface
+ {
+ return new NoopObservableCounter();
+ }
+
+ public function createHistogram(string $name, ?string $unit = null, ?string $description = null): HistogramInterface
+ {
+ return new NoopHistogram();
+ }
+
+ public function createObservableGauge(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableGaugeInterface
+ {
+ return new NoopObservableGauge();
+ }
+
+ public function createUpDownCounter(string $name, ?string $unit = null, ?string $description = null): UpDownCounterInterface
+ {
+ return new NoopUpDownCounter();
+ }
+
+ public function createObservableUpDownCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableUpDownCounterInterface
+ {
+ return new NoopObservableUpDownCounter();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php
new file mode 100644
index 000000000..b4b5810eb
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+
+final class NoopMeterProvider implements MeterProviderInterface
+{
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface {
+ return new NoopMeter();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php
new file mode 100644
index 000000000..c933bd506
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableCallback implements ObservableCallbackInterface
+{
+ public function detach(): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php
new file mode 100644
index 000000000..41e363201
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableCounter implements ObservableCounterInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php
new file mode 100644
index 000000000..987a530c8
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableGauge implements ObservableGaugeInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php
new file mode 100644
index 000000000..65a2bb830
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopObservableUpDownCounter implements ObservableUpDownCounterInterface
+{
+ public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface
+ {
+ return new NoopObservableCallback();
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php
new file mode 100644
index 000000000..e26140b7c
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics\Noop;
+
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class NoopUpDownCounter implements UpDownCounterInterface
+{
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php
new file mode 100644
index 000000000..a20e59666
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+/**
+ * An observed callback.
+ *
+ * Callbacks that are bound to an object are automatically detached when the
+ * `ObservableCallbackInterface` and the bound object are out of scope.
+ * This means that the `ObservableCallbackInterface` can be ignored if the
+ * observed callback should be bound to the lifetime of the object.
+ * ```php
+ * class Example {
+ * function __construct(MeterProviderInterface $meterProvider) {
+ * $meterProvider->getMeter('example')
+ * ->createObservableGauge('random')
+ * ->observe(fn(ObserverInterface $observer)
+ * => $observer->observe(rand(0, 10)));
+ * }
+ * }
+ * ```
+ * Keeping a reference to the `ObservableCallbackInterface` within the bound
+ * object to gain a more fine-grained control over the life-time of the callback
+ * does not prevent garbage collection (but might require cycle collection).
+ *
+ * Unbound (static) callbacks must be detached manually using
+ * {@link ObservableCallbackInterface::detach()}.
+ * ```php
+ * class Example {
+ * private ObservableCallbackInterface $gauge;
+ * function __construct(MeterProviderInterface $meterProvider) {
+ * $this->gauge = $meterProvider->getMeter('example')
+ * ->createObservableGauge('random')
+ * ->observe(static fn(ObserverInterface $observer)
+ * => $observer->observe(rand(0, 10)));
+ * }
+ * function __destruct() {
+ * $this->gauge->detach();
+ * }
+ * }
+ * ```
+ *
+ * @see ObservableCounterInterface::observe()
+ * @see ObservableGaugeInterface::observe()
+ * @see ObservableUpDownCounterInterface::observe()
+ */
+interface ObservableCallbackInterface
+{
+
+ /**
+ * Detaches the associated callback from the instrument.
+ */
+ public function detach(): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php
new file mode 100644
index 000000000..feb1ed439
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableCounterInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements (as absolute values)
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php b/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php
new file mode 100644
index 000000000..afe59a777
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableGaugeInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php
new file mode 100644
index 000000000..79548dec6
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObservableUpDownCounterInterface
+{
+
+ /**
+ * @param callable(ObserverInterface): void $callback function responsible for
+ * reporting the measurements (as absolute values)
+ * @return ObservableCallbackInterface token to detach callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface;
+}
diff --git a/vendor/open-telemetry/api/Metrics/ObserverInterface.php b/vendor/open-telemetry/api/Metrics/ObserverInterface.php
new file mode 100644
index 000000000..36e0ea791
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/ObserverInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+interface ObserverInterface
+{
+
+ /**
+ * Records the given absolute datapoint.
+ *
+ * @param float|int $amount observed amount
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ */
+ public function observe($amount, iterable $attributes = []): void;
+}
diff --git a/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php
new file mode 100644
index 000000000..f1f808fdb
--- /dev/null
+++ b/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+
+interface UpDownCounterInterface
+{
+
+ /**
+ * @param float|int $amount amount to increment / decrement by
+ * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
+ * attributes of the data point
+ * @param ContextInterface|false|null $context execution context
+ */
+ public function add($amount, iterable $attributes = [], $context = null): void;
+}
diff --git a/vendor/open-telemetry/api/README.md b/vendor/open-telemetry/api/README.md
new file mode 100644
index 000000000..c2cbd1bf1
--- /dev/null
+++ b/vendor/open-telemetry/api/README.md
@@ -0,0 +1,14 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/api/releases)
+[![Source](https://img.shields.io/badge/source-api-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/API)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:api-blue)](https://github.com/opentelemetry-php/api)
+[![Latest Version](http://poser.pugx.org/open-telemetry/api/v/unstable)](https://packagist.org/packages/open-telemetry/api/)
+[![Stable](http://poser.pugx.org/open-telemetry/api/v/stable)](https://packagist.org/packages/open-telemetry/api/)
+
+# OpenTelemetry API
+
+Documentation: https://opentelemetry.io/docs/instrumentation/php
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/api/Signals.php b/vendor/open-telemetry/api/Signals.php
new file mode 100644
index 000000000..95582aaa2
--- /dev/null
+++ b/vendor/open-telemetry/api/Signals.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API;
+
+interface Signals
+{
+ /** @var string */
+ public const TRACE = 'trace';
+ /** @var string */
+ public const METRICS = 'metrics';
+ /** @var string */
+ public const LOGS = 'logs';
+ /** @var string[] */
+ public const SIGNALS = [
+ self::TRACE,
+ self::METRICS,
+ self::LOGS,
+ ];
+}
diff --git a/vendor/open-telemetry/api/Trace/NonRecordingSpan.php b/vendor/open-telemetry/api/Trace/NonRecordingSpan.php
new file mode 100644
index 000000000..67d74d39b
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NonRecordingSpan.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#wrapping-a-spancontext-in-a-span
+ *
+ * @psalm-internal OpenTelemetry
+ */
+final class NonRecordingSpan extends Span
+{
+ private SpanContextInterface $context;
+
+ public function __construct(
+ SpanContextInterface $context
+ ) {
+ $this->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/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php b/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php
new file mode 100644
index 000000000..6f971e525
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopSpanBuilder.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextStorageInterface;
+
+final class NoopSpanBuilder implements SpanBuilderInterface
+{
+ private ContextStorageInterface $contextStorage;
+
+ /** @var ContextInterface|false|null */
+ private $parentContext = null;
+
+ public function __construct(ContextStorageInterface $contextStorage)
+ {
+ $this->contextStorage = $contextStorage;
+ }
+
+ public function setParent($context): SpanBuilderInterface
+ {
+ $this->parentContext = $context;
+
+ 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 $timestampNanos): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function setSpanKind(int $spanKind): SpanBuilderInterface
+ {
+ return $this;
+ }
+
+ public function startSpan(): SpanInterface
+ {
+ $parentContext = Context::resolve($this->parentContext, $this->contextStorage);
+ $span = Span::fromContext($parentContext);
+ if ($span->isRecording()) {
+ $span = Span::wrap($span->getContext());
+ }
+
+ return $span;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/NoopTracer.php b/vendor/open-telemetry/api/Trace/NoopTracer.php
new file mode 100644
index 000000000..bc50248bd
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopTracer.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+
+final class NoopTracer implements TracerInterface
+{
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function spanBuilder(string $spanName): SpanBuilderInterface
+ {
+ return new NoopSpanBuilder(Context::storage());
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/NoopTracerProvider.php b/vendor/open-telemetry/api/Trace/NoopTracerProvider.php
new file mode 100644
index 000000000..e186a6fd9
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/NoopTracerProvider.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+class NoopTracerProvider implements TracerProviderInterface
+{
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): TracerInterface {
+ return NoopTracer::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php b/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php
new file mode 100644
index 000000000..b70a15647
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Propagation/TraceContextPropagator.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace\Propagation;
+
+use function count;
+use function explode;
+use function hexdec;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\API\Trace\SpanContext;
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\API\Trace\SpanContextValidator;
+use OpenTelemetry\API\Trace\TraceFlags;
+use OpenTelemetry\API\Trace\TraceState;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\Propagation\ArrayAccessGetterSetter;
+use OpenTelemetry\Context\Propagation\PropagationGetterInterface;
+use OpenTelemetry\Context\Propagation\PropagationSetterInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+
+/**
+ * TraceContext is a propagator that supports the W3C Trace Context format
+ * (https://www.w3.org/TR/trace-context/)
+ *
+ * This propagator will propagate the traceparent and tracestate headers to
+ * guarantee traces are not broken. It is up to the users of this propagator
+ * to choose if they want to participate in a trace by modifying the
+ * traceparent header and relevant parts of the tracestate header containing
+ * their proprietary information.
+ */
+final class TraceContextPropagator implements TextMapPropagatorInterface
+{
+ public const TRACEPARENT = 'traceparent';
+ public const TRACESTATE = 'tracestate';
+ private const VERSION = '00'; // Currently, only '00' is supported
+
+ public const FIELDS = [
+ self::TRACEPARENT,
+ self::TRACESTATE,
+ ];
+
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** {@inheritdoc} */
+ public function fields(): array
+ {
+ return self::FIELDS;
+ }
+
+ /** {@inheritdoc} */
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ $setter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+ $spanContext = Span::fromContext($context)->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, ContextInterface $context = null): ContextInterface
+ {
+ $getter ??= ArrayAccessGetterSetter::getInstance();
+ $context ??= Context::getCurrent();
+
+ $spanContext = self::extractImpl($carrier, $getter);
+ if (!$spanContext->isValid()) {
+ return $context;
+ }
+
+ return $context->withContextValue(Span::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);
+
+ // If the header does not have at least 4 pieces, it is invalid -- restart the trace.
+ if (count($pieces) < 4) {
+ return SpanContext::getInvalid();
+ }
+
+ [$version, $traceId, $spanId, $traceFlags] = $pieces;
+
+ /**
+ * Return invalid if:
+ * - Version is invalid (not 2 char hex or 'ff')
+ * - Trace version, trace ID, span ID or trace flag are invalid
+ */
+ if (!TraceContextValidator::isValidTraceVersion($version)
+ || !SpanContextValidator::isValidTraceId($traceId)
+ || !SpanContextValidator::isValidSpanId($spanId)
+ || !TraceContextValidator::isValidTraceFlag($traceFlags)
+ ) {
+ return SpanContext::getInvalid();
+ }
+
+ // Return invalid if the trace version is not a future version but still has > 4 pieces.
+ $versionIsFuture = hexdec($version) > hexdec(self::VERSION);
+ if (count($pieces) > 4 && !$versionIsFuture) {
+ return SpanContext::getInvalid();
+ }
+
+ // Only the sampled flag is extracted from the traceFlags (00000001)
+ $convertedTraceFlags = hexdec($traceFlags);
+ $isSampled = ($convertedTraceFlags & TraceFlags::SAMPLED) === TraceFlags::SAMPLED;
+
+ // Tracestate = 'Vendor1=Value1,...,VendorN=ValueN'
+ $rawTracestate = $getter->get($carrier, self::TRACESTATE);
+ if ($rawTracestate !== null) {
+ $tracestate = new TraceState($rawTracestate);
+
+ return SpanContext::createFromRemoteParent(
+ $traceId,
+ $spanId,
+ $isSampled ? TraceFlags::SAMPLED : TraceFlags::DEFAULT,
+ $tracestate
+ );
+ }
+
+ // Only traceparent header is extracted. No tracestate.
+ return SpanContext::createFromRemoteParent(
+ $traceId,
+ $spanId,
+ $isSampled ? TraceFlags::SAMPLED : TraceFlags::DEFAULT
+ );
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php b/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php
new file mode 100644
index 000000000..5fb3f12c7
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Propagation/TraceContextValidator.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace\Propagation;
+
+use function strlen;
+
+class TraceContextValidator
+{
+ public const TRACE_FLAG_LENGTH = 2;
+ public const TRACE_VERSION_REGEX = '/^(?!ff)[\da-f]{2}$/';
+
+ /**
+ * @param string $traceVersion
+ * @return bool Returns a value that indicates whether a trace version is valid.
+ */
+ public static function isValidTraceVersion(string $traceVersion): bool
+ {
+ return 1 === preg_match(self::TRACE_VERSION_REGEX, $traceVersion);
+ }
+
+ /**
+ * @return bool Returns a value that indicates whether trace flag is valid
+ * TraceFlags must be exactly 1 bytes (1 char) representing a bit field
+ */
+ public static function isValidTraceFlag(string $traceFlag): bool
+ {
+ return ctype_xdigit($traceFlag) && strlen($traceFlag) === self::TRACE_FLAG_LENGTH;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/Span.php b/vendor/open-telemetry/api/Trace/Span.php
new file mode 100644
index 000000000..88360e6cd
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/Span.php
@@ -0,0 +1,59 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ContextKeys;
+use OpenTelemetry\Context\ScopeInterface;
+
+abstract class Span implements SpanInterface
+{
+ private static ?self $invalidSpan = null;
+
+ /** @inheritDoc */
+ final public static function fromContext(ContextInterface $context): SpanInterface
+ {
+ return $context->get(ContextKeys::span()) ?? self::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(ContextInterface $context): ContextInterface
+ {
+ return $context->with(ContextKeys::span(), $this);
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php b/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php
new file mode 100644
index 000000000..52070933a
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanBuilderInterface.php
@@ -0,0 +1,51 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+
+/**
+ * Obtained from a {@see TracerInterface} and used to construct a {@see SpanInterface}.
+ */
+interface SpanBuilderInterface
+{
+ /**
+ * Sets the parent `Context`.
+ *
+ * @param ContextInterface|false|null $context the parent context, null to use the
+ * current context, false to set no parent
+ * @return SpanBuilderInterface this span builder
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span-creation
+ */
+ public function setParent($context): SpanBuilderInterface;
+
+ public function addLink(SpanContextInterface $context, iterable $attributes = []): SpanBuilderInterface;
+ public function setAttribute(string $key, $value): SpanBuilderInterface;
+ public function setAttributes(iterable $attributes): SpanBuilderInterface;
+
+ /**
+ * Sets an explicit start timestamp for the newly created {@see SpanInterface}.
+ * The provided *$timestamp* is assumed to be in nanoseconds.
+ *
+ * Defaults to the timestamp when {@see SpanBuilderInterface::startSpan} was called if not explicitly set.
+ */
+ public function setStartTimestamp(int $timestampNanos): SpanBuilderInterface;
+
+ /**
+ * @psalm-param SpanKind::KIND_* $spanKind
+ */
+ public function setSpanKind(int $spanKind): SpanBuilderInterface;
+
+ /**
+ * Starts and returns a new {@see SpanInterface}.
+ *
+ * The user _MUST_ manually end the span by calling {@see SpanInterface::end}.
+ *
+ * This method does _NOT_ automatically install the span into the current context.
+ * The user is responsible for calling {@see SpanInterface::activate} when they wish to do so.
+ */
+ public function startSpan(): SpanInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContext.php b/vendor/open-telemetry/api/Trace/SpanContext.php
new file mode 100644
index 000000000..7da7c0701
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContext.php
@@ -0,0 +1,127 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function hex2bin;
+
+final class SpanContext implements SpanContextInterface
+{
+ private static ?SpanContextInterface $invalidContext = null;
+
+ /**
+ * @see https://www.w3.org/TR/trace-context/#trace-flags
+ * @see https://www.w3.org/TR/trace-context/#sampled-flag
+ */
+ private bool $isSampled;
+
+ private string $traceId;
+ private string $spanId;
+ private ?TraceStateInterface $traceState;
+ private bool $isValid = true;
+ private bool $isRemote;
+ private int $traceFlags;
+
+ private function __construct(
+ string $traceId,
+ string $spanId,
+ int $traceFlags,
+ bool $isRemote,
+ TraceStateInterface $traceState = null
+ ) {
+ // TraceId must be exactly 16 bytes (32 chars) and at least one non-zero byte
+ // SpanId must be exactly 8 bytes (16 chars) and at least one non-zero byte
+ if (!SpanContextValidator::isValidTraceId($traceId) || !SpanContextValidator::isValidSpanId($spanId)) {
+ $traceId = SpanContextValidator::INVALID_TRACE;
+ $spanId = SpanContextValidator::INVALID_SPAN;
+ $this->isValid=false;
+ }
+
+ $this->traceId = $traceId;
+ $this->spanId = $spanId;
+ $this->traceState = $traceState;
+ $this->isRemote = $isRemote;
+ $this->isSampled = ($traceFlags & TraceFlags::SAMPLED) === TraceFlags::SAMPLED;
+ $this->traceFlags = $traceFlags;
+ }
+
+ public function getTraceId(): string
+ {
+ return $this->traceId;
+ }
+
+ public function getTraceIdBinary(): string
+ {
+ return hex2bin($this->traceId);
+ }
+
+ public function getSpanId(): string
+ {
+ return $this->spanId;
+ }
+
+ public function getSpanIdBinary(): string
+ {
+ return hex2bin($this->spanId);
+ }
+
+ public function getTraceState(): ?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;
+ }
+
+ /** @inheritDoc */
+ public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface
+ {
+ return new self(
+ $traceId,
+ $spanId,
+ $traceFlags,
+ true,
+ $traceState,
+ );
+ }
+
+ /** @inheritDoc */
+ public static function create(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface
+ {
+ return new self(
+ $traceId,
+ $spanId,
+ $traceFlags,
+ false,
+ $traceState,
+ );
+ }
+
+ /** @inheritDoc */
+ public static function getInvalid(): SpanContextInterface
+ {
+ if (null === self::$invalidContext) {
+ self::$invalidContext = self::create(SpanContextValidator::INVALID_TRACE, SpanContextValidator::INVALID_SPAN, 0);
+ }
+
+ return self::$invalidContext;
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContextInterface.php b/vendor/open-telemetry/api/Trace/SpanContextInterface.php
new file mode 100644
index 000000000..d15bc5987
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContextInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#spancontext
+ */
+interface SpanContextInterface
+{
+ public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface;
+ public static function getInvalid(): SpanContextInterface;
+ public static function create(string $traceId, string $spanId, int $traceFlags = TraceFlags::DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface;
+
+ /** @psalm-mutation-free */
+ public function getTraceId(): string;
+ public function getTraceIdBinary(): string;
+
+ /** @psalm-mutation-free */
+ public function getSpanId(): string;
+ public function getSpanIdBinary(): string;
+ public function getTraceFlags(): int;
+ public function getTraceState(): ?TraceStateInterface;
+ public function isValid(): bool;
+ public function isRemote(): bool;
+ public function isSampled(): bool;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanContextValidator.php b/vendor/open-telemetry/api/Trace/SpanContextValidator.php
new file mode 100644
index 000000000..09b39f6d8
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanContextValidator.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function strlen;
+use function strtolower;
+
+class SpanContextValidator
+{
+ public const VALID_SPAN = '/^[0-9a-f]{16}$/';
+ public const VALID_TRACE = '/^[0-9a-f]{32}$/';
+ public const INVALID_SPAN = '0000000000000000';
+ public const INVALID_TRACE = '00000000000000000000000000000000';
+ public const SPAN_LENGTH = 16;
+ public const TRACE_LENGTH = 32;
+ public const SPAN_LENGTH_BYTES = 8;
+
+ /**
+ * @return bool Returns a value that indicates whether a trace id is valid
+ */
+ public static function isValidTraceId(string $traceId): bool
+ {
+ return ctype_xdigit($traceId) && strlen($traceId) === self::TRACE_LENGTH && $traceId !== self::INVALID_TRACE && $traceId === strtolower($traceId);
+ }
+
+ /**
+ * @return bool Returns a value that indicates whether a span id is valid
+ */
+ public static function isValidSpanId(string $spanId): bool
+ {
+ return ctype_xdigit($spanId) && strlen($spanId) === self::SPAN_LENGTH && $spanId !== self::INVALID_SPAN && $spanId === strtolower($spanId);
+ }
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanInterface.php b/vendor/open-telemetry/api/Trace/SpanInterface.php
new file mode 100644
index 000000000..274a257ea
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanInterface.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\Context\ImplicitContextKeyedInterface;
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#span-operations
+ */
+interface SpanInterface extends ImplicitContextKeyedInterface
+{
+ /**
+ * Returns the {@see SpanInterface} from the provided *$context*,
+ * falling back on {@see SpanInterface::getInvalid()} if there is no span in the provided context.
+ */
+ public static function fromContext(ContextInterface $context): SpanInterface;
+
+ /**
+ * Returns the current {@see SpanInterface} from the current {@see ContextInterface},
+ * falling back on {@see SpanInterface::getEmpty()} if there is no span in the current context.
+ */
+ public static function getCurrent(): SpanInterface;
+
+ /**
+ * Returns an invalid {@see SpanInterface} that is used when tracing is disabled, such s when there is no available SDK.
+ */
+ public static function getInvalid(): SpanInterface;
+
+ /**
+ * Returns a non-recording {@see SpanInterface} that hold the provided *$spanContext* but has no functionality.
+ * It will not be exported and al tracing operations are no-op, but can be used to propagate a valid {@see SpanContext} downstream.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#wrapping-a-spancontext-in-a-span
+ */
+ public static function wrap(SpanContextInterface $spanContext): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#get-context
+ */
+ public function getContext(): SpanContextInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#isrecording
+ */
+ public function isRecording(): bool;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-attributes
+ * Adding attributes at span creation is preferred to calling setAttribute later, as samplers can only consider information
+ * already present during span creation
+ * @param non-empty-string $key
+ * @param bool|int|float|string|array|null $value Note: arrays MUST be homogeneous, i.e. it MUST NOT contain values of different types.
+ */
+ public function setAttribute(string $key, $value): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-attributes
+ * An attribute with a null key will be dropped, and an attribute with a null value will be dropped but also remove any existing
+ * attribute with the same key.
+ * @param iterable<non-empty-string, bool|int|float|string|array|null> $attributes
+ */
+ public function setAttributes(iterable $attributes): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#add-events
+ */
+ public function addEvent(string $name, iterable $attributes = [], int $timestamp = null): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#record-exception
+ */
+ public function recordException(Throwable $exception, iterable $attributes = []): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#updatename
+ *
+ * @param non-empty-string $name
+ */
+ public function updateName(string $name): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-status
+ *
+ * @psalm-param StatusCode::STATUS_* $code
+ */
+ public function setStatus(string $code, string $description = null): SpanInterface;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#end
+ */
+ public function end(int $endEpochNanos = null): void;
+}
diff --git a/vendor/open-telemetry/api/Trace/SpanKind.php b/vendor/open-telemetry/api/Trace/SpanKind.php
new file mode 100644
index 000000000..f44339e00
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/SpanKind.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#spankind
+ */
+interface SpanKind
+{
+ public const KIND_INTERNAL = 0;
+ public const KIND_CLIENT = 1;
+ public const KIND_SERVER = 2;
+ public const KIND_PRODUCER = 3;
+ public const KIND_CONSUMER = 4;
+}
diff --git a/vendor/open-telemetry/api/Trace/StatusCode.php b/vendor/open-telemetry/api/Trace/StatusCode.php
new file mode 100644
index 000000000..0d95e96a5
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/StatusCode.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#set-status
+ */
+interface StatusCode
+{
+ public const STATUS_UNSET = 'Unset';
+ public const STATUS_OK = 'Ok';
+ public const STATUS_ERROR = 'Error';
+}
diff --git a/vendor/open-telemetry/api/Trace/TraceFlags.php b/vendor/open-telemetry/api/Trace/TraceFlags.php
new file mode 100644
index 000000000..6adf72b1a
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceFlags.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+interface TraceFlags
+{
+ public const SAMPLED = 0x01;
+ public const DEFAULT = 0x00;
+}
diff --git a/vendor/open-telemetry/api/Trace/TraceState.php b/vendor/open-telemetry/api/Trace/TraceState.php
new file mode 100644
index 000000000..306a63322
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceState.php
@@ -0,0 +1,190 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use function array_reverse;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use function strlen;
+
+class TraceState implements TraceStateInterface
+{
+ use LogsMessagesTrait;
+
+ public const MAX_LIST_MEMBERS = 32; //@see https://www.w3.org/TR/trace-context/#tracestate-header-field-values
+ public const MAX_COMBINED_LENGTH = 512; //@see https://www.w3.org/TR/trace-context/#tracestate-limits
+ public const LIST_MEMBERS_SEPARATOR = ',';
+ public const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
+ private const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*\/]';
+ private const VALID_KEY = '[a-z]' . self::VALID_KEY_CHAR_RANGE . '{0,255}';
+ private const VALID_VENDOR_KEY = '[a-z0-9]' . self::VALID_KEY_CHAR_RANGE . '{0,240}@[a-z]' . self::VALID_KEY_CHAR_RANGE . '{0,13}';
+ private const VALID_KEY_REGEX = '/^(?:' . self::VALID_KEY . '|' . self::VALID_VENDOR_KEY . ')$/';
+ private const VALID_VALUE_BASE_REGEX = '/^[ -~]{0,255}[!-~]$/';
+ private const INVALID_VALUE_COMMA_EQUAL_REGEX = '/,|=/';
+
+ /**
+ * @var string[]
+ */
+ private array $traceState = [];
+
+ public function __construct(string $rawTracestate = null)
+ {
+ if ($rawTracestate === null || trim($rawTracestate) === '') {
+ return;
+ }
+ $this->traceState = $this->parse($rawTracestate);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function with(string $key, string $value): TraceStateInterface
+ {
+ $clonedTracestate = clone $this;
+
+ 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;
+ } else {
+ self::logWarning('Invalid tracetrace key/value for: ' . $key);
+ }
+
+ return $clonedTracestate;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function without(string $key): TraceStateInterface
+ {
+ $clonedTracestate = clone $this;
+
+ 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 ($this->traceState === []) {
+ return '';
+ }
+ $traceStateString='';
+ foreach (array_reverse($this->traceState) as $k => $v) {
+ $traceStateString .=$k . self::LIST_MEMBER_KEY_VALUE_SPLITTER . $v . self::LIST_MEMBERS_SEPARATOR;
+ }
+
+ return rtrim($traceStateString, ',');
+ }
+
+ /**
+ * 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
+ {
+ if (strlen($rawTracestate) > self::MAX_COMBINED_LENGTH) {
+ self::logWarning('tracestate discarded, exceeds max combined length: ' . self::MAX_COMBINED_LENGTH);
+
+ return [];
+ }
+ $parsedTracestate = [];
+ $listMembers = explode(self::LIST_MEMBERS_SEPARATOR, $rawTracestate);
+
+ if (count($listMembers) > self::MAX_LIST_MEMBERS) {
+ self::logWarning('tracestate discarded, too many members');
+
+ return [];
+ }
+
+ 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 || !$this->validateKey($vendor[0]) || !$this->validateValue($vendor[1])) {
+ self::logWarning('tracestate discarded, invalid member: ' . $listMember);
+
+ return [];
+ }
+ $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/vendor/open-telemetry/api/Trace/TraceStateInterface.php b/vendor/open-telemetry/api/Trace/TraceStateInterface.php
new file mode 100644
index 000000000..79d4e0299
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TraceStateInterface.php
@@ -0,0 +1,61 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/**
+ * TraceState parses and stores the tracestate header as an immutable list of string
+ * key/value pairs. It provides the following operations following the rules described
+ * in the W3C Trace Context specification:
+ * - Get value for a given key
+ * - Add a new key/value pair
+ * - Update an existing value for a given key
+ * - Delete a key/value pair
+ *
+ * All mutating operations return a new TraceState with the modifications applied.
+ *
+ * @see https://www.w3.org/TR/trace-context/#tracestate-header
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#tracestate
+ */
+interface TraceStateInterface
+{
+ /**
+ * Return a new TraceState object that inherits from this TraceState
+ * and contains the given key value pair.
+ *
+ * @param string $key
+ * @param string $value
+ * @return TraceStateInterface
+ */
+ public function with(string $key, string $value): TraceStateInterface;
+
+ /**
+ * Return a new TraceState object that inherits from this TraceState
+ * without the given key value pair.
+ *
+ * @param string $key
+ * @return TraceStateInterface
+ */
+ public function without(string $key): TraceStateInterface;
+
+ /**
+ * Return the value of a given key from this TraceState if it exists
+ *
+ * @param string $key
+ * @return string|null
+ */
+ public function get(string $key): ?string;
+
+ /**
+ * Get the list-member count in this TraceState
+ *
+ * @return int
+ */
+ public function getListMemberCount(): int;
+
+ /**
+ * Returns a string representation of this TraceSate
+ */
+ public function __toString(): string;
+}
diff --git a/vendor/open-telemetry/api/Trace/TracerInterface.php b/vendor/open-telemetry/api/Trace/TracerInterface.php
new file mode 100644
index 000000000..1293a6642
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TracerInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+interface TracerInterface
+{
+ /** @param non-empty-string $spanName */
+ public function spanBuilder(string $spanName): SpanBuilderInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/TracerProviderInterface.php b/vendor/open-telemetry/api/Trace/TracerProviderInterface.php
new file mode 100644
index 000000000..9f5d20759
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/TracerProviderInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+/** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/api.md#tracerprovider */
+interface TracerProviderInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/api.md#get-a-tracer
+ */
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): TracerInterface;
+}
diff --git a/vendor/open-telemetry/api/Trace/functions.php b/vendor/open-telemetry/api/Trace/functions.php
new file mode 100644
index 000000000..79f730717
--- /dev/null
+++ b/vendor/open-telemetry/api/Trace/functions.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Trace;
+
+use Closure;
+use Throwable;
+
+/**
+ * Executes the given closure within the provided span.
+ *
+ * The span will be ended.
+ *
+ * @template R
+ * @param SpanInterface $span span to enclose the closure with
+ * @param Closure(...): R $closure closure to invoke
+ * @param iterable<int|string, mixed> $args arguments to provide to the closure
+ * @return R result of the closure invocation
+ *
+ * @phpstan-ignore-next-line
+ */
+function trace(SpanInterface $span, Closure $closure, iterable $args = [])
+{
+ $s = $span;
+ $c = $closure;
+ $a = $args;
+ unset($span, $closure, $args);
+
+ $scope = $s->activate();
+
+ try {
+ /** @psalm-suppress InvalidArgument */
+ return $c(...$a, ...($a = []));
+ } catch (Throwable $e) {
+ $s->setStatus(StatusCode::STATUS_ERROR, $e->getMessage());
+ $s->recordException($e, ['exception.escaped' => true]);
+
+ throw $e;
+ } finally {
+ $scope->detach();
+ $s->end();
+ }
+}
diff --git a/vendor/open-telemetry/api/composer.json b/vendor/open-telemetry/api/composer.json
new file mode 100644
index 000000000..39acaec47
--- /dev/null
+++ b/vendor/open-telemetry/api/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "open-telemetry/api",
+ "description": "API for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "api"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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",
+ "open-telemetry/context": "^1.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\API\\": "."
+ },
+ "files": [
+ "Trace/functions.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/Context.php b/vendor/open-telemetry/context/Context.php
new file mode 100644
index 000000000..32b0162a3
--- /dev/null
+++ b/vendor/open-telemetry/context/Context.php
@@ -0,0 +1,131 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function spl_object_id;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
+ */
+final class Context implements ContextInterface
+{
+ /** @var ContextStorageInterface&ExecutionContextAwareInterface */
+ private static ContextStorageInterface $storage;
+
+ // Optimization for spans to avoid copying the context array.
+ private static ContextKeyInterface $spanContextKey;
+ private ?object $span = null;
+ /** @var array<int, mixed> */
+ private array $context = [];
+ /** @var array<int, ContextKeyInterface> */
+ private array $contextKeys = [];
+
+ private function __construct()
+ {
+ self::$spanContextKey = ContextKeys::span();
+ }
+
+ public static function createKey(string $key): ContextKeyInterface
+ {
+ return new ContextKey($key);
+ }
+
+ /**
+ * @param ContextStorageInterface&ExecutionContextAwareInterface $storage
+ */
+ public static function setStorage(ContextStorageInterface $storage): void
+ {
+ self::$storage = $storage;
+ }
+
+ /**
+ * @return ContextStorageInterface&ExecutionContextAwareInterface
+ */
+ public static function storage(): ContextStorageInterface
+ {
+ /** @psalm-suppress RedundantPropertyInitializationCheck */
+ return self::$storage ??= new ContextStorage();
+ }
+
+ /**
+ * @param ContextInterface|false|null $context
+ *
+ * @internal OpenTelemetry
+ */
+ public static function resolve($context, ?ContextStorageInterface $contextStorage = null): ContextInterface
+ {
+ return $context
+ ?? ($contextStorage ?? self::storage())->current()
+ ?: self::getRoot();
+ }
+
+ /**
+ * @internal
+ */
+ public static function getRoot(): ContextInterface
+ {
+ static $empty;
+
+ return $empty ??= new self();
+ }
+
+ public static function getCurrent(): ContextInterface
+ {
+ return self::storage()->current();
+ }
+
+ public function activate(): ScopeInterface
+ {
+ $scope = self::storage()->attach($this);
+ /** @psalm-suppress RedundantCondition */
+ assert((bool) $scope = new DebugScope($scope));
+
+ return $scope;
+ }
+
+ public function withContextValue(ImplicitContextKeyedInterface $value): ContextInterface
+ {
+ return $value->storeInContext($this);
+ }
+
+ public function with(ContextKeyInterface $key, $value): self
+ {
+ if ($this->get($key) === $value) {
+ return $this;
+ }
+
+ $self = clone $this;
+
+ if ($key === self::$spanContextKey) {
+ $self->span = $value; // @phan-suppress-current-line PhanTypeMismatchPropertyReal
+
+ return $self;
+ }
+
+ $id = spl_object_id($key);
+ if ($value !== null) {
+ $self->context[$id] = $value;
+ $self->contextKeys[$id] ??= $key;
+ } else {
+ unset(
+ $self->context[$id],
+ $self->contextKeys[$id],
+ );
+ }
+
+ return $self;
+ }
+
+ public function get(ContextKeyInterface $key)
+ {
+ if ($key === self::$spanContextKey) {
+ /** @psalm-suppress InvalidReturnStatement */
+ return $this->span;
+ }
+
+ return $this->context[spl_object_id($key)] ?? null;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextInterface.php b/vendor/open-telemetry/context/ContextInterface.php
new file mode 100644
index 000000000..17a3fb9a2
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextInterface.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * Immutable execution scoped propagation mechanism.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
+ */
+interface ContextInterface
+{
+ /**
+ * Creates a new context key.
+ *
+ * @param non-empty-string $key name of the key
+ * @return ContextKeyInterface created key
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#create-a-key
+ */
+ public static function createKey(string $key): ContextKeyInterface;
+
+ /**
+ * Returns the current context.
+ *
+ * @return ContextInterface current context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-current-context
+ */
+ public static function getCurrent(): ContextInterface;
+
+ /**
+ * Attaches this context as active context.
+ *
+ * The returned scope has to be {@link ScopeInterface::detach()}ed. In most
+ * cases this should be done using a `try-finally` statement:
+ * ```php
+ * $scope = $context->activate();
+ * try {
+ * // ...
+ * } finally {
+ * $scope->detach();
+ * }
+ * ```
+ *
+ * @return ScopeInterface scope to detach the context and restore the previous
+ * context
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#attach-context
+ */
+ public function activate(): ScopeInterface;
+
+ /**
+ * Returns a context with the given key set to the given value.
+ *
+ * @template T
+ * @param ContextKeyInterface<T> $key key to set
+ * @param T|null $value value to set
+ * @return ContextInterface a context with the given key set to `$value`
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value
+ */
+ public function with(ContextKeyInterface $key, $value): ContextInterface;
+
+ /**
+ * Returns a context with the given value set.
+ *
+ * @param ImplicitContextKeyedInterface $value value to set
+ * @return ContextInterface a context with the given `$value`
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value
+ */
+ public function withContextValue(ImplicitContextKeyedInterface $value): ContextInterface;
+
+ /**
+ * Returns the value assigned to the given key.
+ *
+ * @template T
+ * @param ContextKeyInterface<T> $key key to get
+ * @return T|null value assigned to `$key`, or null if no such value exists
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-value
+ */
+ public function get(ContextKeyInterface $key);
+}
diff --git a/vendor/open-telemetry/context/ContextKey.php b/vendor/open-telemetry/context/ContextKey.php
new file mode 100644
index 000000000..f7450249e
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKey.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextKey implements ContextKeyInterface
+{
+ private ?string $name;
+
+ public function __construct(?string $name=null)
+ {
+ $this->name = $name;
+ }
+
+ public function name(): ?string
+ {
+ return $this->name;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextKeyInterface.php b/vendor/open-telemetry/context/ContextKeyInterface.php
new file mode 100644
index 000000000..b3ad00814
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKeyInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @template-covariant T
+ */
+interface ContextKeyInterface
+{
+}
diff --git a/vendor/open-telemetry/context/ContextKeys.php b/vendor/open-telemetry/context/ContextKeys.php
new file mode 100644
index 000000000..bc1022568
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextKeys.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @psalm-internal OpenTelemetry
+ */
+final class ContextKeys
+{
+ public static function span(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey('opentelemetry-trace-span-key');
+ }
+
+ public static function baggage(): ContextKeyInterface
+ {
+ static $instance;
+
+ return $instance ??= Context::createKey('opentelemetry-trace-baggage-key');
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorage.php b/vendor/open-telemetry/context/ContextStorage.php
new file mode 100644
index 000000000..e82d3d161
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorage.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextStorage implements ContextStorageInterface, ExecutionContextAwareInterface
+{
+ public ContextStorageHead $current;
+ private ContextStorageHead $main;
+ /** @var array<int|string, ContextStorageHead> */
+ private array $forks = [];
+
+ public function __construct()
+ {
+ $this->current = $this->main = new ContextStorageHead($this);
+ }
+
+ public function fork($id): void
+ {
+ $this->forks[$id] = clone $this->current;
+ }
+
+ public function switch($id): void
+ {
+ $this->current = $this->forks[$id] ?? $this->main;
+ }
+
+ public function destroy($id): void
+ {
+ unset($this->forks[$id]);
+ }
+
+ public function scope(): ?ContextStorageScopeInterface
+ {
+ return ($this->current->node->head ?? null) === $this->current
+ ? $this->current->node
+ : null;
+ }
+
+ public function current(): ContextInterface
+ {
+ return $this->current->node->context ?? Context::getRoot();
+ }
+
+ public function attach(ContextInterface $context): ContextStorageScopeInterface
+ {
+ return $this->current->node = new ContextStorageNode($context, $this->current, $this->current->node);
+ }
+
+ private function __clone()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageHead.php b/vendor/open-telemetry/context/ContextStorageHead.php
new file mode 100644
index 000000000..3cc4d7181
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageHead.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * @internal
+ */
+final class ContextStorageHead
+{
+ public ContextStorage $storage;
+ public ?ContextStorageNode $node = null;
+
+ public function __construct(ContextStorage $storage)
+ {
+ $this->storage = $storage;
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageInterface.php b/vendor/open-telemetry/context/ContextStorageInterface.php
new file mode 100644
index 000000000..e5a105074
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+interface ContextStorageInterface
+{
+ /**
+ * Returns the current scope.
+ *
+ * @return ContextStorageScopeInterface|null current scope, or null if no
+ * scope was attached in the current execution unit
+ */
+ public function scope(): ?ContextStorageScopeInterface;
+
+ /**
+ * Returns the current context.
+ *
+ * @return ContextInterface current context
+ */
+ public function current(): ContextInterface;
+
+ /**
+ * Attaches the context as active context.
+ *
+ * @param ContextInterface $context context to attach
+ * @return ContextStorageScopeInterface scope to detach the context and
+ * restore the previous context
+ */
+ public function attach(ContextInterface $context): ContextStorageScopeInterface;
+}
diff --git a/vendor/open-telemetry/context/ContextStorageNode.php b/vendor/open-telemetry/context/ContextStorageNode.php
new file mode 100644
index 000000000..12d521660
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageNode.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+
+/**
+ * @internal
+ */
+final class ContextStorageNode implements ScopeInterface, ContextStorageScopeInterface
+{
+ public ContextInterface $context;
+ public ContextStorageHead $head;
+ private ?ContextStorageNode $previous;
+ private array $localStorage = [];
+
+ public function __construct(
+ ContextInterface $context,
+ ContextStorageHead $head,
+ ?ContextStorageNode $previous = null
+ ) {
+ $this->context = $context;
+ $this->head = $head;
+ $this->previous = $previous;
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return isset($this->localStorage[$offset]);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->localStorage[$offset];
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ $this->localStorage[$offset] = $value;
+ }
+
+ public function offsetUnset($offset): void
+ {
+ unset($this->localStorage[$offset]);
+ }
+
+ public function context(): ContextInterface
+ {
+ return $this->context;
+ }
+
+ public function detach(): int
+ {
+ $flags = 0;
+ if ($this->head !== $this->head->storage->current) {
+ $flags |= ScopeInterface::INACTIVE;
+ }
+
+ if ($this === $this->head->node) {
+ assert($this->previous !== $this);
+ $this->head->node = $this->previous;
+ $this->previous = $this;
+
+ return $flags;
+ }
+
+ if ($this->previous === $this) {
+ return $flags | ScopeInterface::DETACHED;
+ }
+
+ assert($this->head->node !== null);
+ for ($n = $this->head->node, $depth = 1;
+ $n->previous !== $this;
+ $n = $n->previous, $depth++) {
+ assert($n->previous !== null);
+ }
+ $n->previous = $this->previous;
+ $this->previous = $this;
+
+ return $flags | ScopeInterface::MISMATCH | $depth;
+ }
+
+ private function __clone()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/ContextStorageScopeInterface.php b/vendor/open-telemetry/context/ContextStorageScopeInterface.php
new file mode 100644
index 000000000..5fe58d6eb
--- /dev/null
+++ b/vendor/open-telemetry/context/ContextStorageScopeInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use ArrayAccess;
+
+interface ContextStorageScopeInterface extends ScopeInterface, ArrayAccess
+{
+ /**
+ * Returns the context associated with this scope.
+ *
+ * @return ContextInterface associated context
+ */
+ public function context(): ContextInterface;
+
+ /**
+ * @param string $offset
+ */
+ public function offsetSet($offset, $value): void;
+}
diff --git a/vendor/open-telemetry/context/DebugScope.php b/vendor/open-telemetry/context/DebugScope.php
new file mode 100644
index 000000000..e9e4d53c5
--- /dev/null
+++ b/vendor/open-telemetry/context/DebugScope.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function basename;
+use function count;
+use function debug_backtrace;
+use const DEBUG_BACKTRACE_IGNORE_ARGS;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class DebugScope implements ScopeInterface
+{
+ private const DEBUG_TRACE_CREATE = '__debug_trace_create';
+ private const DEBUG_TRACE_DETACH = '__debug_trace_detach';
+
+ private ContextStorageScopeInterface $scope;
+
+ public function __construct(ContextStorageScopeInterface $node)
+ {
+ $this->scope = $node;
+ $this->scope[self::DEBUG_TRACE_CREATE] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+ }
+
+ public function detach(): int
+ {
+ $this->scope[self::DEBUG_TRACE_DETACH] ??= debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+
+ $flags = $this->scope->detach();
+
+ if (($flags & ScopeInterface::DETACHED) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope was already detached %s',
+ spl_object_id($this),
+ self::formatBacktrace($this->scope[self::DEBUG_TRACE_DETACH]),
+ ));
+ } elseif (($flags & ScopeInterface::MISMATCH) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached but another scope should have been detached first',
+ spl_object_id($this),
+ ));
+ } elseif (($flags & ScopeInterface::INACTIVE) !== 0) {
+ trigger_error(sprintf(
+ 'Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached from different execution context',
+ spl_object_id($this),
+ ));
+ }
+
+ return $flags;
+ }
+
+ public function __destruct()
+ {
+ if (!isset($this->scope[self::DEBUG_TRACE_DETACH])) {
+ trigger_error(sprintf(
+ 'Scope: missing call to Scope::detach() for scope #%d, created %s',
+ spl_object_id($this->scope),
+ self::formatBacktrace($this->scope[self::DEBUG_TRACE_CREATE]),
+ ));
+ }
+ }
+
+ private static function formatBacktrace(array $trace): string
+ {
+ $s = '';
+ for ($i = 0, $n = count($trace) + 1; ++$i < $n;) {
+ $s .= "\n\t";
+ $s .= 'at ';
+ if (isset($trace[$i]['class'])) {
+ $s .= strtr($trace[$i]['class'], ['\\' => '.']);
+ $s .= '.';
+ }
+ $s .= strtr($trace[$i]['function'] ?? '{main}', ['\\' => '.']);
+ $s .= '(';
+ if (isset($trace[$i - 1]['file'])) {
+ $s .= basename($trace[$i - 1]['file']);
+ if (isset($trace[$i - 1]['line'])) {
+ $s .= ':';
+ $s .= $trace[$i - 1]['line'];
+ }
+ } else {
+ $s .= 'Unknown Source';
+ }
+ $s .= ')';
+ }
+
+ return $s . "\n";
+ }
+}
diff --git a/vendor/open-telemetry/context/ExecutionContextAwareInterface.php b/vendor/open-telemetry/context/ExecutionContextAwareInterface.php
new file mode 100644
index 000000000..3a955bfae
--- /dev/null
+++ b/vendor/open-telemetry/context/ExecutionContextAwareInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+interface ExecutionContextAwareInterface
+{
+ /**
+ * @param int|string $id
+ */
+ public function fork($id): void;
+
+ /**
+ * @param int|string $id
+ */
+ public function switch($id): void;
+
+ /**
+ * @param int|string $id
+ */
+ public function destroy($id): void;
+}
diff --git a/vendor/open-telemetry/context/FiberBoundContextStorage.php b/vendor/open-telemetry/context/FiberBoundContextStorage.php
new file mode 100644
index 000000000..667f73b3d
--- /dev/null
+++ b/vendor/open-telemetry/context/FiberBoundContextStorage.php
@@ -0,0 +1,84 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function class_exists;
+use const E_USER_WARNING;
+use Fiber;
+use function trigger_error;
+
+/**
+ * @internal
+ *
+ * @phan-file-suppress PhanUndeclaredClassReference
+ * @phan-file-suppress PhanUndeclaredClassMethod
+ */
+final class FiberBoundContextStorage implements ContextStorageInterface, ExecutionContextAwareInterface
+{
+ /** @var ContextStorageInterface&ExecutionContextAwareInterface */
+ private ContextStorageInterface $storage;
+
+ /**
+ * @param ContextStorageInterface&ExecutionContextAwareInterface $storage
+ */
+ public function __construct(ContextStorageInterface $storage)
+ {
+ $this->storage = $storage;
+ }
+
+ public function fork($id): void
+ {
+ $this->storage->fork($id);
+ }
+
+ public function switch($id): void
+ {
+ $this->storage->switch($id);
+ }
+
+ public function destroy($id): void
+ {
+ $this->storage->destroy($id);
+ }
+
+ public function scope(): ?ContextStorageScopeInterface
+ {
+ $this->checkFiberMismatch();
+
+ if (($scope = $this->storage->scope()) === null) {
+ return null;
+ }
+
+ return new FiberBoundContextStorageScope($scope);
+ }
+
+ public function current(): ContextInterface
+ {
+ $this->checkFiberMismatch();
+
+ return $this->storage->current();
+ }
+
+ public function attach(ContextInterface $context): ContextStorageScopeInterface
+ {
+ $scope = $this->storage->attach($context);
+ assert(class_exists(Fiber::class, false));
+ $scope[Fiber::class] = Fiber::getCurrent();
+
+ return new FiberBoundContextStorageScope($scope);
+ }
+
+ private function checkFiberMismatch(): void
+ {
+ $scope = $this->storage->scope();
+ assert(class_exists(Fiber::class, false));
+ if ($scope && $scope[Fiber::class] !== Fiber::getCurrent()) {
+ trigger_error('Fiber context switching not supported', E_USER_WARNING);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/FiberBoundContextStorageScope.php b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php
new file mode 100644
index 000000000..647552244
--- /dev/null
+++ b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php
@@ -0,0 +1,67 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function assert;
+use function class_exists;
+use Fiber;
+
+/**
+ * @internal
+ *
+ * @phan-file-suppress PhanUndeclaredClassReference
+ * @phan-file-suppress PhanUndeclaredClassMethod
+ */
+final class FiberBoundContextStorageScope implements ScopeInterface, ContextStorageScopeInterface
+{
+ private ContextStorageScopeInterface $scope;
+
+ public function __construct(ContextStorageScopeInterface $scope)
+ {
+ $this->scope = $scope;
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return $this->scope->offsetExists($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->scope->offsetGet($offset);
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ $this->scope->offsetSet($offset, $value);
+ }
+
+ public function offsetUnset($offset): void
+ {
+ $this->scope->offsetUnset($offset);
+ }
+
+ public function context(): ContextInterface
+ {
+ return $this->scope->context();
+ }
+
+ public function detach(): int
+ {
+ $flags = $this->scope->detach();
+ assert(class_exists(Fiber::class, false));
+ if ($this->scope[Fiber::class] !== Fiber::getCurrent()) {
+ $flags |= ScopeInterface::INACTIVE;
+ }
+
+ return $flags;
+ }
+}
diff --git a/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php b/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php
new file mode 100644
index 000000000..0af93122c
--- /dev/null
+++ b/vendor/open-telemetry/context/ImplicitContextKeyedInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+/**
+ * Represents a value that can be stored within {@see ContextInterface}.
+ * Allows storing themselves without exposing a {@see ContextKeyInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#context-interaction
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/baggage/api.md#context-interaction
+ */
+interface ImplicitContextKeyedInterface
+{
+ /**
+ * Adds `$this` to the {@see Context::getCurrent() current context} and makes
+ * the new {@see Context} the current context.
+ *
+ * {@see ScopeInterface::detach()} _MUST_ be called to properly restore the previous context.
+ *
+ * This method is equivalent to `Context::getCurrent().with($value).activate();`.
+ *
+ * @todo: Update this to suggest using the new helper method way to doing something in a specific context/span.
+ */
+ public function activate(): ScopeInterface;
+
+ /**
+ * Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
+ */
+ public function storeInContext(ContextInterface $context): ContextInterface;
+}
diff --git a/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php b/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php
new file mode 100644
index 000000000..51263044d
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php
@@ -0,0 +1,129 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function array_key_first;
+use ArrayAccess;
+use function get_class;
+use function gettype;
+use InvalidArgumentException;
+use function is_array;
+use function is_object;
+use function is_string;
+use function sprintf;
+use function strcasecmp;
+use Traversable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-propagator Getter and Setter.
+ *
+ * Default implementation of {@see PropagationGetterInterface} and {@see PropagationSetterInterface}.
+ * This type is used if no custom getter/setter is provided to {@see TextMapPropagatorInterface::inject()} or {@see TextMapPropagatorInterface::extract()}.
+ */
+final class ArrayAccessGetterSetter implements PropagationGetterInterface, PropagationSetterInterface
+{
+ private static ?self $instance = null;
+
+ /**
+ * Returns a singleton instance of `self` to avoid, multiple runtime allocations.
+ */
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** {@inheritdoc} */
+ public function keys($carrier): array
+ {
+ if ($this->isSupportedCarrier($carrier)) {
+ $keys = [];
+ foreach ($carrier as $key => $_) {
+ $keys[] = (string) $key;
+ }
+
+ return $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
+ {
+ if ($this->isSupportedCarrier($carrier)) {
+ $value = $carrier[$this->resolveKey($carrier, $key)] ?? null;
+ if (is_array($value) && $value) {
+ $value = $value[array_key_first($value)];
+ }
+
+ return is_string($value)
+ ? $value
+ : 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 ($this->isSupportedCarrier($carrier)) {
+ if (($r = $this->resolveKey($carrier, $key)) !== $key) {
+ unset($carrier[$r]);
+ }
+
+ $carrier[$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
+ )
+ );
+ }
+
+ private function isSupportedCarrier($carrier): bool
+ {
+ return is_array($carrier) || $carrier instanceof ArrayAccess && $carrier instanceof Traversable;
+ }
+
+ private function resolveKey($carrier, string $key): string
+ {
+ if (isset($carrier[$key])) {
+ return $key;
+ }
+
+ foreach ($carrier as $k => $_) {
+ $k = (string) $k;
+ if (strcasecmp($k, $key) === 0) {
+ return $k;
+ }
+ }
+
+ return $key;
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php b/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php
new file mode 100644
index 000000000..075fe98fe
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/MultiTextMapPropagator.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function array_map;
+use function array_merge;
+use function array_unique;
+use function array_values;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+
+final class MultiTextMapPropagator implements TextMapPropagatorInterface
+{
+ /**
+ * @readonly
+ *
+ * @var list<TextMapPropagatorInterface>
+ */
+ private array $propagators = [];
+
+ /**
+ * @readonly
+ *
+ * @var list<string>
+ */
+ private array $fields;
+
+ /**
+ * @no-named-arguments
+ *
+ * @param list<TextMapPropagatorInterface> $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, ContextInterface $context = null): void
+ {
+ foreach ($this->propagators as $propagator) {
+ $propagator->inject($carrier, $setter, $context);
+ }
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ $context ??= Context::getCurrent();
+
+ foreach ($this->propagators as $propagator) {
+ $context = $propagator->extract($carrier, $getter, $context);
+ }
+
+ return $context;
+ }
+
+ /**
+ * @param list<TextMapPropagatorInterface> $propagators
+ * @return list<string>
+ */
+ 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/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php b/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php
new file mode 100644
index 000000000..c408cfc79
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/NoopTextMapPropagator.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+
+final class NoopTextMapPropagator implements TextMapPropagatorInterface
+{
+ private static ?self $instance = null;
+
+ public static function getInstance(): self
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ public function fields(): array
+ {
+ return [];
+ }
+
+ public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
+ {
+ return $context ?? Context::getCurrent();
+ }
+
+ public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
+ {
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
new file mode 100644
index 000000000..d2976c63d
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#getter-argument
+ */
+interface PropagationGetterInterface
+{
+ /**
+ * Returns the list of all the keys in the carrier.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#keys
+ *
+ * @return list<string>
+ */
+ 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/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php b/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php
new file mode 100644
index 000000000..75e205628
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/PropagationSetterInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#setter-argument
+ */
+interface PropagationSetterInterface
+{
+ /**
+ * Set the value for a given key on the associated carrier.
+ */
+ public function set(&$carrier, string $key, string $value) : void;
+}
diff --git a/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php b/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php
new file mode 100644
index 000000000..40652982e
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/SanitizeCombinedHeadersPropagationGetter.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use function preg_replace;
+
+/**
+ * Some servers concatenate multiple headers with ';' -- we need to replace these with ','
+ * This is still a workaround and doesn't get around the problem fully, specifically it doesn't
+ * handle edge cases where the header has a trailing ';' or an empty trace state.
+ * We also need to trim trailing separators from the header, found when a header is empty.
+ */
+final class SanitizeCombinedHeadersPropagationGetter implements PropagationGetterInterface
+{
+ private const LIST_MEMBERS_SEPARATOR = ',';
+ private const SERVER_CONCAT_HEADERS_REGEX = '/;(?=[^,=;]*=|$)/';
+ private const TRAILING_LEADING_SEPARATOR_REGEX = '/^' . self::LIST_MEMBERS_SEPARATOR . '+|' . self::LIST_MEMBERS_SEPARATOR . '+$/';
+
+ private PropagationGetterInterface $getter;
+
+ public function __construct(PropagationGetterInterface $getter)
+ {
+ $this->getter = $getter;
+ }
+
+ public function keys($carrier): array
+ {
+ return $this->getter->keys($carrier);
+ }
+
+ public function get($carrier, string $key): ?string
+ {
+ $value = $this->getter->get($carrier, $key);
+ if ($value === null) {
+ return null;
+ }
+
+ return preg_replace(
+ [self::SERVER_CONCAT_HEADERS_REGEX, self::TRAILING_LEADING_SEPARATOR_REGEX],
+ [self::LIST_MEMBERS_SEPARATOR],
+ $value,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php b/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php
new file mode 100644
index 000000000..fdf2d5141
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/TextMapPropagatorInterface.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+use OpenTelemetry\Context\ContextInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-propagator
+ */
+interface TextMapPropagatorInterface
+{
+ /**
+ * Returns list of fields that will be used by this propagator.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#fields
+ *
+ * @return list<string>
+ */
+ public function fields() : array;
+
+ /**
+ * Injects specific values from the provided {@see ContextInterface} 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, ContextInterface $context = null): void;
+
+ /**
+ * Extracts specific values from the provided carrier into the provided {@see ContextInterface}
+ * 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, ContextInterface $context = null): ContextInterface;
+}
diff --git a/vendor/open-telemetry/context/README.md b/vendor/open-telemetry/context/README.md
new file mode 100644
index 000000000..4dfe0e23f
--- /dev/null
+++ b/vendor/open-telemetry/context/README.md
@@ -0,0 +1,63 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/context/releases)
+[![Source](https://img.shields.io/badge/source-context-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/Context)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:context-blue)](https://github.com/opentelemetry-php/context)
+[![Latest Version](http://poser.pugx.org/open-telemetry/context/v/unstable)](https://packagist.org/packages/open-telemetry/context/)
+[![Stable](http://poser.pugx.org/open-telemetry/context/v/stable)](https://packagist.org/packages/open-telemetry/context/)
+
+# OpenTelemetry Context
+
+Immutable execution scoped propagation mechanism, for further details see [opentelemetry-specification][1].
+
+## Installation
+
+```shell
+composer require open-telemetry/context
+```
+
+## Usage
+
+### Implicit propagation
+
+```php
+$context = Context::getCurrent();
+// modify context
+$scope = $context->activate();
+try {
+ // run within new context
+} finally {
+ $scope->detach();
+}
+```
+
+It is recommended to use a `try-finally` statement after `::activate()` to ensure that the created scope is properly `::detach()`ed.
+
+## Async applications
+
+### Fiber support
+
+Requires `PHP >= 8.1`, an NTS build, `ext-ffi`, and setting the environment variable `OTEL_PHP_FIBERS_ENABLED` to a truthy value. Additionally `vendor/autoload.php` has to be preloaded for non-CLI SAPIs if [`ffi.enable`](https://www.php.net/manual/en/ffi.configuration.php#ini.ffi.enable) is set to `preload`.
+
+### Event loops
+
+Event loops have to restore the original context on callback execution. A basic implementation could look like the following, though implementations should avoid keeping unnecessary references to arguments if possible:
+
+```php
+function bindContext(Closure $closure): Closure {
+ $context = Context::getCurrent();
+ return static function (mixed ...$args) use ($closure, $context): mixed {
+ $scope = $context->activate();
+ try {
+ return $closure(...$args);
+ } finally {
+ $scope->detach();
+ }
+ };
+}
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
+
+[1]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
diff --git a/vendor/open-telemetry/context/ScopeInterface.php b/vendor/open-telemetry/context/ScopeInterface.php
new file mode 100644
index 000000000..05319b8fc
--- /dev/null
+++ b/vendor/open-telemetry/context/ScopeInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use const PHP_INT_SIZE;
+
+interface ScopeInterface
+{
+ /** The associated context was already detached. */
+ public const DETACHED = 1 << (PHP_INT_SIZE << 3) - 1;
+ /** The associated context is not in the active execution context. */
+ public const INACTIVE = 1 << (PHP_INT_SIZE << 3) - 2;
+ /** The associated context is not the active context. */
+ public const MISMATCH = 1 << (PHP_INT_SIZE << 3) - 3;
+
+ /**
+ * Detaches the context associated with this scope and restores the
+ * previously associated context.
+ *
+ * @return int zero indicating an expected call, or a non-zero value
+ * indicating that the call was unexpected
+ *
+ * @see self::DETACHED
+ * @see self::INACTIVE
+ * @see self::MISMATCH
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#detach-context
+ */
+ public function detach(): int;
+}
diff --git a/vendor/open-telemetry/context/ZendObserverFiber.php b/vendor/open-telemetry/context/ZendObserverFiber.php
new file mode 100644
index 000000000..4d3d0c5ef
--- /dev/null
+++ b/vendor/open-telemetry/context/ZendObserverFiber.php
@@ -0,0 +1,67 @@
+<?php
+
+/** @noinspection PhpUndefinedMethodInspection */
+/** @phan-file-suppress PhanUndeclaredClassCatch */
+/** @phan-file-suppress PhanUndeclaredClassMethod */
+/** @phan-file-suppress PhanUndeclaredMethod */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use function extension_loaded;
+use FFI;
+use const FILTER_VALIDATE_BOOLEAN;
+use function filter_var;
+use function is_string;
+use const PHP_VERSION_ID;
+use const PHP_ZTS;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class ZendObserverFiber
+{
+ public static function isEnabled(): bool
+ {
+ $enabled = $_SERVER['OTEL_PHP_FIBERS_ENABLED'] ?? false;
+
+ return is_string($enabled)
+ ? filter_var($enabled, FILTER_VALIDATE_BOOLEAN)
+ : (bool) $enabled;
+ }
+
+ public static function init(): bool
+ {
+ static $fibers;
+ if ($fibers) {
+ return true;
+ }
+
+ if (PHP_ZTS || PHP_VERSION_ID < 80100 || !extension_loaded('ffi')) {
+ trigger_error('Context: Fiber context switching not supported, requires PHP >= 8.1, an NTS build, and the FFI extension');
+
+ return false;
+ }
+
+ try {
+ $fibers = FFI::scope('OTEL_ZEND_OBSERVER_FIBER');
+ } catch (FFI\Exception $e) {
+ try {
+ $fibers = FFI::load(__DIR__ . '/fiber/zend_observer_fiber.h');
+ } catch (FFI\Exception $e) {
+ trigger_error(sprintf('Context: Fiber context switching not supported, %s', $e->getMessage()));
+
+ return false;
+ }
+ }
+
+ $fibers->zend_observer_fiber_init_register(static fn (int $initializing) => Context::storage()->fork($initializing)); //@phpstan-ignore-line
+ $fibers->zend_observer_fiber_switch_register(static fn (int $from, int $to) => Context::storage()->switch($to)); //@phpstan-ignore-line
+ $fibers->zend_observer_fiber_destroy_register(static fn (int $destroying) => Context::storage()->destroy($destroying)); //@phpstan-ignore-line
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/context/composer.json b/vendor/open-telemetry/context/composer.json
new file mode 100644
index 000000000..348b57f73
--- /dev/null
+++ b/vendor/open-telemetry/context/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "open-telemetry/context",
+ "description": "Context implementation for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "context"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\Context\\": "."
+ },
+ "files": [
+ "fiber/initialize_fiber_handler.php"
+ ]
+ },
+ "suggest": {
+ "ext-ffi": "To allow context switching in Fibers"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php b/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php
new file mode 100644
index 000000000..b9c706395
--- /dev/null
+++ b/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php
@@ -0,0 +1,20 @@
+<?php
+
+/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
+/** @phan-file-suppress PhanUndeclaredClassReference */
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context;
+
+use Fiber;
+
+if (!class_exists(Fiber::class)) {
+ return;
+}
+
+if (ZendObserverFiber::isEnabled() && ZendObserverFiber::init()) {
+ // ffi fiber support enabled
+} else {
+ Context::setStorage(new FiberBoundContextStorage(Context::storage()));
+}
diff --git a/vendor/open-telemetry/context/fiber/zend_observer_fiber.h b/vendor/open-telemetry/context/fiber/zend_observer_fiber.h
new file mode 100644
index 000000000..6a8e4e98d
--- /dev/null
+++ b/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/vendor/open-telemetry/exporter-otlp/AttributesConverter.php b/vendor/open-telemetry/exporter-otlp/AttributesConverter.php
new file mode 100644
index 000000000..4a349ab67
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/AttributesConverter.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use function is_array;
+use function is_bool;
+use function is_float;
+use function is_int;
+use function is_string;
+use Opentelemetry\Proto\Common\V1\AnyValue;
+use Opentelemetry\Proto\Common\V1\ArrayValue;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Common\V1\KeyValueList;
+
+final class AttributesConverter
+{
+ public static function convertAnyValue($value): AnyValue
+ {
+ $result = new AnyValue();
+ if (is_array($value)) {
+ if (self::isSimpleArray($value)) {
+ $values = new ArrayValue();
+ foreach ($value as $element) {
+ /** @psalm-suppress InvalidArgument */
+ $values->getValues()[] = self::convertAnyValue($element);
+ }
+ $result->setArrayValue($values);
+ } else {
+ $values = new KeyValueList();
+ foreach ($value as $key => $element) {
+ /** @psalm-suppress InvalidArgument */
+ $values->getValues()[] = new KeyValue(['key' => $key, 'value' => self::convertAnyValue($element)]);
+ }
+ $result->setKvlistValue($values);
+ }
+ }
+ if (is_int($value)) {
+ $result->setIntValue($value);
+ }
+ if (is_bool($value)) {
+ $result->setBoolValue($value);
+ }
+ if (is_float($value)) {
+ $result->setDoubleValue($value);
+ }
+ if (is_string($value)) {
+ $result->setStringValue($value);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Test whether an array is simple (non-KeyValue)
+ */
+ public static function isSimpleArray(array $value): bool
+ {
+ return $value === [] || array_key_first($value) === 0;
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/ContentTypes.php b/vendor/open-telemetry/exporter-otlp/ContentTypes.php
new file mode 100644
index 000000000..8ac70d54a
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/ContentTypes.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+interface ContentTypes
+{
+ public const PROTOBUF = 'application/x-protobuf';
+ public const JSON = 'application/json';
+ public const NDJSON = 'application/x-ndjson';
+}
diff --git a/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php
new file mode 100644
index 000000000..b50346427
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php
@@ -0,0 +1,145 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Adapter\HttpDiscovery\MessageFactoryResolver;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * Resolves non-signal-specific OTLP HTTP endpoints to signal-specific ones according to the specification.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#endpoint-urls-for-otlphttp
+ */
+class HttpEndpointResolver implements HttpEndpointResolverInterface
+{
+ private const SCHEME_ATTRIBUTE = 'scheme';
+ private const HOST_ATTRIBUTE = 'host';
+ private const PORT_ATTRIBUTE = 'port';
+ private const USER_ATTRIBUTE = 'user';
+ private const PASS_ATTRIBUTE = 'pass';
+ private const PATH_ATTRIBUTE = 'path';
+ private const DEFAULT_SCHEME = 'https';
+ private const ROOT_PATH = '/';
+
+ private FactoryResolverInterface $httpFactoryResolver;
+
+ public function __construct(?FactoryResolverInterface $httpFactoryResolver = null)
+ {
+ $this->httpFactoryResolver = $httpFactoryResolver ?? MessageFactoryResolver::create();
+ }
+
+ public static function create(?FactoryResolverInterface $httpFactoryResolver = null): self
+ {
+ return new self($httpFactoryResolver);
+ }
+
+ public function resolve(string $endpoint, string $signal): UriInterface
+ {
+ $components = self::parseEndpoint($endpoint);
+
+ return self::addPort(
+ self::addUserInfo(
+ $this->createDefaultUri($components, $signal),
+ $components
+ ),
+ $components
+ );
+ }
+
+ public function resolveToString(string $endpoint, string $signal): string
+ {
+ return (string) $this->resolve($endpoint, $signal);
+ }
+
+ private function createUri(): UriInterface
+ {
+ return $this->httpFactoryResolver->resolveUriFactory()
+ ->createUri();
+ }
+
+ private function createDefaultUri(array $components, string $signal): UriInterface
+ {
+ if (isset($components[self::SCHEME_ATTRIBUTE])) {
+ self::validateScheme($components[self::SCHEME_ATTRIBUTE]);
+ }
+
+ return $this->createUri()
+ ->withScheme($components[self::SCHEME_ATTRIBUTE] ?? self::DEFAULT_SCHEME)
+ ->withPath(self::resolvePath($components[self::PATH_ATTRIBUTE] ?? self::ROOT_PATH, $signal))
+ ->withHost($components[self::HOST_ATTRIBUTE]);
+ }
+
+ private static function validateScheme(string $protocol): void
+ {
+ if (!in_array($protocol, HttpEndpointResolverInterface::VALID_SCHEMES, true)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Expected protocol to be http or https, given: "%s"',
+ $protocol
+ ));
+ }
+ }
+
+ private static function validateSignal(string $signal): void
+ {
+ if (!in_array($signal, Signals::SIGNALS)) {
+ throw new InvalidArgumentException(sprintf(
+ 'Signal must be one of "%s". Given "%s"',
+ implode(', ', Signals::SIGNALS),
+ $signal
+ ));
+ }
+ }
+
+ private static function parseEndpoint(string $endpoint): array
+ {
+ $result = parse_url($endpoint);
+
+ if (!is_array($result) || !isset($result[self::HOST_ATTRIBUTE])) {
+ throw new InvalidArgumentException(sprintf(
+ 'Failed to parse endpoint "%s"',
+ $endpoint
+ ));
+ }
+
+ return $result;
+ }
+
+ private static function addUserInfo(UriInterface $uri, array $components): UriInterface
+ {
+ if (isset($components[self::USER_ATTRIBUTE])) {
+ $uri = $uri->withUserInfo(
+ $components[self::USER_ATTRIBUTE],
+ $components[self::PASS_ATTRIBUTE] ?? null
+ );
+ }
+
+ return $uri;
+ }
+
+ private static function addPort(UriInterface $uri, array $components): UriInterface
+ {
+ if (isset($components[self::PORT_ATTRIBUTE])) {
+ $uri = $uri->withPort(
+ $components[self::PORT_ATTRIBUTE]
+ );
+ }
+
+ return $uri;
+ }
+
+ private static function resolvePath(string $path, string $signal): string
+ {
+ self::validateSignal($signal);
+
+ return str_replace('//', '/', sprintf('%s/%s', $path, self::getDefaultPath($signal)));
+ }
+
+ private static function getDefaultPath(string $signal): string
+ {
+ return HttpEndpointResolverInterface::DEFAULT_PATHS[$signal];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php
new file mode 100644
index 000000000..fe165bd8a
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/HttpEndpointResolverInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use Psr\Http\Message\UriInterface;
+
+interface HttpEndpointResolverInterface
+{
+ public const TRACE_DEFAULT_PATH = 'v1/traces';
+ public const METRICS_DEFAULT_PATH = 'v1/metrics';
+ public const LOGS_DEFAULT_PATH = 'v1/logs';
+ public const DEFAULT_PATHS = [
+ Signals::TRACE => self::TRACE_DEFAULT_PATH,
+ Signals::METRICS => self::METRICS_DEFAULT_PATH,
+ Signals::LOGS => self::LOGS_DEFAULT_PATH,
+ ];
+ public const VALID_SCHEMES = [
+ 'http',
+ 'https',
+ ];
+
+ public function resolve(string $endpoint, string $signal): UriInterface;
+
+ public function resolveToString(string $endpoint, string $signal): string;
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsConverter.php b/vendor/open-telemetry/exporter-otlp/LogsConverter.php
new file mode 100644
index 000000000..1da53ad1f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsConverter.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Logs\V1\LogRecord;
+use Opentelemetry\Proto\Logs\V1\ResourceLogs;
+use Opentelemetry\Proto\Logs\V1\ScopeLogs;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LogsConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ /**
+ * @param iterable<ReadableLogRecord> $logs
+ * @psalm-suppress InvalidArgument
+ */
+ public function convert(iterable $logs): ExportLogsServiceRequest
+ {
+ $pExportLogsServiceRequest = new ExportLogsServiceRequest();
+ $scopeLogs = [];
+ $resourceLogs = [];
+ $resourceCache = [];
+ $scopeCache = [];
+
+ foreach ($logs as $log) {
+ $resource = $log->getResource();
+ $instrumentationScope = $log->getInstrumentationScope();
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceLogs = $resourceLogs[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportLogsServiceRequest->getResourceLogs()[]
+ = $resourceLogs[$resourceId]
+ = $pResourceLogs
+ = $this->convertResourceLogs($resource);
+ }
+
+ if (($pScopeLogs = $scopeLogs[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ $pResourceLogs->getScopeLogs()[]
+ = $scopeLogs[$resourceId][$instrumentationScopeId]
+ = $pScopeLogs
+ = $this->convertInstrumentationScope($instrumentationScope);
+ }
+
+ $pScopeLogs->getLogRecords()[] = $this->convertLogRecord($log);
+ }
+
+ return $pExportLogsServiceRequest;
+ }
+
+ private function convertLogRecord(ReadableLogRecord $record): LogRecord
+ {
+ $pLogRecord = new LogRecord();
+ $pLogRecord->setBody(AttributesConverter::convertAnyValue($record->getBody()));
+ $pLogRecord->setTimeUnixNano($record->getTimestamp() ?? 0);
+ $pLogRecord->setObservedTimeUnixNano($record->getObservedTimestamp() ?? 0);
+ $spanContext = $record->getSpanContext();
+ if ($spanContext !== null && $spanContext->isValid()) {
+ $pLogRecord->setTraceId($this->serializer->serializeTraceId($spanContext->getTraceIdBinary()));
+ $pLogRecord->setSpanId($this->serializer->serializeSpanId($spanContext->getSpanIdBinary()));
+ $pLogRecord->setFlags($spanContext->getTraceFlags());
+ }
+ $severityNumber = $record->getSeverityNumber();
+ if ($severityNumber !== null) {
+ $pLogRecord->setSeverityNumber($severityNumber);
+ }
+ $severityText = $record->getSeverityText();
+ if ($severityText !== null) {
+ $pLogRecord->setSeverityText($severityText);
+ }
+ $this->setAttributes($pLogRecord, $record->getAttributes());
+ $pLogRecord->setDroppedAttributesCount($record->getAttributes()->getDroppedAttributesCount());
+
+ return $pLogRecord;
+ }
+
+ private function convertInstrumentationScope(InstrumentationScopeInterface $instrumentationScope): ScopeLogs
+ {
+ $pScopeLogs = new ScopeLogs();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pInstrumentationScope->setDroppedAttributesCount($instrumentationScope->getAttributes()->getDroppedAttributesCount());
+ $pScopeLogs->setScope($pInstrumentationScope);
+ $pScopeLogs->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeLogs;
+ }
+
+ private function convertResourceLogs(ResourceInfo $resource): ResourceLogs
+ {
+ $pResourceLogs = new ResourceLogs();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResource->setDroppedAttributesCount($resource->getAttributes()->getDroppedAttributesCount());
+ $pResourceLogs->setResource($pResource);
+
+ return $pResourceLogs;
+ }
+
+ /**
+ * @param Resource_|LogRecord|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = (new KeyValue())
+ ->setKey($key)
+ ->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsExporter.php b/vendor/open-telemetry/exporter-otlp/LogsExporter.php
new file mode 100644
index 000000000..fb100391f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsExporter.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+class LogsExporter implements LogRecordExporterInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ }
+
+ /**
+ * @param iterable<ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new LogsConverter($this->serializer))->convert($batch)), $cancellation)
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportLogsServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedLogRecords()) {
+ self::logError('Export partial success', [
+ 'rejected_logs' => $partialSuccess->getRejectedLogRecords(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ });
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush($cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php b/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php
new file mode 100644
index 000000000..17fd68887
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/LogsExporterFactory.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class LogsExporterFactory implements LogRecordExporterFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): LogRecordExporterInterface
+ {
+ $protocol = Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)
+ ? Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)
+ : Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+
+ return new LogsExporter($this->buildTransport($protocol));
+ }
+
+ /**
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(string $protocol): TransportInterface
+ {
+ $endpoint = $this->getEndpoint($protocol);
+
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_HEADERS)
+ ? Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_LOGS_HEADERS)
+ : Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+ $headers += OtlpUtil::getUserAgentHeader();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create(
+ $endpoint,
+ Protocols::contentType($protocol),
+ $headers,
+ $compression,
+ );
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_LOGS_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::LOGS);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::LOGS);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricConverter.php b/vendor/open-telemetry/exporter-otlp/MetricConverter.php
new file mode 100644
index 000000000..584c41365
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricConverter.php
@@ -0,0 +1,265 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use function hex2bin;
+use function is_float;
+use function is_int;
+use function method_exists;
+use Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Metrics\V1\AggregationTemporality;
+use Opentelemetry\Proto\Metrics\V1\Exemplar;
+use Opentelemetry\Proto\Metrics\V1\Gauge;
+use Opentelemetry\Proto\Metrics\V1\Histogram;
+use Opentelemetry\Proto\Metrics\V1\HistogramDataPoint;
+use Opentelemetry\Proto\Metrics\V1\Metric;
+use Opentelemetry\Proto\Metrics\V1\NumberDataPoint;
+use Opentelemetry\Proto\Metrics\V1\ResourceMetrics;
+use Opentelemetry\Proto\Metrics\V1\ScopeMetrics;
+use Opentelemetry\Proto\Metrics\V1\Sum;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use OpenTelemetry\SDK;
+use function serialize;
+
+final class MetricConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ /**
+ * @param iterable<SDK\Metrics\Data\Metric> $batch
+ */
+ public function convert(iterable $batch): ExportMetricsServiceRequest
+ {
+ $pExportMetricsServiceRequest = new ExportMetricsServiceRequest();
+
+ $resourceMetrics = [];
+ $resourceCache = [];
+ $scopeMetrics = [];
+ $scopeCache = [];
+ foreach ($batch as $metric) {
+ $resource = $metric->resource;
+ $instrumentationScope = $metric->instrumentationScope;
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceMetrics = $resourceMetrics[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportMetricsServiceRequest->getResourceMetrics()[]
+ = $resourceMetrics[$resourceId]
+ = $pResourceMetrics
+ = $this->convertResourceMetrics($resource);
+ }
+
+ if (($pScopeMetrics = $scopeMetrics[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pResourceMetrics->getScopeMetrics()[]
+ = $scopeMetrics[$resourceId][$instrumentationScopeId]
+ = $pScopeMetrics
+ = $this->convertScopeMetrics($instrumentationScope);
+ }
+
+ /** @psalm-suppress InvalidArgument */
+ $pScopeMetrics->getMetrics()[] = $this->convertMetric($metric);
+ }
+
+ return $pExportMetricsServiceRequest;
+ }
+
+ private function convertResourceMetrics(SDK\Resource\ResourceInfo $resource): ResourceMetrics
+ {
+ $pResourceMetrics = new ResourceMetrics();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResourceMetrics->setResource($pResource);
+ $pResourceMetrics->setSchemaUrl((string) $resource->getSchemaUrl());
+
+ return $pResourceMetrics;
+ }
+
+ private function convertScopeMetrics(SDK\Common\Instrumentation\InstrumentationScopeInterface $instrumentationScope): ScopeMetrics
+ {
+ $pScopeMetrics = new ScopeMetrics();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pScopeMetrics->setScope($pInstrumentationScope);
+ $pScopeMetrics->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeMetrics;
+ }
+
+ private function convertMetric(SDK\Metrics\Data\Metric $metric): Metric
+ {
+ $pMetric = new Metric();
+ $pMetric->setName($metric->name);
+ $pMetric->setDescription((string) $metric->description);
+ $pMetric->setUnit((string) $metric->unit);
+
+ $data = $metric->data;
+ if ($data instanceof SDK\Metrics\Data\Gauge) {
+ $pMetric->setGauge($this->convertGauge($data));
+ }
+ if ($data instanceof SDK\Metrics\Data\Histogram) {
+ $pMetric->setHistogram($this->convertHistogram($data));
+ }
+ if ($data instanceof SDK\Metrics\Data\Sum) {
+ $pMetric->setSum($this->convertSum($data));
+ }
+
+ return $pMetric;
+ }
+
+ private function convertTemporality($temporality): int
+ {
+ switch ($temporality) {
+ case SDK\Metrics\Data\Temporality::DELTA:
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_DELTA;
+ case SDK\Metrics\Data\Temporality::CUMULATIVE:
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_CUMULATIVE;
+ }
+
+ // @codeCoverageIgnoreStart
+ return AggregationTemporality::AGGREGATION_TEMPORALITY_UNSPECIFIED;
+ // @codeCoverageIgnoreEnd
+ }
+
+ private function convertGauge(SDK\Metrics\Data\Gauge $gauge): Gauge
+ {
+ $pGauge = new Gauge();
+ foreach ($gauge->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pGauge->getDataPoints()[] = $this->convertNumberDataPoint($dataPoint);
+ }
+
+ return $pGauge;
+ }
+
+ private function convertHistogram(SDK\Metrics\Data\Histogram $histogram): Histogram
+ {
+ $pHistogram = new Histogram();
+ foreach ($histogram->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pHistogram->getDataPoints()[] = $this->convertHistogramDataPoint($dataPoint);
+ }
+ $pHistogram->setAggregationTemporality($this->convertTemporality($histogram->temporality));
+
+ return $pHistogram;
+ }
+
+ private function convertSum(SDK\Metrics\Data\Sum $sum): Sum
+ {
+ $pSum = new Sum();
+ foreach ($sum->dataPoints as $dataPoint) {
+ /** @psalm-suppress InvalidArgument */
+ $pSum->getDataPoints()[] = $this->convertNumberDataPoint($dataPoint);
+ }
+ $pSum->setAggregationTemporality($this->convertTemporality($sum->temporality));
+ $pSum->setIsMonotonic($sum->monotonic);
+
+ return $pSum;
+ }
+
+ private function convertNumberDataPoint(SDK\Metrics\Data\NumberDataPoint $dataPoint): NumberDataPoint
+ {
+ $pNumberDataPoint = new NumberDataPoint();
+ $this->setAttributes($pNumberDataPoint, $dataPoint->attributes);
+ $pNumberDataPoint->setStartTimeUnixNano($dataPoint->startTimestamp);
+ $pNumberDataPoint->setTimeUnixNano($dataPoint->timestamp);
+ if (is_int($dataPoint->value)) {
+ $pNumberDataPoint->setAsInt($dataPoint->value);
+ }
+ if (is_float($dataPoint->value)) {
+ $pNumberDataPoint->setAsDouble($dataPoint->value);
+ }
+ foreach ($dataPoint->exemplars as $exemplar) {
+ /** @psalm-suppress InvalidArgument */
+ $pNumberDataPoint->getExemplars()[] = $this->convertExemplar($exemplar);
+ }
+
+ return $pNumberDataPoint;
+ }
+
+ private function convertHistogramDataPoint(SDK\Metrics\Data\HistogramDataPoint $dataPoint): HistogramDataPoint
+ {
+ $pHistogramDataPoint = new HistogramDataPoint();
+ $this->setAttributes($pHistogramDataPoint, $dataPoint->attributes);
+ $pHistogramDataPoint->setStartTimeUnixNano($dataPoint->startTimestamp);
+ $pHistogramDataPoint->setTimeUnixNano($dataPoint->timestamp);
+ $pHistogramDataPoint->setCount($dataPoint->count);
+ $pHistogramDataPoint->setSum($dataPoint->sum);
+ /** @phpstan-ignore-next-line */
+ $pHistogramDataPoint->setBucketCounts($dataPoint->bucketCounts);
+ /** @phpstan-ignore-next-line */
+ $pHistogramDataPoint->setExplicitBounds($dataPoint->explicitBounds);
+ foreach ($dataPoint->exemplars as $exemplar) {
+ /** @psalm-suppress InvalidArgument */
+ $pHistogramDataPoint->getExemplars()[] = $this->convertExemplar($exemplar);
+ }
+
+ return $pHistogramDataPoint;
+ }
+
+ private function convertExemplar(SDK\Metrics\Data\Exemplar $exemplar): Exemplar
+ {
+ $pExemplar = new Exemplar();
+ $this->setFilteredAttributes($pExemplar, $exemplar->attributes);
+ $pExemplar->setTimeUnixNano($exemplar->timestamp);
+ $pExemplar->setSpanId($this->serializer->serializeSpanId(hex2bin((string) $exemplar->spanId)));
+ $pExemplar->setTraceId($this->serializer->serializeTraceId(hex2bin((string) $exemplar->traceId)));
+ if (is_int($exemplar->value)) {
+ $pExemplar->setAsInt($exemplar->value);
+ }
+ if (is_float($exemplar->value)) {
+ $pExemplar->setAsDouble($exemplar->value);
+ }
+
+ return $pExemplar;
+ }
+
+ /**
+ * @param Resource_|NumberDataPoint|HistogramDataPoint|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, SDK\Common\Attribute\AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = $pAttribute = new KeyValue();
+ $pAttribute->setKey($key);
+ $pAttribute->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ if (method_exists($pElement, 'setDroppedAttributesCount')) {
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+ }
+
+ private function setFilteredAttributes(Exemplar $pElement, SDK\Common\Attribute\AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getFilteredAttributes()[] = $pAttribute = new KeyValue();
+ $pAttribute->setKey($key);
+ $pAttribute->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricExporter.php b/vendor/open-telemetry/exporter-otlp/MetricExporter.php
new file mode 100644
index 000000000..efd149c7f
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricExporter.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/stdout.md#opentelemetry-metrics-exporter---standard-output
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/file-exporter.md#json-file-serialization
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+final class MetricExporter implements PushMetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ /**
+ * @param string|Temporality|null $temporality
+ *
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport, $temporality = null)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ $this->temporality = $temporality;
+ }
+
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ public function export(iterable $batch): bool
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new MetricConverter($this->serializer))->convert($batch)))
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportMetricsServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedDataPoints()) {
+ self::logError('Export partial success', [
+ 'rejected_data_points' => $partialSuccess->getRejectedDataPoints(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ })
+ ->await();
+ }
+
+ public function shutdown(): bool
+ {
+ return $this->transport->shutdown();
+ }
+
+ public function forceFlush(): bool
+ {
+ return $this->transport->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php b/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php
new file mode 100644
index 000000000..284428b73
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/MetricExporterFactory.php
@@ -0,0 +1,110 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class MetricExporterFactory implements MetricExporterFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): MetricExporterInterface
+ {
+ $protocol = Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_PROTOCOL)
+ ? Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_PROTOCOL)
+ : Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+ $temporality = $this->getTemporality();
+
+ return new MetricExporter($this->buildTransport($protocol), $temporality);
+ }
+
+ /**
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(string $protocol): TransportInterface
+ {
+ /**
+ * @todo (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#periodic-exporting-metricreader)
+ * - OTEL_METRIC_EXPORT_INTERVAL
+ * - OTEL_METRIC_EXPORT_TIMEOUT
+ */
+ $endpoint = $this->getEndpoint($protocol);
+
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_HEADERS)
+ ? Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_METRICS_HEADERS)
+ : Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+ $headers += OtlpUtil::getUserAgentHeader();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create(
+ $endpoint,
+ Protocols::contentType($protocol),
+ $headers,
+ $compression,
+ );
+ }
+
+ /**
+ * @todo return string|Temporality|null (php >= 8.0)
+ */
+ private function getTemporality()
+ {
+ $value = Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE);
+ switch (strtolower($value)) {
+ case 'cumulative':
+ return Temporality::CUMULATIVE;
+ case 'delta':
+ return Temporality::DELTA;
+ case 'lowmemory':
+ return null;
+ default:
+ throw new \UnexpectedValueException('Unknown temporality: ' . $value);
+ }
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_METRICS_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::METRICS);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::METRICS);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php b/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php
new file mode 100644
index 000000000..5cf3ff9e4
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\SDK\Common\Export\Http\PsrTransport;
+use OpenTelemetry\SDK\Common\Export\Http\PsrTransportFactory;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+
+class OtlpHttpTransportFactory implements TransportFactoryInterface
+{
+ private const DEFAULT_COMPRESSION = 'none';
+
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): PsrTransport {
+ if ($compression === self::DEFAULT_COMPRESSION) {
+ $compression = null;
+ }
+
+ return PsrTransportFactory::discover()->create($endpoint, $contentType, $headers, $compression, $timeout, $retryDelay, $maxRetries, $cacert, $cert, $key);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/OtlpUtil.php b/vendor/open-telemetry/exporter-otlp/OtlpUtil.php
new file mode 100644
index 000000000..6901c1324
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/OtlpUtil.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Resource\Detectors\Sdk;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use UnexpectedValueException;
+
+class OtlpUtil
+{
+ /**
+ * gRPC per-signal methods
+ * @see protobuf *ServiceClient
+ */
+ private const METHODS = [
+ Signals::TRACE => '/opentelemetry.proto.collector.trace.v1.TraceService/Export',
+ Signals::METRICS => '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',
+ Signals::LOGS => '/opentelemetry.proto.collector.logs.v1.LogsService/Export',
+ ];
+
+ public static function method(string $signal): string
+ {
+ if (!array_key_exists($signal, self::METHODS)) {
+ throw new UnexpectedValueException('gRPC method not defined for signal: ' . $signal);
+ }
+
+ return self::METHODS[$signal];
+ }
+
+ /**
+ * @link https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#user-agent
+ */
+ public static function getUserAgentHeader(): array
+ {
+ $resource = (new Sdk())->getResource();
+
+ return ['User-Agent' => sprintf(
+ 'OTel OTLP Exporter PHP/%s',
+ $resource->getAttributes()->get(ResourceAttributes::TELEMETRY_SDK_VERSION) ?: 'unknown'
+ )];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php b/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php
new file mode 100644
index 000000000..c244d0066
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php
@@ -0,0 +1,115 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use AssertionError;
+use function base64_decode;
+use function bin2hex;
+use Exception;
+use Google\Protobuf\Internal\Message;
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use function sprintf;
+
+/**
+ * @internal
+ *
+ * @psalm-type SUPPORTED_CONTENT_TYPES = self::PROTOBUF|self::JSON|self::NDJSON
+ */
+final class ProtobufSerializer
+{
+ private const PROTOBUF = 'application/x-protobuf';
+ private const JSON = 'application/json';
+ private const NDJSON = 'application/x-ndjson';
+
+ private string $contentType;
+
+ private function __construct(string $contentType)
+ {
+ $this->contentType = $contentType;
+ }
+
+ public static function getDefault(): ProtobufSerializer
+ {
+ return new self(self::PROTOBUF);
+ }
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public static function forTransport(TransportInterface $transport): ProtobufSerializer
+ {
+ switch ($contentType = $transport->contentType()) {
+ case self::PROTOBUF:
+ case self::JSON:
+ case self::NDJSON:
+ return new self($contentType);
+ default:
+ throw new InvalidArgumentException(sprintf('Not supported content type "%s"', $contentType));
+ }
+ }
+
+ public function serializeTraceId(string $traceId): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $traceId;
+ case self::JSON:
+ case self::NDJSON:
+ return base64_decode(bin2hex($traceId));
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public function serializeSpanId(string $spanId): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $spanId;
+ case self::JSON:
+ case self::NDJSON:
+ return base64_decode(bin2hex($spanId));
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public function serialize(Message $message): string
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ return $message->serializeToString();
+ case self::JSON:
+ //@todo https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#json-protobuf-encoding
+ return $message->serializeToJsonString();
+ case self::NDJSON:
+ return $message->serializeToJsonString() . "\n";
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ /**
+ * @throws Exception
+ */
+ public function hydrate(Message $message, string $payload): void
+ {
+ switch ($this->contentType) {
+ case self::PROTOBUF:
+ $message->mergeFromString($payload);
+
+ break;
+ case self::JSON:
+ case self::NDJSON:
+ // @phan-suppress-next-line PhanParamTooManyInternal
+ $message->mergeFromJsonString($payload, true);
+
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/Protocols.php b/vendor/open-telemetry/exporter-otlp/Protocols.php
new file mode 100644
index 000000000..96b04d8bf
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/Protocols.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use UnexpectedValueException;
+
+class Protocols
+{
+ public const GRPC = KnownValues::VALUE_GRPC;
+ public const HTTP_PROTOBUF = KnownValues::VALUE_HTTP_PROTOBUF;
+ public const HTTP_JSON = KnownValues::VALUE_HTTP_JSON;
+ public const HTTP_NDJSON = KnownValues::VALUE_HTTP_NDJSON;
+ private const PROTOCOLS = [
+ self::GRPC => ContentTypes::PROTOBUF,
+ self::HTTP_PROTOBUF => ContentTypes::PROTOBUF,
+ self::HTTP_JSON => ContentTypes::JSON,
+ self::HTTP_NDJSON => ContentTypes::NDJSON,
+ ];
+
+ public static function validate(string $protocol): void
+ {
+ if (!array_key_exists($protocol, self::PROTOCOLS)) {
+ throw new UnexpectedValueException('Unknown protocol: ' . $protocol);
+ }
+ }
+
+ public static function contentType(string $protocol): string
+ {
+ self::validate($protocol);
+
+ return self::PROTOCOLS[$protocol];
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/README.md b/vendor/open-telemetry/exporter-otlp/README.md
new file mode 100644
index 000000000..a41349da0
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/README.md
@@ -0,0 +1,45 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/exporter-otlp/releases)
+[![Source](https://img.shields.io/badge/source-exporter--otlp-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/Contrib/Otlp)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:exporter--otlp-blue)](https://github.com/opentelemetry-php/exporter-otlp)
+[![Latest Version](http://poser.pugx.org/open-telemetry/exporter-otlp/v/unstable)](https://packagist.org/packages/open-telemetry/exporter-otlp/)
+[![Stable](http://poser.pugx.org/open-telemetry/exporter-otlp/v/stable)](https://packagist.org/packages/open-telemetry/exporter-otlp/)
+
+# OpenTelemetry OTLP exporter
+
+## Documentation
+
+https://opentelemetry.io/docs/instrumentation/php/exporters/#otlp
+
+## Usage
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/traces/exporters/otlp_http.php
+
+## Http transport
+
+```php
+$transport = (new \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory())->create('http://collector:4318');
+$exporter = new \OpenTelemetry\Contrib\Otlp\SpanExporter($transport);
+```
+
+## gRPC transport
+
+To export over gRPC, you will need to additionally install the `open-telemetry/transport-grpc` package.
+
+## Protobuf Runtime library
+
+OTLP exporting requires a [protobuf implementation](https://github.com/protocolbuffers/protobuf/tree/main/php).
+
+The `open-telemetry/gen-otlp-protobuf` requires the `google/protobuf` native implementation. It's fine for development, but
+not recommended for production usage.
+
+The recommended option for production is to install the Protobuf C extension for PHP. The extension
+makes exporting _significantly_ more performant. This can be easily installed with the following command:
+
+```shell
+pecl install protobuf
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/exporter-otlp/SpanConverter.php b/vendor/open-telemetry/exporter-otlp/SpanConverter.php
new file mode 100644
index 000000000..1a8b4369e
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanConverter.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Trace as API;
+use Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest;
+use Opentelemetry\Proto\Common\V1\InstrumentationScope;
+use Opentelemetry\Proto\Common\V1\KeyValue;
+use Opentelemetry\Proto\Resource\V1\Resource as Resource_;
+use Opentelemetry\Proto\Trace\V1\ResourceSpans;
+use Opentelemetry\Proto\Trace\V1\ScopeSpans;
+use Opentelemetry\Proto\Trace\V1\Span;
+use Opentelemetry\Proto\Trace\V1\Span\Event;
+use Opentelemetry\Proto\Trace\V1\Span\Link;
+use Opentelemetry\Proto\Trace\V1\Span\SpanKind;
+use Opentelemetry\Proto\Trace\V1\Status;
+use Opentelemetry\Proto\Trace\V1\Status\StatusCode;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use function serialize;
+use function spl_object_id;
+
+final class SpanConverter
+{
+ private ProtobufSerializer $serializer;
+
+ public function __construct(?ProtobufSerializer $serializer = null)
+ {
+ $this->serializer = $serializer ?? ProtobufSerializer::getDefault();
+ }
+
+ public function convert(iterable $spans): ExportTraceServiceRequest
+ {
+ $pExportTraceServiceRequest = new ExportTraceServiceRequest();
+
+ $resourceSpans = [];
+ $resourceCache = [];
+ $scopeSpans = [];
+ $scopeCache = [];
+ foreach ($spans as $span) {
+ $resource = $span->getResource();
+ $instrumentationScope = $span->getInstrumentationScope();
+
+ $resourceId = $resourceCache[spl_object_id($resource)] ??= serialize([
+ $resource->getSchemaUrl(),
+ $resource->getAttributes()->toArray(),
+ $resource->getAttributes()->getDroppedAttributesCount(),
+ ]);
+ $instrumentationScopeId = $scopeCache[spl_object_id($instrumentationScope)] ??= serialize([
+ $instrumentationScope->getName(),
+ $instrumentationScope->getVersion(),
+ $instrumentationScope->getSchemaUrl(),
+ $instrumentationScope->getAttributes()->toArray(),
+ $instrumentationScope->getAttributes()->getDroppedAttributesCount(),
+ ]);
+
+ if (($pResourceSpans = $resourceSpans[$resourceId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pExportTraceServiceRequest->getResourceSpans()[]
+ = $resourceSpans[$resourceId]
+ = $pResourceSpans
+ = $this->convertResourceSpans($resource);
+ }
+
+ if (($pScopeSpans = $scopeSpans[$resourceId][$instrumentationScopeId] ?? null) === null) {
+ /** @psalm-suppress InvalidArgument */
+ $pResourceSpans->getScopeSpans()[]
+ = $scopeSpans[$resourceId][$instrumentationScopeId]
+ = $pScopeSpans
+ = $this->convertScopeSpans($instrumentationScope);
+ }
+
+ /** @psalm-suppress InvalidArgument */
+ $pScopeSpans->getSpans()[] = $this->convertSpan($span);
+ }
+
+ return $pExportTraceServiceRequest;
+ }
+
+ private function convertResourceSpans(ResourceInfo $resource): ResourceSpans
+ {
+ $pResourceSpans = new ResourceSpans();
+ $pResource = new Resource_();
+ $this->setAttributes($pResource, $resource->getAttributes());
+ $pResourceSpans->setResource($pResource);
+ $pResourceSpans->setSchemaUrl((string) $resource->getSchemaUrl());
+
+ return $pResourceSpans;
+ }
+
+ private function convertScopeSpans(InstrumentationScopeInterface $instrumentationScope): ScopeSpans
+ {
+ $pScopeSpans = new ScopeSpans();
+ $pInstrumentationScope = new InstrumentationScope();
+ $pInstrumentationScope->setName($instrumentationScope->getName());
+ $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
+ $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
+ $pScopeSpans->setScope($pInstrumentationScope);
+ $pScopeSpans->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
+
+ return $pScopeSpans;
+ }
+
+ /**
+ * @param Resource_|Span|Event|Link|InstrumentationScope $pElement
+ */
+ private function setAttributes($pElement, AttributesInterface $attributes): void
+ {
+ foreach ($attributes as $key => $value) {
+ /** @psalm-suppress InvalidArgument */
+ $pElement->getAttributes()[] = (new KeyValue())
+ ->setKey($key)
+ ->setValue(AttributesConverter::convertAnyValue($value));
+ }
+ $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
+ }
+
+ private function convertSpanKind(int $kind): int
+ {
+ switch ($kind) {
+ case API\SpanKind::KIND_INTERNAL: return SpanKind::SPAN_KIND_INTERNAL;
+ case API\SpanKind::KIND_CLIENT: return SpanKind::SPAN_KIND_CLIENT;
+ case API\SpanKind::KIND_SERVER: return SpanKind::SPAN_KIND_SERVER;
+ case API\SpanKind::KIND_PRODUCER: return SpanKind::SPAN_KIND_PRODUCER;
+ case API\SpanKind::KIND_CONSUMER: return SpanKind::SPAN_KIND_CONSUMER;
+ }
+
+ return SpanKind::SPAN_KIND_UNSPECIFIED;
+ }
+
+ private function convertStatusCode(string $status): int
+ {
+ switch ($status) {
+ case API\StatusCode::STATUS_UNSET: return StatusCode::STATUS_CODE_UNSET;
+ case API\StatusCode::STATUS_OK: return StatusCode::STATUS_CODE_OK;
+ case API\StatusCode::STATUS_ERROR: return StatusCode::STATUS_CODE_ERROR;
+ }
+
+ return StatusCode::STATUS_CODE_UNSET;
+ }
+
+ private function convertSpan(SpanDataInterface $span): Span
+ {
+ $pSpan = new Span();
+ $pSpan->setTraceId($this->serializer->serializeTraceId($span->getContext()->getTraceIdBinary()));
+ $pSpan->setSpanId($this->serializer->serializeSpanId($span->getContext()->getSpanIdBinary()));
+ $pSpan->setTraceState((string) $span->getContext()->getTraceState());
+ if ($span->getParentContext()->isValid()) {
+ $pSpan->setParentSpanId($this->serializer->serializeSpanId($span->getParentContext()->getSpanIdBinary()));
+ }
+ $pSpan->setName($span->getName());
+ $pSpan->setKind($this->convertSpanKind($span->getKind()));
+ $pSpan->setStartTimeUnixNano($span->getStartEpochNanos());
+ $pSpan->setEndTimeUnixNano($span->getEndEpochNanos());
+ $this->setAttributes($pSpan, $span->getAttributes());
+
+ foreach ($span->getEvents() as $event) {
+ /** @psalm-suppress InvalidArgument */
+ $pSpan->getEvents()[] = $pEvent = new Event();
+ $pEvent->setTimeUnixNano($event->getEpochNanos());
+ $pEvent->setName($event->getName());
+ $this->setAttributes($pEvent, $event->getAttributes());
+ }
+ $pSpan->setDroppedEventsCount($span->getTotalDroppedEvents());
+
+ foreach ($span->getLinks() as $link) {
+ /** @psalm-suppress InvalidArgument */
+ $pSpan->getLinks()[] = $pLink = new Link();
+ $pLink->setTraceId($this->serializer->serializeTraceId($link->getSpanContext()->getTraceIdBinary()));
+ $pLink->setSpanId($this->serializer->serializeSpanId($link->getSpanContext()->getSpanIdBinary()));
+ $pLink->setTraceState((string) $link->getSpanContext()->getTraceState());
+ $this->setAttributes($pLink, $link->getAttributes());
+ }
+ $pSpan->setDroppedLinksCount($span->getTotalDroppedLinks());
+
+ $pStatus = new Status();
+ $pStatus->setMessage($span->getStatus()->getDescription());
+ $pStatus->setCode($this->convertStatusCode($span->getStatus()->getCode()));
+ $pSpan->setStatus($pStatus);
+
+ return $pSpan;
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/SpanExporter.php b/vendor/open-telemetry/exporter-otlp/SpanExporter.php
new file mode 100644
index 000000000..a496206f4
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanExporter.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceResponse;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use RuntimeException;
+use Throwable;
+
+/**
+ * @psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer
+ */
+final class SpanExporter implements SpanExporterInterface
+{
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+ private ProtobufSerializer $serializer;
+
+ /**
+ * @psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport
+ */
+ public function __construct(TransportInterface $transport)
+ {
+ if (!class_exists('\Google\Protobuf\Api')) {
+ throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
+ }
+ $this->transport = $transport;
+ $this->serializer = ProtobufSerializer::forTransport($transport);
+ }
+
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return $this->transport
+ ->send($this->serializer->serialize((new SpanConverter($this->serializer))->convert($batch)), $cancellation)
+ ->map(function (?string $payload): bool {
+ if ($payload === null) {
+ return true;
+ }
+
+ $serviceResponse = new ExportTraceServiceResponse();
+ $this->serializer->hydrate($serviceResponse, $payload);
+
+ $partialSuccess = $serviceResponse->getPartialSuccess();
+ if ($partialSuccess !== null && $partialSuccess->getRejectedSpans()) {
+ self::logError('Export partial success', [
+ 'rejected_spans' => $partialSuccess->getRejectedSpans(),
+ 'error_message' => $partialSuccess->getErrorMessage(),
+ ]);
+
+ return false;
+ }
+ if ($partialSuccess !== null && $partialSuccess->getErrorMessage()) {
+ self::logWarning('Export success with warnings/suggestions', ['error_message' => $partialSuccess->getErrorMessage()]);
+ }
+
+ return true;
+ })
+ ->catch(static function (Throwable $throwable): bool {
+ self::logError('Export failure', ['exception' => $throwable]);
+
+ return false;
+ });
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php b/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php
new file mode 100644
index 000000000..ce0550735
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/SpanExporterFactory.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Contrib\Otlp;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Signals;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Defaults;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Trace\SpanExporter\SpanExporterFactoryInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class SpanExporterFactory implements SpanExporterFactoryInterface
+{
+ use LogsMessagesTrait;
+
+ private ?TransportFactoryInterface $transportFactory;
+
+ private const DEFAULT_COMPRESSION = 'none';
+
+ public function __construct(?TransportFactoryInterface $transportFactory = null)
+ {
+ $this->transportFactory = $transportFactory;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public function create(): SpanExporterInterface
+ {
+ $transport = $this->buildTransport();
+
+ return new SpanExporter($transport);
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ * @psalm-suppress UndefinedClass
+ */
+ private function buildTransport(): TransportInterface
+ {
+ $protocol = $this->getProtocol();
+ $contentType = Protocols::contentType($protocol);
+ $endpoint = $this->getEndpoint($protocol);
+ $headers = $this->getHeaders();
+ $compression = $this->getCompression();
+
+ $factoryClass = Registry::transportFactory($protocol);
+ $factory = $this->transportFactory ?: new $factoryClass();
+
+ return $factory->create($endpoint, $contentType, $headers, $compression);
+ }
+
+ private function getProtocol(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_PROTOCOL);
+ }
+
+ private function getEndpoint(string $protocol): string
+ {
+ if (Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)) {
+ return Configuration::getString(Variables::OTEL_EXPORTER_OTLP_TRACES_ENDPOINT);
+ }
+ $endpoint = Configuration::has(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ ? Configuration::getString(Variables::OTEL_EXPORTER_OTLP_ENDPOINT)
+ : Defaults::OTEL_EXPORTER_OTLP_ENDPOINT;
+ if ($protocol === Protocols::GRPC) {
+ return $endpoint . OtlpUtil::method(Signals::TRACE);
+ }
+
+ return HttpEndpointResolver::create()->resolveToString($endpoint, Signals::TRACE);
+ }
+
+ private function getHeaders(): array
+ {
+ $headers = Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_HEADERS) ?
+ Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_TRACES_HEADERS) :
+ Configuration::getMap(Variables::OTEL_EXPORTER_OTLP_HEADERS);
+
+ return $headers + OtlpUtil::getUserAgentHeader();
+ }
+
+ private function getCompression(): string
+ {
+ return Configuration::has(Variables::OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) ?
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) :
+ Configuration::getEnum(Variables::OTEL_EXPORTER_OTLP_COMPRESSION, self::DEFAULT_COMPRESSION);
+ }
+}
diff --git a/vendor/open-telemetry/exporter-otlp/_register.php b/vendor/open-telemetry/exporter-otlp/_register.php
new file mode 100644
index 000000000..b3acdc3af
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/_register.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\SpanExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\MetricExporterFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerTransportFactory('http', \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('otlp', \OpenTelemetry\Contrib\Otlp\LogsExporterFactory::class);
diff --git a/vendor/open-telemetry/exporter-otlp/composer.json b/vendor/open-telemetry/exporter-otlp/composer.json
new file mode 100644
index 000000000..fdb13362d
--- /dev/null
+++ b/vendor/open-telemetry/exporter-otlp/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "open-telemetry/exporter-otlp",
+ "description": "OTLP exporter for OpenTelemetry.",
+ "keywords": ["opentelemetry", "otel", "tracing", "metrics", "exporter", "otlp", "grpc", "http"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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",
+ "php-http/discovery": "^1.14",
+ "open-telemetry/gen-otlp-protobuf": "^1.0",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/sdk": "^1.0"
+ },
+ "suggest": {
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\Contrib\\Otlp\\": "."
+ },
+ "files": [
+ "_register.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/.gitignore b/vendor/open-telemetry/gen-otlp-protobuf/.gitignore
new file mode 100644
index 000000000..b02a72bf6
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/.gitignore
@@ -0,0 +1 @@
+opentelemetry-proto
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php
new file mode 100644
index 000000000..4f1de339a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Logs/V1/LogsService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php
new file mode 100644
index 000000000..54090aeee
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Metrics/V1/MetricsService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php
new file mode 100644
index 000000000..1cb45f810
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Collector/Trace/V1/TraceService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php
new file mode 100644
index 000000000..811dc86c5
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Common/V1/Common.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
new file mode 100644
index 000000000..9af0fcc0f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php
new file mode 100644
index 000000000..398396939
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/Experimental/MetricsConfigService.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php
new file mode 100644
index 000000000..cbb09509a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Metrics/V1/Metrics.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php
new file mode 100644
index 000000000..70c1d08fb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Resource/V1/Resource.php
@@ -0,0 +1,32 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/resource/v1/resource.proto
+
+namespace GPBMetadata\Opentelemetry\Proto\Resource\V1;
+
+class Resource
+{
+ public static $is_initialized = false;
+
+ public static function initOnce() {
+ $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
+
+ if (static::$is_initialized == true) {
+ return;
+ }
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ $pool->internalAddGeneratedFile(
+ '
+�
+.opentelemetry/proto/resource/v1/resource.protoopentelemetry.proto.resource.v1"i
+Resource;
+
+attributes ( 2\'.opentelemetry.proto.common.v1.KeyValue
+dropped_attributes_count ( B�
+"io.opentelemetry.proto.resource.v1B ResourceProtoPZ*go.opentelemetry.io/proto/otlp/resource/v1�OpenTelemetry.Proto.Resource.V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php
new file mode 100644
index 000000000..35c1ebbf1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/Trace.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php
new file mode 100644
index 000000000..cf25a1656
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/GPBMetadata/Opentelemetry/Proto/Trace/V1/TraceConfig.php
Binary files differ
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php
new file mode 100644
index 000000000..044cdffdd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsPartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess</code>
+ */
+class ExportLogsPartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ */
+ protected $rejected_log_records = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_log_records
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedLogRecords()
+ {
+ return $this->rejected_log_records;
+ }
+
+ /**
+ * The number of rejected log records.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_log_records = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedLogRecords($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_log_records = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php
new file mode 100644
index 000000000..e6f4147c4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest</code>
+ */
+class ExportLogsServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ */
+ private $resource_logs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $resource_logs
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceLogs()
+ {
+ return $this->resource_logs;
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ResourceLogs::class);
+ $this->resource_logs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php
new file mode 100644
index 000000000..34e76a836
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/ExportLogsServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/logs/v1/logs_service.proto
+
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse</code>
+ */
+class ExportLogsServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Logs\V1\LogsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsPartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php
new file mode 100644
index 000000000..e3249d73e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Logs/V1/LogsServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2020, OpenTelemetry Authors
+//
+// 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.
+//
+namespace Opentelemetry\Proto\Collector\Logs\V1;
+
+/**
+ * Service that can be used to push logs between one Application instrumented with
+ * OpenTelemetry and an collector, or between an collector and a central collector (in this
+ * case logs are sent/received to/from multiple Applications).
+ */
+class LogsServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.logs.v1.LogsService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php
new file mode 100644
index 000000000..872d3b5e0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsPartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess</code>
+ */
+class ExportMetricsPartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ */
+ protected $rejected_data_points = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_data_points
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedDataPoints()
+ {
+ return $this->rejected_data_points;
+ }
+
+ /**
+ * The number of rejected data points.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_data_points = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedDataPoints($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_data_points = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php
new file mode 100644
index 000000000..1fa5ac3bf
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest</code>
+ */
+class ExportMetricsServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ */
+ private $resource_metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $resource_metrics
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceMetrics()
+ {
+ return $this->resource_metrics;
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ResourceMetrics::class);
+ $this->resource_metrics = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php
new file mode 100644
index 000000000..1f3bff5aa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/ExportMetricsServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto
+
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse</code>
+ */
+class ExportMetricsServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Metrics\V1\MetricsService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsPartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php
new file mode 100644
index 000000000..b5cddb55a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Metrics/V1/MetricsServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2019, OpenTelemetry Authors
+//
+// 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.
+//
+namespace Opentelemetry\Proto\Collector\Metrics\V1;
+
+/**
+ * Service that can be used to push metrics between one Application
+ * instrumented with OpenTelemetry and a collector, or between a collector and a
+ * central collector.
+ */
+class MetricsServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php
new file mode 100644
index 000000000..56bf54dda
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTracePartialSuccess.php
@@ -0,0 +1,127 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess</code>
+ */
+class ExportTracePartialSuccess extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ */
+ protected $rejected_spans = 0;
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ */
+ protected $error_message = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $rejected_spans
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ * @type string $error_message
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ * @return int|string
+ */
+ public function getRejectedSpans()
+ {
+ return $this->rejected_spans;
+ }
+
+ /**
+ * The number of rejected spans.
+ * A `rejected_<signal>` field holding a `0` value indicates that the
+ * request was fully accepted.
+ *
+ * Generated from protobuf field <code>int64 rejected_spans = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setRejectedSpans($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->rejected_spans = $var;
+
+ return $this;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @return string
+ */
+ public function getErrorMessage()
+ {
+ return $this->error_message;
+ }
+
+ /**
+ * A developer-facing human-readable message in English. It should be used
+ * either to explain why the server rejected parts of the data during a partial
+ * success or to convey warnings/suggestions during a full success. The message
+ * should offer guidance on how users can address such issues.
+ * error_message is an optional field. An error_message with an empty value
+ * is equivalent to it not being set.
+ *
+ * Generated from protobuf field <code>string error_message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setErrorMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->error_message = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php
new file mode 100644
index 000000000..dc8bced18
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceRequest.php
@@ -0,0 +1,81 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest</code>
+ */
+class ExportTraceServiceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ */
+ private $resource_spans;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $resource_spans
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceSpans()
+ {
+ return $this->resource_spans;
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain one
+ * element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ * data from multiple origins typically batch the data before forwarding further and
+ * in that case this array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ResourceSpans::class);
+ $this->resource_spans = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php
new file mode 100644
index 000000000..27b03030a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/ExportTraceServiceResponse.php
@@ -0,0 +1,119 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse</code>
+ */
+class ExportTraceServiceResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ */
+ protected $partial_success = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess $partial_success
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1\TraceService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ * @return \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess|null
+ */
+ public function getPartialSuccess()
+ {
+ return $this->partial_success;
+ }
+
+ public function hasPartialSuccess()
+ {
+ return isset($this->partial_success);
+ }
+
+ public function clearPartialSuccess()
+ {
+ unset($this->partial_success);
+ }
+
+ /**
+ * The details of a partially successful export request.
+ * If the request is only partially accepted
+ * (i.e. when the server accepts only parts of the data and rejects the rest)
+ * the server MUST initialize the `partial_success` field and MUST
+ * set the `rejected_<signal>` with the number of items it rejected.
+ * Servers MAY also make use of the `partial_success` field to convey
+ * warnings/suggestions to senders even when the request was fully accepted.
+ * In such cases, the `rejected_<signal>` MUST have a value of `0` and
+ * the `error_message` MUST be non-empty.
+ * A `partial_success` message with an empty value (rejected_<signal> = 0 and
+ * `error_message` = "") is equivalent to it not being set/present. Senders
+ * SHOULD interpret it the same way as in the full success case.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess partial_success = 1;</code>
+ * @param \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess $var
+ * @return $this
+ */
+ public function setPartialSuccess($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Collector\Trace\V1\ExportTracePartialSuccess::class);
+ $this->partial_success = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php
new file mode 100644
index 000000000..7a676b3e1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Collector/Trace/V1/TraceServiceClient.php
@@ -0,0 +1,53 @@
+<?php
+// GENERATED CODE -- DO NOT EDIT!
+
+// Original file comments:
+// Copyright 2019, OpenTelemetry Authors
+//
+// 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.
+//
+namespace Opentelemetry\Proto\Collector\Trace\V1;
+
+/**
+ * Service that can be used to push spans between one Application instrumented with
+ * OpenTelemetry and a collector, or between a collector and a central collector (in this
+ * case spans are sent/received to/from multiple Applications).
+ */
+class TraceServiceClient extends \Grpc\BaseStub {
+
+ /**
+ * @param string $hostname hostname
+ * @param array $opts channel options
+ * @param \Grpc\Channel $channel (optional) re-use channel object
+ */
+ public function __construct($hostname, $opts, $channel = null) {
+ parent::__construct($hostname, $opts, $channel);
+ }
+
+ /**
+ * For performance reasons, it is recommended to keep this RPC
+ * alive for the entire life of the application.
+ * @param \Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument input argument
+ * @param array $metadata metadata
+ * @param array $options call options
+ * @return \Grpc\UnaryCall
+ */
+ public function Export(\Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument,
+ $metadata = [], $options = []) {
+ return $this->_simpleRequest('/opentelemetry.proto.collector.trace.v1.TraceService/Export',
+ $argument,
+ ['\Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceResponse', 'decode'],
+ $metadata, $options);
+ }
+
+}
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
new file mode 100644
index 000000000..89079de89
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
@@ -0,0 +1,240 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * AnyValue is used to represent any type of attribute value. AnyValue may contain a
+ * primitive value such as a string or integer or it may contain an arbitrary nested
+ * object containing arrays, key-value lists and primitives.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.AnyValue</code>
+ */
+class AnyValue extends \Google\Protobuf\Internal\Message
+{
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $string_value
+ * @type bool $bool_value
+ * @type int|string $int_value
+ * @type float $double_value
+ * @type \Opentelemetry\Proto\Common\V1\ArrayValue $array_value
+ * @type \Opentelemetry\Proto\Common\V1\KeyValueList $kvlist_value
+ * @type string $bytes_value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string string_value = 1;</code>
+ * @return string
+ */
+ public function getStringValue()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasStringValue()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Generated from protobuf field <code>string string_value = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStringValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>bool bool_value = 2;</code>
+ * @return bool
+ */
+ public function getBoolValue()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasBoolValue()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Generated from protobuf field <code>bool bool_value = 2;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setBoolValue($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>int64 int_value = 3;</code>
+ * @return int|string
+ */
+ public function getIntValue()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasIntValue()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>int64 int_value = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setIntValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double double_value = 4;</code>
+ * @return float
+ */
+ public function getDoubleValue()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasDoubleValue()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Generated from protobuf field <code>double double_value = 4;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setDoubleValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.ArrayValue array_value = 5;</code>
+ * @return \Opentelemetry\Proto\Common\V1\ArrayValue|null
+ */
+ public function getArrayValue()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasArrayValue()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.ArrayValue array_value = 5;</code>
+ * @param \Opentelemetry\Proto\Common\V1\ArrayValue $var
+ * @return $this
+ */
+ public function setArrayValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\ArrayValue::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;</code>
+ * @return \Opentelemetry\Proto\Common\V1\KeyValueList|null
+ */
+ public function getKvlistValue()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasKvlistValue()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValueList $var
+ * @return $this
+ */
+ public function setKvlistValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\KeyValueList::class);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>bytes bytes_value = 7;</code>
+ * @return string
+ */
+ public function getBytesValue()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasBytesValue()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * Generated from protobuf field <code>bytes bytes_value = 7;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setBytesValue($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php
new file mode 100644
index 000000000..eccbba997
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
+ * since oneof in AnyValue does not allow repeated fields.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.ArrayValue</code>
+ */
+class ArrayValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * Array of values. The array may be empty (contain 0 elements).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * Array of values. The array may be empty (contain 0 elements).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.AnyValue values = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php
new file mode 100644
index 000000000..7d012ad19
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationLibrary.php
@@ -0,0 +1,98 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * InstrumentationLibrary is a message representing the instrumentation library information
+ * such as the fully qualified name and version.
+ * InstrumentationLibrary is wire-compatible with InstrumentationScope for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.InstrumentationLibrary</code>
+ */
+class InstrumentationLibrary extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ */
+ protected $version = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * An empty instrumentation library name means the name is unknown.
+ * @type string $version
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * An empty instrumentation library name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php
new file mode 100644
index 000000000..d2b4b6f05
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/InstrumentationScope.php
@@ -0,0 +1,164 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * InstrumentationScope is a message representing the instrumentation scope information
+ * such as the fully qualified name and version.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.InstrumentationScope</code>
+ */
+class InstrumentationScope extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ */
+ protected $version = '';
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ */
+ private $attributes;
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * An empty instrumentation scope name means the name is unknown.
+ * @type string $version
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * An empty instrumentation scope name means the name is unknown.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * Generated from protobuf field <code>string version = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setVersion($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->version = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Additional attributes that describe the scope. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php
new file mode 100644
index 000000000..6dfbdeb40
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValue.php
@@ -0,0 +1,98 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * KeyValue is a key-value pair that is used to store Span attributes, Link
+ * attributes, etc.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.KeyValue</code>
+ */
+class KeyValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ */
+ protected $key = '';
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ */
+ protected $value = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue $value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ * @return \Opentelemetry\Proto\Common\V1\AnyValue|null
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function hasValue()
+ {
+ return isset($this->value);
+ }
+
+ public function clearValue()
+ {
+ unset($this->value);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue value = 2;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php
new file mode 100644
index 000000000..51fb628ae
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/KeyValueList.php
@@ -0,0 +1,83 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
+ * since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
+ * a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
+ * avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
+ * are semantically equivalent.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.KeyValueList</code>
+ */
+class KeyValueList extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ */
+ private $values;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * A collection of key/value pairs of key-value pairs. The list may be empty (may
+ * contain 0 elements).
+ * The keys MUST be unique (it is not allowed to have more than one
+ * value with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue values = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->values = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php
new file mode 100644
index 000000000..c508dd1aa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/StringKeyValue.php
@@ -0,0 +1,88 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/common/v1/common.proto
+
+namespace Opentelemetry\Proto\Common\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version
+ * of KeyValue that only supports string values.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.common.v1.StringKeyValue</code>
+ */
+class StringKeyValue extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ */
+ protected $key = '';
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ */
+ protected $value = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * @type string $value
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Common\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @return string
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * Generated from protobuf field <code>string key = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setKey($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->key = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Generated from protobuf field <code>string value = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php
new file mode 100644
index 000000000..e43654641
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/InstrumentationLibraryLogs.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Logs produced by an InstrumentationLibrary.
+ * InstrumentationLibraryLogs is wire-compatible with ScopeLogs for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.InstrumentationLibraryLogs</code>
+ */
+class InstrumentationLibraryLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ */
+ private $log_records;
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $log_records
+ * A list of logs that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all logs in the "logs" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the logs in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogRecords()
+ {
+ return $this->log_records;
+ }
+
+ /**
+ * A list of logs that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogRecords($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\LogRecord::class);
+ $this->log_records = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php
new file mode 100644
index 000000000..caca11f87
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecord.php
@@ -0,0 +1,541 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A log record according to OpenTelemetry Log Data Model:
+ * https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.LogRecord</code>
+ */
+class LogRecord extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ */
+ protected $observed_time_unix_nano = 0;
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ */
+ protected $severity_number = 0;
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ */
+ protected $severity_text = '';
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ */
+ protected $body = null;
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ */
+ private $attributes;
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ */
+ protected $dropped_attributes_count = 0;
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ */
+ protected $flags = 0;
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ */
+ protected $span_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ * @type int|string $observed_time_unix_nano
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ * @type int $severity_number
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ * @type string $severity_text
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ * @type \Opentelemetry\Proto\Common\V1\AnyValue $body
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * @type int $flags
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ * @type string $trace_id
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ * @type string $span_id
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the time when the event occurred.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ * @return int|string
+ */
+ public function getObservedTimeUnixNano()
+ {
+ return $this->observed_time_unix_nano;
+ }
+
+ /**
+ * Time when the event was observed by the collection system.
+ * For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
+ * this timestamp is typically set at the generation time and is equal to Timestamp.
+ * For events originating externally and collected by OpenTelemetry (e.g. using
+ * Collector) this is the time when OpenTelemetry's code observed the event measured
+ * by the clock of the OpenTelemetry code. This field MUST be set once the event is
+ * observed by OpenTelemetry.
+ * For converting OpenTelemetry log data to formats that support only one timestamp or
+ * when receiving OpenTelemetry log data by recipients that support only one timestamp
+ * internally the following logic is recommended:
+ * - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * Value of 0 indicates unknown or missing timestamp.
+ *
+ * Generated from protobuf field <code>fixed64 observed_time_unix_nano = 11;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setObservedTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->observed_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ * @return int
+ */
+ public function getSeverityNumber()
+ {
+ return $this->severity_number;
+ }
+
+ /**
+ * Numerical value of the severity, normalized to values described in Log Data Model.
+ * [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSeverityNumber($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Logs\V1\SeverityNumber::class);
+ $this->severity_number = $var;
+
+ return $this;
+ }
+
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ * @return string
+ */
+ public function getSeverityText()
+ {
+ return $this->severity_text;
+ }
+
+ /**
+ * The severity text (also known as log level). The original string representation as
+ * it is known at the source. [Optional].
+ *
+ * Generated from protobuf field <code>string severity_text = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSeverityText($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->severity_text = $var;
+
+ return $this;
+ }
+
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ * @return \Opentelemetry\Proto\Common\V1\AnyValue|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function hasBody()
+ {
+ return isset($this->body);
+ }
+
+ public function clearBody()
+ {
+ unset($this->body);
+ }
+
+ /**
+ * A value containing the body of the log record. Can be for example a human-readable
+ * string message (including multi-line) describing the event in a free form or it can
+ * be a structured data composed of arrays and maps of other values. [Optional].
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.AnyValue body = 5;</code>
+ * @param \Opentelemetry\Proto\Common\V1\AnyValue $var
+ * @return $this
+ */
+ public function setBody($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\AnyValue::class);
+ $this->body = $var;
+
+ return $this;
+ }
+
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Additional attributes that describe the specific event occurrence. [Optional].
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 7;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags, a bit field. 8 least significant bits are the trace flags as
+ * defined in W3C Trace Context specification. 24 most significant bits are reserved
+ * and must be set to 0. Readers must not assume that 24 most significant bits
+ * will be zero and must correctly mask the bits when reading 8-bit trace flag (use
+ * flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
+ *
+ * Generated from protobuf field <code>fixed32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier for a trace. All logs from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * trace if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 9;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is optional. If the sender specifies a valid span_id then it SHOULD also
+ * specify a valid trace_id.
+ * The receivers SHOULD assume that the log record is not associated with a
+ * span if any of the following is true:
+ * - the field is not present,
+ * - the field contains an invalid value.
+ *
+ * Generated from protobuf field <code>bytes span_id = 10;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php
new file mode 100644
index 000000000..de6f38899
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogRecordFlags.php
@@ -0,0 +1,58 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use UnexpectedValueException;
+
+/**
+ * LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as
+ * bit-fields. Each non-zero value defined in this enum is a bit-mask.
+ * To extract the bit-field, for example, use an expression like:
+ * (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
+ *
+ * Protobuf type <code>opentelemetry.proto.logs.v1.LogRecordFlags</code>
+ */
+class LogRecordFlags
+{
+ /**
+ * The zero value for the enum. Should not be used for comparisons.
+ * Instead use bitwise "and" with the appropriate mask as shown above.
+ *
+ * Generated from protobuf enum <code>LOG_RECORD_FLAGS_DO_NOT_USE = 0;</code>
+ */
+ const LOG_RECORD_FLAGS_DO_NOT_USE = 0;
+ /**
+ * Bits 0-7 are used for trace flags.
+ *
+ * Generated from protobuf enum <code>LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;</code>
+ */
+ const LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;
+
+ private static $valueToName = [
+ self::LOG_RECORD_FLAGS_DO_NOT_USE => 'LOG_RECORD_FLAGS_DO_NOT_USE',
+ self::LOG_RECORD_FLAGS_TRACE_FLAGS_MASK => 'LOG_RECORD_FLAGS_TRACE_FLAGS_MASK',
+ ];
+
+ 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/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php
new file mode 100644
index 000000000..90db06035
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/LogsData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * LogsData represents the logs data that can be stored in a persistent storage,
+ * OR can be embedded by other protocols that transfer OTLP logs data but do not
+ * implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.LogsData</code>
+ */
+class LogsData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ */
+ private $resource_logs;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $resource_logs
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceLogs()
+ {
+ return $this->resource_logs;
+ }
+
+ /**
+ * An array of ResourceLogs.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ResourceLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ResourceLogs::class);
+ $this->resource_logs = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php
new file mode 100644
index 000000000..2049339d4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ResourceLogs.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeLogs from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.ResourceLogs</code>
+ */
+class ResourceLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ */
+ private $scope_logs;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ * @type \Opentelemetry\Proto\Logs\V1\ScopeLogs[]|\Google\Protobuf\Internal\RepeatedField $scope_logs
+ * A list of ScopeLogs that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the logs in this message.
+ * If this field is not set then resource info is unknown.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeLogs()
+ {
+ return $this->scope_logs;
+ }
+
+ /**
+ * A list of ScopeLogs that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.ScopeLogs scope_logs = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\ScopeLogs[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeLogs($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\ScopeLogs::class);
+ $this->scope_logs = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_logs" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php
new file mode 100644
index 000000000..8c5a94821
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/ScopeLogs.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Logs produced by a Scope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.logs.v1.ScopeLogs</code>
+ */
+class ScopeLogs extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ */
+ private $log_records;
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $log_records
+ * A list of log records.
+ * @type string $schema_url
+ * This schema_url applies to all logs in the "logs" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Logs\V1\Logs::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the logs in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLogRecords()
+ {
+ return $this->log_records;
+ }
+
+ /**
+ * A list of log records.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.logs.v1.LogRecord log_records = 2;</code>
+ * @param \Opentelemetry\Proto\Logs\V1\LogRecord[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLogRecords($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Logs\V1\LogRecord::class);
+ $this->log_records = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all logs in the "logs" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php
new file mode 100644
index 000000000..ad89442b0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Logs/V1/SeverityNumber.php
@@ -0,0 +1,167 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/logs/v1/logs.proto
+
+namespace Opentelemetry\Proto\Logs\V1;
+
+use UnexpectedValueException;
+
+/**
+ * Possible values for LogRecord.SeverityNumber.
+ *
+ * Protobuf type <code>opentelemetry.proto.logs.v1.SeverityNumber</code>
+ */
+class SeverityNumber
+{
+ /**
+ * UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
+ *
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_UNSPECIFIED = 0;</code>
+ */
+ const SEVERITY_NUMBER_UNSPECIFIED = 0;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE = 1;</code>
+ */
+ const SEVERITY_NUMBER_TRACE = 1;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE2 = 2;</code>
+ */
+ const SEVERITY_NUMBER_TRACE2 = 2;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE3 = 3;</code>
+ */
+ const SEVERITY_NUMBER_TRACE3 = 3;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_TRACE4 = 4;</code>
+ */
+ const SEVERITY_NUMBER_TRACE4 = 4;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG = 5;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG = 5;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG2 = 6;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG2 = 6;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG3 = 7;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG3 = 7;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_DEBUG4 = 8;</code>
+ */
+ const SEVERITY_NUMBER_DEBUG4 = 8;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO = 9;</code>
+ */
+ const SEVERITY_NUMBER_INFO = 9;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO2 = 10;</code>
+ */
+ const SEVERITY_NUMBER_INFO2 = 10;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO3 = 11;</code>
+ */
+ const SEVERITY_NUMBER_INFO3 = 11;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_INFO4 = 12;</code>
+ */
+ const SEVERITY_NUMBER_INFO4 = 12;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN = 13;</code>
+ */
+ const SEVERITY_NUMBER_WARN = 13;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN2 = 14;</code>
+ */
+ const SEVERITY_NUMBER_WARN2 = 14;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN3 = 15;</code>
+ */
+ const SEVERITY_NUMBER_WARN3 = 15;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_WARN4 = 16;</code>
+ */
+ const SEVERITY_NUMBER_WARN4 = 16;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR = 17;</code>
+ */
+ const SEVERITY_NUMBER_ERROR = 17;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR2 = 18;</code>
+ */
+ const SEVERITY_NUMBER_ERROR2 = 18;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR3 = 19;</code>
+ */
+ const SEVERITY_NUMBER_ERROR3 = 19;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_ERROR4 = 20;</code>
+ */
+ const SEVERITY_NUMBER_ERROR4 = 20;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL = 21;</code>
+ */
+ const SEVERITY_NUMBER_FATAL = 21;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL2 = 22;</code>
+ */
+ const SEVERITY_NUMBER_FATAL2 = 22;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL3 = 23;</code>
+ */
+ const SEVERITY_NUMBER_FATAL3 = 23;
+ /**
+ * Generated from protobuf enum <code>SEVERITY_NUMBER_FATAL4 = 24;</code>
+ */
+ const SEVERITY_NUMBER_FATAL4 = 24;
+
+ private static $valueToName = [
+ self::SEVERITY_NUMBER_UNSPECIFIED => 'SEVERITY_NUMBER_UNSPECIFIED',
+ self::SEVERITY_NUMBER_TRACE => 'SEVERITY_NUMBER_TRACE',
+ self::SEVERITY_NUMBER_TRACE2 => 'SEVERITY_NUMBER_TRACE2',
+ self::SEVERITY_NUMBER_TRACE3 => 'SEVERITY_NUMBER_TRACE3',
+ self::SEVERITY_NUMBER_TRACE4 => 'SEVERITY_NUMBER_TRACE4',
+ self::SEVERITY_NUMBER_DEBUG => 'SEVERITY_NUMBER_DEBUG',
+ self::SEVERITY_NUMBER_DEBUG2 => 'SEVERITY_NUMBER_DEBUG2',
+ self::SEVERITY_NUMBER_DEBUG3 => 'SEVERITY_NUMBER_DEBUG3',
+ self::SEVERITY_NUMBER_DEBUG4 => 'SEVERITY_NUMBER_DEBUG4',
+ self::SEVERITY_NUMBER_INFO => 'SEVERITY_NUMBER_INFO',
+ self::SEVERITY_NUMBER_INFO2 => 'SEVERITY_NUMBER_INFO2',
+ self::SEVERITY_NUMBER_INFO3 => 'SEVERITY_NUMBER_INFO3',
+ self::SEVERITY_NUMBER_INFO4 => 'SEVERITY_NUMBER_INFO4',
+ self::SEVERITY_NUMBER_WARN => 'SEVERITY_NUMBER_WARN',
+ self::SEVERITY_NUMBER_WARN2 => 'SEVERITY_NUMBER_WARN2',
+ self::SEVERITY_NUMBER_WARN3 => 'SEVERITY_NUMBER_WARN3',
+ self::SEVERITY_NUMBER_WARN4 => 'SEVERITY_NUMBER_WARN4',
+ self::SEVERITY_NUMBER_ERROR => 'SEVERITY_NUMBER_ERROR',
+ self::SEVERITY_NUMBER_ERROR2 => 'SEVERITY_NUMBER_ERROR2',
+ self::SEVERITY_NUMBER_ERROR3 => 'SEVERITY_NUMBER_ERROR3',
+ self::SEVERITY_NUMBER_ERROR4 => 'SEVERITY_NUMBER_ERROR4',
+ self::SEVERITY_NUMBER_FATAL => 'SEVERITY_NUMBER_FATAL',
+ self::SEVERITY_NUMBER_FATAL2 => 'SEVERITY_NUMBER_FATAL2',
+ self::SEVERITY_NUMBER_FATAL3 => 'SEVERITY_NUMBER_FATAL3',
+ self::SEVERITY_NUMBER_FATAL4 => 'SEVERITY_NUMBER_FATAL4',
+ ];
+
+ 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/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php
new file mode 100644
index 000000000..bdf9ea2fa
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigRequest.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigRequest</code>
+ */
+class MetricConfigRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ */
+ protected $last_known_fingerprint = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * Required. The resource for which configuration should be returned.
+ * @type string $last_known_fingerprint
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource
+ */
+ public function getResource()
+ {
+ return isset($this->resource) ? $this->resource : null;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * Required. The resource for which configuration should be returned.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ * @return string
+ */
+ public function getLastKnownFingerprint()
+ {
+ return $this->last_known_fingerprint;
+ }
+
+ /**
+ * Optional. The value of MetricConfigResponse.fingerprint for the last
+ * configuration that the caller received and successfully applied.
+ *
+ * Generated from protobuf field <code>bytes last_known_fingerprint = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setLastKnownFingerprint($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->last_known_fingerprint = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php
new file mode 100644
index 000000000..0993a59ea
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse.php
@@ -0,0 +1,201 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse</code>
+ */
+class MetricConfigResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ */
+ protected $fingerprint = '';
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ */
+ private $schedules;
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ */
+ protected $suggested_wait_time_sec = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fingerprint
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule[]|\Google\Protobuf\Internal\RepeatedField $schedules
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ * @type int $suggested_wait_time_sec
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ * @return string
+ */
+ public function getFingerprint()
+ {
+ return $this->fingerprint;
+ }
+
+ /**
+ * Optional. The fingerprint associated with this MetricConfigResponse. Each
+ * change in configs yields a different fingerprint. The resource SHOULD copy
+ * this value to MetricConfigRequest.last_known_fingerprint for the next
+ * configuration request. If there are no changes between fingerprint and
+ * MetricConfigRequest.last_known_fingerprint, then all other fields besides
+ * fingerprint in the response are optional, or the same as the last update if
+ * present.
+ * The exact mechanics of generating the fingerprint is up to the
+ * implementation. However, a fingerprint must be deterministically determined
+ * by the configurations -- the same configuration will generate the same
+ * fingerprint on any instance of an implementation. Hence using a timestamp is
+ * unacceptable, but a deterministic hash is fine.
+ *
+ * Generated from protobuf field <code>bytes fingerprint = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setFingerprint($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->fingerprint = $var;
+
+ return $this;
+ }
+
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSchedules()
+ {
+ return $this->schedules;
+ }
+
+ /**
+ * A single metric may match multiple schedules. In such cases, the schedule
+ * that specifies the smallest period is applied.
+ * Note, for optimization purposes, it is recommended to use as few schedules
+ * as possible to capture all required metric updates. Where you can be
+ * conservative, do take full advantage of the inclusion/exclusion patterns to
+ * capture as much of your targeted metrics.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule schedules = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSchedules($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule::class);
+ $this->schedules = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ * @return int
+ */
+ public function getSuggestedWaitTimeSec()
+ {
+ return $this->suggested_wait_time_sec;
+ }
+
+ /**
+ * Optional. The client is suggested to wait this long (in seconds) before
+ * pinging the configuration service again.
+ *
+ * Generated from protobuf field <code>int32 suggested_wait_time_sec = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setSuggestedWaitTimeSec($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->suggested_wait_time_sec = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php
new file mode 100644
index 000000000..07091928d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule.php
@@ -0,0 +1,149 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Schedule is used to apply a particular scheduling configuration to
+ * a metric. If a metric name matches a schedule's patterns, then the metric
+ * adopts the configuration specified by the schedule.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule</code>
+ */
+class Schedule extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ */
+ private $exclusion_patterns;
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ */
+ private $inclusion_patterns;
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ */
+ protected $period_sec = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $exclusion_patterns
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ * @type \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $inclusion_patterns
+ * @type int $period_sec
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExclusionPatterns()
+ {
+ return $this->exclusion_patterns;
+ }
+
+ /**
+ * Metrics with names that match a rule in the inclusion_patterns are
+ * targeted by this schedule. Metrics that match the exclusion_patterns
+ * are not targeted for this schedule, even if they match an inclusion
+ * pattern.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern exclusion_patterns = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExclusionPatterns($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
+ $this->exclusion_patterns = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getInclusionPatterns()
+ {
+ return $this->inclusion_patterns;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern inclusion_patterns = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setInclusionPatterns($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern::class);
+ $this->inclusion_patterns = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ * @return int
+ */
+ public function getPeriodSec()
+ {
+ return $this->period_sec;
+ }
+
+ /**
+ * Describes the collection period for each metric in seconds.
+ * A period of 0 means to not export.
+ *
+ * Generated from protobuf field <code>int32 period_sec = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setPeriodSec($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->period_sec = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Schedule::class, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php
new file mode 100644
index 000000000..839c097fb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse/Schedule/Pattern.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A light-weight pattern that can match 1 or more
+ * metrics, for which this schedule will apply. The string is used to
+ * match against metric names. It should not exceed 100k characters.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.experimental.MetricConfigResponse.Schedule.Pattern</code>
+ */
+class Pattern extends \Google\Protobuf\Internal\Message
+{
+ protected $match;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $equals
+ * matches the metric name exactly
+ * @type string $starts_with
+ * prefix-matches the metric name
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\Experimental\MetricsConfigService::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * matches the metric name exactly
+ *
+ * Generated from protobuf field <code>string equals = 1;</code>
+ * @return string
+ */
+ public function getEquals()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasEquals()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * matches the metric name exactly
+ *
+ * Generated from protobuf field <code>string equals = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setEquals($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * prefix-matches the metric name
+ *
+ * Generated from protobuf field <code>string starts_with = 2;</code>
+ * @return string
+ */
+ public function getStartsWith()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasStartsWith()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * prefix-matches the metric name
+ *
+ * Generated from protobuf field <code>string starts_with = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setStartsWith($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMatch()
+ {
+ return $this->whichOneof("match");
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Pattern::class, \Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule_Pattern::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php
new file mode 100644
index 000000000..5486976fc
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule instead.
+ * @deprecated
+ */
+ class MetricConfigResponse_Schedule {}
+}
+class_exists(MetricConfigResponse\Schedule::class);
+@trigger_error('Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php
new file mode 100644
index 000000000..cd516c784
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/Experimental/MetricConfigResponse_Schedule_Pattern.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/experimental/metrics_config_service.proto
+
+namespace Opentelemetry\Proto\Metrics\Experimental;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern instead.
+ * @deprecated
+ */
+ class MetricConfigResponse_Schedule_Pattern {}
+}
+class_exists(MetricConfigResponse\Schedule\Pattern::class);
+@trigger_error('Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse_Schedule_Pattern is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\Experimental\MetricConfigResponse\Schedule\Pattern instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php
new file mode 100644
index 000000000..93fb0ea97
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/AggregationTemporality.php
@@ -0,0 +1,114 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use UnexpectedValueException;
+
+/**
+ * AggregationTemporality defines how a metric aggregator reports aggregated
+ * values. It describes how those values relate to the time interval over
+ * which they are aggregated.
+ *
+ * Protobuf type <code>opentelemetry.proto.metrics.v1.AggregationTemporality</code>
+ */
+class AggregationTemporality
+{
+ /**
+ * UNSPECIFIED is the default AggregationTemporality, it MUST not be used.
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;</code>
+ */
+ const AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;
+ /**
+ * DELTA is an AggregationTemporality for a metric aggregator which reports
+ * changes since last report time. Successive metrics contain aggregation of
+ * values from continuous and non-overlapping intervals.
+ * The values for a DELTA metric are based only on the time interval
+ * associated with one measurement cycle. There is no dependency on
+ * previous measurements like is the case for CUMULATIVE metrics.
+ * For example, consider a system measuring the number of requests that
+ * it receives and reports the sum of these requests every second as a
+ * DELTA metric:
+ * 1. The system starts receiving at time=t_0.
+ * 2. A request is received, the system measures 1 request.
+ * 3. A request is received, the system measures 1 request.
+ * 4. A request is received, the system measures 1 request.
+ * 5. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+1 with a value of 3.
+ * 6. A request is received, the system measures 1 request.
+ * 7. A request is received, the system measures 1 request.
+ * 8. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0+1 to
+ * t_0+2 with a value of 2.
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_DELTA = 1;</code>
+ */
+ const AGGREGATION_TEMPORALITY_DELTA = 1;
+ /**
+ * CUMULATIVE is an AggregationTemporality for a metric aggregator which
+ * reports changes since a fixed start time. This means that current values
+ * of a CUMULATIVE metric depend on all previous measurements since the
+ * start time. Because of this, the sender is required to retain this state
+ * in some form. If this state is lost or invalidated, the CUMULATIVE metric
+ * values MUST be reset and a new fixed start time following the last
+ * reported measurement time sent MUST be used.
+ * For example, consider a system measuring the number of requests that
+ * it receives and reports the sum of these requests every second as a
+ * CUMULATIVE metric:
+ * 1. The system starts receiving at time=t_0.
+ * 2. A request is received, the system measures 1 request.
+ * 3. A request is received, the system measures 1 request.
+ * 4. A request is received, the system measures 1 request.
+ * 5. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+1 with a value of 3.
+ * 6. A request is received, the system measures 1 request.
+ * 7. A request is received, the system measures 1 request.
+ * 8. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_0 to
+ * t_0+2 with a value of 5.
+ * 9. The system experiences a fault and loses state.
+ * 10. The system recovers and resumes receiving at time=t_1.
+ * 11. A request is received, the system measures 1 request.
+ * 12. The 1 second collection cycle ends. A metric is exported for the
+ * number of requests received over the interval of time t_1 to
+ * t_0+1 with a value of 1.
+ * Note: Even though, when reporting changes since last report time, using
+ * CUMULATIVE is valid, it is not recommended. This may cause problems for
+ * systems that do not use start_time to determine when the aggregation
+ * value was reset (e.g. Prometheus).
+ *
+ * Generated from protobuf enum <code>AGGREGATION_TEMPORALITY_CUMULATIVE = 2;</code>
+ */
+ const AGGREGATION_TEMPORALITY_CUMULATIVE = 2;
+
+ private static $valueToName = [
+ self::AGGREGATION_TEMPORALITY_UNSPECIFIED => 'AGGREGATION_TEMPORALITY_UNSPECIFIED',
+ self::AGGREGATION_TEMPORALITY_DELTA => 'AGGREGATION_TEMPORALITY_DELTA',
+ self::AGGREGATION_TEMPORALITY_CUMULATIVE => 'AGGREGATION_TEMPORALITY_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/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php
new file mode 100644
index 000000000..f11029d02
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/DataPointFlags.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use UnexpectedValueException;
+
+/**
+ * DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a
+ * bit-field representing 32 distinct boolean flags. Each flag defined in this
+ * enum is a bit-mask. To test the presence of a single flag in the flags of
+ * a data point, for example, use an expression like:
+ * (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK
+ *
+ * Protobuf type <code>opentelemetry.proto.metrics.v1.DataPointFlags</code>
+ */
+class DataPointFlags
+{
+ /**
+ * The zero value for the enum. Should not be used for comparisons.
+ * Instead use bitwise "and" with the appropriate mask as shown above.
+ *
+ * Generated from protobuf enum <code>DATA_POINT_FLAGS_DO_NOT_USE = 0;</code>
+ */
+ const DATA_POINT_FLAGS_DO_NOT_USE = 0;
+ /**
+ * This DataPoint is valid but has no recorded value. This value
+ * SHOULD be used to reflect explicitly missing data in a series, as
+ * for an equivalent to the Prometheus "staleness marker".
+ *
+ * Generated from protobuf enum <code>DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;</code>
+ */
+ const DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1;
+
+ private static $valueToName = [
+ self::DATA_POINT_FLAGS_DO_NOT_USE => 'DATA_POINT_FLAGS_DO_NOT_USE',
+ self::DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK => 'DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK',
+ ];
+
+ 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/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php
new file mode 100644
index 000000000..a0387ede1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Exemplar.php
@@ -0,0 +1,269 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A representation of an exemplar, which is a sample input measurement.
+ * Exemplars also hold information about the environment when the measurement
+ * was recorded, for example the span and trace ID of the active span when the
+ * exemplar was recorded.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Exemplar</code>
+ */
+class Exemplar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ */
+ private $filtered_attributes;
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ */
+ protected $span_id = '';
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ */
+ protected $trace_id = '';
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $filtered_attributes
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type float $as_double
+ * @type int|string $as_int
+ * @type string $span_id
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * @type string $trace_id
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFilteredAttributes()
+ {
+ return $this->filtered_attributes;
+ }
+
+ /**
+ * The set of key/value pairs that were filtered out by the aggregator, but
+ * recorded alongside the original measurement. Only key/value pairs that were
+ * filtered out by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFilteredAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->filtered_attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 3;</code>
+ * @return float
+ */
+ public function getAsDouble()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasAsDouble()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 3;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setAsDouble($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @return int|string
+ */
+ public function getAsInt()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasAsInt()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setAsInt($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php
new file mode 100644
index 000000000..2a5c4cc90
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ExponentialHistogram represents the type of a metric that is calculated by aggregating
+ * as a ExponentialHistogram of all reported double measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogram</code>
+ */
+class ExponentialHistogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php
new file mode 100644
index 000000000..62cb6f5d6
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint.php
@@ -0,0 +1,718 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
+ * summary statistics for a population of values, it may optionally contain the
+ * distribution of those values across a set of buckets.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint</code>
+ */
+class ExponentialHistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ */
+ protected $sum = null;
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ */
+ protected $scale = 0;
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ */
+ protected $zero_count = 0;
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ */
+ protected $positive = null;
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ */
+ protected $negative = null;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ */
+ protected $flags = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ */
+ private $exemplars;
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ */
+ protected $min = null;
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ */
+ protected $max = null;
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ */
+ protected $zero_threshold = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ * @type int $scale
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ * @type int|string $zero_count
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $positive
+ * positive carries the positive range of exponential bucket counts.
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $negative
+ * negative carries the negative range of exponential bucket counts.
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type float $min
+ * min is the minimum value over (start_time, end_time].
+ * @type float $max
+ * max is the maximum value over (start_time, end_time].
+ * @type float $zero_threshold
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be
+ * non-negative. This value must be equal to the sum of the "bucket_counts"
+ * values in the positive and negative Buckets plus the "zero_count" field.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return isset($this->sum) ? $this->sum : 0.0;
+ }
+
+ public function hasSum()
+ {
+ return isset($this->sum);
+ }
+
+ public function clearSum()
+ {
+ unset($this->sum);
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ * @return int
+ */
+ public function getScale()
+ {
+ return $this->scale;
+ }
+
+ /**
+ * scale describes the resolution of the histogram. Boundaries are
+ * located at powers of the base, where:
+ * base = (2^(2^-scale))
+ * The histogram bucket identified by `index`, a signed integer,
+ * contains values that are greater than (base^index) and
+ * less than or equal to (base^(index+1)).
+ * The positive and negative ranges of the histogram are expressed
+ * separately. Negative values are mapped by their absolute value
+ * into the negative range using the same scale as the positive range.
+ * scale is not restricted by the protocol, as the permissible
+ * values depend on the range of the data.
+ *
+ * Generated from protobuf field <code>sint32 scale = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setScale($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->scale = $var;
+
+ return $this;
+ }
+
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ * @return int|string
+ */
+ public function getZeroCount()
+ {
+ return $this->zero_count;
+ }
+
+ /**
+ * zero_count is the count of values that are either exactly zero or
+ * within the region considered zero by the instrumentation at the
+ * tolerated degree of precision. This bucket stores values that
+ * cannot be expressed using the standard exponential formula as
+ * well as values that have been rounded to zero.
+ * Implementations MAY consider the zero bucket to have probability
+ * mass equal to (zero_count / count).
+ *
+ * Generated from protobuf field <code>fixed64 zero_count = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setZeroCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->zero_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets|null
+ */
+ public function getPositive()
+ {
+ return $this->positive;
+ }
+
+ public function hasPositive()
+ {
+ return isset($this->positive);
+ }
+
+ public function clearPositive()
+ {
+ unset($this->positive);
+ }
+
+ /**
+ * positive carries the positive range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets positive = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $var
+ * @return $this
+ */
+ public function setPositive($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets::class);
+ $this->positive = $var;
+
+ return $this;
+ }
+
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets|null
+ */
+ public function getNegative()
+ {
+ return $this->negative;
+ }
+
+ public function hasNegative()
+ {
+ return isset($this->negative);
+ }
+
+ public function clearNegative()
+ {
+ unset($this->negative);
+ }
+
+ /**
+ * negative carries the negative range of exponential bucket counts.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets negative = 9;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets $var
+ * @return $this
+ */
+ public function setNegative($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets::class);
+ $this->negative = $var;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 11;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ * @return float
+ */
+ public function getMin()
+ {
+ return isset($this->min) ? $this->min : 0.0;
+ }
+
+ public function hasMin()
+ {
+ return isset($this->min);
+ }
+
+ public function clearMin()
+ {
+ unset($this->min);
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 12;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMin($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->min = $var;
+
+ return $this;
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ * @return float
+ */
+ public function getMax()
+ {
+ return isset($this->max) ? $this->max : 0.0;
+ }
+
+ public function hasMax()
+ {
+ return isset($this->max);
+ }
+
+ public function clearMax()
+ {
+ unset($this->max);
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 13;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMax($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->max = $var;
+
+ return $this;
+ }
+
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ * @return float
+ */
+ public function getZeroThreshold()
+ {
+ return $this->zero_threshold;
+ }
+
+ /**
+ * ZeroThreshold may be optionally set to convey the width of the zero
+ * region. Where the zero region is defined as the closed interval
+ * [-ZeroThreshold, ZeroThreshold].
+ * When ZeroThreshold is 0, zero count bucket stores values that cannot be
+ * expressed using the standard exponential formula as well as values that
+ * have been rounded to zero.
+ *
+ * Generated from protobuf field <code>double zero_threshold = 14;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setZeroThreshold($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->zero_threshold = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php
new file mode 100644
index 000000000..e1a90a34a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint/Buckets.php
@@ -0,0 +1,141 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Buckets are a set of bucket counts, encoded in a contiguous array
+ * of counts.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets</code>
+ */
+class Buckets extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ */
+ protected $offset = 0;
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ */
+ private $bucket_counts;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $offset
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ * @return int
+ */
+ public function getOffset()
+ {
+ return $this->offset;
+ }
+
+ /**
+ * Offset is the bucket index of the first entry in the bucket_counts array.
+ *
+ * Note: This uses a varint encoding as a simple form of compression.
+ *
+ * Generated from protobuf field <code>sint32 offset = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setOffset($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->offset = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an array of count values, where bucket_counts[i] carries
+ * the count of the bucket at index (offset+i). bucket_counts[i] is the count
+ * of values greater than base^(offset+i) and less than or equal to
+ * base^(offset+i+1).
+ * Note: By contrast, the explicit HistogramDataPoint uses
+ * fixed64. This field is expected to have many buckets,
+ * especially zeros, so uint64 has been selected to ensure
+ * varint encoding.
+ *
+ * Generated from protobuf field <code>repeated uint64 bucket_counts = 2;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Buckets::class, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint_Buckets::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php
new file mode 100644
index 000000000..a002399a8
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ExponentialHistogramDataPoint_Buckets.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets instead.
+ * @deprecated
+ */
+ class ExponentialHistogramDataPoint_Buckets {}
+}
+class_exists(ExponentialHistogramDataPoint\Buckets::class);
+@trigger_error('Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint_Buckets is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\V1\ExponentialHistogramDataPoint\Buckets instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php
new file mode 100644
index 000000000..da56e2a44
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Gauge.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Gauge represents the type of a scalar metric that always exports the
+ * "current value" for every data point. It should be used for an "unknown"
+ * aggregation.
+ * A Gauge does not support different aggregation temporalities. Given the
+ * aggregation is unknown, points cannot be combined using the same
+ * aggregation, regardless of aggregation temporalities. Therefore,
+ * AggregationTemporality is not included. Consequently, this also means
+ * "StartTimeUnixNano" is ignored for all data points.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Gauge</code>
+ */
+class Gauge extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\NumberDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php
new file mode 100644
index 000000000..e6643b89e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Histogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Histogram represents the type of a metric that is calculated by aggregating
+ * as a Histogram of all reported measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Histogram</code>
+ */
+class Histogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.HistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\HistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php
new file mode 100644
index 000000000..2b19dd856
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/HistogramDataPoint.php
@@ -0,0 +1,565 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * HistogramDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a Histogram. A Histogram contains summary statistics
+ * for a population of values, it may optionally contain the distribution of
+ * those values across a set of buckets.
+ * If the histogram contains the distribution of values, then both
+ * "explicit_bounds" and "bucket counts" fields must be defined.
+ * If the histogram does not contain the distribution of values, then both
+ * "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
+ * "sum" are known.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.HistogramDataPoint</code>
+ */
+class HistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ */
+ protected $sum = null;
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ */
+ private $bucket_counts;
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ */
+ private $explicit_bounds;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ */
+ private $exemplars;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ */
+ protected $flags = 0;
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ */
+ protected $min = null;
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ */
+ protected $max = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ * @type float[]|\Google\Protobuf\Internal\RepeatedField $explicit_bounds
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * @type float $min
+ * min is the minimum value over (start_time, end_time].
+ * @type float $max
+ * max is the maximum value over (start_time, end_time].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return isset($this->sum) ? $this->sum : 0.0;
+ }
+
+ public function hasSum()
+ {
+ return isset($this->sum);
+ }
+
+ public function clearSum()
+ {
+ unset($this->sum);
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
+ *
+ * Generated from protobuf field <code>optional double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FIXED64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExplicitBounds()
+ {
+ return $this->explicit_bounds;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExplicitBounds($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
+ $this->explicit_bounds = $arr;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ * @return float
+ */
+ public function getMin()
+ {
+ return isset($this->min) ? $this->min : 0.0;
+ }
+
+ public function hasMin()
+ {
+ return isset($this->min);
+ }
+
+ public function clearMin()
+ {
+ unset($this->min);
+ }
+
+ /**
+ * min is the minimum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double min = 11;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMin($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->min = $var;
+
+ return $this;
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ * @return float
+ */
+ public function getMax()
+ {
+ return isset($this->max) ? $this->max : 0.0;
+ }
+
+ public function hasMax()
+ {
+ return isset($this->max);
+ }
+
+ public function clearMax()
+ {
+ unset($this->max);
+ }
+
+ /**
+ * max is the maximum value over (start_time, end_time].
+ *
+ * Generated from protobuf field <code>optional double max = 12;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setMax($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->max = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php
new file mode 100644
index 000000000..807aa1054
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/InstrumentationLibraryMetrics.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Metrics produced by an InstrumentationLibrary.
+ * InstrumentationLibraryMetrics is wire-compatible with ScopeMetrics for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.InstrumentationLibraryMetrics</code>
+ */
+class InstrumentationLibraryMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ */
+ private $metrics;
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
+ * A list of metrics that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all metrics in the "metrics" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the metrics in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Metric::class);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php
new file mode 100644
index 000000000..2eac03fcb
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntDataPoint.php
@@ -0,0 +1,227 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntDataPoint is deprecated. Use integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntDataPoint</code>
+ */
+class IntDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ */
+ private $labels;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ */
+ protected $value = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ */
+ private $exemplars;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that uniquely identify this timeseries.
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $value
+ * value itself.
+ * @type \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * value itself.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntExemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php
new file mode 100644
index 000000000..319c0ff27
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntExemplar.php
@@ -0,0 +1,235 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntExemplar is deprecated. Use Exemplar with as_int for value
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntExemplar</code>
+ */
+class IntExemplar extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ */
+ private $filtered_labels;
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ */
+ protected $value = 0;
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ */
+ protected $span_id = '';
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ */
+ protected $trace_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $filtered_labels
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $value
+ * Numerical int value of the measurement that was recorded.
+ * @type string $span_id
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * @type string $trace_id
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getFilteredLabels()
+ {
+ return $this->filtered_labels;
+ }
+
+ /**
+ * The set of labels that were filtered out by the aggregator, but recorded
+ * alongside the original measurement. Only labels that were filtered out
+ * by the aggregator should be included
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setFilteredLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->filtered_labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the exact time when this exemplar was recorded
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ * @return int|string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Numerical int value of the measurement that was recorded.
+ *
+ * Generated from protobuf field <code>sfixed64 value = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * (Optional) Span ID of the exemplar trace.
+ * span_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * (Optional) Trace ID of the exemplar trace.
+ * trace_id may be missing if the measurement is not recorded inside a trace
+ * or if the trace is not sampled.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php
new file mode 100644
index 000000000..37fece6dd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntGauge.php
@@ -0,0 +1,60 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntGauge is deprecated. Use Gauge with an integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntGauge</code>
+ */
+class IntGauge extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php
new file mode 100644
index 000000000..934649310
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogram.php
@@ -0,0 +1,99 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntHistogram is deprecated, replaced by Histogram points using double-
+ * valued exemplars.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntHistogram</code>
+ */
+class IntHistogram extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntHistogramDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntHistogramDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php
new file mode 100644
index 000000000..cf0e4898b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntHistogramDataPoint.php
@@ -0,0 +1,393 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntHistogramDataPoint is deprecated; use HistogramDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntHistogramDataPoint</code>
+ */
+class IntHistogramDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ */
+ private $labels;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ */
+ protected $sum = 0;
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ */
+ private $bucket_counts;
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ */
+ private $explicit_bounds;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ */
+ private $exemplars;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $labels
+ * The set of labels that uniquely identify this timeseries.
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ * @type int|string $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ * @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $bucket_counts
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ * @type float[]|\Google\Protobuf\Internal\RepeatedField $explicit_bounds
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ * @type \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * The set of labels that uniquely identify this timeseries.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.StringKeyValue labels = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\StringKeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\StringKeyValue::class);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative. This
+ * value must be equal to the sum of the "count" fields in buckets if a
+ * histogram is provided.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ * @return int|string
+ */
+ public function getSum()
+ {
+ return $this->sum;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero. This value must be equal to the sum of the "sum" fields in
+ * buckets if a histogram is provided.
+ *
+ * Generated from protobuf field <code>sfixed64 sum = 5;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getBucketCounts()
+ {
+ return $this->bucket_counts;
+ }
+
+ /**
+ * bucket_counts is an optional field contains the count values of histogram
+ * for each bucket.
+ * The sum of the bucket_counts must equal the value in the count field.
+ * The number of elements in bucket_counts array must be by one greater than
+ * the number of elements in explicit_bounds array.
+ *
+ * Generated from protobuf field <code>repeated fixed64 bucket_counts = 6;</code>
+ * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setBucketCounts($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FIXED64);
+ $this->bucket_counts = $arr;
+
+ return $this;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExplicitBounds()
+ {
+ return $this->explicit_bounds;
+ }
+
+ /**
+ * explicit_bounds specifies buckets with explicitly defined bounds for values.
+ * The boundaries for bucket at index i are:
+ * (-infinity, explicit_bounds[i]] for i == 0
+ * (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
+ * (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
+ * The values in the explicit_bounds array must be strictly increasing.
+ * Histogram buckets are inclusive of their upper boundary, except the last
+ * bucket where the boundary is at infinity. This format is intentionally
+ * compatible with the OpenMetrics histogram definition.
+ *
+ * Generated from protobuf field <code>repeated double explicit_bounds = 7;</code>
+ * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExplicitBounds($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
+ $this->explicit_bounds = $arr;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntExemplar exemplars = 8;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntExemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntExemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php
new file mode 100644
index 000000000..aaa313d7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/IntSum.php
@@ -0,0 +1,132 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * IntSum is deprecated. Use Sum with an integer value in NumberDataPoint.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.IntSum</code>
+ */
+class IntSum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ */
+ protected $is_monotonic = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * @type bool $is_monotonic
+ * If "true" means that the sum is monotonic.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.IntDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\IntDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\IntDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @return bool
+ */
+ public function getIsMonotonic()
+ {
+ return $this->is_monotonic;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsMonotonic($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_monotonic = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php
new file mode 100644
index 000000000..3d2538314
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Metric.php
@@ -0,0 +1,358 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Defines a Metric which has one or more timeseries. The following is a
+ * brief summary of the Metric data model. For more details, see:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
+ * The data model and relation between entities is shown in the
+ * diagram below. Here, "DataPoint" is the term used to refer to any
+ * one of the specific data point value types, and "points" is the term used
+ * to refer to any one of the lists of points contained in the Metric.
+ * - Metric is composed of a metadata and data.
+ * - Metadata part contains a name, description, unit.
+ * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
+ * - DataPoint contains timestamps, attributes, and one of the possible value type
+ * fields.
+ * Metric
+ * +------------+
+ * |name |
+ * |description |
+ * |unit | +------------------------------------+
+ * |data |---> |Gauge, Sum, Histogram, Summary, ... |
+ * +------------+ +------------------------------------+
+ * Data [One of Gauge, Sum, Histogram, Summary, ...]
+ * +-----------+
+ * |... | // Metadata about the Data.
+ * |points |--+
+ * +-----------+ |
+ * | +---------------------------+
+ * | |DataPoint 1 |
+ * v |+------+------+ +------+ |
+ * +-----+ ||label |label |...|label | |
+ * | 1 |-->||value1|value2|...|valueN| |
+ * +-----+ |+------+------+ +------+ |
+ * | . | |+-----+ |
+ * | . | ||value| |
+ * | . | |+-----+ |
+ * | . | +---------------------------+
+ * | . | .
+ * | . | .
+ * | . | .
+ * | . | +---------------------------+
+ * | . | |DataPoint M |
+ * +-----+ |+------+------+ +------+ |
+ * | M |-->||label |label |...|label | |
+ * +-----+ ||value1|value2|...|valueN| |
+ * |+------+------+ +------+ |
+ * |+-----+ |
+ * ||value| |
+ * |+-----+ |
+ * +---------------------------+
+ * Each distinct type of DataPoint represents the output of a specific
+ * aggregation function, the result of applying the DataPoint's
+ * associated function of to one or more measurements.
+ * All DataPoint types have three common fields:
+ * - Attributes includes key-value pairs associated with the data point
+ * - TimeUnixNano is required, set to the end time of the aggregation
+ * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
+ * having an AggregationTemporality field, as discussed below.
+ * Both TimeUnixNano and StartTimeUnixNano values are expressed as
+ * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * # TimeUnixNano
+ * This field is required, having consistent interpretation across
+ * DataPoint types. TimeUnixNano is the moment corresponding to when
+ * the data point's aggregate value was captured.
+ * Data points with the 0 value for TimeUnixNano SHOULD be rejected
+ * by consumers.
+ * # StartTimeUnixNano
+ * StartTimeUnixNano in general allows detecting when a sequence of
+ * observations is unbroken. This field indicates to consumers the
+ * start time for points with cumulative and delta
+ * AggregationTemporality, and it should be included whenever possible
+ * to support correct rate calculation. Although it may be omitted
+ * when the start time is truly unknown, setting StartTimeUnixNano is
+ * strongly encouraged.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Metric</code>
+ */
+class Metric extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ */
+ protected $name = '';
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ */
+ protected $description = '';
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ */
+ protected $unit = '';
+ protected $data;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * name of the metric, including its DNS name prefix. It must be unique.
+ * @type string $description
+ * description of the metric, which can be used in documentation.
+ * @type string $unit
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ * @type \Opentelemetry\Proto\Metrics\V1\Gauge $gauge
+ * @type \Opentelemetry\Proto\Metrics\V1\Sum $sum
+ * @type \Opentelemetry\Proto\Metrics\V1\Histogram $histogram
+ * @type \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram $exponential_histogram
+ * @type \Opentelemetry\Proto\Metrics\V1\Summary $summary
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * name of the metric, including its DNS name prefix. It must be unique.
+ *
+ * Generated from protobuf field <code>string name = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * description of the metric, which can be used in documentation.
+ *
+ * Generated from protobuf field <code>string description = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setDescription($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->description = $var;
+
+ return $this;
+ }
+
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ * @return string
+ */
+ public function getUnit()
+ {
+ return $this->unit;
+ }
+
+ /**
+ * unit in which the metric value is reported. Follows the format
+ * described by http://unitsofmeasure.org/ucum.html.
+ *
+ * Generated from protobuf field <code>string unit = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setUnit($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->unit = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Gauge gauge = 5;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Gauge|null
+ */
+ public function getGauge()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasGauge()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Gauge gauge = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Gauge $var
+ * @return $this
+ */
+ public function setGauge($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Gauge::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Sum sum = 7;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Sum|null
+ */
+ public function getSum()
+ {
+ return $this->readOneof(7);
+ }
+
+ public function hasSum()
+ {
+ return $this->hasOneof(7);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Sum sum = 7;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Sum $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Sum::class);
+ $this->writeOneof(7, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Histogram histogram = 9;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Histogram|null
+ */
+ public function getHistogram()
+ {
+ return $this->readOneof(9);
+ }
+
+ public function hasHistogram()
+ {
+ return $this->hasOneof(9);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Histogram histogram = 9;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Histogram $var
+ * @return $this
+ */
+ public function setHistogram($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Histogram::class);
+ $this->writeOneof(9, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram|null
+ */
+ public function getExponentialHistogram()
+ {
+ return $this->readOneof(10);
+ }
+
+ public function hasExponentialHistogram()
+ {
+ return $this->hasOneof(10);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram $var
+ * @return $this
+ */
+ public function setExponentialHistogram($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\ExponentialHistogram::class);
+ $this->writeOneof(10, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Summary summary = 11;</code>
+ * @return \Opentelemetry\Proto\Metrics\V1\Summary|null
+ */
+ public function getSummary()
+ {
+ return $this->readOneof(11);
+ }
+
+ public function hasSummary()
+ {
+ return $this->hasOneof(11);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.Summary summary = 11;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Summary $var
+ * @return $this
+ */
+ public function setSummary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Metrics\V1\Summary::class);
+ $this->writeOneof(11, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getData()
+ {
+ return $this->whichOneof("data");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php
new file mode 100644
index 000000000..ce144d8f3
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/MetricsData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * MetricsData represents the metrics data that can be stored in a persistent
+ * storage, OR can be embedded by other protocols that transfer OTLP metrics
+ * data but do not implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.MetricsData</code>
+ */
+class MetricsData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ */
+ private $resource_metrics;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $resource_metrics
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceMetrics()
+ {
+ return $this->resource_metrics;
+ }
+
+ /**
+ * An array of ResourceMetrics.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ResourceMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ResourceMetrics::class);
+ $this->resource_metrics = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php
new file mode 100644
index 000000000..d9fa829e0
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/NumberDataPoint.php
@@ -0,0 +1,309 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * NumberDataPoint is a single data point in a timeseries that describes the
+ * time-varying scalar value of a metric.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.NumberDataPoint</code>
+ */
+class NumberDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ */
+ private $exemplars;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ */
+ protected $flags = 0;
+ protected $value;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type float $as_double
+ * @type int|string $as_int
+ * @type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 4;</code>
+ * @return float
+ */
+ public function getAsDouble()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasAsDouble()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Generated from protobuf field <code>double as_double = 4;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setAsDouble($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @return int|string
+ */
+ public function getAsInt()
+ {
+ return $this->readOneof(6);
+ }
+
+ public function hasAsInt()
+ {
+ return $this->hasOneof(6);
+ }
+
+ /**
+ * Generated from protobuf field <code>sfixed64 as_int = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setAsInt($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->writeOneof(6, $var);
+
+ return $this;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExemplars()
+ {
+ return $this->exemplars;
+ }
+
+ /**
+ * (Optional) List of exemplars collected from
+ * measurements that were used to form the data point
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExemplars($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Exemplar::class);
+ $this->exemplars = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->whichOneof("value");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php
new file mode 100644
index 000000000..a5e2a7b0d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ResourceMetrics.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeMetrics from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ResourceMetrics</code>
+ */
+class ResourceMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ */
+ private $scope_metrics;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ * @type \Opentelemetry\Proto\Metrics\V1\ScopeMetrics[]|\Google\Protobuf\Internal\RepeatedField $scope_metrics
+ * A list of metrics that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the metrics in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeMetrics()
+ {
+ return $this->scope_metrics;
+ }
+
+ /**
+ * A list of metrics that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\ScopeMetrics[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\ScopeMetrics::class);
+ $this->scope_metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_metrics" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php
new file mode 100644
index 000000000..71f5cdb86
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/ScopeMetrics.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Metrics produced by an Scope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.ScopeMetrics</code>
+ */
+class ScopeMetrics extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ */
+ private $metrics;
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $metrics
+ * A list of metrics that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all metrics in the "metrics" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the metrics in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMetrics()
+ {
+ return $this->metrics;
+ }
+
+ /**
+ * A list of metrics that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\Metric[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMetrics($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\Metric::class);
+ $this->metrics = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all metrics in the "metrics" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php
new file mode 100644
index 000000000..0251ecd9f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Sum.php
@@ -0,0 +1,133 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sum represents the type of a scalar metric that is calculated as a sum of all
+ * reported measurements over a time interval.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Sum</code>
+ */
+class Sum extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ */
+ protected $aggregation_temporality = 0;
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ */
+ protected $is_monotonic = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * @type int $aggregation_temporality
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ * @type bool $is_monotonic
+ * If "true" means that the sum is monotonic.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.NumberDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\NumberDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\NumberDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @return int
+ */
+ public function getAggregationTemporality()
+ {
+ return $this->aggregation_temporality;
+ }
+
+ /**
+ * aggregation_temporality describes if the aggregator reports delta changes
+ * since last report time, or cumulative changes since a fixed start time.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.metrics.v1.AggregationTemporality aggregation_temporality = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setAggregationTemporality($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Metrics\V1\AggregationTemporality::class);
+ $this->aggregation_temporality = $var;
+
+ return $this;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @return bool
+ */
+ public function getIsMonotonic()
+ {
+ return $this->is_monotonic;
+ }
+
+ /**
+ * If "true" means that the sum is monotonic.
+ *
+ * Generated from protobuf field <code>bool is_monotonic = 3;</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setIsMonotonic($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->is_monotonic = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php
new file mode 100644
index 000000000..adb5eceb9
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/Summary.php
@@ -0,0 +1,65 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Summary metric data are used to convey quantile summaries,
+ * a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
+ * and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
+ * data type. These data points cannot always be merged in a meaningful way.
+ * While they can be useful in some applications, histogram data points are
+ * recommended for new applications.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.Summary</code>
+ */
+class Summary extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ */
+ private $data_points;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint[]|\Google\Protobuf\Internal\RepeatedField $data_points
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDataPoints()
+ {
+ return $this->data_points;
+ }
+
+ /**
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint data_points = 1;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDataPoints($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint::class);
+ $this->data_points = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php
new file mode 100644
index 000000000..30cf4ade4
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint.php
@@ -0,0 +1,336 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * SummaryDataPoint is a single data point in a timeseries that describes the
+ * time-varying values of a Summary metric.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.SummaryDataPoint</code>
+ */
+class SummaryDataPoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ */
+ private $attributes;
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ */
+ protected $count = 0;
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ */
+ protected $sum = 0.0;
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ */
+ private $quantile_values;
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ */
+ protected $flags = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int|string $start_time_unix_nano
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $time_unix_nano
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ * @type int|string $count
+ * count is the number of values in the population. Must be non-negative.
+ * @type float $sum
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ * @type \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile[]|\Google\Protobuf\Internal\RepeatedField $quantile_values
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ * @type int $flags
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * The set of key/value pairs that uniquely identify the timeseries from
+ * where this point belongs. The list may be empty (may contain 0 elements).
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * StartTimeUnixNano is optional but strongly encouraged, see the
+ * the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 2;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * TimeUnixNano is required, see the detailed comments above Metric.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
+ * 1970.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 3;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @return int|string
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * count is the number of values in the population. Must be non-negative.
+ *
+ * Generated from protobuf field <code>fixed64 count = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setCount($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->count = $var;
+
+ return $this;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ * @return float
+ */
+ public function getSum()
+ {
+ return $this->sum;
+ }
+
+ /**
+ * sum of the values in the population. If count is zero then this field
+ * must be zero.
+ * Note: Sum should only be filled out when measuring non-negative discrete
+ * events, and is assumed to be monotonic over the values of these events.
+ * Negative events *can* be recorded, but sum should not be filled out when
+ * doing so. This is specifically to enforce compatibility w/ OpenMetrics,
+ * see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
+ *
+ * Generated from protobuf field <code>double sum = 5;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSum($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->sum = $var;
+
+ return $this;
+ }
+
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getQuantileValues()
+ {
+ return $this->quantile_values;
+ }
+
+ /**
+ * (Optional) list of values at different quantiles of the distribution calculated
+ * from the current snapshot. The quantiles must be strictly increasing.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile quantile_values = 6;</code>
+ * @param \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setQuantileValues($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile::class);
+ $this->quantile_values = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @return int
+ */
+ public function getFlags()
+ {
+ return $this->flags;
+ }
+
+ /**
+ * Flags that apply to this specific data point. See DataPointFlags
+ * for the available flags and their meaning.
+ *
+ * Generated from protobuf field <code>uint32 flags = 8;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setFlags($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->flags = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php
new file mode 100644
index 000000000..8200b6d26
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint/ValueAtQuantile.php
@@ -0,0 +1,117 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1\SummaryDataPoint;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Represents the value at a given quantile of a distribution.
+ * To record Min and Max values following conventions are used:
+ * - The 1.0 quantile is equivalent to the maximum value observed.
+ * - The 0.0 quantile is equivalent to the minimum value observed.
+ * See the following issue for more context:
+ * https://github.com/open-telemetry/opentelemetry-proto/issues/125
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile</code>
+ */
+class ValueAtQuantile extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ */
+ protected $quantile = 0.0;
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ */
+ protected $value = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $quantile
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ * @type float $value
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Metrics\V1\Metrics::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ * @return float
+ */
+ public function getQuantile()
+ {
+ return $this->quantile;
+ }
+
+ /**
+ * The quantile of a distribution. Must be in the interval
+ * [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double quantile = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setQuantile($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->quantile = $var;
+
+ return $this;
+ }
+
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ * @return float
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * The value at the given quantile of a distribution.
+ * Quantile values must NOT be negative.
+ *
+ * Generated from protobuf field <code>double value = 2;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setValue($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->value = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ValueAtQuantile::class, \Opentelemetry\Proto\Metrics\V1\SummaryDataPoint_ValueAtQuantile::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php
new file mode 100644
index 000000000..c1f41e749
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Metrics/V1/SummaryDataPoint_ValueAtQuantile.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/metrics/v1/metrics.proto
+
+namespace Opentelemetry\Proto\Metrics\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile instead.
+ * @deprecated
+ */
+ class SummaryDataPoint_ValueAtQuantile {}
+}
+class_exists(SummaryDataPoint\ValueAtQuantile::class);
+@trigger_error('Opentelemetry\Proto\Metrics\V1\SummaryDataPoint_ValueAtQuantile is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Metrics\V1\SummaryDataPoint\ValueAtQuantile instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php
new file mode 100644
index 000000000..d9062eeb1
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Resource/V1/Resource.php
@@ -0,0 +1,113 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/resource/v1/resource.proto
+
+namespace Opentelemetry\Proto\Resource\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Resource information.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.resource.v1.Resource</code>
+ */
+class Resource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Resource\V1\Resource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * Set of attributes that describe the resource.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ * no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 2;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php
new file mode 100644
index 000000000..c21482623
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler.php
@@ -0,0 +1,60 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that always makes a constant decision on span sampling.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ConstantSampler</code>
+ */
+class ConstantSampler extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ */
+ protected $decision = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $decision
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ * @return int
+ */
+ public function getDecision()
+ {
+ return $this->decision;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision decision = 1;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDecision($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision::class);
+ $this->decision = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php
new file mode 100644
index 000000000..04c1950ca
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler/ConstantDecision.php
@@ -0,0 +1,61 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1\ConstantSampler;
+
+use UnexpectedValueException;
+
+/**
+ * How spans should be sampled:
+ * - Always off
+ * - Always on
+ * - Always follow the parent Span's decision (off if no parent).
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.ConstantSampler.ConstantDecision</code>
+ */
+class ConstantDecision
+{
+ /**
+ * Generated from protobuf enum <code>ALWAYS_OFF = 0;</code>
+ */
+ const ALWAYS_OFF = 0;
+ /**
+ * Generated from protobuf enum <code>ALWAYS_ON = 1;</code>
+ */
+ const ALWAYS_ON = 1;
+ /**
+ * Generated from protobuf enum <code>ALWAYS_PARENT = 2;</code>
+ */
+ const ALWAYS_PARENT = 2;
+
+ private static $valueToName = [
+ self::ALWAYS_OFF => 'ALWAYS_OFF',
+ self::ALWAYS_ON => 'ALWAYS_ON',
+ self::ALWAYS_PARENT => 'ALWAYS_PARENT',
+ ];
+
+ 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(ConstantDecision::class, \Opentelemetry\Proto\Trace\V1\ConstantSampler_ConstantDecision::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php
new file mode 100644
index 000000000..e252f5f4b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ConstantSampler_ConstantDecision.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision instead.
+ * @deprecated
+ */
+ class ConstantSampler_ConstantDecision {}
+}
+class_exists(ConstantSampler\ConstantDecision::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\ConstantSampler_ConstantDecision is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\ConstantSampler\ConstantDecision instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php
new file mode 100644
index 000000000..c5cc122e7
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/InstrumentationLibrarySpans.php
@@ -0,0 +1,156 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Spans produced by an InstrumentationLibrary.
+ * InstrumentationLibrarySpans is wire-compatible with ScopeSpans for binary
+ * Protobuf format.
+ * This message is deprecated and will be removed on June 15, 2022.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.InstrumentationLibrarySpans</code>
+ */
+class InstrumentationLibrarySpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ */
+ protected $instrumentation_library = null;
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ */
+ private $spans;
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $instrumentation_library
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ * @type \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $spans
+ * A list of Spans that originate from an instrumentation library.
+ * @type string $schema_url
+ * This schema_url applies to all spans and span events in the "spans" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationLibrary|null
+ */
+ public function getInstrumentationLibrary()
+ {
+ return $this->instrumentation_library;
+ }
+
+ public function hasInstrumentationLibrary()
+ {
+ return isset($this->instrumentation_library);
+ }
+
+ public function clearInstrumentationLibrary()
+ {
+ unset($this->instrumentation_library);
+ }
+
+ /**
+ * The instrumentation library information for the spans in this message.
+ * Semantically when InstrumentationLibrary isn't set, it is equivalent with
+ * an empty instrumentation library name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationLibrary $var
+ * @return $this
+ */
+ public function setInstrumentationLibrary($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationLibrary::class);
+ $this->instrumentation_library = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSpans()
+ {
+ return $this->spans;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation library.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span::class);
+ $this->spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php
new file mode 100644
index 000000000..3fd17fb01
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/RateLimitingSampler.php
@@ -0,0 +1,67 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that tries to sample with a rate per time window.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.RateLimitingSampler</code>
+ */
+class RateLimitingSampler extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ */
+ protected $qps = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $qps
+ * Rate per second.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ * @return int|string
+ */
+ public function getQps()
+ {
+ return $this->qps;
+ }
+
+ /**
+ * Rate per second.
+ *
+ * Generated from protobuf field <code>int64 qps = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setQps($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->qps = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php
new file mode 100644
index 000000000..521250920
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ResourceSpans.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of ScopeSpans from a Resource.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ResourceSpans</code>
+ */
+class ResourceSpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ */
+ protected $resource = null;
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ */
+ private $scope_spans;
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Resource\V1\Resource $resource
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ * @type \Opentelemetry\Proto\Trace\V1\ScopeSpans[]|\Google\Protobuf\Internal\RepeatedField $scope_spans
+ * A list of ScopeSpans that originate from a resource.
+ * @type string $schema_url
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @return \Opentelemetry\Proto\Resource\V1\Resource|null
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ public function hasResource()
+ {
+ return isset($this->resource);
+ }
+
+ public function clearResource()
+ {
+ unset($this->resource);
+ }
+
+ /**
+ * The resource for the spans in this message.
+ * If this field is not set then no resource info is known.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.resource.v1.Resource resource = 1;</code>
+ * @param \Opentelemetry\Proto\Resource\V1\Resource $var
+ * @return $this
+ */
+ public function setResource($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Resource\V1\Resource::class);
+ $this->resource = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getScopeSpans()
+ {
+ return $this->scope_spans;
+ }
+
+ /**
+ * A list of ScopeSpans that originate from a resource.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ScopeSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setScopeSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ScopeSpans::class);
+ $this->scope_spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to the data in the "resource" field. It does not apply
+ * to the data in the "scope_spans" field which have their own schema_url field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php
new file mode 100644
index 000000000..098376f7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/ScopeSpans.php
@@ -0,0 +1,153 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A collection of Spans produced by an InstrumentationScope.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.ScopeSpans</code>
+ */
+class ScopeSpans extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ */
+ protected $scope = null;
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ */
+ private $spans;
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ */
+ protected $schema_url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Common\V1\InstrumentationScope $scope
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ * @type \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $spans
+ * A list of Spans that originate from an instrumentation scope.
+ * @type string $schema_url
+ * This schema_url applies to all spans and span events in the "spans" field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @return \Opentelemetry\Proto\Common\V1\InstrumentationScope|null
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ public function hasScope()
+ {
+ return isset($this->scope);
+ }
+
+ public function clearScope()
+ {
+ unset($this->scope);
+ }
+
+ /**
+ * The instrumentation scope information for the spans in this message.
+ * Semantically when InstrumentationScope isn't set, it is equivalent with
+ * an empty instrumentation scope name (unknown).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.common.v1.InstrumentationScope scope = 1;</code>
+ * @param \Opentelemetry\Proto\Common\V1\InstrumentationScope $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Common\V1\InstrumentationScope::class);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getSpans()
+ {
+ return $this->spans;
+ }
+
+ /**
+ * A list of Spans that originate from an instrumentation scope.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span spans = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span::class);
+ $this->spans = $arr;
+
+ return $this;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @return string
+ */
+ public function getSchemaUrl()
+ {
+ return $this->schema_url;
+ }
+
+ /**
+ * This schema_url applies to all spans and span events in the "spans" field.
+ *
+ * Generated from protobuf field <code>string schema_url = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php
new file mode 100644
index 000000000..4b1dc138c
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span.php
@@ -0,0 +1,726 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A Span represents a single operation performed by a single component of the system.
+ * The next available field id is 17.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span</code>
+ */
+class Span extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ */
+ protected $span_id = '';
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ */
+ protected $trace_state = '';
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ */
+ protected $parent_span_id = '';
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ */
+ protected $name = '';
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ */
+ protected $kind = 0;
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ */
+ protected $start_time_unix_nano = 0;
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ */
+ protected $end_time_unix_nano = 0;
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ */
+ protected $dropped_attributes_count = 0;
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ */
+ private $events;
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ */
+ protected $dropped_events_count = 0;
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ */
+ private $links;
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ */
+ protected $dropped_links_count = 0;
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ */
+ protected $status = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trace_id
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ * @type string $span_id
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ * @type string $trace_state
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ * @type string $parent_span_id
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ * @type string $name
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ * @type int $kind
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ * @type int|string $start_time_unix_nano
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ * @type int|string $end_time_unix_nano
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $events
+ * events is a collection of Event items.
+ * @type int $dropped_events_count
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $links
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ * @type int $dropped_links_count
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ * @type \Opentelemetry\Proto\Trace\V1\Status $status
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier for a trace. All spans from the same trace share
+ * the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for a span within a trace, assigned when the span
+ * is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ * other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ * is zero-length and thus is also invalid).
+ * This field is required.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @return string
+ */
+ public function getTraceState()
+ {
+ return $this->trace_state;
+ }
+
+ /**
+ * trace_state conveys information about request position in multiple distributed tracing graphs.
+ * It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ * See also https://github.com/w3c/distributed-tracing for more details about this field.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceState($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trace_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ * @return string
+ */
+ public function getParentSpanId()
+ {
+ return $this->parent_span_id;
+ }
+
+ /**
+ * The `span_id` of this span's parent span. If this is a root span, then this
+ * field must be empty. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes parent_span_id = 4;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setParentSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->parent_span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * A description of the span's operation.
+ * For example, the name can be a qualified method name or a file name
+ * and a line number where the operation is called. A best practice is to use
+ * the same display name at the same call point in an application.
+ * This makes it easier to correlate spans in different traces.
+ * This field is semantically required to be set to non-empty string.
+ * Empty value is equivalent to an unknown span name.
+ * This field is required.
+ *
+ * Generated from protobuf field <code>string name = 5;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ * @return int
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+
+ /**
+ * Distinguishes between spans generated in a particular context. For example,
+ * two spans with the same name may be distinguished using `CLIENT` (caller)
+ * and `SERVER` (callee) to identify queueing latency associated with the span.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Span.SpanKind kind = 6;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setKind($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\Span\SpanKind::class);
+ $this->kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ * @return int|string
+ */
+ public function getStartTimeUnixNano()
+ {
+ return $this->start_time_unix_nano;
+ }
+
+ /**
+ * start_time_unix_nano is the start time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution starts. On the server side, this
+ * is the time when the server's application handler starts running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 start_time_unix_nano = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setStartTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->start_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ * @return int|string
+ */
+ public function getEndTimeUnixNano()
+ {
+ return $this->end_time_unix_nano;
+ }
+
+ /**
+ * end_time_unix_nano is the end time of the span. On the client side, this is the time
+ * kept by the local machine where the span execution ends. On the server side, this
+ * is the time when the server application handler stops running.
+ * Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ * This field is semantically required and it is expected that end_time >= start_time.
+ *
+ * Generated from protobuf field <code>fixed64 end_time_unix_nano = 8;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setEndTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->end_time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of key/value pairs. Note, global attributes
+ * like server name can be set using the resource API. Examples of attributes:
+ * "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ * "/http/server_latency": 300
+ * "example.com/myattribute": true
+ * "example.com/score": 10.239
+ * The OpenTelemetry API specification further restricts the allowed value types:
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 9;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of attributes that were discarded. Attributes
+ * can be discarded because their keys are too long or because there are too many
+ * attributes. If this value is 0, then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 10;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEvents()
+ {
+ return $this->events;
+ }
+
+ /**
+ * events is a collection of Event items.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Event events = 11;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span\Event[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEvents($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Event::class);
+ $this->events = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ * @return int
+ */
+ public function getDroppedEventsCount()
+ {
+ return $this->dropped_events_count;
+ }
+
+ /**
+ * dropped_events_count is the number of dropped events. If the value is 0, then no
+ * events were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_events_count = 12;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedEventsCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_events_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getLinks()
+ {
+ return $this->links;
+ }
+
+ /**
+ * links is a collection of Links, which are references from this span to a span
+ * in the same or different trace.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.Span.Link links = 13;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Span\Link[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setLinks($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\Span\Link::class);
+ $this->links = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ * @return int
+ */
+ public function getDroppedLinksCount()
+ {
+ return $this->dropped_links_count;
+ }
+
+ /**
+ * dropped_links_count is the number of dropped links after the maximum size was
+ * enforced. If this value is 0, then no links were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_links_count = 14;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedLinksCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_links_count = $var;
+
+ return $this;
+ }
+
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\Status|null
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+ public function hasStatus()
+ {
+ return isset($this->status);
+ }
+
+ public function clearStatus()
+ {
+ unset($this->status);
+ }
+
+ /**
+ * An optional final status for this span. Semantically when Status isn't set, it means
+ * span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status status = 15;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\Status $var
+ * @return $this
+ */
+ public function setStatus($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\Status::class);
+ $this->status = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php
new file mode 100644
index 000000000..c6b7a1807
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php
@@ -0,0 +1,189 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Event is a time-stamped annotation of the span, consisting of user-supplied
+ * text description and key-value pairs.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Event</code>
+ */
+class Event extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ */
+ protected $time_unix_nano = 0;
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ */
+ protected $name = '';
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $time_unix_nano
+ * time_unix_nano is the time the event occurred.
+ * @type string $name
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @return int|string
+ */
+ public function getTimeUnixNano()
+ {
+ return $this->time_unix_nano;
+ }
+
+ /**
+ * time_unix_nano is the time the event occurred.
+ *
+ * Generated from protobuf field <code>fixed64 time_unix_nano = 1;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setTimeUnixNano($var)
+ {
+ GPBUtil::checkUint64($var);
+ $this->time_unix_nano = $var;
+
+ return $this;
+ }
+
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * name of the event.
+ * This field is semantically required to be set to non-empty string.
+ *
+ * Generated from protobuf field <code>string name = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the event.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 4;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Event::class, \Opentelemetry\Proto\Trace\V1\Span_Event::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php
new file mode 100644
index 000000000..3096739de
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php
@@ -0,0 +1,225 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * A pointer from the current span to another span in the same trace or in a
+ * different trace. For example, this can be used in batching operations,
+ * where a single batch handler processes multiple requests from different
+ * traces or when the handler receives a request from a different project.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Span.Link</code>
+ */
+class Link extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ */
+ protected $trace_id = '';
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ */
+ protected $span_id = '';
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ */
+ protected $trace_state = '';
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ */
+ private $attributes;
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ */
+ protected $dropped_attributes_count = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $trace_id
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ * @type string $span_id
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ * @type string $trace_state
+ * The trace_state associated with the link.
+ * @type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ * @type int $dropped_attributes_count
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @return string
+ */
+ public function getTraceId()
+ {
+ return $this->trace_id;
+ }
+
+ /**
+ * A unique identifier of a trace that this linked span is part of. The ID is a
+ * 16-byte array.
+ *
+ * Generated from protobuf field <code>bytes trace_id = 1;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->trace_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @return string
+ */
+ public function getSpanId()
+ {
+ return $this->span_id;
+ }
+
+ /**
+ * A unique identifier for the linked span. The ID is an 8-byte array.
+ *
+ * Generated from protobuf field <code>bytes span_id = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setSpanId($var)
+ {
+ GPBUtil::checkString($var, False);
+ $this->span_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @return string
+ */
+ public function getTraceState()
+ {
+ return $this->trace_state;
+ }
+
+ /**
+ * The trace_state associated with the link.
+ *
+ * Generated from protobuf field <code>string trace_state = 3;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setTraceState($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->trace_state = $var;
+
+ return $this;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * attributes is a collection of attribute key/value pairs on the link.
+ * Attribute keys MUST be unique (it is not allowed to have more than one
+ * attribute with the same key).
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.common.v1.KeyValue attributes = 4;</code>
+ * @param \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setAttributes($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Common\V1\KeyValue::class);
+ $this->attributes = $arr;
+
+ return $this;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ * @return int
+ */
+ public function getDroppedAttributesCount()
+ {
+ return $this->dropped_attributes_count;
+ }
+
+ /**
+ * dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ * then no attributes were dropped.
+ *
+ * Generated from protobuf field <code>uint32 dropped_attributes_count = 5;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setDroppedAttributesCount($var)
+ {
+ GPBUtil::checkUint32($var);
+ $this->dropped_attributes_count = $var;
+
+ return $this;
+ }
+
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Link::class, \Opentelemetry\Proto\Trace\V1\Span_Link::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php
new file mode 100644
index 000000000..9ffa93719
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/SpanKind.php
@@ -0,0 +1,94 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Span;
+
+use UnexpectedValueException;
+
+/**
+ * SpanKind is the type of span. Can be used to specify additional relationships between spans
+ * in addition to a parent/child relationship.
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Span.SpanKind</code>
+ */
+class SpanKind
+{
+ /**
+ * Unspecified. Do NOT use as default.
+ * Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_UNSPECIFIED = 0;</code>
+ */
+ const SPAN_KIND_UNSPECIFIED = 0;
+ /**
+ * Indicates that the span represents an internal operation within an application,
+ * as opposed to an operation happening at the boundaries. Default value.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_INTERNAL = 1;</code>
+ */
+ const SPAN_KIND_INTERNAL = 1;
+ /**
+ * Indicates that the span covers server-side handling of an RPC or other
+ * remote network request.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_SERVER = 2;</code>
+ */
+ const SPAN_KIND_SERVER = 2;
+ /**
+ * Indicates that the span describes a request to some remote service.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_CLIENT = 3;</code>
+ */
+ const SPAN_KIND_CLIENT = 3;
+ /**
+ * Indicates that the span describes a producer sending a message to a broker.
+ * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
+ * between producer and consumer spans. A PRODUCER span ends when the message was accepted
+ * by the broker while the logical processing of the message might span a much longer time.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_PRODUCER = 4;</code>
+ */
+ const SPAN_KIND_PRODUCER = 4;
+ /**
+ * Indicates that the span describes consumer receiving a message from a broker.
+ * Like the PRODUCER kind, there is often no direct critical path latency relationship
+ * between producer and consumer spans.
+ *
+ * Generated from protobuf enum <code>SPAN_KIND_CONSUMER = 5;</code>
+ */
+ const SPAN_KIND_CONSUMER = 5;
+
+ private static $valueToName = [
+ self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED',
+ self::SPAN_KIND_INTERNAL => 'SPAN_KIND_INTERNAL',
+ self::SPAN_KIND_SERVER => 'SPAN_KIND_SERVER',
+ self::SPAN_KIND_CLIENT => 'SPAN_KIND_CLIENT',
+ self::SPAN_KIND_PRODUCER => 'SPAN_KIND_PRODUCER',
+ self::SPAN_KIND_CONSUMER => 'SPAN_KIND_CONSUMER',
+ ];
+
+ 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(SpanKind::class, \Opentelemetry\Proto\Trace\V1\Span_SpanKind::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php
new file mode 100644
index 000000000..168b7b129
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Event.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\Event instead.
+ * @deprecated
+ */
+ class Span_Event {}
+}
+class_exists(Span\Event::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_Event is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\Event instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php
new file mode 100644
index 000000000..311e4023f
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_Link.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\Link instead.
+ * @deprecated
+ */
+ class Span_Link {}
+}
+class_exists(Span\Link::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_Link is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\Link instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php
new file mode 100644
index 000000000..d517c72fd
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span_SpanKind.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Span\SpanKind instead.
+ * @deprecated
+ */
+ class Span_SpanKind {}
+}
+class_exists(Span\SpanKind::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Span_SpanKind is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Span\SpanKind instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php
new file mode 100644
index 000000000..5fee7292e
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status.php
@@ -0,0 +1,102 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * The Status type defines a logical error model that is suitable for different
+ * programming environments, including REST APIs and RPC APIs.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.Status</code>
+ */
+class Status extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ */
+ protected $message = '';
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ */
+ protected $code = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $message
+ * A developer-facing human readable error message.
+ * @type int $code
+ * The status code.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ /**
+ * A developer-facing human readable error message.
+ *
+ * Generated from protobuf field <code>string message = 2;</code>
+ * @param string $var
+ * @return $this
+ */
+ public function setMessage($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message = $var;
+
+ return $this;
+ }
+
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ * @return int
+ */
+ public function getCode()
+ {
+ return $this->code;
+ }
+
+ /**
+ * The status code.
+ *
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.Status.StatusCode code = 3;</code>
+ * @param int $var
+ * @return $this
+ */
+ public function setCode($var)
+ {
+ GPBUtil::checkEnum($var, \Opentelemetry\Proto\Trace\V1\Status\StatusCode::class);
+ $this->code = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php
new file mode 100644
index 000000000..9a078e2ef
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/DeprecatedStatusCode.php
@@ -0,0 +1,126 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Status;
+
+use UnexpectedValueException;
+
+/**
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Status.DeprecatedStatusCode</code>
+ */
+class DeprecatedStatusCode
+{
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_OK = 0;</code>
+ */
+ const DEPRECATED_STATUS_CODE_OK = 0;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_CANCELLED = 1;</code>
+ */
+ const DEPRECATED_STATUS_CODE_CANCELLED = 1;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNKNOWN_ERROR = 2;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNKNOWN_ERROR = 2;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_INVALID_ARGUMENT = 3;</code>
+ */
+ const DEPRECATED_STATUS_CODE_INVALID_ARGUMENT = 3;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED = 4;</code>
+ */
+ const DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED = 4;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_NOT_FOUND = 5;</code>
+ */
+ const DEPRECATED_STATUS_CODE_NOT_FOUND = 5;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_ALREADY_EXISTS = 6;</code>
+ */
+ const DEPRECATED_STATUS_CODE_ALREADY_EXISTS = 6;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_PERMISSION_DENIED = 7;</code>
+ */
+ const DEPRECATED_STATUS_CODE_PERMISSION_DENIED = 7;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED = 8;</code>
+ */
+ const DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED = 8;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_FAILED_PRECONDITION = 9;</code>
+ */
+ const DEPRECATED_STATUS_CODE_FAILED_PRECONDITION = 9;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_ABORTED = 10;</code>
+ */
+ const DEPRECATED_STATUS_CODE_ABORTED = 10;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_OUT_OF_RANGE = 11;</code>
+ */
+ const DEPRECATED_STATUS_CODE_OUT_OF_RANGE = 11;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNIMPLEMENTED = 12;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNIMPLEMENTED = 12;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_INTERNAL_ERROR = 13;</code>
+ */
+ const DEPRECATED_STATUS_CODE_INTERNAL_ERROR = 13;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNAVAILABLE = 14;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNAVAILABLE = 14;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_DATA_LOSS = 15;</code>
+ */
+ const DEPRECATED_STATUS_CODE_DATA_LOSS = 15;
+ /**
+ * Generated from protobuf enum <code>DEPRECATED_STATUS_CODE_UNAUTHENTICATED = 16;</code>
+ */
+ const DEPRECATED_STATUS_CODE_UNAUTHENTICATED = 16;
+
+ private static $valueToName = [
+ self::DEPRECATED_STATUS_CODE_OK => 'DEPRECATED_STATUS_CODE_OK',
+ self::DEPRECATED_STATUS_CODE_CANCELLED => 'DEPRECATED_STATUS_CODE_CANCELLED',
+ self::DEPRECATED_STATUS_CODE_UNKNOWN_ERROR => 'DEPRECATED_STATUS_CODE_UNKNOWN_ERROR',
+ self::DEPRECATED_STATUS_CODE_INVALID_ARGUMENT => 'DEPRECATED_STATUS_CODE_INVALID_ARGUMENT',
+ self::DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED => 'DEPRECATED_STATUS_CODE_DEADLINE_EXCEEDED',
+ self::DEPRECATED_STATUS_CODE_NOT_FOUND => 'DEPRECATED_STATUS_CODE_NOT_FOUND',
+ self::DEPRECATED_STATUS_CODE_ALREADY_EXISTS => 'DEPRECATED_STATUS_CODE_ALREADY_EXISTS',
+ self::DEPRECATED_STATUS_CODE_PERMISSION_DENIED => 'DEPRECATED_STATUS_CODE_PERMISSION_DENIED',
+ self::DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED => 'DEPRECATED_STATUS_CODE_RESOURCE_EXHAUSTED',
+ self::DEPRECATED_STATUS_CODE_FAILED_PRECONDITION => 'DEPRECATED_STATUS_CODE_FAILED_PRECONDITION',
+ self::DEPRECATED_STATUS_CODE_ABORTED => 'DEPRECATED_STATUS_CODE_ABORTED',
+ self::DEPRECATED_STATUS_CODE_OUT_OF_RANGE => 'DEPRECATED_STATUS_CODE_OUT_OF_RANGE',
+ self::DEPRECATED_STATUS_CODE_UNIMPLEMENTED => 'DEPRECATED_STATUS_CODE_UNIMPLEMENTED',
+ self::DEPRECATED_STATUS_CODE_INTERNAL_ERROR => 'DEPRECATED_STATUS_CODE_INTERNAL_ERROR',
+ self::DEPRECATED_STATUS_CODE_UNAVAILABLE => 'DEPRECATED_STATUS_CODE_UNAVAILABLE',
+ self::DEPRECATED_STATUS_CODE_DATA_LOSS => 'DEPRECATED_STATUS_CODE_DATA_LOSS',
+ self::DEPRECATED_STATUS_CODE_UNAUTHENTICATED => 'DEPRECATED_STATUS_CODE_UNAUTHENTICATED',
+ ];
+
+ 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(DeprecatedStatusCode::class, \Opentelemetry\Proto\Trace\V1\Status_DeprecatedStatusCode::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php
new file mode 100644
index 000000000..954cf1fd2
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status/StatusCode.php
@@ -0,0 +1,66 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1\Status;
+
+use UnexpectedValueException;
+
+/**
+ * For the semantics of status codes see
+ * https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
+ *
+ * Protobuf type <code>opentelemetry.proto.trace.v1.Status.StatusCode</code>
+ */
+class StatusCode
+{
+ /**
+ * The default status.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_UNSET = 0;</code>
+ */
+ const STATUS_CODE_UNSET = 0;
+ /**
+ * The Span has been validated by an Application developer or Operator to
+ * have completed successfully.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_OK = 1;</code>
+ */
+ const STATUS_CODE_OK = 1;
+ /**
+ * The Span contains an error.
+ *
+ * Generated from protobuf enum <code>STATUS_CODE_ERROR = 2;</code>
+ */
+ const STATUS_CODE_ERROR = 2;
+
+ private static $valueToName = [
+ self::STATUS_CODE_UNSET => 'STATUS_CODE_UNSET',
+ self::STATUS_CODE_OK => 'STATUS_CODE_OK',
+ self::STATUS_CODE_ERROR => 'STATUS_CODE_ERROR',
+ ];
+
+ 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(StatusCode::class, \Opentelemetry\Proto\Trace\V1\Status_StatusCode::class);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php
new file mode 100644
index 000000000..2235d5b7d
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_DeprecatedStatusCode.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Status\DeprecatedStatusCode instead.
+ * @deprecated
+ */
+ class Status_DeprecatedStatusCode {}
+}
+class_exists(Status\DeprecatedStatusCode::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Status_DeprecatedStatusCode is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Status\DeprecatedStatusCode instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php
new file mode 100644
index 000000000..9de5cbbd9
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Status_StatusCode.php
@@ -0,0 +1,16 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+if (false) {
+ /**
+ * This class is deprecated. Use Opentelemetry\Proto\Trace\V1\Status\StatusCode instead.
+ * @deprecated
+ */
+ class Status_StatusCode {}
+}
+class_exists(Status\StatusCode::class);
+@trigger_error('Opentelemetry\Proto\Trace\V1\Status_StatusCode is deprecated and will be removed in the next major release. Use Opentelemetry\Proto\Trace\V1\Status\StatusCode instead', E_USER_DEPRECATED);
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php
new file mode 100644
index 000000000..9fb54df9b
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceConfig.php
@@ -0,0 +1,297 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Global configuration of the trace service. All fields must be specified, or
+ * the default (zero) values will be used for each type.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TraceConfig</code>
+ */
+class TraceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ */
+ protected $max_number_of_attributes = 0;
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ */
+ protected $max_number_of_timed_events = 0;
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ */
+ protected $max_number_of_attributes_per_timed_event = 0;
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ */
+ protected $max_number_of_links = 0;
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ */
+ protected $max_number_of_attributes_per_link = 0;
+ protected $sampler;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ConstantSampler $constant_sampler
+ * @type \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $trace_id_ratio_based
+ * @type \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $rate_limiting_sampler
+ * @type int|string $max_number_of_attributes
+ * The global default max number of attributes per span.
+ * @type int|string $max_number_of_timed_events
+ * The global default max number of annotation events per span.
+ * @type int|string $max_number_of_attributes_per_timed_event
+ * The global default max number of attributes per timed event.
+ * @type int|string $max_number_of_links
+ * The global default max number of link entries per span.
+ * @type int|string $max_number_of_attributes_per_link
+ * The global default max number of attributes per span.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\ConstantSampler|null
+ */
+ public function getConstantSampler()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasConstantSampler()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.ConstantSampler constant_sampler = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ConstantSampler $var
+ * @return $this
+ */
+ public function setConstantSampler($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\ConstantSampler::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased|null
+ */
+ public function getTraceIdRatioBased()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasTraceIdRatioBased()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.TraceIdRatioBased trace_id_ratio_based = 2;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased $var
+ * @return $this
+ */
+ public function setTraceIdRatioBased($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\TraceIdRatioBased::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
+ * @return \Opentelemetry\Proto\Trace\V1\RateLimitingSampler|null
+ */
+ public function getRateLimitingSampler()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasRateLimitingSampler()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Generated from protobuf field <code>.opentelemetry.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\RateLimitingSampler $var
+ * @return $this
+ */
+ public function setRateLimitingSampler($var)
+ {
+ GPBUtil::checkMessage($var, \Opentelemetry\Proto\Trace\V1\RateLimitingSampler::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributes()
+ {
+ return $this->max_number_of_attributes;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes = 4;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributes($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfTimedEvents()
+ {
+ return $this->max_number_of_timed_events;
+ }
+
+ /**
+ * The global default max number of annotation events per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_timed_events = 5;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfTimedEvents($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_timed_events = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributesPerTimedEvent()
+ {
+ return $this->max_number_of_attributes_per_timed_event;
+ }
+
+ /**
+ * The global default max number of attributes per timed event.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_timed_event = 6;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributesPerTimedEvent($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes_per_timed_event = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfLinks()
+ {
+ return $this->max_number_of_links;
+ }
+
+ /**
+ * The global default max number of link entries per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_links = 7;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfLinks($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_links = $var;
+
+ return $this;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ * @return int|string
+ */
+ public function getMaxNumberOfAttributesPerLink()
+ {
+ return $this->max_number_of_attributes_per_link;
+ }
+
+ /**
+ * The global default max number of attributes per span.
+ *
+ * Generated from protobuf field <code>int64 max_number_of_attributes_per_link = 8;</code>
+ * @param int|string $var
+ * @return $this
+ */
+ public function setMaxNumberOfAttributesPerLink($var)
+ {
+ GPBUtil::checkInt64($var);
+ $this->max_number_of_attributes_per_link = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSampler()
+ {
+ return $this->whichOneof("sampler");
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php
new file mode 100644
index 000000000..a04435c36
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TraceIdRatioBased.php
@@ -0,0 +1,68 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace_config.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * Sampler that tries to uniformly sample traces with a given ratio.
+ * The ratio of sampling a trace is equal to that of the specified ratio.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TraceIdRatioBased</code>
+ */
+class TraceIdRatioBased extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ */
+ protected $samplingRatio = 0.0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type float $samplingRatio
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\TraceConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ * @return float
+ */
+ public function getSamplingRatio()
+ {
+ return $this->samplingRatio;
+ }
+
+ /**
+ * The desired ratio of sampling. Must be within [0.0, 1.0].
+ *
+ * Generated from protobuf field <code>double samplingRatio = 1;</code>
+ * @param float $var
+ * @return $this
+ */
+ public function setSamplingRatio($var)
+ {
+ GPBUtil::checkDouble($var);
+ $this->samplingRatio = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php
new file mode 100644
index 000000000..cbaf79448
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/TracesData.php
@@ -0,0 +1,90 @@
+<?php
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: opentelemetry/proto/trace/v1/trace.proto
+
+namespace Opentelemetry\Proto\Trace\V1;
+
+use Google\Protobuf\Internal\GPBType;
+use Google\Protobuf\Internal\RepeatedField;
+use Google\Protobuf\Internal\GPBUtil;
+
+/**
+ * TracesData represents the traces data that can be stored in a persistent storage,
+ * OR can be embedded by other protocols that transfer OTLP traces data but do
+ * not implement the OTLP protocol.
+ * The main difference between this message and collector protocol is that
+ * in this message there will not be any "control" or "metadata" specific to
+ * OTLP protocol.
+ * When new fields are added into this message, the OTLP request MUST be updated
+ * as well.
+ *
+ * Generated from protobuf message <code>opentelemetry.proto.trace.v1.TracesData</code>
+ */
+class TracesData extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ */
+ private $resource_spans;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $resource_spans
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Opentelemetry\Proto\Trace\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getResourceSpans()
+ {
+ return $this->resource_spans;
+ }
+
+ /**
+ * An array of ResourceSpans.
+ * For data coming from a single resource this array will typically contain
+ * one element. Intermediary nodes that receive data from multiple origins
+ * typically batch the data before forwarding further and in that case this
+ * array will contain multiple elements.
+ *
+ * Generated from protobuf field <code>repeated .opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;</code>
+ * @param \Opentelemetry\Proto\Trace\V1\ResourceSpans[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setResourceSpans($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Opentelemetry\Proto\Trace\V1\ResourceSpans::class);
+ $this->resource_spans = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/README.md b/vendor/open-telemetry/gen-otlp-protobuf/README.md
new file mode 100644
index 000000000..f1ea7a63a
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/README.md
@@ -0,0 +1,31 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/gen-otlp-protobuf/releases)
+[![Source](https://img.shields.io/badge/source-gen--otlp--protobuf-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/proto/otel)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:gen--otlp--protobuf-blue)](https://github.com/opentelemetry-php/gen-otlp-protobuf)
+[![Latest Version](http://poser.pugx.org/open-telemetry/gen-otlp-protobuf/v/unstable)](https://packagist.org/packages/open-telemetry/gen-otlp-protobuf/)
+[![Stable](http://poser.pugx.org/open-telemetry/gen-otlp-protobuf/v/stable)](https://packagist.org/packages/open-telemetry/gen-otlp-protobuf/)
+
+# OpenTelemetry protobuf files
+
+## Protobuf Runtime library
+
+OTLP exporting requires a [protobuf runtime library](https://github.com/protocolbuffers/protobuf/tree/main/php).
+
+There exist two protobuf runtime libraries that offer the same set of APIs, allowing developers to choose the one that
+best suits their needs.
+
+This package requires `google/protobuf`, which is the native implementation. It is easy to install and a good way to get
+started quickly.
+
+Alternatively, and the recommended option for production is to install the Protobuf C extension for PHP. The extension
+makes OTLP exporting _significantly_ more performant. The extension can be installed with the following command:
+
+```shell
+pecl install protobuf
+```
+
+The extension can be installed alongside the native library, and it will be used instead if available.
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/VERSION b/vendor/open-telemetry/gen-otlp-protobuf/VERSION
new file mode 100644
index 000000000..0ec25f750
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/VERSION
@@ -0,0 +1 @@
+v1.0.0
diff --git a/vendor/open-telemetry/gen-otlp-protobuf/composer.json b/vendor/open-telemetry/gen-otlp-protobuf/composer.json
new file mode 100644
index 000000000..dc8d24585
--- /dev/null
+++ b/vendor/open-telemetry/gen-otlp-protobuf/composer.json
@@ -0,0 +1,37 @@
+{
+ "name": "open-telemetry/gen-otlp-protobuf",
+ "description": "PHP protobuf files for communication with OpenTelemetry OTLP collectors/servers.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "gRPC", "protobuf", "otlp"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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",
+ "google/protobuf": "^3.3.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Opentelemetry\\Proto\\": "Opentelemetry/Proto/",
+ "GPBMetadata\\Opentelemetry\\": "GPBMetadata/Opentelemetry/"
+ }
+ },
+ "suggest": {
+ "ext-protobuf": "For better performance, when dealing with the protobuf format"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php
new file mode 100644
index 000000000..8ba992f9a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/DependencyResolver.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Client\HttpAsyncClient;
+use OpenTelemetry\SDK\Common\Http\DependencyResolverInterface;
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface as HttpPlugClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface as PsrClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface as MessageFactoryResolverInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+final class DependencyResolver implements DependencyResolverInterface
+{
+ private MessageFactoryResolverInterface $messageFactoryResolver;
+ private PsrClientResolverInterface $psrClientResolver;
+ private HttpPlugClientResolverInterface $httpPlugClientResolver;
+
+ public function __construct(
+ ?MessageFactoryResolverInterface $messageFactoryResolver = null,
+ ?PsrClientResolverInterface $psrClientResolver = null,
+ ?HttpPlugClientResolverInterface $httpPlugClientResolver = null
+ ) {
+ $this->messageFactoryResolver = $messageFactoryResolver ?? MessageFactoryResolver::create();
+ $this->psrClientResolver = $psrClientResolver ?? PsrClientResolver::create();
+ $this->httpPlugClientResolver = $httpPlugClientResolver ?? HttpPlugClientResolver::create();
+ }
+
+ public static function create(
+ ?MessageFactoryResolverInterface $messageFactoryResolver = null,
+ ?PsrClientResolverInterface $psrClientResolver = null,
+ ?HttpPlugClientResolverInterface $httpPlugClientResolver = null
+ ): self {
+ return new self($messageFactoryResolver, $psrClientResolver, $httpPlugClientResolver);
+ }
+
+ public function resolveRequestFactory(): RequestFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveRequestFactory();
+ }
+
+ public function resolveResponseFactory(): ResponseFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveResponseFactory();
+ }
+
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveServerRequestFactory();
+ }
+
+ public function resolveStreamFactory(): StreamFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveStreamFactory();
+ }
+
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveUploadedFileFactory();
+ }
+
+ public function resolveUriFactory(): UriFactoryInterface
+ {
+ return $this->messageFactoryResolver->resolveUriFactory();
+ }
+
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient
+ {
+ return $this->httpPlugClientResolver->resolveHttpPlugAsyncClient();
+ }
+
+ public function resolvePsrClient(): ClientInterface
+ {
+ return $this->psrClientResolver->resolvePsrClient();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php
new file mode 100644
index 000000000..9751984ee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Client\HttpAsyncClient;
+use Http\Discovery\HttpAsyncClientDiscovery;
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface;
+
+final class HttpPlugClientResolver implements ResolverInterface
+{
+ private ?HttpAsyncClient $httpAsyncClient;
+
+ public function __construct(?HttpAsyncClient $httpAsyncClient = null)
+ {
+ $this->httpAsyncClient = $httpAsyncClient;
+ }
+
+ public static function create(?HttpAsyncClient $httpAsyncClient = null): self
+ {
+ return new self($httpAsyncClient);
+ }
+
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient
+ {
+ return $this->httpAsyncClient ??= HttpAsyncClientDiscovery::find();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php
new file mode 100644
index 000000000..6ed0895ff
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/MessageFactoryResolver.php
@@ -0,0 +1,88 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Discovery\Psr17FactoryDiscovery;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+final class MessageFactoryResolver implements FactoryResolverInterface
+{
+ private ?RequestFactoryInterface $requestFactory;
+ private ?ResponseFactoryInterface $responseFactory;
+ private ?ServerRequestFactoryInterface $serverRequestFactory;
+ private ?StreamFactoryInterface $streamFactory;
+ private ?UploadedFileFactoryInterface $uploadedFileFactory;
+ private ?UriFactoryInterface $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;
+ }
+
+ public static function create(
+ ?RequestFactoryInterface $requestFactory = null,
+ ?ResponseFactoryInterface $responseFactory = null,
+ ?ServerRequestFactoryInterface $serverRequestFactory = null,
+ ?StreamFactoryInterface $streamFactory = null,
+ ?UploadedFileFactoryInterface $uploadedFileFactory = null,
+ ?UriFactoryInterface $uriFactory = null
+ ): self {
+ return new self(
+ $requestFactory,
+ $responseFactory,
+ $serverRequestFactory,
+ $streamFactory,
+ $uploadedFileFactory,
+ $uriFactory
+ );
+ }
+
+ public function resolveRequestFactory(): RequestFactoryInterface
+ {
+ return $this->requestFactory ??= Psr17FactoryDiscovery::findRequestFactory();
+ }
+
+ public function resolveResponseFactory(): ResponseFactoryInterface
+ {
+ return $this->responseFactory ??= Psr17FactoryDiscovery::findResponseFactory();
+ }
+
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface
+ {
+ return $this->serverRequestFactory ??= Psr17FactoryDiscovery::findServerRequestFactory();
+ }
+
+ public function resolveStreamFactory(): StreamFactoryInterface
+ {
+ return $this->streamFactory ??= Psr17FactoryDiscovery::findStreamFactory();
+ }
+
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface
+ {
+ return $this->uploadedFileFactory ??= Psr17FactoryDiscovery::findUploadedFileFactory();
+ }
+
+ public function resolveUriFactory(): UriFactoryInterface
+ {
+ return $this->uriFactory ??= Psr17FactoryDiscovery::findUriFactory();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php
new file mode 100644
index 000000000..46fb36312
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/PsrClientResolver.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Adapter\HttpDiscovery;
+
+use Http\Discovery\Psr18ClientDiscovery;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface;
+use Psr\Http\Client\ClientInterface;
+
+final class PsrClientResolver implements ResolverInterface
+{
+ private ?ClientInterface $client;
+
+ public function __construct(?ClientInterface $client = null)
+ {
+ $this->client = $client;
+ }
+
+ public static function create(?ClientInterface $client = null): self
+ {
+ return new self($client);
+ }
+
+ public function resolvePsrClient(): ClientInterface
+ {
+ return $this->client ??= Psr18ClientDiscovery::find();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php
new file mode 100644
index 000000000..e9a1f7334
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+class AttributeValidator implements AttributeValidatorInterface
+{
+ private const PRIMITIVES = [
+ 'string',
+ 'integer',
+ 'double',
+ 'boolean',
+ ];
+ private const NUMERICS = [
+ 'double',
+ 'integer',
+ ];
+
+ /**
+ * Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/common/README.md#attribute
+ */
+ public function validate($value): bool
+ {
+ if (is_array($value)) {
+ return $this->validateArray($value);
+ }
+
+ return in_array(gettype($value), self::PRIMITIVES);
+ }
+
+ private function validateArray(array $value): bool
+ {
+ if ($value === []) {
+ return true;
+ }
+ $type = gettype(reset($value));
+ if (!in_array($type, self::PRIMITIVES)) {
+ return false;
+ }
+ foreach ($value as $v) {
+ if (in_array(gettype($v), self::NUMERICS) && in_array($type, self::NUMERICS)) {
+ continue;
+ }
+ if (gettype($v) !== $type) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function getInvalidMessage(): string
+ {
+ return 'attribute with non-primitive or non-homogeneous array of primitives dropped';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php
new file mode 100644
index 000000000..afbfba6e7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributeValidatorInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+interface AttributeValidatorInterface
+{
+ public function validate($value): bool;
+ public function getInvalidMessage(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php b/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php
new file mode 100644
index 000000000..bb131ce94
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/Attributes.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function array_key_exists;
+use IteratorAggregate;
+use Traversable;
+
+final class Attributes implements AttributesInterface, IteratorAggregate
+{
+ private array $attributes;
+ private int $droppedAttributesCount;
+
+ /**
+ * @internal
+ */
+ public function __construct(array $attributes, int $droppedAttributesCount)
+ {
+ $this->attributes = $attributes;
+ $this->droppedAttributesCount = $droppedAttributesCount;
+ }
+
+ public static function create(iterable $attributes): AttributesInterface
+ {
+ return self::factory()->builder($attributes)->build();
+ }
+
+ public static function factory(?int $attributeCountLimit = null, ?int $attributeValueLengthLimit = null): AttributesFactoryInterface
+ {
+ return new AttributesFactory($attributeCountLimit, $attributeValueLengthLimit);
+ }
+
+ public function has(string $name): bool
+ {
+ return array_key_exists($name, $this->attributes);
+ }
+
+ 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 getDroppedAttributesCount(): int
+ {
+ return $this->droppedAttributesCount;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php
new file mode 100644
index 000000000..5c1150638
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function array_key_exists;
+use function count;
+use function is_array;
+use function is_string;
+use function mb_substr;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+
+/**
+ * @internal
+ */
+final class AttributesBuilder implements AttributesBuilderInterface
+{
+ use LogsMessagesTrait;
+
+ private array $attributes;
+ private ?int $attributeCountLimit;
+ private ?int $attributeValueLengthLimit;
+ private int $droppedAttributesCount;
+ private AttributeValidatorInterface $attributeValidator;
+
+ public function __construct(
+ array $attributes,
+ ?int $attributeCountLimit,
+ ?int $attributeValueLengthLimit,
+ int $droppedAttributesCount,
+ ?AttributeValidatorInterface $attributeValidator
+ ) {
+ $this->attributes = $attributes;
+ $this->attributeCountLimit = $attributeCountLimit;
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+ $this->droppedAttributesCount = $droppedAttributesCount;
+ $this->attributeValidator = $attributeValidator ?? new AttributeValidator();
+ }
+
+ public function build(): AttributesInterface
+ {
+ return new Attributes($this->attributes, $this->droppedAttributesCount);
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return array_key_exists($offset, $this->attributes);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->attributes[$offset] ?? null;
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ return;
+ }
+ if ($value === null) {
+ unset($this->attributes[$offset]);
+
+ return;
+ }
+ if (!$this->attributeValidator->validate($value)) {
+ self::logWarning($this->attributeValidator->getInvalidMessage() . ': ' . $offset);
+ $this->droppedAttributesCount++;
+
+ return;
+ }
+ if (count($this->attributes) === $this->attributeCountLimit && !array_key_exists($offset, $this->attributes)) {
+ $this->droppedAttributesCount++;
+
+ return;
+ }
+
+ $this->attributes[$offset] = $this->normalizeValue($value);
+ //@todo "There SHOULD be a message printed in the SDK's log to indicate to the user that an attribute was
+ // discarded due to such a limit. To prevent excessive logging, the message MUST be printed at most
+ // once per <thing> (i.e., not per discarded attribute)."
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($offset)
+ {
+ unset($this->attributes[$offset]);
+ }
+
+ private function normalizeValue($value)
+ {
+ if (is_string($value) && $this->attributeValueLengthLimit !== null) {
+ return mb_substr($value, 0, $this->attributeValueLengthLimit);
+ }
+
+ if (is_array($value)) {
+ foreach ($value as $k => $v) {
+ $processed = $this->normalizeValue($v);
+ if ($processed !== $v) {
+ $value[$k] = $processed;
+ }
+ }
+
+ return $value;
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php
new file mode 100644
index 000000000..7e3d64062
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilderInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use ArrayAccess;
+
+interface AttributesBuilderInterface extends ArrayAccess
+{
+ public function build(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php
new file mode 100644
index 000000000..d53ab25aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactory.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+/**
+ * @internal
+ */
+final class AttributesFactory implements AttributesFactoryInterface
+{
+ private ?int $attributeCountLimit;
+ private ?int $attributeValueLengthLimit;
+
+ public function __construct(?int $attributeCountLimit = null, ?int $attributeValueLengthLimit = null)
+ {
+ $this->attributeCountLimit = $attributeCountLimit;
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+ }
+
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface
+ {
+ $builder = new AttributesBuilder(
+ [],
+ $this->attributeCountLimit,
+ $this->attributeValueLengthLimit,
+ 0,
+ $attributeValidator,
+ );
+ foreach ($attributes as $key => $value) {
+ $builder[$key] = $value;
+ }
+
+ return $builder;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php
new file mode 100644
index 000000000..1b74461d4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+interface AttributesFactoryInterface
+{
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php b/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php
new file mode 100644
index 000000000..1af7dc8d9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/AttributesInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use Countable;
+use Traversable;
+
+interface AttributesInterface extends Traversable, Countable
+{
+ public function has(string $name): bool;
+
+ public function get(string $name);
+
+ public function getDroppedAttributesCount(): int;
+
+ public function toArray(): array;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php
new file mode 100644
index 000000000..d79cff96a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesBuilder.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+use function in_array;
+
+/**
+ * @internal
+ */
+final class FilteredAttributesBuilder implements AttributesBuilderInterface
+{
+ private AttributesBuilderInterface $builder;
+ private array $rejectedKeys;
+ private int $rejected = 0;
+
+ /**
+ * @param list<string> $rejectedKeys
+ */
+ public function __construct(AttributesBuilderInterface $builder, array $rejectedKeys)
+ {
+ $this->builder = $builder;
+ $this->rejectedKeys = $rejectedKeys;
+ }
+
+ public function __clone()
+ {
+ $this->builder = clone $this->builder;
+ }
+
+ public function build(): AttributesInterface
+ {
+ $attributes = $this->builder->build();
+ $dropped = $attributes->getDroppedAttributesCount() + $this->rejected;
+
+ return new Attributes($attributes->toArray(), $dropped);
+ }
+
+ public function offsetExists($offset): bool
+ {
+ return $this->builder->offsetExists($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->builder->offsetGet($offset);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($offset, $value)
+ {
+ if ($value !== null && in_array($offset, $this->rejectedKeys, true)) {
+ $this->rejected++;
+
+ return;
+ }
+
+ $this->builder->offsetSet($offset, $value);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($offset)
+ {
+ $this->builder->offsetUnset($offset);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php
new file mode 100644
index 000000000..1d9c4ae1c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/FilteredAttributesFactory.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+/**
+ * @internal
+ */
+final class FilteredAttributesFactory implements AttributesFactoryInterface
+{
+ private AttributesFactoryInterface $factory;
+ private array $rejectedKeys;
+
+ /**
+ * @param list<string> $rejectedKeys
+ */
+ public function __construct(AttributesFactoryInterface $factory, array $rejectedKeys)
+ {
+ $this->factory = $factory;
+ $this->rejectedKeys = $rejectedKeys;
+ }
+
+ public function builder(iterable $attributes = [], ?AttributeValidatorInterface $attributeValidator = null): AttributesBuilderInterface
+ {
+ $builder = new FilteredAttributesBuilder($this->factory->builder([], $attributeValidator), $this->rejectedKeys);
+ foreach ($attributes as $attribute => $value) {
+ $builder[$attribute] = $value;
+ }
+
+ return $builder;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php b/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php
new file mode 100644
index 000000000..a09d26372
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Attribute/LogRecordAttributeValidator.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Attribute;
+
+class LogRecordAttributeValidator implements AttributeValidatorInterface
+{
+ public function validate($value): bool
+ {
+ return true;
+ }
+
+ public function getInvalidMessage(): string
+ {
+ //not required as this validator always returns true
+ return 'unused';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php b/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
new file mode 100644
index 000000000..58673fd98
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
@@ -0,0 +1,182 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Configuration\Parser\BooleanParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\ListParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\MapParser;
+use OpenTelemetry\SDK\Common\Configuration\Parser\RatioParser;
+use OpenTelemetry\SDK\Common\Configuration\Resolver\CompositeResolver;
+use OpenTelemetry\SDK\Common\Util\ClassConstantAccessor;
+use UnexpectedValueException;
+
+/**
+ * Configuration can come from one or more of the following sources (from highest to lowest priority):
+ * - values defined in php.ini
+ * - environment variable ($_SERVER)
+ * - configuration file (todo)
+ */
+class Configuration
+{
+ use LogsMessagesTrait;
+
+ public static function has(string $name): bool
+ {
+ return CompositeResolver::instance()->hasVariable($name);
+ }
+
+ public static function getInt(string $key, int $default = null): int
+ {
+ return (int) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::INTEGER),
+ $default
+ ),
+ FILTER_VALIDATE_INT
+ );
+ }
+
+ public static function getString(string $key, string $default = null): string
+ {
+ return (string) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::STRING),
+ $default
+ )
+ );
+ }
+
+ public static function getBoolean(string $key, bool $default = null): bool
+ {
+ $resolved = self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::BOOL),
+ null === $default ? $default : ($default ? 'true' : 'false')
+ )
+ );
+
+ try {
+ return BooleanParser::parse($resolved);
+ } catch (InvalidArgumentException $e) {
+ self::logWarning(sprintf('Invalid boolean value "%s" interpreted as "false" for %s', $resolved, $key));
+
+ return false;
+ }
+ }
+
+ public static function getMixed(string $key, $default = null)
+ {
+ return self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ $key,
+ $default
+ )
+ );
+ }
+
+ public static function getMap(string $key, array $default = null): array
+ {
+ return MapParser::parse(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::MAP),
+ $default
+ )
+ );
+ }
+
+ public static function getList(string $key, array $default = null): array
+ {
+ return ListParser::parse(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::LIST),
+ $default
+ )
+ );
+ }
+
+ public static function getEnum(string $key, string $default = null): string
+ {
+ return (string) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::ENUM),
+ $default
+ )
+ );
+ }
+
+ public static function getFloat(string $key, float $default = null): float
+ {
+ return (float) self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::FLOAT),
+ $default
+ ),
+ FILTER_VALIDATE_FLOAT
+ );
+ }
+
+ public static function getRatio(string $key, float $default = null): float
+ {
+ return RatioParser::parse(
+ self::validateVariableValue(
+ CompositeResolver::instance()->resolve(
+ self::validateVariableType($key, VariableTypes::RATIO),
+ $default
+ )
+ )
+ );
+ }
+
+ public static function getKnownValues(string $variableName): ?array
+ {
+ return ClassConstantAccessor::getValue(KnownValues::class, $variableName);
+ }
+
+ public static function getDefault(string $variableName)
+ {
+ return ClassConstantAccessor::getValue(Defaults::class, $variableName);
+ }
+
+ public static function getType(string $variableName): ?string
+ {
+ return ClassConstantAccessor::getValue(ValueTypes::class, $variableName);
+ }
+
+ public static function isEmpty($value): bool
+ {
+ // don't use 'empty()', since '0' is not considered to be empty
+ return $value === null || $value === '';
+ }
+
+ private static function validateVariableType(string $variableName, string $type): string
+ {
+ $variableType = self::getType($variableName);
+
+ if ($variableType !== null && $variableType !== $type && $variableType !== VariableTypes::MIXED) {
+ throw new UnexpectedValueException(
+ sprintf('Variable "%s" is not supposed to be of type "%s" but type "%s"', $variableName, $type, $variableType)
+ );
+ }
+
+ return $variableName;
+ }
+
+ private static function validateVariableValue($value, ?int $filterType = null)
+ {
+ if ($filterType !== null && filter_var($value, $filterType) === false) {
+ throw new UnexpectedValueException(sprintf('Value has invalid type "%s"', gettype($value)));
+ }
+
+ if ($value === null || $value === '') {
+ throw new UnexpectedValueException(
+ 'Variable must not be null or empty'
+ );
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php b/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php
new file mode 100644
index 000000000..7228270a6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Defaults.php
@@ -0,0 +1,122 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Default values for environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface Defaults
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_LOG_LEVEL = 'info';
+ public const OTEL_PROPAGATORS = 'tracecontext,baggage';
+ public const OTEL_TRACES_SAMPLER = 'parentbased_always_on';
+ public const OTEL_SDK_DISABLED = 'false';
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = 5000;
+ public const OTEL_BSP_EXPORT_TIMEOUT = 30000;
+ public const OTEL_BSP_MAX_QUEUE_SIZE = 2048;
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 512;
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = 1000;
+ public const OTEL_BLRP_EXPORT_TIMEOUT = 30000;
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = 2048;
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = 512;
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = PHP_INT_MAX;
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = 128;
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = 128;
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = 128;
+ /**
+ * LogRecord Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = PHP_INT_MAX;
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = 128;
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = 'http://localhost:4318';
+ public const OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = 'http://localhost:4318';
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = 'false';
+ public const OTEL_EXPORTER_OTLP_LOGS_INSECURE = 'false';
+ // Timeout (seconds)
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = 10;
+ public const OTEL_EXPORTER_OTLP_LOGS_TIMEOUT = 10;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = 'http/protobuf';
+ public const OTEL_EXPORTER_OTLP_LOGS_PROTOCOL = 'http/protobuf';
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = 'http://localhost:9411/api/v2/spans';
+ // Timeout (seconds)
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = 10;
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = '0.0.0.0';
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = 9464;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = 'otlp';
+ public const OTEL_METRICS_EXPORTER = 'otlp';
+ public const OTEL_LOGS_EXPORTER = 'otlp';
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = 'with_sampled_trace';
+ public const OTEL_METRIC_EXPORT_INTERVAL = 60000;
+ public const OTEL_METRIC_EXPORT_TIMEOUT = 30000;
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = 'cumulative';
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = 'explicit_bucket_histogram';
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = 'batch';
+ public const OTEL_PHP_DETECTORS = 'all';
+ public const OTEL_PHP_AUTOLOAD_ENABLED = 'false';
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = 'false';
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = [];
+ public const OTEL_PHP_LOGS_PROCESSOR = 'batch';
+ public const OTEL_PHP_LOG_DESTINATION = 'default';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php b/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php
new file mode 100644
index 000000000..8975b20f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/KnownValues.php
@@ -0,0 +1,208 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+use Psr\Log\LogLevel;
+
+/**
+ * "Known values" for OpenTelemetry configurataion variables.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ * Notice: Values specific to the PHP SDK have been added
+ */
+interface KnownValues
+{
+ public const VALUE_TRUE = 'true';
+ public const VALUE_FALSE = 'false';
+ public const VALUE_ON = 'on';
+ public const VALUE_OFF = 'off';
+ public const VALUE_1 = '1';
+ public const VALUE_0 = '0';
+ public const VALUE_ALL = 'all';
+ public const VALUE_NONE = 'none';
+ public const VALUE_TRACECONTEXT = 'tracecontext';
+ public const VALUE_BAGGAGE = 'baggage';
+ public const VALUE_B3 = 'b3';
+ public const VALUE_B3_MULTI = 'b3multi';
+ public const VALUE_XRAY = 'xray';
+ public const VALUE_OTTRACE = 'ottrace';
+ public const VALUE_ALWAYS_ON = 'always_on';
+ public const VALUE_ALWAYS_OFF = 'always_off';
+ public const VALUE_TRACE_ID_RATIO = 'traceidratio';
+ public const VALUE_PARENT_BASED_ALWAYS_ON = 'parentbased_always_on';
+ public const VALUE_PARENT_BASED_ALWAYS_OFF = 'parentbased_always_off';
+ public const VALUE_PARENT_BASED_TRACE_ID_RATIO = 'parentbased_traceidratio';
+ public const VALUE_GZIP = 'gzip';
+ public const VALUE_GRPC = 'grpc';
+ public const VALUE_HTTP_PROTOBUF = 'http/protobuf';
+ public const VALUE_HTTP_JSON = 'http/json';
+ public const VALUE_HTTP_NDJSON = 'http/ndjson';
+ public const VALUE_OTLP = 'otlp';
+ public const VALUE_ZIPKIN = 'zipkin';
+ public const VALUE_PROMETHEUS = 'prometheus';
+ public const VALUE_WITH_SAMPLED_TRACE = 'with_sampled_trace';
+ public const VALUE_BATCH = 'batch';
+ public const VALUE_SIMPLE = 'simple';
+ public const VALUE_NOOP = 'noop';
+ public const VALUE_LOG_EMERGENCY = LogLevel::EMERGENCY;
+ public const VALUE_LOG_ALERT = LogLevel::ALERT;
+ public const VALUE_LOG_CRITICAL = LogLevel::CRITICAL;
+ public const VALUE_LOG_ERROR = LogLevel::ERROR;
+ public const VALUE_LOG_WARNING = LogLevel::WARNING;
+ public const VALUE_LOG_NOTICE = LogLevel::NOTICE;
+ public const VALUE_LOG_INFO = LogLevel::INFO;
+ public const VALUE_LOG_DEBUG = LogLevel::DEBUG;
+ public const VALUE_TEMPORALITY_CUMULATIVE = 'cumulative';
+ public const VALUE_TEMPORALITY_DELTA = 'delta';
+ public const VALUE_TEMPORALITY_LOW_MEMORY = 'lowmemory';
+ public const VALUE_HISTOGRAM_AGGREGATION_EXPLICIT = 'explicit_bucket_histogram';
+ public const VALUE_HISTOGRAM_AGGREGATION_BASE2_EXPONENTIAL = 'base2_exponential_bucket_histogram';
+
+ public const VALUES_BOOLEAN = [
+ self::VALUE_TRUE,
+ self::VALUE_FALSE,
+ ];
+
+ public const VALUES_COMPRESSION= [
+ self::VALUE_GZIP,
+ self::VALUE_NONE,
+ ];
+
+ public const VALUES_OTLP_PROTOCOL = [
+ self::VALUE_GRPC,
+ self::VALUE_HTTP_PROTOBUF,
+ self::VALUE_HTTP_JSON,
+ ];
+
+ public const VALUES_TEMPORALITY_PREFERENCE = [
+ self::VALUE_TEMPORALITY_CUMULATIVE,
+ self::VALUE_TEMPORALITY_DELTA,
+ self::VALUE_TEMPORALITY_LOW_MEMORY,
+ ];
+
+ public const VALUES_HISTOGRAM_AGGREGATION = [
+ self::VALUE_HISTOGRAM_AGGREGATION_EXPLICIT,
+ self::VALUE_HISTOGRAM_AGGREGATION_BASE2_EXPONENTIAL,
+ ];
+
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_LOG_LEVEL = [
+ self::VALUE_LOG_EMERGENCY,
+ self::VALUE_LOG_ALERT,
+ self::VALUE_LOG_CRITICAL,
+ self::VALUE_LOG_ERROR,
+ self::VALUE_LOG_WARNING,
+ self::VALUE_LOG_NOTICE,
+ self::VALUE_LOG_INFO,
+ self::VALUE_LOG_DEBUG,
+ ];
+ public const OTEL_PROPAGATORS = [
+ self::VALUE_TRACECONTEXT, // W3C Trace Context
+ self::VALUE_BAGGAGE, // W3C Baggage
+ self::VALUE_B3, // B3 Single
+ self::VALUE_B3_MULTI, // B3 Multi
+ self::VALUE_XRAY, // AWS X-Ray (third party)
+ self::VALUE_OTTRACE, // OT Trace (third party)
+ self::VALUE_NONE, // No automatically configured propagator.
+ ];
+ public const OTEL_TRACES_SAMPLER = [
+ self::VALUE_ALWAYS_ON,
+ self::VALUE_ALWAYS_OFF,
+ self::VALUE_TRACE_ID_RATIO,
+ self::VALUE_PARENT_BASED_ALWAYS_ON,
+ self::VALUE_PARENT_BASED_ALWAYS_OFF,
+ self::VALUE_PARENT_BASED_TRACE_ID_RATIO,
+ self::VALUE_XRAY,
+ ];
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = self::VALUES_BOOLEAN;
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = self::VALUES_BOOLEAN;
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = self::VALUES_BOOLEAN;
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = self::VALUES_COMPRESSION;
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = self::VALUES_COMPRESSION;
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = self::VALUES_COMPRESSION;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = self::VALUES_OTLP_PROTOCOL;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_ZIPKIN,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_METRICS_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_PROMETHEUS,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_LOGS_EXPORTER = [
+ self::VALUE_OTLP,
+ self::VALUE_NONE,
+ ];
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = [
+ self::VALUE_WITH_SAMPLED_TRACE,
+ self::VALUE_ALL,
+ self::VALUE_NONE,
+ ];
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = [
+ self::VALUE_BATCH,
+ self::VALUE_SIMPLE,
+ self::VALUE_NOOP,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_PHP_AUTOLOAD_ENABLED = self::VALUES_BOOLEAN;
+ public const VALUE_ERROR_LOG = 'error_log';
+ public const VALUE_STDERR = 'stderr';
+ public const VALUE_STDOUT = 'stdout';
+ public const VALUE_PSR3 = 'psr3';
+ public const VALUE_EMPTY = '';
+ public const VALUE_DETECTORS_ENVIRONMENT = 'env';
+ public const VALUE_DETECTORS_HOST = 'host';
+ public const VALUE_DETECTORS_OS = 'os';
+ public const VALUE_DETECTORS_PROCESS = 'process';
+ public const VALUE_DETECTORS_PROCESS_RUNTIME = 'process_runtime';
+ public const VALUE_DETECTORS_SDK = 'sdk';
+ public const VALUE_DETECTORS_SDK_PROVIDED = 'sdk_provided';
+ public const VALUE_DETECTORS_COMPOSER = 'composer';
+ public const OTEL_PHP_DETECTORS = [
+ self::VALUE_ALL,
+ self::VALUE_DETECTORS_ENVIRONMENT,
+ self::VALUE_DETECTORS_HOST,
+ self::VALUE_DETECTORS_OS,
+ self::VALUE_DETECTORS_PROCESS,
+ self::VALUE_DETECTORS_PROCESS_RUNTIME,
+ self::VALUE_DETECTORS_SDK,
+ self::VALUE_DETECTORS_SDK_PROVIDED,
+ self::VALUE_DETECTORS_COMPOSER,
+ self::VALUE_NONE,
+ ];
+ public const OTEL_PHP_LOG_DESTINATION = [
+ self::VALUE_ERROR_LOG,
+ self::VALUE_STDERR,
+ self::VALUE_STDOUT,
+ self::VALUE_PSR3,
+ self::VALUE_EMPTY,
+ self::VALUE_NONE,
+ ];
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php
new file mode 100644
index 000000000..4141c61ef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/BooleanParser.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+
+class BooleanParser
+{
+ private const TRUE_VALUE = 'true';
+ private const FALSE_VALUE = 'false';
+
+ /**
+ * @param string|bool $value
+ */
+ public static function parse($value): bool
+ {
+ if (is_bool($value)) {
+ return $value;
+ }
+ if (strtolower($value) === self::TRUE_VALUE) {
+ return true;
+ }
+
+ if (strtolower($value) === self::FALSE_VALUE) {
+ return false;
+ }
+
+ throw new InvalidArgumentException(
+ sprintf('Value "%s" is a non-boolean value', $value)
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php
new file mode 100644
index 000000000..f27b16597
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/ListParser.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+class ListParser
+{
+ private const DEFAULT_SEPARATOR = ',';
+
+ /**
+ * @param string|array $value
+ */
+ public static function parse($value): array
+ {
+ if (is_array($value)) {
+ return $value;
+ }
+ if (trim($value) === '') {
+ return [];
+ }
+
+ return array_map(
+ fn ($value) => trim($value),
+ explode(self::DEFAULT_SEPARATOR, $value)
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php
new file mode 100644
index 000000000..273d57c87
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/MapParser.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+
+class MapParser
+{
+ private const VARIABLE_SEPARATOR = ',';
+ private const KEY_VALUE_SEPARATOR = '=';
+
+ public static function parse($value): array
+ {
+ if (is_array($value)) {
+ return $value;
+ }
+ $result = [];
+
+ if (null === $value || trim($value) === '') {
+ return $result;
+ }
+
+ foreach (explode(self::VARIABLE_SEPARATOR, $value) as $pair) {
+ self::validateKeyValuePair($pair);
+
+ [$key, $value] = explode(self::KEY_VALUE_SEPARATOR, $pair, 2);
+ $result[trim($key)] = trim($value);
+ }
+
+ return $result;
+ }
+
+ private static function validateKeyValuePair(string $pair)
+ {
+ if (strpos($pair, self::KEY_VALUE_SEPARATOR) === false) {
+ throw new InvalidArgumentException(sprintf(
+ 'Key-Value pair "%s" does not contain separator "%s"',
+ $pair,
+ self::KEY_VALUE_SEPARATOR
+ ));
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php b/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php
new file mode 100644
index 000000000..f0fe32100
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Parser/RatioParser.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Parser;
+
+use InvalidArgumentException;
+use RangeException;
+
+class RatioParser
+{
+ private const MAX_VALUE = 1;
+ private const MIN_VALUE = 0;
+
+ public static function parse($value): float
+ {
+ if (filter_var($value, FILTER_VALIDATE_FLOAT) === false) {
+ throw new InvalidArgumentException(
+ sprintf('Value "%s" contains non-numeric value', $value)
+ );
+ }
+
+ $result = (float) $value;
+
+ if ($result > 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/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php
new file mode 100644
index 000000000..b72400b01
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/CompositeResolver.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @interal
+ */
+class CompositeResolver
+{
+ // @var array<ResolverInterface>
+ private array $resolvers = [];
+
+ public static function instance(): self
+ {
+ static $instance;
+ $instance ??= new self([
+ new PhpIniResolver(),
+ new EnvironmentResolver(),
+ ]);
+
+ return $instance;
+ }
+
+ public function __construct($resolvers)
+ {
+ foreach ($resolvers as $resolver) {
+ $this->addResolver($resolver);
+ }
+ }
+
+ public function addResolver(ResolverInterface $resolver): void
+ {
+ $this->resolvers[] = $resolver;
+ }
+
+ public function getResolvers(): array
+ {
+ return $this->resolvers;
+ }
+
+ public function resolve(string $variableName, $default = '')
+ {
+ foreach ($this->resolvers as $resolver) {
+ if ($resolver->hasVariable($variableName)) {
+ return $resolver->retrieveValue($variableName);
+ }
+ }
+
+ return Configuration::isEmpty($default)
+ ? Configuration::getDefault($variableName)
+ : $default;
+ }
+
+ public function hasVariable(string $variableName): bool
+ {
+ foreach ($this->resolvers as $resolver) {
+ if ($resolver->hasVariable($variableName)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php
new file mode 100644
index 000000000..453f98e39
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/EnvironmentResolver.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @internal
+ */
+class EnvironmentResolver implements ResolverInterface
+{
+ public function hasVariable(string $variableName): bool
+ {
+ if (!Configuration::isEmpty($_SERVER[$variableName] ?? null)) {
+ return true;
+ }
+ $env = getenv($variableName);
+ if ($env === false) {
+ return false;
+ }
+
+ return !Configuration::isEmpty($env);
+ }
+
+ /**
+ * @psalm-suppress InvalidReturnStatement
+ * @psalm-suppress InvalidReturnType
+ */
+ public function retrieveValue(string $variableName)
+ {
+ $value = getenv($variableName);
+ if ($value === false) {
+ $value = $_SERVER[$variableName] ?? null;
+ }
+
+ return $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php
new file mode 100644
index 000000000..a12b507e8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniAccessor.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+class PhpIniAccessor
+{
+ /**
+ * Mockable accessor for php.ini values
+ * @internal
+ * @return array|false|string
+ */
+ public function get(string $variableName)
+ {
+ return get_cfg_var($variableName);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php
new file mode 100644
index 000000000..c9a8f3b4e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+
+/**
+ * @interal
+ * @psalm-suppress TypeDoesNotContainType
+ */
+class PhpIniResolver implements ResolverInterface
+{
+ private PhpIniAccessor $accessor;
+
+ public function __construct(?PhpIniAccessor $accessor = null)
+ {
+ $this->accessor = $accessor ?? new PhpIniAccessor();
+ }
+
+ public function retrieveValue(string $variableName)
+ {
+ $value = $this->accessor->get($variableName) ?: '';
+ if (is_array($value)) {
+ return implode(',', $value);
+ }
+
+ return $value;
+ }
+
+ public function hasVariable(string $variableName): bool
+ {
+ $value = $this->accessor->get($variableName);
+ if ($value === []) {
+ return false;
+ }
+
+ return $value !== false && !Configuration::isEmpty($value);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php
new file mode 100644
index 000000000..4e88f3ff6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Resolver/ResolverInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration\Resolver;
+
+interface ResolverInterface
+{
+ /**
+ * @return mixed
+ */
+ public function retrieveValue(string $variableName);
+
+ public function hasVariable(string $variableName): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php b/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php
new file mode 100644
index 000000000..64a69f6a7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/ValueTypes.php
@@ -0,0 +1,133 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface ValueTypes
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_RESOURCE_ATTRIBUTES = VariableTypes::MAP;
+ public const OTEL_SERVICE_NAME = VariableTypes::STRING;
+ public const OTEL_LOG_LEVEL = VariableTypes::ENUM;
+ public const OTEL_PROPAGATORS = VariableTypes::LIST;
+ public const OTEL_TRACES_SAMPLER = VariableTypes::STRING;
+ public const OTEL_TRACES_SAMPLER_ARG = VariableTypes::MIXED;
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = VariableTypes::INTEGER;
+ public const OTEL_BSP_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_BSP_MAX_QUEUE_SIZE = VariableTypes::INTEGER;
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = VariableTypes::INTEGER;
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = VariableTypes::INTEGER;
+ public const OTEL_BLRP_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = VariableTypes::INTEGER;
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = VariableTypes::INTEGER;
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * LogRecord Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = VariableTypes::INTEGER;
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = VariableTypes::INTEGER;
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = VariableTypes::STRING;
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = VariableTypes::BOOL;
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = VariableTypes::BOOL;
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = VariableTypes::BOOL;
+ // Certificate File
+ public const OTEL_EXPORTER_OTLP_CERTIFICATE = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE = VariableTypes::STRING;
+ public const OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = VariableTypes::STRING;
+ // Headers
+ public const OTEL_EXPORTER_OTLP_HEADERS = VariableTypes::MAP;
+ public const OTEL_EXPORTER_OTLP_TRACES_HEADERS = VariableTypes::MAP;
+ public const OTEL_EXPORTER_OTLP_METRICS_HEADERS = VariableTypes::MAP;
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = VariableTypes::ENUM;
+ // Timeout
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = VariableTypes::INTEGER;
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = VariableTypes::ENUM;
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = VariableTypes::STRING;
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_ZIPKIN_PROTOCOL = VariableTypes::STRING;
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = VariableTypes::STRING;
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = VariableTypes::INTEGER;
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = VariableTypes::LIST;
+ public const OTEL_METRICS_EXPORTER = VariableTypes::LIST;
+ public const OTEL_LOGS_EXPORTER = VariableTypes::LIST;
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = VariableTypes::ENUM;
+ public const OTEL_METRIC_EXPORT_INTERVAL = VariableTypes::INTEGER;
+ public const OTEL_METRIC_EXPORT_TIMEOUT = VariableTypes::INTEGER;
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = VariableTypes::ENUM;
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = VariableTypes::ENUM;
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = VariableTypes::ENUM;
+ public const OTEL_PHP_LOGS_PROCESSOR = VariableTypes::LIST;
+ public const OTEL_PHP_DETECTORS = VariableTypes::LIST;
+ public const OTEL_PHP_AUTOLOAD_ENABLED = VariableTypes::BOOL;
+ public const OTEL_PHP_LOG_DESTINATION = VariableTypes::ENUM;
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = VariableTypes::BOOL;
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = VariableTypes::LIST;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php b/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php
new file mode 100644
index 000000000..471632e16
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/VariableTypes.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+interface VariableTypes
+{
+ /**
+ * A single boolean value represented as a string or integer ('true', 'false', 0, 1)
+ * example: value1
+ */
+ public const BOOL = 'bool';
+
+ /**
+ * A single string value
+ * example: value1
+ */
+ public const STRING = 'string';
+
+ /**
+ * A single integer value
+ * example: 5000
+ */
+ public const INTEGER = 'integer';
+
+ /**
+ * A single float value
+ * example: 10.5
+ */
+ public const FLOAT = 'float';
+
+ /**
+ * A single float value between 0.0 and 1.0
+ * example: 0.5
+ */
+ public const RATIO = 'ratio';
+
+ /**
+ * A single string value from a fixed list of values
+ * example values: value1, value2, value3
+ * example: value1
+ */
+ public const ENUM = 'enum';
+
+ /**
+ * A comma separated list of single string values
+ * example: value1,value2,value3
+ */
+ public const LIST = 'list';
+
+ /**
+ * A comma separated list of key-value pairs
+ * example: key1=value1,key2=value2
+ */
+ public const MAP = 'map';
+
+ /**
+ * Values of mixed type
+ */
+ public const MIXED = 'mixed';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Configuration/Variables.php b/vendor/open-telemetry/sdk/Common/Configuration/Variables.php
new file mode 100644
index 000000000..d0bb3c8ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Configuration/Variables.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Configuration;
+
+/**
+ * Environment variables defined by the OpenTelemetry specification and language specific variables for the PHP SDK.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md
+ */
+interface Variables
+{
+ /**
+ * General SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ */
+ public const OTEL_RESOURCE_ATTRIBUTES = 'OTEL_RESOURCE_ATTRIBUTES';
+ public const OTEL_SERVICE_NAME = 'OTEL_SERVICE_NAME';
+ public const OTEL_LOG_LEVEL = 'OTEL_LOG_LEVEL';
+ public const OTEL_PROPAGATORS = 'OTEL_PROPAGATORS';
+ public const OTEL_TRACES_SAMPLER = 'OTEL_TRACES_SAMPLER';
+ public const OTEL_TRACES_SAMPLER_ARG = 'OTEL_TRACES_SAMPLER_ARG';
+ public const OTEL_SDK_DISABLED = 'OTEL_SDK_DISABLED';
+ /**
+ * Batch Span Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-span-processor
+ */
+ public const OTEL_BSP_SCHEDULE_DELAY = 'OTEL_BSP_SCHEDULE_DELAY';
+ public const OTEL_BSP_EXPORT_TIMEOUT = 'OTEL_BSP_EXPORT_TIMEOUT';
+ public const OTEL_BSP_MAX_QUEUE_SIZE = 'OTEL_BSP_MAX_QUEUE_SIZE';
+ public const OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE';
+ /**
+ * Batch LogRecord Processor
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#batch-logrecord-processor
+ */
+ public const OTEL_BLRP_SCHEDULE_DELAY = 'OTEL_BLRP_SCHEDULE_DELAY';
+ public const OTEL_BLRP_EXPORT_TIMEOUT = 'OTEL_BLRP_EXPORT_TIMEOUT';
+ public const OTEL_BLRP_MAX_QUEUE_SIZE = 'OTEL_BLRP_MAX_QUEUE_SIZE';
+ public const OTEL_BLRP_MAX_EXPORT_BATCH_SIZE = 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE';
+ /**
+ * Attribute Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public const OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_ATTRIBUTE_COUNT_LIMIT = 'OTEL_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * LogRecord limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#logrecord-limits
+ */
+ public const OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * Span Limits
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public const OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT';
+ public const OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT';
+ public const OTEL_SPAN_EVENT_COUNT_LIMIT = 'OTEL_SPAN_EVENT_COUNT_LIMIT';
+ public const OTEL_SPAN_LINK_COUNT_LIMIT = 'OTEL_SPAN_LINK_COUNT_LIMIT';
+ public const OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT = 'OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT';
+ public const OTEL_LINK_ATTRIBUTE_COUNT_LIMIT = 'OTEL_LINK_ATTRIBUTE_COUNT_LIMIT';
+ /**
+ * OTLP Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
+ */
+ // Endpoint
+ public const OTEL_EXPORTER_OTLP_ENDPOINT = 'OTEL_EXPORTER_OTLP_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_METRICS_ENDPOINT = 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT';
+ public const OTEL_EXPORTER_OTLP_LOGS_ENDPOINT = 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT';
+ // Insecure
+ public const OTEL_EXPORTER_OTLP_INSECURE = 'OTEL_EXPORTER_OTLP_INSECURE';
+ public const OTEL_EXPORTER_OTLP_TRACES_INSECURE = 'OTEL_EXPORTER_OTLP_TRACES_INSECURE';
+ public const OTEL_EXPORTER_OTLP_METRICS_INSECURE = 'OTEL_EXPORTER_OTLP_METRICS_INSECURE';
+ public const OTEL_EXPORTER_OTLP_LOGS_INSECURE = 'OTEL_EXPORTER_OTLP_LOGS_INSECURE';
+ // Certificate File
+ public const OTEL_EXPORTER_OTLP_CERTIFICATE = 'OTEL_EXPORTER_OTLP_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE = 'OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = 'OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE';
+ public const OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE = 'OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE';
+ // Headers
+ public const OTEL_EXPORTER_OTLP_HEADERS = 'OTEL_EXPORTER_OTLP_HEADERS';
+ public const OTEL_EXPORTER_OTLP_TRACES_HEADERS = 'OTEL_EXPORTER_OTLP_TRACES_HEADERS';
+ public const OTEL_EXPORTER_OTLP_METRICS_HEADERS = 'OTEL_EXPORTER_OTLP_METRICS_HEADERS';
+ public const OTEL_EXPORTER_OTLP_LOGS_HEADERS = 'OTEL_EXPORTER_OTLP_LOGS_HEADERS';
+ // Compression
+ public const OTEL_EXPORTER_OTLP_COMPRESSION = 'OTEL_EXPORTER_OTLP_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = 'OTEL_EXPORTER_OTLP_TRACES_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = 'OTEL_EXPORTER_OTLP_METRICS_COMPRESSION';
+ public const OTEL_EXPORTER_OTLP_LOGS_COMPRESSION = 'OTEL_EXPORTER_OTLP_LOGS_COMPRESSION';
+ // Timeout
+ public const OTEL_EXPORTER_OTLP_TIMEOUT = 'OTEL_EXPORTER_OTLP_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_METRICS_TIMEOUT = 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_LOGS_TIMEOUT = 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT';
+ // Protocol
+ public const OTEL_EXPORTER_OTLP_PROTOCOL = 'OTEL_EXPORTER_OTLP_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'OTEL_EXPORTER_OTLP_TRACES_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_METRICS_PROTOCOL = 'OTEL_EXPORTER_OTLP_METRICS_PROTOCOL';
+ public const OTEL_EXPORTER_OTLP_LOGS_PROTOCOL = 'OTEL_EXPORTER_OTLP_LOGS_PROTOCOL';
+ /**
+ * Zipkin Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#zipkin-exporter
+ */
+ public const OTEL_EXPORTER_ZIPKIN_ENDPOINT = 'OTEL_EXPORTER_ZIPKIN_ENDPOINT';
+ public const OTEL_EXPORTER_ZIPKIN_TIMEOUT = 'OTEL_EXPORTER_ZIPKIN_TIMEOUT';
+ public const OTEL_EXPORTER_ZIPKIN_PROTOCOL = 'OTEL_EXPORTER_ZIPKIN_PROTOCOL';
+ /**
+ * Prometheus Exporter
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#prometheus-exporter
+ */
+ public const OTEL_EXPORTER_PROMETHEUS_HOST = 'OTEL_EXPORTER_PROMETHEUS_HOST';
+ public const OTEL_EXPORTER_PROMETHEUS_PORT = 'OTEL_EXPORTER_PROMETHEUS_PORT';
+ /**
+ * Exporter Selection
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
+ */
+ public const OTEL_TRACES_EXPORTER = 'OTEL_TRACES_EXPORTER';
+ public const OTEL_METRICS_EXPORTER = 'OTEL_METRICS_EXPORTER';
+ public const OTEL_LOGS_EXPORTER = 'OTEL_LOGS_EXPORTER';
+ /**
+ * Metrics SDK Configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#metrics-sdk-configuration
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#periodic-exporting-metricreader
+ */
+ public const OTEL_METRICS_EXEMPLAR_FILTER = 'OTEL_METRICS_EXEMPLAR_FILTER';
+ public const OTEL_METRIC_EXPORT_INTERVAL = 'OTEL_METRIC_EXPORT_INTERVAL';
+ public const OTEL_METRIC_EXPORT_TIMEOUT = 'OTEL_METRIC_EXPORT_TIMEOUT';
+ public const OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = 'OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE';
+ public const OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = 'OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION';
+ /**
+ * Language Specific Environment Variables
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#language-specific-environment-variables
+ */
+ public const OTEL_PHP_TRACES_PROCESSOR = 'OTEL_PHP_TRACES_PROCESSOR';
+ public const OTEL_PHP_LOGS_PROCESSOR = 'OTEL_PHP_LOGS_PROCESSOR';
+ public const OTEL_PHP_LOG_DESTINATION = 'OTEL_PHP_LOG_DESTINATION';
+ public const OTEL_PHP_DETECTORS = 'OTEL_PHP_DETECTORS';
+ public const OTEL_PHP_AUTOLOAD_ENABLED = 'OTEL_PHP_AUTOLOAD_ENABLED';
+ public const OTEL_PHP_INTERNAL_METRICS_ENABLED = 'OTEL_PHP_INTERNAL_METRICS_ENABLED'; //whether the SDK should emit its own metrics
+ public const OTEL_PHP_DISABLED_INSTRUMENTATIONS = 'OTEL_PHP_DISABLED_INSTRUMENTATIONS';
+}
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md
new file mode 100644
index 000000000..661eed3b8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/README.md
@@ -0,0 +1,14 @@
+# Backwards Compatibility
+
+We aim to provide backward compatibility (without any guarantee) even for alpha releases, however the library will raise notices indicating breaking changes and what to do about them. \
+If you don't want these notices to appear or change the error message level, you can do so by calling:
+```php
+OpenTelemetry\SDK\Common\Dev\Compatibility\Util::setErrorLevel(0)
+```
+to turn messages off completely, or (for example)
+```php
+OpenTelemetry\SDK\Common\Dev\Compatibility\Util::setErrorLevel(E_USER_DEPRECATED)
+```
+to trigger only deprecation notices. Valid error levels are `0` (none), `E_USER_DEPRECATED`, `E_USER_NOTICE`, `E_USER_WARNING` and `E_USER_ERROR` \
+However (as long as in alpha) it is safer to pin a dependency on the library to a specific version and/or make the adjustments
+mentioned in the provided messages, since doing otherwise may break things completely for you in the future!
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php
new file mode 100644
index 000000000..1a3debfdd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/Util.php
@@ -0,0 +1,93 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Dev\Compatibility;
+
+class Util
+{
+ public const E_NONE = 0;
+ public const DEFAULT_ERROR_LEVEL = E_USER_NOTICE;
+ public const ERROR_LEVELS = [
+ self::E_NONE,
+ E_USER_DEPRECATED,
+ E_USER_NOTICE,
+ E_USER_WARNING,
+ E_USER_ERROR,
+ ];
+
+ private static int $errorLevel = E_USER_NOTICE;
+
+ public static function setErrorLevel(int $errorLevel = E_USER_NOTICE): void
+ {
+ self::validateErrorLevel($errorLevel);
+
+ self::$errorLevel = $errorLevel;
+ }
+
+ public static function getErrorLevel(): int
+ {
+ return self::$errorLevel;
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public static function triggerClassDeprecationNotice(string $className, string $alternativeClassName = null): void
+ {
+ if (self::getErrorLevel() === self::E_NONE) {
+ return;
+ }
+
+ $notice = sprintf(
+ 'Class "%s" is deprecated and will be removed in a future release. ',
+ $className
+ );
+
+ if ($alternativeClassName !== null) {
+ $notice .= sprintf('Please, use "%s" instead.', $alternativeClassName);
+ }
+
+ trigger_error($notice, self::$errorLevel);
+ }
+
+ /**
+ * @psalm-suppress ArgumentTypeCoercion
+ */
+ public static function triggerMethodDeprecationNotice(
+ string $methodName,
+ string $alternativeMethodName = null,
+ string $alternativeClassName = null
+ ): void {
+ if (self::getErrorLevel() === self::E_NONE) {
+ return;
+ }
+
+ $notice = sprintf(
+ 'Method "%s " is deprecated and will be removed in a future release. ',
+ $methodName
+ );
+
+ if ($alternativeMethodName !== null) {
+ $method = $alternativeClassName === null
+ ? $alternativeMethodName
+ : sprintf('%s::%s', $alternativeClassName, $alternativeMethodName);
+
+ $notice .= sprintf('Please, use "%s" instead.', $method);
+ }
+
+ trigger_error($notice, self::$errorLevel);
+ }
+
+ private static function validateErrorLevel(int $errorLevel): void
+ {
+ if (!in_array($errorLevel, self::ERROR_LEVELS, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ 'Error level must be one of "%s"',
+ implode('", "', self::ERROR_LEVELS)
+ ),
+ );
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php
new file mode 100644
index 000000000..99f86c574
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Dev/Compatibility/_load.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * To add a BC compatibility:
+ * require_once __DIR__ . '/BC/SomeFile.php';
+ */
diff --git a/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php b/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php
new file mode 100644
index 000000000..675fc7626
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Exception/StackTraceFormatter.php
@@ -0,0 +1,155 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Exception;
+
+use function basename;
+use function count;
+use function get_class;
+use function sprintf;
+use function str_repeat;
+
+use Throwable;
+
+/**
+ * @psalm-type Frame = array{
+ * function: string,
+ * class: ?class-string,
+ * file: ?string,
+ * line: ?int,
+ * }
+ * @psalm-type Frames = non-empty-list<Frame>
+ */
+final class StackTraceFormatter
+{
+ private function __construct()
+ {
+ }
+
+ /**
+ * Formats an exception in a java-like format.
+ *
+ * @param Throwable $e exception to format
+ * @return string formatted exception
+ *
+ * @see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Throwable.html#printStackTrace()
+ */
+ public static function format(Throwable $e): string
+ {
+ $s = '';
+ $seen = [];
+
+ /** @var Frames|null $enclosing */
+ $enclosing = null;
+ do {
+ if ($enclosing) {
+ self::writeNewline($s);
+ $s .= 'Caused by: ';
+ }
+ if (isset($seen[spl_object_id($e)])) {
+ $s .= '[CIRCULAR REFERENCE: ';
+ self::writeInlineHeader($s, $e);
+ $s .= ']';
+
+ break;
+ }
+ $seen[spl_object_id($e)] = $e;
+
+ $frames = self::frames($e);
+ self::writeInlineHeader($s, $e);
+ self::writeFrames($s, $frames, $enclosing);
+
+ $enclosing = $frames;
+ } while ($e = $e->getPrevious());
+
+ return $s;
+ }
+
+ /**
+ * @phan-suppress-next-line PhanTypeMismatchDeclaredParam
+ * @param Frames $frames
+ * @phan-suppress-next-line PhanTypeMismatchDeclaredParam
+ * @param Frames|null $enclosing
+ */
+ private static function writeFrames(string &$s, array $frames, ?array $enclosing): void
+ {
+ $n = count($frames);
+ if ($enclosing) {
+ for ($m = count($enclosing);
+ $n && $m && $frames[$n - 1] === $enclosing[$m - 1];
+ $n--, $m--) {
+ }
+ }
+ for ($i = 0; $i < $n; $i++) {
+ $frame = $frames[$i];
+ self::writeNewline($s, 1);
+ $s .= 'at ';
+ if ($frame['class'] !== null) {
+ $s .= self::formatName($frame['class']);
+ $s .= '.';
+ }
+ $s .= self::formatName($frame['function']);
+ $s .= '(';
+ if ($frame['file'] !== null) {
+ $s .= basename($frame['file']);
+ if ($frame['line']) {
+ $s .= ':';
+ $s .= $frame['line'];
+ }
+ } else {
+ $s .= 'Unknown Source';
+ }
+ $s .= ')';
+ }
+ if ($n !== count($frames)) {
+ self::writeNewline($s, 1);
+ $s .= sprintf('... %d more', count($frames) - $n);
+ }
+ }
+
+ private static function writeInlineHeader(string &$s, Throwable $e): void
+ {
+ $s .= self::formatName(get_class($e));
+ if ($e->getMessage() !== '') {
+ $s .= ': ';
+ $s .= $e->getMessage();
+ }
+ }
+
+ private static function writeNewline(string &$s, int $indent = 0): void
+ {
+ $s .= "\n";
+ $s .= str_repeat("\t", $indent);
+ }
+
+ /**
+ * @return Frames
+ *
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ private static function frames(Throwable $e): array
+ {
+ $frames = [];
+ $trace = $e->getTrace();
+ $traceCount = count($trace);
+ for ($i = 0; $i < $traceCount + 1; $i++) {
+ $frames[] = [
+ 'function' => $trace[$i]['function'] ?? '{main}',
+ 'class' => $trace[$i]['class'] ?? null,
+ 'file' => $trace[$i - 1]['file'] ?? null,
+ 'line' => $trace[$i - 1]['line'] ?? null,
+ ];
+ }
+ $frames[0]['file'] = $e->getFile();
+ $frames[0]['line'] = $e->getLine();
+
+ /** @var Frames $frames */
+ return $frames;
+ }
+
+ private static function formatName(string $name): string
+ {
+ return strtr($name, ['\\' => '.']);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
new file mode 100644
index 000000000..a53e5b80a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
@@ -0,0 +1,168 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use function assert;
+use BadMethodCallException;
+use function explode;
+use function in_array;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\ErrorFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Client\NetworkExceptionInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use RuntimeException;
+use function strtolower;
+use Throwable;
+use function time_nanosleep;
+use function trim;
+
+/**
+ * @psalm-template CONTENT_TYPE of string
+ * @template-implements TransportInterface<CONTENT_TYPE>
+ */
+final class PsrTransport implements TransportInterface
+{
+ private ClientInterface $client;
+ private RequestFactoryInterface $requestFactory;
+ private StreamFactoryInterface $streamFactory;
+
+ private string $endpoint;
+ private string $contentType;
+ private array $headers;
+ private array $compression;
+ private int $retryDelay;
+ private int $maxRetries;
+
+ private bool $closed = false;
+
+ /**
+ * @psalm-param CONTENT_TYPE $contentType
+ */
+ public function __construct(
+ ClientInterface $client,
+ RequestFactoryInterface $requestFactory,
+ StreamFactoryInterface $streamFactory,
+ string $endpoint,
+ string $contentType,
+ array $headers,
+ array $compression,
+ int $retryDelay,
+ int $maxRetries
+ ) {
+ $this->client = $client;
+ $this->requestFactory = $requestFactory;
+ $this->streamFactory = $streamFactory;
+ $this->endpoint = $endpoint;
+ $this->contentType = $contentType;
+ $this->headers = $headers;
+ $this->compression = $compression;
+ $this->retryDelay = $retryDelay;
+ $this->maxRetries = $maxRetries;
+ }
+
+ public function contentType(): string
+ {
+ return $this->contentType;
+ }
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if ($this->closed) {
+ return new ErrorFuture(new BadMethodCallException('Transport closed'));
+ }
+
+ $body = PsrUtils::encode($payload, $this->compression, $appliedEncodings);
+ $request = $this->requestFactory
+ ->createRequest('POST', $this->endpoint)
+ ->withBody($this->streamFactory->createStream($body))
+ ->withHeader('Content-Type', $this->contentType)
+ ;
+ if ($appliedEncodings) {
+ $request = $request->withHeader('Content-Encoding', $appliedEncodings);
+ }
+ foreach ($this->headers as $header => $value) {
+ $request = $request->withAddedHeader($header, $value);
+ }
+
+ for ($retries = 0;; $retries++) {
+ $response = null;
+ $e = null;
+
+ try {
+ $response = $this->client->sendRequest($request);
+ if ($response->getStatusCode() >= 200 && $response->getStatusCode() < 300) {
+ break;
+ }
+
+ if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500 && !in_array($response->getStatusCode(), [408, 429], true)) {
+ throw new RuntimeException($response->getReasonPhrase(), $response->getStatusCode());
+ }
+ } catch (NetworkExceptionInterface $e) {
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+
+ if ($retries >= $this->maxRetries) {
+ return new ErrorFuture(new RuntimeException('Export retry limit exceeded', 0, $e));
+ }
+
+ $delay = PsrUtils::retryDelay($retries, $this->retryDelay, $response);
+ $sec = (int) $delay;
+ $nsec = (int) (($delay - $sec) * 1e9);
+
+ /** @psalm-suppress ArgumentTypeCoercion */
+ if (time_nanosleep($sec, $nsec) !== true) {
+ return new ErrorFuture(new RuntimeException('Export cancelled', 0, $e));
+ }
+ }
+
+ assert(isset($response));
+
+ try {
+ $body = PsrUtils::decode(
+ $response->getBody()->__toString(),
+ self::parseContentEncoding($response),
+ );
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+
+ return new CompletedFuture($body);
+ }
+
+ private static function parseContentEncoding(ResponseInterface $response): array
+ {
+ $encodings = [];
+ foreach (explode(',', $response->getHeaderLine('Content-Encoding')) as $encoding) {
+ if (($encoding = trim($encoding, " \t")) !== '') {
+ $encodings[] = strtolower($encoding);
+ }
+ }
+
+ return $encodings;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return true;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return !$this->closed;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php
new file mode 100644
index 000000000..5ef78d82c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransportFactory.php
@@ -0,0 +1,74 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use const FILTER_VALIDATE_URL;
+use function filter_var;
+use Http\Discovery\Psr17FactoryDiscovery;
+use Http\Discovery\Psr18ClientDiscovery;
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+
+final class PsrTransportFactory implements TransportFactoryInterface
+{
+ private ClientInterface $client;
+ private RequestFactoryInterface $requestFactory;
+ private StreamFactoryInterface $streamFactory;
+
+ public function __construct(
+ ClientInterface $client,
+ RequestFactoryInterface $requestFactory,
+ StreamFactoryInterface $streamFactory
+ ) {
+ $this->client = $client;
+ $this->requestFactory = $requestFactory;
+ $this->streamFactory = $streamFactory;
+ }
+
+ /**
+ * @phan-suppress PhanTypeMismatchArgumentNullable
+ */
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): PsrTransport {
+ if (!filter_var($endpoint, FILTER_VALIDATE_URL)) {
+ throw new InvalidArgumentException(sprintf('Invalid endpoint url "%s"', $endpoint));
+ }
+ assert(!empty($endpoint));
+
+ return new PsrTransport(
+ $this->client,
+ $this->requestFactory,
+ $this->streamFactory,
+ $endpoint,
+ $contentType,
+ $headers,
+ PsrUtils::compression($compression),
+ $retryDelay,
+ $maxRetries,
+ );
+ }
+
+ public static function discover(): self
+ {
+ return new self(
+ Psr18ClientDiscovery::find(),
+ Psr17FactoryDiscovery::findRequestFactory(),
+ Psr17FactoryDiscovery::findStreamFactory(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php b/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php
new file mode 100644
index 000000000..eaf2f3b47
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php
@@ -0,0 +1,175 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Http;
+
+use function array_filter;
+use function array_map;
+use function count;
+use ErrorException;
+use LogicException;
+use function max;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use function rand;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function strcasecmp;
+use function strtotime;
+use Throwable;
+use function time;
+use function trim;
+use UnexpectedValueException;
+
+/**
+ * @internal
+ */
+final class PsrUtils
+{
+ /**
+ * @param int $retry zero-indexed attempt number
+ * @param int $retryDelay initial delay in milliseconds
+ * @param ResponseInterface|null $response response of failed request
+ * @return float delay in seconds
+ */
+ public static function retryDelay(int $retry, int $retryDelay, ?ResponseInterface $response = null): float
+ {
+ $delay = $retryDelay << $retry;
+ $delay = rand($delay >> 1, $delay) / 1000;
+
+ return max($delay, self::parseRetryAfter($response));
+ }
+
+ private static function parseRetryAfter(?ResponseInterface $response): int
+ {
+ if (!$response || !$retryAfter = $response->getHeaderLine('Retry-After')) {
+ return 0;
+ }
+
+ $retryAfter = trim($retryAfter, " \t");
+ if ($retryAfter === (string) (int) $retryAfter) {
+ return (int) $retryAfter;
+ }
+
+ if (($time = strtotime($retryAfter)) !== false) {
+ return $time - time();
+ }
+
+ return 0;
+ }
+
+ /**
+ * @param list<string> $encodings
+ * @param array<int, string>|null $appliedEncodings
+ */
+ public static function encode(string $value, array $encodings, ?array &$appliedEncodings = null): string
+ {
+ for ($i = 0, $n = count($encodings); $i < $n; $i++) {
+ if (!$encoder = self::encoder($encodings[$i])) {
+ unset($encodings[$i]);
+
+ continue;
+ }
+
+ try {
+ $value = $encoder($value);
+ } catch (Throwable $e) {
+ unset($encodings[$i]);
+ }
+ }
+
+ $appliedEncodings = $encodings;
+
+ return $value;
+ }
+
+ /**
+ * @param list<string> $encodings
+ */
+ public static function decode(string $value, array $encodings): string
+ {
+ for ($i = count($encodings); --$i >= 0;) {
+ if (strcasecmp($encodings[$i], 'identity') === 0) {
+ continue;
+ }
+ if (!$decoder = self::decoder($encodings[$i])) {
+ throw new UnexpectedValueException(sprintf('Not supported decompression encoding "%s"', $encodings[$i]));
+ }
+
+ $value = $decoder($value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Resolve an array or CSV of compression types to a list
+ */
+ public static function compression($compression): array
+ {
+ if (is_array($compression)) {
+ return $compression;
+ }
+ if (!$compression) {
+ return [];
+ }
+ if (strpos($compression, ',') === false) {
+ return [$compression];
+ }
+
+ return array_map('trim', explode(',', $compression));
+ }
+
+ private static function encoder(string $encoding): ?callable
+ {
+ static $encoders;
+
+ /** @noinspection SpellCheckingInspection */
+ $encoders ??= array_map(fn (callable $callable): callable => self::throwOnErrorOrFalse($callable), array_filter([
+ TransportFactoryInterface::COMPRESSION_GZIP => 'gzencode',
+ TransportFactoryInterface::COMPRESSION_DEFLATE => 'gzcompress',
+ TransportFactoryInterface::COMPRESSION_BROTLI => 'brotli_compress',
+ ], 'function_exists'));
+
+ return $encoders[$encoding] ?? null;
+ }
+
+ private static function decoder(string $encoding): ?callable
+ {
+ static $decoders;
+
+ /** @noinspection SpellCheckingInspection */
+ $decoders ??= array_map(fn (callable $callable): callable => self::throwOnErrorOrFalse($callable), array_filter([
+ TransportFactoryInterface::COMPRESSION_GZIP => 'gzdecode',
+ TransportFactoryInterface::COMPRESSION_DEFLATE => 'gzuncompress',
+ TransportFactoryInterface::COMPRESSION_BROTLI => 'brotli_uncompress',
+ ], 'function_exists'));
+
+ return $decoders[$encoding] ?? null;
+ }
+
+ private static function throwOnErrorOrFalse(callable $callable): callable
+ {
+ return static function (...$args) use ($callable) {
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ try {
+ $result = $callable(...$args);
+ } finally {
+ restore_error_handler();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ if ($result === false) {
+ throw new LogicException();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ return $result;
+ };
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php
new file mode 100644
index 000000000..4b99cf756
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Stream;
+
+use BadMethodCallException;
+use ErrorException;
+use function fflush;
+use function fwrite;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\ErrorFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use function restore_error_handler;
+use RuntimeException;
+use function set_error_handler;
+use function strlen;
+use Throwable;
+
+/**
+ * @internal
+ *
+ * @psalm-template CONTENT_TYPE of string
+ * @template-implements TransportInterface<CONTENT_TYPE>
+ */
+final class StreamTransport implements TransportInterface
+{
+ /**
+ * @var resource|null
+ */
+ private $stream;
+ private string $contentType;
+
+ /**
+ * @param resource $stream
+ *
+ * @psalm-param CONTENT_TYPE $contentType
+ */
+ public function __construct($stream, string $contentType)
+ {
+ $this->stream = $stream;
+ $this->contentType = $contentType;
+ }
+
+ public function contentType(): string
+ {
+ return $this->contentType;
+ }
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if (!$this->stream) {
+ return new ErrorFuture(new BadMethodCallException('Transport closed'));
+ }
+
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ try {
+ $bytesWritten = fwrite($this->stream, $payload);
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ } finally {
+ restore_error_handler();
+ }
+
+ if ($bytesWritten !== strlen($payload)) {
+ return new ErrorFuture(new RuntimeException(sprintf('Write failure, wrote %d of %d bytes', $bytesWritten, strlen($payload))));
+ }
+
+ return new CompletedFuture(null);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if (!$this->stream) {
+ return false;
+ }
+
+ $flush = @fflush($this->stream);
+ $this->stream = null;
+
+ return $flush;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if (!$this->stream) {
+ return false;
+ }
+
+ return @fflush($this->stream);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php
new file mode 100644
index 000000000..59e411318
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransportFactory.php
@@ -0,0 +1,118 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export\Stream;
+
+use ErrorException;
+use function fopen;
+use function implode;
+use function is_resource;
+use LogicException;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function stream_context_create;
+
+/**
+ * @psalm-internal \OpenTelemetry
+ */
+final class StreamTransportFactory implements TransportFactoryInterface
+{
+ /**
+ * @param string|resource $endpoint
+ * @param array<string, string|string[]> $headers
+ * @param string|string[]|null $compression
+ *
+ * @psalm-template CONTENT_TYPE of string
+ * @psalm-param CONTENT_TYPE $contentType
+ * @psalm-return TransportInterface<CONTENT_TYPE>
+ */
+ public function create(
+ $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): TransportInterface {
+ assert(!empty($endpoint));
+ $stream = is_resource($endpoint)
+ ? $endpoint
+ : self::createStream(
+ $endpoint,
+ $contentType,
+ $headers,
+ $timeout,
+ $cacert,
+ $cert,
+ $key,
+ );
+
+ return new StreamTransport($stream, $contentType);
+ }
+
+ /**
+ * @throws ErrorException
+ * @return resource
+ */
+ private static function createStream(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ float $timeout = 10.,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ) {
+ $context = stream_context_create([
+ 'http' => [
+ 'method' => 'POST',
+ 'header' => self::createHeaderArray($contentType, $headers),
+ 'timeout' => $timeout,
+ ],
+ 'ssl' => [
+ 'cafile' => $cacert,
+ 'local_cert' => $cert,
+ 'local_pk' => $key,
+ ],
+ ]);
+
+ set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): bool {
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
+ });
+
+ /**
+ * @psalm-suppress PossiblyNullArgument
+ */
+ try {
+ $stream = fopen($endpoint, 'ab', false, $context);
+ } finally {
+ restore_error_handler();
+ }
+
+ /** @phan-suppress-next-line PhanPossiblyUndeclaredVariable */
+ if (!$stream) {
+ throw new LogicException(sprintf('Failed opening stream "%s"', $endpoint));
+ }
+
+ return $stream;
+ }
+
+ private static function createHeaderArray(string $contentType, array $headers): array
+ {
+ $header = [];
+ $header[] = sprintf('Content-Type: %s', $contentType);
+ foreach ($headers as $name => $value) {
+ $header[] = sprintf('%s: %s', $name, implode(', ', (array) $value));
+ }
+
+ return $header;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php
new file mode 100644
index 000000000..48e538443
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/TransportFactoryInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export;
+
+interface TransportFactoryInterface
+{
+ public const COMPRESSION_GZIP = 'gzip';
+ public const COMPRESSION_DEFLATE = 'deflate';
+ public const COMPRESSION_BROTLI = 'br';
+
+ /**
+ * @psalm-template CONTENT_TYPE of string
+ * @psalm-param CONTENT_TYPE $contentType
+ * @psalm-param array<string, string|string[]> $headers
+ * @psalm-param string|string[]|null $compression
+ * @psalm-return TransportInterface<CONTENT_TYPE>
+ */
+ public function create(
+ string $endpoint,
+ string $contentType,
+ array $headers = [],
+ $compression = null,
+ float $timeout = 10.,
+ int $retryDelay = 100,
+ int $maxRetries = 3,
+ ?string $cacert = null,
+ ?string $cert = null,
+ ?string $key = null
+ ): TransportInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php b/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php
new file mode 100644
index 000000000..5fb26eff8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Export/TransportInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Export;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+/**
+ * @psalm-template-covariant CONTENT_TYPE of string
+ */
+interface TransportInterface
+{
+ public function contentType(): string;
+
+ public function send(string $payload, ?CancellationInterface $cancellation = null): FutureInterface;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
new file mode 100644
index 000000000..16909ec6d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/CancellationInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+interface CancellationInterface
+{
+ /**
+ * @param Closure(Throwable): void $callback
+ */
+ public function subscribe(Closure $callback): string;
+
+ public function unsubscribe(string $id): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php b/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php
new file mode 100644
index 000000000..7f0cd6536
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+/**
+ * @template T
+ * @template-implements FutureInterface<T>
+ */
+final class CompletedFuture implements FutureInterface
+{
+ /** @var T */
+ private $value;
+
+ /**
+ * @param T $value
+ */
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+
+ public function await()
+ {
+ return $this->value;
+ }
+
+ public function map(Closure $closure): FutureInterface
+ {
+ $c = $closure;
+ unset($closure);
+
+ try {
+ return new CompletedFuture($c($this->value));
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+ }
+
+ public function catch(Closure $closure): FutureInterface
+ {
+ return $this;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php b/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php
new file mode 100644
index 000000000..32cf3d995
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+use Throwable;
+
+final class ErrorFuture implements FutureInterface
+{
+ private Throwable $throwable;
+
+ public function __construct(Throwable $throwable)
+ {
+ $this->throwable = $throwable;
+ }
+
+ public function await()
+ {
+ throw $this->throwable;
+ }
+
+ public function map(Closure $closure): FutureInterface
+ {
+ return $this;
+ }
+
+ public function catch(Closure $closure): FutureInterface
+ {
+ $c = $closure;
+ unset($closure);
+
+ try {
+ return new CompletedFuture($c($this->throwable));
+ } catch (Throwable $e) {
+ return new ErrorFuture($e);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php b/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php
new file mode 100644
index 000000000..850699bf6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/FutureInterface.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+
+/**
+ * @template-covariant T
+ */
+interface FutureInterface
+{
+ /**
+ * @psalm-return T
+ */
+ public function await();
+
+ /**
+ * @psalm-template U
+ * @psalm-param Closure(T): U $closure
+ * @psalm-return FutureInterface<U>
+ *
+ * @psalm-suppress InvalidTemplateParam
+ */
+ public function map(Closure $closure): FutureInterface;
+
+ /**
+ * @psalm-template U
+ * @psalm-param Closure(\Throwable): U $closure
+ * @psalm-return FutureInterface<T|U>
+ */
+ public function catch(Closure $closure): FutureInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php b/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php
new file mode 100644
index 000000000..5e5b642f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Future/NullCancellation.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Future;
+
+use Closure;
+
+final class NullCancellation implements CancellationInterface
+{
+ public function subscribe(Closure $callback): string
+ {
+ return self::class;
+ }
+
+ public function unsubscribe(string $id): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php
new file mode 100644
index 000000000..824335213
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/DependencyResolverInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http;
+
+use OpenTelemetry\SDK\Common\Http\HttpPlug\Client\ResolverInterface as HttpPlugClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Client\ResolverInterface as PsrClientResolverInterface;
+use OpenTelemetry\SDK\Common\Http\Psr\Message\FactoryResolverInterface;
+
+interface DependencyResolverInterface extends FactoryResolverInterface, PsrClientResolverInterface, HttpPlugClientResolverInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php
new file mode 100644
index 000000000..3b2f4d53e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/HttpPlug/Client/ResolverInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\HttpPlug\Client;
+
+use Http\Client\HttpAsyncClient;
+
+interface ResolverInterface
+{
+ public function resolveHttpPlugAsyncClient(): HttpAsyncClient;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php
new file mode 100644
index 000000000..ba028e38a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Client/ResolverInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Client;
+
+use Psr\Http\Client\ClientInterface;
+
+interface ResolverInterface
+{
+ public function resolvePsrClient(): ClientInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php
new file mode 100644
index 000000000..4582e19ce
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/FactoryResolverInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+interface FactoryResolverInterface
+{
+ public function resolveRequestFactory(): RequestFactoryInterface;
+ public function resolveResponseFactory(): ResponseFactoryInterface;
+ public function resolveServerRequestFactory(): ServerRequestFactoryInterface;
+ public function resolveStreamFactory(): StreamFactoryInterface;
+ public function resolveUploadedFileFactory(): UploadedFileFactoryInterface;
+ public function resolveUriFactory(): UriFactoryInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php
new file mode 100644
index 000000000..8e99d64c0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactory.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\ServerRequestInterface;
+
+final class MessageFactory implements MessageFactoryInterface
+{
+ private RequestFactoryInterface $requestFactory;
+ private ResponseFactoryInterface $responseFactory;
+ private ServerRequestFactoryInterface $serverRequestFactory;
+
+ public function __construct(
+ RequestFactoryInterface $requestFactory,
+ ResponseFactoryInterface $responseFactory,
+ ServerRequestFactoryInterface $serverRequestFactory
+ ) {
+ $this->requestFactory = $requestFactory;
+ $this->responseFactory = $responseFactory;
+ $this->serverRequestFactory = $serverRequestFactory;
+ }
+
+ public static function create(
+ RequestFactoryInterface $requestFactory,
+ ResponseFactoryInterface $responseFactory,
+ ServerRequestFactoryInterface $serverRequestFactory
+ ): self {
+ return new self($requestFactory, $responseFactory, $serverRequestFactory);
+ }
+
+ public function createRequest(string $method, $uri): RequestInterface
+ {
+ return $this->requestFactory->createRequest($method, $uri);
+ }
+
+ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
+ {
+ return $this->responseFactory->createResponse($code, $reasonPhrase);
+ }
+
+ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
+ {
+ return $this->serverRequestFactory->createServerRequest($method, $uri, $serverParams);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php
new file mode 100644
index 000000000..97258491f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Http/Psr/Message/MessageFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Http\Psr\Message;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+
+interface MessageFactoryInterface extends RequestFactoryInterface, ServerRequestFactoryInterface, ResponseFactoryInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php
new file mode 100644
index 000000000..ec9b52fb0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScope.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * Represents the instrumentation scope information associated with the Tracer or Meter
+ */
+final class InstrumentationScope implements InstrumentationScopeInterface
+{
+ private string $name;
+ private ?string $version;
+ private ?string $schemaUrl;
+ private AttributesInterface $attributes;
+
+ public function __construct(string $name, ?string $version, ?string $schemaUrl, AttributesInterface $attributes)
+ {
+ $this->name = $name;
+ $this->version = $version;
+ $this->schemaUrl = $schemaUrl;
+ $this->attributes = $attributes;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getVersion(): ?string
+ {
+ return $this->version;
+ }
+
+ public function getSchemaUrl(): ?string
+ {
+ return $this->schemaUrl;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php
new file mode 100644
index 000000000..f1ae7c072
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactory.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+final class InstrumentationScopeFactory implements InstrumentationScopeFactoryInterface
+{
+ private AttributesFactoryInterface $attributesFactory;
+
+ public function __construct(AttributesFactoryInterface $attributesFactory)
+ {
+ $this->attributesFactory = $attributesFactory;
+ }
+
+ public function create(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): InstrumentationScopeInterface {
+ return new InstrumentationScope(
+ $name,
+ $version,
+ $schemaUrl,
+ $this->attributesFactory->builder($attributes)->build(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php
new file mode 100644
index 000000000..78292de58
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeFactoryInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+interface InstrumentationScopeFactoryInterface
+{
+ public function create(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): InstrumentationScopeInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php
new file mode 100644
index 000000000..43ba71d89
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Instrumentation/InstrumentationScopeInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Instrumentation;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface InstrumentationScopeInterface
+{
+ public function getName(): string;
+
+ public function getVersion(): ?string;
+
+ public function getSchemaUrl(): ?string;
+
+ public function getAttributes(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php b/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php
new file mode 100644
index 000000000..33f4364f6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockFactory.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class ClockFactory implements ClockFactoryInterface
+{
+ private static ?ClockInterface $default = null;
+
+ public static function create(): self
+ {
+ return new self();
+ }
+
+ public function build(): ClockInterface
+ {
+ return new SystemClock();
+ }
+
+ public static function getDefault(): ClockInterface
+ {
+ return self::$default ?? self::$default = self::create()->build();
+ }
+
+ public static function setDefault(?ClockInterface $clock): void
+ {
+ self::$default = $clock;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php
new file mode 100644
index 000000000..6d9afde91
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockFactoryInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface ClockFactoryInterface
+{
+ public static function create(): self;
+
+ public function build(): ClockInterface;
+
+ public static function getDefault(): ClockInterface;
+
+ public static function setDefault(?ClockInterface $clock): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php b/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php
new file mode 100644
index 000000000..8f3170185
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/ClockInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface ClockInterface
+{
+ public const MILLIS_PER_SECOND = 1_000;
+ public const MICROS_PER_SECOND = 1_000_000;
+ public const NANOS_PER_SECOND = 1_000_000_000;
+ public const NANOS_PER_MILLISECOND = 1_000_000;
+ public const NANOS_PER_MICROSECOND = 1_000;
+
+ /**
+ * Returns the current epoch wall-clock timestamp in nanoseconds
+ */
+ public function now(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatch.php b/vendor/open-telemetry/sdk/Common/Time/StopWatch.php
new file mode 100644
index 000000000..b2abdabae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatch.php
@@ -0,0 +1,119 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class StopWatch implements StopWatchInterface
+{
+ private const INITIAL_ELAPSED_TIME = 0;
+
+ private ClockInterface $clock;
+ private bool $running = false;
+ private ?int $initialStartTime;
+ private ?int $startTime = null;
+ private ?int $stopTime = null;
+
+ public function __construct(ClockInterface $clock, ?int $initialStartTime = null)
+ {
+ $this->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/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php
new file mode 100644
index 000000000..f60c377fc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactory.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+final class StopWatchFactory implements StopWatchFactoryInterface
+{
+ private static ?StopWatchInterface $default = null;
+
+ private ClockInterface $clock;
+ private ?int $initialStartTime;
+
+ public function __construct(?ClockInterface $clock = null, ?int $initialStartTime = null)
+ {
+ $this->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/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php
new file mode 100644
index 000000000..9750f5769
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchFactoryInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface StopWatchFactoryInterface
+{
+ public static function create(?ClockInterface $clock = null, ?int $initialStartTime = null): self;
+
+ public static function fromClockFactory(ClockFactoryInterface $factory, ?int $initialStartTime = null): self;
+
+ public function build(): StopWatchInterface;
+
+ public static function getDefault(): StopWatchInterface;
+
+ public static function setDefault(?StopWatchInterface $default): void;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php b/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php
new file mode 100644
index 000000000..69a03b75e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/StopWatchInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+interface StopWatchInterface
+{
+ public function isRunning(): bool;
+
+ public function start(): void;
+
+ public function stop(): void;
+
+ public function reset(): void;
+
+ public function getElapsedTime(): int;
+
+ public function getLastElapsedTime(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Common/Time/SystemClock.php b/vendor/open-telemetry/sdk/Common/Time/SystemClock.php
new file mode 100644
index 000000000..f57e98490
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/SystemClock.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+use function hrtime;
+use function microtime;
+
+final class SystemClock implements ClockInterface
+{
+ private static int $referenceTime = 0;
+
+ public function __construct()
+ {
+ self::init();
+ }
+
+ public static function create(): self
+ {
+ return new self();
+ }
+
+ /** @inheritDoc */
+ public function now(): int
+ {
+ return self::$referenceTime + hrtime(true);
+ }
+
+ 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/vendor/open-telemetry/sdk/Common/Time/Util.php b/vendor/open-telemetry/sdk/Common/Time/Util.php
new file mode 100644
index 000000000..e1be1f750
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Time/Util.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Time;
+
+class Util
+{
+ /** @psalm-pure */
+ public static function nanosToMicros(int $nanoseconds): int
+ {
+ return intdiv($nanoseconds, ClockInterface::NANOS_PER_MICROSECOND);
+ }
+
+ /** @psalm-pure */
+ public static function nanosToMillis(int $nanoseconds): int
+ {
+ return intdiv($nanoseconds, ClockInterface::NANOS_PER_MILLISECOND);
+ }
+
+ /** @psalm-pure */
+ public static function secondsToNanos(int $seconds): int
+ {
+ return $seconds * ClockInterface::NANOS_PER_SECOND;
+ }
+
+ /** @psalm-pure */
+ public static function millisToNanos(int $milliSeconds): int
+ {
+ return $milliSeconds * ClockInterface::NANOS_PER_MILLISECOND;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php b/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php
new file mode 100644
index 000000000..237e70ba5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/ClassConstantAccessor.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use LogicException;
+
+class ClassConstantAccessor
+{
+ public static function requireValue(string $className, string $constantName)
+ {
+ $constant = self::getFullName($className, $constantName);
+
+ if (!defined($constant)) {
+ throw new LogicException(
+ sprintf('The class "%s" does not have a constant "%s"', $className, $constantName)
+ );
+ }
+
+ return constant($constant);
+ }
+
+ public static function getValue(string $className, string $constantName)
+ {
+ $constant = self::getFullName($className, $constantName);
+
+ return defined($constant) ? constant($constant) : null;
+ }
+
+ private static function getFullName(string $className, string $constantName): string
+ {
+ return sprintf('%s::%s', $className, $constantName);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php b/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php
new file mode 100644
index 000000000..2de6d47df
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/ShutdownHandler.php
@@ -0,0 +1,82 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use function array_key_last;
+use ArrayAccess;
+use Closure;
+use function register_shutdown_function;
+
+final class ShutdownHandler
+{
+ /** @var array<int, Closure>|null */
+ private static ?array $handlers = null;
+ /** @var ArrayAccess<object, self>|null */
+ private static ?ArrayAccess $weakMap = null;
+
+ private array $ids = [];
+
+ private function __construct()
+ {
+ }
+
+ public function __destruct()
+ {
+ if (!self::$handlers) {
+ return;
+ }
+ foreach ($this->ids as $id) {
+ unset(self::$handlers[$id]);
+ }
+ }
+
+ /**
+ * Registers a function that will be executed on shutdown.
+ *
+ * If the given function is bound to an object, then the function will only
+ * be executed if the bound object is still referenced on shutdown handler
+ * invocation.
+ *
+ * ```php
+ * ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ * ```
+ *
+ * @param callable $shutdownFunction function to register
+ *
+ * @see register_shutdown_function
+ */
+ public static function register(callable $shutdownFunction): void
+ {
+ self::registerShutdownFunction();
+ self::$handlers[] = weaken(closure($shutdownFunction), $target);
+
+ if (!$object = $target) {
+ return;
+ }
+
+ self::$weakMap ??= WeakMap::create();
+ $handler = self::$weakMap[$object] ??= new self();
+ $handler->ids[] = array_key_last(self::$handlers);
+ }
+
+ private static function registerShutdownFunction(): void
+ {
+ if (self::$handlers === null) {
+ register_shutdown_function(static function (): void {
+ $handlers = self::$handlers;
+ self::$handlers = null;
+ self::$weakMap = null;
+
+ // Push shutdown to end of queue
+ // @phan-suppress-next-line PhanTypeMismatchArgumentInternal
+ register_shutdown_function(static function (array $handlers): void {
+ foreach ($handlers as $handler) {
+ $handler();
+ }
+ }, $handlers);
+ });
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/WeakMap.php b/vendor/open-telemetry/sdk/Common/Util/WeakMap.php
new file mode 100644
index 000000000..3b62d6d64
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/WeakMap.php
@@ -0,0 +1,175 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use ArrayAccess;
+use function assert;
+use function class_exists;
+use function count;
+use Countable;
+use Error;
+use function get_class;
+use function is_object;
+use IteratorAggregate;
+use const PHP_VERSION_ID;
+use function spl_object_id;
+use function sprintf;
+use Traversable;
+use TypeError;
+use WeakReference;
+
+/**
+ * @internal
+ */
+final class WeakMap implements ArrayAccess, Countable, IteratorAggregate
+{
+ private const KEY = '__otel_weak_map';
+
+ /**
+ * @var array<int, WeakReference>
+ */
+ private array $objects = [];
+
+ private function __construct()
+ {
+ }
+
+ /**
+ * @return ArrayAccess&Countable&IteratorAggregate
+ */
+ public static function create(): ArrayAccess
+ {
+ if (PHP_VERSION_ID >= 80000) {
+ /** @phan-suppress-next-line PhanUndeclaredClassReference */
+ assert(class_exists(\WeakMap::class, false));
+ /** @phan-suppress-next-line PhanUndeclaredClassMethod */
+ $map = new \WeakMap();
+ assert($map instanceof ArrayAccess);
+ assert($map instanceof Countable);
+ assert($map instanceof IteratorAggregate);
+
+ return $map;
+ }
+
+ return new self();
+ }
+
+ public function offsetExists($offset): bool
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+
+ return isset($offset->{self::KEY}[spl_object_id($this)]);
+ }
+
+ /**
+ * @phan-suppress PhanUndeclaredClassAttribute
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ throw new Error(sprintf('Object %s#%d not contained in WeakMap', get_class($offset), spl_object_id($offset)));
+ }
+
+ return $offset->{self::KEY}[spl_object_id($this)];
+ }
+
+ public function offsetSet($offset, $value): void
+ {
+ if ($offset === null) {
+ throw new Error('Cannot append to WeakMap');
+ }
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ $this->expunge();
+ }
+
+ $offset->{self::KEY}[spl_object_id($this)] = $value;
+ $this->objects[spl_object_id($offset)] = WeakReference::create($offset);
+ }
+
+ public function offsetUnset($offset): void
+ {
+ if (!is_object($offset)) {
+ throw new TypeError('WeakMap key must be an object');
+ }
+ if (!$this->contains($offset)) {
+ return;
+ }
+
+ unset(
+ $offset->{self::KEY}[spl_object_id($this)],
+ $this->objects[spl_object_id($offset)],
+ );
+ if (!$offset->{self::KEY}) {
+ unset($offset->{self::KEY});
+ }
+ }
+
+ public function count(): int
+ {
+ $this->expunge();
+
+ return count($this->objects);
+ }
+
+ public function getIterator(): Traversable
+ {
+ $this->expunge();
+
+ foreach ($this->objects as $reference) {
+ if (($object = $reference->get()) && $this->contains($object)) {
+ yield $object => $this[$object];
+ }
+ }
+ }
+
+ public function __debugInfo(): array
+ {
+ $debugInfo = [];
+ foreach ($this as $key => $value) {
+ $debugInfo[] = ['key' => $key, 'value' => $value];
+ }
+
+ return $debugInfo;
+ }
+
+ public function __destruct()
+ {
+ foreach ($this->objects as $reference) {
+ if ($object = $reference->get()) {
+ unset($this[$object]);
+ }
+ }
+ }
+
+ private function contains(object $offset): bool
+ {
+ $reference = $this->objects[spl_object_id($offset)] ?? null;
+ if ($reference && $reference->get() === $offset) {
+ return true;
+ }
+
+ unset($this->objects[spl_object_id($offset)]);
+
+ return false;
+ }
+
+ private function expunge(): void
+ {
+ foreach ($this->objects as $id => $reference) {
+ if (!$reference->get()) {
+ unset($this->objects[$id]);
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Common/Util/functions.php b/vendor/open-telemetry/sdk/Common/Util/functions.php
new file mode 100644
index 000000000..f4fb13b80
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Common/Util/functions.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Common\Util;
+
+use Closure;
+use function get_class;
+use ReflectionFunction;
+use stdClass;
+use WeakReference;
+
+/**
+ * @internal
+ */
+function closure(callable $callable): Closure
+{
+ return Closure::fromCallable($callable);
+}
+
+/**
+ * @internal
+ * @see https://github.com/amphp/amp/blob/f682341c856b1f688026f787bef4f77eaa5c7970/src/functions.php#L140-L191
+ */
+function weaken(Closure $closure, ?object &$target = null): Closure
+{
+ $reflection = new ReflectionFunction($closure);
+ if (!$target = $reflection->getClosureThis()) {
+ return $closure;
+ }
+
+ $scope = $reflection->getClosureScopeClass();
+ $name = $reflection->getShortName();
+ if ($name !== '{closure}') {
+ /** @psalm-suppress InvalidScope @phpstan-ignore-next-line @phan-suppress-next-line PhanUndeclaredThis */
+ $closure = fn (...$args) => $this->$name(...$args);
+ if ($scope !== null) {
+ $closure = $closure->bindTo(null, $scope->name);
+ }
+ }
+
+ static $placeholder;
+ $placeholder ??= new stdClass();
+ $closure = $closure->bindTo($placeholder);
+
+ $ref = WeakReference::create($target);
+
+ /** @psalm-suppress PossiblyInvalidFunctionCall */
+ return $scope && get_class($target) === $scope->name && !$scope->isInternal()
+ ? static fn (...$args) => ($obj = $ref->get()) ? $closure->call($obj, ...$args) : null
+ : static fn (...$args) => ($obj = $ref->get()) ? $closure->bindTo($obj)(...$args) : null;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php
new file mode 100644
index 000000000..e34fa308c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\ReadableLogRecord;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * A JSON console exporter for LogRecords. This is only useful for testing; the
+ * output is human-readable, and is not compatible with the OTLP format.
+ */
+class ConsoleExporter implements LogRecordExporterInterface
+{
+ private TransportInterface $transport;
+
+ public function __construct(TransportInterface $transport)
+ {
+ $this->transport = $transport;
+ }
+
+ /**
+ * @param iterable<mixed, ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $resource = null;
+ $scopes = [];
+ foreach ($batch as $record) {
+ if (!$resource) {
+ $resource = $this->convertResource($record->getResource());
+ }
+ $key = $this->scopeKey($record->getInstrumentationScope());
+ if (!array_key_exists($key, $scopes)) {
+ $scopes[$key] = $this->convertInstrumentationScope($record->getInstrumentationScope());
+ }
+ $scopes[$key]['logs'][] = $this->convertLogRecord($record);
+ }
+ $output = [
+ 'resource' => $resource,
+ 'scopes' => array_values($scopes),
+ ];
+ $this->transport->send(json_encode($output, JSON_PRETTY_PRINT));
+
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+ private function convertLogRecord(ReadableLogRecord $record): array
+ {
+ $spanContext = $record->getSpanContext();
+
+ return [
+ 'timestamp' => $record->getTimestamp(),
+ 'observed_timestamp' => $record->getObservedTimestamp(),
+ 'severity_number' => $record->getSeverityNumber(),
+ 'severity_text' => $record->getSeverityText(),
+ 'body' => $record->getBody(),
+ 'trace_id' => $spanContext !== null ? $spanContext->getTraceId() : '',
+ 'span_id' => $spanContext !== null ? $spanContext->getSpanId() : '',
+ 'trace_flags' => $spanContext !== null ? $spanContext->getTraceFlags() : null,
+ 'attributes' => $record->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $record->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+
+ private function convertResource(ResourceInfo $resource): array
+ {
+ return [
+ 'attributes' => $resource->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $resource->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+
+ private function scopeKey(InstrumentationScopeInterface $scope): string
+ {
+ return serialize([$scope->getName(), $scope->getVersion(), $scope->getSchemaUrl(), $scope->getAttributes()]);
+ }
+
+ private function convertInstrumentationScope(InstrumentationScopeInterface $scope): array
+ {
+ return [
+ 'name' => $scope->getName(),
+ 'version' => $scope->getVersion(),
+ 'attributes' => $scope->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $scope->getAttributes()->getDroppedAttributesCount(),
+ 'schema_url' => $scope->getSchemaUrl(),
+ 'logs' => [],
+ ];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php
new file mode 100644
index 000000000..a959540a0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporterFactory.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Registry;
+
+class ConsoleExporterFactory implements LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface
+ {
+ $transport = Registry::transportFactory('stream')->create('php://stdout', 'application/json');
+
+ return new ConsoleExporter($transport);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php
new file mode 100644
index 000000000..dca0531f3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use ArrayObject;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class InMemoryExporter implements LogRecordExporterInterface
+{
+ private ArrayObject $storage;
+
+ public function __construct(?ArrayObject $storage = null)
+ {
+ $this->storage = $storage ?? new ArrayObject();
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ foreach ($batch as $record) {
+ $this->storage[] = $record;
+ }
+
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function getStorage(): ArrayObject
+ {
+ return $this->storage;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php
new file mode 100644
index 000000000..6f24defe0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class InMemoryExporterFactory implements LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php
new file mode 100644
index 000000000..8eeff62bd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Exporter;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+
+class NoopExporter implements LogRecordExporterInterface
+{
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ return new CompletedFuture(true);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/_register.php b/vendor/open-telemetry/sdk/Logs/Exporter/_register.php
new file mode 100644
index 000000000..96958baa8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Exporter/_register.php
@@ -0,0 +1,6 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('console', \OpenTelemetry\SDK\Logs\Exporter\ConsoleExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerLogRecordExporterFactory('memory', \OpenTelemetry\SDK\Logs\Exporter\InMemoryExporterFactory::class);
diff --git a/vendor/open-telemetry/sdk/Logs/ExporterFactory.php b/vendor/open-telemetry/sdk/Logs/ExporterFactory.php
new file mode 100644
index 000000000..2a560ae95
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ExporterFactory.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Logs\Exporter\NoopExporter;
+use OpenTelemetry\SDK\Registry;
+
+class ExporterFactory
+{
+ public function create(): LogRecordExporterInterface
+ {
+ $exporters = Configuration::getList(Variables::OTEL_LOGS_EXPORTER);
+ if (1 !== count($exporters)) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_TRACES_EXPORTER));
+ }
+ $exporter = $exporters[0];
+ if ($exporter === 'none') {
+ return new NoopExporter();
+ }
+ $factory = Registry::logRecordExporterFactory($exporter);
+
+ return $factory->create();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php
new file mode 100644
index 000000000..523bec1ba
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordExporterFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+interface LogRecordExporterFactoryInterface
+{
+ public function create(): LogRecordExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php
new file mode 100644
index 000000000..cf9e1aca8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordExporterInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+interface LogRecordExporterInterface
+{
+ /**
+ * @param iterable<ReadableLogRecord> $batch
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface;
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php b/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php
new file mode 100644
index 000000000..9f71e62ee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordLimits.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logrecord-limits
+ */
+class LogRecordLimits
+{
+ private AttributesFactoryInterface $attributesFactory;
+
+ /**
+ * @internal Use {@see SpanLimitsBuilder} to create {@see SpanLimits} instance.
+ */
+ public function __construct(
+ AttributesFactoryInterface $attributesFactory
+ ) {
+ $this->attributesFactory = $attributesFactory;
+ }
+
+ public function getAttributeFactory(): AttributesFactoryInterface
+ {
+ return $this->attributesFactory;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php b/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php
new file mode 100644
index 000000000..3aa5217ef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordLimitsBuilder.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use const PHP_INT_MAX;
+
+class LogRecordLimitsBuilder
+{
+ /** @var ?int Maximum allowed attribute count per record */
+ private ?int $attributeCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute value length */
+ private ?int $attributeValueLengthLimit = null;
+
+ /**
+ * @param int $attributeCountLimit Maximum allowed attribute count per record
+ */
+ public function setAttributeCountLimit(int $attributeCountLimit): LogRecordLimitsBuilder
+ {
+ $this->attributeCountLimit = $attributeCountLimit;
+
+ return $this;
+ }
+
+ /**
+ * @param int $attributeValueLengthLimit Maximum allowed attribute value length
+ */
+ public function setAttributeValueLengthLimit(int $attributeValueLengthLimit): LogRecordLimitsBuilder
+ {
+ $this->attributeValueLengthLimit = $attributeValueLengthLimit;
+
+ return $this;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits
+ */
+ public function build(): LogRecordLimits
+ {
+ $attributeCountLimit = $this->attributeCountLimit
+ ?: Configuration::getInt(Variables::OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT);
+ $attributeValueLengthLimit = $this->attributeValueLengthLimit
+ ?: Configuration::getInt(Variables::OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT);
+
+ if ($attributeValueLengthLimit === PHP_INT_MAX) {
+ $attributeValueLengthLimit = null;
+ }
+
+ $attributesFactory = Attributes::factory($attributeCountLimit, $attributeValueLengthLimit);
+
+ return new LogRecordLimits($attributesFactory);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php
new file mode 100644
index 000000000..dec463735
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorFactory.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\MultiLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\NoopLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\SimpleLogRecordProcessor;
+
+class LogRecordProcessorFactory
+{
+ public function create(LogRecordExporterInterface $exporter, ?MeterProviderInterface $meterProvider = null): LogRecordProcessorInterface
+ {
+ $processors = [];
+ $list = Configuration::getList(Variables::OTEL_PHP_LOGS_PROCESSOR);
+ foreach ($list as $name) {
+ $processors[] = $this->createProcessor($name, $exporter, $meterProvider);
+ }
+
+ switch (count($processors)) {
+ case 0:
+ return NoopLogRecordProcessor::getInstance();
+ case 1:
+ return $processors[0];
+ default:
+ return new MultiLogRecordProcessor($processors);
+ }
+ }
+
+ private function createProcessor(string $name, LogRecordExporterInterface $exporter, ?MeterProviderInterface $meterProvider = null): LogRecordProcessorInterface
+ {
+ switch ($name) {
+ case KnownValues::VALUE_BATCH:
+ return new BatchLogRecordProcessor(
+ $exporter,
+ ClockFactory::getDefault(),
+ Configuration::getInt(Variables::OTEL_BLRP_MAX_QUEUE_SIZE),
+ Configuration::getInt(Variables::OTEL_BLRP_SCHEDULE_DELAY),
+ Configuration::getInt(Variables::OTEL_BLRP_EXPORT_TIMEOUT),
+ Configuration::getInt(Variables::OTEL_BLRP_MAX_EXPORT_BATCH_SIZE),
+ true,
+ $meterProvider,
+ );
+ case KnownValues::VALUE_SIMPLE:
+ return new SimpleLogRecordProcessor($exporter);
+ case Values::VALUE_NOOP:
+ case Values::VALUE_NONE:
+ return NoopLogRecordProcessor::getInstance();
+ default:
+ throw new InvalidArgumentException('Unknown processor: ' . $name);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php
new file mode 100644
index 000000000..1977d48fd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LogRecordProcessorInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+interface LogRecordProcessorInterface
+{
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void;
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Logger.php b/vendor/open-telemetry/sdk/Logs/Logger.php
new file mode 100644
index 000000000..0b8db152d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Logger.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\LogRecord;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+/**
+ * Note that this logger class is deliberately NOT psr-3 compatible, per spec: "Note: this document defines a log
+ * backend API. The API is not intended to be called by application developers directly."
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md
+ */
+class Logger implements LoggerInterface
+{
+ private InstrumentationScopeInterface $scope;
+ private LoggerSharedState $loggerSharedState;
+
+ public function __construct(LoggerSharedState $loggerSharedState, InstrumentationScopeInterface $scope)
+ {
+ $this->loggerSharedState = $loggerSharedState;
+ $this->scope = $scope;
+ }
+
+ public function emit(LogRecord $logRecord): void
+ {
+ $readWriteLogRecord = new ReadWriteLogRecord($this->scope, $this->loggerSharedState, $logRecord);
+ // @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit
+ $this->loggerSharedState->getProcessor()->onEmit(
+ $readWriteLogRecord,
+ $readWriteLogRecord->getContext(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProvider.php b/vendor/open-telemetry/sdk/Logs/LoggerProvider.php
new file mode 100644
index 000000000..f0a8266c1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProvider.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\NoopLogger;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+class LoggerProvider implements LoggerProviderInterface
+{
+ private LoggerSharedState $loggerSharedState;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+
+ public function __construct(LogRecordProcessorInterface $processor, InstrumentationScopeFactoryInterface $instrumentationScopeFactory, ?ResourceInfo $resource = null)
+ {
+ $this->loggerSharedState = new LoggerSharedState(
+ $resource ?? ResourceInfoFactory::defaultResource(),
+ (new LogRecordLimitsBuilder())->build(),
+ $processor
+ );
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logger-creation
+ */
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ if ($this->loggerSharedState->hasShutdown()) {
+ return NoopLogger::getInstance();
+ }
+ $scope = $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes);
+
+ return new Logger($this->loggerSharedState, $scope);
+ }
+
+ public function shutdown(CancellationInterface $cancellation = null): bool
+ {
+ return $this->loggerSharedState->shutdown($cancellation);
+ }
+
+ public function forceFlush(CancellationInterface $cancellation = null): bool
+ {
+ return $this->loggerSharedState->forceFlush($cancellation);
+ }
+
+ public static function builder(): LoggerProviderBuilder
+ {
+ return new LoggerProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php
new file mode 100644
index 000000000..37c56245c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderBuilder.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Logs\Processor\MultiLogRecordProcessor;
+use OpenTelemetry\SDK\Logs\Processor\NoopLogRecordProcessor;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LoggerProviderBuilder
+{
+ /**
+ * @var array<LogRecordProcessorInterface>
+ */
+ private array $processors = [];
+ private ?ResourceInfo $resource = null;
+
+ public function addLogRecordProcessor(LogRecordProcessorInterface $processor): self
+ {
+ $this->processors[] = $processor;
+
+ return $this;
+ }
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function build(): LoggerProviderInterface
+ {
+ return new LoggerProvider(
+ $this->buildProcessor(),
+ new InstrumentationScopeFactory(Attributes::factory()),
+ $this->resource
+ );
+ }
+
+ private function buildProcessor(): LogRecordProcessorInterface
+ {
+ switch (count($this->processors)) {
+ case 0:
+ return NoopLogRecordProcessor::getInstance();
+ case 1:
+ return $this->processors[0];
+ default:
+ return new MultiLogRecordProcessor($this->processors);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php
new file mode 100644
index 000000000..3d0e965fd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderFactory.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Sdk;
+
+class LoggerProviderFactory
+{
+ public function create(?MeterProviderInterface $meterProvider = null): LoggerProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return NoopLoggerProvider::getInstance();
+ }
+ $exporter = (new ExporterFactory())->create();
+ $processor = (new LogRecordProcessorFactory())->create($exporter, $meterProvider);
+ $instrumentationScopeFactory = new InstrumentationScopeFactory((new LogRecordLimitsBuilder())->build()->getAttributeFactory());
+
+ return new LoggerProvider($processor, $instrumentationScopeFactory);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php b/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php
new file mode 100644
index 000000000..5debb13cc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerProviderInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs as API;
+
+interface LoggerProviderInterface extends API\LoggerProviderInterface
+{
+ public function shutdown(): bool;
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php b/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php
new file mode 100644
index 000000000..aeeb45518
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/LoggerSharedState.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class LoggerSharedState
+{
+ private ResourceInfo $resource;
+ private LogRecordProcessorInterface $processor;
+ private LogRecordLimits $limits;
+ private ?bool $shutdownResult = null;
+
+ public function __construct(
+ ResourceInfo $resource,
+ LogRecordLimits $limits,
+ LogRecordProcessorInterface $processor
+ ) {
+ $this->resource = $resource;
+ $this->limits = $limits;
+ $this->processor = $processor;
+ }
+ public function hasShutdown(): bool
+ {
+ return null !== $this->shutdownResult;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resource;
+ }
+
+ public function getProcessor(): LogRecordProcessorInterface
+ {
+ return $this->processor;
+ }
+
+ public function getLogRecordLimits(): LogRecordLimits
+ {
+ return $this->limits;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->shutdownResult !== null) {
+ return $this->shutdownResult;
+ }
+ $this->shutdownResult = $this->processor->shutdown($cancellation);
+
+ return $this->shutdownResult;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->processor->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php b/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php
new file mode 100644
index 000000000..819e02ee5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LoggerInterface;
+use OpenTelemetry\API\Logs\NoopLogger;
+
+class NoopLoggerProvider implements LoggerProviderInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
+ {
+ return NoopLogger::getInstance();
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php
new file mode 100644
index 000000000..fc6faca54
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/BatchLogRecordProcessor.php
@@ -0,0 +1,273 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+use SplQueue;
+use Throwable;
+
+class BatchLogRecordProcessor implements LogRecordProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ public const DEFAULT_SCHEDULE_DELAY = 1000;
+ public const DEFAULT_EXPORT_TIMEOUT = 30000;
+ public const DEFAULT_MAX_QUEUE_SIZE = 2048;
+ public const DEFAULT_MAX_EXPORT_BATCH_SIZE = 512;
+
+ private const ATTRIBUTES_PROCESSOR = ['processor' => 'batching'];
+ private const ATTRIBUTES_QUEUED = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued'];
+ private const ATTRIBUTES_PENDING = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending'];
+ private const ATTRIBUTES_PROCESSED = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed'];
+ private const ATTRIBUTES_DROPPED = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped'];
+ private const ATTRIBUTES_FREE = self::ATTRIBUTES_PROCESSOR + ['state' => 'free'];
+
+ private LogRecordExporterInterface $exporter;
+ private ClockInterface $clock;
+ private int $maxQueueSize;
+ private int $scheduledDelayNanos;
+ private int $maxExportBatchSize;
+ private bool $autoFlush;
+ private ContextInterface $exportContext;
+
+ private ?int $nextScheduledRun = null;
+ private bool $running = false;
+ private int $dropped = 0;
+ private int $processed = 0;
+ private int $batchId = 0;
+ private int $queueSize = 0;
+ /** @var list<ReadWriteLogRecord> */
+ private array $batch = [];
+ /** @var SplQueue<list<ReadWriteLogRecord>> */
+ private SplQueue $queue;
+ /** @var SplQueue<array{int, string, ?CancellationInterface, bool, ContextInterface}> */
+ private SplQueue $flush;
+
+ private bool $closed = false;
+
+ public function __construct(
+ LogRecordExporterInterface $exporter,
+ ClockInterface $clock,
+ int $maxQueueSize = self::DEFAULT_MAX_QUEUE_SIZE,
+ int $scheduledDelayMillis = self::DEFAULT_SCHEDULE_DELAY,
+ int $exportTimeoutMillis = self::DEFAULT_EXPORT_TIMEOUT,
+ int $maxExportBatchSize = self::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ bool $autoFlush = true,
+ ?MeterProviderInterface $meterProvider = null
+ ) {
+ if ($maxQueueSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum queue size (%d) must be greater than zero', $maxQueueSize));
+ }
+ if ($scheduledDelayMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Scheduled delay (%d) must be greater than zero', $scheduledDelayMillis));
+ }
+ if ($exportTimeoutMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Export timeout (%d) must be greater than zero', $exportTimeoutMillis));
+ }
+ if ($maxExportBatchSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be greater than zero', $maxExportBatchSize));
+ }
+ if ($maxExportBatchSize > $maxQueueSize) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be less than or equal to maximum queue size (%d)', $maxExportBatchSize, $maxQueueSize));
+ }
+
+ $this->exporter = $exporter;
+ $this->clock = $clock;
+ $this->maxQueueSize = $maxQueueSize;
+ $this->scheduledDelayNanos = $scheduledDelayMillis * 1_000_000;
+ $this->maxExportBatchSize = $maxExportBatchSize;
+ $this->autoFlush = $autoFlush;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ $this->flush = new SplQueue();
+
+ if ($meterProvider === null) {
+ return;
+ }
+
+ $meter = $meterProvider->getMeter('io.opentelemetry.sdk');
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.logs',
+ '{logs}',
+ 'The number of log records received by the processor',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $processed = $this->processed;
+ $dropped = $this->dropped;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($processed, self::ATTRIBUTES_PROCESSED);
+ $observer->observe($dropped, self::ATTRIBUTES_DROPPED);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.queue.limit',
+ '{logs}',
+ 'The queue size limit',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $observer->observe($this->maxQueueSize, self::ATTRIBUTES_PROCESSOR);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.logs.log_processor.queue.usage',
+ '{logs}',
+ 'The current queue usage',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $free = $this->maxQueueSize - $this->queueSize;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($free, self::ATTRIBUTES_FREE);
+ });
+ }
+
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ if ($this->closed) {
+ return;
+ }
+
+ if ($this->queueSize === $this->maxQueueSize) {
+ $this->dropped++;
+
+ return;
+ }
+
+ $this->queueSize++;
+ $this->batch[] = $record;
+ $this->nextScheduledRun ??= $this->clock->now() + $this->scheduledDelayNanos;
+
+ if (count($this->batch) === $this->maxExportBatchSize) {
+ $this->enqueueBatch();
+ }
+ if ($this->autoFlush) {
+ $this->flush();
+ }
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ private function flush(?string $flushMethod = null, ?CancellationInterface $cancellation = null): bool
+ {
+ if ($flushMethod !== null) {
+ $flushId = $this->batchId + $this->queue->count() + (int) (bool) $this->batch;
+ $this->flush->enqueue([$flushId, $flushMethod, $cancellation, !$this->running, Context::getCurrent()]);
+ }
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ for (;;) {
+ while (!$this->flush->isEmpty() && $this->flush->bottom()[0] <= $this->batchId) {
+ [, $flushMethod, $cancellation, $propagateResult, $context] = $this->flush->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $this->exporter->$flushMethod($cancellation);
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $flushMethod), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+
+ if (!$this->shouldFlush()) {
+ break;
+ }
+
+ if ($this->queue->isEmpty()) {
+ $this->enqueueBatch();
+ }
+ $batchSize = count($this->queue->bottom());
+ $this->batchId++;
+ $scope = $this->exportContext->activate();
+
+ try {
+ $this->exporter->export($this->queue->dequeue())->await();
+ } catch (Throwable $e) {
+ self::logError('Unhandled export error', ['exception' => $e]);
+ } finally {
+ $this->processed += $batchSize;
+ $this->queueSize -= $batchSize;
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+
+ private function shouldFlush(): bool
+ {
+ return !$this->flush->isEmpty()
+ || $this->autoFlush && !$this->queue->isEmpty()
+ || $this->autoFlush && $this->nextScheduledRun !== null && $this->clock->now() > $this->nextScheduledRun;
+ }
+
+ private function enqueueBatch(): void
+ {
+ assert($this->batch !== []);
+
+ $this->queue->enqueue($this->batch);
+ $this->batch = [];
+ $this->nextScheduledRun = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php
new file mode 100644
index 000000000..753a75df8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/MultiLogRecordProcessor.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class MultiLogRecordProcessor implements LogRecordProcessorInterface
+{
+ // @var LogRecordProcessorInterface[]
+ private array $processors = [];
+
+ public function __construct(array $processors)
+ {
+ foreach ($processors as $processor) {
+ assert($processor instanceof LogRecordProcessorInterface);
+ $this->processors[] = $processor;
+ }
+ }
+
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ foreach ($this->processors as $processor) {
+ $processor->onEmit($record, $context);
+ }
+ }
+
+ /**
+ * Returns `true` if all processors shut down successfully, else `false`
+ * Subsequent calls to `shutdown` are a no-op.
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+ foreach ($this->processors as $processor) {
+ if (!$processor->shutdown($cancellation)) {
+ $result = false;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns `true` if all processors flush successfully, else `false`.
+ */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+ foreach ($this->processors as $processor) {
+ if (!$processor->forceFlush($cancellation)) {
+ $result = false;
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php
new file mode 100644
index 000000000..7028052e1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/NoopLogRecordProcessor.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class NoopLogRecordProcessor implements LogRecordProcessorInterface
+{
+ public static function getInstance(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php b/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php
new file mode 100644
index 000000000..f26f6607c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/Processor/SimpleLogRecordProcessor.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs\Processor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterInterface;
+use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface;
+use OpenTelemetry\SDK\Logs\ReadWriteLogRecord;
+
+class SimpleLogRecordProcessor implements LogRecordProcessorInterface
+{
+ private LogRecordExporterInterface $exporter;
+ public function __construct(LogRecordExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit
+ */
+ public function onEmit(ReadWriteLogRecord $record, ?ContextInterface $context = null): void
+ {
+ $this->exporter->export([$record]);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->exporter->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->exporter->forceFlush($cancellation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php b/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php
new file mode 100644
index 000000000..3bb288c56
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/PsrSeverityMapperInterface.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use Psr\Log\LogLevel as PsrLogLevel;
+
+interface PsrSeverityMapperInterface
+{
+ /**
+ * Severity code according to rfc5424 (Syslog Protocol)
+ * @see : https://datatracker.ietf.org/doc/html/rfc5424#page-10
+ */
+ public const RFC_CODE = [
+ // Detailed debug information.
+ PsrLogLevel::DEBUG => 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/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php b/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php
new file mode 100644
index 000000000..9bb4b1564
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ReadWriteLogRecord.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+class ReadWriteLogRecord extends ReadableLogRecord
+{
+}
diff --git a/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php b/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php
new file mode 100644
index 000000000..5c6531477
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/ReadableLogRecord.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use OpenTelemetry\API\Logs\LogRecord;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Attribute\LogRecordAttributeValidator;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#log-and-event-record-definition
+ * "Note: Typically this will be implemented with a new interface or (immutable) value type."
+ */
+class ReadableLogRecord extends LogRecord
+{
+ private InstrumentationScopeInterface $scope;
+ private LoggerSharedState $loggerSharedState;
+ protected AttributesInterface $convertedAttributes;
+ protected SpanContextInterface $spanContext;
+
+ public function __construct(InstrumentationScopeInterface $scope, LoggerSharedState $loggerSharedState, LogRecord $logRecord)
+ {
+ $this->scope = $scope;
+ $this->loggerSharedState = $loggerSharedState;
+
+ parent::__construct($logRecord->body);
+ $this->timestamp = $logRecord->timestamp;
+ $this->observedTimestamp = $logRecord->observedTimestamp
+ ?? (int) (microtime(true) * LogRecord::NANOS_PER_SECOND);
+ $this->context = $logRecord->context;
+ $context = $this->context ?? Context::getCurrent();
+ $this->spanContext = Span::fromContext($context)->getContext();
+ $this->severityNumber = $logRecord->severityNumber;
+ $this->severityText = $logRecord->severityText;
+
+ //convert attributes now so that excess data is not sent to processors
+ $this->convertedAttributes = $this->loggerSharedState
+ ->getLogRecordLimits()
+ ->getAttributeFactory()
+ ->builder($logRecord->attributes, new LogRecordAttributeValidator())
+ ->build();
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->scope;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->loggerSharedState->getResource();
+ }
+
+ public function getTimestamp(): ?int
+ {
+ return $this->timestamp;
+ }
+
+ public function getObservedTimestamp(): ?int
+ {
+ return $this->observedTimestamp;
+ }
+
+ public function getContext(): ?ContextInterface
+ {
+ return $this->context;
+ }
+
+ public function getSpanContext(): ?SpanContextInterface
+ {
+ return $this->spanContext;
+ }
+
+ public function getSeverityNumber(): ?int
+ {
+ return $this->severityNumber;
+ }
+
+ public function getSeverityText(): ?string
+ {
+ return $this->severityText;
+ }
+
+ /**
+ * @return mixed|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->convertedAttributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php b/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php
new file mode 100644
index 000000000..9d9d55de6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Logs;
+
+use Psr\Log\InvalidArgumentException;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LoggerTrait;
+use Psr\Log\LogLevel;
+use ReflectionClass;
+use Throwable;
+
+class SimplePsrFileLogger implements LoggerInterface
+{
+ use LoggerTrait;
+
+ private const DEFAULT_LOGGER_NAME = 'otel';
+
+ private static ?array $logLevels = null;
+
+ private string $filename;
+
+ private string $loggerName ;
+
+ /**
+ * @param string $filename
+ */
+ public function __construct(string $filename, string $loggerName = self::DEFAULT_LOGGER_NAME)
+ {
+ $this->filename = $filename;
+ $this->loggerName = $loggerName;
+ }
+
+ /**
+ * @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/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php
new file mode 100644
index 000000000..d68ecd830
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramAggregation.php
@@ -0,0 +1,167 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use function array_fill;
+use function count;
+use const INF;
+use const NAN;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<ExplicitBucketHistogramSummary>
+ */
+final class ExplicitBucketHistogramAggregation implements AggregationInterface
+{
+ /**
+ * @var list<float|int>
+ * @readonly
+ */
+ public array $boundaries;
+
+ /**
+ * @param list<float|int> $boundaries strictly ascending histogram bucket boundaries
+ */
+ public function __construct(array $boundaries)
+ {
+ $this->boundaries = $boundaries;
+ }
+
+ public function initialize(): ExplicitBucketHistogramSummary
+ {
+ return new ExplicitBucketHistogramSummary(
+ 0,
+ 0,
+ +INF,
+ -INF,
+ array_fill(0, count($this->boundaries) + 1, 0),
+ );
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $boundariesCount = count($this->boundaries);
+ for ($i = 0; $i < $boundariesCount && $this->boundaries[$i] < $value; $i++) {
+ }
+ $summary->count++;
+ $summary->sum += $value;
+ $summary->min = self::min($value, $summary->min);
+ $summary->max = self::max($value, $summary->max);
+ $summary->buckets[$i]++;
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $left
+ * @param ExplicitBucketHistogramSummary $right
+ */
+ public function merge($left, $right): ExplicitBucketHistogramSummary
+ {
+ $count = $left->count + $right->count;
+ $sum = $left->sum + $right->sum;
+ $min = self::min($left->min, $right->min);
+ $max = self::max($left->max, $right->max);
+ $buckets = $right->buckets;
+ foreach ($left->buckets as $i => $bucketCount) {
+ $buckets[$i] += $bucketCount;
+ }
+
+ return new ExplicitBucketHistogramSummary(
+ $count,
+ $sum,
+ $min,
+ $max,
+ $buckets,
+ );
+ }
+
+ /**
+ * @param ExplicitBucketHistogramSummary $left
+ * @param ExplicitBucketHistogramSummary $right
+ */
+ public function diff($left, $right): ExplicitBucketHistogramSummary
+ {
+ $count = -$left->count + $right->count;
+ $sum = -$left->sum + $right->sum;
+ $min = $left->min > $right->min ? $right->min : NAN;
+ $max = $left->max < $right->max ? $right->max : NAN;
+ $buckets = $right->buckets;
+ foreach ($left->buckets as $i => $bucketCount) {
+ $buckets[$i] -= $bucketCount;
+ }
+
+ return new ExplicitBucketHistogramSummary(
+ $count,
+ $sum,
+ $min,
+ $max,
+ $buckets,
+ );
+ }
+
+ /**
+ * @param array<ExplicitBucketHistogramSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Histogram {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ if ($summaries[$key]->count === 0) {
+ continue;
+ }
+
+ $dataPoints[] = new Data\HistogramDataPoint(
+ $summaries[$key]->count,
+ $summaries[$key]->sum,
+ $summaries[$key]->min,
+ $summaries[$key]->max,
+ $summaries[$key]->buckets,
+ $this->boundaries,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Histogram(
+ $dataPoints,
+ $temporality,
+ );
+ }
+
+ /**
+ * @param float|int $left
+ * @param float|int $right
+ * @return float|int
+ */
+ private static function min($left, $right)
+ {
+ /** @noinspection PhpConditionAlreadyCheckedInspection */
+ return $left <= $right ? $left : ($right <= $left ? $right : NAN);
+ }
+
+ /**
+ * @param float|int $left
+ * @param float|int $right
+ * @return float|int
+ */
+ private static function max($left, $right)
+ {
+ /** @noinspection PhpConditionAlreadyCheckedInspection */
+ return $left >= $right ? $left : ($right >= $left ? $right : NAN);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php
new file mode 100644
index 000000000..1878a34a0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/ExplicitBucketHistogramSummary.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class ExplicitBucketHistogramSummary
+{
+ public int $count;
+ /**
+ * @var float|int
+ */
+ public $sum;
+ /**
+ * @var float|int
+ */
+ public $min;
+ /**
+ * @var float|int
+ */
+ public $max;
+ /**
+ * @var int[]
+ */
+ public array $buckets;
+ /**
+ * @param float|int $sum
+ * @param float|int $min
+ * @param float|int $max
+ * @param int[] $buckets
+ */
+ public function __construct(int $count, $sum, $min, $max, array $buckets)
+ {
+ $this->count = $count;
+ $this->sum = $sum;
+ $this->min = $min;
+ $this->max = $max;
+ $this->buckets = $buckets;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php
new file mode 100644
index 000000000..aff04e315
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueAggregation.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<LastValueSummary>
+ */
+final class LastValueAggregation implements AggregationInterface
+{
+ public function initialize(): LastValueSummary
+ {
+ return new LastValueSummary(null, 0);
+ }
+
+ /**
+ * @param LastValueSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ if ($summary->value === null || $timestamp >= $summary->timestamp) {
+ $summary->value = $value;
+ $summary->timestamp = $timestamp;
+ }
+ }
+
+ /**
+ * @param LastValueSummary $left
+ * @param LastValueSummary $right
+ */
+ public function merge($left, $right): LastValueSummary
+ {
+ return $right->timestamp >= $left->timestamp ? $right : $left;
+ }
+
+ /**
+ * @param LastValueSummary $left
+ * @param LastValueSummary $right
+ */
+ public function diff($left, $right): LastValueSummary
+ {
+ return $right->timestamp >= $left->timestamp ? $right : $left;
+ }
+
+ /**
+ * @param array<LastValueSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Gauge {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ if ($summaries[$key]->value === null) {
+ continue;
+ }
+
+ $dataPoints[] = new Data\NumberDataPoint(
+ $summaries[$key]->value,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Gauge(
+ $dataPoints,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php
new file mode 100644
index 000000000..6cdb5ac9f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/LastValueSummary.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class LastValueSummary
+{
+ /**
+ * @var float|int|null
+ */
+ public $value;
+ public int $timestamp;
+ /**
+ * @param float|int|null $value
+ */
+ public function __construct($value, int $timestamp)
+ {
+ $this->value = $value;
+ $this->timestamp = $timestamp;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php
new file mode 100644
index 000000000..dc317ce73
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumAggregation.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * @implements AggregationInterface<SumSummary>
+ */
+final class SumAggregation implements AggregationInterface
+{
+ private bool $monotonic;
+
+ public function __construct(bool $monotonic = false)
+ {
+ $this->monotonic = $monotonic;
+ }
+
+ public function initialize(): SumSummary
+ {
+ return new SumSummary(0);
+ }
+
+ /**
+ * @param SumSummary $summary
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $summary->value += $value;
+ }
+
+ /**
+ * @param SumSummary $left
+ * @param SumSummary $right
+ */
+ public function merge($left, $right): SumSummary
+ {
+ $sum = $left->value + $right->value;
+
+ return new SumSummary(
+ $sum,
+ );
+ }
+
+ /**
+ * @param SumSummary $left
+ * @param SumSummary $right
+ */
+ public function diff($left, $right): SumSummary
+ {
+ $sum = -$left->value + $right->value;
+
+ return new SumSummary(
+ $sum,
+ );
+ }
+
+ /**
+ * @param array<SumSummary> $summaries
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): Data\Sum {
+ $dataPoints = [];
+ foreach ($attributes as $key => $dataPointAttributes) {
+ $dataPoints[] = new Data\NumberDataPoint(
+ $summaries[$key]->value,
+ $dataPointAttributes,
+ $startTimestamp,
+ $timestamp,
+ $exemplars[$key] ?? [],
+ );
+ }
+
+ return new Data\Sum(
+ $dataPoints,
+ $temporality,
+ $this->monotonic,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php
new file mode 100644
index 000000000..9b257193c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Aggregation/SumSummary.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Aggregation;
+
+final class SumSummary
+{
+ /**
+ * @var float|int
+ */
+ public $value;
+ /**
+ * @param float|int $value
+ */
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php b/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php
new file mode 100644
index 000000000..0a85207e0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AggregationInterface.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @psalm-template T
+ */
+interface AggregationInterface
+{
+ /**
+ * @psalm-return T
+ */
+ public function initialize();
+
+ /**
+ * @psalm-param T $summary
+ * @psalm-param float|int $value
+ */
+ public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+
+ /**
+ * @psalm-param T $left
+ * @psalm-param T $right
+ * @psalm-return T
+ */
+ public function merge($left, $right);
+
+ /**
+ * @psalm-param T $left
+ * @psalm-param T $right
+ * @psalm-return T
+ */
+ public function diff($left, $right);
+
+ /**
+ * @param array<AttributesInterface> $attributes
+ * @psalm-param array<T> $summaries
+ * @param array<list<Exemplar>> $exemplars
+ * @param string|Temporality $temporality
+ */
+ public function toData(
+ array $attributes,
+ array $summaries,
+ array $exemplars,
+ int $startTimestamp,
+ int $timestamp,
+ $temporality
+ ): DataInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php b/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php
new file mode 100644
index 000000000..f046d033d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AggregationTemporalitySelectorInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface AggregationTemporalitySelectorInterface
+{
+ /**
+ * Returns the temporality to use for the given metric.
+ *
+ * It is recommended to return {@see MetricMetadataInterface::temporality()}
+ * if the exporter does not require a specific temporality.
+ *
+ * @return string|Temporality|null temporality to use, or null to signal
+ * that the given metric should not be exported by this exporter
+ */
+ public function temporality(MetricMetadataInterface $metric);
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php
new file mode 100644
index 000000000..c4df8e878
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\AttributeProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class FilteredAttributeProcessor implements AttributeProcessorInterface
+{
+ private array $attributeKeys;
+
+ public function __construct(array $attributeKeys)
+ {
+ $this->attributeKeys = $attributeKeys;
+ }
+
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface
+ {
+ $filtered = [];
+ foreach ($this->attributeKeys as $key) {
+ $filtered[$key] = $attributes->get($key);
+ }
+
+ return new Attributes($filtered, 0);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php
new file mode 100644
index 000000000..f261563ea
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\AttributeProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class IdentityAttributeProcessor implements AttributeProcessorInterface
+{
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface
+ {
+ return $attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php
new file mode 100644
index 000000000..d2077aa39
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessorInterface.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+interface AttributeProcessorInterface
+{
+ public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Counter.php b/vendor/open-telemetry/sdk/Metrics/Counter.php
new file mode 100644
index 000000000..9cc6b75f9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Counter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class Counter implements CounterInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php b/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php
new file mode 100644
index 000000000..7aa0c0e20
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/DataInterface.php
@@ -0,0 +1,9 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+interface DataInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php b/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php
new file mode 100644
index 000000000..bd2034f75
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Exemplar
+{
+
+ /**
+ * @var int|string
+ */
+ private $index;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $value;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public ?string $traceId;
+ /**
+ * @readonly
+ */
+ public ?string $spanId;
+
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function __construct($index, $value, int $timestamp, AttributesInterface $attributes, ?string $traceId, ?string $spanId)
+ {
+ $this->index = $index;
+ $this->value = $value;
+ $this->timestamp = $timestamp;
+ $this->attributes = $attributes;
+ $this->traceId = $traceId;
+ $this->spanId = $spanId;
+ }
+
+ /**
+ * @param iterable<Exemplar> $exemplars
+ * @return array<list<Exemplar>>
+ */
+ public static function groupByIndex(iterable $exemplars): array
+ {
+ $grouped = [];
+ foreach ($exemplars as $exemplar) {
+ $grouped[$exemplar->index][] = $exemplar;
+ }
+
+ return $grouped;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php b/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php
new file mode 100644
index 000000000..00eb50939
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Gauge.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Gauge implements DataInterface
+{
+
+ /**
+ * @var iterable<NumberDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @param iterable<NumberDataPoint> $dataPoints
+ */
+ public function __construct(iterable $dataPoints)
+ {
+ $this->dataPoints = $dataPoints;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php b/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php
new file mode 100644
index 000000000..782698026
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Histogram.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Histogram implements DataInterface
+{
+
+ /**
+ * @var iterable<HistogramDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @var string|Temporality
+ * @readonly
+ */
+ public $temporality;
+ /**
+ * @param iterable<HistogramDataPoint> $dataPoints
+ * @param string|Temporality $temporality
+ */
+ public function __construct(iterable $dataPoints, $temporality)
+ {
+ $this->dataPoints = $dataPoints;
+ $this->temporality = $temporality;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php b/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php
new file mode 100644
index 000000000..4c9df07b4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/HistogramDataPoint.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class HistogramDataPoint
+{
+ /**
+ * @readonly
+ */
+ public int $count;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $sum;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $min;
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $max;
+ /**
+ * @var int[]
+ * @readonly
+ */
+ public array $bucketCounts;
+ /**
+ * @var list<float|int>
+ * @readonly
+ */
+ public array $explicitBounds;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public int $startTimestamp;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public iterable $exemplars = [];
+ /**
+ * @param float|int $sum
+ * @param float|int $min
+ * @param float|int $max
+ * @param int[] $bucketCounts
+ * @param list<float|int> $explicitBounds
+ */
+ public function __construct(int $count, $sum, $min, $max, array $bucketCounts, array $explicitBounds, AttributesInterface $attributes, int $startTimestamp, int $timestamp, iterable $exemplars = [])
+ {
+ $this->count = $count;
+ $this->sum = $sum;
+ $this->min = $min;
+ $this->max = $max;
+ $this->bucketCounts = $bucketCounts;
+ $this->explicitBounds = $explicitBounds;
+ $this->attributes = $attributes;
+ $this->startTimestamp = $startTimestamp;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Metric.php b/vendor/open-telemetry/sdk/Metrics/Data/Metric.php
new file mode 100644
index 000000000..41fcb52dd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Metric.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+final class Metric
+{
+ /**
+ * @readonly
+ */
+ public InstrumentationScopeInterface $instrumentationScope;
+ /**
+ * @readonly
+ */
+ public ResourceInfo $resource;
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public DataInterface $data;
+
+ public function __construct(InstrumentationScopeInterface $instrumentationScope, ResourceInfo $resource, string $name, ?string $unit, ?string $description, DataInterface $data)
+ {
+ $this->instrumentationScope = $instrumentationScope;
+ $this->resource = $resource;
+ $this->name = $name;
+ $this->description = $description;
+ $this->unit = $unit;
+ $this->data = $data;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php b/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php
new file mode 100644
index 000000000..1d00e783a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/NumberDataPoint.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class NumberDataPoint
+{
+ /**
+ * @var float|int
+ * @readonly
+ */
+ public $value;
+ /**
+ * @readonly
+ */
+ public AttributesInterface $attributes;
+ /**
+ * @readonly
+ */
+ public int $startTimestamp;
+ /**
+ * @readonly
+ */
+ public int $timestamp;
+ /**
+ * @readonly
+ */
+ public iterable $exemplars = [];
+ /**
+ * @param float|int $value
+ */
+ public function __construct($value, AttributesInterface $attributes, int $startTimestamp, int $timestamp, iterable $exemplars = [])
+ {
+ $this->value = $value;
+ $this->attributes = $attributes;
+ $this->startTimestamp = $startTimestamp;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Sum.php b/vendor/open-telemetry/sdk/Metrics/Data/Sum.php
new file mode 100644
index 000000000..77c4c1021
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Sum.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+final class Sum implements DataInterface
+{
+
+ /**
+ * @var iterable<NumberDataPoint>
+ * @readonly
+ */
+ public iterable $dataPoints;
+ /**
+ * @var string|Temporality
+ * @readonly
+ */
+ public $temporality;
+ /**
+ * @readonly
+ */
+ public bool $monotonic;
+ /**
+ * @param iterable<NumberDataPoint> $dataPoints
+ * @param string|Temporality $temporality
+ */
+ public function __construct(iterable $dataPoints, $temporality, bool $monotonic)
+ {
+ $this->dataPoints = $dataPoints;
+ $this->temporality = $temporality;
+ $this->monotonic = $monotonic;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php b/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php
new file mode 100644
index 000000000..b6642ebd0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Data/Temporality.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Data;
+
+/**
+ * Metric aggregation temporality.
+ *
+ * Has to be type-hinted as `string|Temporality` to be forward compatible.
+ */
+final class Temporality
+{
+ public const DELTA = 'Delta';
+ public const CUMULATIVE = 'Cumulative';
+
+ private function __construct()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php
new file mode 100644
index 000000000..e5c2fcc0c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface DefaultAggregationProviderInterface
+{
+ /**
+ * @param string|InstrumentType $instrumentType
+ */
+ public function defaultAggregation($instrumentType): ?AggregationInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php
new file mode 100644
index 000000000..37c5cb110
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/DefaultAggregationProviderTrait.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+trait DefaultAggregationProviderTrait
+{
+ public function defaultAggregation($instrumentType): ?AggregationInterface
+ {
+ switch ($instrumentType) {
+ case InstrumentType::COUNTER:
+ case InstrumentType::ASYNCHRONOUS_COUNTER:
+ return new Aggregation\SumAggregation(true);
+ case InstrumentType::UP_DOWN_COUNTER:
+ case InstrumentType::ASYNCHRONOUS_UP_DOWN_COUNTER:
+ return new Aggregation\SumAggregation();
+ case InstrumentType::HISTOGRAM:
+ return new Aggregation\ExplicitBucketHistogramAggregation([0, 5, 10, 25, 50, 75, 100, 250, 500, 1000]);
+ case InstrumentType::ASYNCHRONOUS_GAUGE:
+ return new Aggregation\LastValueAggregation();
+ }
+
+ // @codeCoverageIgnoreStart
+ return null;
+ // @codeCoverageIgnoreEnd
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php
new file mode 100644
index 000000000..3a50430ed
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketEntry.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+final class BucketEntry
+{
+ /**
+ * @var int|string
+ */
+ public $index;
+ /**
+ * @var float|int
+ */
+ public $value;
+ public int $timestamp;
+ public AttributesInterface $attributes;
+ public ?string $traceId = null;
+ public ?string $spanId = null;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php
new file mode 100644
index 000000000..574ce92af
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use function array_fill;
+use function assert;
+use function count;
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+/**
+ * @internal
+ */
+final class BucketStorage
+{
+ /** @var array<int, BucketEntry|null> */
+ private array $buckets;
+
+ public function __construct(int $size = 0)
+ {
+ $this->buckets = array_fill(0, $size, null);
+ }
+
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function store(int $bucket, $index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ assert($bucket <= count($this->buckets));
+
+ $exemplar = $this->buckets[$bucket] ??= new BucketEntry();
+ $exemplar->index = $index;
+ $exemplar->value = $value;
+ $exemplar->timestamp = $timestamp;
+ $exemplar->attributes = $attributes;
+
+ if (($spanContext = Span::fromContext($context)->getContext())->isValid()) {
+ $exemplar->traceId = $spanContext->getTraceId();
+ $exemplar->spanId = $spanContext->getSpanId();
+ } else {
+ $exemplar->traceId = null;
+ $exemplar->spanId = null;
+ }
+ }
+
+ /**
+ * @param array<AttributesInterface> $dataPointAttributes
+ * @return array<Exemplar>
+ */
+ public function collect(array $dataPointAttributes): array
+ {
+ $exemplars = [];
+ foreach ($this->buckets as $index => &$exemplar) {
+ if (!$exemplar) {
+ continue;
+ }
+
+ $exemplars[$index] = new Exemplar(
+ $exemplar->index,
+ $exemplar->value,
+ $exemplar->timestamp,
+ $this->filterExemplarAttributes(
+ $dataPointAttributes[$exemplar->index],
+ $exemplar->attributes,
+ ),
+ $exemplar->traceId,
+ $exemplar->spanId,
+ );
+ $exemplar = null;
+ }
+
+ return $exemplars;
+ }
+
+ private function filterExemplarAttributes(AttributesInterface $dataPointAttributes, AttributesInterface $exemplarAttributes): AttributesInterface
+ {
+ $attributes = [];
+ foreach ($exemplarAttributes as $key => $value) {
+ if ($dataPointAttributes->get($key) === null) {
+ $attributes[$key] = $value;
+ }
+ }
+
+ return new Attributes($attributes, $exemplarAttributes->getDroppedAttributesCount());
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php
new file mode 100644
index 000000000..b74e738aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/AllExemplarFilter.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class AllExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php
new file mode 100644
index 000000000..91fdf3b55
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/NoneExemplarFilter.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class NoneExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return false;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php
new file mode 100644
index 000000000..3e800b416
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilter/WithSampledTraceExemplarFilter.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter;
+
+use OpenTelemetry\API\Trace\Span;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class WithSampledTraceExemplarFilter implements ExemplarFilterInterface
+{
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool
+ {
+ return Span::fromContext($context)->getContext()->isSampled();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php
new file mode 100644
index 000000000..1d5dec7b8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarFilterInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+interface ExemplarFilterInterface
+{
+ /**
+ * @param float|int $value
+ */
+ public function accepts($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php
new file mode 100644
index 000000000..70648b919
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/ExemplarReservoirInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+interface ExemplarReservoirInterface
+{
+ /**
+ * @param int|string $index
+ * @param float|int $value
+ */
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+
+ /**
+ * @param array<AttributesInterface> $dataPointAttributes
+ * @return array<Exemplar>
+ */
+ public function collect(array $dataPointAttributes): array;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php
new file mode 100644
index 000000000..0e4f24357
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/FilteredReservoir.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * The exemplar spec is not yet stable, and can change at any time.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
+ */
+final class FilteredReservoir implements ExemplarReservoirInterface
+{
+ private ExemplarReservoirInterface $reservoir;
+ private ExemplarFilterInterface $filter;
+
+ public function __construct(ExemplarReservoirInterface $reservoir, ExemplarFilterInterface $filter)
+ {
+ $this->reservoir = $reservoir;
+ $this->filter = $filter;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ if ($this->filter->accepts($value, $attributes, $context, $timestamp)) {
+ $this->reservoir->offer($index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return $this->reservoir->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php
new file mode 100644
index 000000000..479292a4c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/FixedSizeReservoir.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use function random_int;
+
+final class FixedSizeReservoir implements ExemplarReservoirInterface
+{
+ private BucketStorage $storage;
+ private int $size;
+ private int $measurements = 0;
+
+ public function __construct(int $size = 4)
+ {
+ $this->storage = new BucketStorage($size);
+ $this->size = $size;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $bucket = random_int(0, $this->measurements);
+ $this->measurements++;
+ if ($bucket < $this->size) {
+ $this->storage->store($bucket, $index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ $this->measurements = 0;
+
+ return $this->storage->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php
new file mode 100644
index 000000000..b56a1b2be
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use function count;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class HistogramBucketReservoir implements ExemplarReservoirInterface
+{
+ private BucketStorage $storage;
+ /**
+ * @var list<float|int>
+ */
+ private array $boundaries;
+
+ /**
+ * @param list<float|int> $boundaries
+ */
+ public function __construct(array $boundaries)
+ {
+ $this->storage = new BucketStorage(count($boundaries) + 1);
+ $this->boundaries = $boundaries;
+ }
+
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $boundariesCount = count($this->boundaries);
+ for ($i = 0; $i < $boundariesCount && $this->boundaries[$i] < $value; $i++) {
+ }
+ $this->storage->store($i, $index, $value, $attributes, $context, $timestamp);
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return $this->storage->collect($dataPointAttributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php b/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php
new file mode 100644
index 000000000..010aeff20
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Exemplar/NoopReservoir.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Exemplar;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class NoopReservoir implements ExemplarReservoirInterface
+{
+ public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ // no-op
+ }
+
+ public function collect(array $dataPointAttributes): array
+ {
+ return [];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Histogram.php b/vendor/open-telemetry/sdk/Metrics/Histogram.php
new file mode 100644
index 000000000..532b1b4bf
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Histogram.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class Histogram implements HistogramInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function record($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Instrument.php b/vendor/open-telemetry/sdk/Metrics/Instrument.php
new file mode 100644
index 000000000..3543604c0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Instrument.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+final class Instrument
+{
+ /**
+ * @var string|InstrumentType
+ * @readonly
+ */
+ public $type;
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @param string|InstrumentType $type
+ */
+ public function __construct($type, string $name, ?string $unit, ?string $description)
+ {
+ $this->type = $type;
+ $this->name = $name;
+ $this->unit = $unit;
+ $this->description = $description;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/InstrumentType.php b/vendor/open-telemetry/sdk/Metrics/InstrumentType.php
new file mode 100644
index 000000000..ae603b2fe
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/InstrumentType.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * Instrument type.
+ *
+ * Has to be type-hinted as `string|InstrumentType` to be forward compatible.
+ */
+final class InstrumentType
+{
+ public const COUNTER = 'Counter';
+ public const UP_DOWN_COUNTER = 'UpDownCounter';
+ public const HISTOGRAM = 'Histogram';
+
+ public const ASYNCHRONOUS_COUNTER = 'AsynchronousCounter';
+ public const ASYNCHRONOUS_UP_DOWN_COUNTER = 'AsynchronousUpDownCounter';
+ public const ASYNCHRONOUS_GAUGE = 'AsynchronousGauge';
+
+ private function __construct()
+ {
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Meter.php b/vendor/open-telemetry/sdk/Metrics/Meter.php
new file mode 100644
index 000000000..902284839
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Meter.php
@@ -0,0 +1,314 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+use OpenTelemetry\API\Metrics\CounterInterface;
+use OpenTelemetry\API\Metrics\HistogramInterface;
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use function OpenTelemetry\SDK\Common\Util\closure;
+use OpenTelemetry\SDK\Common\Util\WeakMap;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistration\MultiRegistryRegistration;
+use OpenTelemetry\SDK\Metrics\MetricRegistration\RegistryRegistration;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use const PHP_VERSION_ID;
+use function serialize;
+
+/**
+ * @internal
+ */
+final class Meter implements MeterInterface
+{
+ private MetricFactoryInterface $metricFactory;
+ private ResourceInfo $resource;
+ private ClockInterface $clock;
+ private StalenessHandlerFactoryInterface $stalenessHandlerFactory;
+ /** @var iterable<MetricSourceRegistryInterface&DefaultAggregationProviderInterface> */
+ private iterable $metricRegistries;
+ private ViewRegistryInterface $viewRegistry;
+ private ?ExemplarFilterInterface $exemplarFilter;
+ private MeterInstruments $instruments;
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ private MetricRegistryInterface $registry;
+ private MetricWriterInterface $writer;
+
+ private ?string $instrumentationScopeId = null;
+
+ /**
+ * @param iterable<MetricSourceRegistryInterface&DefaultAggregationProviderInterface> $metricRegistries
+ */
+ public function __construct(
+ MetricFactoryInterface $metricFactory,
+ ResourceInfo $resource,
+ ClockInterface $clock,
+ StalenessHandlerFactoryInterface $stalenessHandlerFactory,
+ iterable $metricRegistries,
+ ViewRegistryInterface $viewRegistry,
+ ?ExemplarFilterInterface $exemplarFilter,
+ MeterInstruments $instruments,
+ InstrumentationScopeInterface $instrumentationScope,
+ MetricRegistryInterface $registry,
+ MetricWriterInterface $writer
+ ) {
+ $this->metricFactory = $metricFactory;
+ $this->resource = $resource;
+ $this->clock = $clock;
+ $this->stalenessHandlerFactory = $stalenessHandlerFactory;
+ $this->metricRegistries = $metricRegistries;
+ $this->viewRegistry = $viewRegistry;
+ $this->exemplarFilter = $exemplarFilter;
+ $this->instruments = $instruments;
+ $this->instrumentationScope = $instrumentationScope;
+ $this->registry = $registry;
+ $this->writer = $writer;
+ }
+
+ public function createCounter(string $name, ?string $unit = null, ?string $description = null): CounterInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new Counter($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableCounterInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableCounter($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ public function createHistogram(string $name, ?string $unit = null, ?string $description = null): HistogramInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::HISTOGRAM,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new Histogram($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableGauge(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableGaugeInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_GAUGE,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableGauge($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ public function createUpDownCounter(string $name, ?string $unit = null, ?string $description = null): UpDownCounterInterface
+ {
+ [$instrument, $referenceCounter] = $this->createSynchronousWriter(
+ InstrumentType::UP_DOWN_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ return new UpDownCounter($this->writer, $instrument, $referenceCounter);
+ }
+
+ public function createObservableUpDownCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableUpDownCounterInterface
+ {
+ [$instrument, $referenceCounter, $destructors] = $this->createAsynchronousObserver(
+ InstrumentType::ASYNCHRONOUS_UP_DOWN_COUNTER,
+ $name,
+ $unit,
+ $description,
+ );
+
+ foreach ($callbacks as $callback) {
+ $this->writer->registerCallback(closure($callback), $instrument);
+ $referenceCounter->acquire(true);
+ }
+
+ return new ObservableUpDownCounter($this->writer, $instrument, $referenceCounter, $destructors);
+ }
+
+ /**
+ * @param string|InstrumentType $instrumentType
+ * @return array{Instrument, ReferenceCounterInterface}
+ */
+ private function createSynchronousWriter($instrumentType, string $name, ?string $unit, ?string $description): array
+ {
+ $instrument = new Instrument($instrumentType, $name, $unit, $description);
+
+ $instrumentationScopeId = $this->instrumentationScopeId($this->instrumentationScope);
+ $instrumentId = $this->instrumentId($instrument);
+
+ $instruments = $this->instruments;
+ if ($writer = $instruments->writers[$instrumentationScopeId][$instrumentId] ?? null) {
+ return $writer;
+ }
+
+ $stalenessHandler = $this->stalenessHandlerFactory->create();
+ $instruments->startTimestamp ??= $this->clock->now();
+ $streamIds = $this->metricFactory->createSynchronousWriter(
+ $this->registry,
+ $this->resource,
+ $this->instrumentationScope,
+ $instrument,
+ $instruments->startTimestamp,
+ $this->viewRegistrationRequests($instrument, $stalenessHandler),
+ $this->exemplarFilter,
+ );
+
+ $registry = $this->registry;
+ $stalenessHandler->onStale(static function () use ($instruments, $instrumentationScopeId, $instrumentId, $registry, $streamIds): void {
+ unset($instruments->writers[$instrumentationScopeId][$instrumentId]);
+ if (!$instruments->writers[$instrumentationScopeId]) {
+ unset($instruments->writers[$instrumentationScopeId]);
+ }
+ foreach ($streamIds as $streamId) {
+ $registry->unregisterStream($streamId);
+ }
+
+ $instruments->startTimestamp = null;
+ });
+
+ return $instruments->writers[$instrumentationScopeId][$instrumentId] = [
+ $instrument,
+ $stalenessHandler,
+ ];
+ }
+
+ /**
+ * @param string|InstrumentType $instrumentType
+ * @return array{Instrument, ReferenceCounterInterface, ArrayAccess<object, ObservableCallbackDestructor>}
+ */
+ private function createAsynchronousObserver($instrumentType, string $name, ?string $unit, ?string $description): array
+ {
+ $instrument = new Instrument($instrumentType, $name, $unit, $description);
+
+ $instrumentationScopeId = $this->instrumentationScopeId($this->instrumentationScope);
+ $instrumentId = $this->instrumentId($instrument);
+
+ $instruments = $this->instruments;
+ /** @phan-suppress-next-line PhanDeprecatedProperty */
+ $instruments->staleObservers = [];
+ if ($observer = $instruments->observers[$instrumentationScopeId][$instrumentId] ?? null) {
+ return $observer;
+ }
+
+ $stalenessHandler = $this->stalenessHandlerFactory->create();
+ $instruments->startTimestamp ??= $this->clock->now();
+ $streamIds = $this->metricFactory->createAsynchronousObserver(
+ $this->registry,
+ $this->resource,
+ $this->instrumentationScope,
+ $instrument,
+ $instruments->startTimestamp,
+ $this->viewRegistrationRequests($instrument, $stalenessHandler),
+ );
+
+ $registry = $this->registry;
+ $stalenessHandler->onStale(static function () use ($instruments, $instrumentationScopeId, $instrumentId, $registry, $streamIds): void {
+ if (PHP_VERSION_ID < 80000) {
+ /** @phan-suppress-next-line PhanDeprecatedProperty */
+ $instruments->staleObservers[] = $instruments->observers[$instrumentationScopeId][$instrumentId][2];
+ }
+
+ unset($instruments->observers[$instrumentationScopeId][$instrumentId]);
+ if (!$instruments->observers[$instrumentationScopeId]) {
+ unset($instruments->observers[$instrumentationScopeId]);
+ }
+ foreach ($streamIds as $streamId) {
+ $registry->unregisterStream($streamId);
+ }
+
+ $instruments->startTimestamp = null;
+ });
+
+ /** @var ArrayAccess<object, ObservableCallbackDestructor> $destructors */
+ $destructors = WeakMap::create();
+
+ return $instruments->observers[$instrumentationScopeId][$instrumentId] = [
+ $instrument,
+ $stalenessHandler,
+ $destructors,
+ ];
+ }
+
+ /**
+ * @return iterable<array{ViewProjection, MetricRegistrationInterface}>
+ */
+ private function viewRegistrationRequests(Instrument $instrument, StalenessHandlerInterface $stalenessHandler): iterable
+ {
+ $views = $this->viewRegistry->find($instrument, $this->instrumentationScope) ?? [
+ new ViewProjection(
+ $instrument->name,
+ $instrument->unit,
+ $instrument->description,
+ null,
+ null,
+ ),
+ ];
+
+ $compositeRegistration = new MultiRegistryRegistration($this->metricRegistries, $stalenessHandler);
+ foreach ($views as $view) {
+ if ($view->aggregation !== null) {
+ yield [$view, $compositeRegistration];
+ } else {
+ foreach ($this->metricRegistries as $metricRegistry) {
+ yield [
+ new ViewProjection(
+ $view->name,
+ $view->unit,
+ $view->description,
+ $view->attributeKeys,
+ $metricRegistry->defaultAggregation($instrument->type),
+ ),
+ new RegistryRegistration($metricRegistry, $stalenessHandler),
+ ];
+ }
+ }
+ }
+ }
+
+ private function instrumentationScopeId(InstrumentationScopeInterface $instrumentationScope): string
+ {
+ return $this->instrumentationScopeId ??= serialize($instrumentationScope);
+ }
+
+ private function instrumentId(Instrument $instrument): string
+ {
+ return serialize($instrument);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php b/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php
new file mode 100644
index 000000000..c331cb608
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterInstruments.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+
+/**
+ * @internal
+ */
+final class MeterInstruments
+{
+ public ?int $startTimestamp = null;
+ /**
+ * @var array<string, array<string, array{Instrument, ReferenceCounterInterface, ArrayAccess<object, ObservableCallbackDestructor>}>>
+ */
+ public array $observers = [];
+ /**
+ * @var array<string, array<string, array{Instrument, ReferenceCounterInterface}>>
+ */
+ public array $writers = [];
+
+ /**
+ * @var list<ArrayAccess<object, ObservableCallbackDestructor>>
+ * @deprecated
+ */
+ public array $staleObservers = [];
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProvider.php b/vendor/open-telemetry/sdk/Metrics/MeterProvider.php
new file mode 100644
index 000000000..36c17cf81
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProvider.php
@@ -0,0 +1,130 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+use OpenTelemetry\Context\ContextStorageInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricFactory\StreamFactory;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistry;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Sdk;
+
+final class MeterProvider implements MeterProviderInterface
+{
+ private MetricFactoryInterface $metricFactory;
+ private ResourceInfo $resource;
+ private ClockInterface $clock;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+ private iterable $metricReaders;
+ private ViewRegistryInterface $viewRegistry;
+ private ?ExemplarFilterInterface $exemplarFilter;
+ private StalenessHandlerFactoryInterface $stalenessHandlerFactory;
+ private MeterInstruments $instruments;
+ private MetricRegistryInterface $registry;
+ private MetricWriterInterface $writer;
+
+ private bool $closed = false;
+
+ /**
+ * @param iterable<MetricReaderInterface&MetricSourceRegistryInterface&DefaultAggregationProviderInterface> $metricReaders
+ */
+ public function __construct(
+ ?ContextStorageInterface $contextStorage,
+ ResourceInfo $resource,
+ ClockInterface $clock,
+ AttributesFactoryInterface $attributesFactory,
+ InstrumentationScopeFactoryInterface $instrumentationScopeFactory,
+ iterable $metricReaders,
+ ViewRegistryInterface $viewRegistry,
+ ?ExemplarFilterInterface $exemplarFilter,
+ StalenessHandlerFactoryInterface $stalenessHandlerFactory,
+ MetricFactoryInterface $metricFactory = null
+ ) {
+ $this->metricFactory = $metricFactory ?? new StreamFactory();
+ $this->resource = $resource;
+ $this->clock = $clock;
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory;
+ $this->metricReaders = $metricReaders;
+ $this->viewRegistry = $viewRegistry;
+ $this->exemplarFilter = $exemplarFilter;
+ $this->stalenessHandlerFactory = $stalenessHandlerFactory;
+ $this->instruments = new MeterInstruments();
+
+ $registry = new MetricRegistry($contextStorage, $attributesFactory, $clock);
+ $this->registry = $registry;
+ $this->writer = $registry;
+ }
+
+ public function getMeter(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): MeterInterface {
+ if ($this->closed || Sdk::isDisabled()) { //@todo create meter provider from factory, and move Sdk::isDisabled() there
+ return new NoopMeter();
+ }
+
+ return new Meter(
+ $this->metricFactory,
+ $this->resource,
+ $this->clock,
+ $this->stalenessHandlerFactory,
+ $this->metricReaders,
+ $this->viewRegistry,
+ $this->exemplarFilter,
+ $this->instruments,
+ $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes),
+ $this->registry,
+ $this->writer,
+ );
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ $success = true;
+ foreach ($this->metricReaders as $metricReader) {
+ if (!$metricReader->shutdown()) {
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ public function forceFlush(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $success = true;
+ foreach ($this->metricReaders as $metricReader) {
+ if (!$metricReader->forceFlush()) {
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ public static function builder(): MeterProviderBuilder
+ {
+ return new MeterProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php
new file mode 100644
index 000000000..17f0be895
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderBuilder.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\WithSampledTraceExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandler\NoopStalenessHandlerFactory;
+use OpenTelemetry\SDK\Metrics\View\CriteriaViewRegistry;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+class MeterProviderBuilder
+{
+ // @var array<MetricReaderInterface>
+ private array $metricReaders = [];
+ private ?ResourceInfo $resource = null;
+ private ?ExemplarFilterInterface $exemplarFilter = null;
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function setExemplarFilter(ExemplarFilterInterface $exemplarFilter): self
+ {
+ $this->exemplarFilter = $exemplarFilter;
+
+ return $this;
+ }
+
+ public function addReader(MetricReaderInterface $reader): self
+ {
+ $this->metricReaders[] = $reader;
+
+ return $this;
+ }
+
+ /**
+ * @psalm-suppress PossiblyInvalidArgument
+ */
+ public function build(): MeterProviderInterface
+ {
+ return new MeterProvider(
+ null,
+ $this->resource ?? ResourceInfoFactory::emptyResource(),
+ ClockFactory::getDefault(),
+ Attributes::factory(),
+ new InstrumentationScopeFactory(Attributes::factory()),
+ $this->metricReaders,
+ new CriteriaViewRegistry(),
+ $this->exemplarFilter ?? new WithSampledTraceExemplarFilter(),
+ new NoopStalenessHandlerFactory(),
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php
new file mode 100644
index 000000000..5f7f9988d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderFactory.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\AllExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\NoneExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilter\WithSampledTraceExemplarFilter;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporter\NoopMetricExporter;
+use OpenTelemetry\SDK\Metrics\MetricReader\ExportingReader;
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SDK\Sdk;
+
+class MeterProviderFactory
+{
+ use LogsMessagesTrait;
+
+ /**
+ * @todo https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md#general
+ * - "The exporter MUST configure the default aggregation on the basis of instrument kind using the
+ * OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION variable as described below if it is implemented."
+ */
+ public function create(): MeterProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return new NoopMeterProvider();
+ }
+ $exporters = Configuration::getList(Variables::OTEL_METRICS_EXPORTER);
+ //TODO "The SDK MAY accept a comma-separated list to enable setting multiple exporters"
+ if (count($exporters) !== 1) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_METRICS_EXPORTER));
+ }
+ $exporterName = $exporters[0];
+
+ try {
+ $factory = Registry::metricExporterFactory($exporterName);
+ $exporter = $factory->create();
+ } catch (\Throwable $t) {
+ self::logWarning(sprintf('Unable to create %s meter provider: %s', $exporterName, $t->getMessage()));
+ $exporter = new NoopMetricExporter();
+ }
+
+ // @todo "The exporter MUST be paired with a periodic exporting MetricReader"
+ $reader = new ExportingReader($exporter);
+ $resource = ResourceInfoFactory::defaultResource();
+ $exemplarFilter = $this->createExemplarFilter(Configuration::getEnum(Variables::OTEL_METRICS_EXEMPLAR_FILTER));
+
+ return MeterProvider::builder()
+ ->setResource($resource)
+ ->addReader($reader)
+ ->setExemplarFilter($exemplarFilter)
+ ->build();
+ }
+
+ private function createExemplarFilter(string $name): ExemplarFilterInterface
+ {
+ switch ($name) {
+ case KnownValues::VALUE_WITH_SAMPLED_TRACE:
+ return new WithSampledTraceExemplarFilter();
+ case KnownValues::VALUE_ALL:
+ return new AllExemplarFilter();
+ case KnownValues::VALUE_NONE:
+ return new NoneExemplarFilter();
+ default:
+ self::logWarning('Unknown exemplar filter: ' . $name);
+
+ return new NoneExemplarFilter();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php
new file mode 100644
index 000000000..fcb951106
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MeterProviderInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MeterProviderInterface extends \OpenTelemetry\API\Metrics\MeterProviderInterface
+{
+ public function shutdown(): bool;
+
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php
new file mode 100644
index 000000000..62ea7b535
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php
@@ -0,0 +1,105 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * Console metrics exporter.
+ * Note that the output is human-readable JSON, not compatible with OTLP.
+ */
+class ConsoleMetricExporter implements PushMetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ /**
+ * @param string|Temporality|null $temporality
+ */
+ public function __construct($temporality = null)
+ {
+ $this->temporality = $temporality;
+ }
+ /**
+ * @inheritDoc
+ */
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch): bool
+ {
+ $resource = null;
+ $scope = null;
+ foreach ($batch as $metric) {
+ /** @var Metric $metric */
+ if (!$resource) {
+ $resource = $this->convertResource($metric->resource);
+ }
+ if (!$scope) {
+ $scope = $this->convertInstrumentationScope($metric->instrumentationScope);
+ $scope['metrics'] = [];
+ }
+ $scope['metrics'][] = $this->convertMetric($metric);
+ }
+ $output = [
+ 'resource' => $resource,
+ 'scope' => $scope,
+ ];
+ echo json_encode($output, JSON_PRETTY_PRINT) . PHP_EOL;
+
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+
+ private function convertMetric(Metric $metric): array
+ {
+ return [
+ 'name' => $metric->name,
+ 'description' => $metric->description,
+ 'unit' => $metric->unit,
+ 'data' => $metric->data,
+ ];
+ }
+
+ private function convertResource(ResourceInfo $resource): array
+ {
+ return [
+ 'attributes' => $resource->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $resource->getAttributes()->getDroppedAttributesCount(),
+ ];
+ }
+ private function convertInstrumentationScope(InstrumentationScopeInterface $scope): array
+ {
+ return [
+ 'name' => $scope->getName(),
+ 'version' => $scope->getVersion(),
+ 'attributes' => $scope->getAttributes()->toArray(),
+ 'dropped_attributes_count' => $scope->getAttributes()->getDroppedAttributesCount(),
+ 'schema_url' => $scope->getSchemaUrl(),
+ ];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php
new file mode 100644
index 000000000..19088738d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class ConsoleMetricExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new ConsoleMetricExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php
new file mode 100644
index 000000000..6bbab8b79
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporter.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use function array_push;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/in-memory.md
+ */
+final class InMemoryExporter implements MetricExporterInterface, AggregationTemporalitySelectorInterface
+{
+ /**
+ * @var list<Metric>
+ */
+ private array $metrics = [];
+ /**
+ * @var string|Temporality|null
+ */
+ private $temporality;
+
+ private bool $closed = false;
+
+ /**
+ * @param string|Temporality|null $temporality
+ */
+ public function __construct($temporality = null)
+ {
+ $this->temporality = $temporality;
+ }
+
+ public function temporality(MetricMetadataInterface $metric)
+ {
+ return $this->temporality ?? $metric->temporality();
+ }
+
+ /**
+ * @return list<Metric>
+ */
+ public function collect(bool $reset = false): array
+ {
+ $metrics = $this->metrics;
+ if ($reset) {
+ $this->metrics = [];
+ }
+
+ return $metrics;
+ }
+
+ public function export(iterable $batch): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ /** @psalm-suppress InvalidPropertyAssignmentValue */
+ array_push($this->metrics, ...$batch);
+
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php
new file mode 100644
index 000000000..c72c7b169
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/InMemoryExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class InMemoryExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php
new file mode 100644
index 000000000..0cac12fae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporter.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class NoopMetricExporter implements MetricExporterInterface
+{
+ /**
+ * @inheritDoc
+ */
+ public function export(iterable $batch): bool
+ {
+ return true;
+ }
+
+ public function shutdown(): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php
new file mode 100644
index 000000000..ab2ab2af3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/NoopMetricExporterFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricExporter;
+
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+
+class NoopMetricExporterFactory implements MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface
+ {
+ return new NoopMetricExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php b/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php
new file mode 100644
index 000000000..fba543d02
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporter/_register.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('memory', \OpenTelemetry\SDK\Metrics\MetricExporter\InMemoryExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('console', \OpenTelemetry\SDK\Metrics\MetricExporter\ConsoleMetricExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerMetricExporterFactory('none', \OpenTelemetry\SDK\Metrics\MetricExporter\NoopMetricExporterFactory::class);
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php
new file mode 100644
index 000000000..0d2541821
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporterFactoryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricExporterFactoryInterface
+{
+ public function create(): MetricExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php
new file mode 100644
index 000000000..fa47fbf9e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricExporterInterface.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+
+interface MetricExporterInterface
+{
+ /**
+ * @param iterable<int, Metric> $batch
+ */
+ public function export(iterable $batch): bool;
+
+ public function shutdown(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php
new file mode 100644
index 000000000..2c3af4c06
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use function array_keys;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Aggregation\ExplicitBucketHistogramAggregation;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessor\FilteredAttributeProcessor;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarReservoirInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\FilteredReservoir;
+use OpenTelemetry\SDK\Metrics\Exemplar\FixedSizeReservoir;
+use OpenTelemetry\SDK\Metrics\Exemplar\HistogramBucketReservoir;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\MetricFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\AsynchronousMetricStream;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregator;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactory;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use OpenTelemetry\SDK\Metrics\Stream\SynchronousMetricStream;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use function serialize;
+use function spl_object_id;
+use Throwable;
+
+/**
+ * @internal
+ */
+final class StreamFactory implements MetricFactoryInterface
+{
+ public function createAsynchronousObserver(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views
+ ): array {
+ $streams = [];
+ $dedup = [];
+ foreach ($views as [$view, $registration]) {
+ if ($view->aggregation === null) {
+ continue;
+ }
+
+ $dedupId = $this->streamId($view->aggregation, $view->attributeKeys);
+ if (($streamId = $dedup[$dedupId] ?? null) === null) {
+ $stream = new AsynchronousMetricStream($view->aggregation, $timestamp);
+ $streamId = $registry->registerAsynchronousStream($instrument, $stream, new MetricAggregatorFactory(
+ $this->attributeProcessor($view->attributeKeys),
+ $view->aggregation,
+ ));
+
+ $streams[$streamId] = $stream;
+ $dedup[$dedupId] = $streamId;
+ }
+
+ $this->registerSource(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $streams[$streamId],
+ $registry,
+ $registration,
+ $streamId,
+ );
+ }
+
+ return array_keys($streams);
+ }
+
+ public function createSynchronousWriter(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views,
+ ?ExemplarFilterInterface $exemplarFilter = null
+ ): array {
+ $streams = [];
+ $dedup = [];
+ foreach ($views as [$view, $registration]) {
+ if ($view->aggregation === null) {
+ continue;
+ }
+
+ $dedupId = $this->streamId($view->aggregation, $view->attributeKeys);
+ if (($streamId = $dedup[$dedupId] ?? null) === null) {
+ $stream = new SynchronousMetricStream($view->aggregation, $timestamp);
+ $streamId = $registry->registerSynchronousStream($instrument, $stream, new MetricAggregator(
+ $this->attributeProcessor($view->attributeKeys),
+ $view->aggregation,
+ $this->createExemplarReservoir($view->aggregation, $exemplarFilter),
+ ));
+
+ $streams[$streamId] = $stream;
+ $dedup[$dedupId] = $streamId;
+ }
+
+ $this->registerSource(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $streams[$streamId],
+ $registry,
+ $registration,
+ $streamId,
+ );
+ }
+
+ return array_keys($streams);
+ }
+
+ private function attributeProcessor(
+ ?array $attributeKeys
+ ): ?AttributeProcessorInterface {
+ return $attributeKeys !== null
+ ? new FilteredAttributeProcessor($attributeKeys)
+ : null;
+ }
+
+ private function createExemplarReservoir(
+ AggregationInterface $aggregation,
+ ?ExemplarFilterInterface $exemplarFilter
+ ): ?ExemplarReservoirInterface {
+ if (!$exemplarFilter) {
+ return null;
+ }
+
+ if ($aggregation instanceof ExplicitBucketHistogramAggregation && $aggregation->boundaries) {
+ $exemplarReservoir = new HistogramBucketReservoir($aggregation->boundaries);
+ } else {
+ $exemplarReservoir = new FixedSizeReservoir();
+ }
+
+ return new FilteredReservoir($exemplarReservoir, $exemplarFilter);
+ }
+
+ private function registerSource(
+ ViewProjection $view,
+ Instrument $instrument,
+ InstrumentationScopeInterface $instrumentationScope,
+ ResourceInfo $resource,
+ MetricStreamInterface $stream,
+ MetricCollectorInterface $metricCollector,
+ MetricRegistrationInterface $metricRegistration,
+ int $streamId
+ ): void {
+ $provider = new StreamMetricSourceProvider(
+ $view,
+ $instrument,
+ $instrumentationScope,
+ $resource,
+ $stream,
+ $metricCollector,
+ $streamId,
+ );
+
+ $metricRegistration->register($provider, $provider);
+ }
+
+ private function streamId(AggregationInterface $aggregation, ?array $attributeKeys): string
+ {
+ return $this->trySerialize($aggregation) . serialize($attributeKeys);
+ }
+
+ private function trySerialize(object $object)
+ {
+ try {
+ return serialize($object);
+ } catch (Throwable $e) {
+ }
+
+ return spl_object_id($object);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php
new file mode 100644
index 000000000..4939a5341
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSource.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+
+/**
+ * @internal
+ */
+final class StreamMetricSource implements MetricSourceInterface
+{
+ private StreamMetricSourceProvider $provider;
+ private int $reader;
+ public function __construct(StreamMetricSourceProvider $provider, int $reader)
+ {
+ $this->provider = $provider;
+ $this->reader = $reader;
+ }
+
+ public function collectionTimestamp(): int
+ {
+ return $this->provider->stream->timestamp();
+ }
+
+ public function collect(): Metric
+ {
+ return new Metric(
+ $this->provider->instrumentationLibrary,
+ $this->provider->resource,
+ $this->provider->view->name,
+ $this->provider->view->unit,
+ $this->provider->view->description,
+ $this->provider->stream->collect($this->reader),
+ );
+ }
+
+ public function __destruct()
+ {
+ $this->provider->stream->unregister($this->reader);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php
new file mode 100644
index 000000000..657c3ce62
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamMetricSourceProvider.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricFactory;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @internal
+ */
+final class StreamMetricSourceProvider implements MetricSourceProviderInterface, MetricMetadataInterface
+{
+ /**
+ * @readonly
+ */
+ public ViewProjection $view;
+ /**
+ * @readonly
+ */
+ public Instrument $instrument;
+ /**
+ * @readonly
+ */
+ public InstrumentationScopeInterface $instrumentationLibrary;
+ /**
+ * @readonly
+ */
+ public ResourceInfo $resource;
+ /**
+ * @readonly
+ */
+ public MetricStreamInterface $stream;
+ /**
+ * @readonly
+ */
+ public MetricCollectorInterface $metricCollector;
+ /**
+ * @readonly
+ */
+ public int $streamId;
+
+ public function __construct(
+ ViewProjection $view,
+ Instrument $instrument,
+ InstrumentationScopeInterface $instrumentationLibrary,
+ ResourceInfo $resource,
+ MetricStreamInterface $stream,
+ MetricCollectorInterface $metricCollector,
+ int $streamId
+ ) {
+ $this->view = $view;
+ $this->instrument = $instrument;
+ $this->instrumentationLibrary = $instrumentationLibrary;
+ $this->resource = $resource;
+ $this->stream = $stream;
+ $this->metricCollector = $metricCollector;
+ $this->streamId = $streamId;
+ }
+
+ public function create($temporality): MetricSourceInterface
+ {
+ return new StreamMetricSource($this, $this->stream->register($temporality));
+ }
+
+ public function instrumentType()
+ {
+ return $this->instrument->type;
+ }
+
+ public function name(): string
+ {
+ return $this->view->name;
+ }
+
+ public function unit(): ?string
+ {
+ return $this->view->unit;
+ }
+
+ public function description(): ?string
+ {
+ return $this->view->description;
+ }
+
+ public function temporality()
+ {
+ return $this->stream->temporality();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php
new file mode 100644
index 000000000..a1e228eef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @internal
+ */
+interface MetricFactoryInterface
+{
+ /**
+ * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views
+ */
+ public function createAsynchronousObserver(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views
+ ): array;
+
+ /**
+ * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views
+ */
+ public function createSynchronousWriter(
+ MetricRegistryInterface $registry,
+ ResourceInfo $resource,
+ InstrumentationScopeInterface $instrumentationScope,
+ Instrument $instrument,
+ int $timestamp,
+ iterable $views,
+ ?ExemplarFilterInterface $exemplarFilter = null
+ ): array;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php
new file mode 100644
index 000000000..aa1a02d60
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricMetadataInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface MetricMetadataInterface
+{
+ /**
+ * @return string|InstrumentType
+ */
+ public function instrumentType();
+
+ public function name(): string;
+
+ public function unit(): ?string;
+
+ public function description(): ?string;
+
+ /**
+ * Returns the underlying temporality of this metric.
+ *
+ * @return string|Temporality internal temporality
+ */
+ public function temporality();
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php b/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php
new file mode 100644
index 000000000..3c2eff9f1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricReader/ExportingReader.php
@@ -0,0 +1,156 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricReader;
+
+use function array_keys;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AggregationTemporalitySelectorInterface;
+use OpenTelemetry\SDK\Metrics\DefaultAggregationProviderInterface;
+use OpenTelemetry\SDK\Metrics\DefaultAggregationProviderTrait;
+use OpenTelemetry\SDK\Metrics\MetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\MetricFactory\StreamMetricSourceProvider;
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricReaderInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricCollectorInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\PushMetricExporterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+use function spl_object_id;
+
+final class ExportingReader implements MetricReaderInterface, MetricSourceRegistryInterface, DefaultAggregationProviderInterface
+{
+ use DefaultAggregationProviderTrait { defaultAggregation as private _defaultAggregation; }
+
+ private MetricExporterInterface $exporter;
+ /** @var array<int, MetricSourceInterface> */
+ private array $sources = [];
+
+ /** @var array<int, MetricCollectorInterface> */
+ private array $registries = [];
+ /** @var array<int, array<int, int>> */
+ private array $streamIds = [];
+
+ private bool $closed = false;
+
+ public function __construct(MetricExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ public function defaultAggregation($instrumentType): ?AggregationInterface
+ {
+ if ($this->exporter instanceof DefaultAggregationProviderInterface) {
+ return $this->exporter->defaultAggregation($instrumentType);
+ }
+
+ return $this->_defaultAggregation($instrumentType);
+ }
+
+ public function add(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata, StalenessHandlerInterface $stalenessHandler): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$this->exporter instanceof AggregationTemporalitySelectorInterface) {
+ return;
+ }
+ if (!$temporality = $this->exporter->temporality($metadata)) {
+ return;
+ }
+
+ $source = $provider->create($temporality);
+ $sourceId = spl_object_id($source);
+
+ $this->sources[$sourceId] = $source;
+ $stalenessHandler->onStale(function () use ($sourceId): void {
+ unset($this->sources[$sourceId]);
+ });
+
+ if (!$provider instanceof StreamMetricSourceProvider) {
+ return;
+ }
+
+ $streamId = $provider->streamId;
+ $registry = $provider->metricCollector;
+ $registryId = spl_object_id($registry);
+
+ $this->registries[$registryId] = $registry;
+ $this->streamIds[$registryId][$streamId] ??= 0;
+ $this->streamIds[$registryId][$streamId]++;
+
+ $stalenessHandler->onStale(function () use ($streamId, $registryId): void {
+ if (!--$this->streamIds[$registryId][$streamId]) {
+ unset($this->streamIds[$registryId][$streamId]);
+ if (!$this->streamIds[$registryId]) {
+ unset(
+ $this->registries[$registryId],
+ $this->streamIds[$registryId],
+ );
+ }
+ }
+ });
+ }
+
+ private function doCollect(): bool
+ {
+ foreach ($this->registries as $registryId => $registry) {
+ $streamIds = $this->streamIds[$registryId] ?? [];
+ $registry->collectAndPush(array_keys($streamIds));
+ }
+
+ $metrics = [];
+ foreach ($this->sources as $source) {
+ $metrics[] = $source->collect();
+ }
+
+ if ($metrics === []) {
+ return true;
+ }
+
+ return $this->exporter->export($metrics);
+ }
+
+ public function collect(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->doCollect();
+ }
+
+ public function shutdown(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ $collect = $this->doCollect();
+ $shutdown = $this->exporter->shutdown();
+
+ $this->sources = [];
+
+ return $collect && $shutdown;
+ }
+
+ public function forceFlush(): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+ if ($this->exporter instanceof PushMetricExporterInterface) {
+ $collect = $this->doCollect();
+ $forceFlush = $this->exporter->forceFlush();
+
+ return $collect && $forceFlush;
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php
new file mode 100644
index 000000000..f5900eef5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricReaderInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricReaderInterface
+{
+ public function collect(): bool;
+
+ public function shutdown(): bool;
+
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php
new file mode 100644
index 000000000..2472c096f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/MultiRegistryRegistration.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistration;
+
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class MultiRegistryRegistration implements MetricRegistrationInterface
+{
+ private iterable $registries;
+ private StalenessHandlerInterface $stalenessHandler;
+
+ /**
+ * @param iterable<MetricSourceRegistryInterface> $registries
+ */
+ public function __construct(iterable $registries, StalenessHandlerInterface $stalenessHandler)
+ {
+ $this->registries = $registries;
+ $this->stalenessHandler = $stalenessHandler;
+ }
+
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void
+ {
+ foreach ($this->registries as $registry) {
+ $registry->add($provider, $metadata, $this->stalenessHandler);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php
new file mode 100644
index 000000000..3c1108902
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistration/RegistryRegistration.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistration;
+
+use OpenTelemetry\SDK\Metrics\MetricMetadataInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistrationInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceProviderInterface;
+use OpenTelemetry\SDK\Metrics\MetricSourceRegistryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class RegistryRegistration implements MetricRegistrationInterface
+{
+ private MetricSourceRegistryInterface $registry;
+ private StalenessHandlerInterface $stalenessHandler;
+
+ public function __construct(MetricSourceRegistryInterface $registry, StalenessHandlerInterface $stalenessHandler)
+ {
+ $this->registry = $registry;
+ $this->stalenessHandler = $stalenessHandler;
+ }
+
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void
+ {
+ $this->registry->add($provider, $metadata, $this->stalenessHandler);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php
new file mode 100644
index 000000000..b0cc2484e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistrationInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * @internal
+ */
+interface MetricRegistrationInterface
+{
+ public function register(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php
new file mode 100644
index 000000000..4e8e91ced
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricCollectorInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+/**
+ * @internal
+ */
+interface MetricCollectorInterface
+{
+ public function collectAndPush(iterable $streamIds): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php
new file mode 100644
index 000000000..9a18d2a84
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistry.php
@@ -0,0 +1,184 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use function array_key_last;
+use Closure;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextStorageInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+use function spl_object_id;
+
+/**
+ * @internal
+ */
+final class MetricRegistry implements MetricRegistryInterface, MetricWriterInterface
+{
+ private ?ContextStorageInterface $contextStorage;
+ private AttributesFactoryInterface $attributesFactory;
+ private ClockInterface $clock;
+
+ /** @var array<int, MetricStreamInterface> */
+ private array $streams = [];
+ /** @var array<int, MetricAggregatorInterface> */
+ private array $synchronousAggregators = [];
+ /** @var array<int, MetricAggregatorFactoryInterface> */
+ private array $asynchronousAggregatorFactories = [];
+
+ /** @var array<int, array<int, int>> */
+ private array $instrumentToStreams = [];
+ /** @var array<int, int> */
+ private array $streamToInstrument = [];
+ /** @var array<int, array<int, int>> */
+ private array $instrumentToCallbacks = [];
+ /** @var array<int, Closure> */
+ private array $asynchronousCallbacks = [];
+ /** @var array<int, list<int>> */
+ private array $asynchronousCallbackArguments = [];
+
+ public function __construct(
+ ?ContextStorageInterface $contextStorage,
+ AttributesFactoryInterface $attributesFactory,
+ ClockInterface $clock
+ ) {
+ $this->contextStorage = $contextStorage;
+ $this->attributesFactory = $attributesFactory;
+ $this->clock = $clock;
+ }
+
+ public function registerSynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorInterface $aggregator): int
+ {
+ $this->streams[] = $stream;
+ $streamId = array_key_last($this->streams);
+ $instrumentId = spl_object_id($instrument);
+
+ $this->synchronousAggregators[$streamId] = $aggregator;
+ $this->instrumentToStreams[$instrumentId][$streamId] = $streamId;
+ $this->streamToInstrument[$streamId] = $instrumentId;
+
+ return $streamId;
+ }
+
+ public function registerAsynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorFactoryInterface $aggregatorFactory): int
+ {
+ $this->streams[] = $stream;
+ $streamId = array_key_last($this->streams);
+ $instrumentId = spl_object_id($instrument);
+
+ $this->asynchronousAggregatorFactories[$streamId] = $aggregatorFactory;
+ $this->instrumentToStreams[$instrumentId][$streamId] = $streamId;
+ $this->streamToInstrument[$streamId] = $instrumentId;
+
+ return $streamId;
+ }
+
+ public function unregisterStream(int $streamId): void
+ {
+ $instrumentId = $this->streamToInstrument[$streamId];
+ unset(
+ $this->streams[$streamId],
+ $this->synchronousAggregators[$streamId],
+ $this->asynchronousAggregatorFactories[$streamId],
+ $this->instrumentToStreams[$instrumentId][$streamId],
+ $this->streamToInstrument[$streamId],
+ );
+ if (!$this->instrumentToStreams[$instrumentId]) {
+ unset($this->instrumentToStreams[$instrumentId]);
+ }
+ }
+
+ public function record(Instrument $instrument, $value, iterable $attributes = [], $context = null): void
+ {
+ $context = Context::resolve($context, $this->contextStorage);
+ $attributes = $this->attributesFactory->builder($attributes)->build();
+ $timestamp = $this->clock->now();
+ $instrumentId = spl_object_id($instrument);
+ foreach ($this->instrumentToStreams[$instrumentId] ?? [] as $streamId) {
+ if ($aggregator = $this->synchronousAggregators[$streamId] ?? null) {
+ $aggregator->record($value, $attributes, $context, $timestamp);
+ }
+ }
+ }
+
+ public function registerCallback(Closure $callback, Instrument $instrument, Instrument ...$instruments): int
+ {
+ $callbackId = array_key_last($this->asynchronousCallbacks) + 1;
+ $this->asynchronousCallbacks[$callbackId] = $callback;
+
+ $instrumentId = spl_object_id($instrument);
+ $this->asynchronousCallbackArguments[$callbackId] = [$instrumentId];
+ $this->instrumentToCallbacks[$instrumentId][$callbackId] = $callbackId;
+ foreach ($instruments as $instrument) {
+ $instrumentId = spl_object_id($instrument);
+ $this->asynchronousCallbackArguments[$callbackId][] = $instrumentId;
+ $this->instrumentToCallbacks[$instrumentId][$callbackId] = $callbackId;
+ }
+
+ return $callbackId;
+ }
+
+ public function unregisterCallback(int $callbackId): void
+ {
+ $instrumentIds = $this->asynchronousCallbackArguments[$callbackId];
+ unset(
+ $this->asynchronousCallbacks[$callbackId],
+ $this->asynchronousCallbackArguments[$callbackId],
+ );
+ foreach ($instrumentIds as $instrumentId) {
+ unset($this->instrumentToCallbacks[$instrumentId][$callbackId]);
+ if (!$this->instrumentToCallbacks[$instrumentId]) {
+ unset($this->instrumentToCallbacks[$instrumentId]);
+ }
+ }
+ }
+
+ public function collectAndPush(iterable $streamIds): void
+ {
+ $timestamp = $this->clock->now();
+ $aggregators = [];
+ $observers = [];
+ $callbackIds = [];
+ foreach ($streamIds as $streamId) {
+ if (!$aggregator = $this->synchronousAggregators[$streamId] ?? null) {
+ $aggregator = $this->asynchronousAggregatorFactories[$streamId]->create();
+
+ $instrumentId = $this->streamToInstrument[$streamId];
+ $observers[$instrumentId] ??= new MultiObserver($this->attributesFactory, $timestamp);
+ $observers[$instrumentId]->writers[] = $aggregator;
+ foreach ($this->instrumentToCallbacks[$instrumentId] ?? [] as $callbackId) {
+ $callbackIds[$callbackId] = $callbackId;
+ }
+ }
+
+ $aggregators[$streamId] = $aggregator;
+ }
+
+ $noopObserver = new NoopObserver();
+ $callbacks = [];
+ foreach ($callbackIds as $callbackId) {
+ $args = [];
+ foreach ($this->asynchronousCallbackArguments[$callbackId] as $instrumentId) {
+ $args[] = $observers[$instrumentId] ?? $noopObserver;
+ }
+ $callback = $this->asynchronousCallbacks[$callbackId];
+ $callbacks[] = static fn () => $callback(...$args);
+ }
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+
+ $timestamp = $this->clock->now();
+ foreach ($aggregators as $streamId => $aggregator) {
+ if ($stream = $this->streams[$streamId] ?? null) {
+ $stream->push($aggregator->collect($timestamp));
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php
new file mode 100644
index 000000000..e86731138
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricRegistryInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricAggregatorInterface;
+use OpenTelemetry\SDK\Metrics\Stream\MetricStreamInterface;
+
+/**
+ * @internal
+ */
+interface MetricRegistryInterface extends MetricCollectorInterface
+{
+ public function registerSynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorInterface $aggregator): int;
+
+ public function registerAsynchronousStream(Instrument $instrument, MetricStreamInterface $stream, MetricAggregatorFactoryInterface $aggregatorFactory): int;
+
+ public function unregisterStream(int $streamId): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php
new file mode 100644
index 000000000..e5ff7eb5c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\Instrument;
+
+/**
+ * @internal
+ */
+interface MetricWriterInterface
+{
+ public function record(Instrument $instrument, $value, iterable $attributes = [], $context = null): void;
+
+ public function registerCallback(Closure $callback, Instrument $instrument, Instrument ...$instruments): int;
+
+ public function unregisterCallback(int $callbackId): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php
new file mode 100644
index 000000000..f36f74a2a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MultiObserver.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+use OpenTelemetry\SDK\Metrics\Stream\WritableMetricStreamInterface;
+
+/**
+ * @internal
+ */
+final class MultiObserver implements ObserverInterface
+{
+ private AttributesFactoryInterface $attributesFactory;
+ private int $timestamp;
+
+ /** @var list<WritableMetricStreamInterface> */
+ public array $writers = [];
+
+ public function __construct(AttributesFactoryInterface $attributesFactory, int $timestamp)
+ {
+ $this->attributesFactory = $attributesFactory;
+ $this->timestamp = $timestamp;
+ }
+
+ public function observe($amount, iterable $attributes = []): void
+ {
+ $context = Context::getRoot();
+ $attributes = $this->attributesFactory->builder($attributes)->build();
+ foreach ($this->writers as $writer) {
+ $writer->record($amount, $attributes, $context, $this->timestamp);
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php
new file mode 100644
index 000000000..efbd94dac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricRegistry/NoopObserver.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\MetricRegistry;
+
+use OpenTelemetry\API\Metrics\ObserverInterface;
+
+/**
+ * @internal
+ */
+final class NoopObserver implements ObserverInterface
+{
+ public function observe($amount, iterable $attributes = []): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php
new file mode 100644
index 000000000..5f00a0717
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Metric;
+
+interface MetricSourceInterface
+{
+ /**
+ * Returns the last metric collection timestamp.
+ *
+ * @return int last collection timestamp
+ */
+ public function collectionTimestamp(): int;
+
+ /**
+ * Collects metric data from the underlying provider.
+ *
+ * @return Metric collected metric
+ */
+ public function collect(): Metric;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php
new file mode 100644
index 000000000..f8b6ea438
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceProviderInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+interface MetricSourceProviderInterface
+{
+ /**
+ * @param string|Temporality $temporality
+ */
+ public function create($temporality): MetricSourceInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php
new file mode 100644
index 000000000..dd7ff53ac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/MetricSourceRegistryInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface MetricSourceRegistryInterface
+{
+ public function add(MetricSourceProviderInterface $provider, MetricMetadataInterface $metadata, StalenessHandlerInterface $stalenessHandler): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php b/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php
new file mode 100644
index 000000000..2efb484d3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\MeterInterface;
+use OpenTelemetry\API\Metrics\Noop\NoopMeter;
+
+class NoopMeterProvider implements MeterProviderInterface
+{
+ public function shutdown(): bool
+ {
+ return true;
+ }
+
+ public function forceFlush(): bool
+ {
+ return true;
+ }
+
+ public function getMeter(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): MeterInterface
+ {
+ return new NoopMeter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php b/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php
new file mode 100644
index 000000000..ffe5ead87
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCallback.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCallback implements ObservableCallbackInterface
+{
+ private MetricWriterInterface $writer;
+ private ReferenceCounterInterface $referenceCounter;
+ private ?int $callbackId;
+ private ?ObservableCallbackDestructor $callbackDestructor;
+ /** @phpstan-ignore-next-line */
+ private ?object $target;
+
+ public function __construct(MetricWriterInterface $writer, ReferenceCounterInterface $referenceCounter, int $callbackId, ?ObservableCallbackDestructor $callbackDestructor, ?object $target)
+ {
+ $this->writer = $writer;
+ $this->referenceCounter = $referenceCounter;
+ $this->callbackId = $callbackId;
+ $this->callbackDestructor = $callbackDestructor;
+ $this->target = $target;
+ }
+
+ public function detach(): void
+ {
+ if ($this->callbackId === null) {
+ return;
+ }
+
+ $this->writer->unregisterCallback($this->callbackId);
+ $this->referenceCounter->release();
+ if ($this->callbackDestructor !== null) {
+ unset($this->callbackDestructor->callbackIds[$this->callbackId]);
+ }
+
+ $this->callbackId = null;
+ }
+
+ public function __destruct()
+ {
+ if ($this->callbackDestructor !== null) {
+ return;
+ }
+ if ($this->callbackId === null) {
+ return;
+ }
+
+ $this->referenceCounter->acquire(true);
+ $this->referenceCounter->release();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php b/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php
new file mode 100644
index 000000000..0dfea3907
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCallbackDestructor.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCallbackDestructor
+{
+ /** @var array<int, int> */
+ public array $callbackIds = [];
+ private MetricWriterInterface $writer;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->referenceCounter = $referenceCounter;
+ }
+
+ public function __destruct()
+ {
+ foreach ($this->callbackIds as $callbackId) {
+ $this->writer->unregisterCallback($callbackId);
+ $this->referenceCounter->release();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php b/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php
new file mode 100644
index 000000000..99ae43eee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableCounter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableCounterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableCounter implements ObservableCounterInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php b/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php
new file mode 100644
index 000000000..88c1a546c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableGauge.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableGaugeInterface;
+
+/**
+ * @internal
+ */
+final class ObservableGauge implements ObservableGaugeInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php b/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php
new file mode 100644
index 000000000..b7fdcf5f8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableInstrumentTrait.php
@@ -0,0 +1,61 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use ArrayAccess;
+use OpenTelemetry\API\Metrics\ObservableCallbackInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use function OpenTelemetry\SDK\Common\Util\closure;
+use function OpenTelemetry\SDK\Common\Util\weaken;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+trait ObservableInstrumentTrait
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+ private ArrayAccess $destructors;
+
+ public function __construct(
+ MetricWriterInterface $writer,
+ Instrument $instrument,
+ ReferenceCounterInterface $referenceCounter,
+ ArrayAccess $destructors
+ ) {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+ $this->destructors = $destructors;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ /**
+ * @param callable(ObserverInterface): void $callback
+ */
+ public function observe(callable $callback): ObservableCallbackInterface
+ {
+ $callback = weaken(closure($callback), $target);
+
+ $callbackId = $this->writer->registerCallback($callback, $this->instrument);
+ $this->referenceCounter->acquire();
+
+ $destructor = null;
+ if ($target) {
+ $destructor = $this->destructors[$target] ??= new ObservableCallbackDestructor($this->writer, $this->referenceCounter);
+ $destructor->callbackIds[$callbackId] = $callbackId;
+ }
+
+ return new ObservableCallback($this->writer, $this->referenceCounter, $callbackId, $destructor, $target);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php b/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php
new file mode 100644
index 000000000..8d21be734
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ObservableUpDownCounter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface;
+
+/**
+ * @internal
+ */
+final class ObservableUpDownCounter implements ObservableUpDownCounterInterface
+{
+ use ObservableInstrumentTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php b/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php
new file mode 100644
index 000000000..d24b0e396
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/PushMetricExporterInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Metrics;
+
+interface PushMetricExporterInterface extends Metrics\MetricExporterInterface
+{
+ public function forceFlush(): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php b/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php
new file mode 100644
index 000000000..f7e70b644
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ReferenceCounterInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+/**
+ * @internal
+ */
+interface ReferenceCounterInterface
+{
+ public function acquire(bool $persistent = false): void;
+
+ public function release(): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php
new file mode 100644
index 000000000..66b271018
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandler.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use function assert;
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class DelayedStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ private Closure $stale;
+ private Closure $freshen;
+
+ /** @var Closure[]|null */
+ private ?array $onStale = [];
+ private int $count = 0;
+
+ public function __construct(Closure $stale, Closure $freshen)
+ {
+ $this->stale = $stale;
+ $this->freshen = $freshen;
+ }
+
+ public function acquire(bool $persistent = false): void
+ {
+ if ($this->count === 0) {
+ ($this->freshen)($this);
+ }
+
+ $this->count++;
+
+ if ($persistent) {
+ $this->onStale = null;
+ }
+ }
+
+ public function release(): void
+ {
+ if (--$this->count || $this->onStale === null) {
+ return;
+ }
+
+ ($this->stale)($this);
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ if ($this->onStale === null) {
+ return;
+ }
+
+ $this->onStale[] = $callback;
+ }
+
+ public function triggerStale(): void
+ {
+ assert($this->onStale !== null);
+
+ $callbacks = $this->onStale;
+ $this->onStale = [];
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php
new file mode 100644
index 000000000..0d719c74f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/DelayedStalenessHandlerFactory.php
@@ -0,0 +1,64 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use ArrayAccess;
+use Closure;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Common\Util\WeakMap;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+use Traversable;
+
+final class DelayedStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ private ClockInterface $clock;
+ private int $nanoDelay;
+
+ private Closure $stale;
+ private Closure $freshen;
+
+ /** @var ArrayAccess<DelayedStalenessHandler, int>&Traversable<DelayedStalenessHandler, int> */
+ private $staleHandlers;
+
+ /**
+ * @param float $delay delay in seconds
+ */
+ public function __construct(ClockInterface $clock, float $delay)
+ {
+ $this->clock = $clock;
+ $this->nanoDelay = (int) ($delay * 1e9);
+
+ $this->stale = function (DelayedStalenessHandler $handler): void {
+ $this->staleHandlers[$handler] = $this->clock->now();
+ };
+ $this->freshen = function (DelayedStalenessHandler $handler): void {
+ unset($this->staleHandlers[$handler]);
+ };
+
+ $this->staleHandlers = WeakMap::create();
+ }
+
+ public function create(): StalenessHandlerInterface
+ {
+ $this->triggerStaleHandlers();
+
+ return new DelayedStalenessHandler($this->stale, $this->freshen);
+ }
+
+ private function triggerStaleHandlers(): void
+ {
+ $expired = $this->clock->now() - $this->nanoDelay;
+ foreach ($this->staleHandlers as $handler => $timestamp) {
+ if ($timestamp > $expired) {
+ break;
+ }
+
+ /** @var DelayedStalenessHandler $handler */
+ unset($this->staleHandlers[$handler]);
+ $handler->triggerStale();
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php
new file mode 100644
index 000000000..a5b32d5c4
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class ImmediateStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ /** @var Closure[]|null */
+ private ?array $onStale = [];
+ private int $count = 0;
+
+ public function acquire(bool $persistent = false): void
+ {
+ $this->count++;
+
+ if ($persistent) {
+ $this->onStale = null;
+ }
+ }
+
+ public function release(): void
+ {
+ if (--$this->count !== 0 || !$this->onStale) {
+ return;
+ }
+
+ $callbacks = $this->onStale;
+ $this->onStale = [];
+ foreach ($callbacks as $callback) {
+ $callback();
+ }
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ if ($this->onStale === null) {
+ return;
+ }
+
+ $this->onStale[] = $callback;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php
new file mode 100644
index 000000000..899615dea
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/ImmediateStalenessHandlerFactory.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+final class ImmediateStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ public function create(): StalenessHandlerInterface
+ {
+ return new ImmediateStalenessHandler();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php
new file mode 100644
index 000000000..00d432b6b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandler.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use Closure;
+use OpenTelemetry\SDK\Metrics\ReferenceCounterInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+/**
+ * @internal
+ */
+final class NoopStalenessHandler implements StalenessHandlerInterface, ReferenceCounterInterface
+{
+ public function acquire(bool $persistent = false): void
+ {
+ // no-op
+ }
+
+ public function release(): void
+ {
+ // no-op
+ }
+
+ public function onStale(Closure $callback): void
+ {
+ // no-op
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php
new file mode 100644
index 000000000..07f34e3b0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandler/NoopStalenessHandlerFactory.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\StalenessHandler;
+
+use OpenTelemetry\SDK\Metrics\StalenessHandlerFactoryInterface;
+use OpenTelemetry\SDK\Metrics\StalenessHandlerInterface;
+
+final class NoopStalenessHandlerFactory implements StalenessHandlerFactoryInterface
+{
+ public function create(): StalenessHandlerInterface
+ {
+ static $instance;
+
+ return $instance ??= new NoopStalenessHandler();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php
new file mode 100644
index 000000000..e22385420
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+interface StalenessHandlerFactoryInterface
+{
+ /**
+ * @return StalenessHandlerInterface&ReferenceCounterInterface
+ */
+ public function create(): StalenessHandlerInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php
new file mode 100644
index 000000000..c85d86f8e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/StalenessHandlerInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use Closure;
+
+interface StalenessHandlerInterface
+{
+ public function onStale(Closure $callback): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php b/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php
new file mode 100644
index 000000000..cb32f94df
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function array_search;
+use function count;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @internal
+ */
+final class AsynchronousMetricStream implements MetricStreamInterface
+{
+ private AggregationInterface $aggregation;
+
+ private int $startTimestamp;
+ private Metric $metric;
+
+ /** @var array<int, Metric|null> */
+ private array $lastReads = [];
+
+ public function __construct(AggregationInterface $aggregation, int $startTimestamp)
+ {
+ $this->aggregation = $aggregation;
+ $this->startTimestamp = $startTimestamp;
+ $this->metric = new Metric([], [], $startTimestamp);
+ }
+
+ public function temporality()
+ {
+ return Temporality::CUMULATIVE;
+ }
+
+ public function timestamp(): int
+ {
+ return $this->metric->timestamp;
+ }
+
+ public function push(Metric $metric): void
+ {
+ $this->metric = $metric;
+ }
+
+ public function register($temporality): int
+ {
+ if ($temporality === Temporality::CUMULATIVE) {
+ return -1;
+ }
+
+ if (($reader = array_search(null, $this->lastReads, true)) === false) {
+ $reader = count($this->lastReads);
+ }
+
+ $this->lastReads[$reader] = $this->metric;
+
+ return $reader;
+ }
+
+ public function unregister(int $reader): void
+ {
+ if (!isset($this->lastReads[$reader])) {
+ return;
+ }
+
+ $this->lastReads[$reader] = null;
+ }
+
+ public function collect(int $reader): DataInterface
+ {
+ $metric = $this->metric;
+
+ if (($lastRead = $this->lastReads[$reader] ?? null) === null) {
+ $temporality = Temporality::CUMULATIVE;
+ $startTimestamp = $this->startTimestamp;
+ } else {
+ $temporality = Temporality::DELTA;
+ $startTimestamp = $lastRead->timestamp;
+
+ $this->lastReads[$reader] = $metric;
+ $metric = $this->diff($lastRead, $metric);
+ }
+
+ return $this->aggregation->toData(
+ $metric->attributes,
+ $metric->summaries,
+ Exemplar::groupByIndex($metric->exemplars),
+ $startTimestamp,
+ $metric->timestamp,
+ $temporality,
+ );
+ }
+
+ private function diff(Metric $lastRead, Metric $metric): Metric
+ {
+ $diff = clone $metric;
+ foreach ($metric->summaries as $k => $summary) {
+ if (!isset($lastRead->summaries[$k])) {
+ continue;
+ }
+
+ $diff->summaries[$k] = $this->aggregation->diff($lastRead->summaries[$k], $summary);
+ }
+
+ return $diff;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php b/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php
new file mode 100644
index 000000000..a4ff56d71
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/Delta.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use GMP;
+
+/**
+ * @internal
+ */
+final class Delta
+{
+ public Metric $metric;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ public $readers;
+ public ?self $prev;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeParameter
+ * @param int|GMP $readers
+ */
+ public function __construct(Metric $metric, $readers, ?self $prev = null)
+ {
+ $this->metric = $metric;
+ $this->readers = $readers;
+ $this->prev = $prev;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php b/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php
new file mode 100644
index 000000000..b46a28d65
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php
@@ -0,0 +1,110 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function assert;
+use GMP;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+
+/**
+ * @internal
+ */
+final class DeltaStorage
+{
+ private AggregationInterface $aggregation;
+ private Delta $head;
+
+ public function __construct(AggregationInterface $aggregation)
+ {
+ $this->aggregation = $aggregation;
+ $this->head = new Delta(new Metric([], [], 0), 0);
+
+ /** @phan-suppress-next-line PhanTypeObjectUnsetDeclaredProperty */
+ unset($this->head->metric);
+ }
+
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeParameter
+ * @param int|GMP $readers
+ */
+ public function add(Metric $metric, $readers): void
+ {
+ /** @phpstan-ignore-next-line */
+ if ($readers == 0) {
+ return;
+ }
+
+ if (($this->head->prev->readers ?? null) != $readers) {
+ $this->head->prev = new Delta($metric, $readers, $this->head->prev);
+ } else {
+ assert($this->head->prev !== null);
+ $this->mergeInto($this->head->prev->metric, $metric);
+ }
+ }
+
+ public function collect(int $reader, bool $retain = false): ?Metric
+ {
+ $n = null;
+ for ($d = $this->head; $d->prev; $d = $d->prev) {
+ if (($d->prev->readers >> $reader & 1) != 0) {
+ if ($n !== null) {
+ assert($n->prev !== null);
+ $n->prev->readers ^= $d->prev->readers;
+ $this->mergeInto($d->prev->metric, $n->prev->metric);
+ $this->tryUnlink($n);
+
+ if ($n->prev === $d->prev) {
+ continue;
+ }
+ }
+
+ $n = $d;
+ }
+ }
+
+ $metric = $n->prev->metric ?? null;
+
+ if (!$retain && $n) {
+ assert($n->prev !== null);
+ $n->prev->readers ^= ($n->prev->readers & 1 | 1) << $reader;
+ $this->tryUnlink($n);
+ }
+
+ return $metric;
+ }
+
+ private function tryUnlink(Delta $n): void
+ {
+ assert($n->prev !== null);
+ /** @phpstan-ignore-next-line */
+ if ($n->prev->readers == 0) {
+ $n->prev = $n->prev->prev;
+
+ return;
+ }
+
+ for ($c = $n->prev->prev;
+ $c && ($n->prev->readers & $c->readers) == 0;
+ $c = $c->prev) {
+ }
+
+ if ($c && $n->prev->readers === $c->readers) {
+ $this->mergeInto($c->metric, $n->prev->metric);
+ $n->prev = $n->prev->prev;
+ }
+ }
+
+ private function mergeInto(Metric $into, Metric $metric): void
+ {
+ foreach ($metric->summaries as $k => $summary) {
+ $into->attributes[$k] ??= $metric->attributes[$k];
+ $into->summaries[$k] = isset($into->summaries[$k])
+ ? $this->aggregation->merge($into->summaries[$k], $summary)
+ : $summary;
+ }
+ $into->exemplars += $metric->exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php b/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php
new file mode 100644
index 000000000..6b1db9eef
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+
+/**
+ * @internal
+ *
+ * @template T
+ */
+final class Metric
+{
+
+ /**
+ * @var array<AttributesInterface>
+ */
+ public array $attributes;
+ /**
+ * @var array<T>
+ */
+ public array $summaries;
+ public int $timestamp;
+ /**
+ * @var array<Exemplar>
+ */
+ public array $exemplars;
+
+ /**
+ * @param array<AttributesInterface> $attributes
+ * @param array<T> $summaries
+ * @param array<Exemplar> $exemplars
+ */
+ public function __construct(array $attributes, array $summaries, int $timestamp, array $exemplars = [])
+ {
+ $this->attributes = $attributes;
+ $this->summaries = $summaries;
+ $this->timestamp = $timestamp;
+ $this->exemplars = $exemplars;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php
new file mode 100644
index 000000000..b1328eb07
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregator.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarReservoirInterface;
+use function serialize;
+
+/**
+ * @internal
+ */
+final class MetricAggregator implements MetricAggregatorInterface
+{
+ private ?AttributeProcessorInterface $attributeProcessor;
+ private AggregationInterface $aggregation;
+ private ?ExemplarReservoirInterface $exemplarReservoir;
+
+ /** @var array<AttributesInterface> */
+ private array $attributes = [];
+ private array $summaries = [];
+
+ public function __construct(
+ ?AttributeProcessorInterface $attributeProcessor,
+ AggregationInterface $aggregation,
+ ?ExemplarReservoirInterface $exemplarReservoir = null
+ ) {
+ $this->attributeProcessor = $attributeProcessor;
+ $this->aggregation = $aggregation;
+ $this->exemplarReservoir = $exemplarReservoir;
+ }
+
+ /**
+ * @param float|int $value
+ */
+ public function record($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void
+ {
+ $filteredAttributes = $this->attributeProcessor !== null
+ ? $this->attributeProcessor->process($attributes, $context)
+ : $attributes;
+ $raw = $filteredAttributes->toArray();
+ $index = $raw !== [] ? serialize($raw) : 0;
+ $this->attributes[$index] ??= $filteredAttributes;
+ $this->aggregation->record(
+ $this->summaries[$index] ??= $this->aggregation->initialize(),
+ $value,
+ $attributes,
+ $context,
+ $timestamp,
+ );
+
+ if ($this->exemplarReservoir !== null) {
+ $this->exemplarReservoir->offer($index, $value, $attributes, $context, $timestamp);
+ }
+ }
+
+ public function collect(int $timestamp): Metric
+ {
+ $exemplars = $this->exemplarReservoir
+ ? $this->exemplarReservoir->collect($this->attributes)
+ : [];
+ $metric = new Metric($this->attributes, $this->summaries, $timestamp, $exemplars);
+
+ $this->attributes = [];
+ $this->summaries = [];
+
+ return $metric;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php
new file mode 100644
index 000000000..5866a72b7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactory.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\AttributeProcessorInterface;
+
+/**
+ * @internal
+ */
+final class MetricAggregatorFactory implements MetricAggregatorFactoryInterface
+{
+ private ?AttributeProcessorInterface $attributeProcessor;
+ private AggregationInterface $aggregation;
+
+ public function __construct(?AttributeProcessorInterface $attributeProcessor, AggregationInterface $aggregation)
+ {
+ $this->attributeProcessor = $attributeProcessor;
+ $this->aggregation = $aggregation;
+ }
+
+ public function create(): MetricAggregatorInterface
+ {
+ return new MetricAggregator($this->attributeProcessor, $this->aggregation);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php
new file mode 100644
index 000000000..356f682f2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorFactoryInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricAggregatorFactoryInterface
+{
+ public function create(): MetricAggregatorInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php
new file mode 100644
index 000000000..2f5cfbf15
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricAggregatorInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricAggregatorInterface extends WritableMetricStreamInterface, MetricCollectorInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php
new file mode 100644
index 000000000..51a728df7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricCollectorInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+/**
+ * @internal
+ */
+interface MetricCollectorInterface
+{
+ public function collect(int $timestamp): Metric;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php
new file mode 100644
index 000000000..1373a1c93
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/MetricStreamInterface.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+
+/**
+ * @internal
+ */
+interface MetricStreamInterface
+{
+ /**
+ * Returns the internal temporality of this stream.
+ *
+ * @return string|Temporality internal temporality
+ */
+ public function temporality();
+
+ /**
+ * Returns the last metric timestamp.
+ *
+ * @return int metric timestamp
+ */
+ public function timestamp(): int;
+
+ /**
+ * Pushes metric data to the stream.
+ *
+ * @param Metric $metric metric data to push
+ */
+ public function push(Metric $metric): void;
+
+ /**
+ * Registers a new reader with the given temporality.
+ *
+ * @param string|Temporality $temporality temporality to use
+ * @return int reader id
+ */
+ public function register($temporality): int;
+
+ /**
+ * Unregisters the given reader.
+ *
+ * @param int $reader reader id
+ */
+ public function unregister(int $reader): void;
+
+ /**
+ * Collects metric data for the given reader.
+ *
+ * @param int $reader reader id
+ * @return DataInterface metric data
+ */
+ public function collect(int $reader): DataInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php b/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php
new file mode 100644
index 000000000..52645504c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use function assert;
+use const E_USER_WARNING;
+use function extension_loaded;
+use GMP;
+use function gmp_init;
+use function is_int;
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Data\DataInterface;
+use OpenTelemetry\SDK\Metrics\Data\Exemplar;
+use OpenTelemetry\SDK\Metrics\Data\Temporality;
+use const PHP_INT_SIZE;
+use function sprintf;
+use function trigger_error;
+
+/**
+ * @internal
+ */
+final class SynchronousMetricStream implements MetricStreamInterface
+{
+ private AggregationInterface $aggregation;
+
+ private int $timestamp;
+
+ private DeltaStorage $delta;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ private $readers = 0;
+ /**
+ * @psalm-suppress UndefinedDocblockClass
+ * @phan-suppress PhanUndeclaredTypeProperty
+ * @var int|GMP
+ */
+ private $cumulative = 0;
+
+ public function __construct(AggregationInterface $aggregation, int $startTimestamp)
+ {
+ $this->aggregation = $aggregation;
+ $this->timestamp = $startTimestamp;
+ $this->delta = new DeltaStorage($aggregation);
+ }
+
+ public function temporality()
+ {
+ return Temporality::DELTA;
+ }
+
+ public function timestamp(): int
+ {
+ return $this->timestamp;
+ }
+
+ public function push(Metric $metric): void
+ {
+ [$this->timestamp, $metric->timestamp] = [$metric->timestamp, $this->timestamp];
+ $this->delta->add($metric, $this->readers);
+ }
+
+ public function register($temporality): int
+ {
+ $reader = 0;
+ for ($r = $this->readers; ($r & 1) != 0; $r >>= 1, $reader++) {
+ }
+
+ if ($reader === (PHP_INT_SIZE << 3) - 1 && is_int($this->readers)) {
+ if (!extension_loaded('gmp')) {
+ trigger_error(sprintf('GMP extension required to register over %d readers', (PHP_INT_SIZE << 3) - 1), E_USER_WARNING);
+ $reader = PHP_INT_SIZE << 3;
+ } else {
+ assert(is_int($this->cumulative));
+ $this->readers = gmp_init($this->readers);
+ $this->cumulative = gmp_init($this->cumulative);
+ }
+ }
+
+ $readerMask = ($this->readers & 1 | 1) << $reader;
+ $this->readers ^= $readerMask;
+ if ($temporality === Temporality::CUMULATIVE) {
+ $this->cumulative ^= $readerMask;
+ }
+
+ return $reader;
+ }
+
+ public function unregister(int $reader): void
+ {
+ $readerMask = ($this->readers & 1 | 1) << $reader;
+ if (($this->readers & $readerMask) == 0) {
+ return;
+ }
+
+ $this->delta->collect($reader);
+
+ $this->readers ^= $readerMask;
+ if (($this->cumulative & $readerMask) != 0) {
+ $this->cumulative ^= $readerMask;
+ }
+ }
+
+ public function collect(int $reader): DataInterface
+ {
+ $cumulative = ($this->cumulative >> $reader & 1) != 0;
+ $metric = $this->delta->collect($reader, $cumulative) ?? new Metric([], [], $this->timestamp);
+
+ $temporality = $cumulative
+ ? Temporality::CUMULATIVE
+ : Temporality::DELTA;
+
+ return $this->aggregation->toData(
+ $metric->attributes,
+ $metric->summaries,
+ Exemplar::groupByIndex($metric->exemplars),
+ $metric->timestamp,
+ $this->timestamp,
+ $temporality,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php b/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php
new file mode 100644
index 000000000..9fd425a44
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/Stream/WritableMetricStreamInterface.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\Stream;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * @internal
+ */
+interface WritableMetricStreamInterface
+{
+ /**
+ * @param float|int $value
+ */
+ public function record($value, AttributesInterface $attributes, ContextInterface $context, int $timestamp): void;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php b/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php
new file mode 100644
index 000000000..1adf67f8a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/UpDownCounter.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\API\Metrics\UpDownCounterInterface;
+use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricWriterInterface;
+
+/**
+ * @internal
+ */
+final class UpDownCounter implements UpDownCounterInterface
+{
+ private MetricWriterInterface $writer;
+ private Instrument $instrument;
+ private ReferenceCounterInterface $referenceCounter;
+
+ public function __construct(MetricWriterInterface $writer, Instrument $instrument, ReferenceCounterInterface $referenceCounter)
+ {
+ $this->writer = $writer;
+ $this->instrument = $instrument;
+ $this->referenceCounter = $referenceCounter;
+
+ $this->referenceCounter->acquire();
+ }
+
+ public function __destruct()
+ {
+ $this->referenceCounter->release();
+ }
+
+ public function add($amount, iterable $attributes = [], $context = null): void
+ {
+ $this->writer->record($this->instrument, $amount, $attributes, $context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php b/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php
new file mode 100644
index 000000000..f387abf9c
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/CriteriaViewRegistry.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use Generator;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\ViewRegistryInterface;
+
+final class CriteriaViewRegistry implements ViewRegistryInterface
+{
+ /** @var list<SelectionCriteriaInterface> */
+ private array $criteria = [];
+ /** @var list<ViewTemplate> */
+ private array $views = [];
+
+ public function register(SelectionCriteriaInterface $criteria, ViewTemplate $view): void
+ {
+ $this->criteria[] = $criteria;
+ $this->views[] = $view;
+ }
+
+ public function find(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): ?iterable
+ {
+ $views = $this->generateViews($instrument, $instrumentationScope);
+
+ return $views->valid() ? $views : null;
+ }
+
+ private function generateViews(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): Generator
+ {
+ foreach ($this->criteria as $i => $criteria) {
+ if ($criteria->accepts($instrument, $instrumentationScope)) {
+ yield $this->views[$i]->project($instrument);
+ }
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php
new file mode 100644
index 000000000..438297324
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/AllCriteria.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class AllCriteria implements SelectionCriteriaInterface
+{
+ private iterable $criteria;
+
+ /**
+ * @param iterable<SelectionCriteriaInterface> $criteria
+ */
+ public function __construct(iterable $criteria)
+ {
+ $this->criteria = $criteria;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ foreach ($this->criteria as $criterion) {
+ if (!$criterion->accepts($instrument, $instrumentationScope)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php
new file mode 100644
index 000000000..ed6034755
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentNameCriteria.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+use function preg_match;
+use function preg_quote;
+use function sprintf;
+use function strtr;
+
+final class InstrumentNameCriteria implements SelectionCriteriaInterface
+{
+ private string $pattern;
+
+ public function __construct(string $name)
+ {
+ $this->pattern = sprintf('/^%s$/', strtr(preg_quote($name, '/'), ['\\?' => '.', '\\*' => '.*']));
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return (bool) preg_match($this->pattern, $instrument->name);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php
new file mode 100644
index 000000000..46a88def0
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentTypeCriteria.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use function in_array;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\InstrumentType;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentTypeCriteria implements SelectionCriteriaInterface
+{
+ private array $instrumentTypes;
+
+ /**
+ * @param string|InstrumentType|string[]|InstrumentType[] $instrumentType
+ */
+ public function __construct($instrumentType)
+ {
+ $this->instrumentTypes = (array) $instrumentType;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return in_array($instrument->type, $this->instrumentTypes, true);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php
new file mode 100644
index 000000000..201d1a7b2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeNameCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeNameCriteria implements SelectionCriteriaInterface
+{
+ private string $name;
+
+ public function __construct(string $name)
+ {
+ $this->name = $name;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->name === $instrumentationScope->getName();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php
new file mode 100644
index 000000000..a11a1d589
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeSchemaUrlCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeSchemaUrlCriteria implements SelectionCriteriaInterface
+{
+ private ?string $schemaUrl;
+
+ public function __construct(?string $schemaUrl)
+ {
+ $this->schemaUrl = $schemaUrl;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->schemaUrl === $instrumentationScope->getSchemaUrl();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php
new file mode 100644
index 000000000..37d180f99
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteria/InstrumentationScopeVersionCriteria.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View\SelectionCriteria;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\View\SelectionCriteriaInterface;
+
+final class InstrumentationScopeVersionCriteria implements SelectionCriteriaInterface
+{
+ private ?string $version;
+
+ public function __construct(?string $version)
+ {
+ $this->version = $version;
+ }
+
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool
+ {
+ return $this->version === $instrumentationScope->getVersion();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php
new file mode 100644
index 000000000..8abd6fa69
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/SelectionCriteriaInterface.php
@@ -0,0 +1,13 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+
+interface SelectionCriteriaInterface
+{
+ public function accepts(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php b/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php
new file mode 100644
index 000000000..302ed83ae
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/View/ViewTemplate.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics\View;
+
+use OpenTelemetry\SDK\Metrics\AggregationInterface;
+use OpenTelemetry\SDK\Metrics\Instrument;
+use OpenTelemetry\SDK\Metrics\ViewProjection;
+
+final class ViewTemplate
+{
+ private ?string $name = null;
+ private ?string $description = null;
+ /**
+ * @var list<string>
+ */
+ private ?array $attributeKeys = null;
+ private ?AggregationInterface $aggregation = null;
+
+ private function __construct()
+ {
+ }
+
+ public static function create(): self
+ {
+ static $instance;
+
+ return $instance ??= new self();
+ }
+
+ public function withName(string $name): self
+ {
+ $self = clone $this;
+ $self->name = $name;
+
+ return $self;
+ }
+
+ public function withDescription(string $description): self
+ {
+ $self = clone $this;
+ $self->description = $description;
+
+ return $self;
+ }
+
+ /**
+ * @param list<string> $attributeKeys
+ */
+ public function withAttributeKeys(array $attributeKeys): self
+ {
+ $self = clone $this;
+ $self->attributeKeys = $attributeKeys;
+
+ return $self;
+ }
+
+ public function withAggregation(?AggregationInterface $aggregation): self
+ {
+ $self = clone $this;
+ $self->aggregation = $aggregation;
+
+ return $self;
+ }
+
+ public function project(Instrument $instrument): ViewProjection
+ {
+ return new ViewProjection(
+ $this->name ?? $instrument->name,
+ $instrument->unit,
+ $this->description ?? $instrument->description,
+ $this->attributeKeys,
+ $this->aggregation,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ViewProjection.php b/vendor/open-telemetry/sdk/Metrics/ViewProjection.php
new file mode 100644
index 000000000..046bd6bb1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ViewProjection.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+final class ViewProjection
+{
+ /**
+ * @readonly
+ */
+ public string $name;
+ /**
+ * @readonly
+ */
+ public ?string $unit;
+ /**
+ * @readonly
+ */
+ public ?string $description;
+ /**
+ * @readonly
+ * @var list<string>|null
+ */
+ public ?array $attributeKeys;
+ /**
+ * @readonly
+ */
+ public ?AggregationInterface $aggregation;
+
+ /**
+ * @param list<string>|null $attributeKeys
+ */
+ public function __construct(
+ string $name,
+ ?string $unit,
+ ?string $description,
+ ?array $attributeKeys,
+ ?AggregationInterface $aggregation
+ ) {
+ $this->name = $name;
+ $this->unit = $unit;
+ $this->description = $description;
+ $this->attributeKeys = $attributeKeys;
+ $this->aggregation = $aggregation;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php b/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php
new file mode 100644
index 000000000..19d8f9ffd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Metrics/ViewRegistryInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Metrics;
+
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+interface ViewRegistryInterface
+{
+ /**
+ * @return iterable<ViewProjection>|null
+ */
+ public function find(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope): ?iterable;
+}
diff --git a/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php b/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php
new file mode 100644
index 000000000..2dc349dfb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Propagation/PropagatorFactory.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Propagation;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\Context\Propagation\MultiTextMapPropagator;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Registry;
+
+class PropagatorFactory
+{
+ use LogsMessagesTrait;
+
+ public function create(): TextMapPropagatorInterface
+ {
+ $propagators = Configuration::getList(Variables::OTEL_PROPAGATORS);
+ switch (count($propagators)) {
+ case 0:
+ return new NoopTextMapPropagator();
+ case 1:
+ return $this->buildPropagator($propagators[0]);
+ default:
+ return new MultiTextMapPropagator($this->buildPropagators($propagators));
+ }
+ }
+
+ /**
+ * @return array<TextMapPropagatorInterface>
+ */
+ private function buildPropagators(array $names): array
+ {
+ $propagators = [];
+ foreach ($names as $name) {
+ $propagators[] = $this->buildPropagator($name);
+ }
+
+ return $propagators;
+ }
+
+ private function buildPropagator(string $name): TextMapPropagatorInterface
+ {
+ try {
+ return Registry::textMapPropagator($name);
+ } catch (\RuntimeException $e) {
+ self::logWarning($e->getMessage());
+ }
+
+ return NoopTextMapPropagator::getInstance();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Propagation/_register.php b/vendor/open-telemetry/sdk/Propagation/_register.php
new file mode 100644
index 000000000..fd90da184
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Propagation/_register.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_BAGGAGE,
+ \OpenTelemetry\API\Baggage\Propagation\BaggagePropagator::getInstance()
+);
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_TRACECONTEXT,
+ \OpenTelemetry\API\Trace\Propagation\TraceContextPropagator::getInstance()
+);
+\OpenTelemetry\SDK\Registry::registerTextMapPropagator(
+ \OpenTelemetry\SDK\Common\Configuration\KnownValues::VALUE_NONE,
+ \OpenTelemetry\Context\Propagation\NoopTextMapPropagator::getInstance()
+);
diff --git a/vendor/open-telemetry/sdk/README.md b/vendor/open-telemetry/sdk/README.md
new file mode 100644
index 000000000..6346dc0f3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/README.md
@@ -0,0 +1,49 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/sdk/releases)
+[![Source](https://img.shields.io/badge/source-sdk-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/SDK)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:sdk-blue)](https://github.com/opentelemetry-php/sdk)
+[![Latest Version](http://poser.pugx.org/open-telemetry/sdk/v/unstable)](https://packagist.org/packages/open-telemetry/sdk/)
+[![Stable](http://poser.pugx.org/open-telemetry/sdk/v/stable)](https://packagist.org/packages/open-telemetry/sdk/)
+
+# OpenTelemetry SDK
+
+The OpenTelemetry PHP SDK implements the API, and should be used in conjunction with contributed exporter(s) to generate and export telemetry.
+
+## Documentation
+
+https://opentelemetry.io/docs/instrumentation/php/sdk/
+
+## Getting started
+
+### Manual setup
+
+See https://github.com/open-telemetry/opentelemetry-php/tree/main/examples
+
+### SDK Builder
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/sdk_builder.php
+
+### Autoloading
+
+SDK autoloading works with configuration values provided via the environment (or php.ini).
+
+The SDK can be automatically created and registered, if the following conditions are met:
+- `OTEL_PHP_AUTOLOAD_ENABLED=true`
+- all required [SDK configuration](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration) is provided
+
+SDK autoloading will be attempted as part of composer's autoloader:
+
+```php
+require 'vendor/autoload.php';
+
+$tracer = \OpenTelemetry\API\Globals::tracerProvider()->getTracer('example');
+$meter = \OpenTelemetry\API\Globals::meterProvider()->getMeter('example');
+```
+
+If autoloading was not successful (or partially successful), no-op implementations of the above may be returned.
+
+See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/autoload_sdk.php for a more detailed example.
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/sdk/Registry.php b/vendor/open-telemetry/sdk/Registry.php
new file mode 100644
index 000000000..2f0a20263
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Registry.php
@@ -0,0 +1,208 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
+use OpenTelemetry\SDK\Logs\LogRecordExporterFactoryInterface;
+use OpenTelemetry\SDK\Metrics\MetricExporterFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Trace\SpanExporter\SpanExporterFactoryInterface;
+use RuntimeException;
+
+/**
+ * A registry to enable central registration of components that the SDK requires but which may be provided
+ * by non-SDK modules, such as contrib and extension.
+ */
+class Registry
+{
+ private static array $spanExporterFactories = [];
+ private static array $transportFactories = [];
+ private static array $metricExporterFactories = [];
+ private static array $textMapPropagators = [];
+ private static array $logRecordExporterFactories = [];
+ private static array $resourceDetectors = [];
+
+ /**
+ * @param TransportFactoryInterface|class-string<TransportFactoryInterface> $factory
+ */
+ public static function registerTransportFactory(string $protocol, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($protocol, self::$transportFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, TransportFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register transport factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ TransportFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$transportFactories[$protocol] = $factory;
+ }
+
+ /**
+ * @param SpanExporterFactoryInterface|class-string<SpanExporterFactoryInterface> $factory
+ */
+ public static function registerSpanExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$spanExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, SpanExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register span exporter factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ SpanExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$spanExporterFactories[$exporter] = $factory;
+ }
+
+ /**
+ * @param MetricExporterFactoryInterface|class-string<MetricExporterFactoryInterface> $factory
+ */
+ public static function registerMetricExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$metricExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, MetricExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register metric factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ MetricExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$metricExporterFactories[$exporter] = $factory;
+ }
+
+ public static function registerLogRecordExporterFactory(string $exporter, $factory, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($exporter, self::$logRecordExporterFactories)) {
+ return;
+ }
+ if (!is_subclass_of($factory, LogRecordExporterFactoryInterface::class)) {
+ trigger_error(
+ sprintf(
+ 'Cannot register LogRecord exporter factory: %s must exist and implement %s',
+ is_string($factory) ? $factory : get_class($factory),
+ LogRecordExporterFactoryInterface::class
+ ),
+ E_USER_WARNING
+ );
+
+ return;
+ }
+ self::$logRecordExporterFactories[$exporter] = $factory;
+ }
+
+ public static function registerTextMapPropagator(string $name, TextMapPropagatorInterface $propagator, bool $clobber = false): void
+ {
+ if (!$clobber && array_key_exists($name, self::$textMapPropagators)) {
+ return;
+ }
+ self::$textMapPropagators[$name] = $propagator;
+ }
+
+ public static function registerResourceDetector(string $name, ResourceDetectorInterface $detector): void
+ {
+ self::$resourceDetectors[$name] = $detector;
+ }
+
+ public static function spanExporterFactory(string $exporter): SpanExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$spanExporterFactories)) {
+ throw new RuntimeException('Span exporter factory not defined for: ' . $exporter);
+ }
+ $class = self::$spanExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof SpanExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function logRecordExporterFactory(string $exporter): LogRecordExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$logRecordExporterFactories)) {
+ throw new RuntimeException('LogRecord exporter factory not defined for: ' . $exporter);
+ }
+ $class = self::$logRecordExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof LogRecordExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ /**
+ * Get transport factory registered for protocol. If $protocol contains a content-type eg `http/xyz` then
+ * only the first part, `http`, is used.
+ */
+ public static function transportFactory(string $protocol): TransportFactoryInterface
+ {
+ $protocol = explode('/', $protocol)[0];
+ if (!array_key_exists($protocol, self::$transportFactories)) {
+ throw new RuntimeException('Transport factory not defined for protocol: ' . $protocol);
+ }
+ $class = self::$transportFactories[$protocol];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof TransportFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function metricExporterFactory(string $exporter): MetricExporterFactoryInterface
+ {
+ if (!array_key_exists($exporter, self::$metricExporterFactories)) {
+ throw new RuntimeException('Metric exporter factory not registered for protocol: ' . $exporter);
+ }
+ $class = self::$metricExporterFactories[$exporter];
+ $factory = (is_callable($class)) ? $class : new $class();
+ assert($factory instanceof MetricExporterFactoryInterface);
+
+ return $factory;
+ }
+
+ public static function textMapPropagator(string $name): TextMapPropagatorInterface
+ {
+ if (!array_key_exists($name, self::$textMapPropagators)) {
+ throw new RuntimeException('Text map propagator not registered for: ' . $name);
+ }
+
+ return self::$textMapPropagators[$name];
+ }
+
+ public static function resourceDetector(string $name): ResourceDetectorInterface
+ {
+ if (!array_key_exists($name, self::$resourceDetectors)) {
+ throw new RuntimeException('Resource detector not registered for: ' . $name);
+ }
+
+ return self::$resourceDetectors[$name];
+ }
+
+ /**
+ * @return array<int, ResourceDetectorInterface>
+ */
+ public static function resourceDetectors(): array
+ {
+ return array_values(self::$resourceDetectors);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php b/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php
new file mode 100644
index 000000000..56b136ef1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Composer.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function class_exists;
+use Composer\InstalledVersions;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+final class Composer implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ if (!class_exists(InstalledVersions::class)) {
+ return ResourceInfoFactory::emptyResource();
+ }
+
+ $attributes = [
+ ResourceAttributes::SERVICE_NAME => InstalledVersions::getRootPackage()['name'],
+ ResourceAttributes::SERVICE_VERSION => InstalledVersions::getRootPackage()['pretty_version'],
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php b/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php
new file mode 100644
index 000000000..9da267743
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Composite.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+
+final class Composite implements ResourceDetectorInterface
+{
+ private iterable $resourceDetectors;
+
+ /**
+ * @param iterable<ResourceDetectorInterface> $resourceDetectors
+ */
+ public function __construct(iterable $resourceDetectors)
+ {
+ $this->resourceDetectors = $resourceDetectors;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ $resource = ResourceInfoFactory::emptyResource();
+ foreach ($this->resourceDetectors as $resourceDetector) {
+ $resource = $resource->merge($resourceDetector->getResource());
+ }
+
+ return $resource;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php b/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php
new file mode 100644
index 000000000..7ff9d19eb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Constant.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+final class Constant implements ResourceDetectorInterface
+{
+ private ResourceInfo $resourceInfo;
+
+ public function __construct(ResourceInfo $resourceInfo)
+ {
+ $this->resourceInfo = $resourceInfo;
+ }
+
+ public function getResource(): ResourceInfo
+ {
+ return $this->resourceInfo;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php b/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php
new file mode 100644
index 000000000..ceee8fcf7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Environment.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable
+ */
+final class Environment implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = Configuration::has(Variables::OTEL_RESOURCE_ATTRIBUTES)
+ ? self::decode(Configuration::getMap(Variables::OTEL_RESOURCE_ATTRIBUTES, []))
+ : [];
+
+ //@see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ $serviceName = Configuration::has(Variables::OTEL_SERVICE_NAME)
+ ? Configuration::getString(Variables::OTEL_SERVICE_NAME)
+ : null;
+ if ($serviceName) {
+ $attributes[ResourceAttributes::SERVICE_NAME] = $serviceName;
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+
+ private static function decode(array $attributes): array
+ {
+ return array_map('urldecode', $attributes);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Host.php b/vendor/open-telemetry/sdk/Resource/Detectors/Host.php
new file mode 100644
index 000000000..dd2554540
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Host.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use function php_uname;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/host.md#host
+ */
+final class Host implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::HOST_NAME => php_uname('n'),
+ ResourceAttributes::HOST_ARCH => php_uname('m'),
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php b/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php
new file mode 100644
index 000000000..2cb350dc2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/OperatingSystem.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use const PHP_OS;
+use const PHP_OS_FAMILY;
+use function php_uname;
+use function strtolower;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/os.md
+ */
+final class OperatingSystem implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::OS_TYPE => strtolower(PHP_OS_FAMILY),
+ ResourceAttributes::OS_DESCRIPTION => php_uname('r'),
+ ResourceAttributes::OS_NAME => PHP_OS,
+ ResourceAttributes::OS_VERSION => php_uname('v'),
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Process.php b/vendor/open-telemetry/sdk/Resource/Detectors/Process.php
new file mode 100644
index 000000000..7f1d99386
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Process.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function extension_loaded;
+use function getmypid;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use const PHP_BINARY;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/process.md#process
+ */
+final class Process implements ResourceDetectorInterface
+{
+ /**
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [];
+ $attributes[ResourceAttributes::PROCESS_PID] = getmypid();
+ $attributes[ResourceAttributes::PROCESS_EXECUTABLE_PATH] = PHP_BINARY;
+ /**
+ * @psalm-suppress PossiblyUndefinedArrayOffset
+ */
+ if ($_SERVER['argv'] ?? null) {
+ $attributes[ResourceAttributes::PROCESS_COMMAND] = $_SERVER['argv'][0];
+ $attributes[ResourceAttributes::PROCESS_COMMAND_ARGS] = $_SERVER['argv'];
+ }
+
+ /** @phan-suppress-next-line PhanTypeComparisonFromArray */
+ if (extension_loaded('posix') && ($user = \posix_getpwuid(\posix_geteuid())) !== false) {
+ $attributes[ResourceAttributes::PROCESS_OWNER] = $user['name'];
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php b/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php
new file mode 100644
index 000000000..f29ddfc8f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/ProcessRuntime.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+use function php_sapi_name;
+use const PHP_VERSION;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/process.md#process-runtimes
+ */
+final class ProcessRuntime implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::PROCESS_RUNTIME_NAME => php_sapi_name(),
+ ResourceAttributes::PROCESS_RUNTIME_VERSION => PHP_VERSION,
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php b/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php
new file mode 100644
index 000000000..dba3eb8aa
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/Sdk.php
@@ -0,0 +1,53 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use function class_exists;
+use Composer\InstalledVersions;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/README.md#telemetry-sdk
+ */
+final class Sdk implements ResourceDetectorInterface
+{
+ private const PACKAGES = [
+ 'open-telemetry/sdk',
+ 'open-telemetry/opentelemetry',
+ ];
+
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::TELEMETRY_SDK_NAME => '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;
+ }
+ }
+
+ if (extension_loaded('opentelemetry')) {
+ $attributes[ResourceAttributes::TELEMETRY_DISTRO_NAME] = 'opentelemetry-php-instrumentation';
+ $attributes[ResourceAttributes::TELEMETRY_DISTRO_VERSION] = phpversion('opentelemetry');
+ }
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php b/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php
new file mode 100644
index 000000000..ec4ec7def
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/Detectors/SdkProvided.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource\Detectors;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SemConv\ResourceAttributes;
+
+/**
+ * @see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#semantic-attributes-with-sdk-provided-default-value
+ */
+final class SdkProvided implements ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo
+ {
+ $attributes = [
+ ResourceAttributes::SERVICE_NAME => 'unknown_service:php',
+ ];
+
+ return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php b/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php
new file mode 100644
index 000000000..f2cd5256b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceDetectorInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+interface ResourceDetectorInterface
+{
+ public function getResource(): ResourceInfo;
+}
diff --git a/vendor/open-telemetry/sdk/Resource/ResourceInfo.php b/vendor/open-telemetry/sdk/Resource/ResourceInfo.php
new file mode 100644
index 000000000..4210a6142
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceInfo.php
@@ -0,0 +1,125 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+use OpenTelemetry\SDK\Common\Dev\Compatibility\Util as BcUtil;
+
+/**
+ * A Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry
+ * that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment
+ * which also has a name. All three of these attributes can be included in the Resource.
+ *
+ * The class named as ResourceInfo due to `resource` is the soft reserved word in PHP.
+ */
+class ResourceInfo
+{
+ use LogsMessagesTrait;
+
+ private AttributesInterface $attributes;
+ private ?string $schemaUrl;
+
+ private function __construct(AttributesInterface $attributes, ?string $schemaUrl = null)
+ {
+ $this->attributes = $attributes;
+ $this->schemaUrl = $schemaUrl;
+ }
+
+ public static function create(AttributesInterface $attributes, ?string $schemaUrl = null): self
+ {
+ return new ResourceInfo($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,
+ ]);
+ }
+
+ /**
+ * Merge current resource with an updating resource, combining all attributes. If a key exists on both the old and updating
+ * resource, the value of the updating resource MUST be picked (even if the updated value is empty)
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
+ */
+ public function merge(ResourceInfo $updating): ResourceInfo
+ {
+ $schemaUrl = self::mergeSchemaUrl($this->getSchemaUrl(), $updating->getSchemaUrl());
+ $attributes = $updating->getAttributes()->toArray() + $this->getAttributes()->toArray();
+
+ return ResourceInfo::create(Attributes::create($attributes), $schemaUrl);
+ }
+
+ /**
+ * Merge the schema URLs from the old and updating resource.
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
+ */
+ private static function mergeSchemaUrl(?string $old, ?string $updating): ?string
+ {
+ if (empty($old)) {
+ return $updating;
+ }
+ if (empty($updating)) {
+ return $old;
+ }
+ if ($old === $updating) {
+ return $old;
+ }
+
+ self::logWarning('Merging resources with different schema URLs', [
+ 'old' => $old,
+ 'updating' => $updating,
+ ]);
+
+ return null;
+ }
+
+ /**
+ * @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/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php b/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php
new file mode 100644
index 000000000..7fc80bcd9
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Resource/ResourceInfoFactory.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Resource;
+
+use function in_array;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Registry;
+use RuntimeException;
+
+class ResourceInfoFactory
+{
+ use LogsMessagesTrait;
+
+ public static function defaultResource(): ResourceInfo
+ {
+ $detectors = Configuration::getList(Env::OTEL_PHP_DETECTORS);
+
+ if (in_array(Values::VALUE_ALL, $detectors)) {
+ // ascending priority: keys from later detectors will overwrite earlier
+ return (new Detectors\Composite([
+ new Detectors\Host(),
+ new Detectors\OperatingSystem(),
+ new Detectors\Process(),
+ new Detectors\ProcessRuntime(),
+ new Detectors\Sdk(),
+ new Detectors\SdkProvided(),
+ new Detectors\Composer(),
+ ...Registry::resourceDetectors(),
+ new Detectors\Environment(),
+ ]))->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;
+
+ case Values::VALUE_DETECTORS_COMPOSER:
+ $resourceDetectors[] = new Detectors\Composer();
+
+ break;
+ case Values::VALUE_NONE:
+
+ break;
+ default:
+ try {
+ $resourceDetectors[] = Registry::resourceDetector($detector);
+ } catch (RuntimeException $e) {
+ self::logWarning($e->getMessage());
+ }
+ }
+ }
+
+ return (new Detectors\Composite($resourceDetectors))->getResource();
+ }
+
+ public static function emptyResource(): ResourceInfo
+ {
+ return ResourceInfo::create(Attributes::create([]));
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Sdk.php b/vendor/open-telemetry/sdk/Sdk.php
new file mode 100644
index 000000000..3b63eb93a
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Sdk.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Trace\TracerProviderInterface;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Logs\LoggerProviderInterface;
+
+class Sdk
+{
+ private TracerProviderInterface $tracerProvider;
+ private MeterProviderInterface $meterProvider;
+ private LoggerProviderInterface $loggerProvider;
+ private TextMapPropagatorInterface $propagator;
+
+ public function __construct(
+ TracerProviderInterface $tracerProvider,
+ MeterProviderInterface $meterProvider,
+ LoggerProviderInterface $loggerProvider,
+ TextMapPropagatorInterface $propagator
+ ) {
+ $this->tracerProvider = $tracerProvider;
+ $this->meterProvider = $meterProvider;
+ $this->loggerProvider = $loggerProvider;
+ $this->propagator = $propagator;
+ }
+
+ public static function isDisabled(): bool
+ {
+ return Configuration::getBoolean(Variables::OTEL_SDK_DISABLED);
+ }
+
+ /**
+ * Tests whether an auto-instrumentation package has been disabled by config
+ */
+ public static function isInstrumentationDisabled(string $name): bool
+ {
+ return in_array($name, Configuration::getList(Variables::OTEL_PHP_DISABLED_INSTRUMENTATIONS));
+ }
+
+ public static function builder(): SdkBuilder
+ {
+ return new SdkBuilder();
+ }
+
+ public function getTracerProvider(): TracerProviderInterface
+ {
+ return $this->tracerProvider;
+ }
+
+ public function getMeterProvider(): MeterProviderInterface
+ {
+ return $this->meterProvider;
+ }
+
+ public function getLoggerProvider(): LoggerProviderInterface
+ {
+ return $this->loggerProvider;
+ }
+
+ public function getPropagator(): TextMapPropagatorInterface
+ {
+ return $this->propagator;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/SdkAutoloader.php b/vendor/open-telemetry/sdk/SdkAutoloader.php
new file mode 100644
index 000000000..c08195e19
--- /dev/null
+++ b/vendor/open-telemetry/sdk/SdkAutoloader.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use InvalidArgumentException;
+use OpenTelemetry\API\Globals;
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Common\Util\ShutdownHandler;
+use OpenTelemetry\SDK\Logs\LoggerProviderFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderFactory;
+use OpenTelemetry\SDK\Propagation\PropagatorFactory;
+use OpenTelemetry\SDK\Trace\ExporterFactory;
+use OpenTelemetry\SDK\Trace\SamplerFactory;
+use OpenTelemetry\SDK\Trace\SpanProcessorFactory;
+use OpenTelemetry\SDK\Trace\TracerProviderBuilder;
+
+class SdkAutoloader
+{
+ private static ?bool $enabled = null;
+
+ public static function autoload(): bool
+ {
+ try {
+ self::$enabled ??= Configuration::getBoolean(Variables::OTEL_PHP_AUTOLOAD_ENABLED);
+ } catch (InvalidArgumentException $e) {
+ //invalid setting, assume false
+ self::$enabled = false;
+ }
+ if (!self::$enabled) {
+ return false;
+ }
+ Globals::registerInitializer(function (Configurator $configurator) {
+ $propagator = (new PropagatorFactory())->create();
+ if (Sdk::isDisabled()) {
+ //@see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#general-sdk-configuration
+ return $configurator->withPropagator($propagator);
+ }
+ $emitMetrics = Configuration::getBoolean(Variables::OTEL_PHP_INTERNAL_METRICS_ENABLED);
+
+ $exporter = (new ExporterFactory())->create();
+ $meterProvider = (new MeterProviderFactory())->create();
+ $spanProcessor = (new SpanProcessorFactory())->create($exporter, $emitMetrics ? $meterProvider : null);
+ $tracerProvider = (new TracerProviderBuilder())
+ ->addSpanProcessor($spanProcessor)
+ ->setSampler((new SamplerFactory())->create())
+ ->build();
+
+ $loggerProvider = (new LoggerProviderFactory())->create($emitMetrics ? $meterProvider : null);
+
+ ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ ShutdownHandler::register([$meterProvider, 'shutdown']);
+ ShutdownHandler::register([$loggerProvider, 'shutdown']);
+
+ return $configurator
+ ->withTracerProvider($tracerProvider)
+ ->withMeterProvider($meterProvider)
+ ->withLoggerProvider($loggerProvider)
+ ->withPropagator($propagator)
+ ;
+ });
+
+ return true;
+ }
+
+ /**
+ * @internal
+ */
+ public static function reset(): void
+ {
+ self::$enabled = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/SdkBuilder.php b/vendor/open-telemetry/sdk/SdkBuilder.php
new file mode 100644
index 000000000..2090c4731
--- /dev/null
+++ b/vendor/open-telemetry/sdk/SdkBuilder.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK;
+
+use OpenTelemetry\API\Instrumentation\Configurator;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\Propagation\NoopTextMapPropagator;
+use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface;
+use OpenTelemetry\Context\ScopeInterface;
+use OpenTelemetry\SDK\Common\Util\ShutdownHandler;
+use OpenTelemetry\SDK\Logs\LoggerProviderInterface;
+use OpenTelemetry\SDK\Logs\NoopLoggerProvider;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Metrics\NoopMeterProvider;
+use OpenTelemetry\SDK\Trace\NoopTracerProvider;
+use OpenTelemetry\SDK\Trace\TracerProviderInterface;
+
+class SdkBuilder
+{
+ private ?TracerProviderInterface $tracerProvider = null;
+ private ?MeterProviderInterface $meterProvider = null;
+ private ?LoggerProviderInterface $loggerProvider = null;
+ private ?TextMapPropagatorInterface $propagator = null;
+ private bool $autoShutdown = false;
+
+ /**
+ * Automatically shut down providers on process completion. If not set, the user is responsible for calling `shutdown`.
+ */
+ public function setAutoShutdown(bool $shutdown): self
+ {
+ $this->autoShutdown = $shutdown;
+
+ return $this;
+ }
+
+ public function setTracerProvider(TracerProviderInterface $provider): self
+ {
+ $this->tracerProvider = $provider;
+
+ return $this;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): self
+ {
+ $this->meterProvider = $meterProvider;
+
+ return $this;
+ }
+
+ public function setLoggerProvider(LoggerProviderInterface $loggerProvider): self
+ {
+ $this->loggerProvider = $loggerProvider;
+
+ return $this;
+ }
+
+ public function setPropagator(TextMapPropagatorInterface $propagator): self
+ {
+ $this->propagator = $propagator;
+
+ return $this;
+ }
+
+ public function build(): Sdk
+ {
+ $tracerProvider = $this->tracerProvider ?? new NoopTracerProvider();
+ $meterProvider = $this->meterProvider ?? new NoopMeterProvider();
+ $loggerProvider = $this->loggerProvider ?? new NoopLoggerProvider();
+ if ($this->autoShutdown) {
+ // rector rule disabled in config, because ShutdownHandler::register() does not keep a strong reference to $this
+ ShutdownHandler::register([$tracerProvider, 'shutdown']);
+ ShutdownHandler::register([$meterProvider, 'shutdown']);
+ ShutdownHandler::register([$loggerProvider, 'shutdown']);
+ }
+
+ return new Sdk(
+ $tracerProvider,
+ $meterProvider,
+ $loggerProvider,
+ $this->propagator ?? NoopTextMapPropagator::getInstance(),
+ );
+ }
+
+ public function buildAndRegisterGlobal(): ScopeInterface
+ {
+ $sdk = $this->build();
+ $context = Configurator::create()
+ ->withPropagator($sdk->getPropagator())
+ ->withTracerProvider($sdk->getTracerProvider())
+ ->withMeterProvider($sdk->getMeterProvider())
+ ->withLoggerProvider($sdk->getLoggerProvider())
+ ->storeInContext();
+
+ return Context::storage()->attach($context);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php
new file mode 100644
index 000000000..24f5e56a8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/LoggerAwareTrait.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use Psr\Log\LoggerAwareTrait as PsrTrait;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+
+trait LoggerAwareTrait
+{
+ use PsrTrait;
+
+ private string $defaultLogLevel = LogLevel::INFO;
+
+ /**
+ * @param string $logLevel
+ */
+ public function setDefaultLogLevel(string $logLevel): void
+ {
+ $this->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
+ {
+ if ($this->logger !== null) {
+ return $this->logger;
+ }
+
+ return new NullLogger();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php
new file mode 100644
index 000000000..97839ec5b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterDecoratorTrait.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+trait SpanExporterDecoratorTrait
+{
+ protected SpanExporterInterface $decorated;
+
+ /**
+ * @param iterable<SpanDataInterface> $batch
+ * @return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $batch = $this->beforeExport($batch);
+ $response = $this->decorated->export($batch, $cancellation);
+ $response->map(fn (bool $result) => $this->afterExport($batch, $result));
+
+ return $response;
+ }
+
+ abstract protected function beforeExport(iterable $spans): iterable;
+
+ abstract protected function afterExport(iterable $spans, bool $exportSuccess): void;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->decorated->shutdown($cancellation);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->decorated->forceFlush($cancellation);
+ }
+
+ public function setDecorated(SpanExporterInterface $decorated): void
+ {
+ $this->decorated = $decorated;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php
new file mode 100644
index 000000000..339fecc1d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\CompletedFuture;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+
+trait SpanExporterTrait
+{
+ private bool $running = true;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-2 */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ $this->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(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ /**
+ * @param iterable<SpanDataInterface> $batch
+ * @return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ if (!$this->running) {
+ return new CompletedFuture(false);
+ }
+
+ return new CompletedFuture($this->doExport($batch)); /** @phpstan-ignore-line */
+ }
+
+ /**
+ * @param iterable<SpanDataInterface> $spans Batch of spans to export
+ */
+ abstract protected function doExport(iterable $spans): bool; /** @phpstan-ignore-line */
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php b/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php
new file mode 100644
index 000000000..4802cd15b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Behavior/UsesSpanConverterTrait.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Behavior;
+
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporter\NullSpanConverter;
+
+trait UsesSpanConverterTrait
+{
+ private ?SpanConverterInterface $converter = null;
+
+ /**
+ * @param SpanConverterInterface $converter
+ */
+ protected function setSpanConverter(SpanConverterInterface $converter): void
+ {
+ $this->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/vendor/open-telemetry/sdk/Trace/Event.php b/vendor/open-telemetry/sdk/Trace/Event.php
new file mode 100644
index 000000000..28cb39bb1
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Event.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function count;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Event implements EventInterface
+{
+ private string $name;
+ private int $timestamp;
+ private AttributesInterface $attributes;
+
+ public function __construct(string $name, int $timestamp, AttributesInterface $attributes)
+ {
+ $this->name = $name;
+ $this->timestamp = $timestamp;
+ $this->attributes = $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/vendor/open-telemetry/sdk/Trace/EventInterface.php b/vendor/open-telemetry/sdk/Trace/EventInterface.php
new file mode 100644
index 000000000..8b5ee2af6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/EventInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface EventInterface
+{
+ public function getName(): string;
+ public function getAttributes(): AttributesInterface;
+ public function getEpochNanos(): int;
+ public function getTotalAttributeCount(): int;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ExporterFactory.php b/vendor/open-telemetry/sdk/Trace/ExporterFactory.php
new file mode 100644
index 000000000..9b652cc2f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ExporterFactory.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables;
+use OpenTelemetry\SDK\Registry;
+use RuntimeException;
+
+class ExporterFactory
+{
+ /**
+ * @throws RuntimeException
+ */
+ public function create(): ?SpanExporterInterface
+ {
+ $exporters = Configuration::getList(Variables::OTEL_TRACES_EXPORTER);
+ if (1 !== count($exporters)) {
+ throw new InvalidArgumentException(sprintf('Configuration %s requires exactly 1 exporter', Variables::OTEL_TRACES_EXPORTER));
+ }
+ $exporter = $exporters[0];
+ if ($exporter === 'none') {
+ return null;
+ }
+ $factory = Registry::spanExporterFactory($exporter);
+
+ return $factory->create();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php b/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php
new file mode 100644
index 000000000..ad622dccc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/IdGeneratorInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface IdGeneratorInterface
+{
+ public function generateTraceId(): string;
+
+ public function generateSpanId(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php b/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php
new file mode 100644
index 000000000..57836d4c3
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ImmutableSpan.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function max;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * @psalm-immutable
+ */
+final class ImmutableSpan implements SpanDataInterface
+{
+ private Span $span;
+
+ /** @var non-empty-string */
+ private string $name;
+
+ /** @var list<EventInterface> */
+ private array $events;
+
+ /** @var list<LinkInterface> */
+ private array $links;
+
+ private AttributesInterface $attributes;
+ private int $totalRecordedEvents;
+ private StatusDataInterface $status;
+ private int $endEpochNanos;
+ private bool $hasEnded;
+
+ /**
+ * @param non-empty-string $name
+ * @param list<LinkInterface> $links
+ * @param list<EventInterface> $events
+ */
+ public function __construct(
+ Span $span,
+ string $name,
+ array $links,
+ array $events,
+ AttributesInterface $attributes,
+ int $totalRecordedEvents,
+ StatusDataInterface $status,
+ int $endEpochNanos,
+ bool $hasEnded
+ ) {
+ $this->span = $span;
+ $this->name = $name;
+ $this->links = $links;
+ $this->events = $events;
+ $this->attributes = $attributes;
+ $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 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/vendor/open-telemetry/sdk/Trace/Link.php b/vendor/open-telemetry/sdk/Trace/Link.php
new file mode 100644
index 000000000..9927839e7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Link.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Link implements LinkInterface
+{
+ private AttributesInterface $attributes;
+ private API\SpanContextInterface $context;
+
+ public function __construct(API\SpanContextInterface $context, AttributesInterface $attributes)
+ {
+ $this->context = $context;
+ $this->attributes = $attributes;
+ }
+
+ public function getSpanContext(): API\SpanContextInterface
+ {
+ return $this->context;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/LinkInterface.php b/vendor/open-telemetry/sdk/Trace/LinkInterface.php
new file mode 100644
index 000000000..8090fa1a5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/LinkInterface.php
@@ -0,0 +1,14 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+interface LinkInterface
+{
+ public function getSpanContext(): SpanContextInterface;
+ public function getAttributes(): AttributesInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php b/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php
new file mode 100644
index 000000000..7cd4d4e7d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/NoopTracerProvider.php
@@ -0,0 +1,21 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+class NoopTracerProvider extends API\Trace\NoopTracerProvider implements TracerProviderInterface
+{
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php b/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php
new file mode 100644
index 000000000..39767fb0f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/RandomIdGenerator.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace\SpanContextValidator;
+use Throwable;
+
+class RandomIdGenerator implements IdGeneratorInterface
+{
+ private const TRACE_ID_HEX_LENGTH = 32;
+ private const SPAN_ID_HEX_LENGTH = 16;
+
+ public function generateTraceId(): string
+ {
+ do {
+ $traceId = $this->randomHex(self::TRACE_ID_HEX_LENGTH);
+ } while (!SpanContextValidator::isValidTraceId($traceId));
+
+ return $traceId;
+ }
+
+ public function generateSpanId(): string
+ {
+ do {
+ $spanId = $this->randomHex(self::SPAN_ID_HEX_LENGTH);
+ } while (!SpanContextValidator::isValidSpanId($spanId));
+
+ return $spanId;
+ }
+
+ /**
+ * @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/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php b/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php
new file mode 100644
index 000000000..60940ac01
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ReadWriteSpanInterface.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+interface ReadWriteSpanInterface extends API\SpanInterface, ReadableSpanInterface
+{
+}
diff --git a/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php b/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php
new file mode 100644
index 000000000..40704ab4e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/ReadableSpanInterface.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#additional-span-interfaces
+ */
+interface ReadableSpanInterface
+{
+ public function getName(): string;
+
+ public function getContext(): API\SpanContextInterface;
+
+ public function getParentContext(): API\SpanContextInterface;
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface;
+
+ public function hasEnded(): bool;
+
+ /**
+ * Returns an immutable representation of this instance.
+ */
+ public function toSpanData(): SpanDataInterface;
+
+ /**
+ * Returns the duration of the {@see API\SpanInterface} in nanoseconds.
+ * If still active, returns `now() - start`.
+ */
+ public function getDuration(): int;
+
+ /**
+ * @see API\SpanKind
+ */
+ public function getKind(): int;
+
+ /**
+ * Returns the value of the attribute with the provided *key*.
+ * Returns `null` if there are no attributes set, or no attribute with that key exists.
+ *
+ * @return mixed
+ */
+ public function getAttribute(string $key);
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php
new file mode 100644
index 000000000..ee7e70a56
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOffSampler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface always skips record.
+ * Example:
+ * ```
+ * use OpenTelemetry\Sdk\Trace\AlwaysOffSampler;
+ * $sampler = new AlwaysOffSampler();
+ * ```
+ */
+class AlwaysOffSampler implements SamplerInterface
+{
+ /**
+ * Returns false because we never want to sample.
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+ $traceState = $parentSpanContext->getTraceState();
+
+ return new SamplingResult(
+ SamplingResult::DROP,
+ [],
+ $traceState
+ );
+ }
+
+ public function getDescription(): string
+ {
+ return 'AlwaysOffSampler';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php
new file mode 100644
index 000000000..df61d1aee
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/AlwaysOnSampler.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface always records.
+ * Example:
+ * ```
+ * use OpenTelemetry\Sdk\Trace\AlwaysOnSampler;
+ * $sampler = new AlwaysOnSampler();
+ * ```
+ */
+class AlwaysOnSampler implements SamplerInterface
+{
+ /**
+ * Returns true because we always want to sample.
+ * {@inheritdoc}
+ */
+ public function shouldSample(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ array $links
+ ): SamplingResult {
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+ $traceState = $parentSpanContext->getTraceState();
+
+ return new SamplingResult(
+ SamplingResult::RECORD_AND_SAMPLE,
+ [],
+ $traceState
+ );
+ }
+
+ public function getDescription(): string
+ {
+ return 'AlwaysOnSampler';
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php b/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php
new file mode 100644
index 000000000..db801d3d8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/ParentBased.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * Phan seems to struggle with the variadic arguments in the latest version
+ * @phan-file-suppress PhanParamTooFewUnpack
+ */
+
+/**
+ * This implementation of the SamplerInterface that respects parent context's sampling decision
+ * and delegates for the root span.
+ * Example:
+ * ```
+ * use OpenTelemetry\API\Trace\ParentBased;
+ * use OpenTelemetry\API\Trace\AlwaysOnSampler
+ *
+ * $rootSampler = new AlwaysOnSampler();
+ * $sampler = new ParentBased($rootSampler);
+ * ```
+ */
+class ParentBased implements SamplerInterface
+{
+ private SamplerInterface $root;
+
+ private SamplerInterface $remoteParentSampler;
+
+ private SamplerInterface $remoteParentNotSampler;
+
+ private SamplerInterface $localParentSampler;
+
+ private SamplerInterface $localParentNotSampler;
+
+ /**
+ * ParentBased sampler delegates the sampling decision based on the parent context.
+ *
+ * @param SamplerInterface $root Sampler called for the span with no parent (root span).
+ * @param SamplerInterface|null $remoteParentSampler Sampler called for the span with the remote sampled parent. When null, `AlwaysOnSampler` is used.
+ * @param SamplerInterface|null $remoteParentNotSampler Sampler called for the span with the remote not sampled parent. When null, `AlwaysOffSampler` is used.
+ * @param SamplerInterface|null $localParentSampler Sampler called for the span with local the sampled parent. When null, `AlwaysOnSampler` is used.
+ * @param SamplerInterface|null $localParentNotSampler Sampler called for the span with the local not sampled parent. When null, `AlwaysOffSampler` is used.
+ */
+ public function __construct(
+ SamplerInterface $root,
+ ?SamplerInterface $remoteParentSampler = null,
+ ?SamplerInterface $remoteParentNotSampler = null,
+ ?SamplerInterface $localParentSampler = null,
+ ?SamplerInterface $localParentNotSampler = null
+ ) {
+ $this->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(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ 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/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php b/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php
new file mode 100644
index 000000000..c11a90d5d
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Sampler/TraceIdRatioBasedSampler.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\Sampler;
+
+use InvalidArgumentException;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Trace\SamplerInterface;
+use OpenTelemetry\SDK\Trace\SamplingResult;
+use OpenTelemetry\SDK\Trace\Span;
+
+/**
+ * This implementation of the SamplerInterface records with given probability.
+ * Example:
+ * ```
+ * use OpenTelemetry\API\Trace\TraceIdRatioBasedSampler;
+ * $sampler = new TraceIdRatioBasedSampler(0.01);
+ * ```
+ */
+class TraceIdRatioBasedSampler implements SamplerInterface
+{
+ private float $probability;
+
+ /**
+ * TraceIdRatioBasedSampler constructor.
+ * @param float $probability Probability float value between 0.0 and 1.0.
+ */
+ public function __construct(float $probability)
+ {
+ if ($probability < 0.0 || $probability > 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(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ 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, [], $traceState);
+ }
+
+ public function getDescription(): string
+ {
+ return sprintf('%s{%.6F}', 'TraceIdRatioBasedSampler', $this->probability);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SamplerFactory.php b/vendor/open-telemetry/sdk/Trace/SamplerFactory.php
new file mode 100644
index 000000000..f99674d79
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplerFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOffSampler;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
+use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
+use OpenTelemetry\SDK\Trace\Sampler\TraceIdRatioBasedSampler;
+
+class SamplerFactory
+{
+ private const TRACEIDRATIO_PREFIX = 'traceidratio';
+
+ public function create(): SamplerInterface
+ {
+ $name = Configuration::getString(Env::OTEL_TRACES_SAMPLER);
+
+ if (strpos($name, self::TRACEIDRATIO_PREFIX) !== false) {
+ $arg = Configuration::getRatio(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/vendor/open-telemetry/sdk/Trace/SamplerInterface.php b/vendor/open-telemetry/sdk/Trace/SamplerInterface.php
new file mode 100644
index 000000000..de1147fa6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplerInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+/**
+ * This interface is used to organize sampling logic.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampler
+ */
+interface SamplerInterface
+{
+ /**
+ * Returns SamplingResult.
+ *
+ * @param ContextInterface $parentContext Context with parent Span. The Span's SpanContext may be invalid to indicate a root span.
+ * @param string $traceId TraceId of the Span to be created. It can be different from the TraceId in the SpanContext.
+ * Typically in situations when the Span to be created starts a new Trace.
+ * @param string $spanName Name of the Span to be created.
+ * @param int $spanKind Span kind.
+ * @param AttributesInterface $attributes Initial set of Attributes for the Span being constructed.
+ * @param list<LinkInterface> $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(
+ ContextInterface $parentContext,
+ string $traceId,
+ string $spanName,
+ int $spanKind,
+ AttributesInterface $attributes,
+ 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/vendor/open-telemetry/sdk/Trace/SamplingResult.php b/vendor/open-telemetry/sdk/Trace/SamplingResult.php
new file mode 100644
index 000000000..5701b7bc6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SamplingResult.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+final class SamplingResult
+{
+ /**
+ * Span will not be recorded and all events and attributes will be dropped.
+ */
+ public const DROP = 0;
+
+ /**
+ * Span will be recorded but SpanExporters will not receive this Span.
+ */
+ public const RECORD_ONLY = 1;
+
+ /**
+ * Span will be recorder and exported.
+ */
+ public const RECORD_AND_SAMPLE = 2;
+
+ /**
+ * @var int A sampling Decision.
+ */
+ private int $decision;
+
+ /**
+ * @var iterable A set of span Attributes that will also be added to the Span.
+ */
+ private iterable $attributes;
+
+ /**
+ * @var ?API\TraceStateInterface A Tracestate that will be associated with the Span through the new SpanContext.
+ */
+ private ?API\TraceStateInterface $traceState;
+
+ public function __construct(int $decision, iterable $attributes = [], ?API\TraceStateInterface $traceState = null)
+ {
+ $this->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(): iterable
+ {
+ 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/vendor/open-telemetry/sdk/Trace/Span.php b/vendor/open-telemetry/sdk/Trace/Span.php
new file mode 100644
index 000000000..f72ec1bd7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Span.php
@@ -0,0 +1,359 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function get_class;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesBuilderInterface;
+use OpenTelemetry\SDK\Common\Dev\Compatibility\Util as BcUtil;
+use OpenTelemetry\SDK\Common\Exception\StackTraceFormatter;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use Throwable;
+
+final class Span extends API\Span implements ReadWriteSpanInterface
+{
+
+ /** @readonly */
+ private API\SpanContextInterface $context;
+
+ /** @readonly */
+ private API\SpanContextInterface $parentSpanContext;
+
+ /** @readonly */
+ private SpanLimits $spanLimits;
+
+ /** @readonly */
+ private SpanProcessorInterface $spanProcessor;
+
+ /**
+ * @readonly
+ *
+ * @var list<LinkInterface>
+ */
+ 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<EventInterface> */
+ private array $events = [];
+
+ private AttributesBuilderInterface $attributesBuilder;
+ private int $totalRecordedEvents = 0;
+ private StatusDataInterface $status;
+ private int $endEpochNanos = 0;
+ private bool $hasEnded = false;
+
+ /**
+ * @param non-empty-string $name
+ * @param list<LinkInterface> $links
+ */
+ private function __construct(
+ string $name,
+ API\SpanContextInterface $context,
+ InstrumentationScopeInterface $instrumentationScope,
+ int $kind,
+ API\SpanContextInterface $parentSpanContext,
+ SpanLimits $spanLimits,
+ SpanProcessorInterface $spanProcessor,
+ ResourceInfo $resource,
+ AttributesBuilderInterface $attributesBuilder,
+ 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->attributesBuilder = $attributesBuilder;
+ $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<LinkInterface> $links
+ *
+ * @internal
+ * @psalm-internal OpenTelemetry
+ */
+ public static function startSpan(
+ string $name,
+ API\SpanContextInterface $context,
+ InstrumentationScopeInterface $instrumentationScope,
+ int $kind,
+ API\SpanInterface $parentSpan,
+ ContextInterface $parentContext,
+ SpanLimits $spanLimits,
+ SpanProcessorInterface $spanProcessor,
+ ResourceInfo $resource,
+ AttributesBuilderInterface $attributesBuilder,
+ array $links,
+ int $totalRecordedLinks,
+ int $startEpochNanos
+ ): self {
+ $span = new self(
+ $name,
+ $context,
+ $instrumentationScope,
+ $kind,
+ $parentSpan->getContext(),
+ $spanLimits,
+ $spanProcessor,
+ $resource,
+ $attributesBuilder,
+ $links,
+ $totalRecordedLinks,
+ $startEpochNanos !== 0 ? $startEpochNanos : ClockFactory::getDefault()->now()
+ );
+
+ // Call onStart here to ensure the span is fully initialized.
+ $spanProcessor->onStart($span, $parentContext);
+
+ return $span;
+ }
+
+ /**
+ * Backward compatibility methods
+ *
+ * @codeCoverageIgnore
+ */
+ public static function formatStackTrace(Throwable $e, array &$seen = null): string
+ {
+ BcUtil::triggerMethodDeprecationNotice(
+ __METHOD__,
+ 'format',
+ StackTraceFormatter::class
+ );
+
+ return StackTraceFormatter::format($e);
+ }
+
+ /** @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) {
+ return $this;
+ }
+
+ $this->attributesBuilder[$key] = $value;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttributes(iterable $attributes): self
+ {
+ foreach ($attributes as $key => $value) {
+ $this->attributesBuilder[$key] = $value;
+ }
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function addEvent(string $name, iterable $attributes = [], ?int $timestamp = null): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+ if (++$this->totalRecordedEvents > $this->spanLimits->getEventCountLimit()) {
+ return $this;
+ }
+
+ $timestamp ??= ClockFactory::getDefault()->now();
+ $eventAttributesBuilder = $this->spanLimits->getEventAttributesFactory()->builder($attributes);
+
+ $this->events[] = new Event($name, $timestamp, $eventAttributesBuilder->build());
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function recordException(Throwable $exception, iterable $attributes = [], ?int $timestamp = null): self
+ {
+ if ($this->hasEnded) {
+ return $this;
+ }
+ if (++$this->totalRecordedEvents > $this->spanLimits->getEventCountLimit()) {
+ return $this;
+ }
+
+ $timestamp ??= ClockFactory::getDefault()->now();
+ $eventAttributesBuilder = $this->spanLimits->getEventAttributesFactory()->builder([
+ 'exception.type' => get_class($exception),
+ 'exception.message' => $exception->getMessage(),
+ 'exception.stacktrace' => StackTraceFormatter::format($exception),
+ ]);
+
+ foreach ($attributes as $key => $value) {
+ $eventAttributesBuilder[$key] = $value;
+ }
+
+ $this->events[] = new Event('exception', $timestamp, $eventAttributesBuilder->build());
+
+ return $this;
+ }
+
+ /** @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;
+ }
+
+ // An attempt to set value Unset SHOULD be ignored.
+ if ($code === API\StatusCode::STATUS_UNSET) {
+ return $this;
+ }
+
+ // When span status is set to Ok it SHOULD be considered final and any further attempts to change it SHOULD be ignored.
+ if ($this->status->getCode() === API\StatusCode::STATUS_OK) {
+ 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->attributesBuilder->build(),
+ $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)
+ {
+ return $this->attributesBuilder[$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;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanBuilder.php
new file mode 100644
index 000000000..2867c01c8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanBuilder.php
@@ -0,0 +1,191 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function in_array;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Attribute\AttributesBuilderInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+final class SpanBuilder implements API\SpanBuilderInterface
+{
+ /**
+ * @var non-empty-string
+ * @readonly
+ */
+ private string $spanName;
+
+ /** @readonly */
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+
+ /** @var ContextInterface|false|null */
+ private $parentContext = null;
+
+ /**
+ * @psalm-var API\SpanKind::KIND_*
+ */
+ private int $spanKind = API\SpanKind::KIND_INTERNAL;
+
+ /** @var list<LinkInterface> */
+ private array $links = [];
+
+ private AttributesBuilderInterface $attributesBuilder;
+ private int $totalNumberOfLinksAdded = 0;
+ private int $startEpochNanos = 0;
+
+ /** @param non-empty-string $spanName */
+ public function __construct(
+ string $spanName,
+ InstrumentationScopeInterface $instrumentationScope,
+ TracerSharedState $tracerSharedState
+ ) {
+ $this->spanName = $spanName;
+ $this->instrumentationScope = $instrumentationScope;
+ $this->tracerSharedState = $tracerSharedState;
+ $this->attributesBuilder = $tracerSharedState->getSpanLimits()->getAttributesFactory()->builder();
+ }
+
+ /** @inheritDoc */
+ public function setParent($context): API\SpanBuilderInterface
+ {
+ $this->parentContext = $context;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function addLink(API\SpanContextInterface $context, iterable $attributes = []): API\SpanBuilderInterface
+ {
+ if (!$context->isValid()) {
+ return $this;
+ }
+
+ $this->totalNumberOfLinksAdded++;
+
+ if (count($this->links) === $this->tracerSharedState->getSpanLimits()->getLinkCountLimit()) {
+ return $this;
+ }
+
+ $this->links[] = new Link(
+ $context,
+ $this->tracerSharedState
+ ->getSpanLimits()
+ ->getLinkAttributesFactory()
+ ->builder($attributes)
+ ->build(),
+ );
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttribute(string $key, $value): API\SpanBuilderInterface
+ {
+ $this->attributesBuilder[$key] = $value;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setAttributes(iterable $attributes): API\SpanBuilderInterface
+ {
+ foreach ($attributes as $key => $value) {
+ $this->attributesBuilder[$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 $timestampNanos): API\SpanBuilderInterface
+ {
+ if (0 > $timestampNanos) {
+ return $this;
+ }
+
+ $this->startEpochNanos = $timestampNanos;
+
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function startSpan(): API\SpanInterface
+ {
+ $parentContext = Context::resolve($this->parentContext);
+ $parentSpan = Span::fromContext($parentContext);
+ $parentSpanContext = $parentSpan->getContext();
+
+ $spanId = $this->tracerSharedState->getIdGenerator()->generateSpanId();
+
+ if (!$parentSpanContext->isValid()) {
+ $traceId = $this->tracerSharedState->getIdGenerator()->generateTraceId();
+ } else {
+ $traceId = $parentSpanContext->getTraceId();
+ }
+
+ $samplingResult = $this
+ ->tracerSharedState
+ ->getSampler()
+ ->shouldSample(
+ $parentContext,
+ $traceId,
+ $this->spanName,
+ $this->spanKind,
+ $this->attributesBuilder->build(),
+ $this->links,
+ );
+ $samplingDecision = $samplingResult->getDecision();
+ $samplingResultTraceState = $samplingResult->getTraceState();
+
+ $spanContext = API\SpanContext::create(
+ $traceId,
+ $spanId,
+ SamplingResult::RECORD_AND_SAMPLE === $samplingDecision ? API\TraceFlags::SAMPLED : API\TraceFlags::DEFAULT,
+ $samplingResultTraceState,
+ );
+
+ if (!in_array($samplingDecision, [SamplingResult::RECORD_AND_SAMPLE, SamplingResult::RECORD_ONLY], true)) {
+ return Span::wrap($spanContext);
+ }
+
+ $attributesBuilder = clone $this->attributesBuilder;
+ foreach ($samplingResult->getAttributes() as $key => $value) {
+ $attributesBuilder[$key] = $value;
+ }
+
+ return Span::startSpan(
+ $this->spanName,
+ $spanContext,
+ $this->instrumentationScope,
+ $this->spanKind,
+ $parentSpan,
+ $parentContext,
+ $this->tracerSharedState->getSpanLimits(),
+ $this->tracerSharedState->getSpanProcessor(),
+ $this->tracerSharedState->getResource(),
+ $attributesBuilder,
+ $this->links,
+ $this->totalNumberOfLinksAdded,
+ $this->startEpochNanos
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php b/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php
new file mode 100644
index 000000000..40552e440
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanConverterInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface SpanConverterInterface
+{
+ public function convert(iterable $spans): array;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php b/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php
new file mode 100644
index 000000000..37132b9e5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanDataInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+/**
+ * Represents an immutable snapshot of a {@see API\SpanInterface}.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#additional-span-interfaces
+ */
+interface SpanDataInterface
+{
+ public function getName(): string;
+ public function getKind(): int;
+ public function getContext(): API\SpanContextInterface;
+ public function getParentContext(): API\SpanContextInterface;
+ public function getTraceId(): string;
+ public function getSpanId(): string;
+ public function getParentSpanId(): string;
+ public function getStatus(): StatusDataInterface;
+ public function getStartEpochNanos(): int;
+ public function getAttributes(): AttributesInterface;
+
+ /** @return list<EventInterface> */
+ public function getEvents(): array;
+
+ /** @return list<LinkInterface> */
+ 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;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php
new file mode 100644
index 000000000..42f49e815
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/AbstractDecorator.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterDecoratorTrait;
+
+abstract class AbstractDecorator
+{
+ use SpanExporterDecoratorTrait;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php
new file mode 100644
index 000000000..482d122cc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporter.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use JsonException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Common\Export\TransportInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class ConsoleSpanExporter implements SpanExporterInterface
+{
+ use UsesSpanConverterTrait;
+ use LogsMessagesTrait;
+
+ private TransportInterface $transport;
+
+ public function __construct(TransportInterface $transport, ?SpanConverterInterface $converter = null)
+ {
+ $this->transport = $transport;
+ $this->setSpanConverter($converter ?? new FriendlySpanConverter());
+ }
+
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface
+ {
+ $payload = '';
+ foreach ($batch as $span) {
+ try {
+ $payload .= json_encode(
+ $this->getSpanConverter()->convert([$span]),
+ JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT
+ ) . PHP_EOL;
+ } catch (JsonException $e) {
+ self::logWarning('Error converting span: ' . $e->getMessage());
+ }
+ }
+
+ return $this->transport->send($payload)
+ ->map(fn () => true)
+ ->catch(fn () => false);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->shutdown();
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->transport->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php
new file mode 100644
index 000000000..7e45fb549
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/ConsoleSpanExporterFactory.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Registry;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class ConsoleSpanExporterFactory implements SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface
+ {
+ $transport = Registry::transportFactory('stream')->create('php://stdout', 'application/json');
+
+ return new ConsoleSpanExporter($transport);
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php
new file mode 100644
index 000000000..1f8178e10
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/FriendlySpanConverter.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\API\Trace\SpanContextInterface;
+use OpenTelemetry\API\Trace\SpanKind;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\EventInterface;
+use OpenTelemetry\SDK\Trace\LinkInterface;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\StatusDataInterface;
+use ReflectionClass;
+
+class FriendlySpanConverter implements SpanConverterInterface
+{
+ private const NAME_ATTR = 'name';
+ private const CONTEXT_ATTR = 'context';
+ private const TRACE_ID_ATTR = 'trace_id';
+ private const SPAN_ID_ATTR = 'span_id';
+ private const TRACE_STATE_ATTR = 'trace_state';
+ private const RESOURCE_ATTR = 'resource';
+ private const PARENT_SPAN_ATTR = 'parent_span_id';
+ private const KIND_ATTR = 'kind';
+ private const START_ATTR = 'start';
+ private const END_ATTR = 'end';
+ private const ATTRIBUTES_ATTR = 'attributes';
+ private const STATUS_ATTR = 'status';
+ private const CODE_ATTR = 'code';
+ private const DESCRIPTION_ATTR = 'description';
+ private const EVENTS_ATTR = 'events';
+ private const TIMESTAMP_ATTR = 'timestamp';
+ private const LINKS_ATTR = 'links';
+
+ public function convert(iterable $spans): array
+ {
+ $aggregate = [];
+ foreach ($spans as $span) {
+ $aggregate[] = $this->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<EventInterface> $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<LinkInterface> $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/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php
new file mode 100644
index 000000000..ebb022595
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemoryExporter.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use ArrayObject;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterTrait;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class InMemoryExporter implements SpanExporterInterface
+{
+ use SpanExporterTrait;
+
+ private ArrayObject $storage;
+
+ public function __construct(?ArrayObject $storage = null)
+ {
+ $this->storage = $storage ?? new ArrayObject();
+ }
+
+ protected function doExport(iterable $spans): bool
+ {
+ foreach ($spans as $span) {
+ $this->storage[] = $span;
+ }
+
+ return true;
+ }
+
+ public function getSpans(): array
+ {
+ return (array) $this->storage;
+ }
+
+ public function getStorage(): ArrayObject
+ {
+ return $this->storage;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php
new file mode 100644
index 000000000..c19686fac
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/InMemorySpanExporterFactory.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class InMemorySpanExporterFactory implements SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface
+ {
+ return new InMemoryExporter();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php
new file mode 100644
index 000000000..b7cf511a5
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerDecorator.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\LoggerAwareTrait;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterDecoratorTrait;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+
+class LoggerDecorator implements SpanExporterInterface, LoggerAwareInterface
+{
+ use SpanExporterDecoratorTrait;
+ use UsesSpanConverterTrait;
+ use LoggerAwareTrait;
+
+ public function __construct(
+ SpanExporterInterface $decorated,
+ ?LoggerInterface $logger = null,
+ ?SpanConverterInterface $converter = null
+ ) {
+ $this->setDecorated($decorated);
+ $this->setLogger($logger ?? new NullLogger());
+ $this->setSpanConverter($converter ?? new FriendlySpanConverter());
+ }
+
+ protected function beforeExport(iterable $spans): iterable
+ {
+ return $spans;
+ }
+
+ /**
+ * @param iterable $spans
+ * @param bool $exportSuccess
+ */
+ protected function afterExport(iterable $spans, bool $exportSuccess): void
+ {
+ if ($exportSuccess) {
+ $this->log(
+ 'Status Success',
+ $this->getSpanConverter()->convert($spans),
+ LogLevel::INFO,
+ );
+ } else {
+ $this->log(
+ 'Status Failed Retryable',
+ $this->getSpanConverter()->convert($spans),
+ LogLevel::ERROR,
+ );
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php
new file mode 100644
index 000000000..1969a5426
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/LoggerExporter.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\Behavior\LoggerAwareTrait;
+use OpenTelemetry\SDK\Trace\Behavior\SpanExporterTrait;
+use OpenTelemetry\SDK\Trace\Behavior\UsesSpanConverterTrait;
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use Psr\Log\LoggerAwareInterface;
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+use Psr\Log\NullLogger;
+use Throwable;
+
+class LoggerExporter implements SpanExporterInterface, LoggerAwareInterface
+{
+ use SpanExporterTrait;
+ use UsesSpanConverterTrait;
+ use LoggerAwareTrait;
+
+ public const GRANULARITY_AGGREGATE = 1;
+ public const GRANULARITY_SPAN = 2;
+
+ private string $serviceName;
+ private int $granularity = self::GRANULARITY_AGGREGATE;
+
+ /**
+ * @param string $serviceName
+ * @param LoggerInterface|null $logger
+ * @param string|null $defaultLogLevel
+ * @param SpanConverterInterface|null $converter
+ * @param int $granularity
+ */
+ public function __construct(
+ string $serviceName,
+ ?LoggerInterface $logger = null,
+ ?string $defaultLogLevel = LogLevel::DEBUG,
+ ?SpanConverterInterface $converter = null,
+ int $granularity = 1
+ ) {
+ $this->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): bool
+ {
+ try {
+ $this->doLog($spans);
+ } catch (Throwable $t) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @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/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php
new file mode 100644
index 000000000..1e55431a8
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/NullSpanConverter.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanConverterInterface;
+
+class NullSpanConverter implements SpanConverterInterface
+{
+ public function convert(iterable $spans): array
+ {
+ return [[]];
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php
new file mode 100644
index 000000000..8d44b35eb
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/SpanExporterFactoryInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanExporter;
+
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+interface SpanExporterFactoryInterface
+{
+ public function create(): SpanExporterInterface;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php b/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php
new file mode 100644
index 000000000..aad07be42
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporter/_register.php
@@ -0,0 +1,7 @@
+<?php
+
+declare(strict_types=1);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('console', \OpenTelemetry\SDK\Trace\SpanExporter\ConsoleSpanExporterFactory::class);
+\OpenTelemetry\SDK\Registry::registerSpanExporterFactory('memory', \OpenTelemetry\SDK\Trace\SpanExporter\InMemorySpanExporterFactory::class);
+
+\OpenTelemetry\SDK\Registry::registerTransportFactory('stream', \OpenTelemetry\SDK\Common\Export\Stream\StreamTransportFactory::class);
diff --git a/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php b/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php
new file mode 100644
index 000000000..fca336896
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanExporterInterface.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Future\FutureInterface;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#span-exporter
+ */
+interface SpanExporterInterface
+{
+ /**
+ * @param iterable<SpanDataInterface> $batch Batch of spans to export
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#exportbatch
+ *
+ * @psalm-return FutureInterface<bool>
+ */
+ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-2 */
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+
+ /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanLimits.php b/vendor/open-telemetry/sdk/Trace/SpanLimits.php
new file mode 100644
index 000000000..4b07649fc
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanLimits.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\AttributesFactoryInterface;
+
+final class SpanLimits
+{
+ public const DEFAULT_SPAN_ATTRIBUTE_LENGTH_LIMIT = PHP_INT_MAX;
+ public const DEFAULT_SPAN_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const DEFAULT_SPAN_EVENT_COUNT_LIMIT = 128;
+ public const DEFAULT_SPAN_LINK_COUNT_LIMIT = 128;
+ public const DEFAULT_EVENT_ATTRIBUTE_COUNT_LIMIT = 128;
+ public const DEFAULT_LINK_ATTRIBUTE_COUNT_LIMIT = 128;
+
+ private AttributesFactoryInterface $attributesFactory;
+ private AttributesFactoryInterface $eventAttributesFactory;
+ private AttributesFactoryInterface $linkAttributesFactory;
+ private int $eventCountLimit;
+ private int $linkCountLimit;
+
+ public function getAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->attributesFactory;
+ }
+
+ public function getEventAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->eventAttributesFactory;
+ }
+
+ public function getLinkAttributesFactory(): AttributesFactoryInterface
+ {
+ return $this->linkAttributesFactory;
+ }
+
+ /** @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;
+ }
+
+ /**
+ * @internal Use {@see SpanLimitsBuilder} to create {@see SpanLimits} instance.
+ */
+ public function __construct(
+ AttributesFactoryInterface $attributesFactory,
+ AttributesFactoryInterface $eventAttributesFactory,
+ AttributesFactoryInterface $linkAttributesFactory,
+ int $eventCountLimit,
+ int $linkCountLimit
+ ) {
+ $this->attributesFactory = $attributesFactory;
+ $this->eventAttributesFactory = $eventAttributesFactory;
+ $this->linkAttributesFactory = $linkAttributesFactory;
+ $this->eventCountLimit = $eventCountLimit;
+ $this->linkCountLimit = $linkCountLimit;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php
new file mode 100644
index 000000000..11ed5a82b
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanLimitsBuilder.php
@@ -0,0 +1,148 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Attribute\FilteredAttributesFactory;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SemConv\TraceAttributes;
+use const PHP_INT_MAX;
+
+class SpanLimitsBuilder
+{
+ /** @var ?int Maximum allowed attribute count per record */
+ private ?int $attributeCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute value length */
+ private ?int $attributeValueLengthLimit = null;
+
+ /** @var ?int Maximum allowed span event count */
+ private ?int $eventCountLimit = null;
+
+ /** @var ?int Maximum allowed span link count */
+ private ?int $linkCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute per span event count */
+ private ?int $attributePerEventCountLimit = null;
+
+ /** @var ?int Maximum allowed attribute per span link count */
+ private ?int $attributePerLinkCountLimit = null;
+
+ private bool $retainGeneralIdentityAttributes = false;
+
+ /**
+ * @param int $attributeCountLimit Maximum allowed attribute count per record
+ */
+ public function setAttributeCountLimit(int $attributeCountLimit): SpanLimitsBuilder
+ {
+ $this->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;
+ }
+
+ /**
+ * @param bool $retain whether general identity attributes should be retained
+ *
+ * @see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#general-identity-attributes
+ */
+ public function retainGeneralIdentityAttributes(bool $retain = true): SpanLimitsBuilder
+ {
+ $this->retainGeneralIdentityAttributes = $retain;
+
+ return $this;
+ }
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#span-limits
+ */
+ public function build(): SpanLimits
+ {
+ $attributeCountLimit = $this->attributeCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_COUNT_LIMIT);
+ $attributeValueLengthLimit = $this->attributeValueLengthLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, SpanLimits::DEFAULT_SPAN_ATTRIBUTE_LENGTH_LIMIT);
+ $eventCountLimit = $this->eventCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_EVENT_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_EVENT_COUNT_LIMIT);
+ $linkCountLimit = $this->linkCountLimit
+ ?: Configuration::getInt(Env::OTEL_SPAN_LINK_COUNT_LIMIT, SpanLimits::DEFAULT_SPAN_LINK_COUNT_LIMIT);
+ $attributePerEventCountLimit = $this->attributePerEventCountLimit
+ ?: Configuration::getInt(Env::OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_EVENT_ATTRIBUTE_COUNT_LIMIT);
+ $attributePerLinkCountLimit = $this->attributePerLinkCountLimit
+ ?: Configuration::getInt(Env::OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, SpanLimits::DEFAULT_LINK_ATTRIBUTE_COUNT_LIMIT);
+
+ if ($attributeValueLengthLimit === PHP_INT_MAX) {
+ $attributeValueLengthLimit = null;
+ }
+
+ $spanAttributesFactory = Attributes::factory($attributeCountLimit, $attributeValueLengthLimit);
+
+ if (!$this->retainGeneralIdentityAttributes) {
+ $spanAttributesFactory = new FilteredAttributesFactory($spanAttributesFactory, [
+ TraceAttributes::ENDUSER_ID,
+ TraceAttributes::ENDUSER_ROLE,
+ TraceAttributes::ENDUSER_SCOPE,
+ ]);
+ }
+
+ return new SpanLimits(
+ $spanAttributesFactory,
+ Attributes::factory($attributePerEventCountLimit, $attributeValueLengthLimit),
+ Attributes::factory($attributePerLinkCountLimit, $attributeValueLengthLimit),
+ $eventCountLimit,
+ $linkCountLimit,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php
new file mode 100644
index 000000000..58032749e
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessor.php
@@ -0,0 +1,290 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use function assert;
+use function count;
+use InvalidArgumentException;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\API\Metrics\MeterProviderInterface;
+use OpenTelemetry\API\Metrics\ObserverInterface;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Time\ClockInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanDataInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+use SplQueue;
+use function sprintf;
+use Throwable;
+
+class BatchSpanProcessor implements SpanProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ public const DEFAULT_SCHEDULE_DELAY = 5000;
+ public const DEFAULT_EXPORT_TIMEOUT = 30000;
+ public const DEFAULT_MAX_QUEUE_SIZE = 2048;
+ public const DEFAULT_MAX_EXPORT_BATCH_SIZE = 512;
+
+ private const ATTRIBUTES_PROCESSOR = ['processor' => 'batching'];
+ private const ATTRIBUTES_QUEUED = self::ATTRIBUTES_PROCESSOR + ['state' => 'queued'];
+ private const ATTRIBUTES_PENDING = self::ATTRIBUTES_PROCESSOR + ['state' => 'pending'];
+ private const ATTRIBUTES_PROCESSED = self::ATTRIBUTES_PROCESSOR + ['state' => 'processed'];
+ private const ATTRIBUTES_DROPPED = self::ATTRIBUTES_PROCESSOR + ['state' => 'dropped'];
+ private const ATTRIBUTES_FREE = self::ATTRIBUTES_PROCESSOR + ['state' => 'free'];
+
+ private SpanExporterInterface $exporter;
+ private ClockInterface $clock;
+ private int $maxQueueSize;
+ private int $scheduledDelayNanos;
+ private int $maxExportBatchSize;
+ private bool $autoFlush;
+ private ContextInterface $exportContext;
+
+ private ?int $nextScheduledRun = null;
+ private bool $running = false;
+ private int $dropped = 0;
+ private int $processed = 0;
+ private int $batchId = 0;
+ private int $queueSize = 0;
+ /** @var list<SpanDataInterface> */
+ private array $batch = [];
+ /** @var SplQueue<list<SpanDataInterface>> */
+ private SplQueue $queue;
+ /** @var SplQueue<array{int, string, ?CancellationInterface, bool, ContextInterface}> */
+ private SplQueue $flush;
+
+ private bool $closed = false;
+
+ public function __construct(
+ SpanExporterInterface $exporter,
+ ClockInterface $clock,
+ int $maxQueueSize = self::DEFAULT_MAX_QUEUE_SIZE,
+ int $scheduledDelayMillis = self::DEFAULT_SCHEDULE_DELAY,
+ int $exportTimeoutMillis = self::DEFAULT_EXPORT_TIMEOUT,
+ int $maxExportBatchSize = self::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ bool $autoFlush = true,
+ ?MeterProviderInterface $meterProvider = null
+ ) {
+ if ($maxQueueSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum queue size (%d) must be greater than zero', $maxQueueSize));
+ }
+ if ($scheduledDelayMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Scheduled delay (%d) must be greater than zero', $scheduledDelayMillis));
+ }
+ if ($exportTimeoutMillis <= 0) {
+ throw new InvalidArgumentException(sprintf('Export timeout (%d) must be greater than zero', $exportTimeoutMillis));
+ }
+ if ($maxExportBatchSize <= 0) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be greater than zero', $maxExportBatchSize));
+ }
+ if ($maxExportBatchSize > $maxQueueSize) {
+ throw new InvalidArgumentException(sprintf('Maximum export batch size (%d) must be less than or equal to maximum queue size (%d)', $maxExportBatchSize, $maxQueueSize));
+ }
+
+ $this->exporter = $exporter;
+ $this->clock = $clock;
+ $this->maxQueueSize = $maxQueueSize;
+ $this->scheduledDelayNanos = $scheduledDelayMillis * 1_000_000;
+ $this->maxExportBatchSize = $maxExportBatchSize;
+ $this->autoFlush = $autoFlush;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ $this->flush = new SplQueue();
+
+ if ($meterProvider === null) {
+ return;
+ }
+
+ $meter = $meterProvider->getMeter('io.opentelemetry.sdk');
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.spans',
+ '{spans}',
+ 'The number of sampled spans received by the span processor',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $processed = $this->processed;
+ $dropped = $this->dropped;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($processed, self::ATTRIBUTES_PROCESSED);
+ $observer->observe($dropped, self::ATTRIBUTES_DROPPED);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.queue.limit',
+ '{spans}',
+ 'The queue size limit',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $observer->observe($this->maxQueueSize, self::ATTRIBUTES_PROCESSOR);
+ });
+ $meter
+ ->createObservableUpDownCounter(
+ 'otel.trace.span_processor.queue.usage',
+ '{spans}',
+ 'The current queue usage',
+ )
+ ->observe(function (ObserverInterface $observer): void {
+ $queued = $this->queue->count() * $this->maxExportBatchSize + count($this->batch);
+ $pending = $this->queueSize - $queued;
+ $free = $this->maxQueueSize - $this->queueSize;
+
+ $observer->observe($queued, self::ATTRIBUTES_QUEUED);
+ $observer->observe($pending, self::ATTRIBUTES_PENDING);
+ $observer->observe($free, self::ATTRIBUTES_FREE);
+ });
+ }
+
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ }
+
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$span->getContext()->isSampled()) {
+ return;
+ }
+
+ if ($this->queueSize === $this->maxQueueSize) {
+ $this->dropped++;
+
+ return;
+ }
+
+ $this->queueSize++;
+ $this->batch[] = $span->toSpanData();
+ $this->nextScheduledRun ??= $this->clock->now() + $this->scheduledDelayNanos;
+
+ if (count($this->batch) === $this->maxExportBatchSize) {
+ $this->enqueueBatch();
+ }
+ if ($this->autoFlush) {
+ $this->flush();
+ }
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(__FUNCTION__, $cancellation);
+ }
+
+ public static function builder(SpanExporterInterface $exporter): BatchSpanProcessorBuilder
+ {
+ return new BatchSpanProcessorBuilder($exporter);
+ }
+
+ private function flush(?string $flushMethod = null, ?CancellationInterface $cancellation = null): bool
+ {
+ if ($flushMethod !== null) {
+ $flushId = $this->batchId + $this->queue->count() + (int) (bool) $this->batch;
+ $this->flush->enqueue([$flushId, $flushMethod, $cancellation, !$this->running, Context::getCurrent()]);
+ }
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ for (;;) {
+ while (!$this->flush->isEmpty() && $this->flush->bottom()[0] <= $this->batchId) {
+ [, $flushMethod, $cancellation, $propagateResult, $context] = $this->flush->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $this->exporter->$flushMethod($cancellation);
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $flushMethod), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+
+ if (!$this->shouldFlush()) {
+ break;
+ }
+
+ if ($this->queue->isEmpty()) {
+ $this->enqueueBatch();
+ }
+ $batchSize = count($this->queue->bottom());
+ $this->batchId++;
+ $scope = $this->exportContext->activate();
+
+ try {
+ $this->exporter->export($this->queue->dequeue())->await();
+ } catch (Throwable $e) {
+ self::logError('Unhandled export error', ['exception' => $e]);
+ } finally {
+ $this->processed += $batchSize;
+ $this->queueSize -= $batchSize;
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+
+ private function shouldFlush(): bool
+ {
+ return !$this->flush->isEmpty()
+ || $this->autoFlush && !$this->queue->isEmpty()
+ || $this->autoFlush && $this->nextScheduledRun !== null && $this->clock->now() > $this->nextScheduledRun;
+ }
+
+ private function enqueueBatch(): void
+ {
+ assert($this->batch !== []);
+
+ $this->queue->enqueue($this->batch);
+ $this->batch = [];
+ $this->nextScheduledRun = null;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php
new file mode 100644
index 000000000..8e81e7dd6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/BatchSpanProcessorBuilder.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+
+class BatchSpanProcessorBuilder
+{
+ private SpanExporterInterface $exporter;
+ private ?MeterProviderInterface $meterProvider = null;
+
+ public function __construct(SpanExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+ }
+
+ public function setMeterProvider(MeterProviderInterface $meterProvider): self
+ {
+ $this->meterProvider = $meterProvider;
+
+ return $this;
+ }
+
+ public function build(): BatchSpanProcessor
+ {
+ return new BatchSpanProcessor(
+ $this->exporter,
+ ClockFactory::getDefault(),
+ BatchSpanProcessor::DEFAULT_MAX_QUEUE_SIZE,
+ BatchSpanProcessor::DEFAULT_SCHEDULE_DELAY,
+ BatchSpanProcessor::DEFAULT_EXPORT_TIMEOUT,
+ BatchSpanProcessor::DEFAULT_MAX_EXPORT_BATCH_SIZE,
+ true,
+ $this->meterProvider
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php
new file mode 100644
index 000000000..e690791f2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/MultiSpanProcessor.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+
+/**
+ * Class SpanMultiProcessor is a SpanProcessor that forwards all events to an
+ * array of SpanProcessors.
+ */
+final class MultiSpanProcessor implements SpanProcessorInterface
+{
+ /** @var list<SpanProcessorInterface> */
+ 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<SpanProcessorInterface> */
+ public function getSpanProcessors(): array
+ {
+ return $this->processors;
+ }
+
+ /** @inheritDoc */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): 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(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+
+ foreach ($this->processors as $processor) {
+ $result = $result && $processor->shutdown();
+ }
+
+ return $result;
+ }
+
+ /** @inheritDoc */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ $result = true;
+
+ foreach ($this->processors as $processor) {
+ $result = $result && $processor->forceFlush();
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php
new file mode 100644
index 000000000..9c4d1eabe
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+
+class NoopSpanProcessor implements SpanProcessorInterface
+{
+ private static ?SpanProcessorInterface $instance = null;
+
+ public static function getInstance(): SpanProcessorInterface
+ {
+ if (null === self::$instance) {
+ self::$instance = new self();
+ }
+
+ return self::$instance;
+ }
+
+ /** @inheritDoc */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ } //@codeCoverageIgnore
+
+ /** @inheritDoc */
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ } //@codeCoverageIgnore
+
+ /** @inheritDoc */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return true;
+ }
+
+ /** @inheritDoc */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->forceFlush();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php b/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php
new file mode 100644
index 000000000..4e86e79ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace\SpanProcessor;
+
+use Closure;
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Trace\ReadableSpanInterface;
+use OpenTelemetry\SDK\Trace\ReadWriteSpanInterface;
+use OpenTelemetry\SDK\Trace\SpanExporterInterface;
+use OpenTelemetry\SDK\Trace\SpanProcessorInterface;
+use SplQueue;
+use function sprintf;
+use Throwable;
+
+class SimpleSpanProcessor implements SpanProcessorInterface
+{
+ use LogsMessagesTrait;
+
+ private SpanExporterInterface $exporter;
+ private ContextInterface $exportContext;
+
+ private bool $running = false;
+ /** @var SplQueue<array{Closure, string, bool, ContextInterface}> */
+ private SplQueue $queue;
+
+ private bool $closed = false;
+
+ public function __construct(SpanExporterInterface $exporter)
+ {
+ $this->exporter = $exporter;
+
+ $this->exportContext = Context::getCurrent();
+ $this->queue = new SplQueue();
+ }
+
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void
+ {
+ }
+
+ public function onEnd(ReadableSpanInterface $span): void
+ {
+ if ($this->closed) {
+ return;
+ }
+ if (!$span->getContext()->isSampled()) {
+ return;
+ }
+
+ $spanData = $span->toSpanData();
+ $this->flush(fn () => $this->exporter->export([$spanData])->await(), 'export', false, $this->exportContext);
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ return $this->flush(fn (): bool => $this->exporter->forceFlush($cancellation), __FUNCTION__, true, Context::getCurrent());
+ }
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->closed) {
+ return false;
+ }
+
+ $this->closed = true;
+
+ return $this->flush(fn (): bool => $this->exporter->shutdown($cancellation), __FUNCTION__, true, Context::getCurrent());
+ }
+
+ private function flush(Closure $task, string $taskName, bool $propagateResult, ContextInterface $context): bool
+ {
+ $this->queue->enqueue([$task, $taskName, $propagateResult && !$this->running, $context]);
+
+ if ($this->running) {
+ return false;
+ }
+
+ $success = true;
+ $exception = null;
+ $this->running = true;
+
+ try {
+ while (!$this->queue->isEmpty()) {
+ [$task, $taskName, $propagateResult, $context] = $this->queue->dequeue();
+ $scope = $context->activate();
+
+ try {
+ $result = $task();
+ if ($propagateResult) {
+ $success = $result;
+ }
+ } catch (Throwable $e) {
+ if ($propagateResult) {
+ $exception = $e;
+ } else {
+ self::logError(sprintf('Unhandled %s error', $taskName), ['exception' => $e]);
+ }
+ } finally {
+ $scope->detach();
+ }
+ }
+ } finally {
+ $this->running = false;
+ }
+
+ if ($exception !== null) {
+ throw $exception;
+ }
+
+ return $success;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php b/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php
new file mode 100644
index 000000000..39144cdf6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use InvalidArgumentException;
+use OpenTelemetry\SDK\Common\Configuration\Configuration;
+use OpenTelemetry\SDK\Common\Configuration\KnownValues as Values;
+use OpenTelemetry\SDK\Common\Configuration\Variables as Env;
+use OpenTelemetry\SDK\Common\Time\ClockFactory;
+use OpenTelemetry\SDK\Metrics\MeterProviderInterface;
+use OpenTelemetry\SDK\Metrics\NoopMeterProvider;
+use OpenTelemetry\SDK\Trace\SpanProcessor\BatchSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\NoopSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor;
+
+class SpanProcessorFactory
+{
+ public function create(?SpanExporterInterface $exporter = null, ?MeterProviderInterface $meterProvider = null): SpanProcessorInterface
+ {
+ if ($exporter === null) {
+ return new NoopSpanProcessor();
+ }
+
+ $name = Configuration::getEnum(Env::OTEL_PHP_TRACES_PROCESSOR);
+ switch ($name) {
+ case Values::VALUE_BATCH:
+ return new BatchSpanProcessor(
+ $exporter,
+ ClockFactory::getDefault(),
+ Configuration::getInt(Env::OTEL_BSP_MAX_QUEUE_SIZE, BatchSpanProcessor::DEFAULT_MAX_QUEUE_SIZE),
+ Configuration::getInt(Env::OTEL_BSP_SCHEDULE_DELAY, BatchSpanProcessor::DEFAULT_SCHEDULE_DELAY),
+ Configuration::getInt(Env::OTEL_BSP_EXPORT_TIMEOUT, BatchSpanProcessor::DEFAULT_EXPORT_TIMEOUT),
+ Configuration::getInt(Env::OTEL_BSP_MAX_EXPORT_BATCH_SIZE, BatchSpanProcessor::DEFAULT_MAX_EXPORT_BATCH_SIZE),
+ true, //autoflush
+ $meterProvider ?? new NoopMeterProvider(),
+ );
+ 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/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php b/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php
new file mode 100644
index 000000000..24bcea2dd
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/SpanProcessorInterface.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\Context\ContextInterface;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+/** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk.md#span-processor */
+interface SpanProcessorInterface
+{
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#onstart
+ */
+ public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext): void;
+
+ /**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#onendspan
+ */
+ public function onEnd(ReadableSpanInterface $span): void;
+
+ /**
+ * Export all ended spans to the configured Exporter that have not yet been exported.
+ * Returns `true` if the flush was successful, otherwise `false`.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-1
+ */
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+
+ /**
+ * Cleanup; after shutdown, calling onStart, onEnd, or forceFlush is invalid
+ * Returns `false` is the processor is already shutdown, otherwise `true`.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#shutdown-1
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/StatusData.php b/vendor/open-telemetry/sdk/Trace/StatusData.php
new file mode 100644
index 000000000..c28ea22ab
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/StatusData.php
@@ -0,0 +1,84 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+
+final class StatusData implements StatusDataInterface
+{
+ private static ?self $ok = null;
+ private static ?self $unset = null;
+ private static ?self $error = null;
+ private string $code;
+ private string $description;
+
+ /** @psalm-param API\StatusCode::STATUS_* $code */
+ public function __construct(
+ string $code,
+ string $description
+ ) {
+ $this->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/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php b/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php
new file mode 100644
index 000000000..973d2b519
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/StatusDataInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+interface StatusDataInterface
+{
+ public static function ok(): self;
+
+ public static function error(): self;
+
+ public static function unset(): self;
+
+ public function getCode(): string;
+
+ public function getDescription(): string;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/Tracer.php b/vendor/open-telemetry/sdk/Trace/Tracer.php
new file mode 100644
index 000000000..913773f60
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Tracer.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function ctype_space;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\Context\Context;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;
+
+class Tracer implements API\TracerInterface
+{
+ public const FALLBACK_SPAN_NAME = 'empty';
+
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+
+ /** @readonly */
+ private InstrumentationScopeInterface $instrumentationScope;
+
+ public function __construct(
+ TracerSharedState $tracerSharedState,
+ InstrumentationScopeInterface $instrumentationScope
+ ) {
+ $this->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()) {
+ return new API\NoopSpanBuilder(Context::storage());
+ }
+
+ return new SpanBuilder(
+ $spanName,
+ $this->instrumentationScope,
+ $this->tracerSharedState,
+ );
+ }
+
+ public function getInstrumentationScope(): InstrumentationScopeInterface
+ {
+ return $this->instrumentationScope;
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProvider.php b/vendor/open-telemetry/sdk/Trace/TracerProvider.php
new file mode 100644
index 000000000..fdae4aea2
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProvider.php
@@ -0,0 +1,99 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use function is_array;
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\API\Trace\NoopTracer;
+use OpenTelemetry\SDK\Common\Attribute\Attributes;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory;
+use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactoryInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
+use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
+use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
+
+final class TracerProvider implements TracerProviderInterface
+{
+ /** @readonly */
+ private TracerSharedState $tracerSharedState;
+ private InstrumentationScopeFactoryInterface $instrumentationScopeFactory;
+
+ /** @param list<SpanProcessorInterface>|SpanProcessorInterface|null $spanProcessors */
+ public function __construct(
+ $spanProcessors = [],
+ SamplerInterface $sampler = null,
+ ResourceInfo $resource = null,
+ SpanLimits $spanLimits = null,
+ IdGeneratorInterface $idGenerator = null,
+ ?InstrumentationScopeFactoryInterface $instrumentationScopeFactory = null
+ ) {
+ if (null === $spanProcessors) {
+ $spanProcessors = [];
+ }
+
+ $spanProcessors = is_array($spanProcessors) ? $spanProcessors : [$spanProcessors];
+ $resource ??= ResourceInfoFactory::defaultResource();
+ $sampler ??= new ParentBased(new AlwaysOnSampler());
+ $idGenerator ??= new RandomIdGenerator();
+ $spanLimits ??= (new SpanLimitsBuilder())->build();
+
+ $this->tracerSharedState = new TracerSharedState(
+ $idGenerator,
+ $resource,
+ $spanLimits,
+ $sampler,
+ $spanProcessors
+ );
+ $this->instrumentationScopeFactory = $instrumentationScopeFactory ?? new InstrumentationScopeFactory(Attributes::factory());
+ }
+
+ public function forceFlush(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->tracerSharedState->getSpanProcessor()->forceFlush($cancellation);
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getTracer(
+ string $name,
+ ?string $version = null,
+ ?string $schemaUrl = null,
+ iterable $attributes = []
+ ): API\TracerInterface {
+ if ($this->tracerSharedState->hasShutdown()) {
+ return NoopTracer::getInstance();
+ }
+
+ return new Tracer(
+ $this->tracerSharedState,
+ $this->instrumentationScopeFactory->create($name, $version, $schemaUrl, $attributes),
+ );
+ }
+
+ public function getSampler(): SamplerInterface
+ {
+ return $this->tracerSharedState->getSampler();
+ }
+
+ /**
+ * Returns `false` is the provider is already shutdown, otherwise `true`.
+ */
+ public function shutdown(?CancellationInterface $cancellation = null): bool
+ {
+ if ($this->tracerSharedState->hasShutdown()) {
+ return true;
+ }
+
+ return $this->tracerSharedState->shutdown($cancellation);
+ }
+
+ public static function builder(): TracerProviderBuilder
+ {
+ return new TracerProviderBuilder();
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php b/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php
new file mode 100644
index 000000000..8dcfdc700
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderBuilder.php
@@ -0,0 +1,45 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+
+class TracerProviderBuilder
+{
+ // @var array<SpanProcessorInterface>
+ private ?array $spanProcessors = [];
+ private ?ResourceInfo $resource = null;
+ private ?SamplerInterface $sampler = null;
+
+ public function addSpanProcessor(SpanProcessorInterface $spanProcessor): self
+ {
+ $this->spanProcessors[] = $spanProcessor;
+
+ return $this;
+ }
+
+ public function setResource(ResourceInfo $resource): self
+ {
+ $this->resource = $resource;
+
+ return $this;
+ }
+
+ public function setSampler(SamplerInterface $sampler): self
+ {
+ $this->sampler = $sampler;
+
+ return $this;
+ }
+
+ public function build(): TracerProviderInterface
+ {
+ return new TracerProvider(
+ $this->spanProcessors,
+ $this->sampler,
+ $this->resource,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php b/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php
new file mode 100644
index 000000000..a545319b6
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderFactory.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Behavior\LogsMessagesTrait;
+use OpenTelemetry\SDK\Sdk;
+
+final class TracerProviderFactory
+{
+ use LogsMessagesTrait;
+
+ private ExporterFactory $exporterFactory;
+ private SamplerFactory $samplerFactory;
+ private SpanProcessorFactory $spanProcessorFactory;
+
+ public function __construct(
+ ?ExporterFactory $exporterFactory = null,
+ ?SamplerFactory $samplerFactory = null,
+ ?SpanProcessorFactory $spanProcessorFactory = null
+ ) {
+ $this->exporterFactory = $exporterFactory ?: new ExporterFactory();
+ $this->samplerFactory = $samplerFactory ?: new SamplerFactory();
+ $this->spanProcessorFactory = $spanProcessorFactory ?: new SpanProcessorFactory();
+ }
+
+ public function create(): TracerProviderInterface
+ {
+ if (Sdk::isDisabled()) {
+ return new NoopTracerProvider();
+ }
+
+ try {
+ $exporter = $this->exporterFactory->create();
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create exporter', ['exception' => $t]);
+ $exporter = null;
+ }
+
+ try {
+ $sampler = $this->samplerFactory->create();
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create sampler', ['exception' => $t]);
+ $sampler = null;
+ }
+
+ try {
+ $spanProcessor = $this->spanProcessorFactory->create($exporter);
+ } catch (\Throwable $t) {
+ self::logWarning('Unable to create span processor', ['exception' => $t]);
+ $spanProcessor = null;
+ }
+
+ return new TracerProvider(
+ $spanProcessor,
+ $sampler,
+ );
+ }
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php b/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php
new file mode 100644
index 000000000..d61c1ea8f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerProviderInterface.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+
+interface TracerProviderInterface extends API\TracerProviderInterface
+{
+ public function forceFlush(?CancellationInterface $cancellation = null): bool;
+
+ public function shutdown(?CancellationInterface $cancellation = null): bool;
+}
diff --git a/vendor/open-telemetry/sdk/Trace/TracerSharedState.php b/vendor/open-telemetry/sdk/Trace/TracerSharedState.php
new file mode 100644
index 000000000..d0540cc1f
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/TracerSharedState.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API; /** @phan-suppress-current-line PhanUnreferencedUseNormal */
+use OpenTelemetry\SDK\Common\Future\CancellationInterface;
+use OpenTelemetry\SDK\Resource\ResourceInfo;
+use OpenTelemetry\SDK\Trace\SpanProcessor\MultiSpanProcessor;
+use OpenTelemetry\SDK\Trace\SpanProcessor\NoopSpanProcessor;
+
+/**
+ * Stores shared state/config between all {@see API\TracerInterface} created via the same {@see API\TracerProviderInterface}.
+ */
+final class TracerSharedState
+{
+ /** @readonly */
+ private IdGeneratorInterface $idGenerator;
+
+ /** @readonly */
+ private ResourceInfo $resource;
+
+ /** @readonly */
+ private SpanLimits $spanLimits;
+
+ /** @readonly */
+ private SamplerInterface $sampler;
+
+ /** @readonly */
+ private SpanProcessorInterface $spanProcessor;
+
+ private ?bool $shutdownResult = null;
+
+ public function __construct(
+ IdGeneratorInterface $idGenerator,
+ ResourceInfo $resource,
+ SpanLimits $spanLimits,
+ SamplerInterface $sampler,
+ array $spanProcessors
+ ) {
+ $this->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(?CancellationInterface $cancellation = null): bool
+ {
+ return $this->shutdownResult ?? ($this->shutdownResult = $this->spanProcessor->shutdown($cancellation));
+ }
+}
diff --git a/vendor/open-telemetry/sdk/_autoload.php b/vendor/open-telemetry/sdk/_autoload.php
new file mode 100644
index 000000000..4e1de3450
--- /dev/null
+++ b/vendor/open-telemetry/sdk/_autoload.php
@@ -0,0 +1,5 @@
+<?php
+
+declare(strict_types=1);
+
+\OpenTelemetry\SDK\SdkAutoloader::autoload();
diff --git a/vendor/open-telemetry/sdk/composer.json b/vendor/open-telemetry/sdk/composer.json
new file mode 100644
index 000000000..4497c9400
--- /dev/null
+++ b/vendor/open-telemetry/sdk/composer.json
@@ -0,0 +1,59 @@
+{
+ "name": "open-telemetry/sdk",
+ "description": "SDK for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "sdk"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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": "*",
+ "open-telemetry/api": "^1.0",
+ "open-telemetry/context": "^1.0",
+ "open-telemetry/sem-conv": "^1.0",
+ "php-http/discovery": "^1.14",
+ "psr/http-client-implementation": "^1.0",
+ "psr/http-factory-implementation": "^1.0",
+ "psr/http-client": "^1.0",
+ "psr/http-message": "^1.0.1|^2.0",
+ "psr/log": "^1.1|^2.0|^3.0",
+ "symfony/polyfill-mbstring": "^1.23",
+ "symfony/polyfill-php80": "^1.26",
+ "symfony/polyfill-php81": "^1.26",
+ "symfony/polyfill-php82": "^1.26"
+ },
+ "autoload": {
+ "psr-4": {
+ "OpenTelemetry\\SDK\\": "."
+ },
+ "files": [
+ "Common/Util/functions.php",
+ "Logs/Exporter/_register.php",
+ "Metrics/MetricExporter/_register.php",
+ "Propagation/_register.php",
+ "Trace/SpanExporter/_register.php",
+ "Common/Dev/Compatibility/_load.php",
+ "_autoload.php"
+ ]
+ },
+ "suggest": {
+ "ext-gmp": "To support unlimited number of synchronous metric readers",
+ "ext-mbstring": "To increase performance of string operations"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/open-telemetry/sem-conv/README.md b/vendor/open-telemetry/sem-conv/README.md
new file mode 100644
index 000000000..58083e1f5
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/README.md
@@ -0,0 +1,25 @@
+[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/sem-conv/releases)
+[![Source](https://img.shields.io/badge/source-sem--conv-green)](https://github.com/open-telemetry/opentelemetry-php/tree/main/src/SemConv)
+[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php:sem--conv-blue)](https://github.com/opentelemetry-php/sem-conv)
+[![Latest Version](http://poser.pugx.org/open-telemetry/sem-conv/v/unstable)](https://packagist.org/packages/open-telemetry/sem-conv/)
+[![Stable](http://poser.pugx.org/open-telemetry/sem-conv/v/stable)](https://packagist.org/packages/open-telemetry/sem-conv/)
+
+# OpenTelemetry Semantic Conventions
+
+Common semantic conventions used by OpenTelemetry implementations across all languages.
+
+Please note that Semantic Conventions are tagged with the version of the
+[Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tags) that they were generated from.
+
+See https://opentelemetry.io/docs/concepts/semantic-conventions/.
+
+## Installation
+
+```shell
+composer require open-telemetry/sem-conv
+```
+
+## Contributing
+
+This repository is a read-only git subtree split.
+To contribute, please see the main [OpenTelemetry PHP monorepo](https://github.com/open-telemetry/opentelemetry-php).
diff --git a/vendor/open-telemetry/sem-conv/ResourceAttributes.php b/vendor/open-telemetry/sem-conv/ResourceAttributes.php
new file mode 100644
index 000000000..cdde885a9
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/ResourceAttributes.php
@@ -0,0 +1,1007 @@
+<?php
+
+// DO NOT EDIT, this is an Auto-generated file from script/semantic-convention/templates/Attributes.php.j2
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SemConv;
+
+interface ResourceAttributes
+{
+ /**
+ * The URL of the OpenTelemetry schema for these keys and values.
+ */
+ public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.22.0';
+
+ /**
+ * Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found here.
+ *
+ * @example 33
+ * @example 32
+ */
+ public const ANDROID_OS_API_LEVEL = 'android.os.api_level';
+
+ /**
+ * Array of brand name and version separated by a space.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.brands`).
+ *
+ * @example Not A;Brand 99
+ * @example Chromium 99
+ * @example Chrome 99
+ */
+ public const BROWSER_BRANDS = 'browser.brands';
+
+ /**
+ * Preferred language of the user using the browser.
+ *
+ * This value is intended to be taken from the Navigator API `navigator.language`.
+ *
+ * @example en
+ * @example en-US
+ * @example fr
+ * @example fr-FR
+ */
+ public const BROWSER_LANGUAGE = 'browser.language';
+
+ /**
+ * A boolean that is true if the browser is running on a mobile device.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.
+ */
+ public const BROWSER_MOBILE = 'browser.mobile';
+
+ /**
+ * The platform on which the browser is running.
+ *
+ * This value is intended to be taken from the UA client hints API (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.
+ * The list of possible values is defined in the W3C User-Agent Client Hints specification. Note that some (but not all) of these values can overlap with values in the `os.type` and `os.name` attributes. However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.
+ *
+ * @example Windows
+ * @example macOS
+ * @example Android
+ */
+ public const BROWSER_PLATFORM = 'browser.platform';
+
+ /**
+ * Full user-agent string provided by the browser.
+ *
+ * The user-agent value SHOULD be provided only from browsers that do not have a mechanism to retrieve brands and platform individually from the User-Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` API can be used.
+ *
+ * @example Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
+ */
+ public const USER_AGENT_ORIGINAL = 'user_agent.original';
+
+ /**
+ * The cloud account ID the resource is assigned to.
+ *
+ * @example 111111111111
+ * @example opentelemetry
+ */
+ public const CLOUD_ACCOUNT_ID = 'cloud.account.id';
+
+ /**
+ * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.
+ *
+ * Availability zones are called &quot;zones&quot; on Alibaba Cloud and Google Cloud.
+ *
+ * @example us-east-1c
+ */
+ public const CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';
+
+ /**
+ * The cloud platform in use.
+ *
+ * The prefix of the service SHOULD match the one specified in `cloud.provider`.
+ */
+ public const CLOUD_PLATFORM = 'cloud.platform';
+
+ /**
+ * Name of the cloud provider.
+ */
+ public const CLOUD_PROVIDER = 'cloud.provider';
+
+ /**
+ * The geographical region the resource is running.
+ *
+ * Refer to your provider's docs to see the available regions, for example Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or Tencent Cloud regions.
+ *
+ * @example us-central1
+ * @example us-east-1
+ */
+ public const CLOUD_REGION = 'cloud.region';
+
+ /**
+ * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on GCP).
+ *
+ * On some cloud providers, it may not be possible to determine the full ID at startup,
+ * so it may be necessary to set `cloud.resource_id` as a span attribute instead.The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ * The following well-known definitions MUST be used if you set this attribute and they apply:<ul>
+ * <li><strong>AWS Lambda:</strong> The function ARN.
+ * Take care not to use the &quot;invoked ARN&quot; directly but replace any
+ * alias suffix
+ * with the resolved function version, as the same runtime instance may be invokable with
+ * multiple different aliases.</li>
+ * <li><strong>GCP:</strong> The URI of the resource</li>
+ * <li><strong>Azure:</strong> The Fully Qualified Resource ID of the invoked function,
+ * <em>not</em> the function app, having the form
+ * `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
+ * This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
+ * a TracerProvider.</li>
+ * </ul>
+ *
+ * @example arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function
+ * @example //run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID
+ * @example /subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>
+ */
+ public const CLOUD_RESOURCE_ID = 'cloud.resource_id';
+
+ /**
+ * The ARN of an ECS cluster.
+ *
+ * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster
+ */
+ public const AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';
+
+ /**
+ * The Amazon Resource Name (ARN) of an ECS container instance.
+ *
+ * @example arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9
+ */
+ public const AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';
+
+ /**
+ * The launch type for an ECS task.
+ */
+ public const AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';
+
+ /**
+ * The ARN of an ECS task definition.
+ *
+ * @example arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';
+
+ /**
+ * The task definition family this task definition is a member of.
+ *
+ * @example opentelemetry-family
+ */
+ public const AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';
+
+ /**
+ * The revision for this task definition.
+ *
+ * @example 8
+ * @example 26
+ */
+ public const AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';
+
+ /**
+ * The ARN of an EKS cluster.
+ *
+ * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster
+ */
+ public const AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';
+
+ /**
+ * The Amazon Resource Name(s) (ARN) of the AWS log group(s).
+ *
+ * See the log group ARN format documentation.
+ *
+ * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*
+ */
+ public const AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';
+
+ /**
+ * The name(s) of the AWS log group(s) an application is writing to.
+ *
+ * Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.
+ *
+ * @example /aws/lambda/my-function
+ * @example opentelemetry-service
+ */
+ public const AWS_LOG_GROUP_NAMES = 'aws.log.group.names';
+
+ /**
+ * The ARN(s) of the AWS log stream(s).
+ *
+ * See the log stream ARN format documentation. One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.
+ *
+ * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';
+
+ /**
+ * The name(s) of the AWS log stream(s) an application is writing to.
+ *
+ * @example logs/main/10838bed-421f-43ef-870a-f43feacbbb5b
+ */
+ public const AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';
+
+ /**
+ * The name of the Cloud Run execution being run for the Job, as set by the `CLOUD_RUN_EXECUTION` environment variable.
+ *
+ * @example job-name-xxxx
+ * @example sample-job-mdw84
+ */
+ public const GCP_CLOUD_RUN_JOB_EXECUTION = 'gcp.cloud_run.job.execution';
+
+ /**
+ * The index for a task within an execution as provided by the `CLOUD_RUN_TASK_INDEX` environment variable.
+ *
+ * @example 1
+ */
+ public const GCP_CLOUD_RUN_JOB_TASK_INDEX = 'gcp.cloud_run.job.task_index';
+
+ /**
+ * The hostname of a GCE instance. This is the full value of the default or custom hostname.
+ *
+ * @example my-host1234.example.com
+ * @example sample-vm.us-west1-b.c.my-project.internal
+ */
+ public const GCP_GCE_INSTANCE_HOSTNAME = 'gcp.gce.instance.hostname';
+
+ /**
+ * The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the default internal DNS name.
+ *
+ * @example instance-1
+ * @example my-vm-name
+ */
+ public const GCP_GCE_INSTANCE_NAME = 'gcp.gce.instance.name';
+
+ /**
+ * Unique identifier for the application.
+ *
+ * @example 2daa2797-e42b-4624-9322-ec3f968df4da
+ */
+ public const HEROKU_APP_ID = 'heroku.app.id';
+
+ /**
+ * Commit hash for the current release.
+ *
+ * @example e6134959463efd8966b20e75b913cafe3f5ec
+ */
+ public const HEROKU_RELEASE_COMMIT = 'heroku.release.commit';
+
+ /**
+ * Time and date the release was created.
+ *
+ * @example 2022-10-23T18:00:42Z
+ */
+ public const HEROKU_RELEASE_CREATION_TIMESTAMP = 'heroku.release.creation_timestamp';
+
+ /**
+ * The command used to run the container (i.e. the command name).
+ *
+ * If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
+ *
+ * @example otelcontribcol
+ */
+ public const CONTAINER_COMMAND = 'container.command';
+
+ /**
+ * All the command arguments (including the command/executable itself) run by the container. [2].
+ *
+ * @example otelcontribcol, --config, config.yaml
+ */
+ public const CONTAINER_COMMAND_ARGS = 'container.command_args';
+
+ /**
+ * The full command run by the container as a single string representing the full command. [2].
+ *
+ * @example otelcontribcol --config config.yaml
+ */
+ public const CONTAINER_COMMAND_LINE = 'container.command_line';
+
+ /**
+ * Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
+ *
+ * @example a3bf90e006b2
+ */
+ public const CONTAINER_ID = 'container.id';
+
+ /**
+ * Runtime specific image identifier. Usually a hash algorithm followed by a UUID.
+ *
+ * Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect API endpoint.
+ * K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
+ * The ID is assinged by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.
+ *
+ * @example sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f
+ */
+ public const CONTAINER_IMAGE_ID = 'container.image.id';
+
+ /**
+ * Name of the image the container was built on.
+ *
+ * @example gcr.io/opentelemetry/operator
+ */
+ public const CONTAINER_IMAGE_NAME = 'container.image.name';
+
+ /**
+ * Repo digests of the container image as provided by the container runtime.
+ *
+ * Docker and CRI report those under the `RepoDigests` field.
+ *
+ * @example example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb
+ * @example internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578
+ */
+ public const CONTAINER_IMAGE_REPO_DIGESTS = 'container.image.repo_digests';
+
+ /**
+ * Container image tags. An example can be found in Docker Image Inspect. Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.
+ *
+ * @example v1.27.1
+ * @example 3.5.7-0
+ */
+ public const CONTAINER_IMAGE_TAGS = 'container.image.tags';
+
+ /**
+ * Container name used by container runtime.
+ *
+ * @example opentelemetry-autoconf
+ */
+ public const CONTAINER_NAME = 'container.name';
+
+ /**
+ * The container runtime managing this container.
+ *
+ * @example docker
+ * @example containerd
+ * @example rkt
+ */
+ public const CONTAINER_RUNTIME = 'container.runtime';
+
+ /**
+ * Name of the deployment environment (aka deployment tier).
+ *
+ * @example staging
+ * @example production
+ */
+ public const DEPLOYMENT_ENVIRONMENT = 'deployment.environment';
+
+ /**
+ * A unique identifier representing the device.
+ *
+ * The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor identifier. On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found here on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.
+ *
+ * @example 2ab2916d-a51f-4ac8-80ee-45ac31a28092
+ */
+ public const DEVICE_ID = 'device.id';
+
+ /**
+ * The name of the device manufacturer.
+ *
+ * The Android OS provides this field via Build. iOS apps SHOULD hardcode the value `Apple`.
+ *
+ * @example Apple
+ * @example Samsung
+ */
+ public const DEVICE_MANUFACTURER = 'device.manufacturer';
+
+ /**
+ * The model identifier for the device.
+ *
+ * It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.
+ *
+ * @example iPhone3,4
+ * @example SM-G920F
+ */
+ public const DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';
+
+ /**
+ * The marketing name for the device model.
+ *
+ * It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.
+ *
+ * @example iPhone 6s Plus
+ * @example Samsung Galaxy S6
+ */
+ public const DEVICE_MODEL_NAME = 'device.model.name';
+
+ /**
+ * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.
+ *
+ * <ul>
+ * <li><strong>AWS Lambda:</strong> Use the (full) log stream name.</li>
+ * </ul>
+ *
+ * @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de
+ */
+ public const FAAS_INSTANCE = 'faas.instance';
+
+ /**
+ * The amount of memory available to the serverless function converted to Bytes.
+ *
+ * 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 (which must be multiplied by 1,048,576).
+ *
+ * @example 134217728
+ */
+ public const FAAS_MAX_MEMORY = 'faas.max_memory';
+
+ /**
+ * The name of the single function that this runtime instance executes.
+ *
+ * This is the name of the function as configured/deployed on the FaaS
+ * platform and is usually different from the name of the callback
+ * function (which may be stored in the
+ * `code.namespace`/`code.function`
+ * span attributes).For some cloud providers, the above definition is ambiguous. The following
+ * definition of function name MUST be used for this attribute
+ * (and consequently the span name) for the listed cloud providers/products:<ul>
+ * <li><strong>Azure:</strong> The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
+ * followed by a forward slash followed by the function name (this form
+ * can also be seen in the resource JSON for the function).
+ * This means that a span attribute MUST be used, as an Azure function
+ * app can host multiple functions that would usually share
+ * a TracerProvider (see also the `cloud.resource_id` attribute).</li>
+ * </ul>
+ *
+ * @example my-function
+ * @example myazurefunctionapp/some-function-name
+ */
+ public const FAAS_NAME = 'faas.name';
+
+ /**
+ * The immutable version of the function being executed.
+ *
+ * Depending on the cloud provider and platform, use:<ul>
+ * <li><strong>AWS Lambda:</strong> The function version
+ * (an integer represented as a decimal string).</li>
+ * <li><strong>Google Cloud Run (Services):</strong> The revision
+ * (i.e., the function name plus the revision suffix).</li>
+ * <li><strong>Google Cloud Functions:</strong> The value of the
+ * `K_REVISION` environment variable.</li>
+ * <li><strong>Azure Functions:</strong> Not applicable. Do not set this attribute.</li>
+ * </ul>
+ *
+ * @example 26
+ * @example pinkfroid-00002
+ */
+ public const FAAS_VERSION = 'faas.version';
+
+ /**
+ * The CPU architecture the host system is running on.
+ */
+ public const HOST_ARCH = 'host.arch';
+
+ /**
+ * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.
+ *
+ * @example fdbf79e8af94cb7f9e8df36789187052
+ */
+ public const HOST_ID = 'host.id';
+
+ /**
+ * VM image ID or host OS image ID. For Cloud, this value is from the provider.
+ *
+ * @example ami-07b06b442921831e5
+ */
+ public const HOST_IMAGE_ID = 'host.image.id';
+
+ /**
+ * 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';
+
+ /**
+ * The version string of the VM image or host OS as defined in Version Attributes.
+ *
+ * @example 0.1
+ */
+ public const HOST_IMAGE_VERSION = 'host.image.version';
+
+ /**
+ * Available IP addresses of the host, excluding loopback interfaces.
+ *
+ * IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the RFC 5952 format.
+ *
+ * @example 192.168.1.140
+ * @example fe80::abc2:4a28:737a:609e
+ */
+ public const HOST_IP = 'host.ip';
+
+ /**
+ * 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 amount of level 2 memory cache available to the processor (in Bytes).
+ *
+ * @example 12288000
+ */
+ public const HOST_CPU_CACHE_L2_SIZE = 'host.cpu.cache.l2.size';
+
+ /**
+ * Numeric value specifying the family or generation of the CPU.
+ *
+ * @example 6
+ */
+ public const HOST_CPU_FAMILY = 'host.cpu.family';
+
+ /**
+ * Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.
+ *
+ * @example 6
+ */
+ public const HOST_CPU_MODEL_ID = 'host.cpu.model.id';
+
+ /**
+ * Model designation of the processor.
+ *
+ * @example 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
+ */
+ public const HOST_CPU_MODEL_NAME = 'host.cpu.model.name';
+
+ /**
+ * Stepping or core revisions.
+ *
+ * @example 1
+ */
+ public const HOST_CPU_STEPPING = 'host.cpu.stepping';
+
+ /**
+ * Processor manufacturer identifier. A maximum 12-character string.
+ *
+ * CPUID command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.
+ *
+ * @example GenuineIntel
+ */
+ public const HOST_CPU_VENDOR_ID = 'host.cpu.vendor.id';
+
+ /**
+ * The name of the cluster.
+ *
+ * @example opentelemetry-cluster
+ */
+ public const K8S_CLUSTER_NAME = 'k8s.cluster.name';
+
+ /**
+ * A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.
+ *
+ * K8s does not have support for obtaining a cluster ID. If this is ever
+ * added, we will recommend collecting the `k8s.cluster.uid` through the
+ * official APIs. In the meantime, we are able to use the `uid` of the
+ * `kube-system` namespace as a proxy for cluster ID. Read on for the
+ * rationale.Every object created in a K8s cluster is assigned a distinct UID. The
+ * `kube-system` namespace is used by Kubernetes itself and will exist
+ * for the lifetime of the cluster. Using the `uid` of the `kube-system`
+ * namespace is a reasonable proxy for the K8s ClusterID as it will only
+ * change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
+ * UUIDs as standardized by
+ * ISO/IEC 9834-8 and ITU-T X.667.
+ * Which states:<blockquote>
+ * If generated according to one of the mechanisms defined in Rec.</blockquote>
+ * ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
+ * different from all other UUIDs generated before 3603 A.D., or is
+ * extremely likely to be different (depending on the mechanism chosen).Therefore, UIDs between clusters should be extremely unlikely to
+ * conflict.
+ *
+ * @example 218fc5a9-a5f1-4b54-aa05-46717d0ab26d
+ */
+ public const K8S_CLUSTER_UID = 'k8s.cluster.uid';
+
+ /**
+ * 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 name of the Pod.
+ *
+ * @example opentelemetry-pod-autoconf
+ */
+ public const K8S_POD_NAME = 'k8s.pod.name';
+
+ /**
+ * The UID of the Pod.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_POD_UID = 'k8s.pod.uid';
+
+ /**
+ * 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 name of the ReplicaSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_REPLICASET_NAME = 'k8s.replicaset.name';
+
+ /**
+ * The UID of the ReplicaSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_REPLICASET_UID = 'k8s.replicaset.uid';
+
+ /**
+ * The name of the Deployment.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';
+
+ /**
+ * The UID of the Deployment.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';
+
+ /**
+ * The name of the StatefulSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_STATEFULSET_NAME = 'k8s.statefulset.name';
+
+ /**
+ * The UID of the StatefulSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_STATEFULSET_UID = 'k8s.statefulset.uid';
+
+ /**
+ * The name of the DaemonSet.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_DAEMONSET_NAME = 'k8s.daemonset.name';
+
+ /**
+ * The UID of the DaemonSet.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_DAEMONSET_UID = 'k8s.daemonset.uid';
+
+ /**
+ * The name of the Job.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_JOB_NAME = 'k8s.job.name';
+
+ /**
+ * The UID of the Job.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_JOB_UID = 'k8s.job.uid';
+
+ /**
+ * The name of the CronJob.
+ *
+ * @example opentelemetry
+ */
+ public const K8S_CRONJOB_NAME = 'k8s.cronjob.name';
+
+ /**
+ * The UID of the CronJob.
+ *
+ * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff
+ */
+ public const K8S_CRONJOB_UID = 'k8s.cronjob.uid';
+
+ /**
+ * The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.
+ *
+ * Follows OCI Image Manifest Specification, and specifically the Digest property.
+ * An example can be found in Example Image Manifest.
+ *
+ * @example sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4
+ */
+ public const OCI_MANIFEST_DIGEST = 'oci.manifest.digest';
+
+ /**
+ * Unique identifier for a particular build or compilation of the operating system.
+ *
+ * @example TQ3C.230805.001.B2
+ * @example 20E247
+ * @example 22621
+ */
+ public const OS_BUILD_ID = 'os.build_id';
+
+ /**
+ * 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 operating system type.
+ */
+ public const OS_TYPE = 'os.type';
+
+ /**
+ * 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';
+
+ /**
+ * 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';
+
+ /**
+ * 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 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';
+
+ /**
+ * 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 username of the user that owns the process.
+ *
+ * @example root
+ */
+ public const PROCESS_OWNER = 'process.owner';
+
+ /**
+ * Parent Process identifier (PID).
+ *
+ * @example 111
+ */
+ public const PROCESS_PARENT_PID = 'process.parent_pid';
+
+ /**
+ * Process identifier (PID).
+ *
+ * @example 1234
+ */
+ public const PROCESS_PID = 'process.pid';
+
+ /**
+ * 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';
+
+ /**
+ * 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';
+
+ /**
+ * 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';
+
+ /**
+ * The version string of the service API or implementation. The format is not defined by these conventions.
+ *
+ * @example 2.0.0
+ * @example a01dbef8a
+ */
+ public const SERVICE_VERSION = 'service.version';
+
+ /**
+ * 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 my-k8s-pod-deployment-1
+ * @example 627cc493-f310-47de-96bd-71410b7dec09
+ */
+ public const SERVICE_INSTANCE_ID = 'service.instance.id';
+
+ /**
+ * 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 language of the telemetry SDK.
+ */
+ public const TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';
+
+ /**
+ * The name of the telemetry SDK as defined above.
+ *
+ * The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
+ * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
+ * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
+ * or another suitable identifier depending on the language.
+ * The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
+ * All custom identifiers SHOULD be stable across different versions of an implementation.
+ *
+ * @example opentelemetry
+ */
+ public const TELEMETRY_SDK_NAME = 'telemetry.sdk.name';
+
+ /**
+ * The version string of the telemetry SDK.
+ *
+ * @example 1.2.3
+ */
+ public const TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';
+
+ /**
+ * The name of the auto instrumentation agent or distribution, if used.
+ *
+ * Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
+ * a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.
+ *
+ * @example parts-unlimited-java
+ */
+ public const TELEMETRY_DISTRO_NAME = 'telemetry.distro.name';
+
+ /**
+ * The version string of the auto instrumentation agent or distribution, if used.
+ *
+ * @example 1.2.3
+ */
+ public const TELEMETRY_DISTRO_VERSION = 'telemetry.distro.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';
+
+ /**
+ * 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';
+
+ /**
+ * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+ *
+ * @example io.opentelemetry.contrib.mongodb
+ */
+ public const OTEL_SCOPE_NAME = 'otel.scope.name';
+
+ /**
+ * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ *
+ * @example 1.0.0
+ */
+ public const OTEL_SCOPE_VERSION = 'otel.scope.version';
+
+ /**
+ * Deprecated, use the `otel.scope.name` attribute.
+ *
+ * @deprecated Deprecated, use the `otel.scope.name` attribute..
+ * @example io.opentelemetry.contrib.mongodb
+ */
+ public const OTEL_LIBRARY_NAME = 'otel.library.name';
+
+ /**
+ * Deprecated, use the `otel.scope.version` attribute.
+ *
+ * @deprecated Deprecated, use the `otel.scope.version` attribute..
+ * @example 1.0.0
+ */
+ public const OTEL_LIBRARY_VERSION = 'otel.library.version';
+
+ /**
+ * @deprecated Use USER_AGENT_ORIGINAL
+ */
+ public const BROWSER_USER_AGENT = 'browser.user_agent';
+
+ /**
+ * @deprecated Use CLOUD_RESOURCE_ID
+ */
+ public const FAAS_ID = 'faas.id';
+
+ /**
+ * @deprecated Use TELEMETRY_DISTRO_VERSION
+ */
+ public const TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';
+
+ /**
+ * @deprecated Use CONTAINER_IMAGE_TAGS
+ */
+ public const CONTAINER_IMAGE_TAG = 'container.image.tag';
+}
diff --git a/vendor/open-telemetry/sem-conv/TraceAttributes.php b/vendor/open-telemetry/sem-conv/TraceAttributes.php
new file mode 100644
index 000000000..4329db5f9
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/TraceAttributes.php
@@ -0,0 +1,2052 @@
+<?php
+
+// DO NOT EDIT, this is an Auto-generated file from script/semantic-convention/templates/Attributes.php.j2
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SemConv;
+
+interface TraceAttributes
+{
+ /**
+ * The URL of the OpenTelemetry schema for these keys and values.
+ */
+ public const SCHEMA_URL = 'https://opentelemetry.io/schemas/1.22.0';
+
+ /**
+ * Client address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example client.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const CLIENT_ADDRESS = 'client.address';
+
+ /**
+ * Client port number.
+ *
+ * When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example 65123
+ */
+ public const CLIENT_PORT = 'client.port';
+
+ /**
+ * Deprecated, use `server.address`.
+ *
+ * @deprecated Deprecated, use `server.address`..
+ * @example example.com
+ */
+ public const NET_HOST_NAME = 'net.host.name';
+
+ /**
+ * Deprecated, use `server.port`.
+ *
+ * @deprecated Deprecated, use `server.port`..
+ * @example 8080
+ */
+ public const NET_HOST_PORT = 'net.host.port';
+
+ /**
+ * Deprecated, use `server.address` on client spans and `client.address` on server spans.
+ *
+ * @deprecated Deprecated, use `server.address` on client spans and `client.address` on server spans..
+ * @example example.com
+ */
+ public const NET_PEER_NAME = 'net.peer.name';
+
+ /**
+ * Deprecated, use `server.port` on client spans and `client.port` on server spans.
+ *
+ * @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans..
+ * @example 8080
+ */
+ public const NET_PEER_PORT = 'net.peer.port';
+
+ /**
+ * Deprecated, use `network.protocol.name`.
+ *
+ * @deprecated Deprecated, use `network.protocol.name`..
+ * @example amqp
+ * @example http
+ * @example mqtt
+ */
+ public const NET_PROTOCOL_NAME = 'net.protocol.name';
+
+ /**
+ * Deprecated, use `network.protocol.version`.
+ *
+ * @deprecated Deprecated, use `network.protocol.version`..
+ * @example 3.1.1
+ */
+ public const NET_PROTOCOL_VERSION = 'net.protocol.version';
+
+ /**
+ * Deprecated, use `network.transport` and `network.type`.
+ */
+ public const NET_SOCK_FAMILY = 'net.sock.family';
+
+ /**
+ * Deprecated, use `network.local.address`.
+ *
+ * @deprecated Deprecated, use `network.local.address`..
+ * @example /var/my.sock
+ */
+ public const NET_SOCK_HOST_ADDR = 'net.sock.host.addr';
+
+ /**
+ * Deprecated, use `network.local.port`.
+ *
+ * @deprecated Deprecated, use `network.local.port`..
+ * @example 8080
+ */
+ public const NET_SOCK_HOST_PORT = 'net.sock.host.port';
+
+ /**
+ * Deprecated, use `network.peer.address`.
+ *
+ * @deprecated Deprecated, use `network.peer.address`..
+ * @example 192.168.0.1
+ */
+ public const NET_SOCK_PEER_ADDR = 'net.sock.peer.addr';
+
+ /**
+ * Deprecated, no replacement at this time.
+ *
+ * @deprecated Deprecated, no replacement at this time..
+ * @example /var/my.sock
+ */
+ public const NET_SOCK_PEER_NAME = 'net.sock.peer.name';
+
+ /**
+ * Deprecated, use `network.peer.port`.
+ *
+ * @deprecated Deprecated, use `network.peer.port`..
+ * @example 65531
+ */
+ public const NET_SOCK_PEER_PORT = 'net.sock.peer.port';
+
+ /**
+ * Deprecated, use `network.transport`.
+ */
+ public const NET_TRANSPORT = 'net.transport';
+
+ /**
+ * Destination address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example destination.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const DESTINATION_ADDRESS = 'destination.address';
+
+ /**
+ * Destination port number.
+ *
+ * @example 3389
+ * @example 2888
+ */
+ public const DESTINATION_PORT = 'destination.port';
+
+ /**
+ * Describes a class of error the operation ended with.
+ *
+ * The `error.type` SHOULD be predictable and SHOULD have low cardinality.
+ * Instrumentations SHOULD document the list of errors they report.The cardinality of `error.type` within one instrumentation library SHOULD be low, but
+ * telemetry consumers that aggregate data from multiple instrumentation libraries and applications
+ * should be prepared for `error.type` to have high cardinality at query time, when no
+ * additional filters are applied.If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.If a specific domain defines its own set of error codes (such as HTTP or gRPC status codes),
+ * it's RECOMMENDED to use a domain-specific attribute and also set `error.type` to capture
+ * all errors, regardless of whether they are defined within the domain-specific set or not.
+ *
+ * @example timeout
+ * @example java.net.UnknownHostException
+ * @example server_certificate_invalid
+ * @example 500
+ */
+ public const ERROR_TYPE = 'error.type';
+
+ /**
+ * The exception message.
+ *
+ * @example Division by zero
+ * @example Can't convert 'int' object to str implicitly
+ */
+ public const EXCEPTION_MESSAGE = 'exception.message';
+
+ /**
+ * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.
+ *
+ * @example Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)
+ */
+ public const EXCEPTION_STACKTRACE = 'exception.stacktrace';
+
+ /**
+ * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.
+ *
+ * @example java.net.ConnectException
+ * @example OSError
+ */
+ public const EXCEPTION_TYPE = 'exception.type';
+
+ /**
+ * The name of the invoked function.
+ *
+ * SHOULD be equal to the `faas.name` resource attribute of the invoked function.
+ *
+ * @example my-function
+ */
+ public const FAAS_INVOKED_NAME = 'faas.invoked_name';
+
+ /**
+ * The cloud provider of the invoked function.
+ *
+ * SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.
+ */
+ public const FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';
+
+ /**
+ * The cloud region of the invoked function.
+ *
+ * SHOULD be equal to the `cloud.region` resource attribute of the invoked function.
+ *
+ * @example eu-central-1
+ */
+ public const FAAS_INVOKED_REGION = 'faas.invoked_region';
+
+ /**
+ * Type of the trigger which caused this function invocation.
+ */
+ public const FAAS_TRIGGER = 'faas.trigger';
+
+ /**
+ * The `service.name` of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.
+ *
+ * @example AuthTokenCache
+ */
+ public const PEER_SERVICE = 'peer.service';
+
+ /**
+ * Username or client_id extracted from the access token or Authorization header in the inbound request from outside the system.
+ *
+ * @example username
+ */
+ public const ENDUSER_ID = 'enduser.id';
+
+ /**
+ * Actual/assumed role the client is making the request under extracted from token or application security context.
+ *
+ * @example admin
+ */
+ public const ENDUSER_ROLE = 'enduser.role';
+
+ /**
+ * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 Assertion.
+ *
+ * @example read:message, write:files
+ */
+ public const ENDUSER_SCOPE = 'enduser.scope';
+
+ /**
+ * Whether the thread is daemon or not.
+ */
+ public const THREAD_DAEMON = 'thread.daemon';
+
+ /**
+ * Current &quot;managed&quot; thread ID (as opposed to OS thread ID).
+ *
+ * @example 42
+ */
+ public const THREAD_ID = 'thread.id';
+
+ /**
+ * Current thread name.
+ *
+ * @example main
+ */
+ public const THREAD_NAME = 'thread.name';
+
+ /**
+ * The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
+ *
+ * @example 16
+ */
+ public const CODE_COLUMN = 'code.column';
+
+ /**
+ * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).
+ *
+ * @example /usr/local/MyApplication/content_root/app/index.php
+ */
+ public const CODE_FILEPATH = 'code.filepath';
+
+ /**
+ * The method or function name, or equivalent (usually rightmost part of the code unit's name).
+ *
+ * @example serveRequest
+ */
+ public const CODE_FUNCTION = 'code.function';
+
+ /**
+ * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.
+ *
+ * @example 42
+ */
+ public const CODE_LINENO = 'code.lineno';
+
+ /**
+ * The &quot;namespace&quot; within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.
+ *
+ * @example com.example.MyHttpService
+ */
+ public const CODE_NAMESPACE = 'code.namespace';
+
+ /**
+ * HTTP request method.
+ *
+ * HTTP request method value SHOULD be &quot;known&quot; to the instrumentation.
+ * By default, this convention defines &quot;known&quot; methods as the ones listed in RFC9110
+ * and the PATCH method defined in RFC5789.If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override
+ * the list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named
+ * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods
+ * (this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.
+ * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.
+ * Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.
+ *
+ * @example GET
+ * @example POST
+ * @example HEAD
+ */
+ public const HTTP_REQUEST_METHOD = 'http.request.method';
+
+ /**
+ * HTTP response status code.
+ *
+ * @example 200
+ */
+ public const HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';
+
+ /**
+ * OSI application layer or non-OSI equivalent.
+ *
+ * The value SHOULD be normalized to lowercase.
+ *
+ * @example http
+ * @example spdy
+ */
+ public const NETWORK_PROTOCOL_NAME = 'network.protocol.name';
+
+ /**
+ * Version of the protocol specified in `network.protocol.name`.
+ *
+ * `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
+ *
+ * @example 1.0
+ * @example 1.1
+ * @example 2
+ * @example 3
+ */
+ public const NETWORK_PROTOCOL_VERSION = 'network.protocol.version';
+
+ /**
+ * Host identifier of the &quot;URI origin&quot; HTTP request is sent to.
+ *
+ * Determined by using the first of the following that applies<ul>
+ * <li>Host identifier of the request target
+ * if it's sent in absolute-form</li>
+ * <li>Host identifier of the `Host` header</li>
+ * </ul>
+ * If an HTTP client request is explicitly made to an IP address, e.g. `http://x.x.x.x:8080`, then
+ * `server.address` SHOULD be the IP address `x.x.x.x`. A DNS lookup SHOULD NOT be used.
+ *
+ * @example example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const SERVER_ADDRESS = 'server.address';
+
+ /**
+ * Port identifier of the &quot;URI origin&quot; HTTP request is sent to.
+ *
+ * When request target is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.
+ *
+ * @example 80
+ * @example 8080
+ * @example 443
+ */
+ public const SERVER_PORT = 'server.port';
+
+ /**
+ * The matched route (path template in the format used by the respective server framework). See note below.
+ *
+ * MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
+ * SHOULD include the application root if there is one.
+ *
+ * @example /users/:userID?
+ * @example {controller}/{action}/{id?}
+ */
+ public const HTTP_ROUTE = 'http.route';
+
+ /**
+ * The URI scheme component identifying the used protocol.
+ *
+ * @example http
+ * @example https
+ */
+ public const URL_SCHEME = 'url.scheme';
+
+ /**
+ * The domain identifies the business context for the events.
+ *
+ * Events across different domains may have same `event.name`, yet be
+ * unrelated events.
+ */
+ public const EVENT_DOMAIN = 'event.domain';
+
+ /**
+ * The name identifies the event.
+ *
+ * @example click
+ * @example exception
+ */
+ public const EVENT_NAME = 'event.name';
+
+ /**
+ * A unique identifier for the Log Record.
+ *
+ * If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values.
+ * The id MAY be an Universally Unique Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. UUID) may be used as needed.
+ *
+ * @example 01ARZ3NDEKTSV4RRFFQ69G5FAV
+ */
+ public const LOG_RECORD_UID = 'log.record.uid';
+
+ /**
+ * The unique identifier of the feature flag.
+ *
+ * @example logo-color
+ */
+ public const FEATURE_FLAG_KEY = 'feature_flag.key';
+
+ /**
+ * The name of the service provider that performs the flag evaluation.
+ *
+ * @example Flag Manager
+ */
+ public const FEATURE_FLAG_PROVIDER_NAME = 'feature_flag.provider_name';
+
+ /**
+ * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used.
+ *
+ * A semantic identifier, commonly referred to as a variant, provides a means
+ * for referring to a value without including the value itself. This can
+ * provide additional context for understanding the meaning behind a value.
+ * For example, the variant `red` maybe be used for the value `#c05543`.A stringified version of the value can be used in situations where a
+ * semantic identifier is unavailable. String representation of the value
+ * should be determined by the implementer.
+ *
+ * @example red
+ * @example true
+ * @example on
+ */
+ public const FEATURE_FLAG_VARIANT = 'feature_flag.variant';
+
+ /**
+ * The stream associated with the log. See below for a list of well-known values.
+ */
+ public const LOG_IOSTREAM = 'log.iostream';
+
+ /**
+ * The basename of the file.
+ *
+ * @example audit.log
+ */
+ public const LOG_FILE_NAME = 'log.file.name';
+
+ /**
+ * The basename of the file, with symlinks resolved.
+ *
+ * @example uuid.log
+ */
+ public const LOG_FILE_NAME_RESOLVED = 'log.file.name_resolved';
+
+ /**
+ * The full path to the file.
+ *
+ * @example /var/log/mysql/audit.log
+ */
+ public const LOG_FILE_PATH = 'log.file.path';
+
+ /**
+ * The full path to the file, with symlinks resolved.
+ *
+ * @example /var/lib/docker/uuid.log
+ */
+ public const LOG_FILE_PATH_RESOLVED = 'log.file.path_resolved';
+
+ /**
+ * The name of the connection pool; unique within the instrumented application. In case the connection pool implementation does not provide a name, then the db.connection_string should be used.
+ *
+ * @example myDataSource
+ */
+ public const POOL_NAME = 'pool.name';
+
+ /**
+ * The state of a connection in the pool.
+ *
+ * @example idle
+ */
+ public const STATE = 'state';
+
+ /**
+ * Name of the buffer pool.
+ *
+ * Pool names are generally obtained via BufferPoolMXBean#getName().
+ *
+ * @example mapped
+ * @example direct
+ */
+ public const JVM_BUFFER_POOL_NAME = 'jvm.buffer.pool.name';
+
+ /**
+ * Name of the memory pool.
+ *
+ * Pool names are generally obtained via MemoryPoolMXBean#getName().
+ *
+ * @example G1 Old Gen
+ * @example G1 Eden space
+ * @example G1 Survivor Space
+ */
+ public const JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name';
+
+ /**
+ * The type of memory.
+ *
+ * @example heap
+ * @example non_heap
+ */
+ public const JVM_MEMORY_TYPE = 'jvm.memory.type';
+
+ /**
+ * OSI transport layer or inter-process communication method.
+ *
+ * The value SHOULD be normalized to lowercase.Consider always setting the transport when setting a port number, since
+ * a port number is ambiguous without knowing the transport, for example
+ * different processes could be listening on TCP port 12345 and UDP port 12345.
+ *
+ * @example tcp
+ * @example udp
+ */
+ public const NETWORK_TRANSPORT = 'network.transport';
+
+ /**
+ * OSI network layer or non-OSI equivalent.
+ *
+ * The value SHOULD be normalized to lowercase.
+ *
+ * @example ipv4
+ * @example ipv6
+ */
+ public const NETWORK_TYPE = 'network.type';
+
+ /**
+ * The name of the (logical) method being called, must be equal to the $method part in the span name.
+ *
+ * This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).
+ *
+ * @example exampleMethod
+ */
+ public const RPC_METHOD = 'rpc.method';
+
+ /**
+ * The full (logical) name of the service being called, including its package name, if applicable.
+ *
+ * This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).
+ *
+ * @example myservice.EchoService
+ */
+ public const RPC_SERVICE = 'rpc.service';
+
+ /**
+ * A string identifying the remoting system. See below for a list of well-known identifiers.
+ */
+ public const RPC_SYSTEM = 'rpc.system';
+
+ /**
+ * The device identifier.
+ *
+ * @example (identifier)
+ */
+ public const SYSTEM_DEVICE = 'system.device';
+
+ /**
+ * The logical CPU number [0..n-1].
+ *
+ * @example 1
+ */
+ public const SYSTEM_CPU_LOGICAL_NUMBER = 'system.cpu.logical_number';
+
+ /**
+ * The state of the CPU.
+ *
+ * @example idle
+ * @example interrupt
+ */
+ public const SYSTEM_CPU_STATE = 'system.cpu.state';
+
+ /**
+ * The memory state.
+ *
+ * @example free
+ * @example cached
+ */
+ public const SYSTEM_MEMORY_STATE = 'system.memory.state';
+
+ /**
+ * The paging access direction.
+ *
+ * @example in
+ */
+ public const SYSTEM_PAGING_DIRECTION = 'system.paging.direction';
+
+ /**
+ * The memory paging state.
+ *
+ * @example free
+ */
+ public const SYSTEM_PAGING_STATE = 'system.paging.state';
+
+ /**
+ * The memory paging type.
+ *
+ * @example minor
+ */
+ public const SYSTEM_PAGING_TYPE = 'system.paging.type';
+
+ /**
+ * The disk operation direction.
+ *
+ * @example read
+ */
+ public const SYSTEM_DISK_DIRECTION = 'system.disk.direction';
+
+ /**
+ * The filesystem mode.
+ *
+ * @example rw, ro
+ */
+ public const SYSTEM_FILESYSTEM_MODE = 'system.filesystem.mode';
+
+ /**
+ * The filesystem mount path.
+ *
+ * @example /mnt/data
+ */
+ public const SYSTEM_FILESYSTEM_MOUNTPOINT = 'system.filesystem.mountpoint';
+
+ /**
+ * The filesystem state.
+ *
+ * @example used
+ */
+ public const SYSTEM_FILESYSTEM_STATE = 'system.filesystem.state';
+
+ /**
+ * The filesystem type.
+ *
+ * @example ext4
+ */
+ public const SYSTEM_FILESYSTEM_TYPE = 'system.filesystem.type';
+
+ /**
+ * .
+ *
+ * @example transmit
+ */
+ public const SYSTEM_NETWORK_DIRECTION = 'system.network.direction';
+
+ /**
+ * A stateless protocol MUST NOT set this attribute.
+ *
+ * @example close_wait
+ */
+ public const SYSTEM_NETWORK_STATE = 'system.network.state';
+
+ /**
+ * The process state, e.g., Linux Process State Codes.
+ *
+ * @example running
+ */
+ public const SYSTEM_PROCESSES_STATUS = 'system.processes.status';
+
+ /**
+ * Local address of the network connection - IP address or Unix domain socket name.
+ *
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const NETWORK_LOCAL_ADDRESS = 'network.local.address';
+
+ /**
+ * Local port number of the network connection.
+ *
+ * @example 65123
+ */
+ public const NETWORK_LOCAL_PORT = 'network.local.port';
+
+ /**
+ * Peer address of the network connection - IP address or Unix domain socket name.
+ *
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const NETWORK_PEER_ADDRESS = 'network.peer.address';
+
+ /**
+ * Peer port number of the network connection.
+ *
+ * @example 65123
+ */
+ public const NETWORK_PEER_PORT = 'network.peer.port';
+
+ /**
+ * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.
+ *
+ * @example DE
+ */
+ public const NETWORK_CARRIER_ICC = 'network.carrier.icc';
+
+ /**
+ * The mobile carrier country code.
+ *
+ * @example 310
+ */
+ public const NETWORK_CARRIER_MCC = 'network.carrier.mcc';
+
+ /**
+ * The mobile carrier network code.
+ *
+ * @example 001
+ */
+ public const NETWORK_CARRIER_MNC = 'network.carrier.mnc';
+
+ /**
+ * The name of the mobile carrier.
+ *
+ * @example sprint
+ */
+ public const NETWORK_CARRIER_NAME = 'network.carrier.name';
+
+ /**
+ * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.
+ *
+ * @example LTE
+ */
+ public const NETWORK_CONNECTION_SUBTYPE = 'network.connection.subtype';
+
+ /**
+ * The internet connection type.
+ *
+ * @example wifi
+ */
+ public const NETWORK_CONNECTION_TYPE = 'network.connection.type';
+
+ /**
+ * Deprecated, use `http.request.method` instead.
+ *
+ * @deprecated Deprecated, use `http.request.method` instead..
+ * @example GET
+ * @example POST
+ * @example HEAD
+ */
+ public const HTTP_METHOD = 'http.method';
+
+ /**
+ * Deprecated, use `http.request.body.size` instead.
+ *
+ * @deprecated Deprecated, use `http.request.body.size` instead..
+ * @example 3495
+ */
+ public const HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';
+
+ /**
+ * Deprecated, use `http.response.body.size` instead.
+ *
+ * @deprecated Deprecated, use `http.response.body.size` instead..
+ * @example 3495
+ */
+ public const HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';
+
+ /**
+ * Deprecated, use `url.scheme` instead.
+ *
+ * @deprecated Deprecated, use `url.scheme` instead..
+ * @example http
+ * @example https
+ */
+ public const HTTP_SCHEME = 'http.scheme';
+
+ /**
+ * Deprecated, use `http.response.status_code` instead.
+ *
+ * @deprecated Deprecated, use `http.response.status_code` instead..
+ * @example 200
+ */
+ public const HTTP_STATUS_CODE = 'http.status_code';
+
+ /**
+ * Deprecated, use `url.path` and `url.query` instead.
+ *
+ * @deprecated Deprecated, use `url.path` and `url.query` instead..
+ * @example /search?q=OpenTelemetry#SemConv
+ */
+ public const HTTP_TARGET = 'http.target';
+
+ /**
+ * Deprecated, use `url.full` instead.
+ *
+ * @deprecated Deprecated, use `url.full` instead..
+ * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv
+ */
+ public const HTTP_URL = 'http.url';
+
+ /**
+ * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
+ *
+ * @example 3495
+ */
+ public const HTTP_REQUEST_BODY_SIZE = 'http.request.body.size';
+
+ /**
+ * Original HTTP method sent by the client in the request line.
+ *
+ * @example GeT
+ * @example ACL
+ * @example foo
+ */
+ public const HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original';
+
+ /**
+ * The ordinal number of request resending attempt (for any reason, including redirects).
+ *
+ * The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).
+ *
+ * @example 3
+ */
+ public const HTTP_RESEND_COUNT = 'http.resend_count';
+
+ /**
+ * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
+ *
+ * @example 3495
+ */
+ public const HTTP_RESPONSE_BODY_SIZE = 'http.response.body.size';
+
+ /**
+ * A unique id to identify a session.
+ *
+ * @example 00112233-4455-6677-8899-aabbccddeeff
+ */
+ public const SESSION_ID = 'session.id';
+
+ /**
+ * Source address - domain name if available without reverse DNS lookup, otherwise IP address or Unix domain socket name.
+ *
+ * When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries (e.g. proxies) if it's available.
+ *
+ * @example source.example.com
+ * @example 10.1.2.80
+ * @example /tmp/my.sock
+ */
+ public const SOURCE_ADDRESS = 'source.address';
+
+ /**
+ * Source port number.
+ *
+ * @example 3389
+ * @example 2888
+ */
+ public const SOURCE_PORT = 'source.port';
+
+ /**
+ * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).
+ *
+ * This may be different from `cloud.resource_id` if an alias is involved.
+ *
+ * @example arn:aws:lambda:us-east-1:123456:function:myfunction:myalias
+ */
+ public const AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';
+
+ /**
+ * The event_id uniquely identifies the event.
+ *
+ * @example 123e4567-e89b-12d3-a456-426614174000
+ * @example 0001
+ */
+ public const CLOUDEVENTS_EVENT_ID = 'cloudevents.event_id';
+
+ /**
+ * The source identifies the context in which an event happened.
+ *
+ * @example https://github.com/cloudevents
+ * @example /cloudevents/spec/pull/123
+ * @example my-service
+ */
+ public const CLOUDEVENTS_EVENT_SOURCE = 'cloudevents.event_source';
+
+ /**
+ * The version of the CloudEvents specification which the event uses.
+ *
+ * @example 1.0
+ */
+ public const CLOUDEVENTS_EVENT_SPEC_VERSION = 'cloudevents.event_spec_version';
+
+ /**
+ * The subject of the event in the context of the event producer (identified by source).
+ *
+ * @example mynewfile.jpg
+ */
+ public const CLOUDEVENTS_EVENT_SUBJECT = 'cloudevents.event_subject';
+
+ /**
+ * The event_type contains a value describing the type of event related to the originating occurrence.
+ *
+ * @example com.github.pull_request.opened
+ * @example com.example.object.deleted.v2
+ */
+ public const CLOUDEVENTS_EVENT_TYPE = 'cloudevents.event_type';
+
+ /**
+ * Parent-child Reference type.
+ *
+ * The causal relationship between a child Span and a parent Span.
+ */
+ public const OPENTRACING_REF_TYPE = 'opentracing.ref_type';
+
+ /**
+ * The connection string used to connect to the database. It is recommended to remove embedded credentials.
+ *
+ * @example Server=(localdb)\v11.0;Integrated Security=true;
+ */
+ public const DB_CONNECTION_STRING = 'db.connection_string';
+
+ /**
+ * The fully-qualified class name of the Java Database Connectivity (JDBC) driver used to connect.
+ *
+ * @example org.postgresql.Driver
+ * @example com.microsoft.sqlserver.jdbc.SQLServerDriver
+ */
+ public const DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';
+
+ /**
+ * This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).
+ *
+ * In some SQL databases, the database name to be used is called &quot;schema name&quot;. In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).
+ *
+ * @example customers
+ * @example main
+ */
+ public const DB_NAME = 'db.name';
+
+ /**
+ * The name of the operation being executed, e.g. the MongoDB command name such as `findAndModify`, or the SQL keyword.
+ *
+ * When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.
+ *
+ * @example findAndModify
+ * @example HMSET
+ * @example SELECT
+ */
+ public const DB_OPERATION = 'db.operation';
+
+ /**
+ * The database statement being executed.
+ *
+ * @example SELECT * FROM wuser_table
+ * @example SET mykey "WuValue"
+ */
+ public const DB_STATEMENT = 'db.statement';
+
+ /**
+ * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.
+ */
+ public const DB_SYSTEM = 'db.system';
+
+ /**
+ * Username for accessing the database.
+ *
+ * @example readonly_user
+ * @example reporting_user
+ */
+ public const DB_USER = 'db.user';
+
+ /**
+ * The Microsoft SQL Server instance name connecting to. This name is used to determine the port of a named instance.
+ *
+ * If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard).
+ *
+ * @example MSSQLSERVER
+ */
+ public const DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';
+
+ /**
+ * The consistency level of the query. Based on consistency values from CQL.
+ */
+ public const DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';
+
+ /**
+ * The data center of the coordinating node for a query.
+ *
+ * @example us-west-2
+ */
+ public const DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';
+
+ /**
+ * The ID of the coordinating node for a query.
+ *
+ * @example be13faa2-8574-4d71-926d-27f16cf8a7af
+ */
+ public const DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';
+
+ /**
+ * Whether or not the query is idempotent.
+ */
+ public const DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';
+
+ /**
+ * The fetch size used for paging, i.e. how many rows will be returned at once.
+ *
+ * @example 5000
+ */
+ public const DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';
+
+ /**
+ * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.
+ *
+ * @example 2
+ */
+ public const DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';
+
+ /**
+ * The name of the primary table that the operation is acting upon, including the keyspace name (if applicable).
+ *
+ * This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
+ *
+ * @example mytable
+ */
+ public const DB_CASSANDRA_TABLE = 'db.cassandra.table';
+
+ /**
+ * The index of the database being accessed as used in the `SELECT` command, provided as an integer. To be used instead of the generic `db.name` attribute.
+ *
+ * @example 1
+ * @example 15
+ */
+ public const DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';
+
+ /**
+ * The collection being accessed within the database stated in `db.name`.
+ *
+ * @example customers
+ * @example products
+ */
+ public const DB_MONGODB_COLLECTION = 'db.mongodb.collection';
+
+ /**
+ * Represents the identifier of an Elasticsearch cluster.
+ *
+ * @example e9106fc68e3044f0b1475b04bf4ffd5f
+ */
+ public const DB_ELASTICSEARCH_CLUSTER_NAME = 'db.elasticsearch.cluster.name';
+
+ /**
+ * Represents the human-readable identifier of the node/instance to which a request was routed.
+ *
+ * @example instance-0000000001
+ */
+ public const DB_ELASTICSEARCH_NODE_NAME = 'db.elasticsearch.node.name';
+
+ /**
+ * Absolute URL describing a network resource according to RFC3986.
+ *
+ * For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.
+ * `url.full` MUST NOT contain credentials passed via URL in form of `https://username:[email protected]/`. In such case username and password should be redacted and attribute's value should be `https://REDACTED:[email protected]/`.
+ * `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes.
+ *
+ * @example https://localhost:9200/index/_search?q=user.id:kimchy
+ */
+ public const URL_FULL = 'url.full';
+
+ /**
+ * The name of the primary table that the operation is acting upon, including the database name (if applicable).
+ *
+ * It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.
+ *
+ * @example public.users
+ * @example customers
+ */
+ public const DB_SQL_TABLE = 'db.sql.table';
+
+ /**
+ * Unique Cosmos client instance id.
+ *
+ * @example 3ba4827d-4422-483f-b59f-85b74211c11d
+ */
+ public const DB_COSMOSDB_CLIENT_ID = 'db.cosmosdb.client_id';
+
+ /**
+ * Cosmos client connection mode.
+ */
+ public const DB_COSMOSDB_CONNECTION_MODE = 'db.cosmosdb.connection_mode';
+
+ /**
+ * Cosmos DB container name.
+ *
+ * @example anystring
+ */
+ public const DB_COSMOSDB_CONTAINER = 'db.cosmosdb.container';
+
+ /**
+ * CosmosDB Operation Type.
+ */
+ public const DB_COSMOSDB_OPERATION_TYPE = 'db.cosmosdb.operation_type';
+
+ /**
+ * RU consumed for that operation.
+ *
+ * @example 46.18
+ * @example 1.0
+ */
+ public const DB_COSMOSDB_REQUEST_CHARGE = 'db.cosmosdb.request_charge';
+
+ /**
+ * Request payload size in bytes.
+ */
+ public const DB_COSMOSDB_REQUEST_CONTENT_LENGTH = 'db.cosmosdb.request_content_length';
+
+ /**
+ * Cosmos DB status code.
+ *
+ * @example 200
+ * @example 201
+ */
+ public const DB_COSMOSDB_STATUS_CODE = 'db.cosmosdb.status_code';
+
+ /**
+ * Cosmos DB sub status code.
+ *
+ * @example 1000
+ * @example 1002
+ */
+ public const DB_COSMOSDB_SUB_STATUS_CODE = 'db.cosmosdb.sub_status_code';
+
+ /**
+ * Full user-agent string is generated by Cosmos DB SDK.
+ *
+ * The user-agent value is generated by SDK which is a combination of&lt;br&gt; `sdk_version` : Current version of SDK. e.g. 'cosmos-netstandard-sdk/3.23.0'&lt;br&gt; `direct_pkg_version` : Direct package version used by Cosmos DB SDK. e.g. '3.23.1'&lt;br&gt; `number_of_client_instances` : Number of cosmos client instances created by the application. e.g. '1'&lt;br&gt; `type_of_machine_architecture` : Machine architecture. e.g. 'X64'&lt;br&gt; `operating_system` : Operating System. e.g. 'Linux 5.4.0-1098-azure 104 18'&lt;br&gt; `runtime_framework` : Runtime Framework. e.g. '.NET Core 3.1.32'&lt;br&gt; `failover_information` : Generated key to determine if region failover enabled.
+ * Format Reg-{D (Disabled discovery)}-S(application region)|L(List of preferred regions)|N(None, user did not configure it).
+ * Default value is &quot;NS&quot;.
+ *
+ * @example cosmos-netstandard-sdk/3.23.0\|3.23.1\|1\|X64\|Linux 5.4.0-1098-azure 104 18\|.NET Core 3.1.32\|S\|
+ */
+ public const USER_AGENT_ORIGINAL = 'user_agent.original';
+
+ /**
+ * Name of the code, either &quot;OK&quot; or &quot;ERROR&quot;. MUST NOT be set if the status code is UNSET.
+ */
+ public const OTEL_STATUS_CODE = 'otel.status_code';
+
+ /**
+ * Description of the Status if it has a value, otherwise not set.
+ *
+ * @example resource not found
+ */
+ public const OTEL_STATUS_DESCRIPTION = 'otel.status_description';
+
+ /**
+ * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on GCP).
+ *
+ * On some cloud providers, it may not be possible to determine the full ID at startup,
+ * so it may be necessary to set `cloud.resource_id` as a span attribute instead.The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ * The following well-known definitions MUST be used if you set this attribute and they apply:<ul>
+ * <li><strong>AWS Lambda:</strong> The function ARN.
+ * Take care not to use the &quot;invoked ARN&quot; directly but replace any
+ * alias suffix
+ * with the resolved function version, as the same runtime instance may be invokable with
+ * multiple different aliases.</li>
+ * <li><strong>GCP:</strong> The URI of the resource</li>
+ * <li><strong>Azure:</strong> The Fully Qualified Resource ID of the invoked function,
+ * <em>not</em> the function app, having the form
+ * `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
+ * This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share
+ * a TracerProvider.</li>
+ * </ul>
+ *
+ * @example arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function
+ * @example //run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID
+ * @example /subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>
+ */
+ public const CLOUD_RESOURCE_ID = 'cloud.resource_id';
+
+ /**
+ * The invocation ID of the current function invocation.
+ *
+ * @example af9d5aa4-a685-4c5f-a22b-444f80b3cc28
+ */
+ public const FAAS_INVOCATION_ID = 'faas.invocation_id';
+
+ /**
+ * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.
+ *
+ * @example myBucketName
+ * @example myDbName
+ */
+ public const FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';
+
+ /**
+ * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.
+ *
+ * @example myFile.txt
+ * @example myTableName
+ */
+ public const FAAS_DOCUMENT_NAME = 'faas.document.name';
+
+ /**
+ * Describes the type of the operation that was performed on the data.
+ */
+ public const FAAS_DOCUMENT_OPERATION = 'faas.document.operation';
+
+ /**
+ * A string containing the time when the data was accessed in the ISO 8601 format expressed in UTC.
+ *
+ * @example 2020-01-23T13:47:06Z
+ */
+ public const FAAS_DOCUMENT_TIME = 'faas.document.time';
+
+ /**
+ * The URI path component.
+ *
+ * When missing, the value is assumed to be `/`
+ *
+ * @example /search
+ */
+ public const URL_PATH = 'url.path';
+
+ /**
+ * The URI query component.
+ *
+ * Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it.
+ *
+ * @example q=OpenTelemetry
+ */
+ public const URL_QUERY = 'url.query';
+
+ /**
+ * The number of messages sent, received, or processed in the scope of the batching operation.
+ *
+ * Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.
+ *
+ * @example 1
+ * @example 2
+ */
+ public const MESSAGING_BATCH_MESSAGE_COUNT = 'messaging.batch.message_count';
+
+ /**
+ * A unique identifier for the client that consumes or produces a message.
+ *
+ * @example client-5
+ * @example myhost@8742@s8083jm
+ */
+ public const MESSAGING_CLIENT_ID = 'messaging.client_id';
+
+ /**
+ * A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).
+ */
+ public const MESSAGING_DESTINATION_ANONYMOUS = 'messaging.destination.anonymous';
+
+ /**
+ * The message destination name.
+ *
+ * Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If
+ * the broker does not have such notion, the destination name SHOULD uniquely identify the broker.
+ *
+ * @example MyQueue
+ * @example MyTopic
+ */
+ public const MESSAGING_DESTINATION_NAME = 'messaging.destination.name';
+
+ /**
+ * Low cardinality representation of the messaging destination name.
+ *
+ * Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.
+ *
+ * @example /customers/{customerId}
+ */
+ public const MESSAGING_DESTINATION_TEMPLATE = 'messaging.destination.template';
+
+ /**
+ * A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.
+ */
+ public const MESSAGING_DESTINATION_TEMPORARY = 'messaging.destination.temporary';
+
+ /**
+ * The size of the message body in bytes.
+ *
+ * This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed
+ * body size should be used.
+ *
+ * @example 1439
+ */
+ public const MESSAGING_MESSAGE_BODY_SIZE = 'messaging.message.body.size';
+
+ /**
+ * The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called &quot;Correlation ID&quot;.
+ *
+ * @example MyConversationId
+ */
+ public const MESSAGING_MESSAGE_CONVERSATION_ID = 'messaging.message.conversation_id';
+
+ /**
+ * The size of the message body and metadata in bytes.
+ *
+ * This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed
+ * size should be used.
+ *
+ * @example 2738
+ */
+ public const MESSAGING_MESSAGE_ENVELOPE_SIZE = 'messaging.message.envelope.size';
+
+ /**
+ * A value used by the messaging system as an identifier for the message, represented as a string.
+ *
+ * @example 452a7c7c7c7048c2f887f61572b18fc2
+ */
+ public const MESSAGING_MESSAGE_ID = 'messaging.message.id';
+
+ /**
+ * A string identifying the kind of messaging operation as defined in the Operation names section above.
+ *
+ * If a custom value is used, it MUST be of low cardinality.
+ */
+ public const MESSAGING_OPERATION = 'messaging.operation';
+
+ /**
+ * A string identifying the messaging system.
+ *
+ * @example kafka
+ * @example rabbitmq
+ * @example rocketmq
+ * @example activemq
+ * @example AmazonSQS
+ */
+ public const MESSAGING_SYSTEM = 'messaging.system';
+
+ /**
+ * A string containing the schedule period as Cron Expression.
+ *
+ * @example 0/5 * * * ? *
+ */
+ public const FAAS_CRON = 'faas.cron';
+
+ /**
+ * A string containing the function invocation time in the ISO 8601 format expressed in UTC.
+ *
+ * @example 2020-01-23T13:47:06Z
+ */
+ public const FAAS_TIME = 'faas.time';
+
+ /**
+ * A boolean that is true if the serverless function is executed for the first time (aka cold-start).
+ */
+ public const FAAS_COLDSTART = 'faas.coldstart';
+
+ /**
+ * The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
+ *
+ * @example 79b9da39-b7ae-508a-a6bc-864b2829c622
+ * @example C9ER4AJX75574TDJ
+ */
+ public const AWS_REQUEST_ID = 'aws.request_id';
+
+ /**
+ * The value of the `AttributesToGet` request parameter.
+ *
+ * @example lives
+ * @example id
+ */
+ public const AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';
+
+ /**
+ * The value of the `ConsistentRead` request parameter.
+ */
+ public const AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';
+
+ /**
+ * The JSON-serialized value of each item in the `ConsumedCapacity` response field.
+ *
+ * @example { "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": "string", "WriteCapacityUnits": number }
+ */
+ public const AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';
+
+ /**
+ * The value of the `IndexName` request parameter.
+ *
+ * @example name_to_group
+ */
+ public const AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';
+
+ /**
+ * The JSON-serialized value of the `ItemCollectionMetrics` response field.
+ *
+ * @example { "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }
+ */
+ public const AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';
+
+ /**
+ * The value of the `Limit` request parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';
+
+ /**
+ * The value of the `ProjectionExpression` request parameter.
+ *
+ * @example Title
+ * @example Title, Price, Color
+ * @example Title, Description, RelatedItems, ProductReviews
+ */
+ public const AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';
+
+ /**
+ * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+ *
+ * @example 1.0
+ * @example 2.0
+ */
+ public const AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';
+
+ /**
+ * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+ *
+ * @example 1.0
+ * @example 2.0
+ */
+ public const AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';
+
+ /**
+ * The value of the `Select` request parameter.
+ *
+ * @example ALL_ATTRIBUTES
+ * @example COUNT
+ */
+ public const AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';
+
+ /**
+ * The keys in the `RequestItems` object field.
+ *
+ * @example Users
+ * @example Cats
+ */
+ public const AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';
+
+ /**
+ * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.
+ *
+ * @example { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
+ */
+ public const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';
+
+ /**
+ * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.
+ *
+ * @example { "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }
+ */
+ public const AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';
+
+ /**
+ * The value of the `ExclusiveStartTableName` request parameter.
+ *
+ * @example Users
+ * @example CatsTable
+ */
+ public const AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';
+
+ /**
+ * The the number of items in the `TableNames` response parameter.
+ *
+ * @example 20
+ */
+ public const AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';
+
+ /**
+ * The value of the `ScanIndexForward` request parameter.
+ */
+ public const AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';
+
+ /**
+ * The value of the `Count` response parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';
+
+ /**
+ * The value of the `ScannedCount` response parameter.
+ *
+ * @example 50
+ */
+ public const AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';
+
+ /**
+ * The value of the `Segment` request parameter.
+ *
+ * @example 10
+ */
+ public const AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';
+
+ /**
+ * The value of the `TotalSegments` request parameter.
+ *
+ * @example 100
+ */
+ public const AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';
+
+ /**
+ * The JSON-serialized value of each item in the `AttributeDefinitions` request field.
+ *
+ * @example { "AttributeName": "string", "AttributeType": "string" }
+ */
+ public const AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';
+
+ /**
+ * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.
+ *
+ * @example { "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }
+ */
+ public const AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';
+
+ /**
+ * The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the S3 API operations.
+ *
+ * The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.
+ * This applies to almost all S3 operations except `list-buckets`.
+ *
+ * @example some-bucket-name
+ */
+ public const AWS_S3_BUCKET = 'aws.s3.bucket';
+
+ /**
+ * The source object (in the form `bucket`/`key`) for the copy operation.
+ *
+ * The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter
+ * of the copy-object operation within the S3 API.
+ * This applies in particular to the following operations:<ul>
+ * <li>copy-object</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example someFile.yml
+ */
+ public const AWS_S3_COPY_SOURCE = 'aws.s3.copy_source';
+
+ /**
+ * The delete request container that specifies the objects to be deleted.
+ *
+ * The `delete` attribute is only applicable to the delete-object operation.
+ * The `delete` attribute corresponds to the `--delete` parameter of the
+ * delete-objects operation within the S3 API.
+ *
+ * @example Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean
+ */
+ public const AWS_S3_DELETE = 'aws.s3.delete';
+
+ /**
+ * The S3 object key the request refers to. Corresponds to the `--key` parameter of the S3 API operations.
+ *
+ * The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter.
+ * This applies in particular to the following operations:<ul>
+ * <li>copy-object</li>
+ * <li>delete-object</li>
+ * <li>get-object</li>
+ * <li>head-object</li>
+ * <li>put-object</li>
+ * <li>restore-object</li>
+ * <li>select-object-content</li>
+ * <li>abort-multipart-upload</li>
+ * <li>complete-multipart-upload</li>
+ * <li>create-multipart-upload</li>
+ * <li>list-parts</li>
+ * <li>upload-part</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example someFile.yml
+ */
+ public const AWS_S3_KEY = 'aws.s3.key';
+
+ /**
+ * The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.
+ *
+ * The `part_number` attribute is only applicable to the upload-part
+ * and upload-part-copy operations.
+ * The `part_number` attribute corresponds to the `--part-number` parameter of the
+ * upload-part operation within the S3 API.
+ *
+ * @example 3456
+ */
+ public const AWS_S3_PART_NUMBER = 'aws.s3.part_number';
+
+ /**
+ * Upload ID that identifies the multipart upload.
+ *
+ * The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter
+ * of the S3 API multipart operations.
+ * This applies in particular to the following operations:<ul>
+ * <li>abort-multipart-upload</li>
+ * <li>complete-multipart-upload</li>
+ * <li>list-parts</li>
+ * <li>upload-part</li>
+ * <li>upload-part-copy</li>
+ * </ul>
+ *
+ * @example dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ
+ */
+ public const AWS_S3_UPLOAD_ID = 'aws.s3.upload_id';
+
+ /**
+ * The GraphQL document being executed.
+ *
+ * The value may be sanitized to exclude sensitive information.
+ *
+ * @example query findBookById { bookById(id: ?) { name } }
+ */
+ public const GRAPHQL_DOCUMENT = 'graphql.document';
+
+ /**
+ * The name of the operation being executed.
+ *
+ * @example findBookById
+ */
+ public const GRAPHQL_OPERATION_NAME = 'graphql.operation.name';
+
+ /**
+ * The type of the operation being executed.
+ *
+ * @example query
+ * @example mutation
+ * @example subscription
+ */
+ public const GRAPHQL_OPERATION_TYPE = 'graphql.operation.type';
+
+ /**
+ * A boolean that is true if the publish message destination is anonymous (could be unnamed or have auto-generated name).
+ */
+ public const MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = 'messaging.destination_publish.anonymous';
+
+ /**
+ * The name of the original destination the message was published to.
+ *
+ * The name SHOULD uniquely identify a specific queue, topic, or other entity within the broker. If
+ * the broker does not have such notion, the original destination name SHOULD uniquely identify the broker.
+ *
+ * @example MyQueue
+ * @example MyTopic
+ */
+ public const MESSAGING_DESTINATION_PUBLISH_NAME = 'messaging.destination_publish.name';
+
+ /**
+ * RabbitMQ message routing key.
+ *
+ * @example myKey
+ */
+ public const MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = 'messaging.rabbitmq.destination.routing_key';
+
+ /**
+ * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.
+ *
+ * @example my-group
+ */
+ public const MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer.group';
+
+ /**
+ * Partition the message is sent to.
+ *
+ * @example 2
+ */
+ public const MESSAGING_KAFKA_DESTINATION_PARTITION = 'messaging.kafka.destination.partition';
+
+ /**
+ * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.
+ *
+ * If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
+ *
+ * @example myKey
+ */
+ public const MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message.key';
+
+ /**
+ * The offset of a record in the corresponding Kafka partition.
+ *
+ * @example 42
+ */
+ public const MESSAGING_KAFKA_MESSAGE_OFFSET = 'messaging.kafka.message.offset';
+
+ /**
+ * A boolean that is true if the message is a tombstone.
+ */
+ public const MESSAGING_KAFKA_MESSAGE_TOMBSTONE = 'messaging.kafka.message.tombstone';
+
+ /**
+ * Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind.
+ *
+ * @example myConsumerGroup
+ */
+ public const MESSAGING_ROCKETMQ_CLIENT_GROUP = 'messaging.rocketmq.client_group';
+
+ /**
+ * Model of message consumption. This only applies to consumer spans.
+ */
+ public const MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = 'messaging.rocketmq.consumption_model';
+
+ /**
+ * The delay time level for delay message, which determines the message delay time.
+ *
+ * @example 3
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = 'messaging.rocketmq.message.delay_time_level';
+
+ /**
+ * The timestamp in milliseconds that the delay message is expected to be delivered to consumer.
+ *
+ * @example 1665987217045
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = 'messaging.rocketmq.message.delivery_timestamp';
+
+ /**
+ * It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group.
+ *
+ * @example myMessageGroup
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_GROUP = 'messaging.rocketmq.message.group';
+
+ /**
+ * Key(s) of message, another way to mark message besides message id.
+ *
+ * @example keyA
+ * @example keyB
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_KEYS = 'messaging.rocketmq.message.keys';
+
+ /**
+ * The secondary classifier of message besides topic.
+ *
+ * @example tagA
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_TAG = 'messaging.rocketmq.message.tag';
+
+ /**
+ * Type of message.
+ */
+ public const MESSAGING_ROCKETMQ_MESSAGE_TYPE = 'messaging.rocketmq.message.type';
+
+ /**
+ * Namespace of RocketMQ resources, resources in different namespaces are individual.
+ *
+ * @example myNamespace
+ */
+ public const MESSAGING_ROCKETMQ_NAMESPACE = 'messaging.rocketmq.namespace';
+
+ /**
+ * The numeric status code of the gRPC request.
+ */
+ public const RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';
+
+ /**
+ * `error.code` property of response if it is an error response.
+ *
+ * @example -32700
+ * @example 100
+ */
+ public const RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';
+
+ /**
+ * `error.message` property of response if it is an error response.
+ *
+ * @example Parse error
+ * @example User already exists
+ */
+ public const RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';
+
+ /**
+ * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.
+ *
+ * @example 10
+ * @example request-7
+ */
+ public const RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';
+
+ /**
+ * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.
+ *
+ * @example 2.0
+ * @example 1.0
+ */
+ public const RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';
+
+ /**
+ * Compressed size of the message in bytes.
+ */
+ public const MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';
+
+ /**
+ * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.
+ *
+ * This way we guarantee that the values will be consistent between different implementations.
+ */
+ public const MESSAGE_ID = 'message.id';
+
+ /**
+ * Whether this is a received or sent message.
+ */
+ public const MESSAGE_TYPE = 'message.type';
+
+ /**
+ * Uncompressed size of the message in bytes.
+ */
+ public const MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';
+
+ /**
+ * The error codes of the Connect request. Error codes are always string values.
+ */
+ public const RPC_CONNECT_RPC_ERROR_CODE = 'rpc.connect_rpc.error_code';
+
+ /**
+ * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.
+ *
+ * An exception is considered to have escaped (or left) the scope of a span,
+ * if that span is ended while the exception is still logically &quot;in flight&quot;.
+ * This may be actually &quot;in flight&quot; in some languages (e.g. if the exception
+ * is passed to a Context manager's `__exit__` method in Python) but will
+ * usually be caught at the point of recording the exception in most languages.It is usually not possible to determine at the point where an exception is thrown
+ * whether it will escape the scope of a span.
+ * However, it is trivial to know that an exception
+ * will escape, if one checks for an active exception just before ending the span,
+ * as done in the example above.It follows that an exception may still escape the scope of the span
+ * even if the `exception.escaped` attribute was not set or set to false,
+ * since the event might have been recorded at a time where it was not
+ * clear whether the exception will escape.
+ */
+ public const EXCEPTION_ESCAPED = 'exception.escaped';
+
+ /**
+ * The URI fragment component.
+ *
+ * @example SemConv
+ */
+ public const URL_FRAGMENT = 'url.fragment';
+
+ /**
+ * @deprecated
+ */
+ public const FAAS_EXECUTION = 'faas.execution';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_HOST = 'http.host';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_RETRY_COUNT = 'http.retry_count';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_SERVER_NAME = 'http.server_name';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_USER_AGENT = 'http.user_agent';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_DESTINATION = 'messaging.destination';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_PROTOCOL = 'messaging.protocol';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_URL = 'messaging.url';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_IP = 'net.host.ip';
+
+ /**
+ * @deprecated
+ */
+ public const NET_PEER_IP = 'net.peer.ip';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_CLIENT_IP = 'http.client_ip';
+
+ /**
+ * @deprecated
+ */
+ public const HTTP_FLAVOR = 'http.flavor';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_CONSUMER_ID = 'messaging.consumer.id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_DESTINATION_KIND = 'messaging.destination.kind';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_KAFKA_SOURCE_PARTITION = 'messaging.kafka.source.partition';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message.payload_compressed_size_bytes';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message.payload_size_bytes';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_ROCKETMQ_CLIENT_ID = 'messaging.rocketmq.client_id';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_ANONYMOUS = 'messaging.source.anonymous';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_KIND = 'messaging.source.kind';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_NAME = 'messaging.source.name';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_TEMPLATE = 'messaging.source.template';
+
+ /**
+ * @deprecated
+ */
+ public const MESSAGING_SOURCE_TEMPORARY = 'messaging.source.temporary';
+
+ /**
+ * @deprecated
+ */
+ public const NET_APP_PROTOCOL_NAME = 'net.app.protocol.name';
+
+ /**
+ * @deprecated
+ */
+ public const NET_APP_PROTOCOL_VERSION = 'net.app.protocol.version';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CARRIER_NAME = 'net.host.carrier.name';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';
+
+ /**
+ * @deprecated
+ */
+ public const NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';
+}
diff --git a/vendor/open-telemetry/sem-conv/composer.json b/vendor/open-telemetry/sem-conv/composer.json
new file mode 100644
index 000000000..a601ca5dc
--- /dev/null
+++ b/vendor/open-telemetry/sem-conv/composer.json
@@ -0,0 +1,32 @@
+{
+ "name": "open-telemetry/sem-conv",
+ "description": "Semantic conventions for OpenTelemetry PHP.",
+ "keywords": ["opentelemetry", "otel", "metrics", "tracing", "logging", "apm", "semconv", "semantic conventions"],
+ "type": "library",
+ "support": {
+ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
+ "source": "https://github.com/open-telemetry/opentelemetry-php",
+ "docs": "https://opentelemetry.io/docs/php",
+ "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V"
+ },
+ "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\\SemConv\\": "."
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ }
+}
diff --git a/vendor/opentracing/opentracing/.github/ISSUE_TEMPLATE.md b/vendor/opentracing/opentracing/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index f99dd606b..000000000
--- a/vendor/opentracing/opentracing/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-Welcome to the OpenTracing PHP repo! 👋🎉
-
-- Please search for existing issues in order to ensure we don't have duplicate bugs/feature requests.)
-- Please be respectful and considerate of others when commenting on issues)
-- Please provide as much information as possible so we all understand the issue.)
-- Please don't ask questions here. If you have any question head to our gitter chat https://gitter.im/opentracing/opentracing-php
--->
-
-
-## Background
-Something that gives context about why this is an issue.
-
-## Problem
-Describe the problem. If the issue is about an improvement you can skip this. If possible, include a description of the impact of the problem.
-
-## Proposal
-A proposal that from your POV would solve the problem or improve the existing situation. It should also include the impact.
-
-## Questions to address
-Questions that should be answered as outcome of this issue.
diff --git a/vendor/opentracing/opentracing/.github/PULL_REQUEST_TEMPLATE.md b/vendor/opentracing/opentracing/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index d81c08379..000000000
--- a/vendor/opentracing/opentracing/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines given above, then fill out the blanks below.
-
-Please don't open huge pull requests and keep one pull request solving one problem.
-
-Please enter the issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged!
-e.g.
-Fixes #1
-Closes #2
--->
-
-### Short description of what this PR does:
--
--
-
-### Checklist
-- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
-- [ ] I have read the [Contribution Guide] and my PR follows them.
-- [ ] I updated my branch with the master branch.
-- [ ] I have added tests that prove my fix is effective or that my feature works
-- [ ] I have added necessary documentation about the functionality in the appropriate .md file
-- [ ] I have added in line documentation to the code I modified
-
-Closes # \ No newline at end of file
diff --git a/vendor/opentracing/opentracing/.github/workflows/ci.yml b/vendor/opentracing/opentracing/.github/workflows/ci.yml
deleted file mode 100644
index 8fba7baf8..000000000
--- a/vendor/opentracing/opentracing/.github/workflows/ci.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Build
-on:
- push:
- branches:
- - master
- paths-ignore:
- - "**/*.md"
- - "LICENSE"
- pull_request:
-jobs:
- test:
- name: OpenTracing (PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
- runs-on: ${{ matrix.operating-system }}
- strategy:
- fail-fast: false
- matrix:
- operating-system: [ubuntu-latest, windows-latest, macos-latest]
- php-versions: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup PHP, with composer and extensions
- uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
- with:
- php-version: ${{ matrix.php-versions }}
- - name: Get composer cache directory
- id: composer-cache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- - name: Cache composer dependencies
- uses: actions/cache@v2
- with:
- path: ${{ steps.composer-cache.outputs.dir }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- restore-keys: ${{ runner.os }}-composer-
- - name: Install Composer dependencies
- run: |
- composer install --no-progress --prefer-dist --optimize-autoloader
- - name: Run lint
- if: matrix.operating-system != 'windows-latest'
- run: composer lint
- - name: Run static check
- run: composer static-check
- - name: Run tests
- run: composer test
diff --git a/vendor/opentracing/opentracing/.gitignore b/vendor/opentracing/opentracing/.gitignore
deleted file mode 100644
index 56e80855d..000000000
--- a/vendor/opentracing/opentracing/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.idea/
-.phpunit.result.cache
-composer.lock
-vendor \ No newline at end of file
diff --git a/vendor/opentracing/opentracing/CONTRIBUTING.md b/vendor/opentracing/opentracing/CONTRIBUTING.md
deleted file mode 100644
index a13c0fe1d..000000000
--- a/vendor/opentracing/opentracing/CONTRIBUTING.md
+++ /dev/null
@@ -1,75 +0,0 @@
-Contributing
-============
-
-Thank you for contributing to this project!
-
-Bug reports
------------
-
-If you find a bug, please submit an issue. Try to be as detailed as possible
-in your problem description to help us fix the bug.
-
-Feature requests
-----------------
-
-If you wish to propose a feature, please submit an issue. Try to explain your
-use case as fully as possible to help us understand why you think the feature
-should be added.
-
-License
--------
-
-By contributing your code, you agree to license your contribution under the terms of the APLv2:
-https://github.com/opentracing/opentracing-php/blob/master/LICENSE
-
-All files are released with the Apache 2.0 license.
-
-Creating a pull request (PR)
-----------------------------
-
-First [fork the repository](https://help.github.com/articles/fork-a-repo/) on
-GitHub.
-
-Then clone your fork:
-
-```bash
-$ git clone https://github.com/your-name/opentracing-php.git
-$ git checkout -b bug-or-feature-description
-```
-
-And install the dependencies:
-
-```bash
-$ composer install
-```
-
-Write your code and add tests. Then run the static check and the tests:
-
-```bash
-$ composer run static-check
-$ composer run test
-```
-
-Commit your changes and push them to GitHub:
-
-```bash
-$ git commit -m "Fix nasty bug"
-$ git push -u origin bug-or-feature-description
-```
-
-Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/)
-on GitHub.
-
-If you need to make some changes, commit and push them as you like. When asked
-to squash your commits, do so as follows:
-
-```bash
-git rebase -i
-git push origin bug-or-feature-description -f
-```
-
-Coding standard
----------------
-
-This project follows the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style.
-Please make sure your pull requests adhere to this standard.
diff --git a/vendor/opentracing/opentracing/LICENSE b/vendor/opentracing/opentracing/LICENSE
deleted file mode 100644
index 8dada3eda..000000000
--- a/vendor/opentracing/opentracing/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- 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/vendor/opentracing/opentracing/README.md b/vendor/opentracing/opentracing/README.md
deleted file mode 100644
index ce03bc951..000000000
--- a/vendor/opentracing/opentracing/README.md
+++ /dev/null
@@ -1,306 +0,0 @@
-# OpenTracing API for PHP
-
-[![Build](https://github.com/opentracing/opentracing-php/actions/workflows/ci.yml/badge.svg)](https://github.com/opentracing/opentracing-php/actions/workflows/ci.yml)
-[![OpenTracing Badge](https://img.shields.io/badge/OpenTracing-enabled-blue.svg)](http://opentracing.io)
-[![Total Downloads](https://poser.pugx.org/opentracing/opentracing/downloads)](https://packagist.org/packages/opentracing/opentracing)
-[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg)](https://php.net/)
-[![License](https://img.shields.io/github/license/opentracing/opentracing-php.svg)](https://github.com/opentracing/opentracing-php/blob/master/LICENSE)
-[![Join the chat at https://gitter.im/opentracing/opentracing-php](https://badges.gitter.im/opentracing/opentracing-php.svg)](https://gitter.im/opentracing/opentracing-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-PHP library for the OpenTracing's API.
-
-## Required Reading
-
-In order to understand the library, one must first be familiar with the
-[OpenTracing project](http://opentracing.io) and
-[specification](http://opentracing.io/documentation/pages/spec.html) more specifically.
-
-## Installation
-
-OpenTracing-PHP can be installed via Composer:
-
-```bash
-composer require opentracing/opentracing
-```
-
-## Usage
-
-When consuming this library one really only need to worry about a couple of key
-abstractions: the `Tracer::startActiveSpan` and `Tracer::startSpan` method,
-the `Span` interface, the `Scope` interface and binding a `Tracer` at bootstrap time. Here are code snippets
-demonstrating some important use cases:
-
-### Singleton initialization
-
-The simplest starting point is to set the global tracer. As early as possible, do:
-
-```php
-use OpenTracing\GlobalTracer;
-
-GlobalTracer::set(new MyTracerImplementation());
-```
-
-### Creating a Span given an existing Request
-
-To start a new `Span`, you can use the `startSpan` method.
-
-```php
-use OpenTracing\Formats;
-use OpenTracing\GlobalTracer;
-
-...
-
-// extract the span context
-$spanContext = GlobalTracer::get()->extract(
- Formats\HTTP_HEADERS,
- getallheaders()
-);
-
-function doSomething() {
- ...
-
- // start a new span called 'my_span' and make it a child of the $spanContext
- $span = GlobalTracer::get()->startSpan('my_span', ['child_of' => $spanContext]);
-
- ...
-
- // add some logs to the span
- $span->log([
- 'event' => 'soft error',
- 'type' => 'cache timeout',
- 'waiter.millis' => 1500,
- ])
-
- // finish the the span
- $span->finish();
-}
-```
-
-### Starting a new trace by creating a "root span"
-
-It's always possible to create a "root" `Span` with no parent or other causal reference.
-
-```php
-$span = $tracer->startSpan('my_first_span');
-...
-$span->finish();
-```
-
-### Active Spans and Scope Manager
-
-For most use cases, it is recommended that you use the `Tracer::startActiveSpan` function for
-creating new spans.
-
-An example of a linear, two level deep span tree using active spans looks like
-this in PHP code:
-```php
-// At dispatcher level
-$scope = $tracer->startActiveSpan('request');
-...
-$scope->close();
-```
-```php
-// At controller level
-$scope = $tracer->startActiveSpan('controller');
-...
-$scope->close();
-```
-
-```php
-// At RPC calls level
-$scope = $tracer->startActiveSpan('http');
-file_get_contents('http://php.net');
-$scope->close();
-```
-
-When using the `Tracer::startActiveSpan` function the underlying tracer uses an
-abstraction called scope manager to keep track of the currently active span.
-
-Starting an active span will always use the currently active span as a parent.
-If no parent is available, then the newly created span is considered to be the
-root span of the trace.
-
-Unless you are using asynchronous code that tracks multiple spans at the same
-time, such as when using cURL Multi Exec or MySQLi Polling it is recommended that you
-use `Tracer::startActiveSpan` everywhere in your application.
-
-The currently active span gets automatically finished when you call `$scope->close()`
-as you can see in the previous examples.
-
-If you don't want a span to automatically close when `$scope->close()` is called
-then you must specify `'finish_span_on_close'=> false,` in the `$options`
-argument of `startActiveSpan`.
-
-#### Creating a child span assigning parent manually
-
-```php
-$parent = GlobalTracer::get()->startSpan('parent');
-
-$child = GlobalTracer::get()->startSpan('child', [
- 'child_of' => $parent
-]);
-
-...
-
-$child->finish();
-
-...
-
-$parent->finish();
-```
-
-#### Creating a child span using automatic active span management
-
-Every new span will take the active span as parent and it will take its spot.
-
-```php
-$parent = GlobalTracer::get()->startActiveSpan('parent');
-
-...
-
-/*
- * Since the parent span has been created by using startActiveSpan we don't need
- * to pass a reference for this child span
- */
-$child = GlobalTracer::get()->startActiveSpan('my_second_span');
-
-...
-
-$child->close();
-
-...
-
-$parent->close();
-```
-
-### Serializing to the wire
-
-```php
-use GuzzleHttp\Client;
-use OpenTracing\Formats;
-
-...
-
-$tracer = GlobalTracer::get();
-
-$spanContext = $tracer->extract(
- Formats\HTTP_HEADERS,
- getallheaders()
-);
-
-try {
- $span = $tracer->startSpan('my_span', ['child_of' => $spanContext]);
-
- $client = new Client;
-
- $headers = [];
-
- $tracer->inject(
- $span->getContext(),
- Formats\HTTP_HEADERS,
- $headers
- );
-
- $request = new \GuzzleHttp\Psr7\Request('GET', 'http://myservice', $headers);
- $client->send($request);
- ...
-
-} catch (\Exception $e) {
- ...
-}
-...
-```
-
-### Deserializing from the wire
-
-When using http header for context propagation you can use either the `Request` or the `$_SERVER`
-variable:
-
-```php
-use OpenTracing\GlobalTracer;
-use OpenTracing\Formats;
-
-$tracer = GlobalTracer::get();
-$spanContext = $tracer->extract(Formats\HTTP_HEADERS, getallheaders());
-$tracer->startSpan('my_span', [
- 'child_of' => $spanContext,
-]);
-```
-
-### Flushing Spans
-
-PHP as a request scoped language has no simple means to pass the collected spans
-data to a background process without blocking the main request thread/process.
-The OpenTracing API makes no assumptions about this, but for PHP that might
-cause problems for Tracer implementations. This is why the PHP API contains a
-`flush` method that allows to trigger a span sending out of process.
-
-```php
-use OpenTracing\GlobalTracer;
-
-$application->run();
-
-register_shutdown_function(function() {
- /* Flush the tracer to the backend */
- $tracer = GlobalTracer::get();
- $tracer->flush();
-});
-```
-
-This is optional, tracers can decide to immediately send finished spans to a
-backend. The flush call can be implemented as a NO-OP for these tracers.
-
-### Using `StartSpanOptions`
-
-Passing options to the pass can be done using either an array or the
-SpanOptions wrapper object. The following keys are valid:
-
-- `start_time` is a float, int or `\DateTime` representing a timestamp with arbitrary precision.
-- `child_of` is an object of type `OpenTracing\SpanContext` or `OpenTracing\Span`.
-- `references` is an array of `OpenTracing\Reference`.
-- `tags` is an array with string keys and scalar values that represent OpenTracing tags.
-- `finish_span_on_close` is a boolean that determines whether a span should be finished or not when the
-scope is closed.
-
-```php
-$span = $tracer->startActiveSpan('my_span', [
- 'child_of' => $spanContext,
- 'tags' => ['foo' => 'bar'],
- 'start_time' => time(),
-]);
-```
-
-### Propagation Formats
-
-The propagation formats should be implemented consistently across all tracers.
-If you want to implement your own format, then don't reuse the existing constants.
-Tracers will throw an exception if the requested format is not handled by them.
-
-- `Tracer::FORMAT_TEXT_MAP` should represent the span context as a key value map. There is no
- assumption about the semantics where the context is coming from and sent to.
-
-- `Tracer::FORMAT_HTTP_HEADERS` should represent the span context as HTTP header lines
- in an array list. For two context details "Span-Id" and "Trace-Id", the
- result would be `['Span-Id: abc123', 'Trace-Id: def456']`. This definition can be
- passed directly to `curl` and `file_get_contents`.
-
-- `Tracer::FORMAT_BINARY` makes no assumptions about the data format other than it is
- proprietary and each Tracer can handle it as it wants.
-
-## Mock implementation
-
-OpenTracing PHP comes with a mock implementation, it has three purposes:
-
-1. Helps to iron the API.
-2. Works as a reference implementation.
-3. Enhances vendor agnostic unit testing as it allows developers to inspect the tracing objects
-in order to do assertions about them.
-
-## Coding Style
-
-OpenTracing PHP follows the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
-coding standard and the [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) autoloading standard.
-
-## License
-
-All the open source contributions are under the terms of the [Apache-2.0 License](https://opensource.org/licenses/Apache-2.0).
diff --git a/vendor/opentracing/opentracing/composer.json b/vendor/opentracing/opentracing/composer.json
deleted file mode 100644
index b00b67381..000000000
--- a/vendor/opentracing/opentracing/composer.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "opentracing/opentracing",
- "type": "library",
- "description": "OpenTracing API for PHP",
- "license": "Apache-2.0",
- "minimum-stability": "stable",
- "authors": [
- {
- "name": "José Carlos Chávez",
- "email": "[email protected]"
- }
- ],
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "phpstan/phpstan": "~0.12",
- "phpunit/phpunit": "^7.0 || ^9.0",
- "squizlabs/php_codesniffer": "3.*"
- },
- "config": {
- "sort-packages": true
- },
- "autoload": {
- "psr-4": {
- "OpenTracing\\": "src/OpenTracing/"
- },
- "files": [
- "src/OpenTracing/Tags.php",
- "src/OpenTracing/Formats.php"
- ]
- },
- "autoload-dev": {
- "psr-4": {
- "OpenTracing\\Tests\\": "tests/OpenTracing"
- }
- },
- "scripts": {
- "fix-lint": "phpcbf --standard=ZEND --standard=PSR2 --ignore=*/vendor/* ./",
- "lint": "phpcs --standard=ZEND --standard=PSR2 --ignore=*/vendor/* ./",
- "test": "phpunit tests",
- "static-check": "phpstan analyse"
- }
-}
diff --git a/vendor/opentracing/opentracing/phpstan.neon b/vendor/opentracing/opentracing/phpstan.neon
deleted file mode 100644
index c9e64bf1f..000000000
--- a/vendor/opentracing/opentracing/phpstan.neon
+++ /dev/null
@@ -1,5 +0,0 @@
-parameters:
- paths:
- - src
-
- level: 5
diff --git a/vendor/opentracing/opentracing/phpunit.xml b/vendor/opentracing/opentracing/phpunit.xml
deleted file mode 100644
index 2083a425c..000000000
--- a/vendor/opentracing/opentracing/phpunit.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
- backupGlobals="true"
- backupStaticAttributes="false"
- bootstrap="./vendor/autoload.php"
- colors="false"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- forceCoversAnnotation="false"
- processIsolation="false"
- stopOnError="false"
- stopOnFailure="false"
- stopOnIncomplete="false"
- stopOnSkipped="false"
- stopOnRisky="false"
- timeoutForSmallTests="1"
- timeoutForMediumTests="10"
- timeoutForLargeTests="60"
- verbose="false">
- <testsuites>
- <testsuite name="suite">
- <directory>tests</directory>
- </testsuite>
- </testsuites>
-</phpunit>
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Formats.php b/vendor/opentracing/opentracing/src/OpenTracing/Formats.php
deleted file mode 100644
index f26c5ecf1..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Formats.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Formats;
-
-/**
- * Used a (single) arbitrary binary blob representing a SpanContext
- *
- * For both Tracer::inject() and Tracer::extract() the carrier must be a `string`.
- */
-const BINARY = 'binary';
-
-/**
- * Used for an arbitrary string-to-string map with an unrestricted character set for both keys and values
- *
- * Unlike `HTTP_HEADERS`, the `TEXT_MAP` format does not restrict the key or
- * value character sets in any way.
- *
- * For both Tracer::inject() and Tracer::extract() the carrier must be a `array|ArrayObject`.
- */
-const TEXT_MAP = 'text_map';
-
-/**
- * Used for a string-to-string map with keys and values that are suitable for use in HTTP headers (a la RFC 7230.
- * In practice, since there is such "diversity" in the way that HTTP headers are treated in the wild, it is strongly
- * recommended that Tracer implementations use a limited HTTP header key space and escape values conservatively.
- *
- * Unlike `TEXT_MAP`, the `HTTP_HEADERS` format requires that the keys and values be valid as HTTP headers as-is
- * (i.e., character casing may be unstable and special characters are disallowed in keys, values should be
- * URL-escaped, etc).
- *
- * For both Tracer::inject() and Tracer::extract() the carrier must be a `array|ArrayObject`.
- *
- * For example, Tracer::inject():
- *
- * $headers = []
- * $tracer->inject($span->getContext(), Formats\HTTP_HEADERS, $headers)
- * $request = new GuzzleHttp\Psr7\Request($uri, $body, $headers);
- *
- * Or Tracer::extract():
- *
- * $headers = $request->getHeaders()
- * $clientContext = $tracer->extract(Formats\HTTP_HEADERS, $headers)
- *
- * @see http://www.php-fig.org/psr/psr-7/#12-http-headers
- * @see http://php.net/manual/en/function.getallheaders.php
- */
-const HTTP_HEADERS = 'http_headers';
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php b/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php
deleted file mode 100644
index aafdba121..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-final class GlobalTracer
-{
- /**
- * @var Tracer
- */
- private static $instance;
-
- /**
- * @var bool
- */
- private static $isRegistered = false;
-
- /**
- * GlobalTracer::set sets the [singleton] Tracer returned by get().
- * Those who use GlobalTracer (rather than directly manage a Tracer instance)
- * should call GlobalTracer::set as early as possible in bootstrap, prior to
- * start a new span. Prior to calling GlobalTracer::set, any Spans started
- * via the `Tracer::startActiveSpan` (etc) globals are noops.
- *
- * @param Tracer $tracer
- * @return void
- */
- public static function set(Tracer $tracer): void
- {
- self::$instance = $tracer;
- self::$isRegistered = true;
- }
-
- /**
- * GlobalTracer::get returns the global singleton `Tracer` implementation.
- * Before `GlobalTracer::set` is called, the `GlobalTracer::get` is a noop
- * implementation that drops all data handed to it.
- *
- * @return Tracer
- */
- public static function get(): Tracer
- {
- if (self::$instance === null) {
- self::$instance = new NoopTracer();
- }
-
- return self::$instance;
- }
-
- /**
- * Returns true if a global tracer has been registered, otherwise returns false.
- *
- * @return bool
- */
- public static function isRegistered(): bool
- {
- return self::$isRegistered;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferenceArgumentException.php b/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferenceArgumentException.php
deleted file mode 100644
index 128360393..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferenceArgumentException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use InvalidArgumentException;
-
-/**
- * Thrown when passing an invalid argument for a reference
- */
-final class InvalidReferenceArgumentException extends InvalidArgumentException
-{
- /**
- * @return InvalidReferenceArgumentException
- */
- public static function forEmptyType(): InvalidReferenceArgumentException
- {
- return new self('Reference type can not be an empty string');
- }
-
- /**
- * @param mixed $context
- * @return InvalidReferenceArgumentException
- */
- public static function forInvalidContext($context): InvalidReferenceArgumentException
- {
- return new self(sprintf(
- 'Reference expects \OpenTracing\Span or \OpenTracing\SpanContext as context, got %s',
- is_object($context) ? get_class($context) : gettype($context)
- ));
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php b/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php
deleted file mode 100644
index de7d907c8..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use DomainException;
-
-/**
- * Thrown when a reference has more than one parent in the SpanOptions
- */
-final class InvalidReferencesSetException extends DomainException
-{
- /**
- * @param string $message
- * @return InvalidReferencesSetException
- */
- public static function create(string $message): InvalidReferencesSetException
- {
- return new self($message);
- }
-
- /**
- * @return InvalidReferencesSetException
- */
- public static function forMoreThanOneParent(): InvalidReferencesSetException
- {
- return new self('Span can not have more than one parent, either one as child_of or either one as follows_from');
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/InvalidSpanOptionException.php b/vendor/opentracing/opentracing/src/OpenTracing/InvalidSpanOptionException.php
deleted file mode 100644
index f9b8003ff..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/InvalidSpanOptionException.php
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use InvalidArgumentException;
-
-/**
- * Thrown when passing an invalid option on Span creation
- */
-final class InvalidSpanOptionException extends InvalidArgumentException
-{
- /**
- * @return InvalidSpanOptionException
- */
- public static function forIncludingBothChildOfAndReferences(): InvalidSpanOptionException
- {
- return new self('Either "childOf" or "references" options are accepted but not both.');
- }
-
- /**
- * @param mixed $reference
- * @return InvalidSpanOptionException
- */
- public static function forInvalidReference($reference): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid reference. Expected OpenTracing\Reference, got %s.',
- is_object($reference) ? get_class($reference) : gettype($reference)
- ));
- }
-
- /**
- * @return InvalidSpanOptionException
- */
- public static function forInvalidStartTime(): InvalidSpanOptionException
- {
- return new self('Invalid start_time option. Expected int or float got string.');
- }
-
- /**
- * @param mixed $childOfOption
- * @return InvalidSpanOptionException
- */
- public static function forInvalidChildOf($childOfOption): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid child_of option. Expected Span or SpanContext, got %s',
- is_object($childOfOption) ? get_class($childOfOption) : gettype($childOfOption)
- ));
- }
-
- /**
- * @param string $key
- * @return InvalidSpanOptionException
- */
- public static function forUnknownOption(string $key): InvalidSpanOptionException
- {
- return new self(sprintf('Invalid option %s.', $key));
- }
-
- /**
- * @param mixed $tag
- * @return InvalidSpanOptionException
- */
- public static function forInvalidTag($tag): InvalidSpanOptionException
- {
- return new self(sprintf('Invalid tag. Expected string, got %s', gettype($tag)));
- }
-
- /**
- * @param mixed $tagValue
- * @return InvalidSpanOptionException
- */
- public static function forInvalidTagValue($tagValue): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid tag value. Expected scalar or object with __toString method, got %s',
- is_object($tagValue) ? get_class($tagValue) : gettype($tagValue)
- ));
- }
-
- /**
- * @param mixed $value
- * @return InvalidSpanOptionException
- */
- public static function forInvalidTags($value): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid tags value. Expected a associative array of tags, got %s',
- is_object($value) ? get_class($value) : gettype($value)
- ));
- }
-
- /**
- * @param mixed $value
- * @return InvalidSpanOptionException
- */
- public static function forInvalidReferenceSet($value): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid references set. Expected Reference or Reference[], got %s',
- is_object($value) ? get_class($value) : gettype($value)
- ));
- }
-
- /**
- * @param mixed $value
- * @return InvalidSpanOptionException
- */
- public static function forFinishSpanOnClose($value): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid type for finish_span_on_close. Expected bool, got %s',
- is_object($value) ? get_class($value) : gettype($value)
- ));
- }
-
- /**
- * @param mixed $value
- * @return InvalidSpanOptionException
- */
- public static function forIgnoreActiveSpan($value): InvalidSpanOptionException
- {
- return new self(sprintf(
- 'Invalid type for ignore_active_span. Expected bool, got %s',
- is_object($value) ? get_class($value) : gettype($value)
- ));
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php
deleted file mode 100644
index a814b45b5..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Mock;
-
-use OpenTracing\Scope;
-use OpenTracing\Span;
-
-final class MockScope implements Scope
-{
- /**
- * @var Span
- */
- private $span;
-
- /**
- * @var MockScopeManager
- */
- private $scopeManager;
-
- /**
- * @var bool
- */
- private $finishSpanOnClose;
-
- /**
- * @param MockScopeManager $scopeManager
- * @param Span $span
- * @param bool $finishSpanOnClose
- */
- public function __construct(
- MockScopeManager $scopeManager,
- Span $span,
- bool $finishSpanOnClose
- ) {
- $this->scopeManager = $scopeManager;
- $this->span = $span;
- $this->finishSpanOnClose = $finishSpanOnClose;
- }
-
- /**
- * {@inheritdoc}
- */
- public function close(): void
- {
- if ($this->finishSpanOnClose) {
- $this->span->finish();
- }
-
- $this->scopeManager->deactivate($this);
- }
-
- /**
- * {@inheritdoc}
- * @return Span|MockSpan
- */
- public function getSpan(): Span
- {
- return $this->span;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScopeManager.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScopeManager.php
deleted file mode 100644
index c75c71942..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScopeManager.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Mock;
-
-use OpenTracing\Scope;
-use OpenTracing\ScopeManager;
-use OpenTracing\Span;
-
-final class MockScopeManager implements ScopeManager
-{
- /**
- * @var Scope[]
- */
- private $scopes = [];
-
- /**
- * {@inheritdoc}
- */
- public function activate(Span $span, bool $finishSpanOnClose = ScopeManager::DEFAULT_FINISH_SPAN_ON_CLOSE): Scope
- {
- $scope = new MockScope($this, $span, $finishSpanOnClose);
- $this->scopes[] = $scope;
-
- return $scope;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getActive(): ?Scope
- {
- if (empty($this->scopes)) {
- return null;
- }
-
- return $this->scopes[count($this->scopes) - 1];
- }
-
- public function deactivate(MockScope $scope): void
- {
- foreach ($this->scopes as $scopeIndex => $scopeItem) {
- if ($scope === $scopeItem) {
- unset($this->scopes[$scopeIndex]);
- }
- }
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpan.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpan.php
deleted file mode 100644
index db53649bf..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpan.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Mock;
-
-use OpenTracing\Span;
-use OpenTracing\SpanContext;
-
-final class MockSpan implements Span
-{
- /**
- * @var string
- */
- private $operationName;
-
- /**
- * @var SpanContext
- */
- private $context;
-
- /**
- * @var array
- */
- private $tags = [];
-
- /**
- * @var array
- */
- private $logs = [];
-
- /**
- * @var int
- */
- private $startTime;
-
- /**
- * @var int|null
- */
- private $duration;
-
- public function __construct(
- string $operationName,
- SpanContext $context,
- ?int $startTime = null
- ) {
- $this->operationName = $operationName;
- $this->context = $context;
- $this->startTime = $startTime ?: time();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getOperationName(): string
- {
- return $this->operationName;
- }
-
- /**
- * {@inheritdoc}
- * @return SpanContext|MockSpanContext
- */
- public function getContext(): SpanContext
- {
- return $this->context;
- }
-
- public function getStartTime(): ?int
- {
- return $this->startTime;
- }
-
- /**
- * {@inheritdoc}
- */
- public function finish($finishTime = null): void
- {
- $finishTime = ($finishTime ?: time());
- $this->duration = $finishTime - $this->startTime;
- }
-
- public function isFinished(): bool
- {
- return $this->duration !== null;
- }
-
- public function getDuration(): ?int
- {
- return $this->duration;
- }
-
- /**
- * {@inheritdoc}
- */
- public function overwriteOperationName(string $newOperationName): void
- {
- $this->operationName = (string)$newOperationName;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setTag(string $key, $value): void
- {
- $this->tags[$key] = $value;
- }
-
- public function getTags(): array
- {
- return $this->tags;
- }
-
- /**
- * {@inheritdoc}
- */
- public function log(array $fields = [], $timestamp = null): void
- {
- $this->logs[] = [
- 'timestamp' => $timestamp ?: time(),
- 'fields' => $fields,
- ];
- }
-
- public function getLogs(): array
- {
- return $this->logs;
- }
-
- /**
- * {@inheritdoc}
- */
- public function addBaggageItem(string $key, string $value): void
- {
- $this->context = $this->context->withBaggageItem($key, $value);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return $this->context->getBaggageItem($key);
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpanContext.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpanContext.php
deleted file mode 100644
index d094ea0e0..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockSpanContext.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Mock;
-
-use OpenTracing\SpanContext;
-use ArrayIterator;
-
-final class MockSpanContext implements SpanContext
-{
- /**
- * @var int
- */
- private $traceId;
-
- /**
- * @var int
- */
- private $spanId;
-
- /**
- * @var bool
- */
- private $isSampled;
-
- /**
- * @var array
- */
- private $items;
-
- private function __construct(int $traceId, int $spanId, bool $isSampled, array $items)
- {
- $this->traceId = $traceId;
- $this->spanId = $spanId;
- $this->isSampled = $isSampled;
- $this->items = $items;
- }
-
- public static function create(int $traceId, int $spanId, bool $sampled = true, array $items = []): SpanContext
- {
- return new self($traceId, $spanId, $sampled, $items);
- }
-
- public static function createAsRoot(bool $sampled = true, array $items = []): SpanContext
- {
- $traceId = $spanId = self::nextId();
- return new self($traceId, $spanId, $sampled, $items);
- }
-
- public static function createAsChildOf(MockSpanContext $spanContext): SpanContext
- {
- $spanId = self::nextId();
- return new self($spanContext->traceId, $spanId, $spanContext->isSampled, $spanContext->items);
- }
-
- public function getTraceId(): int
- {
- return $this->traceId;
- }
-
- public function getSpanId(): int
- {
- return $this->spanId;
- }
-
- public function isSampled(): bool
- {
- return $this->isSampled;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getIterator(): ArrayIterator
- {
- return new ArrayIterator($this->items);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return array_key_exists($key, $this->items) ? $this->items[$key] : null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function withBaggageItem(string $key, string $value): SpanContext
- {
- return new self($this->traceId, $this->spanId, $this->isSampled, array_merge($this->items, [$key => $value]));
- }
-
- private static function nextId(): int
- {
- return mt_rand(0, 99999);
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockTracer.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockTracer.php
deleted file mode 100644
index f4f4577a1..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockTracer.php
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Mock;
-
-use OpenTracing\InvalidReferenceArgumentException;
-use OpenTracing\UnsupportedFormatException;
-use OpenTracing\Scope;
-use OpenTracing\ScopeManager;
-use OpenTracing\Span;
-use OpenTracing\SpanContext;
-use OpenTracing\StartSpanOptions;
-use OpenTracing\Tracer;
-
-final class MockTracer implements Tracer
-{
- /**
- * @var array|MockSpan[]
- */
- private $spans = [];
-
- /**
- * @var array|callable[]
- */
- private $injectors;
-
- /**
- * @var array|callable[]
- */
- private $extractors;
-
- /**
- * @var ScopeManager
- */
- private $scopeManager;
-
- public function __construct(array $injectors = [], array $extractors = [])
- {
- $this->injectors = $injectors;
- $this->extractors = $extractors;
- $this->scopeManager = new MockScopeManager();
- }
-
- /**
- * {@inheritdoc}
- */
- public function startActiveSpan(string $operationName, $options = []): Scope
- {
- if (!($options instanceof StartSpanOptions)) {
- $options = StartSpanOptions::create($options);
- }
-
- if (($activeSpan = $this->getActiveSpan()) !== null) {
- $options = $options->withParent($activeSpan);
- }
-
- $span = $this->startSpan($operationName, $options);
-
- return $this->scopeManager->activate($span, $options->shouldFinishSpanOnClose());
- }
-
- /**
- * {@inheritdoc}
- */
- public function startSpan(string $operationName, $options = []): Span
- {
- if (!($options instanceof StartSpanOptions)) {
- $options = StartSpanOptions::create($options);
- }
-
- if (empty($options->getReferences())) {
- $spanContext = MockSpanContext::createAsRoot();
- } else {
- $referenceContext = $options->getReferences()[0]->getSpanContext();
- if (!$referenceContext instanceof MockSpanContext) {
- throw InvalidReferenceArgumentException::forInvalidContext($referenceContext);
- }
- $spanContext = MockSpanContext::createAsChildOf($referenceContext);
- }
-
- $span = new MockSpan($operationName, $spanContext, $options->getStartTime());
-
- foreach ($options->getTags() as $key => $value) {
- $span->setTag($key, $value);
- }
-
- $this->spans[] = $span;
-
- return $span;
- }
-
- /**
- * {@inheritdoc}
- */
- public function inject(SpanContext $spanContext, string $format, &$carrier): void
- {
- if (!array_key_exists($format, $this->injectors)) {
- throw UnsupportedFormatException::forFormat($format);
- }
-
- $this->injectors[$format]($spanContext, $carrier);
- }
-
- /**
- * {@inheritdoc}
- */
- public function extract(string $format, $carrier): ?SpanContext
- {
- if (!array_key_exists($format, $this->extractors)) {
- throw UnsupportedFormatException::forFormat($format);
- }
-
- return $this->extractors[$format]($carrier);
- }
-
- /**
- * {@inheritdoc}
- */
- public function flush(): void
- {
- $this->spans = [];
- }
-
- /**
- * @return array|MockSpan[]
- */
- public function getSpans(): array
- {
- return $this->spans;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getScopeManager(): ScopeManager
- {
- return $this->scopeManager;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getActiveSpan(): ?Span
- {
- if (null !== ($activeScope = $this->scopeManager->getActive())) {
- return $activeScope->getSpan();
- }
-
- return null;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/NoopScope.php b/vendor/opentracing/opentracing/src/OpenTracing/NoopScope.php
deleted file mode 100644
index 7170c846a..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/NoopScope.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-final class NoopScope implements Scope
-{
- /**
- * {@inheritdoc}
- */
- public function close(): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function getSpan(): Span
- {
- return new NoopSpan();
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/NoopScopeManager.php b/vendor/opentracing/opentracing/src/OpenTracing/NoopScopeManager.php
deleted file mode 100644
index 5576171a8..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/NoopScopeManager.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-final class NoopScopeManager implements ScopeManager
-{
- /**
- * {@inheritdoc}
- */
- public function activate(Span $span, bool $finishSpanOnClose = ScopeManager::DEFAULT_FINISH_SPAN_ON_CLOSE): Scope
- {
- return new NoopScope();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getActive(): ?Scope
- {
- return new NoopScope();
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/NoopSpan.php b/vendor/opentracing/opentracing/src/OpenTracing/NoopSpan.php
deleted file mode 100644
index c1af8dfc7..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/NoopSpan.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-final class NoopSpan implements Span
-{
- /**
- * {@inheritdoc}
- */
- public function getOperationName(): string
- {
- return 'noop_span';
- }
-
- /**
- * {@inheritdoc}
- */
- public function getContext(): SpanContext
- {
- return new NoopSpanContext();
- }
-
- /**
- * {@inheritdoc}
- */
- public function finish($finishTime = null): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function overwriteOperationName(string $newOperationName): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function setTag(string $key, $value): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function log(array $fields = [], $timestamp = null): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function addBaggageItem(string $key, string $value): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return null;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/NoopSpanContext.php b/vendor/opentracing/opentracing/src/OpenTracing/NoopSpanContext.php
deleted file mode 100644
index 5b0de7c93..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/NoopSpanContext.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use EmptyIterator;
-use Traversable;
-
-final class NoopSpanContext implements SpanContext
-{
- /**
- * {@inheritdoc}
- */
- public function getIterator(): Traversable
- {
- return new EmptyIterator();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function withBaggageItem(string $key, string $value): SpanContext
- {
- return new self();
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/NoopTracer.php b/vendor/opentracing/opentracing/src/OpenTracing/NoopTracer.php
deleted file mode 100644
index 267823bb9..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/NoopTracer.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-final class NoopTracer implements Tracer
-{
- /**
- * {@inheritdoc}
- */
- public function getActiveSpan(): ?Span
- {
- return new NoopSpan();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getScopeManager(): ScopeManager
- {
- return new NoopScopeManager();
- }
-
- /**
- * {@inheritdoc}
- */
- public function startSpan(string $operationName, $options = []): Span
- {
- return new NoopSpan();
- }
-
- /**
- * {@inheritdoc}
- */
- public function startActiveSpan(string $operationName, $options = []): Scope
- {
- return new NoopScope();
- }
-
- /**
- * {@inheritdoc}
- */
- public function inject(SpanContext $spanContext, string $format, &$carrier): void
- {
- }
-
- /**
- * {@inheritdoc}
- */
- public function extract(string $format, $carrier): ?SpanContext
- {
- return new NoopSpanContext();
- }
-
- /**
- * {@inheritdoc}
- */
- public function flush(): void
- {
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Reference.php b/vendor/opentracing/opentracing/src/OpenTracing/Reference.php
deleted file mode 100644
index 7dadf1785..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Reference.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use OpenTracing\InvalidReferenceArgumentException;
-
-final class Reference
-{
- /**
- * A Span may be the ChildOf a parent Span. In a ChildOf reference,
- * the parent Span depends on the child Span in some capacity.
- */
- public const CHILD_OF = 'child_of';
-
- /**
- * Some parent Spans do not depend in any way on the result of their
- * child Spans. In these cases, we say merely that the child Span
- * FollowsFrom the parent Span in a causal sense.
- */
- public const FOLLOWS_FROM = 'follows_from';
-
- /**
- * @var string
- */
- private $type;
-
- /**
- * @var SpanContext
- */
- private $spanContext;
-
- /**
- * @param string $type
- * @param SpanContext $spanContext
- */
- public function __construct(string $type, SpanContext $spanContext)
- {
- if (empty($type)) {
- throw InvalidReferenceArgumentException::forEmptyType();
- }
-
- $this->type = $type;
- $this->spanContext = $spanContext;
- }
-
- /**
- * @param string $type
- * @param Span $span
- * @return Reference when context is invalid
- * @throws InvalidReferenceArgumentException on empty type
- */
- public static function createForSpan(string $type, Span $span): Reference
- {
- return new self($type, $span->getContext());
- }
-
- /**
- * @return SpanContext
- */
- public function getSpanContext(): SpanContext
- {
- return $this->spanContext;
- }
-
- /**
- * Checks whether a Reference is of one type.
- *
- * @param string $type the type for the reference
- * @return bool
- */
- public function isType(string $type): bool
- {
- return $this->type === $type;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Scope.php b/vendor/opentracing/opentracing/src/OpenTracing/Scope.php
deleted file mode 100644
index 174495434..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Scope.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-/**
- * A {@link Scope} formalizes the activation and deactivation of a {@link Span}, usually from a CPU standpoint.
- *
- * Many times a {@link Span} will be extant (in that {@link Span#finish()} has not been called) despite being in a
- * non-runnable state from a CPU/scheduler standpoint. For instance, a {@link Span} representing the client side of an
- * RPC will be unfinished but blocked on IO while the RPC is still outstanding. A {@link Scope} defines when a given
- * {@link Span} <em>is</em> scheduled and on the path.
- */
-interface Scope
-{
- /**
- * Mark the end of the active period for the current thread and {@link Scope},
- * updating the {@link ScopeManager#active()} in the process.
- *
- * NOTE: Calling {@link #close} more than once on a single {@link Scope} instance leads to undefined
- * behavior.
- *
- * @return void
- */
- public function close(): void;
-
- /**
- * @return Span the {@link Span} that's been scoped by this {@link Scope}
- */
- public function getSpan(): Span;
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/ScopeManager.php b/vendor/opentracing/opentracing/src/OpenTracing/ScopeManager.php
deleted file mode 100644
index db5fcaa47..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/ScopeManager.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-/**
- * Keeps track of the current active `Span`.
- */
-interface ScopeManager
-{
- public const DEFAULT_FINISH_SPAN_ON_CLOSE = true;
-
- /**
- * Activates an `Span`, so that it is used as a parent when creating new spans.
- * The implementation must keep track of the active spans sequence, so
- * that previous spans can be resumed after a deactivation.
- *
- * @param Span $span the {@link Span} that should become the {@link #active()}
- * @param bool $finishSpanOnClose whether span should automatically be finished
- * when {@link Scope#close()} is called. Its default value is true.
- *
- * @return Scope instance to control the end of the active period for the {@link Span}. It is a
- * programming error to neglect to call {@link Scope#close()} on the returned instance.
- */
- public function activate(Span $span, bool $finishSpanOnClose = self::DEFAULT_FINISH_SPAN_ON_CLOSE): Scope;
-
- /**
- * Return the currently active {@link Scope} which can be used to access the
- * currently active {@link Scope#getSpan()}.
- *
- * If there is an {@link Scope non-null scope}, its wrapped {@link Span} becomes an implicit parent
- * (as {@link References#CHILD_OF} reference) of any
- * newly-created {@link Span} at {@link Tracer.SpanBuilder#startActive(boolean)} or {@link SpanBuilder#start()}
- * time rather than at {@link Tracer#buildSpan(String)} time.
- *
- * @return Scope|null
- */
- public function getActive(): ?Scope;
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Span.php b/vendor/opentracing/opentracing/src/OpenTracing/Span.php
deleted file mode 100644
index 9fa8c2bc2..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Span.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use DateTimeInterface;
-
-interface Span
-{
- /**
- * @return string
- */
- public function getOperationName(): string;
-
- /**
- * Yields the SpanContext for this Span. Note that the return value of
- * Span::getContext() is still valid after a call to Span::finish(), as is
- * a call to Span::getContext() after a call to Span::finish().
- *
- * @return SpanContext
- */
- public function getContext(): SpanContext;
-
- /**
- * Sets the end timestamp and finalizes Span state.
- *
- * With the exception of calls to getContext() (which are always allowed),
- * finish() must be the last call made to any span instance, and to do
- * otherwise leads to undefined behavior but not returning an exception.
- *
- * As an implementor, make sure you call {@see Tracer::deactivate()}
- * otherwise new spans might try to be child of this one.
- *
- * If the span is already finished, a warning should be logged.
- *
- * @param float|int|DateTimeInterface|null $finishTime if passing float or int
- * it should represent the timestamp (including as many decimal places as you need)
- * @return void
- */
- public function finish($finishTime = null): void;
-
- /**
- * If the span is already finished, a warning should be logged.
- *
- * @param string $newOperationName
- * @return void
- */
- public function overwriteOperationName(string $newOperationName): void;
-
- /**
- * Adds a tag to the span.
- *
- * If there is a pre-existing tag set for key, it is overwritten.
- *
- * As an implementor, consider using "standard tags" listed in {@see \OpenTracing\Tags}
- *
- * If the span is already finished, a warning should be logged.
- *
- * @param string $key
- * @param string|bool|int|float $value
- * @return void
- */
- public function setTag(string $key, $value): void;
-
- /**
- * Adds a log record to the span in key => value format, key must be a string and tag must be either
- * a string, a boolean value, or a numeric type.
- *
- * If the span is already finished, a warning should be logged.
- *
- * @param array $fields
- * @param int|float|DateTimeInterface $timestamp
- * @return void
- */
- public function log(array $fields = [], $timestamp = null): void;
-
- /**
- * Adds a baggage item to the SpanContext which is immutable so it is required to use
- * SpanContext::withBaggageItem to get a new one.
- *
- * If the span is already finished, a warning should be logged.
- *
- * @param string $key
- * @param string $value
- * @return void
- */
- public function addBaggageItem(string $key, string $value): void;
-
- /**
- * @param string $key
- * @return string|null returns null when there is not a item under the provided key
- */
- public function getBaggageItem(string $key): ?string;
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/SpanContext.php b/vendor/opentracing/opentracing/src/OpenTracing/SpanContext.php
deleted file mode 100644
index ca05ff9ac..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/SpanContext.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use IteratorAggregate;
-
-/**
- * SpanContext must be immutable in order to avoid complicated lifetime
- * issues around Span finish and references.
- *
- * Baggage items are key => value string pairs that apply to the given Span,
- * its SpanContext, and all Spans which directly or transitively reference
- * the local Span. That is, baggage items propagate in-band along with the
- * trace itself.
- */
-interface SpanContext extends IteratorAggregate
-{
- /**
- * Returns the value of a baggage item based on its key. If there is no
- * value with such key it will return null.
- *
- * @param string $key
- * @return string|null
- */
- public function getBaggageItem(string $key): ?string;
-
- /**
- * Creates a new SpanContext out of the existing one and the new key => value pair.
- *
- * @param string $key
- * @param string $value
- * @return SpanContext
- */
- public function withBaggageItem(string $key, string $value): SpanContext;
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/StartSpanOptions.php b/vendor/opentracing/opentracing/src/OpenTracing/StartSpanOptions.php
deleted file mode 100644
index 28b73ff0a..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/StartSpanOptions.php
+++ /dev/null
@@ -1,206 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use DateTime;
-use DateTimeInterface;
-use OpenTracing\InvalidReferencesSetException;
-use OpenTracing\InvalidSpanOptionException;
-
-final class StartSpanOptions
-{
- /**
- * @var Reference[]
- */
- private $references = [];
-
- /**
- * @var array
- */
- private $tags = [];
-
- /**
- * @var int|float|DateTimeInterface
- */
- private $startTime;
-
- /**
- * Only used for spans that are actively managed by scope manager.
- *
- * @var bool
- */
- private $finishSpanOnClose = ScopeManager::DEFAULT_FINISH_SPAN_ON_CLOSE;
-
- /**
- * @var bool
- */
- private $ignoreActiveSpan = false;
-
- /**
- * @param array $options
- * @return StartSpanOptions
- * @throws InvalidReferencesSetException when there are inconsistencies about the references
- * @throws InvalidSpanOptionException when one of the options is invalid
- */
- public static function create(array $options): StartSpanOptions
- {
- $spanOptions = new self();
-
- foreach ($options as $key => $value) {
- switch ($key) {
- case 'child_of':
- if (!empty($spanOptions->references)) {
- throw InvalidSpanOptionException::forIncludingBothChildOfAndReferences();
- }
-
- $spanOptions->references[] = self::buildChildOf($value);
- break;
-
- case 'references':
- if (!empty($spanOptions->references)) {
- throw InvalidSpanOptionException::forIncludingBothChildOfAndReferences();
- }
-
- if ($value instanceof Reference) {
- $spanOptions->references = [$value];
- } elseif (is_array($value)) {
- $spanOptions->references = self::buildReferences($value);
- } else {
- throw InvalidSpanOptionException::forInvalidReferenceSet($value);
- }
-
- break;
-
- case 'tags':
- if (!is_array($value)) {
- throw InvalidSpanOptionException::forInvalidTags($value);
- }
-
- foreach ($value as $tag => $tagValue) {
- if ($tag !== (string)$tag) {
- throw InvalidSpanOptionException::forInvalidTag($tag);
- }
-
- $spanOptions->tags[$tag] = $tagValue;
- }
- break;
-
- case 'start_time':
- if (is_scalar($value) && !is_numeric($value)) {
- throw InvalidSpanOptionException::forInvalidStartTime();
- }
-
- $spanOptions->startTime = $value;
- break;
-
- case 'finish_span_on_close':
- if (!is_bool($value)) {
- throw InvalidSpanOptionException::forFinishSpanOnClose($value);
- }
-
- $spanOptions->finishSpanOnClose = $value;
- break;
-
- case 'ignore_active_span':
- if (!is_bool($value)) {
- throw InvalidSpanOptionException::forIgnoreActiveSpan($value);
- }
-
- $spanOptions->ignoreActiveSpan = $value;
- break;
-
- default:
- throw InvalidSpanOptionException::forUnknownOption($key);
- }
- }
-
- return $spanOptions;
- }
-
- /**
- * @param Span|SpanContext $parent
- * @return StartSpanOptions
- */
- public function withParent($parent): StartSpanOptions
- {
- $newSpanOptions = new StartSpanOptions();
- $newSpanOptions->references[] = self::buildChildOf($parent);
- $newSpanOptions->tags = $this->tags;
- $newSpanOptions->startTime = $this->startTime;
- $newSpanOptions->finishSpanOnClose = $this->finishSpanOnClose;
- $newSpanOptions->ignoreActiveSpan = $this->ignoreActiveSpan;
-
- return $newSpanOptions;
- }
-
- /**
- * @return Reference[]
- */
- public function getReferences(): array
- {
- return $this->references;
- }
-
- /**
- * @return array
- */
- public function getTags(): array
- {
- return $this->tags;
- }
-
- /**
- * @return int|float|DateTime|null if returning float or int it should represent
- * the timestamp (including as many decimal places as you need)
- */
- public function getStartTime()
- {
- return $this->startTime;
- }
-
- /**
- * @return bool
- */
- public function shouldFinishSpanOnClose(): bool
- {
- return $this->finishSpanOnClose;
- }
-
- /**
- * @return bool
- */
- public function shouldIgnoreActiveSpan(): bool
- {
- return $this->ignoreActiveSpan;
- }
-
- private static function buildChildOf($value): Reference
- {
- if ($value instanceof Span) {
- return Reference::createForSpan(Reference::CHILD_OF, $value);
- }
-
- if ($value instanceof SpanContext) {
- return new Reference(Reference::CHILD_OF, $value);
- }
-
- throw InvalidSpanOptionException::forInvalidChildOf($value);
- }
-
- private static function buildReferences(array $referencesArray): array
- {
- $references = [];
-
- foreach ($referencesArray as $reference) {
- if (!($reference instanceof Reference)) {
- throw InvalidSpanOptionException::forInvalidReference($reference);
- }
-
- $references[] = $reference;
- }
-
- return $references;
- }
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Tags.php b/vendor/opentracing/opentracing/src/OpenTracing/Tags.php
deleted file mode 100644
index 5d06627de..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Tags.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tags;
-
-/**
- * SpanKind hints at relationship between spans, e.g. client/server
- */
-const SPAN_KIND = 'span.kind';
-
-/**
- * Marks a span representing the client-side of an RPC or other remote call
- */
-const SPAN_KIND_RPC_CLIENT = 'client';
-
-/**
- * Marks a span representing the server-side of an RPC or other remote call
- */
-const SPAN_KIND_RPC_SERVER = 'server';
-
-/**
- * Marks a span as representing the producer within a messaging context
- */
-const SPAN_KIND_MESSAGE_BUS_PRODUCER = 'producer';
-
-/**
- * Marks a span as representing the consumer within a messaging context
- */
-const SPAN_KIND_MESSAGE_BUS_CONSUMER = 'consumer';
-
-/**
- * Component is a low-cardinality identifier of the module, library,
- * or package that is generating a span.
- */
-const COMPONENT = 'component';
-
-/**
- * SAMPLING_PRIORITY (uint16) determines the priority of sampling this Span.
- */
-const SAMPLING_PRIORITY = 'sampling.priority';
-
-/**
- * PeerService records the service name of the peer
- */
-const PEER_SERVICE = 'peer.service';
-
-/**
- * PeerHostname records the host name of the peer
- */
-const PEER_HOSTNAME = 'peer.hostname';
-
-/**
- * PEER_ADDRESS (string) suitable for use in a networking client library.
- * This may be a "ip:port", a bare "hostname", a FQDN, or even a # JDBC
- * substring like "mysql://prod-db:3306"
- */
-const PEER_ADDRESS = 'peer.address';
-
-/**
- * PEER_HOST_IPV4 (uint32) records IP v4 host address of the peer
- */
-const PEER_HOST_IPV4 = 'peer.ipv4';
-
-/**
- * PEER_HOST_IPV6 (string) records IP v6 host address of the peer
- */
-const PEER_HOST_IPV6 = 'peer.ipv6';
-
-/** PEER_PORT (uint16) records port number of the peer */
-const PEER_PORT = 'peer.port';
-
-/**
- * HTTPUrl should be the URL of the request being handled in this segment
- * of the trace, in standard URI format. The protocol is optional.
- */
-const HTTP_URL = 'http.url';
-
-/**
- * HTTPMethod is the HTTP method of the request, and is case-insensitive.
- */
-const HTTP_METHOD = 'http.method';
-
-/**
- * HTTPStatusCode is the numeric HTTP status code (200, 404, etc) of the
- * HTTP response.
- */
-const HTTP_STATUS_CODE = 'http.status_code';
-
-/**
- * DATABASE_INSTANCE (string) The database instance name.
- */
-const DATABASE_INSTANCE = 'db.instance';
-
-/**
- * DATABASE_STATEMENT (string) A database statement for the given database
- * type. E.g., for db.type="SQL", "SELECT * FROM user_table"; # for
- * db.type="redis", "SET mykey 'WuValue'". */
-const DATABASE_STATEMENT = 'db.statement';
-
-/**
- * DATABASE_TYPE (string) For any SQL database, "sql". For others, the lower-case
- * database category, e.g. "cassandra", "hbase", or "redis".
- */
-const DATABASE_TYPE = 'db.type';
-
-/**
- * DATABASE_USER (string) Username for accessing database. E.g., "readonly_user" or
- * "reporting_user"
- */
-const DATABASE_USER = 'db.user';
-
-/**
- * MESSAGE_BUS_DESTINATION (string) An address at which messages can be #
- * exchanged. E.g. A Kafka record has an associated "topic name" that can #
- * be extracted by the instrumented producer or consumer and stored # using
- * this tag.
- */
-const MESSAGE_BUS_DESTINATION = 'message_bus.destination';
-
-/**
- * Error indicates that operation represented by the span resulted in an error.
- */
-const ERROR = 'error';
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Tracer.php b/vendor/opentracing/opentracing/src/OpenTracing/Tracer.php
deleted file mode 100644
index 391a5159b..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Tracer.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use OpenTracing\UnsupportedFormatException;
-use OpenTracing\InvalidSpanOptionException;
-use OpenTracing\InvalidReferencesSetException;
-
-interface Tracer
-{
- /**
- * Returns the current {@link ScopeManager}, which may be a noop but may not be null.
- *
- * @return ScopeManager
- */
- public function getScopeManager(): ScopeManager;
-
- /**
- * Returns the active {@link Span}. This is a shorthand for
- * Tracer::getScopeManager()->getActive()->getSpan(),
- * and null will be returned if {@link Scope#active()} is null.
- *
- * @return Span|null
- */
- public function getActiveSpan(): ?Span;
-
- /**
- * Starts a new span that is activated on a scope manager.
- *
- * It's also possible to not finish the {@see \OpenTracing\Span} when
- * {@see \OpenTracing\Scope} context expires:
- *
- * $scope = $tracer->startActiveSpan('...', [
- * 'finish_span_on_close' => false,
- * ]);
- * $span = $scope->getSpan();
- * try {
- * $span->setTag(Tags\HTTP_METHOD, 'GET');
- * // ...
- * } finally {
- * $scope->close();
- * }
- * // $span->finish() is not called as part of Scope deactivation as
- * // finish_span_on_close is false
- *
- * @param string $operationName
- * @param array|StartSpanOptions $options Same as for startSpan() with
- * additional option of `finish_span_on_close` that enables finishing
- * of span whenever a scope is closed. It is true by default.
- *
- * @return Scope A Scope that holds newly created Span and is activated on
- * a ScopeManager.
- */
- public function startActiveSpan(string $operationName, $options = []): Scope;
-
- /**
- * Starts and returns a new span representing a unit of work.
- *
- * Whenever `child_of` reference is not passed then
- * {@see \OpenTracing\ScopeManager::getActive()} span is used as `child_of`
- * reference. In order to ignore implicit parent span pass in
- * `ignore_active_span` option set to true.
- *
- * Starting a span with explicit parent:
- *
- * $tracer->startSpan('...', [
- * 'child_of' => $parentSpan,
- * ]);
- *
- * @param string $operationName
- * @param array|StartSpanOptions $options See StartSpanOptions for
- * available options.
- *
- * @return Span
- *
- * @throws InvalidSpanOptionException for invalid option
- * @throws InvalidReferencesSetException for invalid references set
- * @see \OpenTracing\StartSpanOptions
- */
- public function startSpan(string $operationName, $options = []): Span;
-
- /**
- * @param SpanContext $spanContext
- * @param string $format
- * @param mixed $carrier
- * @return void
- *
- * @throws UnsupportedFormatException when the format is not recognized by the tracer
- * implementation
- * @see Formats
- */
- public function inject(SpanContext $spanContext, string $format, &$carrier): void;
-
- /**
- * @param string $format
- * @param mixed $carrier
- * @return SpanContext|null
- *
- * @throws UnsupportedFormatException when the format is not recognized by the tracer
- * implementation
- * @see Formats
- */
- public function extract(string $format, $carrier): ?SpanContext;
-
- /**
- * Allow tracer to send span data to be instrumented.
- *
- * This method might not be needed depending on the tracing implementation
- * but one should make sure this method is called after the request is delivered
- * to the client.
- *
- * As an implementor, a good idea would be to use {@see register_shutdown_function}
- * or {@see fastcgi_finish_request} in order to not to delay the end of the request
- * to the client.
- */
- public function flush(): void;
-}
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/UnsupportedFormatException.php b/vendor/opentracing/opentracing/src/OpenTracing/UnsupportedFormatException.php
deleted file mode 100644
index dd4ef56a3..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/UnsupportedFormatException.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use UnexpectedValueException;
-
-/**
- * Thrown when trying to inject or extract in an invalid format
- */
-final class UnsupportedFormatException extends UnexpectedValueException
-{
- /**
- * @param string $format
- * @return UnsupportedFormatException
- */
- public static function forFormat(string $format): UnsupportedFormatException
- {
- return new self(sprintf('The format "%s" is not supported.', $format));
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockScopeManagerTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockScopeManagerTest.php
deleted file mode 100644
index eeca24497..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockScopeManagerTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests\Mock;
-
-use OpenTracing\Mock\MockScopeManager;
-use OpenTracing\Mock\MockTracer;
-use PHPUnit\Framework\TestCase;
-
-final class MockScopeManagerTest extends TestCase
-{
- private const OPERATION_NAME = 'test_name';
-
- public function testGetActiveFailsWithNoActiveSpans()
- {
- $scopeManager = new MockScopeManager();
-
- $this->assertNull($scopeManager->getActive());
- }
-
- public function testActivateSuccess()
- {
- $tracer = new MockTracer();
- $span = $tracer->startSpan(self::OPERATION_NAME);
- $scopeManager = new MockScopeManager();
- $scopeManager->activate($span);
-
- $this->assertSame($span, $scopeManager->getActive()->getSpan());
- }
-
- public function testGetScopeReturnsNull()
- {
- $tracer = new MockTracer();
- $tracer->startSpan(self::OPERATION_NAME);
- $scopeManager = new MockScopeManager();
-
- $this->assertNull($scopeManager->getActive());
- }
-
- public function testGetScopeSuccess()
- {
- $tracer = new MockTracer();
- $span = $tracer->startSpan(self::OPERATION_NAME);
- $scopeManager = new MockScopeManager();
- $scopeManager->activate($span);
- $scope = $scopeManager->getActive();
-
- $this->assertSame($span, $scope->getSpan());
- }
-
- public function testDeactivateSuccess()
- {
- $tracer = new MockTracer();
- $span = $tracer->startSpan(self::OPERATION_NAME);
- $scopeManager = new MockScopeManager();
- $scopeManager->activate($span);
- $scope = $scopeManager->getActive();
- $scopeManager->deactivate($scope);
-
- $this->assertNull($scopeManager->getActive());
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanContextTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanContextTest.php
deleted file mode 100644
index 501450b24..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanContextTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests\Mock;
-
-use OpenTracing\Mock\MockSpanContext;
-use PHPUnit\Framework\TestCase;
-
-final class MockSpanContextTest extends TestCase
-{
- private const TRACE_ID = 123987;
- private const SPAN_ID = 555632;
- private const IS_SAMPLED = true;
- private const BAGGAGE_ITEM_KEY = 'test_key';
- private const BAGGAGE_ITEM_VALUE = 'test_value';
-
- public function testCreateAsRootSuccess()
- {
- $parentContext = MockSpanContext::createAsRoot();
- $childContext = MockSpanContext::createAsChildOf($parentContext);
-
- $this->assertEquals($parentContext->getTraceId(), $childContext->getTraceId());
- }
-
- public function testCreateMockSpanContextSuccess()
- {
- $spanContext = MockSpanContext::create(
- self::TRACE_ID,
- self::SPAN_ID,
- self::IS_SAMPLED,
- [self::BAGGAGE_ITEM_KEY => self::BAGGAGE_ITEM_VALUE]
- );
-
- $this->assertEquals($spanContext->getTraceId(), self::TRACE_ID);
- $this->assertEquals($spanContext->getSpanId(), self::SPAN_ID);
- $this->assertEquals($spanContext->isSampled(), self::IS_SAMPLED);
- $this->assertEquals([self::BAGGAGE_ITEM_KEY => self::BAGGAGE_ITEM_VALUE], iterator_to_array($spanContext));
- $this->assertEquals(self::BAGGAGE_ITEM_VALUE, $spanContext->getBaggageItem(self::BAGGAGE_ITEM_KEY));
- }
-
- public function testAddBaggageItemSuccess()
- {
- $spanContext = MockSpanContext::create(
- self::TRACE_ID,
- self::SPAN_ID,
- self::IS_SAMPLED
- );
- $this->assertEmpty(iterator_to_array($spanContext));
-
- $spanContext = $spanContext->withBaggageItem(self::BAGGAGE_ITEM_KEY, self::BAGGAGE_ITEM_VALUE);
- $this->assertEquals([self::BAGGAGE_ITEM_KEY => self::BAGGAGE_ITEM_VALUE], iterator_to_array($spanContext));
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanTest.php
deleted file mode 100644
index 51e4b66f8..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockSpanTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests\Mock;
-
-use OpenTracing\Mock\MockSpan;
-use OpenTracing\Mock\MockSpanContext;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers MockSpan
- */
-final class MockSpanTest extends TestCase
-{
- private const OPERATION_NAME = 'test';
- private const DURATION = 10;
- private const TAG_KEY = 'test_key';
- private const TAG_VALUE = 'test_value';
- private const LOG_FIELD = 'test_log';
-
- public function testCreateSpanSuccess()
- {
- $startTime = time();
- $span = new MockSpan(self::OPERATION_NAME, MockSpanContext::createAsRoot(), $startTime);
-
- $this->assertEquals($startTime, $span->getStartTime());
- $this->assertEmpty($span->getTags());
- $this->assertEmpty($span->getLogs());
- }
-
- public function testAddTagsAndLogsToSpanSuccess()
- {
- $span = new MockSpan(self::OPERATION_NAME, MockSpanContext::createAsRoot());
-
- $span->setTag(self::TAG_KEY, self::TAG_VALUE);
- $span->log([self::LOG_FIELD]);
-
- $this->assertEquals([self::TAG_KEY => self::TAG_VALUE], $span->getTags());
- $this->assertEquals(self::LOG_FIELD, $span->getLogs()[0]['fields'][0]);
- }
-
- public function testSpanIsFinished()
- {
- $startTime = time();
- $span = new MockSpan(self::OPERATION_NAME, MockSpanContext::createAsRoot(), $startTime);
- $span->finish($startTime + self::DURATION);
-
- $this->assertTrue($span->isFinished());
- $this->assertEquals(self::DURATION, $span->getDuration());
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockTracerTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockTracerTest.php
deleted file mode 100644
index ab2faf159..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/Mock/MockTracerTest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests\Mock;
-
-use OpenTracing\InvalidReferenceArgumentException;
-use OpenTracing\UnsupportedFormatException;
-use OpenTracing\Mock\MockTracer;
-use OpenTracing\NoopSpanContext;
-use OpenTracing\Reference;
-use OpenTracing\Span;
-use OpenTracing\SpanContext;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers MockTracer
- */
-final class MockTracerTest extends TestCase
-{
- private const OPERATION_NAME = 'test_name';
- private const FORMAT = 'test_format';
-
- public function testStartActiveSpanSuccess()
- {
- $tracer = new MockTracer();
- $scope = $tracer->startActiveSpan(self::OPERATION_NAME);
- $activeSpan = $tracer->getActiveSpan();
-
- $this->assertEquals($scope->getSpan(), $activeSpan);
- }
-
- public function testStartSpanSuccess()
- {
- $tracer = new MockTracer();
- $tracer->startSpan(self::OPERATION_NAME);
- $activeSpan = $tracer->getActiveSpan();
-
- $this->assertNull($activeSpan);
- }
-
- public function testStartSpanWithReference(): void
- {
- $tracer = new MockTracer();
- $tracer->startSpan('parent_name');
- /** @var Span $parentSpan */
- $parentSpan = $tracer->getSpans()[0];
- $tracer->startSpan(
- self::OPERATION_NAME,
- ['references' => [Reference::createForSpan(Reference::CHILD_OF, $parentSpan)]]
- );
- $activeSpan = $tracer->getActiveSpan();
-
- self::assertNull($activeSpan);
- }
-
- public function testStartSpanWithReferenceWithoutExpectedContextType(): void
- {
- $tracer = new MockTracer();
- $notAMockContext = new NoopSpanContext();
-
- $this->expectException(InvalidReferenceArgumentException::class);
-
- $tracer->startSpan(
- self::OPERATION_NAME,
- ['references' => [new Reference(Reference::CHILD_OF, $notAMockContext)]]
- );
- }
-
- public function testInjectWithNoInjectorsFails()
- {
- $tracer = new MockTracer();
- $span = $tracer->startSpan(self::OPERATION_NAME);
- $carrier = [];
-
- $this->expectException(UnsupportedFormatException::class);
- $tracer->inject($span->getContext(), self::FORMAT, $carrier);
- }
-
- public function testInjectSuccess()
- {
- $actualSpanContext = null;
- $actualCarrier = null;
-
- $injector = function ($spanContext, &$carrier) use (&$actualSpanContext, &$actualCarrier) {
- $actualSpanContext = $spanContext;
- $actualCarrier = $carrier;
- };
-
- $tracer = new MockTracer([self::FORMAT => $injector]);
- $span = $tracer->startSpan(self::OPERATION_NAME);
- $carrier = [];
- $tracer->inject($span->getContext(), self::FORMAT, $carrier);
-
- $this->assertSame($span->getContext(), $actualSpanContext);
- $this->assertSame($carrier, $actualCarrier);
- }
-
- public function testExtractWithNoExtractorsFails()
- {
- $tracer = new MockTracer();
- $carrier = [];
-
- $this->expectException(UnsupportedFormatException::class);
- $tracer->extract(self::FORMAT, $carrier);
- }
-
- public function testExtractSuccess()
- {
- $actualSpanContext = null;
- $actualCarrier = null;
-
- $extractor = function ($carrier) use (&$actualCarrier) {
- $actualCarrier = $carrier;
- return new NoopSpanContext();
- };
-
- $tracer = new MockTracer([], [self::FORMAT => $extractor]);
- $carrier = [
- 'TRACE_ID' => 'trace_id'
- ];
-
- $spanContext = $tracer->extract(self::FORMAT, $carrier);
-
- $this->assertInstanceOf(SpanContext::class, $spanContext);
- }
-
- public function testFlushSuccess()
- {
- $tracer = new MockTracer();
- $tracer->startSpan(self::OPERATION_NAME);
-
- $this->assertCount(1, $tracer->getSpans());
-
- $tracer->flush();
-
- $this->assertCount(0, $tracer->getSpans());
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/ReferenceTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/ReferenceTest.php
deleted file mode 100644
index cb971a20c..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/ReferenceTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests;
-
-use TypeError;
-use PHPUnit\Framework\TestCase;
-use OpenTracing\Reference;
-use OpenTracing\NoopSpanContext;
-use OpenTracing\InvalidReferenceArgumentException;
-
-/**
- * @covers Reference
- */
-final class ReferenceTest extends TestCase
-{
- const REFERENCE_TYPE = 'ref_type';
-
- public function testCreateAReferenceFailsOnInvalidContext()
- {
- $context = 'invalid_context';
-
- $this->expectException(TypeError::class);
- new Reference('child_of', $context);
- }
-
- public function testCreateAReferenceFailsOnEmptyType()
- {
- $context = new NoopSpanContext();
-
- $this->expectException(InvalidReferenceArgumentException::class);
- $this->expectExceptionMessage('Reference type can not be an empty string');
- new Reference('', $context);
- }
-
- public function testAReferenceCanBeCreatedAsACustomType()
- {
- $context = new NoopSpanContext();
- $reference = new Reference(self::REFERENCE_TYPE, $context);
-
- $this->assertSame($context, $reference->getSpanContext());
- $this->assertTrue($reference->isType(self::REFERENCE_TYPE));
- }
-}
diff --git a/vendor/opentracing/opentracing/tests/OpenTracing/StartSpanOptionsTest.php b/vendor/opentracing/opentracing/tests/OpenTracing/StartSpanOptionsTest.php
deleted file mode 100644
index d7e1504a8..000000000
--- a/vendor/opentracing/opentracing/tests/OpenTracing/StartSpanOptionsTest.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing\Tests;
-
-use DateTime;
-use OpenTracing\InvalidSpanOptionException;
-use OpenTracing\NoopSpanContext;
-use OpenTracing\Reference;
-use OpenTracing\StartSpanOptions;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers StartSpanOptions
- */
-final class StartSpanOptionsTest extends TestCase
-{
- const REFERENCE_TYPE = 'a_reference_type';
-
- public function testSpanOptionsCanNotBeCreatedDueToInvalidOption()
- {
- $this->expectException(InvalidSpanOptionException::class);
-
- StartSpanOptions::create([
- 'unknown_option' => 'value'
- ]);
- }
-
- public function testSpanOptionsWithInvalidCloseOnFinishOption()
- {
- $this->expectException(InvalidSpanOptionException::class);
-
- StartSpanOptions::create([
- 'finish_span_on_close' => 'value'
- ]);
- }
-
- public function testSpanOptionsCanNotBeCreatedBecauseInvalidStartTime()
- {
- $this->expectException(InvalidSpanOptionException::class);
-
- StartSpanOptions::create([
- 'start_time' => 'abc'
- ]);
- }
-
- /** @dataProvider validStartTime */
- public function testSpanOptionsCanBeCreatedBecauseWithValidStartTime($startTime)
- {
- $spanOptions = StartSpanOptions::create([
- 'start_time' => $startTime
- ]);
-
- $this->assertEquals($spanOptions->getStartTime(), $startTime);
- }
-
- public function validStartTime()
- {
- return [
- [new DateTime()],
- ['1499355363'],
- [1499355363],
- [1499355363.123456]
- ];
- }
-
- public function testSpanOptionsCanBeCreatedWithValidReference()
- {
- $context = new NoopSpanContext();
-
- $options = [
- 'references' => new Reference(self::REFERENCE_TYPE, $context),
- ];
-
- $spanOptions = StartSpanOptions::create($options);
- $references = $spanOptions->getReferences()[0];
-
- $this->assertTrue($references->isType(self::REFERENCE_TYPE));
- $this->assertSame($context, $references->getSpanContext());
- }
-
- public function testSpanOptionsDefaultCloseOnFinishValue()
- {
- $options = StartSpanOptions::create([]);
-
- $this->assertTrue($options->shouldFinishSpanOnClose());
- }
-
- public function testSpanOptionsWithValidFinishSpanOnClose()
- {
- $options = StartSpanOptions::create([
- 'finish_span_on_close' => false,
- ]);
-
- $this->assertFalse($options->shouldFinishSpanOnClose());
- }
-
- public function testSpanOptionsAddsANewReference()
- {
- $context1 = new NoopSpanContext();
- $spanOptions = StartSpanOptions::create([
- 'child_of' => $context1,
- ]);
- $this->assertCount(1, $spanOptions->getReferences());
-
- $context2 = new NoopSpanContext();
- $spanOptions = $spanOptions->withParent($context2);
-
- $this->assertCount(1, $spanOptions->getReferences());
- $this->assertSame($context2, $spanOptions->getReferences()[0]->getSpanContext());
- }
-
- public function testDefaultIgnoreActiveSpan()
- {
- $options = StartSpanOptions::create([]);
-
- $this->assertFalse($options->shouldIgnoreActiveSpan());
- }
-
- public function testSpanOptionsWithValidIgnoreActiveSpan()
- {
- $options = StartSpanOptions::create([
- 'ignore_active_span' => true,
- ]);
-
- $this->assertTrue($options->shouldIgnoreActiveSpan());
- }
-}
diff --git a/vendor/packaged/thrift/.gitignore b/vendor/packaged/thrift/.gitignore
deleted file mode 100644
index ff72e2d08..000000000
--- a/vendor/packaged/thrift/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/composer.lock
-/vendor
diff --git a/vendor/packaged/thrift/README.md b/vendor/packaged/thrift/README.md
deleted file mode 100644
index c35ca057e..000000000
--- a/vendor/packaged/thrift/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-Apache Thrift
-=====
-
-The code provided by this library is from:
-https://github.com/apache/thrift/tree/master/lib/php/lib
-
-This repo has been created to provide the thrift protocol via composer
-
-
-Thrift PHP Software Library
-
-License
-=======
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
-
-Dependencies
-============
-
-PHP_INT_SIZE
-
- This built-in signals whether your architecture is 32 or 64 bit and is
- used by the TBinaryProtocol to properly use pack() and unpack() to
- serialize data.
-
-apc_fetch(), apc_store()
-
- APC cache is used by the TSocketPool class. If you do not have APC installed,
- Thrift will fill in null stub function definitions.
diff --git a/vendor/packaged/thrift/composer.json b/vendor/packaged/thrift/composer.json
deleted file mode 100644
index 8a8227dd3..000000000
--- a/vendor/packaged/thrift/composer.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "packaged/thrift",
- "description": "Apache Thrift",
- "keywords": ["thrift", "apache"],
- "homepage": "http://thrift.apache.org/",
- "minimum-stability": "stable",
- "license": "Apache-2.0",
- "require": {
- "php": "^5.5 || ^7.0 || ^8.0"
- },
- "autoload": {
- "psr-4": {
- "Thrift\\": "src/"
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Base/TBase.php b/vendor/packaged/thrift/src/Base/TBase.php
deleted file mode 100644
index c61b631af..000000000
--- a/vendor/packaged/thrift/src/Base/TBase.php
+++ /dev/null
@@ -1,382 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Base;
-
-use Thrift\Type\TType;
-
-/**
- * Base class from which other Thrift structs extend. This is so that we can
- * cut back on the size of the generated code which is turning out to have a
- * nontrivial cost just to load thanks to the wondrously abysmal implementation
- * of PHP. Note that code is intentionally duplicated in here to avoid making
- * function calls for every field or member of a container..
- */
-abstract class TBase
-{
- public static $tmethod = array(
- TType::BOOL => 'Bool',
- TType::BYTE => 'Byte',
- TType::I16 => 'I16',
- TType::I32 => 'I32',
- TType::I64 => 'I64',
- TType::DOUBLE => 'Double',
- TType::STRING => 'String'
- );
-
- abstract public function read($input);
-
- abstract public function write($output);
-
- public function __construct($spec = null, $vals = null)
- {
- if (is_array($spec) && is_array($vals)) {
- foreach ($spec as $fid => $fspec) {
- $var = $fspec['var'];
- if (isset($vals[$var])) {
- $this->$var = $vals[$var];
- }
- }
- }
- }
-
- public function __wakeup()
- {
- $this->__construct(get_object_vars($this));
- }
-
- private function _readMap(&$var, $spec, $input)
- {
- $xfer = 0;
- $ktype = $spec['ktype'];
- $vtype = $spec['vtype'];
- $kread = $vread = null;
- if (isset(TBase::$tmethod[$ktype])) {
- $kread = 'read' . TBase::$tmethod[$ktype];
- } else {
- $kspec = $spec['key'];
- }
- if (isset(TBase::$tmethod[$vtype])) {
- $vread = 'read' . TBase::$tmethod[$vtype];
- } else {
- $vspec = $spec['val'];
- }
- $var = array();
- $_ktype = $_vtype = $size = 0;
- $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
- for ($i = 0; $i < $size; ++$i) {
- $key = $val = null;
- if ($kread !== null) {
- $xfer += $input->$kread($key);
- } else {
- switch ($ktype) {
- case TType::STRUCT:
- $class = $kspec['class'];
- $key = new $class();
- $xfer += $key->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($key, $kspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($key, $kspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($key, $kspec, $input, true);
- break;
- }
- }
- if ($vread !== null) {
- $xfer += $input->$vread($val);
- } else {
- switch ($vtype) {
- case TType::STRUCT:
- $class = $vspec['class'];
- $val = new $class();
- $xfer += $val->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($val, $vspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($val, $vspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($val, $vspec, $input, true);
- break;
- }
- }
- $var[$key] = $val;
- }
- $xfer += $input->readMapEnd();
-
- return $xfer;
- }
-
- private function _readList(&$var, $spec, $input, $set = false)
- {
- $xfer = 0;
- $etype = $spec['etype'];
- $eread = $vread = null;
- if (isset(TBase::$tmethod[$etype])) {
- $eread = 'read' . TBase::$tmethod[$etype];
- } else {
- $espec = $spec['elem'];
- }
- $var = array();
- $_etype = $size = 0;
- if ($set) {
- $xfer += $input->readSetBegin($_etype, $size);
- } else {
- $xfer += $input->readListBegin($_etype, $size);
- }
- for ($i = 0; $i < $size; ++$i) {
- $elem = null;
- if ($eread !== null) {
- $xfer += $input->$eread($elem);
- } else {
- $espec = $spec['elem'];
- switch ($etype) {
- case TType::STRUCT:
- $class = $espec['class'];
- $elem = new $class();
- $xfer += $elem->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($elem, $espec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($elem, $espec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($elem, $espec, $input, true);
- break;
- }
- }
- if ($set) {
- $var[$elem] = true;
- } else {
- $var [] = $elem;
- }
- }
- if ($set) {
- $xfer += $input->readSetEnd();
- } else {
- $xfer += $input->readListEnd();
- }
-
- return $xfer;
- }
-
- protected function _read($class, $spec, $input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true) {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- if (isset($spec[$fid])) {
- $fspec = $spec[$fid];
- $var = $fspec['var'];
- if ($ftype == $fspec['type']) {
- $xfer = 0;
- if (isset(TBase::$tmethod[$ftype])) {
- $func = 'read' . TBase::$tmethod[$ftype];
- $xfer += $input->$func($this->$var);
- } else {
- switch ($ftype) {
- case TType::STRUCT:
- $class = $fspec['class'];
- $this->$var = new $class();
- $xfer += $this->$var->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($this->$var, $fspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($this->$var, $fspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($this->$var, $fspec, $input, true);
- break;
- }
- }
- } else {
- $xfer += $input->skip($ftype);
- }
- } else {
- $xfer += $input->skip($ftype);
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
-
- return $xfer;
- }
-
- private function _writeMap($var, $spec, $output)
- {
- $xfer = 0;
- $ktype = $spec['ktype'];
- $vtype = $spec['vtype'];
- $kwrite = $vwrite = null;
- if (isset(TBase::$tmethod[$ktype])) {
- $kwrite = 'write' . TBase::$tmethod[$ktype];
- } else {
- $kspec = $spec['key'];
- }
- if (isset(TBase::$tmethod[$vtype])) {
- $vwrite = 'write' . TBase::$tmethod[$vtype];
- } else {
- $vspec = $spec['val'];
- }
- $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
- foreach ($var as $key => $val) {
- if (isset($kwrite)) {
- $xfer += $output->$kwrite($key);
- } else {
- switch ($ktype) {
- case TType::STRUCT:
- $xfer += $key->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($key, $kspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($key, $kspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($key, $kspec, $output, true);
- break;
- }
- }
- if (isset($vwrite)) {
- $xfer += $output->$vwrite($val);
- } else {
- switch ($vtype) {
- case TType::STRUCT:
- $xfer += $val->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($val, $vspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($val, $vspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($val, $vspec, $output, true);
- break;
- }
- }
- }
- $xfer += $output->writeMapEnd();
-
- return $xfer;
- }
-
- private function _writeList($var, $spec, $output, $set = false)
- {
- $xfer = 0;
- $etype = $spec['etype'];
- $ewrite = null;
- if (isset(TBase::$tmethod[$etype])) {
- $ewrite = 'write' . TBase::$tmethod[$etype];
- } else {
- $espec = $spec['elem'];
- }
- if ($set) {
- $xfer += $output->writeSetBegin($etype, count($var));
- } else {
- $xfer += $output->writeListBegin($etype, count($var));
- }
- foreach ($var as $key => $val) {
- $elem = $set ? $key : $val;
- if (isset($ewrite)) {
- $xfer += $output->$ewrite($elem);
- } else {
- switch ($etype) {
- case TType::STRUCT:
- $xfer += $elem->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($elem, $espec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($elem, $espec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($elem, $espec, $output, true);
- break;
- }
- }
- }
- if ($set) {
- $xfer += $output->writeSetEnd();
- } else {
- $xfer += $output->writeListEnd();
- }
-
- return $xfer;
- }
-
- protected function _write($class, $spec, $output)
- {
- $xfer = 0;
- $xfer += $output->writeStructBegin($class);
- foreach ($spec as $fid => $fspec) {
- $var = $fspec['var'];
- if ($this->$var !== null) {
- $ftype = $fspec['type'];
- $xfer += $output->writeFieldBegin($var, $ftype, $fid);
- if (isset(TBase::$tmethod[$ftype])) {
- $func = 'write' . TBase::$tmethod[$ftype];
- $xfer += $output->$func($this->$var);
- } else {
- switch ($ftype) {
- case TType::STRUCT:
- $xfer += $this->$var->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($this->$var, $fspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($this->$var, $fspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($this->$var, $fspec, $output, true);
- break;
- }
- }
- $xfer += $output->writeFieldEnd();
- }
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
-
- return $xfer;
- }
-}
diff --git a/vendor/packaged/thrift/src/ClassLoader/ThriftClassLoader.php b/vendor/packaged/thrift/src/ClassLoader/ThriftClassLoader.php
deleted file mode 100644
index 4361bd84e..000000000
--- a/vendor/packaged/thrift/src/ClassLoader/ThriftClassLoader.php
+++ /dev/null
@@ -1,206 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * ClassLoader to load Thrift library and definitions
- * Inspired from UniversalClassLoader from Symfony 2
- *
- * @package thrift.classloader
- */
-
-namespace Thrift\ClassLoader;
-
-class ThriftClassLoader
-{
- /**
- * Namespaces path
- * @var array
- */
- protected $namespaces = array();
-
- /**
- * Thrift definition paths
- * @var type
- */
- protected $definitions = array();
-
- /**
- * Do we use APC cache ?
- * @var boolean
- */
- protected $apc = false;
-
- /**
- * APC Cache prefix
- * @var string
- */
- protected $apc_prefix;
-
- /**
- * Set autoloader to use APC cache
- * @param boolean $apc
- * @param string $apc_prefix
- */
- public function __construct($apc = false, $apc_prefix = null)
- {
- $this->apc = $apc;
- $this->apc_prefix = $apc_prefix;
- }
-
- /**
- * Registers a namespace.
- *
- * @param string $namespace The namespace
- * @param array|string $paths The location(s) of the namespace
- */
- public function registerNamespace($namespace, $paths)
- {
- $this->namespaces[$namespace] = (array)$paths;
- }
-
- /**
- * Registers a Thrift definition namespace.
- *
- * @param string $namespace The definition namespace
- * @param array|string $paths The location(s) of the definition namespace
- */
- public function registerDefinition($namespace, $paths)
- {
- $this->definitions[$namespace] = (array)$paths;
- }
-
- /**
- * Registers this instance as an autoloader.
- *
- * @param Boolean $prepend Whether to prepend the autoloader or not
- */
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
- }
-
- /**
- * Loads the given class, definition or interface.
- *
- * @param string $class The name of the class
- */
- public function loadClass($class)
- {
- if ((true === $this->apc && ($file = $this->findFileInApc($class))) or
- ($file = $this->findFile($class))
- ) {
- require_once $file;
- }
- }
-
- /**
- * Loads the given class or interface in APC.
- * @param string $class The name of the class
- * @return string
- */
- protected function findFileInApc($class)
- {
- if (false === $file = apc_fetch($this->apc_prefix . $class)) {
- apc_store($this->apc_prefix . $class, $file = $this->findFile($class));
- }
-
- return $file;
- }
-
- /**
- * Find class in namespaces or definitions directories
- * @param string $class
- * @return string
- */
- public function findFile($class)
- {
- // Remove first backslash
- if ('\\' == $class[0]) {
- $class = substr($class, 1);
- }
-
- if (false !== $pos = strrpos($class, '\\')) {
- // Namespaced class name
- $namespace = substr($class, 0, $pos);
-
- // Iterate in normal namespaces
- foreach ($this->namespaces as $ns => $dirs) {
- //Don't interfere with other autoloaders
- if (0 !== strpos($namespace, $ns)) {
- continue;
- }
-
- foreach ($dirs as $dir) {
- $className = substr($class, $pos + 1);
-
- $file = $dir . DIRECTORY_SEPARATOR .
- str_replace('\\', DIRECTORY_SEPARATOR, $namespace) .
- DIRECTORY_SEPARATOR .
- $className . '.php';
-
- if (file_exists($file)) {
- return $file;
- }
- }
- }
-
- // Iterate in Thrift namespaces
-
- // Remove first part of namespace
- $m = explode('\\', $class);
-
- // Ignore wrong call
- if (count($m) <= 1) {
- return;
- }
-
- $class = array_pop($m);
- $namespace = implode('\\', $m);
-
- foreach ($this->definitions as $ns => $dirs) {
- //Don't interfere with other autoloaders
- if (0 !== strpos($namespace, $ns)) {
- continue;
- }
-
- foreach ($dirs as $dir) {
- /**
- * Available in service: Interface, Client, Processor, Rest
- * And every service methods (_.+)
- */
- if (0 === preg_match('#(.+)(if|client|processor|rest)$#i', $class, $n) and
- 0 === preg_match('#(.+)_[a-z0-9]+_(args|result)$#i', $class, $n)
- ) {
- $className = 'Types';
- } else {
- $className = $n[1];
- }
-
- $file = $dir . DIRECTORY_SEPARATOR .
- str_replace('\\', DIRECTORY_SEPARATOR, $namespace) .
- DIRECTORY_SEPARATOR .
- $className . '.php';
-
- if (file_exists($file)) {
- return $file;
- }
- }
- }
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Exception/TApplicationException.php b/vendor/packaged/thrift/src/Exception/TApplicationException.php
deleted file mode 100644
index ebb6a6a89..000000000
--- a/vendor/packaged/thrift/src/Exception/TApplicationException.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Type\TType;
-
-class TApplicationException extends TException
-{
- public static $_TSPEC =
- array(1 => array('var' => 'message',
- 'type' => TType::STRING),
- 2 => array('var' => 'code',
- 'type' => TType::I32));
-
- const UNKNOWN = 0;
- const UNKNOWN_METHOD = 1;
- const INVALID_MESSAGE_TYPE = 2;
- const WRONG_METHOD_NAME = 3;
- const BAD_SEQUENCE_ID = 4;
- const MISSING_RESULT = 5;
- const INTERNAL_ERROR = 6;
- const PROTOCOL_ERROR = 7;
- const INVALID_TRANSFORM = 8;
- const INVALID_PROTOCOL = 9;
- const UNSUPPORTED_CLIENT_TYPE = 10;
-
- public function __construct($message = null, $code = 0)
- {
- parent::__construct($message, $code);
- }
-
- public function read($output)
- {
- return $this->_read('TApplicationException', self::$_TSPEC, $output);
- }
-
- public function write($output)
- {
- $xfer = 0;
- $xfer += $output->writeStructBegin('TApplicationException');
- if ($message = $this->getMessage()) {
- $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
- $xfer += $output->writeString($message);
- $xfer += $output->writeFieldEnd();
- }
- if ($code = $this->getCode()) {
- $xfer += $output->writeFieldBegin('type', TType::I32, 2);
- $xfer += $output->writeI32($code);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
-
- return $xfer;
- }
-}
diff --git a/vendor/packaged/thrift/src/Exception/TException.php b/vendor/packaged/thrift/src/Exception/TException.php
deleted file mode 100644
index 7dbf83293..000000000
--- a/vendor/packaged/thrift/src/Exception/TException.php
+++ /dev/null
@@ -1,384 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Type\TType;
-use Thrift\Base\TBase;
-
-/**
- * NOTE(mcslee): This currently contains a ton of duplicated code from TBase
- * because we need to save CPU cycles and this is not yet in an extension.
- * Ideally we'd multiply-inherit TException from both Exception and Base, but
- * that's not possible in PHP and there are no modules either, so for now we
- * apologetically take a trip to HackTown.
- *
- * Can be called with standard Exception constructor (message, code) or with
- * Thrift Base object constructor (spec, vals).
- *
- * @param mixed $p1 Message (string) or type-spec (array)
- * @param mixed $p2 Code (integer) or values (array)
- */
-class TException extends \Exception
-{
- public function __construct($p1 = null, $p2 = 0)
- {
- if (is_array($p1) && is_array($p2)) {
- $spec = $p1;
- $vals = $p2;
- foreach ($spec as $fid => $fspec) {
- $var = $fspec['var'];
- if (isset($vals[$var])) {
- $this->$var = $vals[$var];
- }
- }
- } else {
- parent::__construct($p1, $p2);
- }
- }
-
- public static $tmethod = array(
- TType::BOOL => 'Bool',
- TType::BYTE => 'Byte',
- TType::I16 => 'I16',
- TType::I32 => 'I32',
- TType::I64 => 'I64',
- TType::DOUBLE => 'Double',
- TType::STRING => 'String'
- );
-
- private function _readMap(&$var, $spec, $input)
- {
- $xfer = 0;
- $ktype = $spec['ktype'];
- $vtype = $spec['vtype'];
- $kread = $vread = null;
- if (isset(TBase::$tmethod[$ktype])) {
- $kread = 'read' . TBase::$tmethod[$ktype];
- } else {
- $kspec = $spec['key'];
- }
- if (isset(TBase::$tmethod[$vtype])) {
- $vread = 'read' . TBase::$tmethod[$vtype];
- } else {
- $vspec = $spec['val'];
- }
- $var = array();
- $_ktype = $_vtype = $size = 0;
- $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
- for ($i = 0; $i < $size; ++$i) {
- $key = $val = null;
- if ($kread !== null) {
- $xfer += $input->$kread($key);
- } else {
- switch ($ktype) {
- case TType::STRUCT:
- $class = $kspec['class'];
- $key = new $class();
- $xfer += $key->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($key, $kspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($key, $kspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($key, $kspec, $input, true);
- break;
- }
- }
- if ($vread !== null) {
- $xfer += $input->$vread($val);
- } else {
- switch ($vtype) {
- case TType::STRUCT:
- $class = $vspec['class'];
- $val = new $class();
- $xfer += $val->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($val, $vspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($val, $vspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($val, $vspec, $input, true);
- break;
- }
- }
- $var[$key] = $val;
- }
- $xfer += $input->readMapEnd();
-
- return $xfer;
- }
-
- private function _readList(&$var, $spec, $input, $set = false)
- {
- $xfer = 0;
- $etype = $spec['etype'];
- $eread = $vread = null;
- if (isset(TBase::$tmethod[$etype])) {
- $eread = 'read' . TBase::$tmethod[$etype];
- } else {
- $espec = $spec['elem'];
- }
- $var = array();
- $_etype = $size = 0;
- if ($set) {
- $xfer += $input->readSetBegin($_etype, $size);
- } else {
- $xfer += $input->readListBegin($_etype, $size);
- }
- for ($i = 0; $i < $size; ++$i) {
- $elem = null;
- if ($eread !== null) {
- $xfer += $input->$eread($elem);
- } else {
- $espec = $spec['elem'];
- switch ($etype) {
- case TType::STRUCT:
- $class = $espec['class'];
- $elem = new $class();
- $xfer += $elem->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($elem, $espec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($elem, $espec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($elem, $espec, $input, true);
- break;
- }
- }
- if ($set) {
- $var[$elem] = true;
- } else {
- $var [] = $elem;
- }
- }
- if ($set) {
- $xfer += $input->readSetEnd();
- } else {
- $xfer += $input->readListEnd();
- }
-
- return $xfer;
- }
-
- protected function _read($class, $spec, $input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true) {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- if (isset($spec[$fid])) {
- $fspec = $spec[$fid];
- $var = $fspec['var'];
- if ($ftype == $fspec['type']) {
- $xfer = 0;
- if (isset(TBase::$tmethod[$ftype])) {
- $func = 'read' . TBase::$tmethod[$ftype];
- $xfer += $input->$func($this->$var);
- } else {
- switch ($ftype) {
- case TType::STRUCT:
- $class = $fspec['class'];
- $this->$var = new $class();
- $xfer += $this->$var->read($input);
- break;
- case TType::MAP:
- $xfer += $this->_readMap($this->$var, $fspec, $input);
- break;
- case TType::LST:
- $xfer += $this->_readList($this->$var, $fspec, $input, false);
- break;
- case TType::SET:
- $xfer += $this->_readList($this->$var, $fspec, $input, true);
- break;
- }
- }
- } else {
- $xfer += $input->skip($ftype);
- }
- } else {
- $xfer += $input->skip($ftype);
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
-
- return $xfer;
- }
-
- private function _writeMap($var, $spec, $output)
- {
- $xfer = 0;
- $ktype = $spec['ktype'];
- $vtype = $spec['vtype'];
- $kwrite = $vwrite = null;
- if (isset(TBase::$tmethod[$ktype])) {
- $kwrite = 'write' . TBase::$tmethod[$ktype];
- } else {
- $kspec = $spec['key'];
- }
- if (isset(TBase::$tmethod[$vtype])) {
- $vwrite = 'write' . TBase::$tmethod[$vtype];
- } else {
- $vspec = $spec['val'];
- }
- $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
- foreach ($var as $key => $val) {
- if (isset($kwrite)) {
- $xfer += $output->$kwrite($key);
- } else {
- switch ($ktype) {
- case TType::STRUCT:
- $xfer += $key->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($key, $kspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($key, $kspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($key, $kspec, $output, true);
- break;
- }
- }
- if (isset($vwrite)) {
- $xfer += $output->$vwrite($val);
- } else {
- switch ($vtype) {
- case TType::STRUCT:
- $xfer += $val->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($val, $vspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($val, $vspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($val, $vspec, $output, true);
- break;
- }
- }
- }
- $xfer += $output->writeMapEnd();
-
- return $xfer;
- }
-
- private function _writeList($var, $spec, $output, $set = false)
- {
- $xfer = 0;
- $etype = $spec['etype'];
- $ewrite = null;
- if (isset(TBase::$tmethod[$etype])) {
- $ewrite = 'write' . TBase::$tmethod[$etype];
- } else {
- $espec = $spec['elem'];
- }
- if ($set) {
- $xfer += $output->writeSetBegin($etype, count($var));
- } else {
- $xfer += $output->writeListBegin($etype, count($var));
- }
- foreach ($var as $key => $val) {
- $elem = $set ? $key : $val;
- if (isset($ewrite)) {
- $xfer += $output->$ewrite($elem);
- } else {
- switch ($etype) {
- case TType::STRUCT:
- $xfer += $elem->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($elem, $espec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($elem, $espec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($elem, $espec, $output, true);
- break;
- }
- }
- }
- if ($set) {
- $xfer += $output->writeSetEnd();
- } else {
- $xfer += $output->writeListEnd();
- }
-
- return $xfer;
- }
-
- protected function _write($class, $spec, $output)
- {
- $xfer = 0;
- $xfer += $output->writeStructBegin($class);
- foreach ($spec as $fid => $fspec) {
- $var = $fspec['var'];
- if ($this->$var !== null) {
- $ftype = $fspec['type'];
- $xfer += $output->writeFieldBegin($var, $ftype, $fid);
- if (isset(TBase::$tmethod[$ftype])) {
- $func = 'write' . TBase::$tmethod[$ftype];
- $xfer += $output->$func($this->$var);
- } else {
- switch ($ftype) {
- case TType::STRUCT:
- $xfer += $this->$var->write($output);
- break;
- case TType::MAP:
- $xfer += $this->_writeMap($this->$var, $fspec, $output);
- break;
- case TType::LST:
- $xfer += $this->_writeList($this->$var, $fspec, $output, false);
- break;
- case TType::SET:
- $xfer += $this->_writeList($this->$var, $fspec, $output, true);
- break;
- }
- }
- $xfer += $output->writeFieldEnd();
- }
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
-
- return $xfer;
- }
-}
diff --git a/vendor/packaged/thrift/src/Exception/TProtocolException.php b/vendor/packaged/thrift/src/Exception/TProtocolException.php
deleted file mode 100644
index 3a55d45ff..000000000
--- a/vendor/packaged/thrift/src/Exception/TProtocolException.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- * @author: rmarin ([email protected])
- */
-
-namespace Thrift\Exception;
-
-/**
- * Protocol module. Contains all the types and definitions needed to implement
- * a protocol encoder/decoder.
- *
- * @package thrift.protocol
- */
-
-/**
- * Protocol exceptions
- */
-class TProtocolException extends TException
-{
- const UNKNOWN = 0;
- const INVALID_DATA = 1;
- const NEGATIVE_SIZE = 2;
- const SIZE_LIMIT = 3;
- const BAD_VERSION = 4;
- const NOT_IMPLEMENTED = 5;
- const DEPTH_LIMIT = 6;
-
- public function __construct($message = null, $code = 0)
- {
- parent::__construct($message, $code);
- }
-}
diff --git a/vendor/packaged/thrift/src/Exception/TTransportException.php b/vendor/packaged/thrift/src/Exception/TTransportException.php
deleted file mode 100644
index 7d8d56743..000000000
--- a/vendor/packaged/thrift/src/Exception/TTransportException.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Exception;
-
-/**
- * Transport exceptions
- */
-class TTransportException extends TException
-{
- const UNKNOWN = 0;
- const NOT_OPEN = 1;
- const ALREADY_OPEN = 2;
- const TIMED_OUT = 3;
- const END_OF_FILE = 4;
-
- public function __construct($message = null, $code = 0)
- {
- parent::__construct($message, $code);
- }
-}
diff --git a/vendor/packaged/thrift/src/Factory/TBinaryProtocolFactory.php b/vendor/packaged/thrift/src/Factory/TBinaryProtocolFactory.php
deleted file mode 100644
index 2519183df..000000000
--- a/vendor/packaged/thrift/src/Factory/TBinaryProtocolFactory.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Protocol\TBinaryProtocol;
-
-/**
- * Binary Protocol Factory
- */
-class TBinaryProtocolFactory implements TProtocolFactory
-{
- private $strictRead_ = false;
- private $strictWrite_ = false;
-
- public function __construct($strictRead = false, $strictWrite = false)
- {
- $this->strictRead_ = $strictRead;
- $this->strictWrite_ = $strictWrite;
- }
-
- public function getProtocol($trans)
- {
- return new TBinaryProtocol($trans, $this->strictRead_, $this->strictWrite_);
- }
-}
diff --git a/vendor/packaged/thrift/src/Factory/TCompactProtocolFactory.php b/vendor/packaged/thrift/src/Factory/TCompactProtocolFactory.php
deleted file mode 100644
index 11fb8ff33..000000000
--- a/vendor/packaged/thrift/src/Factory/TCompactProtocolFactory.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Protocol\TCompactProtocol;
-
-/**
- * Compact Protocol Factory
- */
-class TCompactProtocolFactory implements TProtocolFactory
-{
- public function __construct()
- {
- }
-
- public function getProtocol($trans)
- {
- return new TCompactProtocol($trans);
- }
-}
diff --git a/vendor/packaged/thrift/src/Factory/TJSONProtocolFactory.php b/vendor/packaged/thrift/src/Factory/TJSONProtocolFactory.php
deleted file mode 100644
index fbfb1d731..000000000
--- a/vendor/packaged/thrift/src/Factory/TJSONProtocolFactory.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Protocol\TJSONProtocol;
-
-/**
- * JSON Protocol Factory
- */
-class TJSONProtocolFactory implements TProtocolFactory
-{
- public function __construct()
- {
- }
-
- public function getProtocol($trans)
- {
- return new TJSONProtocol($trans);
- }
-}
diff --git a/vendor/packaged/thrift/src/Factory/TProtocolFactory.php b/vendor/packaged/thrift/src/Factory/TProtocolFactory.php
deleted file mode 100644
index d3066c8ec..000000000
--- a/vendor/packaged/thrift/src/Factory/TProtocolFactory.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-/**
- * Protocol factory creates protocol objects from transports
- */
-interface TProtocolFactory
-{
- /**
- * Build a protocol from the base transport
- *
- * @return Thrift\Protocol\TProtocol protocol
- */
- public function getProtocol($trans);
-}
diff --git a/vendor/packaged/thrift/src/Factory/TStringFuncFactory.php b/vendor/packaged/thrift/src/Factory/TStringFuncFactory.php
deleted file mode 100644
index 30de4d780..000000000
--- a/vendor/packaged/thrift/src/Factory/TStringFuncFactory.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-
-namespace Thrift\Factory;
-
-use Thrift\StringFunc\Core;
-use Thrift\StringFunc\Mbstring;
-use Thrift\StringFunc\TStringFunc;
-
-class TStringFuncFactory
-{
- private static $_instance;
-
- /**
- * Get the Singleton instance of TStringFunc implementation that is
- * compatible with the current system's mbstring.func_overload settings.
- *
- * @return TStringFunc
- */
- public static function create()
- {
- if (!self::$_instance) {
- self::_setInstance();
- }
-
- return self::$_instance;
- }
-
- private static function _setInstance()
- {
- /**
- * Cannot use str* functions for byte counting because multibyte
- * characters will be read a single bytes.
- *
- * See: http://php.net/manual/en/mbstring.overload.php
- */
- if (ini_get('mbstring.func_overload') & 2) {
- self::$_instance = new Mbstring();
- } else {
- /**
- * mbstring is not installed or does not have function overloading
- * of the str* functions enabled so use PHP core str* functions for
- * byte counting.
- */
- self::$_instance = new Core();
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Factory/TTransportFactory.php b/vendor/packaged/thrift/src/Factory/TTransportFactory.php
deleted file mode 100644
index 43f2eecde..000000000
--- a/vendor/packaged/thrift/src/Factory/TTransportFactory.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace Thrift\Factory;
-
-use Thrift\Transport\TTransport;
-
-class TTransportFactory
-{
- /**
- * @static
- * @param TTransport $transport
- * @return TTransport
- */
- public static function getTransport(TTransport $transport)
- {
- return $transport;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/JSON/BaseContext.php b/vendor/packaged/thrift/src/Protocol/JSON/BaseContext.php
deleted file mode 100644
index 31bcb48e4..000000000
--- a/vendor/packaged/thrift/src/Protocol/JSON/BaseContext.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-class BaseContext
-{
- public function escapeNum()
- {
- return false;
- }
-
- public function write()
- {
- }
-
- public function read()
- {
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/JSON/ListContext.php b/vendor/packaged/thrift/src/Protocol/JSON/ListContext.php
deleted file mode 100644
index eef659442..000000000
--- a/vendor/packaged/thrift/src/Protocol/JSON/ListContext.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-use Thrift\Protocol\TJSONProtocol;
-
-class ListContext extends BaseContext
-{
- private $first_ = true;
- private $p_;
-
- public function __construct($p)
- {
- $this->p_ = $p;
- }
-
- public function write()
- {
- if ($this->first_) {
- $this->first_ = false;
- } else {
- $this->p_->getTransport()->write(TJSONProtocol::COMMA);
- }
- }
-
- public function read()
- {
- if ($this->first_) {
- $this->first_ = false;
- } else {
- $this->p_->readJSONSyntaxChar(TJSONProtocol::COMMA);
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/JSON/LookaheadReader.php b/vendor/packaged/thrift/src/Protocol/JSON/LookaheadReader.php
deleted file mode 100644
index 0b18c40d0..000000000
--- a/vendor/packaged/thrift/src/Protocol/JSON/LookaheadReader.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-class LookaheadReader
-{
- private $hasData_ = false;
- private $data_ = array();
- private $p_;
-
- public function __construct($p)
- {
- $this->p_ = $p;
- }
-
- public function read()
- {
- if ($this->hasData_) {
- $this->hasData_ = false;
- } else {
- $this->data_ = $this->p_->getTransport()->readAll(1);
- }
-
- return substr($this->data_, 0, 1);
- }
-
- public function peek()
- {
- if (!$this->hasData_) {
- $this->data_ = $this->p_->getTransport()->readAll(1);
- }
-
- $this->hasData_ = true;
-
- return substr($this->data_, 0, 1);
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php b/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php
deleted file mode 100644
index 7b353c4ad..000000000
--- a/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-use Thrift\Protocol\TJSONProtocol;
-
-class PairContext extends BaseContext
-{
- private $first_ = true;
- private $colon_ = true;
- private $p_ = null;
-
- public function __construct($p)
- {
- $this->p_ = $p;
- }
-
- public function write()
- {
- if ($this->first_) {
- $this->first_ = false;
- $this->colon_ = true;
- } else {
- $this->p_->getTransport()->write($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA);
- $this->colon_ = !$this->colon_;
- }
- }
-
- public function read()
- {
- if ($this->first_) {
- $this->first_ = false;
- $this->colon_ = true;
- } else {
- $this->p_->readJSONSyntaxChar($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA);
- $this->colon_ = !$this->colon_;
- }
- }
-
- public function escapeNum()
- {
- return $this->colon_;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/CollectionMapKeyException.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/CollectionMapKeyException.php
deleted file mode 100644
index 522b85a5b..000000000
--- a/vendor/packaged/thrift/src/Protocol/SimpleJSON/CollectionMapKeyException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\SimpleJSON;
-
-use Thrift\Exception\TException;
-
-class CollectionMapKeyException extends TException
-{
- public function __construct($message)
- {
- parent::__construct($message);
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/Context.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/Context.php
deleted file mode 100644
index dbd16faa2..000000000
--- a/vendor/packaged/thrift/src/Protocol/SimpleJSON/Context.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\SimpleJSON;
-
-class Context
-{
- public function write()
- {
- }
-
- public function isMapKey()
- {
- return false;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/ListContext.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/ListContext.php
deleted file mode 100644
index 6f346d8f8..000000000
--- a/vendor/packaged/thrift/src/Protocol/SimpleJSON/ListContext.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\SimpleJSON;
-
-use Thrift\Protocol\TSimpleJSONProtocol;
-
-class ListContext extends Context
-{
- protected $first_ = true;
- private $p_;
-
- public function __construct($p)
- {
- $this->p_ = $p;
- }
-
- public function write()
- {
- if ($this->first_) {
- $this->first_ = false;
- } else {
- $this->p_->getTransport()->write(TSimpleJSONProtocol::COMMA);
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/MapContext.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/MapContext.php
deleted file mode 100644
index 61c060d09..000000000
--- a/vendor/packaged/thrift/src/Protocol/SimpleJSON/MapContext.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\SimpleJSON;
-
-class MapContext extends StructContext
-{
- protected $isKey = true;
- private $p_;
-
- public function __construct($p)
- {
- parent::__construct($p);
- }
-
- public function write()
- {
- parent::write();
- $this->isKey = !$this->isKey;
- }
-
- public function isMapKey()
- {
- // we want to coerce map keys to json strings regardless
- // of their type
- return $this->isKey;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php
deleted file mode 100644
index 38a62d1a2..000000000
--- a/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol\SimpleJSON;
-
-use Thrift\Protocol\TSimpleJSONProtocol;
-
-class StructContext extends Context
-{
- protected $first_ = true;
- protected $colon_ = true;
- private $p_;
-
- public function __construct($p)
- {
- $this->p_ = $p;
- }
-
- public function write()
- {
- if ($this->first_) {
- $this->first_ = false;
- $this->colon_ = true;
- } else {
- $this->p_->getTransport()->write(
- $this->colon_ ?
- TSimpleJSONProtocol::COLON :
- TSimpleJSONProtocol::COMMA
- );
- $this->colon_ = !$this->colon_;
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TBinaryProtocol.php b/vendor/packaged/thrift/src/Protocol/TBinaryProtocol.php
deleted file mode 100644
index cda5c0d4c..000000000
--- a/vendor/packaged/thrift/src/Protocol/TBinaryProtocol.php
+++ /dev/null
@@ -1,453 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Binary implementation of the Thrift protocol.
- *
- */
-class TBinaryProtocol extends TProtocol
-{
- const VERSION_MASK = 0xffff0000;
- const VERSION_1 = 0x80010000;
-
- protected $strictRead_ = false;
- protected $strictWrite_ = true;
-
- public function __construct($trans, $strictRead = false, $strictWrite = true)
- {
- parent::__construct($trans);
- $this->strictRead_ = $strictRead;
- $this->strictWrite_ = $strictWrite;
- }
-
- public function writeMessageBegin($name, $type, $seqid)
- {
- if ($this->strictWrite_) {
- $version = self::VERSION_1 | $type;
-
- return
- $this->writeI32($version) +
- $this->writeString($name) +
- $this->writeI32($seqid);
- } else {
- return
- $this->writeString($name) +
- $this->writeByte($type) +
- $this->writeI32($seqid);
- }
- }
-
- public function writeMessageEnd()
- {
- return 0;
- }
-
- public function writeStructBegin($name)
- {
- return 0;
- }
-
- public function writeStructEnd()
- {
- return 0;
- }
-
- public function writeFieldBegin($fieldName, $fieldType, $fieldId)
- {
- return
- $this->writeByte($fieldType) +
- $this->writeI16($fieldId);
- }
-
- public function writeFieldEnd()
- {
- return 0;
- }
-
- public function writeFieldStop()
- {
- return
- $this->writeByte(TType::STOP);
- }
-
- public function writeMapBegin($keyType, $valType, $size)
- {
- return
- $this->writeByte($keyType) +
- $this->writeByte($valType) +
- $this->writeI32($size);
- }
-
- public function writeMapEnd()
- {
- return 0;
- }
-
- public function writeListBegin($elemType, $size)
- {
- return
- $this->writeByte($elemType) +
- $this->writeI32($size);
- }
-
- public function writeListEnd()
- {
- return 0;
- }
-
- public function writeSetBegin($elemType, $size)
- {
- return
- $this->writeByte($elemType) +
- $this->writeI32($size);
- }
-
- public function writeSetEnd()
- {
- return 0;
- }
-
- public function writeBool($value)
- {
- $data = pack('c', $value ? 1 : 0);
- $this->trans_->write($data, 1);
-
- return 1;
- }
-
- public function writeByte($value)
- {
- $data = pack('c', $value);
- $this->trans_->write($data, 1);
-
- return 1;
- }
-
- public function writeI16($value)
- {
- $data = pack('n', $value);
- $this->trans_->write($data, 2);
-
- return 2;
- }
-
- public function writeI32($value)
- {
- $data = pack('N', $value);
- $this->trans_->write($data, 4);
-
- return 4;
- }
-
- public function writeI64($value)
- {
- // If we are on a 32bit architecture we have to explicitly deal with
- // 64-bit twos-complement arithmetic since PHP wants to treat all ints
- // as signed and any int over 2^31 - 1 as a float
- if (PHP_INT_SIZE == 4) {
- $neg = $value < 0;
-
- if ($neg) {
- $value *= -1;
- }
-
- $hi = (int)($value / 4294967296);
- $lo = (int)$value;
-
- if ($neg) {
- $hi = ~$hi;
- $lo = ~$lo;
- if (($lo & (int)0xffffffff) == (int)0xffffffff) {
- $lo = 0;
- $hi++;
- } else {
- $lo++;
- }
- }
- $data = pack('N2', $hi, $lo);
- } else {
- $hi = $value >> 32;
- $lo = $value & 0xFFFFFFFF;
- $data = pack('N2', $hi, $lo);
- }
-
- $this->trans_->write($data, 8);
-
- return 8;
- }
-
- public function writeDouble($value)
- {
- $data = pack('d', $value);
- $this->trans_->write(strrev($data), 8);
-
- return 8;
- }
-
- public function writeString($value)
- {
- $len = TStringFuncFactory::create()->strlen($value);
- $result = $this->writeI32($len);
- if ($len) {
- $this->trans_->write($value, $len);
- }
-
- return $result + $len;
- }
-
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- $result = $this->readI32($sz);
- if ($sz < 0) {
- $version = (int)($sz & self::VERSION_MASK);
- if ($version != (int)self::VERSION_1) {
- throw new TProtocolException('Bad version identifier: ' . $sz, TProtocolException::BAD_VERSION);
- }
- $type = $sz & 0x000000ff;
- $result +=
- $this->readString($name) +
- $this->readI32($seqid);
- } else {
- if ($this->strictRead_) {
- throw new TProtocolException(
- 'No version identifier, old protocol client?',
- TProtocolException::BAD_VERSION
- );
- } else {
- // Handle pre-versioned input
- $name = $this->trans_->readAll($sz);
- $result +=
- $sz +
- $this->readByte($type) +
- $this->readI32($seqid);
- }
- }
-
- return $result;
- }
-
- public function readMessageEnd()
- {
- return 0;
- }
-
- public function readStructBegin(&$name)
- {
- $name = '';
-
- return 0;
- }
-
- public function readStructEnd()
- {
- return 0;
- }
-
- public function readFieldBegin(&$name, &$fieldType, &$fieldId)
- {
- $result = $this->readByte($fieldType);
- if ($fieldType == TType::STOP) {
- $fieldId = 0;
-
- return $result;
- }
- $result += $this->readI16($fieldId);
-
- return $result;
- }
-
- public function readFieldEnd()
- {
- return 0;
- }
-
- public function readMapBegin(&$keyType, &$valType, &$size)
- {
- return
- $this->readByte($keyType) +
- $this->readByte($valType) +
- $this->readI32($size);
- }
-
- public function readMapEnd()
- {
- return 0;
- }
-
- public function readListBegin(&$elemType, &$size)
- {
- return
- $this->readByte($elemType) +
- $this->readI32($size);
- }
-
- public function readListEnd()
- {
- return 0;
- }
-
- public function readSetBegin(&$elemType, &$size)
- {
- return
- $this->readByte($elemType) +
- $this->readI32($size);
- }
-
- public function readSetEnd()
- {
- return 0;
- }
-
- public function readBool(&$value)
- {
- $data = $this->trans_->readAll(1);
- $arr = unpack('c', $data);
- $value = $arr[1] == 1;
-
- return 1;
- }
-
- public function readByte(&$value)
- {
- $data = $this->trans_->readAll(1);
- $arr = unpack('c', $data);
- $value = $arr[1];
-
- return 1;
- }
-
- public function readI16(&$value)
- {
- $data = $this->trans_->readAll(2);
- $arr = unpack('n', $data);
- $value = $arr[1];
- if ($value > 0x7fff) {
- $value = 0 - (($value - 1) ^ 0xffff);
- }
-
- return 2;
- }
-
- public function readI32(&$value)
- {
- $data = $this->trans_->readAll(4);
- $arr = unpack('N', $data);
- $value = $arr[1];
- if ($value > 0x7fffffff) {
- $value = 0 - (($value - 1) ^ 0xffffffff);
- }
-
- return 4;
- }
-
- public function readI64(&$value)
- {
- $data = $this->trans_->readAll(8);
-
- $arr = unpack('N2', $data);
-
- // If we are on a 32bit architecture we have to explicitly deal with
- // 64-bit twos-complement arithmetic since PHP wants to treat all ints
- // as signed and any int over 2^31 - 1 as a float
- if (PHP_INT_SIZE == 4) {
- $hi = $arr[1];
- $lo = $arr[2];
- $isNeg = $hi < 0;
-
- // Check for a negative
- if ($isNeg) {
- $hi = ~$hi & (int)0xffffffff;
- $lo = ~$lo & (int)0xffffffff;
-
- if ($lo == (int)0xffffffff) {
- $hi++;
- $lo = 0;
- } else {
- $lo++;
- }
- }
-
- // Force 32bit words in excess of 2G to pe positive - we deal wigh sign
- // explicitly below
-
- if ($hi & (int)0x80000000) {
- $hi &= (int)0x7fffffff;
- $hi += 0x80000000;
- }
-
- if ($lo & (int)0x80000000) {
- $lo &= (int)0x7fffffff;
- $lo += 0x80000000;
- }
-
- $value = $hi * 4294967296 + $lo;
-
- if ($isNeg) {
- $value = 0 - $value;
- }
- } else {
- // Upcast negatives in LSB bit
- if ($arr[2] & 0x80000000) {
- $arr[2] = $arr[2] & 0xffffffff;
- }
-
- // Check for a negative
- if ($arr[1] & 0x80000000) {
- $arr[1] = $arr[1] & 0xffffffff;
- $arr[1] = $arr[1] ^ 0xffffffff;
- $arr[2] = $arr[2] ^ 0xffffffff;
- $value = 0 - $arr[1] * 4294967296 - $arr[2] - 1;
- } else {
- $value = $arr[1] * 4294967296 + $arr[2];
- }
- }
-
- return 8;
- }
-
- public function readDouble(&$value)
- {
- $data = strrev($this->trans_->readAll(8));
- $arr = unpack('d', $data);
- $value = $arr[1];
-
- return 8;
- }
-
- public function readString(&$value)
- {
- $result = $this->readI32($len);
- if ($len) {
- $value = $this->trans_->readAll($len);
- } else {
- $value = '';
- }
-
- return $result + $len;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TBinaryProtocolAccelerated.php b/vendor/packaged/thrift/src/Protocol/TBinaryProtocolAccelerated.php
deleted file mode 100644
index ff799a6ab..000000000
--- a/vendor/packaged/thrift/src/Protocol/TBinaryProtocolAccelerated.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Transport\TBufferedTransport;
-
-/**
- * Accelerated binary protocol: used in conjunction with the thrift_protocol
- * extension for faster deserialization
- */
-class TBinaryProtocolAccelerated extends TBinaryProtocol
-{
- public function __construct($trans, $strictRead = false, $strictWrite = true)
- {
- // If the transport doesn't implement putBack, wrap it in a
- // TBufferedTransport (which does)
-
- // NOTE (t.heintz): This is very evil to do, because the TBufferedTransport may swallow bytes, which
- // are then never written to the underlying transport. This happens precisely when a number of bytes
- // less than the max buffer size (512 by default) is written to the transport and then flush() is NOT
- // called. In that case the data stays in the writeBuffer of the transport, from where it can never be
- // accessed again (for example through read()).
- //
- // Since the caller of this method does not know about the wrapping transport, this creates bugs which
- // are very difficult to find. Hence the wrapping of a transport in a buffer should be left to the
- // calling code. An interface could used to mandate the presence of the putBack() method in the transport.
- //
- // I am leaving this code in nonetheless, because there may be applications depending on this behavior.
- //
- // @see THRIFT-1579
-
- if (!method_exists($trans, 'putBack')) {
- $trans = new TBufferedTransport($trans);
- }
- parent::__construct($trans, $strictRead, $strictWrite);
- }
-
- public function isStrictRead()
- {
- return $this->strictRead_;
- }
-
- public function isStrictWrite()
- {
- return $this->strictWrite_;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TCompactProtocol.php b/vendor/packaged/thrift/src/Protocol/TCompactProtocol.php
deleted file mode 100644
index 1af2a274a..000000000
--- a/vendor/packaged/thrift/src/Protocol/TCompactProtocol.php
+++ /dev/null
@@ -1,739 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Compact implementation of the Thrift protocol.
- *
- */
-class TCompactProtocol extends TProtocol
-{
- const COMPACT_STOP = 0x00;
- const COMPACT_TRUE = 0x01;
- const COMPACT_FALSE = 0x02;
- const COMPACT_BYTE = 0x03;
- const COMPACT_I16 = 0x04;
- const COMPACT_I32 = 0x05;
- const COMPACT_I64 = 0x06;
- const COMPACT_DOUBLE = 0x07;
- const COMPACT_BINARY = 0x08;
- const COMPACT_LIST = 0x09;
- const COMPACT_SET = 0x0A;
- const COMPACT_MAP = 0x0B;
- const COMPACT_STRUCT = 0x0C;
-
- const STATE_CLEAR = 0;
- const STATE_FIELD_WRITE = 1;
- const STATE_VALUE_WRITE = 2;
- const STATE_CONTAINER_WRITE = 3;
- const STATE_BOOL_WRITE = 4;
- const STATE_FIELD_READ = 5;
- const STATE_CONTAINER_READ = 6;
- const STATE_VALUE_READ = 7;
- const STATE_BOOL_READ = 8;
-
- const VERSION_MASK = 0x1f;
- const VERSION = 1;
- const PROTOCOL_ID = 0x82;
- const TYPE_MASK = 0xe0;
- const TYPE_BITS = 0x07;
- const TYPE_SHIFT_AMOUNT = 5;
-
- protected static $ctypes = array(
- TType::STOP => TCompactProtocol::COMPACT_STOP,
- TType::BOOL => TCompactProtocol::COMPACT_TRUE, // used for collection
- TType::BYTE => TCompactProtocol::COMPACT_BYTE,
- TType::I16 => TCompactProtocol::COMPACT_I16,
- TType::I32 => TCompactProtocol::COMPACT_I32,
- TType::I64 => TCompactProtocol::COMPACT_I64,
- TType::DOUBLE => TCompactProtocol::COMPACT_DOUBLE,
- TType::STRING => TCompactProtocol::COMPACT_BINARY,
- TType::STRUCT => TCompactProtocol::COMPACT_STRUCT,
- TType::LST => TCompactProtocol::COMPACT_LIST,
- TType::SET => TCompactProtocol::COMPACT_SET,
- TType::MAP => TCompactProtocol::COMPACT_MAP,
- );
-
- protected static $ttypes = array(
- TCompactProtocol::COMPACT_STOP => TType::STOP,
- TCompactProtocol::COMPACT_TRUE => TType::BOOL, // used for collection
- TCompactProtocol::COMPACT_FALSE => TType::BOOL,
- TCompactProtocol::COMPACT_BYTE => TType::BYTE,
- TCompactProtocol::COMPACT_I16 => TType::I16,
- TCompactProtocol::COMPACT_I32 => TType::I32,
- TCompactProtocol::COMPACT_I64 => TType::I64,
- TCompactProtocol::COMPACT_DOUBLE => TType::DOUBLE,
- TCompactProtocol::COMPACT_BINARY => TType::STRING,
- TCompactProtocol::COMPACT_STRUCT => TType::STRUCT,
- TCompactProtocol::COMPACT_LIST => TType::LST,
- TCompactProtocol::COMPACT_SET => TType::SET,
- TCompactProtocol::COMPACT_MAP => TType::MAP,
- );
-
- protected $state = TCompactProtocol::STATE_CLEAR;
- protected $lastFid = 0;
- protected $boolFid = null;
- protected $boolValue = null;
- protected $structs = array();
- protected $containers = array();
-
- // Some varint / zigzag helper methods
- public function toZigZag($n, $bits)
- {
- return ($n << 1) ^ ($n >> ($bits - 1));
- }
-
- public function fromZigZag($n)
- {
- return ($n >> 1) ^ -($n & 1);
- }
-
- public function getVarint($data)
- {
- $out = "";
- while (true) {
- if (($data & ~0x7f) === 0) {
- $out .= chr($data);
- break;
- } else {
- $out .= chr(($data & 0xff) | 0x80);
- $data = $data >> 7;
- }
- }
-
- return $out;
- }
-
- public function writeVarint($data)
- {
- $out = $this->getVarint($data);
- $result = TStringFuncFactory::create()->strlen($out);
- $this->trans_->write($out, $result);
-
- return $result;
- }
-
- public function readVarint(&$result)
- {
- $idx = 0;
- $shift = 0;
- $result = 0;
- while (true) {
- $x = $this->trans_->readAll(1);
- $arr = unpack('C', $x);
- $byte = $arr[1];
- $idx += 1;
- $result |= ($byte & 0x7f) << $shift;
- if (($byte >> 7) === 0) {
- return $idx;
- }
- $shift += 7;
- }
-
- return $idx;
- }
-
- public function __construct($trans)
- {
- parent::__construct($trans);
- }
-
- public function writeMessageBegin($name, $type, $seqid)
- {
- $written =
- $this->writeUByte(TCompactProtocol::PROTOCOL_ID) +
- $this->writeUByte(TCompactProtocol::VERSION |
- ($type << TCompactProtocol::TYPE_SHIFT_AMOUNT)) +
- $this->writeVarint($seqid) +
- $this->writeString($name);
- $this->state = TCompactProtocol::STATE_VALUE_WRITE;
-
- return $written;
- }
-
- public function writeMessageEnd()
- {
- $this->state = TCompactProtocol::STATE_CLEAR;
-
- return 0;
- }
-
- public function writeStructBegin($name)
- {
- $this->structs[] = array($this->state, $this->lastFid);
- $this->state = TCompactProtocol::STATE_FIELD_WRITE;
- $this->lastFid = 0;
-
- return 0;
- }
-
- public function writeStructEnd()
- {
- $old_values = array_pop($this->structs);
- $this->state = $old_values[0];
- $this->lastFid = $old_values[1];
-
- return 0;
- }
-
- public function writeFieldStop()
- {
- return $this->writeByte(0);
- }
-
- public function writeFieldHeader($type, $fid)
- {
- $written = 0;
- $delta = $fid - $this->lastFid;
- if (0 < $delta && $delta <= 15) {
- $written = $this->writeUByte(($delta << 4) | $type);
- } else {
- $written = $this->writeByte($type) +
- $this->writeI16($fid);
- }
- $this->lastFid = $fid;
-
- return $written;
- }
-
- public function writeFieldBegin($field_name, $field_type, $field_id)
- {
- if ($field_type == TTYPE::BOOL) {
- $this->state = TCompactProtocol::STATE_BOOL_WRITE;
- $this->boolFid = $field_id;
-
- return 0;
- } else {
- $this->state = TCompactProtocol::STATE_VALUE_WRITE;
-
- return $this->writeFieldHeader(self::$ctypes[$field_type], $field_id);
- }
- }
-
- public function writeFieldEnd()
- {
- $this->state = TCompactProtocol::STATE_FIELD_WRITE;
-
- return 0;
- }
-
- public function writeCollectionBegin($etype, $size)
- {
- $written = 0;
- if ($size <= 14) {
- $written = $this->writeUByte($size << 4 |
- self::$ctypes[$etype]);
- } else {
- $written = $this->writeUByte(0xf0 |
- self::$ctypes[$etype]) +
- $this->writeVarint($size);
- }
- $this->containers[] = $this->state;
- $this->state = TCompactProtocol::STATE_CONTAINER_WRITE;
-
- return $written;
- }
-
- public function writeMapBegin($key_type, $val_type, $size)
- {
- $written = 0;
- if ($size == 0) {
- $written = $this->writeByte(0);
- } else {
- $written = $this->writeVarint($size) +
- $this->writeUByte(self::$ctypes[$key_type] << 4 |
- self::$ctypes[$val_type]);
- }
- $this->containers[] = $this->state;
-
- return $written;
- }
-
- public function writeCollectionEnd()
- {
- $this->state = array_pop($this->containers);
-
- return 0;
- }
-
- public function writeMapEnd()
- {
- return $this->writeCollectionEnd();
- }
-
- public function writeListBegin($elem_type, $size)
- {
- return $this->writeCollectionBegin($elem_type, $size);
- }
-
- public function writeListEnd()
- {
- return $this->writeCollectionEnd();
- }
-
- public function writeSetBegin($elem_type, $size)
- {
- return $this->writeCollectionBegin($elem_type, $size);
- }
-
- public function writeSetEnd()
- {
- return $this->writeCollectionEnd();
- }
-
- public function writeBool($value)
- {
- if ($this->state == TCompactProtocol::STATE_BOOL_WRITE) {
- $ctype = TCompactProtocol::COMPACT_FALSE;
- if ($value) {
- $ctype = TCompactProtocol::COMPACT_TRUE;
- }
-
- return $this->writeFieldHeader($ctype, $this->boolFid);
- } elseif ($this->state == TCompactProtocol::STATE_CONTAINER_WRITE) {
- return $this->writeByte($value ? 1 : 0);
- } else {
- throw new TProtocolException('Invalid state in compact protocol');
- }
- }
-
- public function writeByte($value)
- {
- $data = pack('c', $value);
- $this->trans_->write($data, 1);
-
- return 1;
- }
-
- public function writeUByte($byte)
- {
- $this->trans_->write(pack('C', $byte), 1);
-
- return 1;
- }
-
- public function writeI16($value)
- {
- $thing = $this->toZigZag($value, 16);
-
- return $this->writeVarint($thing);
- }
-
- public function writeI32($value)
- {
- $thing = $this->toZigZag($value, 32);
-
- return $this->writeVarint($thing);
- }
-
- public function writeDouble($value)
- {
- $data = pack('d', $value);
- $this->trans_->write($data, 8);
-
- return 8;
- }
-
- public function writeString($value)
- {
- $len = TStringFuncFactory::create()->strlen($value);
- $result = $this->writeVarint($len);
- if ($len) {
- $this->trans_->write($value, $len);
- }
-
- return $result + $len;
- }
-
- public function readFieldBegin(&$name, &$field_type, &$field_id)
- {
- $result = $this->readUByte($compact_type_and_delta);
-
- $compact_type = $compact_type_and_delta & 0x0f;
-
- if ($compact_type == TType::STOP) {
- $field_type = $compact_type;
- $field_id = 0;
-
- return $result;
- }
- $delta = $compact_type_and_delta >> 4;
- if ($delta == 0) {
- $result += $this->readI16($field_id);
- } else {
- $field_id = $this->lastFid + $delta;
- }
- $this->lastFid = $field_id;
- $field_type = $this->getTType($compact_type);
-
- if ($compact_type == TCompactProtocol::COMPACT_TRUE) {
- $this->state = TCompactProtocol::STATE_BOOL_READ;
- $this->boolValue = true;
- } elseif ($compact_type == TCompactProtocol::COMPACT_FALSE) {
- $this->state = TCompactProtocol::STATE_BOOL_READ;
- $this->boolValue = false;
- } else {
- $this->state = TCompactProtocol::STATE_VALUE_READ;
- }
-
- return $result;
- }
-
- public function readFieldEnd()
- {
- $this->state = TCompactProtocol::STATE_FIELD_READ;
-
- return 0;
- }
-
- public function readUByte(&$value)
- {
- $data = $this->trans_->readAll(1);
- $arr = unpack('C', $data);
- $value = $arr[1];
-
- return 1;
- }
-
- public function readByte(&$value)
- {
- $data = $this->trans_->readAll(1);
- $arr = unpack('c', $data);
- $value = $arr[1];
-
- return 1;
- }
-
- public function readZigZag(&$value)
- {
- $result = $this->readVarint($value);
- $value = $this->fromZigZag($value);
-
- return $result;
- }
-
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- $protoId = 0;
- $result = $this->readUByte($protoId);
- if ($protoId != TCompactProtocol::PROTOCOL_ID) {
- throw new TProtocolException('Bad protocol id in TCompact message');
- }
- $verType = 0;
- $result += $this->readUByte($verType);
- $type = ($verType >> TCompactProtocol::TYPE_SHIFT_AMOUNT) & TCompactProtocol::TYPE_BITS;
- $version = $verType & TCompactProtocol::VERSION_MASK;
- if ($version != TCompactProtocol::VERSION) {
- throw new TProtocolException('Bad version in TCompact message');
- }
- $result += $this->readVarint($seqid);
- $result += $this->readString($name);
-
- return $result;
- }
-
- public function readMessageEnd()
- {
- return 0;
- }
-
- public function readStructBegin(&$name)
- {
- $name = ''; // unused
- $this->structs[] = array($this->state, $this->lastFid);
- $this->state = TCompactProtocol::STATE_FIELD_READ;
- $this->lastFid = 0;
-
- return 0;
- }
-
- public function readStructEnd()
- {
- $last = array_pop($this->structs);
- $this->state = $last[0];
- $this->lastFid = $last[1];
-
- return 0;
- }
-
- public function readCollectionBegin(&$type, &$size)
- {
- $sizeType = 0;
- $result = $this->readUByte($sizeType);
- $size = $sizeType >> 4;
- $type = $this->getTType($sizeType);
- if ($size == 15) {
- $result += $this->readVarint($size);
- }
- $this->containers[] = $this->state;
- $this->state = TCompactProtocol::STATE_CONTAINER_READ;
-
- return $result;
- }
-
- public function readMapBegin(&$key_type, &$val_type, &$size)
- {
- $result = $this->readVarint($size);
- $types = 0;
- if ($size > 0) {
- $result += $this->readUByte($types);
- }
- $val_type = $this->getTType($types);
- $key_type = $this->getTType($types >> 4);
- $this->containers[] = $this->state;
- $this->state = TCompactProtocol::STATE_CONTAINER_READ;
-
- return $result;
- }
-
- public function readCollectionEnd()
- {
- $this->state = array_pop($this->containers);
-
- return 0;
- }
-
- public function readMapEnd()
- {
- return $this->readCollectionEnd();
- }
-
- public function readListBegin(&$elem_type, &$size)
- {
- return $this->readCollectionBegin($elem_type, $size);
- }
-
- public function readListEnd()
- {
- return $this->readCollectionEnd();
- }
-
- public function readSetBegin(&$elem_type, &$size)
- {
- return $this->readCollectionBegin($elem_type, $size);
- }
-
- public function readSetEnd()
- {
- return $this->readCollectionEnd();
- }
-
- public function readBool(&$value)
- {
- if ($this->state == TCompactProtocol::STATE_BOOL_READ) {
- $value = $this->boolValue;
-
- return 0;
- } elseif ($this->state == TCompactProtocol::STATE_CONTAINER_READ) {
- return $this->readByte($value);
- } else {
- throw new TProtocolException('Invalid state in compact protocol');
- }
- }
-
- public function readI16(&$value)
- {
- return $this->readZigZag($value);
- }
-
- public function readI32(&$value)
- {
- return $this->readZigZag($value);
- }
-
- public function readDouble(&$value)
- {
- $data = $this->trans_->readAll(8);
- $arr = unpack('d', $data);
- $value = $arr[1];
-
- return 8;
- }
-
- public function readString(&$value)
- {
- $result = $this->readVarint($len);
- if ($len) {
- $value = $this->trans_->readAll($len);
- } else {
- $value = '';
- }
-
- return $result + $len;
- }
-
- public function getTType($byte)
- {
- return self::$ttypes[$byte & 0x0f];
- }
-
- // If we are on a 32bit architecture we have to explicitly deal with
- // 64-bit twos-complement arithmetic since PHP wants to treat all ints
- // as signed and any int over 2^31 - 1 as a float
-
- // Read and write I64 as two 32 bit numbers $hi and $lo
-
- public function readI64(&$value)
- {
- // Read varint from wire
- $hi = 0;
- $lo = 0;
-
- $idx = 0;
- $shift = 0;
-
- while (true) {
- $x = $this->trans_->readAll(1);
- $arr = unpack('C', $x);
- $byte = $arr[1];
- $idx += 1;
- // Shift hi and lo together.
- if ($shift < 28) {
- $lo |= (($byte & 0x7f) << $shift);
- } elseif ($shift == 28) {
- $lo |= (($byte & 0x0f) << 28);
- $hi |= (($byte & 0x70) >> 4);
- } else {
- $hi |= (($byte & 0x7f) << ($shift - 32));
- }
- if (($byte >> 7) === 0) {
- break;
- }
- $shift += 7;
- }
-
- // Now, unzig it.
- $xorer = 0;
- if ($lo & 1) {
- $xorer = 0xffffffff;
- }
- $lo = ($lo >> 1) & 0x7fffffff;
- $lo = $lo | (($hi & 1) << 31);
- $hi = ($hi >> 1) ^ $xorer;
- $lo = $lo ^ $xorer;
-
- // Now put $hi and $lo back together
- $isNeg = $hi < 0 || $hi & 0x80000000;
-
- // Check for a negative
- if ($isNeg) {
- $hi = ~$hi & (int)0xffffffff;
- $lo = ~$lo & (int)0xffffffff;
-
- if ($lo == (int)0xffffffff) {
- $hi++;
- $lo = 0;
- } else {
- $lo++;
- }
- }
-
- // Force 32bit words in excess of 2G to be positive - we deal with sign
- // explicitly below
-
- if ($hi & (int)0x80000000) {
- $hi &= (int)0x7fffffff;
- $hi += 0x80000000;
- }
-
- if ($lo & (int)0x80000000) {
- $lo &= (int)0x7fffffff;
- $lo += 0x80000000;
- }
-
- // Create as negative value first, since we can store -2^63 but not 2^63
- $value = -$hi * 4294967296 - $lo;
-
- if (!$isNeg) {
- $value = -$value;
- }
-
- return $idx;
- }
-
- public function writeI64($value)
- {
- // If we are in an I32 range, use the easy method below.
- if (($value > 4294967296) || ($value < -4294967296)) {
- // Convert $value to $hi and $lo
- $neg = $value < 0;
-
- if ($neg) {
- $value *= -1;
- }
-
- $hi = (int)$value >> 32;
- $lo = (int)$value & 0xffffffff;
-
- if ($neg) {
- $hi = ~$hi;
- $lo = ~$lo;
- if (($lo & (int)0xffffffff) == (int)0xffffffff) {
- $lo = 0;
- $hi++;
- } else {
- $lo++;
- }
- }
-
- // Now do the zigging and zagging.
- $xorer = 0;
- if ($neg) {
- $xorer = 0xffffffff;
- }
- $lowbit = ($lo >> 31) & 1;
- $hi = ($hi << 1) | $lowbit;
- $lo = ($lo << 1);
- $lo = ($lo ^ $xorer) & 0xffffffff;
- $hi = ($hi ^ $xorer) & 0xffffffff;
-
- // now write out the varint, ensuring we shift both hi and lo
- $out = "";
- while (true) {
- if (($lo & ~0x7f) === 0 &&
- $hi === 0) {
- $out .= chr($lo);
- break;
- } else {
- $out .= chr(($lo & 0xff) | 0x80);
- $lo = $lo >> 7;
- $lo = $lo | ($hi << 25);
- $hi = $hi >> 7;
- // Right shift carries sign, but we don't want it to.
- $hi = $hi & (127 << 25);
- }
- }
-
- $ret = TStringFuncFactory::create()->strlen($out);
- $this->trans_->write($out, $ret);
-
- return $ret;
- } else {
- return $this->writeVarint($this->toZigZag($value, 64));
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TJSONProtocol.php b/vendor/packaged/thrift/src/Protocol/TJSONProtocol.php
deleted file mode 100644
index 914488421..000000000
--- a/vendor/packaged/thrift/src/Protocol/TJSONProtocol.php
+++ /dev/null
@@ -1,815 +0,0 @@
-<?php
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\JSON\BaseContext;
-use Thrift\Protocol\JSON\LookaheadReader;
-use Thrift\Protocol\JSON\PairContext;
-use Thrift\Protocol\JSON\ListContext;
-
-/**
- * JSON implementation of thrift protocol, ported from Java.
- */
-class TJSONProtocol extends TProtocol
-{
- const COMMA = ',';
- const COLON = ':';
- const LBRACE = '{';
- const RBRACE = '}';
- const LBRACKET = '[';
- const RBRACKET = ']';
- const QUOTE = '"';
- const BACKSLASH = '\\';
- const ZERO = '0';
- const ESCSEQ = '\\';
- const DOUBLEESC = '__DOUBLE_ESCAPE_SEQUENCE__';
-
- const VERSION = 1;
-
- public static $JSON_CHAR_TABLE = array(
- /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
- 0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0, // 0
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1
- 1, 1, '"', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
- );
-
- public static $ESCAPE_CHARS = array('"', '\\', '/', "b", "f", "n", "r", "t");
-
- public static $ESCAPE_CHAR_VALS = array(
- '"', '\\', '/', "\x08", "\f", "\n", "\r", "\t",
- );
-
- const NAME_BOOL = "tf";
- const NAME_BYTE = "i8";
- const NAME_I16 = "i16";
- const NAME_I32 = "i32";
- const NAME_I64 = "i64";
- const NAME_DOUBLE = "dbl";
- const NAME_STRUCT = "rec";
- const NAME_STRING = "str";
- const NAME_MAP = "map";
- const NAME_LIST = "lst";
- const NAME_SET = "set";
-
- private function getTypeNameForTypeID($typeID)
- {
- switch ($typeID) {
- case TType::BOOL:
- return self::NAME_BOOL;
- case TType::BYTE:
- return self::NAME_BYTE;
- case TType::I16:
- return self::NAME_I16;
- case TType::I32:
- return self::NAME_I32;
- case TType::I64:
- return self::NAME_I64;
- case TType::DOUBLE:
- return self::NAME_DOUBLE;
- case TType::STRING:
- return self::NAME_STRING;
- case TType::STRUCT:
- return self::NAME_STRUCT;
- case TType::MAP:
- return self::NAME_MAP;
- case TType::SET:
- return self::NAME_SET;
- case TType::LST:
- return self::NAME_LIST;
- default:
- throw new TProtocolException("Unrecognized type", TProtocolException::UNKNOWN);
- }
- }
-
- private function getTypeIDForTypeName($name)
- {
- $result = TType::STOP;
-
- if (strlen($name) > 1) {
- switch (substr($name, 0, 1)) {
- case 'd':
- $result = TType::DOUBLE;
- break;
- case 'i':
- switch (substr($name, 1, 1)) {
- case '8':
- $result = TType::BYTE;
- break;
- case '1':
- $result = TType::I16;
- break;
- case '3':
- $result = TType::I32;
- break;
- case '6':
- $result = TType::I64;
- break;
- }
- break;
- case 'l':
- $result = TType::LST;
- break;
- case 'm':
- $result = TType::MAP;
- break;
- case 'r':
- $result = TType::STRUCT;
- break;
- case 's':
- if (substr($name, 1, 1) == 't') {
- $result = TType::STRING;
- } elseif (substr($name, 1, 1) == 'e') {
- $result = TType::SET;
- }
- break;
- case 't':
- $result = TType::BOOL;
- break;
- }
- }
- if ($result == TType::STOP) {
- throw new TProtocolException("Unrecognized type", TProtocolException::INVALID_DATA);
- }
-
- return $result;
- }
-
- public $contextStack_ = array();
- public $context_;
- public $reader_;
-
- private function pushContext($c)
- {
- array_push($this->contextStack_, $this->context_);
- $this->context_ = $c;
- }
-
- private function popContext()
- {
- $this->context_ = array_pop($this->contextStack_);
- }
-
- public function __construct($trans)
- {
- parent::__construct($trans);
- $this->context_ = new BaseContext();
- $this->reader_ = new LookaheadReader($this);
- }
-
- public function reset()
- {
- $this->contextStack_ = array();
- $this->context_ = new BaseContext();
- $this->reader_ = new LookaheadReader($this);
- }
-
- private $tmpbuf_ = array(4);
-
- public function readJSONSyntaxChar($b)
- {
- $ch = $this->reader_->read();
-
- if (substr($ch, 0, 1) != $b) {
- throw new TProtocolException("Unexpected character: " . $ch, TProtocolException::INVALID_DATA);
- }
- }
-
- private function hexVal($s)
- {
- for ($i = 0; $i < strlen($s); $i++) {
- $ch = substr($s, $i, 1);
-
- if (!($ch >= "a" && $ch <= "f") && !($ch >= "0" && $ch <= "9")) {
- throw new TProtocolException("Expected hex character " . $ch, TProtocolException::INVALID_DATA);
- }
- }
-
- return hexdec($s);
- }
-
- private function hexChar($val)
- {
- return dechex($val);
- }
-
- private function hasJSONUnescapedUnicode()
- {
- if (PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4)) {
- return true;
- }
-
- return false;
- }
-
- private function unescapedUnicode($str)
- {
- if ($this->hasJSONUnescapedUnicode()) {
- return json_encode($str, JSON_UNESCAPED_UNICODE);
- }
-
- $json = json_encode($str);
-
- /*
- * Unescaped character outside the Basic Multilingual Plane
- * High surrogate: 0xD800 - 0xDBFF
- * Low surrogate: 0xDC00 - 0xDFFF
- */
- $json = preg_replace_callback(
- '/\\\\u(d[89ab][0-9a-f]{2})\\\\u(d[cdef][0-9a-f]{2})/i',
- function ($matches) {
- return mb_convert_encoding(pack('H*', $matches[1] . $matches[2]), 'UTF-8', 'UTF-16BE');
- },
- $json
- );
-
- /*
- * Unescaped characters within the Basic Multilingual Plane
- */
- $json = preg_replace_callback(
- '/\\\\u([0-9a-f]{4})/i',
- function ($matches) {
- return mb_convert_encoding(pack('H*', $matches[1]), 'UTF-8', 'UTF-16BE');
- },
- $json
- );
-
- return $json;
- }
-
- private function writeJSONString($b)
- {
- $this->context_->write();
-
- if (is_numeric($b) && $this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
-
- $this->trans_->write($this->unescapedUnicode($b));
-
- if (is_numeric($b) && $this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
- }
-
- private function writeJSONInteger($num)
- {
- $this->context_->write();
-
- if ($this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
-
- $this->trans_->write($num);
-
- if ($this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
- }
-
- private function writeJSONDouble($num)
- {
- $this->context_->write();
-
- if ($this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
-
- $this->trans_->write(json_encode($num));
-
- if ($this->context_->escapeNum()) {
- $this->trans_->write(self::QUOTE);
- }
- }
-
- private function writeJSONBase64($data)
- {
- $this->context_->write();
- $this->trans_->write(self::QUOTE);
- $this->trans_->write(json_encode(base64_encode($data)));
- $this->trans_->write(self::QUOTE);
- }
-
- private function writeJSONObjectStart()
- {
- $this->context_->write();
- $this->trans_->write(self::LBRACE);
- $this->pushContext(new PairContext($this));
- }
-
- private function writeJSONObjectEnd()
- {
- $this->popContext();
- $this->trans_->write(self::RBRACE);
- }
-
- private function writeJSONArrayStart()
- {
- $this->context_->write();
- $this->trans_->write(self::LBRACKET);
- $this->pushContext(new ListContext($this));
- }
-
- private function writeJSONArrayEnd()
- {
- $this->popContext();
- $this->trans_->write(self::RBRACKET);
- }
-
- private function readJSONString($skipContext)
- {
- if (!$skipContext) {
- $this->context_->read();
- }
-
- $jsonString = '';
- $lastChar = null;
- while (true) {
- $ch = $this->reader_->read();
- $jsonString .= $ch;
- if ($ch == self::QUOTE &&
- $lastChar !== null &&
- $lastChar !== self::ESCSEQ) {
- break;
- }
- if ($ch == self::ESCSEQ && $lastChar == self::ESCSEQ) {
- $lastChar = self::DOUBLEESC;
- } else {
- $lastChar = $ch;
- }
- }
-
- return json_decode($jsonString);
- }
-
- private function isJSONNumeric($b)
- {
- switch ($b) {
- case '+':
- case '-':
- case '.':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'E':
- case 'e':
- return true;
- }
-
- return false;
- }
-
- private function readJSONNumericChars()
- {
- $strbld = array();
-
- while (true) {
- $ch = $this->reader_->peek();
-
- if (!$this->isJSONNumeric($ch)) {
- break;
- }
-
- $strbld[] = $this->reader_->read();
- }
-
- return implode("", $strbld);
- }
-
- private function readJSONInteger()
- {
- $this->context_->read();
-
- if ($this->context_->escapeNum()) {
- $this->readJSONSyntaxChar(self::QUOTE);
- }
-
- $str = $this->readJSONNumericChars();
-
- if ($this->context_->escapeNum()) {
- $this->readJSONSyntaxChar(self::QUOTE);
- }
-
- if (!is_numeric($str)) {
- throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA);
- }
-
- return intval($str);
- }
-
- /**
- * Identical to readJSONInteger but without the final cast.
- * Needed for proper handling of i64 on 32 bit machines. Why a
- * separate function? So we don't have to force the rest of the
- * use cases through the extra conditional.
- */
- private function readJSONIntegerAsString()
- {
- $this->context_->read();
-
- if ($this->context_->escapeNum()) {
- $this->readJSONSyntaxChar(self::QUOTE);
- }
-
- $str = $this->readJSONNumericChars();
-
- if ($this->context_->escapeNum()) {
- $this->readJSONSyntaxChar(self::QUOTE);
- }
-
- if (!is_numeric($str)) {
- throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA);
- }
-
- return $str;
- }
-
- private function readJSONDouble()
- {
- $this->context_->read();
-
- if (substr($this->reader_->peek(), 0, 1) == self::QUOTE) {
- $arr = $this->readJSONString(true);
-
- if ($arr == "NaN") {
- return NAN;
- } elseif ($arr == "Infinity") {
- return INF;
- } elseif (!$this->context_->escapeNum()) {
- throw new TProtocolException(
- "Numeric data unexpectedly quoted " . $arr,
- TProtocolException::INVALID_DATA
- );
- }
-
- return floatval($arr);
- } else {
- if ($this->context_->escapeNum()) {
- $this->readJSONSyntaxChar(self::QUOTE);
- }
-
- return floatval($this->readJSONNumericChars());
- }
- }
-
- private function readJSONBase64()
- {
- $arr = $this->readJSONString(false);
- $data = base64_decode($arr, true);
-
- if ($data === false) {
- throw new TProtocolException("Invalid base64 data " . $arr, TProtocolException::INVALID_DATA);
- }
-
- return $data;
- }
-
- private function readJSONObjectStart()
- {
- $this->context_->read();
- $this->readJSONSyntaxChar(self::LBRACE);
- $this->pushContext(new PairContext($this));
- }
-
- private function readJSONObjectEnd()
- {
- $this->readJSONSyntaxChar(self::RBRACE);
- $this->popContext();
- }
-
- private function readJSONArrayStart()
- {
- $this->context_->read();
- $this->readJSONSyntaxChar(self::LBRACKET);
- $this->pushContext(new ListContext($this));
- }
-
- private function readJSONArrayEnd()
- {
- $this->readJSONSyntaxChar(self::RBRACKET);
- $this->popContext();
- }
-
- /**
- * Writes the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @param int $seqid The sequence id of this message
- */
- public function writeMessageBegin($name, $type, $seqid)
- {
- $this->writeJSONArrayStart();
- $this->writeJSONInteger(self::VERSION);
- $this->writeJSONString($name);
- $this->writeJSONInteger($type);
- $this->writeJSONInteger($seqid);
- }
-
- /**
- * Close the message
- */
- public function writeMessageEnd()
- {
- $this->writeJSONArrayEnd();
- }
-
- /**
- * Writes a struct header.
- *
- * @param string $name Struct name
- * @throws TException on write error
- * @return int How many bytes written
- */
- public function writeStructBegin($name)
- {
- $this->writeJSONObjectStart();
- }
-
- /**
- * Close a struct.
- *
- * @throws TException on write error
- * @return int How many bytes written
- */
- public function writeStructEnd()
- {
- $this->writeJSONObjectEnd();
- }
-
- public function writeFieldBegin($fieldName, $fieldType, $fieldId)
- {
- $this->writeJSONInteger($fieldId);
- $this->writeJSONObjectStart();
- $this->writeJSONString($this->getTypeNameForTypeID($fieldType));
- }
-
- public function writeFieldEnd()
- {
- $this->writeJsonObjectEnd();
- }
-
- public function writeFieldStop()
- {
- }
-
- public function writeMapBegin($keyType, $valType, $size)
- {
- $this->writeJSONArrayStart();
- $this->writeJSONString($this->getTypeNameForTypeID($keyType));
- $this->writeJSONString($this->getTypeNameForTypeID($valType));
- $this->writeJSONInteger($size);
- $this->writeJSONObjectStart();
- }
-
- public function writeMapEnd()
- {
- $this->writeJSONObjectEnd();
- $this->writeJSONArrayEnd();
- }
-
- public function writeListBegin($elemType, $size)
- {
- $this->writeJSONArrayStart();
- $this->writeJSONString($this->getTypeNameForTypeID($elemType));
- $this->writeJSONInteger($size);
- }
-
- public function writeListEnd()
- {
- $this->writeJSONArrayEnd();
- }
-
- public function writeSetBegin($elemType, $size)
- {
- $this->writeJSONArrayStart();
- $this->writeJSONString($this->getTypeNameForTypeID($elemType));
- $this->writeJSONInteger($size);
- }
-
- public function writeSetEnd()
- {
- $this->writeJSONArrayEnd();
- }
-
- public function writeBool($bool)
- {
- $this->writeJSONInteger($bool ? 1 : 0);
- }
-
- public function writeByte($byte)
- {
- $this->writeJSONInteger($byte);
- }
-
- public function writeI16($i16)
- {
- $this->writeJSONInteger($i16);
- }
-
- public function writeI32($i32)
- {
- $this->writeJSONInteger($i32);
- }
-
- public function writeI64($i64)
- {
- $this->writeJSONInteger($i64);
- }
-
- public function writeDouble($dub)
- {
- $this->writeJSONDouble($dub);
- }
-
- public function writeString($str)
- {
- $this->writeJSONString($str);
- }
-
- /**
- * Reads the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @parem int $seqid The sequence id of this message
- */
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- $this->readJSONArrayStart();
-
- if ($this->readJSONInteger() != self::VERSION) {
- throw new TProtocolException("Message contained bad version", TProtocolException::BAD_VERSION);
- }
-
- $name = $this->readJSONString(false);
- $type = $this->readJSONInteger();
- $seqid = $this->readJSONInteger();
-
- return true;
- }
-
- /**
- * Read the close of message
- */
- public function readMessageEnd()
- {
- $this->readJSONArrayEnd();
- }
-
- public function readStructBegin(&$name)
- {
- $this->readJSONObjectStart();
-
- return 0;
- }
-
- public function readStructEnd()
- {
- $this->readJSONObjectEnd();
- }
-
- public function readFieldBegin(&$name, &$fieldType, &$fieldId)
- {
- $ch = $this->reader_->peek();
- $name = "";
-
- if (substr($ch, 0, 1) == self::RBRACE) {
- $fieldType = TType::STOP;
- } else {
- $fieldId = $this->readJSONInteger();
- $this->readJSONObjectStart();
- $fieldType = $this->getTypeIDForTypeName($this->readJSONString(false));
- }
- }
-
- public function readFieldEnd()
- {
- $this->readJSONObjectEnd();
- }
-
- public function readMapBegin(&$keyType, &$valType, &$size)
- {
- $this->readJSONArrayStart();
- $keyType = $this->getTypeIDForTypeName($this->readJSONString(false));
- $valType = $this->getTypeIDForTypeName($this->readJSONString(false));
- $size = $this->readJSONInteger();
- $this->readJSONObjectStart();
- }
-
- public function readMapEnd()
- {
- $this->readJSONObjectEnd();
- $this->readJSONArrayEnd();
- }
-
- public function readListBegin(&$elemType, &$size)
- {
- $this->readJSONArrayStart();
- $elemType = $this->getTypeIDForTypeName($this->readJSONString(false));
- $size = $this->readJSONInteger();
-
- return true;
- }
-
- public function readListEnd()
- {
- $this->readJSONArrayEnd();
- }
-
- public function readSetBegin(&$elemType, &$size)
- {
- $this->readJSONArrayStart();
- $elemType = $this->getTypeIDForTypeName($this->readJSONString(false));
- $size = $this->readJSONInteger();
-
- return true;
- }
-
- public function readSetEnd()
- {
- $this->readJSONArrayEnd();
- }
-
- public function readBool(&$bool)
- {
- $bool = $this->readJSONInteger() == 0 ? false : true;
-
- return true;
- }
-
- public function readByte(&$byte)
- {
- $byte = $this->readJSONInteger();
-
- return true;
- }
-
- public function readI16(&$i16)
- {
- $i16 = $this->readJSONInteger();
-
- return true;
- }
-
- public function readI32(&$i32)
- {
- $i32 = $this->readJSONInteger();
-
- return true;
- }
-
- public function readI64(&$i64)
- {
- if (PHP_INT_SIZE === 4) {
- $i64 = $this->readJSONIntegerAsString();
- } else {
- $i64 = $this->readJSONInteger();
- }
-
- return true;
- }
-
- public function readDouble(&$dub)
- {
- $dub = $this->readJSONDouble();
-
- return true;
- }
-
- public function readString(&$str)
- {
- $str = $this->readJSONString(false);
-
- return true;
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TMultiplexedProtocol.php b/vendor/packaged/thrift/src/Protocol/TMultiplexedProtocol.php
deleted file mode 100644
index d579c099d..000000000
--- a/vendor/packaged/thrift/src/Protocol/TMultiplexedProtocol.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Type\TMessageType;
-
-/**
- * <code>TMultiplexedProtocol</code> is a protocol-independent concrete decorator
- * that allows a Thrift client to communicate with a multiplexing Thrift server,
- * by prepending the service name to the function name during function calls.
- *
- * @package Thrift\Protocol
- */
-class TMultiplexedProtocol extends TProtocolDecorator
-{
- /**
- * Separator between service name and function name.
- * Should be the same as used at multiplexed Thrift server.
- *
- * @var string
- */
- const SEPARATOR = ":";
-
- /**
- * The name of service.
- *
- * @var string
- */
- private $serviceName_;
-
- /**
- * Constructor of <code>TMultiplexedProtocol</code> class.
- *
- * Wrap the specified protocol, allowing it to be used to communicate with a
- * multiplexing server. The <code>$serviceName</code> is required as it is
- * prepended to the message header so that the multiplexing server can broker
- * the function call to the proper service.
- *
- * @param TProtocol $protocol
- * @param string $serviceName The name of service.
- */
- public function __construct(TProtocol $protocol, $serviceName)
- {
- parent::__construct($protocol);
- $this->serviceName_ = $serviceName;
- }
-
- /**
- * Writes the message header.
- * Prepends the service name to the function name, separated by <code>TMultiplexedProtocol::SEPARATOR</code>.
- *
- * @param string $name Function name.
- * @param int $type Message type.
- * @param int $seqid The sequence id of this message.
- */
- public function writeMessageBegin($name, $type, $seqid)
- {
- if ($type == TMessageType::CALL || $type == TMessageType::ONEWAY) {
- $nameWithService = $this->serviceName_ . self::SEPARATOR . $name;
- parent::writeMessageBegin($nameWithService, $type, $seqid);
- } else {
- parent::writeMessageBegin($name, $type, $seqid);
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TProtocol.php b/vendor/packaged/thrift/src/Protocol/TProtocol.php
deleted file mode 100644
index f7b581f7b..000000000
--- a/vendor/packaged/thrift/src/Protocol/TProtocol.php
+++ /dev/null
@@ -1,352 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Exception\TException;
-use Thrift\Transport\TTransport;
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-
-/**
- * Protocol base class module.
- */
-abstract class TProtocol
-{
- /**
- * Underlying transport
- *
- * @var TTransport
- */
- protected $trans_;
-
- /**
- * @param TTransport $trans
- */
- protected function __construct($trans)
- {
- $this->trans_ = $trans;
- }
-
- /**
- * Accessor for transport
- *
- * @return TTransport
- */
- public function getTransport()
- {
- return $this->trans_;
- }
-
- /**
- * Writes the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @param int $seqid The sequence id of this message
- */
- abstract public function writeMessageBegin($name, $type, $seqid);
-
- /**
- * Close the message
- */
- abstract public function writeMessageEnd();
-
- /**
- * Writes a struct header.
- *
- * @param string $name Struct name
- * @throws TException on write error
- * @return int How many bytes written
- */
- abstract public function writeStructBegin($name);
-
- /**
- * Close a struct.
- *
- * @throws TException on write error
- * @return int How many bytes written
- */
- abstract public function writeStructEnd();
-
- /*
- * Starts a field.
- *
- * @param string $name Field name
- * @param int $type Field type
- * @param int $fid Field id
- * @throws TException on write error
- * @return int How many bytes written
- */
- abstract public function writeFieldBegin($fieldName, $fieldType, $fieldId);
-
- abstract public function writeFieldEnd();
-
- abstract public function writeFieldStop();
-
- abstract public function writeMapBegin($keyType, $valType, $size);
-
- abstract public function writeMapEnd();
-
- abstract public function writeListBegin($elemType, $size);
-
- abstract public function writeListEnd();
-
- abstract public function writeSetBegin($elemType, $size);
-
- abstract public function writeSetEnd();
-
- abstract public function writeBool($bool);
-
- abstract public function writeByte($byte);
-
- abstract public function writeI16($i16);
-
- abstract public function writeI32($i32);
-
- abstract public function writeI64($i64);
-
- abstract public function writeDouble($dub);
-
- abstract public function writeString($str);
-
- /**
- * Reads the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @parem int $seqid The sequence id of this message
- */
- abstract public function readMessageBegin(&$name, &$type, &$seqid);
-
- /**
- * Read the close of message
- */
- abstract public function readMessageEnd();
-
- abstract public function readStructBegin(&$name);
-
- abstract public function readStructEnd();
-
- abstract public function readFieldBegin(&$name, &$fieldType, &$fieldId);
-
- abstract public function readFieldEnd();
-
- abstract public function readMapBegin(&$keyType, &$valType, &$size);
-
- abstract public function readMapEnd();
-
- abstract public function readListBegin(&$elemType, &$size);
-
- abstract public function readListEnd();
-
- abstract public function readSetBegin(&$elemType, &$size);
-
- abstract public function readSetEnd();
-
- abstract public function readBool(&$bool);
-
- abstract public function readByte(&$byte);
-
- abstract public function readI16(&$i16);
-
- abstract public function readI32(&$i32);
-
- abstract public function readI64(&$i64);
-
- abstract public function readDouble(&$dub);
-
- abstract public function readString(&$str);
-
- /**
- * The skip function is a utility to parse over unrecognized date without
- * causing corruption.
- *
- * @param TType $type What type is it
- */
- public function skip($type)
- {
- switch ($type) {
- case TType::BOOL:
- return $this->readBool($bool);
- case TType::BYTE:
- return $this->readByte($byte);
- case TType::I16:
- return $this->readI16($i16);
- case TType::I32:
- return $this->readI32($i32);
- case TType::I64:
- return $this->readI64($i64);
- case TType::DOUBLE:
- return $this->readDouble($dub);
- case TType::STRING:
- return $this->readString($str);
- case TType::STRUCT:
- $result = $this->readStructBegin($name);
- while (true) {
- $result += $this->readFieldBegin($name, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- $result += $this->skip($ftype);
- $result += $this->readFieldEnd();
- }
- $result += $this->readStructEnd();
-
- return $result;
-
- case TType::MAP:
- $result = $this->readMapBegin($keyType, $valType, $size);
- for ($i = 0; $i < $size; $i++) {
- $result += $this->skip($keyType);
- $result += $this->skip($valType);
- }
- $result += $this->readMapEnd();
-
- return $result;
-
- case TType::SET:
- $result = $this->readSetBegin($elemType, $size);
- for ($i = 0; $i < $size; $i++) {
- $result += $this->skip($elemType);
- }
- $result += $this->readSetEnd();
-
- return $result;
-
- case TType::LST:
- $result = $this->readListBegin($elemType, $size);
- for ($i = 0; $i < $size; $i++) {
- $result += $this->skip($elemType);
- }
- $result += $this->readListEnd();
-
- return $result;
-
- default:
- throw new TProtocolException(
- 'Unknown field type: ' . $type,
- TProtocolException::INVALID_DATA
- );
- }
- }
-
- /**
- * Utility for skipping binary data
- *
- * @param TTransport $itrans TTransport object
- * @param int $type Field type
- */
- public static function skipBinary($itrans, $type)
- {
- switch ($type) {
- case TType::BOOL:
- return $itrans->readAll(1);
- case TType::BYTE:
- return $itrans->readAll(1);
- case TType::I16:
- return $itrans->readAll(2);
- case TType::I32:
- return $itrans->readAll(4);
- case TType::I64:
- return $itrans->readAll(8);
- case TType::DOUBLE:
- return $itrans->readAll(8);
- case TType::STRING:
- $len = unpack('N', $itrans->readAll(4));
- $len = $len[1];
- if ($len > 0x7fffffff) {
- $len = 0 - (($len - 1) ^ 0xffffffff);
- }
-
- return 4 + $itrans->readAll($len);
-
- case TType::STRUCT:
- $result = 0;
- while (true) {
- $ftype = 0;
- $fid = 0;
- $data = $itrans->readAll(1);
- $arr = unpack('c', $data);
- $ftype = $arr[1];
- if ($ftype == TType::STOP) {
- break;
- }
- // I16 field id
- $result += $itrans->readAll(2);
- $result += self::skipBinary($itrans, $ftype);
- }
-
- return $result;
-
- case TType::MAP:
- // Ktype
- $data = $itrans->readAll(1);
- $arr = unpack('c', $data);
- $ktype = $arr[1];
- // Vtype
- $data = $itrans->readAll(1);
- $arr = unpack('c', $data);
- $vtype = $arr[1];
- // Size
- $data = $itrans->readAll(4);
- $arr = unpack('N', $data);
- $size = $arr[1];
- if ($size > 0x7fffffff) {
- $size = 0 - (($size - 1) ^ 0xffffffff);
- }
- $result = 6;
- for ($i = 0; $i < $size; $i++) {
- $result += self::skipBinary($itrans, $ktype);
- $result += self::skipBinary($itrans, $vtype);
- }
-
- return $result;
-
- case TType::SET:
- case TType::LST:
- // Vtype
- $data = $itrans->readAll(1);
- $arr = unpack('c', $data);
- $vtype = $arr[1];
- // Size
- $data = $itrans->readAll(4);
- $arr = unpack('N', $data);
- $size = $arr[1];
- if ($size > 0x7fffffff) {
- $size = 0 - (($size - 1) ^ 0xffffffff);
- }
- $result = 5;
- for ($i = 0; $i < $size; $i++) {
- $result += self::skipBinary($itrans, $vtype);
- }
-
- return $result;
-
- default:
- throw new TProtocolException(
- 'Unknown field type: ' . $type,
- TProtocolException::INVALID_DATA
- );
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TProtocolDecorator.php b/vendor/packaged/thrift/src/Protocol/TProtocolDecorator.php
deleted file mode 100644
index a85e0b8e5..000000000
--- a/vendor/packaged/thrift/src/Protocol/TProtocolDecorator.php
+++ /dev/null
@@ -1,285 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Exception\TException;
-
-/**
- * <code>TProtocolDecorator</code> forwards all requests to an enclosed
- * <code>TProtocol</code> instance, providing a way to author concise
- * concrete decorator subclasses. While it has no abstract methods, it
- * is marked abstract as a reminder that by itself, it does not modify
- * the behaviour of the enclosed <code>TProtocol</code>.
- *
- * @package Thrift\Protocol
- */
-abstract class TProtocolDecorator extends TProtocol
-{
- /**
- * Instance of protocol, to which all operations will be forwarded.
- *
- * @var TProtocol
- */
- private $concreteProtocol_;
-
- /**
- * Constructor of <code>TProtocolDecorator</code> class.
- * Encloses the specified protocol.
- *
- * @param TProtocol $protocol All operations will be forward to this instance. Must be non-null.
- */
- protected function __construct(TProtocol $protocol)
- {
- parent::__construct($protocol->getTransport());
- $this->concreteProtocol_ = $protocol;
- }
-
- /**
- * Writes the message header.
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @param int $seqid The sequence id of this message
- */
- public function writeMessageBegin($name, $type, $seqid)
- {
- return $this->concreteProtocol_->writeMessageBegin($name, $type, $seqid);
- }
-
- /**
- * Closes the message.
- */
- public function writeMessageEnd()
- {
- return $this->concreteProtocol_->writeMessageEnd();
- }
-
- /**
- * Writes a struct header.
- *
- * @param string $name Struct name
- *
- * @throws TException on write error
- * @return int How many bytes written
- */
- public function writeStructBegin($name)
- {
- return $this->concreteProtocol_->writeStructBegin($name);
- }
-
- /**
- * Close a struct.
- *
- * @throws TException on write error
- * @return int How many bytes written
- */
- public function writeStructEnd()
- {
- return $this->concreteProtocol_->writeStructEnd();
- }
-
- public function writeFieldBegin($fieldName, $fieldType, $fieldId)
- {
- return $this->concreteProtocol_->writeFieldBegin($fieldName, $fieldType, $fieldId);
- }
-
- public function writeFieldEnd()
- {
- return $this->concreteProtocol_->writeFieldEnd();
- }
-
- public function writeFieldStop()
- {
- return $this->concreteProtocol_->writeFieldStop();
- }
-
- public function writeMapBegin($keyType, $valType, $size)
- {
- return $this->concreteProtocol_->writeMapBegin($keyType, $valType, $size);
- }
-
- public function writeMapEnd()
- {
- return $this->concreteProtocol_->writeMapEnd();
- }
-
- public function writeListBegin($elemType, $size)
- {
- return $this->concreteProtocol_->writeListBegin($elemType, $size);
- }
-
- public function writeListEnd()
- {
- return $this->concreteProtocol_->writeListEnd();
- }
-
- public function writeSetBegin($elemType, $size)
- {
- return $this->concreteProtocol_->writeSetBegin($elemType, $size);
- }
-
- public function writeSetEnd()
- {
- return $this->concreteProtocol_->writeSetEnd();
- }
-
- public function writeBool($bool)
- {
- return $this->concreteProtocol_->writeBool($bool);
- }
-
- public function writeByte($byte)
- {
- return $this->concreteProtocol_->writeByte($byte);
- }
-
- public function writeI16($i16)
- {
- return $this->concreteProtocol_->writeI16($i16);
- }
-
- public function writeI32($i32)
- {
- return $this->concreteProtocol_->writeI32($i32);
- }
-
- public function writeI64($i64)
- {
- return $this->concreteProtocol_->writeI64($i64);
- }
-
- public function writeDouble($dub)
- {
- return $this->concreteProtocol_->writeDouble($dub);
- }
-
- public function writeString($str)
- {
- return $this->concreteProtocol_->writeString($str);
- }
-
- /**
- * Reads the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @param int $seqid The sequence id of this message
- */
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- return $this->concreteProtocol_->readMessageBegin($name, $type, $seqid);
- }
-
- /**
- * Read the close of message
- */
- public function readMessageEnd()
- {
- return $this->concreteProtocol_->readMessageEnd();
- }
-
- public function readStructBegin(&$name)
- {
- return $this->concreteProtocol_->readStructBegin($name);
- }
-
- public function readStructEnd()
- {
- return $this->concreteProtocol_->readStructEnd();
- }
-
- public function readFieldBegin(&$name, &$fieldType, &$fieldId)
- {
- return $this->concreteProtocol_->readFieldBegin($name, $fieldType, $fieldId);
- }
-
- public function readFieldEnd()
- {
- return $this->concreteProtocol_->readFieldEnd();
- }
-
- public function readMapBegin(&$keyType, &$valType, &$size)
- {
- $this->concreteProtocol_->readMapBegin($keyType, $valType, $size);
- }
-
- public function readMapEnd()
- {
- return $this->concreteProtocol_->readMapEnd();
- }
-
- public function readListBegin(&$elemType, &$size)
- {
- $this->concreteProtocol_->readListBegin($elemType, $size);
- }
-
- public function readListEnd()
- {
- return $this->concreteProtocol_->readListEnd();
- }
-
- public function readSetBegin(&$elemType, &$size)
- {
- return $this->concreteProtocol_->readSetBegin($elemType, $size);
- }
-
- public function readSetEnd()
- {
- return $this->concreteProtocol_->readSetEnd();
- }
-
- public function readBool(&$bool)
- {
- return $this->concreteProtocol_->readBool($bool);
- }
-
- public function readByte(&$byte)
- {
- return $this->concreteProtocol_->readByte($byte);
- }
-
- public function readI16(&$i16)
- {
- return $this->concreteProtocol_->readI16($i16);
- }
-
- public function readI32(&$i32)
- {
- return $this->concreteProtocol_->readI32($i32);
- }
-
- public function readI64(&$i64)
- {
- return $this->concreteProtocol_->readI64($i64);
- }
-
- public function readDouble(&$dub)
- {
- return $this->concreteProtocol_->readDouble($dub);
- }
-
- public function readString(&$str)
- {
- return $this->concreteProtocol_->readString($str);
- }
-}
diff --git a/vendor/packaged/thrift/src/Protocol/TSimpleJSONProtocol.php b/vendor/packaged/thrift/src/Protocol/TSimpleJSONProtocol.php
deleted file mode 100644
index 1cf1f6407..000000000
--- a/vendor/packaged/thrift/src/Protocol/TSimpleJSONProtocol.php
+++ /dev/null
@@ -1,374 +0,0 @@
-<?php
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\SimpleJSON\Context;
-use Thrift\Protocol\SimpleJSON\ListContext;
-use Thrift\Protocol\SimpleJSON\StructContext;
-use Thrift\Protocol\SimpleJSON\MapContext;
-use Thrift\Protocol\SimpleJSON\CollectionMapKeyException;
-
-/**
- * SimpleJSON implementation of thrift protocol, ported from Java.
- */
-class TSimpleJSONProtocol extends TProtocol
-{
- const COMMA = ',';
- const COLON = ':';
- const LBRACE = '{';
- const RBRACE = '}';
- const LBRACKET = '[';
- const RBRACKET = ']';
- const QUOTE = '"';
-
- const NAME_MAP = "map";
- const NAME_LIST = "lst";
- const NAME_SET = "set";
-
- protected $writeContext_ = null;
- protected $writeContextStack_ = [];
-
- /**
- * Push a new write context onto the stack.
- */
- protected function pushWriteContext(Context $c)
- {
- $this->writeContextStack_[] = $this->writeContext_;
- $this->writeContext_ = $c;
- }
-
- /**
- * Pop the last write context off the stack
- */
- protected function popWriteContext()
- {
- $this->writeContext_ = array_pop($this->writeContextStack_);
- }
-
- /**
- * Used to make sure that we are not encountering a map whose keys are containers
- */
- protected function assertContextIsNotMapKey($invalidKeyType)
- {
- if ($this->writeContext_->isMapKey()) {
- throw new CollectionMapKeyException(
- "Cannot serialize a map with keys that are of type " .
- $invalidKeyType
- );
- }
- }
-
- private function writeJSONString($b)
- {
- $this->writeContext_->write();
-
- $this->trans_->write(json_encode((string)$b));
- }
-
- private function writeJSONInteger($num)
- {
- $isMapKey = $this->writeContext_->isMapKey();
-
- $this->writeContext_->write();
-
- if ($isMapKey) {
- $this->trans_->write(self::QUOTE);
- }
-
- $this->trans_->write((int)$num);
-
- if ($isMapKey) {
- $this->trans_->write(self::QUOTE);
- }
- }
-
- private function writeJSONDouble($num)
- {
- $isMapKey = $this->writeContext_->isMapKey();
-
- $this->writeContext_->write();
-
- if ($isMapKey) {
- $this->trans_->write(self::QUOTE);
- }
-
- $this->trans_->write(json_encode((float)$num));
-
- if ($isMapKey) {
- $this->trans_->write(self::QUOTE);
- }
- }
-
- /**
- * Constructor
- */
- public function __construct($trans)
- {
- parent::__construct($trans);
- $this->writeContext_ = new Context();
- }
-
- /**
- * Writes the message header
- *
- * @param string $name Function name
- * @param int $type message type TMessageType::CALL or TMessageType::REPLY
- * @param int $seqid The sequence id of this message
- */
- public function writeMessageBegin($name, $type, $seqid)
- {
- $this->trans_->write(self::LBRACKET);
- $this->pushWriteContext(new ListContext($this));
- $this->writeJSONString($name);
- $this->writeJSONInteger($type);
- $this->writeJSONInteger($seqid);
- }
-
- /**
- * Close the message
- */
- public function writeMessageEnd()
- {
- $this->popWriteContext();
- $this->trans_->write(self::RBRACKET);
- }
-
- /**
- * Writes a struct header.
- *
- * @param string $name Struct name
- */
- public function writeStructBegin($name)
- {
- $this->writeContext_->write();
- $this->trans_->write(self::LBRACE);
- $this->pushWriteContext(new StructContext($this));
- }
-
- /**
- * Close a struct.
- */
- public function writeStructEnd()
- {
- $this->popWriteContext();
- $this->trans_->write(self::RBRACE);
- }
-
- public function writeFieldBegin($fieldName, $fieldType, $fieldId)
- {
- $this->writeJSONString($fieldName);
- }
-
- public function writeFieldEnd()
- {
- }
-
- public function writeFieldStop()
- {
- }
-
- public function writeMapBegin($keyType, $valType, $size)
- {
- $this->assertContextIsNotMapKey(self::NAME_MAP);
- $this->writeContext_->write();
- $this->trans_->write(self::LBRACE);
- $this->pushWriteContext(new MapContext($this));
- }
-
- public function writeMapEnd()
- {
- $this->popWriteContext();
- $this->trans_->write(self::RBRACE);
- }
-
- public function writeListBegin($elemType, $size)
- {
- $this->assertContextIsNotMapKey(self::NAME_LIST);
- $this->writeContext_->write();
- $this->trans_->write(self::LBRACKET);
- $this->pushWriteContext(new ListContext($this));
- // No metadata!
- }
-
- public function writeListEnd()
- {
- $this->popWriteContext();
- $this->trans_->write(self::RBRACKET);
- }
-
- public function writeSetBegin($elemType, $size)
- {
- $this->assertContextIsNotMapKey(self::NAME_SET);
- $this->writeContext_->write();
- $this->trans_->write(self::LBRACKET);
- $this->pushWriteContext(new ListContext($this));
- // No metadata!
- }
-
- public function writeSetEnd()
- {
- $this->popWriteContext();
- $this->trans_->write(self::RBRACKET);
- }
-
- public function writeBool($bool)
- {
- $this->writeJSONInteger($bool ? 1 : 0);
- }
-
- public function writeByte($byte)
- {
- $this->writeJSONInteger($byte);
- }
-
- public function writeI16($i16)
- {
- $this->writeJSONInteger($i16);
- }
-
- public function writeI32($i32)
- {
- $this->writeJSONInteger($i32);
- }
-
- public function writeI64($i64)
- {
- $this->writeJSONInteger($i64);
- }
-
- public function writeDouble($dub)
- {
- $this->writeJSONDouble($dub);
- }
-
- public function writeString($str)
- {
- $this->writeJSONString($str);
- }
-
- /**
- * Reading methods.
- *
- * simplejson is not meant to be read back into thrift
- * - see http://wiki.apache.org/thrift/ThriftUsageJava
- * - use JSON instead
- */
-
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- throw new TException("Not implemented");
- }
-
- public function readMessageEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readStructBegin(&$name)
- {
- throw new TException("Not implemented");
- }
-
- public function readStructEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readFieldBegin(&$name, &$fieldType, &$fieldId)
- {
- throw new TException("Not implemented");
- }
-
- public function readFieldEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readMapBegin(&$keyType, &$valType, &$size)
- {
- throw new TException("Not implemented");
- }
-
- public function readMapEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readListBegin(&$elemType, &$size)
- {
- throw new TException("Not implemented");
- }
-
- public function readListEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readSetBegin(&$elemType, &$size)
- {
- throw new TException("Not implemented");
- }
-
- public function readSetEnd()
- {
- throw new TException("Not implemented");
- }
-
- public function readBool(&$bool)
- {
- throw new TException("Not implemented");
- }
-
- public function readByte(&$byte)
- {
- throw new TException("Not implemented");
- }
-
- public function readI16(&$i16)
- {
- throw new TException("Not implemented");
- }
-
- public function readI32(&$i32)
- {
- throw new TException("Not implemented");
- }
-
- public function readI64(&$i64)
- {
- throw new TException("Not implemented");
- }
-
- public function readDouble(&$dub)
- {
- throw new TException("Not implemented");
- }
-
- public function readString(&$str)
- {
- throw new TException("Not implemented");
- }
-}
diff --git a/vendor/packaged/thrift/src/Serializer/TBinarySerializer.php b/vendor/packaged/thrift/src/Serializer/TBinarySerializer.php
deleted file mode 100644
index 9d2b14730..000000000
--- a/vendor/packaged/thrift/src/Serializer/TBinarySerializer.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.protocol
- * @author: rmarin ([email protected])
- */
-
-namespace Thrift\Serializer;
-
-use Thrift\Transport\TMemoryBuffer;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Type\TMessageType;
-
-/**
- * Utility class for serializing and deserializing
- * a thrift object using TBinaryProtocolAccelerated.
- */
-class TBinarySerializer
-{
- // NOTE(rmarin): Because thrift_protocol_write_binary
- // adds a begin message prefix, you cannot specify
- // a transport in which to serialize an object. It has to
- // be a string. Otherwise we will break the compatibility with
- // normal deserialization.
- public static function serialize($object)
- {
- $transport = new TMemoryBuffer();
- $protocol = new TBinaryProtocolAccelerated($transport);
- if (function_exists('thrift_protocol_write_binary')) {
- thrift_protocol_write_binary(
- $protocol,
- $object->getName(),
- TMessageType::REPLY,
- $object,
- 0,
- $protocol->isStrictWrite()
- );
-
- $protocol->readMessageBegin($unused_name, $unused_type, $unused_seqid);
- } else {
- $object->write($protocol);
- }
- $protocol->getTransport()->flush();
-
- return $transport->getBuffer();
- }
-
- public static function deserialize($string_object, $class_name, $buffer_size = 8192)
- {
- $transport = new TMemoryBuffer();
- $protocol = new TBinaryProtocolAccelerated($transport);
- if (function_exists('thrift_protocol_read_binary')) {
- // NOTE (t.heintz) TBinaryProtocolAccelerated internally wraps our TMemoryBuffer in a
- // TBufferedTransport, so we have to retrieve it again or risk losing data when writing
- // less than 512 bytes to the transport (see the comment there as well).
- // @see THRIFT-1579
- $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
- $protocolTransport = $protocol->getTransport();
- $protocolTransport->write($string_object);
- $protocolTransport->flush();
-
- return thrift_protocol_read_binary($protocol, $class_name, $protocol->isStrictRead(), $buffer_size);
- } else {
- $transport->write($string_object);
- $object = new $class_name();
- $object->read($protocol);
-
- return $object;
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Server/TForkingServer.php b/vendor/packaged/thrift/src/Server/TForkingServer.php
deleted file mode 100644
index 0bb6e9192..000000000
--- a/vendor/packaged/thrift/src/Server/TForkingServer.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TException;
-use Thrift\Exception\TTransportException;
-
-/**
- * A forking implementation of a Thrift server.
- *
- * @package thrift.server
- */
-class TForkingServer extends TServer
-{
- /**
- * Flag for the main serving loop
- *
- * @var bool
- */
- private $stop_ = false;
-
- /**
- * List of children.
- *
- * @var array
- */
- protected $children_ = array();
-
- /**
- * Listens for new client using the supplied
- * transport. We fork when a new connection
- * arrives.
- *
- * @return void
- */
- public function serve()
- {
- $this->transport_->listen();
-
- while (!$this->stop_) {
- try {
- $transport = $this->transport_->accept();
-
- if ($transport != null) {
- $pid = pcntl_fork();
-
- if ($pid > 0) {
- $this->handleParent($transport, $pid);
- } elseif ($pid === 0) {
- $this->handleChild($transport);
- } else {
- throw new TException('Failed to fork');
- }
- }
- } catch (TTransportException $e) {
- }
-
- $this->collectChildren();
- }
- }
-
- /**
- * Code run by the parent
- *
- * @param TTransport $transport
- * @param int $pid
- * @return void
- */
- private function handleParent(TTransport $transport, $pid)
- {
- $this->children_[$pid] = $transport;
- }
-
- /**
- * Code run by the child.
- *
- * @param TTransport $transport
- * @return void
- */
- private function handleChild(TTransport $transport)
- {
- try {
- $inputTransport = $this->inputTransportFactory_->getTransport($transport);
- $outputTransport = $this->outputTransportFactory_->getTransport($transport);
- $inputProtocol = $this->inputProtocolFactory_->getProtocol($inputTransport);
- $outputProtocol = $this->outputProtocolFactory_->getProtocol($outputTransport);
- while ($this->processor_->process($inputProtocol, $outputProtocol)) {
- }
- @$transport->close();
- } catch (TTransportException $e) {
- }
-
- exit(0);
- }
-
- /**
- * Collects any children we may have
- *
- * @return void
- */
- private function collectChildren()
- {
- foreach ($this->children_ as $pid => $transport) {
- if (pcntl_waitpid($pid, $status, WNOHANG) > 0) {
- unset($this->children_[$pid]);
- if ($transport) {
- @$transport->close();
- }
- }
- }
- }
-
- /**
- * Stops the server running. Kills the transport
- * and then stops the main serving loop
- *
- * @return void
- */
- public function stop()
- {
- $this->transport_->close();
- $this->stop_ = true;
- }
-}
diff --git a/vendor/packaged/thrift/src/Server/TSSLServerSocket.php b/vendor/packaged/thrift/src/Server/TSSLServerSocket.php
deleted file mode 100644
index ac589b76b..000000000
--- a/vendor/packaged/thrift/src/Server/TSSLServerSocket.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-
-namespace Thrift\Server;
-
-use Thrift\Transport\TSSLSocket;
-
-/**
- * Socket implementation of a server agent.
- *
- * @package thrift.transport
- */
-class TSSLServerSocket extends TServerSocket
-{
- /**
- * Remote port
- *
- * @var resource
- */
- protected $context_ = null;
-
- /**
- * ServerSocket constructor
- *
- * @param string $host Host to listen on
- * @param int $port Port to listen on
- * @param resource $context Stream context
- * @return void
- */
- public function __construct($host = 'localhost', $port = 9090, $context = null)
- {
- $ssl_host = $this->getSSLHost($host);
- parent::__construct($ssl_host, $port);
- $this->context_ = $context;
- }
-
- public function getSSLHost($host)
- {
- $transport_protocol_loc = strpos($host, "://");
- if ($transport_protocol_loc === false) {
- $host = 'ssl://' . $host;
- }
- return $host;
- }
-
- /**
- * Opens a new socket server handle
- *
- * @return void
- */
- public function listen()
- {
- $this->listener_ = @stream_socket_server(
- $this->host_ . ':' . $this->port_,
- $errno,
- $errstr,
- STREAM_SERVER_BIND | STREAM_SERVER_LISTEN,
- $this->context_
- );
- }
-
- /**
- * Implementation of accept. If not client is accepted in the given time
- *
- * @return TSocket
- */
- protected function acceptImpl()
- {
- $handle = @stream_socket_accept($this->listener_, $this->acceptTimeout_ / 1000.0);
- if (!$handle) {
- return null;
- }
-
- $socket = new TSSLSocket();
- $socket->setHandle($handle);
-
- return $socket;
- }
-}
diff --git a/vendor/packaged/thrift/src/Server/TServer.php b/vendor/packaged/thrift/src/Server/TServer.php
deleted file mode 100644
index 268c37820..000000000
--- a/vendor/packaged/thrift/src/Server/TServer.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Factory\TTransportFactory;
-use Thrift\Factory\TProtocolFactory;
-
-/**
- * Generic class for a Thrift server.
- *
- * @package thrift.server
- */
-abstract class TServer
-{
- /**
- * Processor to handle new clients
- *
- * @var TProcessor
- */
- protected $processor_;
-
- /**
- * Server transport to be used for listening
- * and accepting new clients
- *
- * @var TServerTransport
- */
- protected $transport_;
-
- /**
- * Input transport factory
- *
- * @var TTransportFactory
- */
- protected $inputTransportFactory_;
-
- /**
- * Output transport factory
- *
- * @var TTransportFactory
- */
- protected $outputTransportFactory_;
-
- /**
- * Input protocol factory
- *
- * @var TProtocolFactory
- */
- protected $inputProtocolFactory_;
-
- /**
- * Output protocol factory
- *
- * @var TProtocolFactory
- */
- protected $outputProtocolFactory_;
-
- /**
- * Sets up all the factories, etc
- *
- * @param object $processor
- * @param TServerTransport $transport
- * @param TTransportFactory $inputTransportFactory
- * @param TTransportFactory $outputTransportFactory
- * @param TProtocolFactory $inputProtocolFactory
- * @param TProtocolFactory $outputProtocolFactory
- * @return void
- */
- public function __construct(
- $processor,
- TServerTransport $transport,
- TTransportFactory $inputTransportFactory,
- TTransportFactory $outputTransportFactory,
- TProtocolFactory $inputProtocolFactory,
- TProtocolFactory $outputProtocolFactory
- ) {
- $this->processor_ = $processor;
- $this->transport_ = $transport;
- $this->inputTransportFactory_ = $inputTransportFactory;
- $this->outputTransportFactory_ = $outputTransportFactory;
- $this->inputProtocolFactory_ = $inputProtocolFactory;
- $this->outputProtocolFactory_ = $outputProtocolFactory;
- }
-
- /**
- * Serves the server. This should never return
- * unless a problem permits it to do so or it
- * is interrupted intentionally
- *
- * @abstract
- * @return void
- */
- abstract public function serve();
-
- /**
- * Stops the server serving
- *
- * @abstract
- * @return void
- */
- abstract public function stop();
-}
diff --git a/vendor/packaged/thrift/src/Server/TServerSocket.php b/vendor/packaged/thrift/src/Server/TServerSocket.php
deleted file mode 100644
index 8f38fb23f..000000000
--- a/vendor/packaged/thrift/src/Server/TServerSocket.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Server;
-
-use Thrift\Transport\TSocket;
-
-/**
- * Socket implementation of a server agent.
- *
- * @package thrift.transport
- */
-class TServerSocket extends TServerTransport
-{
- /**
- * Handle for the listener socket
- *
- * @var resource
- */
- protected $listener_;
-
- /**
- * Port for the listener to listen on
- *
- * @var int
- */
- protected $port_;
-
- /**
- * Timeout when listening for a new client
- *
- * @var int
- */
- protected $acceptTimeout_ = 30000;
-
- /**
- * Host to listen on
- *
- * @var string
- */
- protected $host_;
-
- /**
- * ServerSocket constructor
- *
- * @param string $host Host to listen on
- * @param int $port Port to listen on
- * @return void
- */
- public function __construct($host = 'localhost', $port = 9090)
- {
- $this->host_ = $host;
- $this->port_ = $port;
- }
-
- /**
- * Sets the accept timeout
- *
- * @param int $acceptTimeout
- * @return void
- */
- public function setAcceptTimeout($acceptTimeout)
- {
- $this->acceptTimeout_ = $acceptTimeout;
- }
-
- /**
- * Opens a new socket server handle
- *
- * @return void
- */
- public function listen()
- {
- $this->listener_ = stream_socket_server('tcp://' . $this->host_ . ':' . $this->port_);
- }
-
- /**
- * Closes the socket server handle
- *
- * @return void
- */
- public function close()
- {
- @fclose($this->listener_);
- $this->listener_ = null;
- }
-
- /**
- * Implementation of accept. If not client is accepted in the given time
- *
- * @return TSocket
- */
- protected function acceptImpl()
- {
- $handle = @stream_socket_accept($this->listener_, $this->acceptTimeout_ / 1000.0);
- if (!$handle) {
- return null;
- }
-
- $socket = new TSocket();
- $socket->setHandle($handle);
-
- return $socket;
- }
-}
diff --git a/vendor/packaged/thrift/src/Server/TServerTransport.php b/vendor/packaged/thrift/src/Server/TServerTransport.php
deleted file mode 100644
index 15a27afa8..000000000
--- a/vendor/packaged/thrift/src/Server/TServerTransport.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Exception\TTransportException;
-
-/**
- * Generic class for Server agent.
- *
- * @package thrift.transport
- */
-abstract class TServerTransport
-{
- /**
- * List for new clients
- *
- * @abstract
- * @return void
- */
- abstract public function listen();
-
- /**
- * Close the server
- *
- * @abstract
- * @return void
- */
- abstract public function close();
-
- /**
- * Subclasses should use this to implement
- * accept.
- *
- * @abstract
- * @return TTransport
- */
- abstract protected function acceptImpl();
-
- /**
- * Uses the accept implemtation. If null is returned, an
- * exception is thrown.
- *
- * @throws TTransportException
- * @return TTransport
- */
- public function accept()
- {
- $transport = $this->acceptImpl();
-
- if ($transport == null) {
- throw new TTransportException("accept() may not return NULL");
- }
-
- return $transport;
- }
-}
diff --git a/vendor/packaged/thrift/src/Server/TSimpleServer.php b/vendor/packaged/thrift/src/Server/TSimpleServer.php
deleted file mode 100644
index 4c1dda5a5..000000000
--- a/vendor/packaged/thrift/src/Server/TSimpleServer.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Exception\TTransportException;
-
-/**
- * Simple implemtation of a Thrift server.
- *
- * @package thrift.server
- */
-class TSimpleServer extends TServer
-{
- /**
- * Flag for the main serving loop
- *
- * @var bool
- */
- private $stop_ = false;
-
- /**
- * Listens for new client using the supplied
- * transport. It handles TTransportExceptions
- * to avoid timeouts etc killing it
- *
- * @return void
- */
- public function serve()
- {
- $this->transport_->listen();
-
- while (!$this->stop_) {
- try {
- $transport = $this->transport_->accept();
-
- if ($transport != null) {
- $inputTransport = $this->inputTransportFactory_->getTransport($transport);
- $outputTransport = $this->outputTransportFactory_->getTransport($transport);
- $inputProtocol = $this->inputProtocolFactory_->getProtocol($inputTransport);
- $outputProtocol = $this->outputProtocolFactory_->getProtocol($outputTransport);
- while ($this->processor_->process($inputProtocol, $outputProtocol)) {
- }
- }
- } catch (TTransportException $e) {
- }
- }
- }
-
- /**
- * Stops the server running. Kills the transport
- * and then stops the main serving loop
- *
- * @return void
- */
- public function stop()
- {
- $this->transport_->close();
- $this->stop_ = true;
- }
-}
diff --git a/vendor/packaged/thrift/src/StoredMessageProtocol.php b/vendor/packaged/thrift/src/StoredMessageProtocol.php
deleted file mode 100644
index c4aaaa9ec..000000000
--- a/vendor/packaged/thrift/src/StoredMessageProtocol.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.processor
- */
-
-namespace Thrift;
-
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TProtocolDecorator;
-
-/**
- * Our goal was to work with any protocol. In order to do that, we needed
- * to allow them to call readMessageBegin() and get the Message in exactly
- * the standard format, without the service name prepended to the Message name.
- */
-class StoredMessageProtocol extends TProtocolDecorator
-{
- private $fname_;
- private $mtype_;
- private $rseqid_;
-
- public function __construct(TProtocol $protocol, $fname, $mtype, $rseqid)
- {
- parent::__construct($protocol);
- $this->fname_ = $fname;
- $this->mtype_ = $mtype;
- $this->rseqid_ = $rseqid;
- }
-
- public function readMessageBegin(&$name, &$type, &$seqid)
- {
- $name = $this->fname_;
- $type = $this->mtype_;
- $seqid = $this->rseqid_;
- }
-}
diff --git a/vendor/packaged/thrift/src/StringFunc/Core.php b/vendor/packaged/thrift/src/StringFunc/Core.php
deleted file mode 100644
index 39a75b3a2..000000000
--- a/vendor/packaged/thrift/src/StringFunc/Core.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-class Core implements TStringFunc
-{
- public function substr($str, $start, $length = null)
- {
- // specifying a null $length would return an empty string
- if ($length === null) {
- return substr($str, $start);
- }
-
- return substr($str, $start, $length);
- }
-
- public function strlen($str)
- {
- return strlen($str);
- }
-}
diff --git a/vendor/packaged/thrift/src/StringFunc/Mbstring.php b/vendor/packaged/thrift/src/StringFunc/Mbstring.php
deleted file mode 100644
index 968ff18f1..000000000
--- a/vendor/packaged/thrift/src/StringFunc/Mbstring.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-class Mbstring implements TStringFunc
-{
- public function substr($str, $start, $length = null)
- {
- /**
- * We need to set the charset parameter, which is the second
- * optional parameter and the first optional parameter can't
- * be null or false as a "magic" value because that would
- * cause an empty string to be returned, so we need to
- * actually calculate the proper length value.
- */
- if ($length === null) {
- $length = $this->strlen($str) - $start;
- }
-
- return mb_substr($str, $start, $length, '8bit');
- }
-
- public function strlen($str)
- {
- return mb_strlen($str, '8bit');
- }
-}
diff --git a/vendor/packaged/thrift/src/StringFunc/TStringFunc.php b/vendor/packaged/thrift/src/StringFunc/TStringFunc.php
deleted file mode 100644
index dea497f2e..000000000
--- a/vendor/packaged/thrift/src/StringFunc/TStringFunc.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-interface TStringFunc
-{
- public function substr($str, $start, $length = null);
- public function strlen($str);
-}
diff --git a/vendor/packaged/thrift/src/TMultiplexedProcessor.php b/vendor/packaged/thrift/src/TMultiplexedProcessor.php
deleted file mode 100644
index a64a9687c..000000000
--- a/vendor/packaged/thrift/src/TMultiplexedProcessor.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.processor
- */
-
-namespace Thrift;
-
-use Thrift\Exception\TException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TMultiplexedProtocol;
-use Thrift\Type\TMessageType;
-
-/**
- * <code>TMultiplexedProcessor</code> is a Processor allowing
- * a single <code>TServer</code> to provide multiple services.
- *
- * <p>To do so, you instantiate the processor and then register additional
- * processors with it, as shown in the following example:</p>
- *
- * <blockquote><code>
- * $processor = new TMultiplexedProcessor();
- *
- * processor->registerProcessor(
- * "Calculator",
- * new \tutorial\CalculatorProcessor(new CalculatorHandler()));
- *
- * processor->registerProcessor(
- * "WeatherReport",
- * new \tutorial\WeatherReportProcessor(new WeatherReportHandler()));
- *
- * $processor->process($protocol, $protocol);
- * </code></blockquote>
- */
-
-class TMultiplexedProcessor
-{
- private $serviceProcessorMap_;
-
- /**
- * 'Register' a service with this <code>TMultiplexedProcessor</code>. This
- * allows us to broker requests to individual services by using the service
- * name to select them at request time.
- *
- * @param serviceName Name of a service, has to be identical to the name
- * declared in the Thrift IDL, e.g. "WeatherReport".
- * @param processor Implementation of a service, usually referred to
- * as "handlers", e.g. WeatherReportHandler implementing WeatherReport.Iface.
- */
- public function registerProcessor($serviceName, $processor)
- {
- $this->serviceProcessorMap_[$serviceName] = $processor;
- }
-
- /**
- * This implementation of <code>process</code> performs the following steps:
- *
- * <ol>
- * <li>Read the beginning of the message.</li>
- * <li>Extract the service name from the message.</li>
- * <li>Using the service name to locate the appropriate processor.</li>
- * <li>Dispatch to the processor, with a decorated instance of TProtocol
- * that allows readMessageBegin() to return the original Message.</li>
- * </ol>
- *
- * @throws TException If the message type is not CALL or ONEWAY, if
- * the service name was not found in the message, or if the service
- * name was not found in the service map.
- */
- public function process(TProtocol $input, TProtocol $output)
- {
- /*
- Use the actual underlying protocol (e.g. TBinaryProtocol) to read the
- message header. This pulls the message "off the wire", which we'll
- deal with at the end of this method.
- */
- $input->readMessageBegin($fname, $mtype, $rseqid);
-
- if ($mtype !== TMessageType::CALL && $mtype != TMessageType::ONEWAY) {
- throw new TException("This should not have happened!?");
- }
-
- // Extract the service name and the new Message name.
- if (strpos($fname, TMultiplexedProtocol::SEPARATOR) === false) {
- throw new TException("Service name not found in message name: {$fname}. Did you " .
- "forget to use a TMultiplexProtocol in your client?");
- }
- list($serviceName, $messageName) = explode(':', $fname, 2);
- if (!array_key_exists($serviceName, $this->serviceProcessorMap_)) {
- throw new TException("Service name not found: {$serviceName}. Did you forget " .
- "to call registerProcessor()?");
- }
-
- // Dispatch processing to the stored processor
- $processor = $this->serviceProcessorMap_[$serviceName];
-
- return $processor->process(
- new StoredMessageProtocol($input, $messageName, $mtype, $rseqid),
- $output
- );
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TBufferedTransport.php b/vendor/packaged/thrift/src/Transport/TBufferedTransport.php
deleted file mode 100644
index 253c5acfb..000000000
--- a/vendor/packaged/thrift/src/Transport/TBufferedTransport.php
+++ /dev/null
@@ -1,206 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Buffered transport. Stores data to an internal buffer that it doesn't
- * actually write out until flush is called. For reading, we do a greedy
- * read and then serve data out of the internal buffer.
- *
- * @package thrift.transport
- */
-class TBufferedTransport extends TTransport
-{
- /**
- * The underlying transport
- *
- * @var TTransport
- */
- protected $transport_;
-
- /**
- * The receive buffer size
- *
- * @var int
- */
- protected $rBufSize_ = 512;
-
- /**
- * The write buffer size
- *
- * @var int
- */
- protected $wBufSize_ = 512;
-
- /**
- * The write buffer.
- *
- * @var string
- */
- protected $wBuf_ = '';
-
- /**
- * The read buffer.
- *
- * @var string
- */
- protected $rBuf_ = '';
-
- /**
- * Constructor. Creates a buffered transport around an underlying transport
- */
- public function __construct($transport, $rBufSize = 512, $wBufSize = 512)
- {
- $this->transport_ = $transport;
- $this->rBufSize_ = $rBufSize;
- $this->wBufSize_ = $wBufSize;
- }
-
- public function isOpen()
- {
- return $this->transport_->isOpen();
- }
-
- /**
- * @inheritdoc
- *
- * @throws TTransportException
- */
- public function open()
- {
- $this->transport_->open();
- }
-
- public function close()
- {
- $this->transport_->close();
- }
-
- public function putBack($data)
- {
- if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
- $this->rBuf_ = $data;
- } else {
- $this->rBuf_ = ($data . $this->rBuf_);
- }
- }
-
- /**
- * The reason that we customize readAll here is that the majority of PHP
- * streams are already internally buffered by PHP. The socket stream, for
- * example, buffers internally and blocks if you call read with $len greater
- * than the amount of data available, unlike recv() in C.
- *
- * Therefore, use the readAll method of the wrapped transport inside
- * the buffered readAll.
- *
- * @throws TTransportException
- */
- public function readAll($len)
- {
- $have = TStringFuncFactory::create()->strlen($this->rBuf_);
- if ($have == 0) {
- $data = $this->transport_->readAll($len);
- } elseif ($have < $len) {
- $data = $this->rBuf_;
- $this->rBuf_ = '';
- $data .= $this->transport_->readAll($len - $have);
- } elseif ($have == $len) {
- $data = $this->rBuf_;
- $this->rBuf_ = '';
- } elseif ($have > $len) {
- $data = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
- $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
- }
-
- return $data;
- }
-
- /**
- * @inheritdoc
- *
- * @param int $len
- * @return string
- * @throws TTransportException
- */
- public function read($len)
- {
- if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
- $this->rBuf_ = $this->transport_->read($this->rBufSize_);
- }
-
- if (TStringFuncFactory::create()->strlen($this->rBuf_) <= $len) {
- $ret = $this->rBuf_;
- $this->rBuf_ = '';
-
- return $ret;
- }
-
- $ret = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
- $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
-
- return $ret;
- }
-
- /**
- * @inheritdoc
- *
- * @param string $buf
- * @throws TTransportException
- */
- public function write($buf)
- {
- $this->wBuf_ .= $buf;
- if (TStringFuncFactory::create()->strlen($this->wBuf_) >= $this->wBufSize_) {
- $out = $this->wBuf_;
-
- // Note that we clear the internal wBuf_ prior to the underlying write
- // to ensure we're in a sane state (i.e. internal buffer cleaned)
- // if the underlying write throws up an exception
- $this->wBuf_ = '';
- $this->transport_->write($out);
- }
- }
-
- /**
- * @inheritdoc
- *
- * @throws TTransportException
- */
- public function flush()
- {
- if (TStringFuncFactory::create()->strlen($this->wBuf_) > 0) {
- $out = $this->wBuf_;
-
- // Note that we clear the internal wBuf_ prior to the underlying write
- // to ensure we're in a sane state (i.e. internal buffer cleaned)
- // if the underlying write throws up an exception
- $this->wBuf_ = '';
- $this->transport_->write($out);
- }
- $this->transport_->flush();
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TCurlClient.php b/vendor/packaged/thrift/src/Transport/TCurlClient.php
deleted file mode 100644
index f781da969..000000000
--- a/vendor/packaged/thrift/src/Transport/TCurlClient.php
+++ /dev/null
@@ -1,281 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * HTTP client for Thrift
- *
- * @package thrift.transport
- */
-class TCurlClient extends TTransport
-{
- private static $curlHandle;
-
- /**
- * The host to connect to
- *
- * @var string
- */
- protected $host_;
-
- /**
- * The port to connect on
- *
- * @var int
- */
- protected $port_;
-
- /**
- * The URI to request
- *
- * @var string
- */
- protected $uri_;
-
- /**
- * The scheme to use for the request, i.e. http, https
- *
- * @var string
- */
- protected $scheme_;
-
- /**
- * Buffer for the HTTP request data
- *
- * @var string
- */
- protected $request_;
-
- /**
- * Buffer for the HTTP response data.
- *
- * @var binary string
- */
- protected $response_;
-
- /**
- * Read timeout
- *
- * @var float
- */
- protected $timeout_;
-
- /**
- * http headers
- *
- * @var array
- */
- protected $headers_;
-
- /**
- * Make a new HTTP client.
- *
- * @param string $host
- * @param int $port
- * @param string $uri
- */
- public function __construct($host, $port = 80, $uri = '', $scheme = 'http')
- {
- if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri[0] != '/')) {
- $uri = '/' . $uri;
- }
- $this->scheme_ = $scheme;
- $this->host_ = $host;
- $this->port_ = $port;
- $this->uri_ = $uri;
- $this->request_ = '';
- $this->response_ = null;
- $this->timeout_ = null;
- $this->headers_ = array();
- }
-
- /**
- * Set read timeout
- *
- * @param float $timeout
- */
- public function setTimeoutSecs($timeout)
- {
- $this->timeout_ = $timeout;
- }
-
- /**
- * Whether this transport is open.
- *
- * @return boolean true if open
- */
- public function isOpen()
- {
- return true;
- }
-
- /**
- * Open the transport for reading/writing
- *
- * @throws TTransportException if cannot open
- */
- public function open()
- {
- }
-
- /**
- * Close the transport.
- */
- public function close()
- {
- $this->request_ = '';
- $this->response_ = null;
- }
-
- /**
- * Read some data into the array.
- *
- * @param int $len How much to read
- * @return string The data that has been read
- * @throws TTransportException if cannot read any more data
- */
- public function read($len)
- {
- if ($len >= strlen($this->response_)) {
- return $this->response_;
- } else {
- $ret = substr($this->response_, 0, $len);
- $this->response_ = substr($this->response_, $len);
-
- return $ret;
- }
- }
-
- /**
- * Guarantees that the full amount of data is read. Since TCurlClient gets entire payload at
- * once, parent readAll cannot be used.
- *
- * @return string The data, of exact length
- * @throws TTransportException if cannot read data
- */
- public function readAll($len)
- {
- $data = $this->read($len);
-
- if (TStringFuncFactory::create()->strlen($data) !== $len) {
- throw new TTransportException('TCurlClient could not read '.$len.' bytes');
- }
-
- return $data;
- }
-
- /**
- * Writes some data into the pending buffer
- *
- * @param string $buf The data to write
- * @throws TTransportException if writing fails
- */
- public function write($buf)
- {
- $this->request_ .= $buf;
- }
-
- /**
- * Opens and sends the actual request over the HTTP connection
- *
- * @throws TTransportException if a writing error occurs
- */
- public function flush()
- {
- if (!self::$curlHandle) {
- register_shutdown_function(array('Thrift\\Transport\\TCurlClient', 'closeCurlHandle'));
- self::$curlHandle = curl_init();
- curl_setopt(self::$curlHandle, CURLOPT_RETURNTRANSFER, true);
- curl_setopt(self::$curlHandle, CURLOPT_BINARYTRANSFER, true);
- curl_setopt(self::$curlHandle, CURLOPT_USERAGENT, 'PHP/TCurlClient');
- curl_setopt(self::$curlHandle, CURLOPT_CUSTOMREQUEST, 'POST');
- curl_setopt(self::$curlHandle, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt(self::$curlHandle, CURLOPT_MAXREDIRS, 1);
- }
- // God, PHP really has some esoteric ways of doing simple things.
- $host = $this->host_ . ($this->port_ != 80 ? ':' . $this->port_ : '');
- $fullUrl = $this->scheme_ . "://" . $host . $this->uri_;
-
- $headers = array();
- $defaultHeaders = array('Accept' => 'application/x-thrift',
- 'Content-Type' => 'application/x-thrift',
- 'Content-Length' => TStringFuncFactory::create()->strlen($this->request_));
- foreach (array_merge($defaultHeaders, $this->headers_) as $key => $value) {
- $headers[] = "$key: $value";
- }
-
- curl_setopt(self::$curlHandle, CURLOPT_HTTPHEADER, $headers);
-
- if ($this->timeout_ > 0) {
- if ($this->timeout_ < 1.0) {
- // Timestamps smaller than 1 second are ignored when CURLOPT_TIMEOUT is used
- curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT_MS, 1000 * $this->timeout_);
- } else {
- curl_setopt(self::$curlHandle, CURLOPT_TIMEOUT, $this->timeout_);
- }
- }
- curl_setopt(self::$curlHandle, CURLOPT_POSTFIELDS, $this->request_);
- $this->request_ = '';
-
- curl_setopt(self::$curlHandle, CURLOPT_URL, $fullUrl);
- $this->response_ = curl_exec(self::$curlHandle);
- $responseError = curl_error(self::$curlHandle);
-
- $code = curl_getinfo(self::$curlHandle, CURLINFO_HTTP_CODE);
-
- // Handle non 200 status code / connect failure
- if ($this->response_ === false || $code !== 200) {
- curl_close(self::$curlHandle);
- self::$curlHandle = null;
- $this->response_ = null;
- $error = 'TCurlClient: Could not connect to ' . $fullUrl;
- if ($responseError) {
- $error .= ', ' . $responseError;
- }
- if ($code) {
- $error .= ', HTTP status code: ' . $code;
- }
- throw new TTransportException($error, TTransportException::UNKNOWN);
- }
- }
-
- public static function closeCurlHandle()
- {
- try {
- if (self::$curlHandle) {
- curl_close(self::$curlHandle);
- self::$curlHandle = null;
- }
- } catch (\Exception $x) {
- error_log('There was an error closing the curl handle: ' . $x->getMessage());
- }
- }
-
- public function addHeaders($headers)
- {
- $this->headers_ = array_merge($this->headers_, $headers);
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TFramedTransport.php b/vendor/packaged/thrift/src/Transport/TFramedTransport.php
deleted file mode 100644
index 39d186987..000000000
--- a/vendor/packaged/thrift/src/Transport/TFramedTransport.php
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Framed transport. Writes and reads data in chunks that are stamped with
- * their length.
- *
- * @package thrift.transport
- */
-class TFramedTransport extends TTransport
-{
- /**
- * Underlying transport object.
- *
- * @var TTransport
- */
- private $transport_;
-
- /**
- * Buffer for read data.
- *
- * @var string
- */
- private $rBuf_;
-
- /**
- * Buffer for queued output data
- *
- * @var string
- */
- private $wBuf_;
-
- /**
- * Whether to frame reads
- *
- * @var bool
- */
- private $read_;
-
- /**
- * Whether to frame writes
- *
- * @var bool
- */
- private $write_;
-
- /**
- * Constructor.
- *
- * @param TTransport $transport Underlying transport
- */
- public function __construct($transport = null, $read = true, $write = true)
- {
- $this->transport_ = $transport;
- $this->read_ = $read;
- $this->write_ = $write;
- }
-
- public function isOpen()
- {
- return $this->transport_->isOpen();
- }
-
- public function open()
- {
- $this->transport_->open();
- }
-
- public function close()
- {
- $this->transport_->close();
- }
-
- /**
- * Reads from the buffer. When more data is required reads another entire
- * chunk and serves future reads out of that.
- *
- * @param int $len How much data
- */
- public function read($len)
- {
- if (!$this->read_) {
- return $this->transport_->read($len);
- }
-
- if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
- $this->readFrame();
- }
-
- // Just return full buff
- if ($len >= TStringFuncFactory::create()->strlen($this->rBuf_)) {
- $out = $this->rBuf_;
- $this->rBuf_ = null;
-
- return $out;
- }
-
- // Return TStringFuncFactory::create()->substr
- $out = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
- $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
-
- return $out;
- }
-
- /**
- * Put previously read data back into the buffer
- *
- * @param string $data data to return
- */
- public function putBack($data)
- {
- if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
- $this->rBuf_ = $data;
- } else {
- $this->rBuf_ = ($data . $this->rBuf_);
- }
- }
-
- /**
- * Reads a chunk of data into the internal read buffer.
- */
- private function readFrame()
- {
- $buf = $this->transport_->readAll(4);
- $val = unpack('N', $buf);
- $sz = $val[1];
-
- $this->rBuf_ = $this->transport_->readAll($sz);
- }
-
- /**
- * Writes some data to the pending output buffer.
- *
- * @param string $buf The data
- * @param int $len Limit of bytes to write
- */
- public function write($buf, $len = null)
- {
- if (!$this->write_) {
- return $this->transport_->write($buf, $len);
- }
-
- if ($len !== null && $len < TStringFuncFactory::create()->strlen($buf)) {
- $buf = TStringFuncFactory::create()->substr($buf, 0, $len);
- }
- $this->wBuf_ .= $buf;
- }
-
- /**
- * Writes the output buffer to the stream in the format of a 4-byte length
- * followed by the actual data.
- */
- public function flush()
- {
- if (!$this->write_ || TStringFuncFactory::create()->strlen($this->wBuf_) == 0) {
- return $this->transport_->flush();
- }
-
- $out = pack('N', TStringFuncFactory::create()->strlen($this->wBuf_));
- $out .= $this->wBuf_;
-
- // Note that we clear the internal wBuf_ prior to the underlying write
- // to ensure we're in a sane state (i.e. internal buffer cleaned)
- // if the underlying write throws up an exception
- $this->wBuf_ = '';
- $this->transport_->write($out);
- $this->transport_->flush();
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/THttpClient.php b/vendor/packaged/thrift/src/Transport/THttpClient.php
deleted file mode 100644
index 4d6be32fe..000000000
--- a/vendor/packaged/thrift/src/Transport/THttpClient.php
+++ /dev/null
@@ -1,258 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * HTTP client for Thrift
- *
- * @package thrift.transport
- */
-class THttpClient extends TTransport
-{
- /**
- * The host to connect to
- *
- * @var string
- */
- protected $host_;
-
- /**
- * The port to connect on
- *
- * @var int
- */
- protected $port_;
-
- /**
- * The URI to request
- *
- * @var string
- */
- protected $uri_;
-
- /**
- * The scheme to use for the request, i.e. http, https
- *
- * @var string
- */
- protected $scheme_;
-
- /**
- * Buffer for the HTTP request data
- *
- * @var string
- */
- protected $buf_;
-
- /**
- * Input socket stream.
- *
- * @var resource
- */
- protected $handle_;
-
- /**
- * Read timeout
- *
- * @var float
- */
- protected $timeout_;
-
- /**
- * http headers
- *
- * @var array
- */
- protected $headers_;
-
- /**
- * Context additional options
- *
- * @var array
- */
- protected $context_;
-
- /**
- * Make a new HTTP client.
- *
- * @param string $host
- * @param int $port
- * @param string $uri
- * @param string $scheme
- * @param array $context
- */
- public function __construct($host, $port = 80, $uri = '', $scheme = 'http', array $context = array())
- {
- if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri[0] != '/')) {
- $uri = '/' . $uri;
- }
- $this->scheme_ = $scheme;
- $this->host_ = $host;
- $this->port_ = $port;
- $this->uri_ = $uri;
- $this->buf_ = '';
- $this->handle_ = null;
- $this->timeout_ = null;
- $this->headers_ = array();
- $this->context_ = $context;
- }
-
- /**
- * Set read timeout
- *
- * @param float $timeout
- */
- public function setTimeoutSecs($timeout)
- {
- $this->timeout_ = $timeout;
- }
-
- /**
- * Whether this transport is open.
- *
- * @return boolean true if open
- */
- public function isOpen()
- {
- return true;
- }
-
- /**
- * Open the transport for reading/writing
- *
- * @throws TTransportException if cannot open
- */
- public function open()
- {
- }
-
- /**
- * Close the transport.
- */
- public function close()
- {
- if ($this->handle_) {
- @fclose($this->handle_);
- $this->handle_ = null;
- }
- }
-
- /**
- * Read some data into the array.
- *
- * @param int $len How much to read
- * @return string The data that has been read
- * @throws TTransportException if cannot read any more data
- */
- public function read($len)
- {
- $data = @fread($this->handle_, $len);
- if ($data === false || $data === '') {
- $md = stream_get_meta_data($this->handle_);
- if ($md['timed_out']) {
- throw new TTransportException(
- 'THttpClient: timed out reading ' . $len . ' bytes from ' .
- $this->host_ . ':' . $this->port_ . $this->uri_,
- TTransportException::TIMED_OUT
- );
- } else {
- throw new TTransportException(
- 'THttpClient: Could not read ' . $len . ' bytes from ' .
- $this->host_ . ':' . $this->port_ . $this->uri_,
- TTransportException::UNKNOWN
- );
- }
- }
-
- return $data;
- }
-
- /**
- * Writes some data into the pending buffer
- *
- * @param string $buf The data to write
- * @throws TTransportException if writing fails
- */
- public function write($buf)
- {
- $this->buf_ .= $buf;
- }
-
- /**
- * Opens and sends the actual request over the HTTP connection
- *
- * @throws TTransportException if a writing error occurs
- */
- public function flush()
- {
- // God, PHP really has some esoteric ways of doing simple things.
- $host = $this->host_ . ($this->port_ != 80 ? ':' . $this->port_ : '');
-
- $headers = array();
- $defaultHeaders = array('Host' => $host,
- 'Accept' => 'application/x-thrift',
- 'User-Agent' => 'PHP/THttpClient',
- 'Content-Type' => 'application/x-thrift',
- 'Content-Length' => TStringFuncFactory::create()->strlen($this->buf_));
- foreach (array_merge($defaultHeaders, $this->headers_) as $key => $value) {
- $headers[] = "$key: $value";
- }
-
- $options = $this->context_;
-
- $baseHttpOptions = isset($options["http"]) ? $options["http"] : array();
-
- $httpOptions = $baseHttpOptions + array('method' => 'POST',
- 'header' => implode("\r\n", $headers),
- 'max_redirects' => 1,
- 'content' => $this->buf_);
- if ($this->timeout_ > 0) {
- $httpOptions['timeout'] = $this->timeout_;
- }
- $this->buf_ = '';
-
- $options["http"] = $httpOptions;
- $contextid = stream_context_create($options);
- $this->handle_ = @fopen(
- $this->scheme_ . '://' . $host . $this->uri_,
- 'r',
- false,
- $contextid
- );
-
- // Connect failed?
- if ($this->handle_ === false) {
- $this->handle_ = null;
- $error = 'THttpClient: Could not connect to ' . $host . $this->uri_;
- throw new TTransportException($error, TTransportException::NOT_OPEN);
- }
- }
-
- public function addHeaders($headers)
- {
- $this->headers_ = array_merge($this->headers_, $headers);
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TMemoryBuffer.php b/vendor/packaged/thrift/src/Transport/TMemoryBuffer.php
deleted file mode 100644
index fee03a2a4..000000000
--- a/vendor/packaged/thrift/src/Transport/TMemoryBuffer.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * A memory buffer is a tranpsort that simply reads from and writes to an
- * in-memory string buffer. Anytime you call write on it, the data is simply
- * placed into a buffer, and anytime you call read, data is read from that
- * buffer.
- *
- * @package thrift.transport
- */
-class TMemoryBuffer extends TTransport
-{
- /**
- * Constructor. Optionally pass an initial value
- * for the buffer.
- */
- public function __construct($buf = '')
- {
- $this->buf_ = $buf;
- }
-
- protected $buf_ = '';
-
- public function isOpen()
- {
- return true;
- }
-
- public function open()
- {
- }
-
- public function close()
- {
- }
-
- public function write($buf)
- {
- $this->buf_ .= $buf;
- }
-
- public function read($len)
- {
- $bufLength = TStringFuncFactory::create()->strlen($this->buf_);
-
- if ($bufLength === 0) {
- throw new TTransportException(
- 'TMemoryBuffer: Could not read ' .
- $len . ' bytes from buffer.',
- TTransportException::UNKNOWN
- );
- }
-
- if ($bufLength <= $len) {
- $ret = $this->buf_;
- $this->buf_ = '';
-
- return $ret;
- }
-
- $ret = TStringFuncFactory::create()->substr($this->buf_, 0, $len);
- $this->buf_ = TStringFuncFactory::create()->substr($this->buf_, $len);
-
- return $ret;
- }
-
- public function getBuffer()
- {
- return $this->buf_;
- }
-
- public function available()
- {
- return TStringFuncFactory::create()->strlen($this->buf_);
- }
-
- public function putBack($data)
- {
- $this->buf_ = $data . $this->buf_;
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TNullTransport.php b/vendor/packaged/thrift/src/Transport/TNullTransport.php
deleted file mode 100644
index 7e086b67c..000000000
--- a/vendor/packaged/thrift/src/Transport/TNullTransport.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-
-/**
- * Transport that only accepts writes and ignores them.
- * This is useful for measuring the serialized size of structures.
- *
- * @package thrift.transport
- */
-class TNullTransport extends TTransport
-{
- public function isOpen()
- {
- return true;
- }
-
- public function open()
- {
- }
-
- public function close()
- {
- }
-
- public function read($len)
- {
- throw new TTransportException("Can't read from TNullTransport.");
- }
-
- public function write($buf)
- {
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TPhpStream.php b/vendor/packaged/thrift/src/Transport/TPhpStream.php
deleted file mode 100644
index 42823ff33..000000000
--- a/vendor/packaged/thrift/src/Transport/TPhpStream.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Php stream transport. Reads to and writes from the php standard streams
- * php://input and php://output
- *
- * @package thrift.transport
- */
-class TPhpStream extends TTransport
-{
- const MODE_R = 1;
- const MODE_W = 2;
-
- private $inStream_ = null;
-
- private $outStream_ = null;
-
- private $read_ = false;
-
- private $write_ = false;
-
- public function __construct($mode)
- {
- $this->read_ = $mode & self::MODE_R;
- $this->write_ = $mode & self::MODE_W;
- }
-
- public function open()
- {
- if ($this->read_) {
- $this->inStream_ = @fopen(self::inStreamName(), 'r');
- if (!is_resource($this->inStream_)) {
- throw new TException('TPhpStream: Could not open php://input');
- }
- }
- if ($this->write_) {
- $this->outStream_ = @fopen('php://output', 'w');
- if (!is_resource($this->outStream_)) {
- throw new TException('TPhpStream: Could not open php://output');
- }
- }
- }
-
- public function close()
- {
- if ($this->read_) {
- @fclose($this->inStream_);
- $this->inStream_ = null;
- }
- if ($this->write_) {
- @fclose($this->outStream_);
- $this->outStream_ = null;
- }
- }
-
- public function isOpen()
- {
- return
- (!$this->read_ || is_resource($this->inStream_)) &&
- (!$this->write_ || is_resource($this->outStream_));
- }
-
- public function read($len)
- {
- $data = @fread($this->inStream_, $len);
- if ($data === false || $data === '') {
- throw new TException('TPhpStream: Could not read ' . $len . ' bytes');
- }
-
- return $data;
- }
-
- public function write($buf)
- {
- while (TStringFuncFactory::create()->strlen($buf) > 0) {
- $got = @fwrite($this->outStream_, $buf);
- if ($got === 0 || $got === false) {
- throw new TException(
- 'TPhpStream: Could not write ' . TStringFuncFactory::create()->strlen($buf) . ' bytes'
- );
- }
- $buf = TStringFuncFactory::create()->substr($buf, $got);
- }
- }
-
- public function flush()
- {
- @fflush($this->outStream_);
- }
-
- private static function inStreamName()
- {
- if (php_sapi_name() == 'cli') {
- return 'php://stdin';
- }
-
- return 'php://input';
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TSSLSocket.php b/vendor/packaged/thrift/src/Transport/TSSLSocket.php
deleted file mode 100644
index b4a0adb54..000000000
--- a/vendor/packaged/thrift/src/Transport/TSSLSocket.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TException;
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Sockets implementation of the TTransport interface.
- *
- * @package thrift.transport
- */
-class TSSLSocket extends TSocket
-{
- /**
- * Remote port
- *
- * @var resource
- */
- protected $context_ = null;
-
- /**
- * Socket constructor
- *
- * @param string $host Remote hostname
- * @param int $port Remote port
- * @param resource $context Stream context
- * @param bool $persist Whether to use a persistent socket
- * @param string $debugHandler Function to call for error logging
- */
- public function __construct(
- $host = 'localhost',
- $port = 9090,
- $context = null,
- $debugHandler = null
- ) {
- $this->host_ = $this->getSSLHost($host);
- $this->port_ = $port;
- $this->context_ = $context;
- $this->debugHandler_ = $debugHandler ? $debugHandler : 'error_log';
- }
-
- /**
- * Creates a host name with SSL transport protocol
- * if no transport protocol already specified in
- * the host name.
- *
- * @param string $host Host to listen on
- * @return string $host Host name with transport protocol
- */
- private function getSSLHost($host)
- {
- $transport_protocol_loc = strpos($host, "://");
- if ($transport_protocol_loc === false) {
- $host = 'ssl://' . $host;
- }
- return $host;
- }
-
- /**
- * Connects the socket.
- */
- public function open()
- {
- if ($this->isOpen()) {
- throw new TTransportException('Socket already connected', TTransportException::ALREADY_OPEN);
- }
-
- if (empty($this->host_)) {
- throw new TTransportException('Cannot open null host', TTransportException::NOT_OPEN);
- }
-
- if ($this->port_ <= 0) {
- throw new TTransportException('Cannot open without port', TTransportException::NOT_OPEN);
- }
-
- $this->handle_ = @stream_socket_client(
- $this->host_ . ':' . $this->port_,
- $errno,
- $errstr,
- $this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000),
- STREAM_CLIENT_CONNECT,
- $this->context_
- );
-
- // Connect failed?
- if ($this->handle_ === false) {
- $error = 'TSocket: Could not connect to ' .
- $this->host_ . ':' . $this->port_ . ' (' . $errstr . ' [' . $errno . '])';
- if ($this->debug_) {
- call_user_func($this->debugHandler_, $error);
- }
- throw new TException($error);
- }
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TSocket.php b/vendor/packaged/thrift/src/Transport/TSocket.php
deleted file mode 100644
index 5147efa63..000000000
--- a/vendor/packaged/thrift/src/Transport/TSocket.php
+++ /dev/null
@@ -1,366 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TException;
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Sockets implementation of the TTransport interface.
- *
- * @package thrift.transport
- */
-class TSocket extends TTransport
-{
- /**
- * Handle to PHP socket
- *
- * @var resource
- */
- protected $handle_ = null;
-
- /**
- * Remote hostname
- *
- * @var string
- */
- protected $host_ = 'localhost';
-
- /**
- * Remote port
- *
- * @var int
- */
- protected $port_ = '9090';
-
- /**
- * Send timeout in seconds.
- *
- * Combined with sendTimeoutUsec this is used for send timeouts.
- *
- * @var int
- */
- protected $sendTimeoutSec_ = 0;
-
- /**
- * Send timeout in microseconds.
- *
- * Combined with sendTimeoutSec this is used for send timeouts.
- *
- * @var int
- */
- protected $sendTimeoutUsec_ = 100000;
-
- /**
- * Recv timeout in seconds
- *
- * Combined with recvTimeoutUsec this is used for recv timeouts.
- *
- * @var int
- */
- protected $recvTimeoutSec_ = 0;
-
- /**
- * Recv timeout in microseconds
- *
- * Combined with recvTimeoutSec this is used for recv timeouts.
- *
- * @var int
- */
- protected $recvTimeoutUsec_ = 750000;
-
- /**
- * Persistent socket or plain?
- *
- * @var bool
- */
- protected $persist_ = false;
-
- /**
- * Debugging on?
- *
- * @var bool
- */
- protected $debug_ = false;
-
- /**
- * Debug handler
- *
- * @var mixed
- */
- protected $debugHandler_ = null;
-
- /**
- * Socket constructor
- *
- * @param string $host Remote hostname
- * @param int $port Remote port
- * @param bool $persist Whether to use a persistent socket
- * @param string $debugHandler Function to call for error logging
- */
- public function __construct(
- $host = 'localhost',
- $port = 9090,
- $persist = false,
- $debugHandler = null
- ) {
- $this->host_ = $host;
- $this->port_ = $port;
- $this->persist_ = $persist;
- $this->debugHandler_ = $debugHandler ? $debugHandler : 'error_log';
- }
-
- /**
- * @param resource $handle
- * @return void
- */
- public function setHandle($handle)
- {
- $this->handle_ = $handle;
- stream_set_blocking($this->handle_, false);
- }
-
- /**
- * Sets the send timeout.
- *
- * @param int $timeout Timeout in milliseconds.
- */
- public function setSendTimeout($timeout)
- {
- $this->sendTimeoutSec_ = floor($timeout / 1000);
- $this->sendTimeoutUsec_ =
- ($timeout - ($this->sendTimeoutSec_ * 1000)) * 1000;
- }
-
- /**
- * Sets the receive timeout.
- *
- * @param int $timeout Timeout in milliseconds.
- */
- public function setRecvTimeout($timeout)
- {
- $this->recvTimeoutSec_ = floor($timeout / 1000);
- $this->recvTimeoutUsec_ =
- ($timeout - ($this->recvTimeoutSec_ * 1000)) * 1000;
- }
-
- /**
- * Sets debugging output on or off
- *
- * @param bool $debug
- */
- public function setDebug($debug)
- {
- $this->debug_ = $debug;
- }
-
- /**
- * Get the host that this socket is connected to
- *
- * @return string host
- */
- public function getHost()
- {
- return $this->host_;
- }
-
- /**
- * Get the remote port that this socket is connected to
- *
- * @return int port
- */
- public function getPort()
- {
- return $this->port_;
- }
-
- /**
- * Tests whether this is open
- *
- * @return bool true if the socket is open
- */
- public function isOpen()
- {
- return is_resource($this->handle_);
- }
-
- /**
- * Connects the socket.
- */
- public function open()
- {
- if ($this->isOpen()) {
- throw new TTransportException('Socket already connected', TTransportException::ALREADY_OPEN);
- }
-
- if (empty($this->host_)) {
- throw new TTransportException('Cannot open null host', TTransportException::NOT_OPEN);
- }
-
- if ($this->port_ <= 0) {
- throw new TTransportException('Cannot open without port', TTransportException::NOT_OPEN);
- }
-
- if ($this->persist_) {
- $this->handle_ = @pfsockopen(
- $this->host_,
- $this->port_,
- $errno,
- $errstr,
- $this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000)
- );
- } else {
- $this->handle_ = @fsockopen(
- $this->host_,
- $this->port_,
- $errno,
- $errstr,
- $this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000)
- );
- }
-
- // Connect failed?
- if ($this->handle_ === false) {
- $error = 'TSocket: Could not connect to ' .
- $this->host_ . ':' . $this->port_ . ' (' . $errstr . ' [' . $errno . '])';
- if ($this->debug_) {
- call_user_func($this->debugHandler_, $error);
- }
- throw new TException($error);
- }
-
- if (function_exists('socket_import_stream') && function_exists('socket_set_option')) {
- $socket = socket_import_stream($this->handle_);
- socket_set_option($socket, SOL_TCP, TCP_NODELAY, 1);
- }
- }
-
- /**
- * Closes the socket.
- */
- public function close()
- {
- @fclose($this->handle_);
- $this->handle_ = null;
- }
-
- /**
- * Read from the socket at most $len bytes.
- *
- * This method will not wait for all the requested data, it will return as
- * soon as any data is received.
- *
- * @param int $len Maximum number of bytes to read.
- * @return string Binary data
- */
- public function read($len)
- {
- $null = null;
- $read = array($this->handle_);
- $readable = @stream_select(
- $read,
- $null,
- $null,
- $this->recvTimeoutSec_,
- $this->recvTimeoutUsec_
- );
-
- if ($readable > 0) {
- $data = fread($this->handle_, $len);
- if ($data === false) {
- throw new TTransportException('TSocket: Could not read ' . $len . ' bytes from ' .
- $this->host_ . ':' . $this->port_);
- } elseif ($data == '' && feof($this->handle_)) {
- throw new TTransportException('TSocket read 0 bytes');
- }
-
- return $data;
- } elseif ($readable === 0) {
- throw new TTransportException('TSocket: timed out reading ' . $len . ' bytes from ' .
- $this->host_ . ':' . $this->port_);
- } else {
- throw new TTransportException('TSocket: Could not read ' . $len . ' bytes from ' .
- $this->host_ . ':' . $this->port_);
- }
- }
-
- /**
- * Write to the socket.
- *
- * @param string $buf The data to write
- */
- public function write($buf)
- {
- $null = null;
- $write = array($this->handle_);
-
- // keep writing until all the data has been written
- while (TStringFuncFactory::create()->strlen($buf) > 0) {
- // wait for stream to become available for writing
- $writable = @stream_select(
- $null,
- $write,
- $null,
- $this->sendTimeoutSec_,
- $this->sendTimeoutUsec_
- );
- if ($writable > 0) {
- // write buffer to stream
- $written = fwrite($this->handle_, $buf);
- if ($written === -1 || $written === false) {
- throw new TTransportException(
- 'TSocket: Could not write ' . TStringFuncFactory::create()->strlen($buf) . ' bytes ' .
- $this->host_ . ':' . $this->port_
- );
- }
- // determine how much of the buffer is left to write
- $buf = TStringFuncFactory::create()->substr($buf, $written);
- } elseif ($writable === 0) {
- throw new TTransportException(
- 'TSocket: timed out writing ' . TStringFuncFactory::create()->strlen($buf) . ' bytes from ' .
- $this->host_ . ':' . $this->port_
- );
- } else {
- throw new TTransportException(
- 'TSocket: Could not write ' . TStringFuncFactory::create()->strlen($buf) . ' bytes ' .
- $this->host_ . ':' . $this->port_
- );
- }
- }
- }
-
- /**
- * Flush output to the socket.
- *
- * Since read(), readAll() and write() operate on the sockets directly,
- * this is a no-op
- *
- * If you wish to have flushable buffering behaviour, wrap this TSocket
- * in a TBufferedTransport.
- */
- public function flush()
- {
- // no-op
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TSocketPool.php b/vendor/packaged/thrift/src/Transport/TSocketPool.php
deleted file mode 100644
index cb9e8ddfa..000000000
--- a/vendor/packaged/thrift/src/Transport/TSocketPool.php
+++ /dev/null
@@ -1,310 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TException;
-
-/**
- * This library makes use of APC cache to make hosts as down in a web
- * environment. If you are running from the CLI or on a system without APC
- * installed, then these null functions will step in and act like cache
- * misses.
- */
-if (!function_exists('apc_fetch')) {
- function apc_fetch($key)
- {
- return false;
- }
-
- function apc_store($key, $var, $ttl = 0)
- {
- return false;
- }
-}
-
-/**
- * Sockets implementation of the TTransport interface that allows connection
- * to a pool of servers.
- *
- * @package thrift.transport
- */
-class TSocketPool extends TSocket
-{
- /**
- * Remote servers. Array of associative arrays with 'host' and 'port' keys
- */
- private $servers_ = array();
-
- /**
- * How many times to retry each host in connect
- *
- * @var int
- */
- private $numRetries_ = 1;
-
- /**
- * Retry interval in seconds, how long to not try a host if it has been
- * marked as down.
- *
- * @var int
- */
- private $retryInterval_ = 60;
-
- /**
- * Max consecutive failures before marking a host down.
- *
- * @var int
- */
- private $maxConsecutiveFailures_ = 1;
-
- /**
- * Try hosts in order? or Randomized?
- *
- * @var bool
- */
- private $randomize_ = true;
-
- /**
- * Always try last host, even if marked down?
- *
- * @var bool
- */
- private $alwaysTryLast_ = true;
-
- /**
- * Socket pool constructor
- *
- * @param array $hosts List of remote hostnames
- * @param mixed $ports Array of remote ports, or a single common port
- * @param bool $persist Whether to use a persistent socket
- * @param mixed $debugHandler Function for error logging
- */
- public function __construct(
- $hosts = array('localhost'),
- $ports = array(9090),
- $persist = false,
- $debugHandler = null
- ) {
- parent::__construct(null, 0, $persist, $debugHandler);
-
- if (!is_array($ports)) {
- $port = $ports;
- $ports = array();
- foreach ($hosts as $key => $val) {
- $ports[$key] = $port;
- }
- }
-
- foreach ($hosts as $key => $host) {
- $this->servers_ [] = array('host' => $host,
- 'port' => $ports[$key]);
- }
- }
-
- /**
- * Add a server to the pool
- *
- * This function does not prevent you from adding a duplicate server entry.
- *
- * @param string $host hostname or IP
- * @param int $port port
- */
- public function addServer($host, $port)
- {
- $this->servers_[] = array('host' => $host, 'port' => $port);
- }
-
- /**
- * Sets how many time to keep retrying a host in the connect function.
- *
- * @param int $numRetries
- */
- public function setNumRetries($numRetries)
- {
- $this->numRetries_ = $numRetries;
- }
-
- /**
- * Sets how long to wait until retrying a host if it was marked down
- *
- * @param int $numRetries
- */
- public function setRetryInterval($retryInterval)
- {
- $this->retryInterval_ = $retryInterval;
- }
-
- /**
- * Sets how many time to keep retrying a host before marking it as down.
- *
- * @param int $numRetries
- */
- public function setMaxConsecutiveFailures($maxConsecutiveFailures)
- {
- $this->maxConsecutiveFailures_ = $maxConsecutiveFailures;
- }
-
- /**
- * Turns randomization in connect order on or off.
- *
- * @param bool $randomize
- */
- public function setRandomize($randomize)
- {
- $this->randomize_ = $randomize;
- }
-
- /**
- * Whether to always try the last server.
- *
- * @param bool $alwaysTryLast
- */
- public function setAlwaysTryLast($alwaysTryLast)
- {
- $this->alwaysTryLast_ = $alwaysTryLast;
- }
-
- /**
- * Connects the socket by iterating through all the servers in the pool
- * and trying to find one that works.
- */
- public function open()
- {
- // Check if we want order randomization
- if ($this->randomize_) {
- shuffle($this->servers_);
- }
-
- // Count servers to identify the "last" one
- $numServers = count($this->servers_);
-
- for ($i = 0; $i < $numServers; ++$i) {
- // This extracts the $host and $port variables
- extract($this->servers_[$i]);
-
- // Check APC cache for a record of this server being down
- $failtimeKey = 'thrift_failtime:' . $host . ':' . $port . '~';
-
- // Cache miss? Assume it's OK
- $lastFailtime = apc_fetch($failtimeKey);
- if ($lastFailtime === false) {
- $lastFailtime = 0;
- }
-
- $retryIntervalPassed = false;
-
- // Cache hit...make sure enough the retry interval has elapsed
- if ($lastFailtime > 0) {
- $elapsed = time() - $lastFailtime;
- if ($elapsed > $this->retryInterval_) {
- $retryIntervalPassed = true;
- if ($this->debug_) {
- call_user_func(
- $this->debugHandler_,
- 'TSocketPool: retryInterval ' .
- '(' . $this->retryInterval_ . ') ' .
- 'has passed for host ' . $host . ':' . $port
- );
- }
- }
- }
-
- // Only connect if not in the middle of a fail interval, OR if this
- // is the LAST server we are trying, just hammer away on it
- $isLastServer = false;
- if ($this->alwaysTryLast_) {
- $isLastServer = ($i == ($numServers - 1));
- }
-
- if (($lastFailtime === 0) ||
- ($isLastServer) ||
- ($lastFailtime > 0 && $retryIntervalPassed)) {
- // Set underlying TSocket params to this one
- $this->host_ = $host;
- $this->port_ = $port;
-
- // Try up to numRetries_ connections per server
- for ($attempt = 0; $attempt < $this->numRetries_; $attempt++) {
- try {
- // Use the underlying TSocket open function
- parent::open();
-
- // Only clear the failure counts if required to do so
- if ($lastFailtime > 0) {
- apc_store($failtimeKey, 0);
- }
-
- // Successful connection, return now
- return;
- } catch (TException $tx) {
- // Connection failed
- }
- }
-
- // Mark failure of this host in the cache
- $consecfailsKey = 'thrift_consecfails:' . $host . ':' . $port . '~';
-
- // Ignore cache misses
- $consecfails = apc_fetch($consecfailsKey);
- if ($consecfails === false) {
- $consecfails = 0;
- }
-
- // Increment by one
- $consecfails++;
-
- // Log and cache this failure
- if ($consecfails >= $this->maxConsecutiveFailures_) {
- if ($this->debug_) {
- call_user_func(
- $this->debugHandler_,
- 'TSocketPool: marking ' . $host . ':' . $port .
- ' as down for ' . $this->retryInterval_ . ' secs ' .
- 'after ' . $consecfails . ' failed attempts.'
- );
- }
- // Store the failure time
- apc_store($failtimeKey, time());
-
- // Clear the count of consecutive failures
- apc_store($consecfailsKey, 0);
- } else {
- apc_store($consecfailsKey, $consecfails);
- }
- }
- }
-
- // Oh no; we failed them all. The system is totally ill!
- $error = 'TSocketPool: All hosts in pool are down. ';
- $hosts = array();
- foreach ($this->servers_ as $server) {
- $hosts [] = $server['host'] . ':' . $server['port'];
- }
- $hostlist = implode(',', $hosts);
- $error .= '(' . $hostlist . ')';
- if ($this->debug_) {
- call_user_func($this->debugHandler_, $error);
- }
- throw new TException($error);
- }
-}
diff --git a/vendor/packaged/thrift/src/Transport/TTransport.php b/vendor/packaged/thrift/src/Transport/TTransport.php
deleted file mode 100644
index 35921c666..000000000
--- a/vendor/packaged/thrift/src/Transport/TTransport.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Base interface for a transport agent.
- *
- * @package thrift.transport
- */
-abstract class TTransport
-{
- /**
- * Whether this transport is open.
- *
- * @return boolean true if open
- */
- abstract public function isOpen();
-
- /**
- * Open the transport for reading/writing
- *
- * @throws TTransportException if cannot open
- */
- abstract public function open();
-
- /**
- * Close the transport.
- */
- abstract public function close();
-
- /**
- * Read some data into the array.
- *
- * @param int $len How much to read
- * @return string The data that has been read
- * @throws TTransportException if cannot read any more data
- */
- abstract public function read($len);
-
- /**
- * Guarantees that the full amount of data is read.
- *
- * @return string The data, of exact length
- * @throws TTransportException if cannot read data
- */
- public function readAll($len)
- {
- // return $this->read($len);
-
- $data = '';
- $got = 0;
- while (($got = TStringFuncFactory::create()->strlen($data)) < $len) {
- $data .= $this->read($len - $got);
- }
-
- return $data;
- }
-
- /**
- * Writes the given data out.
- *
- * @param string $buf The data to write
- * @throws TTransportException if writing fails
- */
- abstract public function write($buf);
-
- /**
- * Flushes any pending data out of a buffer
- *
- * @throws TTransportException if a writing error occurs
- */
- public function flush()
- {
- }
-}
diff --git a/vendor/packaged/thrift/src/Type/TConstant.php b/vendor/packaged/thrift/src/Type/TConstant.php
deleted file mode 100644
index 215da4a3d..000000000
--- a/vendor/packaged/thrift/src/Type/TConstant.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Type;
-
-/**
- * Base class for constant Management
- */
-abstract class TConstant
-{
- /**
- * Don't instanciate this class
- */
- protected function __construct()
- {
- }
-
- /**
- * Get a constant value
- * @param string $constant
- * @return mixed
- */
- public static function get($constant)
- {
- if (is_null(static::$$constant)) {
- static::$$constant = call_user_func(
- sprintf('static::init_%s', $constant)
- );
- }
-
- return static::$$constant;
- }
-}
diff --git a/vendor/packaged/thrift/src/Type/TMessageType.php b/vendor/packaged/thrift/src/Type/TMessageType.php
deleted file mode 100644
index dc9ae6284..000000000
--- a/vendor/packaged/thrift/src/Type/TMessageType.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Type;
-
-/**
- * Message types for RPC
- */
-class TMessageType
-{
- const CALL = 1;
- const REPLY = 2;
- const EXCEPTION = 3;
- const ONEWAY = 4;
-}
diff --git a/vendor/packaged/thrift/src/Type/TType.php b/vendor/packaged/thrift/src/Type/TType.php
deleted file mode 100644
index 3fdb15f53..000000000
--- a/vendor/packaged/thrift/src/Type/TType.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- * @package thrift
- */
-
-namespace Thrift\Type;
-
-/**
- * Data types that can be sent via Thrift
- */
-class TType
-{
- const STOP = 0;
- const VOID = 1;
- const BOOL = 2;
- const BYTE = 3;
- const I08 = 3;
- const DOUBLE = 4;
- const I16 = 6;
- const I32 = 8;
- const I64 = 10;
- const STRING = 11;
- const UTF7 = 11;
- const STRUCT = 12;
- const MAP = 13;
- const SET = 14;
- const LST = 15; // N.B. cannot use LIST keyword in PHP!
- const UTF8 = 16;
- const UTF16 = 17;
-}
diff --git a/vendor/packaged/thrift/update.sh b/vendor/packaged/thrift/update.sh
deleted file mode 100644
index 20cf145a7..000000000
--- a/vendor/packaged/thrift/update.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-TAG=$1
-
-if [[ "$TAG" == "" ]]; then
- echo "no branch or tag specified"
- exit 1
-fi
-
-cd "$(dirname $0)"
-git clone --depth=1 --branch=$TAG [email protected]:apache/thrift tmp
-
-# Move old file to an upper level to fit the new requirements of psr-4
-if [ -d "src/Thrift" ]
-then
- mv src/Thrift/* src/ && rm -Rf src/Thrift
-fi
-
-rm -Rf src/Thrift
-cp -R tmp/lib/php/lib/* src/
-rm -Rf tmp
-cd -
diff --git a/vendor/php-http/discovery/.php-cs-fixer.php b/vendor/php-http/discovery/.php-cs-fixer.php
new file mode 100644
index 000000000..83809c25d
--- /dev/null
+++ b/vendor/php-http/discovery/.php-cs-fixer.php
@@ -0,0 +1,16 @@
+<?php
+
+$finder = PhpCsFixer\Finder::create()
+ ->in(__DIR__.'/src')
+ ->name('*.php')
+;
+
+$config = (new PhpCsFixer\Config())
+ ->setRiskyAllowed(true)
+ ->setRules([
+ '@Symfony' => true,
+ ])
+ ->setFinder($finder)
+;
+
+return $config;
diff --git a/vendor/php-http/discovery/CHANGELOG.md b/vendor/php-http/discovery/CHANGELOG.md
new file mode 100644
index 000000000..169f7f40f
--- /dev/null
+++ b/vendor/php-http/discovery/CHANGELOG.md
@@ -0,0 +1,374 @@
+# Change Log
+
+## 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/vendor/php-http/discovery/LICENSE b/vendor/php-http/discovery/LICENSE
new file mode 100644
index 000000000..4558d6f06
--- /dev/null
+++ b/vendor/php-http/discovery/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015-2016 PHP HTTP Team <[email protected]>
+
+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/vendor/php-http/discovery/README.md b/vendor/php-http/discovery/README.md
new file mode 100644
index 000000000..ef7e4991b
--- /dev/null
+++ b/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=master)](https://github.com/php-http/discovery/actions/workflows/ci.yml?query=branch%3Amaster)
+[![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 [[email protected]](mailto:[email protected]).
+
+
+## License
+
+The MIT License (MIT). Please see [License File](LICENSE) for more information.
diff --git a/vendor/php-http/discovery/composer.json b/vendor/php-http/discovery/composer.json
new file mode 100644
index 000000000..d38ab83b3
--- /dev/null
+++ b/vendor/php-http/discovery/composer.json
@@ -0,0 +1,63 @@
+{
+ "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": "[email protected]"
+ }
+ ],
+ "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.2"
+ },
+ "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/vendor/php-http/discovery/src/ClassDiscovery.php b/vendor/php-http/discovery/src/ClassDiscovery.php
new file mode 100644
index 000000000..5ea469797
--- /dev/null
+++ b/vendor/php-http/discovery/src/ClassDiscovery.php
@@ -0,0 +1,255 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\ClassInstantiationFailedException;
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Http\Discovery\Exception\NoCandidateFoundException;
+use Http\Discovery\Exception\StrategyUnavailableException;
+use Http\Discovery\Strategy\DiscoveryStrategy;
+
+/**
+ * Registry that based find results on class existence.
+ *
+ * @author David de Boer <[email protected]>
+ * @author Márk Sági-Kazár <[email protected]>
+ * @author Tobias Nyholm <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Composer/Plugin.php b/vendor/php-http/discovery/src/Composer/Plugin.php
new file mode 100644
index 000000000..32ef401e3
--- /dev/null
+++ b/vendor/php-http/discovery/src/Composer/Plugin.php
@@ -0,0 +1,465 @@
+<?php
+
+namespace Http\Discovery\Composer;
+
+use Composer\Composer;
+use Composer\DependencyResolver\Pool;
+use Composer\EventDispatcher\EventSubscriberInterface;
+use Composer\Factory;
+use Composer\Installer;
+use Composer\IO\IOInterface;
+use Composer\Json\JsonFile;
+use Composer\Json\JsonManipulator;
+use Composer\Package\Locker;
+use Composer\Package\Version\VersionParser;
+use Composer\Package\Version\VersionSelector;
+use Composer\Plugin\PluginInterface;
+use Composer\Repository\InstalledRepositoryInterface;
+use Composer\Repository\RepositorySet;
+use Composer\Script\Event;
+use Composer\Script\ScriptEvents;
+use Composer\Util\Filesystem;
+use Http\Discovery\ClassDiscovery;
+
+/**
+ * Auto-installs missing implementations.
+ *
+ * When a dependency requires both this package and one of the supported `*-implementation`
+ * virtual packages, this plugin will auto-install a well-known implementation if none is
+ * found. The plugin will first look at already installed packages and figure out the
+ * preferred implementation to install based on the below stickyness rules (or on the first
+ * listed implementation if no rules match.)
+ *
+ * Don't miss updating src/Strategy/Common*Strategy.php when adding a new supported package.
+ *
+ * @author Nicolas Grekas <[email protected]>
+ *
+ * @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 = <<<EOPHP
+<?php
+
+namespace Http\Discovery\Strategy;
+
+class GeneratedDiscoveryStrategy implements DiscoveryStrategy
+{
+ public static function getCandidates(\$type)
+ {
+ switch (\$type) {
+ $candidates
+ default: return [];
+ }
+ }
+}
+
+EOPHP
+ ;
+
+ if (!file_exists($file) || $code !== file_get_contents($file)) {
+ file_put_contents($file, $code);
+ }
+
+ $rootPackage = $event->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/vendor/php-http/discovery/src/Exception.php b/vendor/php-http/discovery/src/Exception.php
new file mode 100644
index 000000000..0fa8c767e
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Http\Discovery;
+
+/**
+ * An interface implemented by all discovery related exceptions.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+interface Exception extends \Throwable
+{
+}
diff --git a/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php b/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php
new file mode 100644
index 000000000..e95bf5d82
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+use Http\Discovery\Exception;
+
+/**
+ * Thrown when a class fails to instantiate.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+final class ClassInstantiationFailedException extends \RuntimeException implements Exception
+{
+}
diff --git a/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php b/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php
new file mode 100644
index 000000000..304b7276e
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+use Http\Discovery\Exception;
+
+/**
+ * Thrown when all discovery strategies fails to find a resource.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php b/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php
new file mode 100644
index 000000000..32f65db7b
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+use Http\Discovery\Exception;
+
+/**
+ * When we have used a strategy but no candidates provided by that strategy could be used.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Exception/NotFoundException.php b/vendor/php-http/discovery/src/Exception/NotFoundException.php
new file mode 100644
index 000000000..ef8b9c584
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/NotFoundException.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+use Http\Discovery\Exception;
+
+/**
+ * Thrown when a discovery does not find any matches.
+ *
+ * @final do NOT extend this class, not final for BC reasons
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+/* final */ class NotFoundException extends \RuntimeException implements Exception
+{
+}
diff --git a/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php b/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php
new file mode 100644
index 000000000..a6ade7332
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+/**
+ * Thrown when we can't use Puli for discovery.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+final class PuliUnavailableException extends StrategyUnavailableException
+{
+}
diff --git a/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php b/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php
new file mode 100644
index 000000000..89ecf3523
--- /dev/null
+++ b/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace Http\Discovery\Exception;
+
+use Http\Discovery\Exception;
+
+/**
+ * This exception is thrown when we cannot use a discovery strategy. This is *not* thrown when
+ * the discovery fails to find a class.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+class StrategyUnavailableException extends \RuntimeException implements Exception
+{
+}
diff --git a/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php b/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php
new file mode 100644
index 000000000..a0c4d5b7c
--- /dev/null
+++ b/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Client\HttpAsyncClient;
+use Http\Discovery\Exception\DiscoveryFailedException;
+
+/**
+ * Finds an HTTP Asynchronous Client.
+ *
+ * @author Joel Wurtz <[email protected]>
+ */
+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/vendor/php-http/discovery/src/HttpClientDiscovery.php b/vendor/php-http/discovery/src/HttpClientDiscovery.php
new file mode 100644
index 000000000..2501e5bbf
--- /dev/null
+++ b/vendor/php-http/discovery/src/HttpClientDiscovery.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Client\HttpClient;
+use Http\Discovery\Exception\DiscoveryFailedException;
+
+/**
+ * Finds an HTTP Client.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ *
+ * @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/vendor/php-http/discovery/src/MessageFactoryDiscovery.php b/vendor/php-http/discovery/src/MessageFactoryDiscovery.php
new file mode 100644
index 000000000..4ae104aa6
--- /dev/null
+++ b/vendor/php-http/discovery/src/MessageFactoryDiscovery.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Http\Message\MessageFactory;
+
+/**
+ * Finds a Message Factory.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ *
+ * @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/vendor/php-http/discovery/src/NotFoundException.php b/vendor/php-http/discovery/src/NotFoundException.php
new file mode 100644
index 000000000..d59dadbf8
--- /dev/null
+++ b/vendor/php-http/discovery/src/NotFoundException.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Http\Discovery;
+
+/**
+ * Thrown when a discovery does not find any matches.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ *
+ * @deprecated since since version 1.0, and will be removed in 2.0. Use {@link \Http\Discovery\Exception\NotFoundException} instead.
+ */
+final class NotFoundException extends \Http\Discovery\Exception\NotFoundException
+{
+}
diff --git a/vendor/php-http/discovery/src/Psr17Factory.php b/vendor/php-http/discovery/src/Psr17Factory.php
new file mode 100644
index 000000000..5d3ab9273
--- /dev/null
+++ b/vendor/php-http/discovery/src/Psr17Factory.php
@@ -0,0 +1,303 @@
+<?php
+
+namespace Http\Discovery;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\StreamInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UploadedFileInterface;
+use Psr\Http\Message\UriFactoryInterface;
+use Psr\Http\Message\UriInterface;
+
+/**
+ * A generic PSR-17 implementation.
+ *
+ * You can create this class with concrete factory instances or let
+ * it use discovery to find suitable implementations as needed.
+ *
+ * This class also provides two additional methods that are not in PSR17,
+ * to help with creating PSR-7 objects from PHP superglobals:
+ * - createServerRequestFromGlobals()
+ * - createUriFromGlobals()
+ *
+ * The code in this class is inspired by the "nyholm/psr7", "guzzlehttp/psr7"
+ * and "symfony/http-foundation" packages, all licenced under MIT.
+ *
+ * Copyright (c) 2004-2023 Fabien Potencier <[email protected]>
+ * Copyright (c) 2015 Michael Dowling <[email protected]>
+ * Copyright (c) 2015 Márk Sági-Kazár <[email protected]>
+ * Copyright (c) 2015 Graham Campbell <[email protected]>
+ * Copyright (c) 2016 Tobias Schultze <[email protected]>
+ * Copyright (c) 2016 George Mponos <[email protected]>
+ * Copyright (c) 2016-2018 Tobias Nyholm <[email protected]>
+ *
+ * @author Nicolas Grekas <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php b/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php
new file mode 100644
index 000000000..a73c6414b
--- /dev/null
+++ b/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php
@@ -0,0 +1,136 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+/**
+ * Finds PSR-17 factories.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+final class Psr17FactoryDiscovery extends ClassDiscovery
+{
+ private static function createException($type, Exception $e)
+ {
+ return new \Http\Discovery\Exception\NotFoundException(
+ 'No PSR-17 '.$type.' found. Install a package from this list: https://packagist.org/providers/psr/http-factory-implementation',
+ 0,
+ $e
+ );
+ }
+
+ /**
+ * @return RequestFactoryInterface
+ *
+ * @throws Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ */
+ 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 Exception\NotFoundException
+ *
+ * @deprecated This will be removed in 2.0. Consider using the findUriFactory() method.
+ */
+ public static function findUrlFactory()
+ {
+ return static::findUriFactory();
+ }
+}
diff --git a/vendor/php-http/discovery/src/Psr18Client.php b/vendor/php-http/discovery/src/Psr18Client.php
new file mode 100644
index 000000000..c47780ec6
--- /dev/null
+++ b/vendor/php-http/discovery/src/Psr18Client.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Http\Discovery;
+
+use Psr\Http\Client\ClientInterface;
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+/**
+ * A generic PSR-18 and PSR-17 implementation.
+ *
+ * You can create this class with concrete client and factory instances
+ * or let it use discovery to find suitable implementations as needed.
+ *
+ * @author Nicolas Grekas <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Psr18ClientDiscovery.php b/vendor/php-http/discovery/src/Psr18ClientDiscovery.php
new file mode 100644
index 000000000..dfd2dd1e7
--- /dev/null
+++ b/vendor/php-http/discovery/src/Psr18ClientDiscovery.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Psr\Http\Client\ClientInterface;
+
+/**
+ * Finds a PSR-18 HTTP Client.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+final class Psr18ClientDiscovery extends ClassDiscovery
+{
+ /**
+ * Finds a PSR-18 HTTP Client.
+ *
+ * @return ClientInterface
+ *
+ * @throws Exception\NotFoundException
+ */
+ public static function find()
+ {
+ try {
+ $client = static::findOneByType(ClientInterface::class);
+ } catch (DiscoveryFailedException $e) {
+ throw new \Http\Discovery\Exception\NotFoundException('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/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php
new file mode 100644
index 000000000..ae0b0d842
--- /dev/null
+++ b/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php
@@ -0,0 +1,180 @@
+<?php
+
+namespace Http\Discovery\Strategy;
+
+use GuzzleHttp\Client as GuzzleHttp;
+use GuzzleHttp\Promise\Promise;
+use GuzzleHttp\Psr7\Request as GuzzleRequest;
+use Http\Adapter\Artax\Client as Artax;
+use Http\Adapter\Buzz\Client as Buzz;
+use Http\Adapter\Cake\Client as Cake;
+use Http\Adapter\Guzzle5\Client as Guzzle5;
+use Http\Adapter\Guzzle6\Client as Guzzle6;
+use Http\Adapter\Guzzle7\Client as Guzzle7;
+use Http\Adapter\React\Client as React;
+use Http\Client\Curl\Client as Curl;
+use Http\Client\HttpAsyncClient;
+use Http\Client\HttpClient;
+use Http\Client\Socket\Client as Socket;
+use Http\Discovery\ClassDiscovery;
+use Http\Discovery\Exception\NotFoundException;
+use Http\Discovery\Psr17FactoryDiscovery;
+use Http\Message\MessageFactory;
+use Http\Message\MessageFactory\DiactorosMessageFactory;
+use Http\Message\MessageFactory\GuzzleMessageFactory;
+use Http\Message\MessageFactory\SlimMessageFactory;
+use Http\Message\StreamFactory;
+use Http\Message\StreamFactory\DiactorosStreamFactory;
+use Http\Message\StreamFactory\GuzzleStreamFactory;
+use Http\Message\StreamFactory\SlimStreamFactory;
+use Http\Message\UriFactory;
+use Http\Message\UriFactory\DiactorosUriFactory;
+use Http\Message\UriFactory\GuzzleUriFactory;
+use Http\Message\UriFactory\SlimUriFactory;
+use Laminas\Diactoros\Request as DiactorosRequest;
+use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory;
+use Psr\Http\Client\ClientInterface as Psr18Client;
+use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory;
+use Slim\Http\Request as SlimRequest;
+use Symfony\Component\HttpClient\HttplugClient as SymfonyHttplug;
+use Symfony\Component\HttpClient\Psr18Client as SymfonyPsr18;
+
+/**
+ * @internal
+ *
+ * @author Tobias Nyholm <[email protected]>
+ *
+ * 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']]],
+ ['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');
+ }
+
+ /**
+ * 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/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php b/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php
new file mode 100644
index 000000000..04cf4baf8
--- /dev/null
+++ b/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php
@@ -0,0 +1,104 @@
+<?php
+
+namespace Http\Discovery\Strategy;
+
+use Psr\Http\Message\RequestFactoryInterface;
+use Psr\Http\Message\ResponseFactoryInterface;
+use Psr\Http\Message\ServerRequestFactoryInterface;
+use Psr\Http\Message\StreamFactoryInterface;
+use Psr\Http\Message\UploadedFileFactoryInterface;
+use Psr\Http\Message\UriFactoryInterface;
+
+/**
+ * @internal
+ *
+ * @author Tobias Nyholm <[email protected]>
+ *
+ * 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/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php b/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php
new file mode 100644
index 000000000..1eadb145b
--- /dev/null
+++ b/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Http\Discovery\Strategy;
+
+use Http\Discovery\Exception\StrategyUnavailableException;
+
+/**
+ * @author Tobias Nyholm <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php b/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php
new file mode 100644
index 000000000..77b9d276f
--- /dev/null
+++ b/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Http\Discovery\Strategy;
+
+use Http\Client\HttpAsyncClient;
+use Http\Client\HttpClient;
+use Http\Mock\Client as Mock;
+
+/**
+ * Find the Mock client.
+ *
+ * @author Sam Rapaport <[email protected]>
+ */
+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/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php b/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php
new file mode 100644
index 000000000..74b78b83f
--- /dev/null
+++ b/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php
@@ -0,0 +1,90 @@
+<?php
+
+namespace Http\Discovery\Strategy;
+
+use Http\Discovery\ClassDiscovery;
+use Http\Discovery\Exception\PuliUnavailableException;
+use Puli\Discovery\Api\Discovery;
+use Puli\GeneratedPuliFactory;
+
+/**
+ * Find candidates using Puli.
+ *
+ * @internal
+ *
+ * @final
+ *
+ * @author David de Boer <[email protected]>
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+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/vendor/php-http/discovery/src/StreamFactoryDiscovery.php b/vendor/php-http/discovery/src/StreamFactoryDiscovery.php
new file mode 100644
index 000000000..e11c49ae2
--- /dev/null
+++ b/vendor/php-http/discovery/src/StreamFactoryDiscovery.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Http\Message\StreamFactory;
+
+/**
+ * Finds a Stream Factory.
+ *
+ * @author Михаил Красильников <[email protected]>
+ *
+ * @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/vendor/php-http/discovery/src/UriFactoryDiscovery.php b/vendor/php-http/discovery/src/UriFactoryDiscovery.php
new file mode 100644
index 000000000..db3add206
--- /dev/null
+++ b/vendor/php-http/discovery/src/UriFactoryDiscovery.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Http\Discovery;
+
+use Http\Discovery\Exception\DiscoveryFailedException;
+use Http\Message\UriFactory;
+
+/**
+ * Finds a URI Factory.
+ *
+ * @author David de Boer <[email protected]>
+ *
+ * @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/vendor/php-http/guzzle7-adapter/CHANGELOG.md b/vendor/php-http/guzzle7-adapter/CHANGELOG.md
new file mode 100644
index 000000000..9aa94407b
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/CHANGELOG.md
@@ -0,0 +1,18 @@
+# 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).
+
+## [1.0.0] - 2021-03-09
+
+- Stable release - no changes since 0.1.1
+
+## [0.1.1] - 2020-10-21
+
+* Allow installation with PHP 8
+
+## [0.1.0] - 2020-08-16
+
+First release
diff --git a/vendor/php-http/guzzle7-adapter/LICENSE b/vendor/php-http/guzzle7-adapter/LICENSE
new file mode 100644
index 000000000..0d6ce83b8
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2020 PHP HTTP Team <[email protected]>
+
+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/vendor/php-http/guzzle7-adapter/README.md b/vendor/php-http/guzzle7-adapter/README.md
new file mode 100644
index 000000000..7e6b5b5dc
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/README.md
@@ -0,0 +1,45 @@
+# Guzzle 7 HTTP Adapter
+
+[![Latest Version](https://img.shields.io/github/release/php-http/guzzle7-adapter.svg?style=flat-square)](https://github.com/php-http/guzzle7-adapter/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/guzzle7-adapter.svg?style=flat-square)](https://packagist.org/packages/php-http/guzzle7-adapter)
+
+**Guzzle 7 HTTP Adapter.**
+
+## Install
+
+Via Composer
+
+``` bash
+$ composer require php-http/guzzle7-adapter
+```
+
+## Documentation
+
+Please see the [official documentation](http://docs.php-http.org/en/latest/clients/guzzle7-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 [[email protected]](mailto:[email protected]).
+
+## License
+
+The MIT License (MIT). Please see [License File](LICENSE) for more information.
diff --git a/vendor/php-http/guzzle7-adapter/composer.json b/vendor/php-http/guzzle7-adapter/composer.json
new file mode 100644
index 000000000..3299d2eb7
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/composer.json
@@ -0,0 +1,43 @@
+{
+ "name": "php-http/guzzle7-adapter",
+ "description": "Guzzle 7 HTTP Adapter",
+ "license": "MIT",
+ "keywords": ["guzzle", "http"],
+ "homepage": "http://httplug.io",
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "[email protected]"
+ }
+ ],
+ "require": {
+ "php": "^7.2 | ^8.0",
+ "php-http/httplug": "^2.0",
+ "psr/http-client": "^1.0",
+ "guzzlehttp/guzzle": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.0|^9.3",
+ "php-http/client-integration-tests": "^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\\Guzzle7\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Http\\Adapter\\Guzzle7\\Tests\\": "tests/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.2.x-dev"
+ }
+ }
+}
diff --git a/vendor/php-http/guzzle7-adapter/phpstan.neon.dist b/vendor/php-http/guzzle7-adapter/phpstan.neon.dist
new file mode 100644
index 000000000..d42940e93
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/phpstan.neon.dist
@@ -0,0 +1,5 @@
+parameters:
+ level: 5
+ reportUnmatchedIgnoredErrors: false
+ paths:
+ - src
diff --git a/vendor/php-http/guzzle7-adapter/psalm.baseline.xml b/vendor/php-http/guzzle7-adapter/psalm.baseline.xml
new file mode 100644
index 000000000..96ab42cf9
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/psalm.baseline.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<files psalm-version="3.14.2@3538fe1955d47f6ee926c0769d71af6db08aa488">
+ <file src="src/Promise.php">
+ <PossiblyNullArgument occurrences="1">
+ <code>$exception-&gt;getResponse()</code>
+ </PossiblyNullArgument>
+ </file>
+</files>
diff --git a/vendor/php-http/guzzle7-adapter/psalm.xml b/vendor/php-http/guzzle7-adapter/psalm.xml
new file mode 100644
index 000000000..d70acfe4f
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/psalm.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<psalm
+ errorLevel="3"
+ resolveFromConfigFile="true"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://getpsalm.org/schema/config"
+ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
+ errorBaseline="psalm.baseline.xml"
+>
+ <projectFiles>
+ <directory name="src" />
+ <ignoreFiles>
+ <directory name="vendor" />
+ </ignoreFiles>
+ </projectFiles>
+</psalm>
diff --git a/vendor/php-http/guzzle7-adapter/src/Client.php b/vendor/php-http/guzzle7-adapter/src/Client.php
new file mode 100644
index 000000000..a92ab06bd
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/src/Client.php
@@ -0,0 +1,75 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Http\Adapter\Guzzle7;
+
+use GuzzleHttp\Client as GuzzleClient;
+use GuzzleHttp\ClientInterface;
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Middleware;
+use GuzzleHttp\Utils;
+use Http\Client\HttpAsyncClient;
+use Http\Client\HttpClient;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * HTTP Adapter for Guzzle 7.
+ *
+ * @author Tobias Nyholm <[email protected]>
+ */
+final class Client implements HttpClient, HttpAsyncClient
+{
+ /**
+ * @var ClientInterface
+ */
+ private $guzzle;
+
+ public function __construct(?ClientInterface $guzzle = null)
+ {
+ if (!$guzzle) {
+ $guzzle = self::buildClient();
+ }
+
+ $this->guzzle = $guzzle;
+ }
+
+ /**
+ * Factory method to create the Guzzle 7 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
+ {
+ return $this->sendAsyncRequest($request)->wait();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sendAsyncRequest(RequestInterface $request)
+ {
+ $promise = $this->guzzle->sendAsync($request);
+
+ return new Promise($promise, $request);
+ }
+
+ /**
+ * Build the Guzzle client instance.
+ */
+ private static function buildClient(array $config = []): GuzzleClient
+ {
+ $handlerStack = new HandlerStack(Utils::chooseHandler());
+ $handlerStack->push(Middleware::prepareBody(), 'prepare_body');
+ $config = array_merge(['handler' => $handlerStack], $config);
+
+ return new GuzzleClient($config);
+ }
+}
diff --git a/vendor/php-http/guzzle7-adapter/src/Exception/UnexpectedValueException.php b/vendor/php-http/guzzle7-adapter/src/Exception/UnexpectedValueException.php
new file mode 100644
index 000000000..f4731be07
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/src/Exception/UnexpectedValueException.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace Http\Adapter\Guzzle7\Exception;
+
+use Http\Client\Exception;
+
+final class UnexpectedValueException extends \UnexpectedValueException implements Exception
+{
+}
diff --git a/vendor/php-http/guzzle7-adapter/src/Promise.php b/vendor/php-http/guzzle7-adapter/src/Promise.php
new file mode 100644
index 000000000..b83021688
--- /dev/null
+++ b/vendor/php-http/guzzle7-adapter/src/Promise.php
@@ -0,0 +1,132 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Http\Adapter\Guzzle7;
+
+use GuzzleHttp\Exception as GuzzleExceptions;
+use GuzzleHttp\Promise\PromiseInterface;
+use Http\Adapter\Guzzle7\Exception\UnexpectedValueException;
+use Http\Client\Exception as HttplugException;
+use Http\Promise\Promise as HttpPromise;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Wrapper around Guzzle promises.
+ *
+ * @author Joel Wurtz <[email protected]>
+ */
+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 Guzzle7', 0, $reason);
+ } else {
+ $this->exception = new UnexpectedValueException('Reason returned from Guzzle7 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.
+ *
+ * @return HttplugException
+ */
+ private function handleException(GuzzleExceptions\GuzzleException $exception, RequestInterface $request)
+ {
+ 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/vendor/php-http/httplug/.php-cs-fixer.dist.php b/vendor/php-http/httplug/.php-cs-fixer.dist.php
new file mode 100644
index 000000000..83809c25d
--- /dev/null
+++ b/vendor/php-http/httplug/.php-cs-fixer.dist.php
@@ -0,0 +1,16 @@
+<?php
+
+$finder = PhpCsFixer\Finder::create()
+ ->in(__DIR__.'/src')
+ ->name('*.php')
+;
+
+$config = (new PhpCsFixer\Config())
+ ->setRiskyAllowed(true)
+ ->setRules([
+ '@Symfony' => true,
+ ])
+ ->setFinder($finder)
+;
+
+return $config;
diff --git a/vendor/php-http/httplug/CHANGELOG.md b/vendor/php-http/httplug/CHANGELOG.md
new file mode 100644
index 000000000..efccd55d3
--- /dev/null
+++ b/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/vendor/php-http/httplug/LICENSE b/vendor/php-http/httplug/LICENSE
new file mode 100644
index 000000000..8cd264c6b
--- /dev/null
+++ b/vendor/php-http/httplug/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2014 Eric GELOEN <[email protected]>
+Copyright (c) 2015 PHP HTTP Team <[email protected]>
+
+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/vendor/php-http/httplug/README.md b/vendor/php-http/httplug/README.md
new file mode 100644
index 000000000..a9b476a5e
--- /dev/null
+++ b/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 protected]?style=flat-square)](mailto:[email protected])
+
+**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/vendor/php-http/httplug/composer.json b/vendor/php-http/httplug/composer.json
new file mode 100644
index 000000000..739177017
--- /dev/null
+++ b/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": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]",
+ "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/vendor/php-http/httplug/puli.json b/vendor/php-http/httplug/puli.json
new file mode 100644
index 000000000..416833152
--- /dev/null
+++ b/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/vendor/php-http/httplug/src/Exception.php b/vendor/php-http/httplug/src/Exception.php
new file mode 100644
index 000000000..4df164c9a
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Http\Client;
+
+use Psr\Http\Client\ClientExceptionInterface as PsrClientException;
+
+/**
+ * Every HTTP Client related Exception must implement this interface.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+interface Exception extends PsrClientException
+{
+}
diff --git a/vendor/php-http/httplug/src/Exception/HttpException.php b/vendor/php-http/httplug/src/Exception/HttpException.php
new file mode 100644
index 000000000..6c2a007a0
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception/HttpException.php
@@ -0,0 +1,65 @@
+<?php
+
+namespace Http\Client\Exception;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+/**
+ * Thrown when a response was received but the request itself failed.
+ *
+ * In addition to the request, this exception always provides access to the response object.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+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/vendor/php-http/httplug/src/Exception/NetworkException.php b/vendor/php-http/httplug/src/Exception/NetworkException.php
new file mode 100644
index 000000000..9b4f1e8fd
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception/NetworkException.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Http\Client\Exception;
+
+use Psr\Http\Client\NetworkExceptionInterface as PsrNetworkException;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Thrown when the request cannot be completed because of network issues.
+ *
+ * There is no response object as this exception is thrown when no response has been received.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+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/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php b/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php
new file mode 100644
index 000000000..71b4bb8c9
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception/RequestAwareTrait.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Http\Client\Exception;
+
+use Psr\Http\Message\RequestInterface;
+
+trait RequestAwareTrait
+{
+ /**
+ * @var RequestInterface
+ */
+ private $request;
+
+ private function setRequest(RequestInterface $request)
+ {
+ $this->request = $request;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequest(): RequestInterface
+ {
+ return $this->request;
+ }
+}
diff --git a/vendor/php-http/httplug/src/Exception/RequestException.php b/vendor/php-http/httplug/src/Exception/RequestException.php
new file mode 100644
index 000000000..f6c60ce56
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception/RequestException.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Http\Client\Exception;
+
+use Psr\Http\Client\RequestExceptionInterface as PsrRequestException;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Exception for when a request failed, providing access to the failed request.
+ *
+ * This could be due to an invalid request, or one of the extending exceptions
+ * for network errors or HTTP error responses.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+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/vendor/php-http/httplug/src/Exception/TransferException.php b/vendor/php-http/httplug/src/Exception/TransferException.php
new file mode 100644
index 000000000..a858cf5ec
--- /dev/null
+++ b/vendor/php-http/httplug/src/Exception/TransferException.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Http\Client\Exception;
+
+use Http\Client\Exception;
+
+/**
+ * Base exception for transfer related exceptions.
+ *
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+class TransferException extends \RuntimeException implements Exception
+{
+}
diff --git a/vendor/php-http/httplug/src/HttpAsyncClient.php b/vendor/php-http/httplug/src/HttpAsyncClient.php
new file mode 100644
index 000000000..c3b9d61aa
--- /dev/null
+++ b/vendor/php-http/httplug/src/HttpAsyncClient.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Http\Client;
+
+use Http\Promise\Promise;
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Sends a PSR-7 Request in an asynchronous way by returning a Promise.
+ *
+ * @author Joel Wurtz <[email protected]>
+ */
+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/vendor/php-http/httplug/src/HttpClient.php b/vendor/php-http/httplug/src/HttpClient.php
new file mode 100644
index 000000000..22b94aaf7
--- /dev/null
+++ b/vendor/php-http/httplug/src/HttpClient.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Http\Client;
+
+use Psr\Http\Client\ClientInterface;
+
+/**
+ * {@inheritdoc}
+ *
+ * Provide the Httplug HttpClient interface for BC.
+ * You should typehint Psr\Http\Client\ClientInterface in new code
+ *
+ * @deprecated since version 2.4, use Psr\Http\Client\ClientInterface instead; see https://www.php-fig.org/psr/psr-18/
+ */
+interface HttpClient extends ClientInterface
+{
+}
diff --git a/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php b/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php
new file mode 100644
index 000000000..1ad32cd53
--- /dev/null
+++ b/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace Http\Client\Promise;
+
+use Http\Client\Exception;
+use Http\Promise\Promise;
+use Psr\Http\Message\ResponseInterface;
+
+final class HttpFulfilledPromise implements Promise
+{
+ /**
+ * @var ResponseInterface
+ */
+ private $response;
+
+ public function __construct(ResponseInterface $response)
+ {
+ $this->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/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php b/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php
new file mode 100644
index 000000000..624cc8a94
--- /dev/null
+++ b/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Http\Client\Promise;
+
+use Http\Client\Exception;
+use Http\Promise\Promise;
+
+final class HttpRejectedPromise implements Promise
+{
+ /**
+ * @var Exception
+ */
+ private $exception;
+
+ public function __construct(Exception $exception)
+ {
+ $this->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/vendor/php-http/promise/CHANGELOG.md b/vendor/php-http/promise/CHANGELOG.md
new file mode 100644
index 000000000..479deb8a7
--- /dev/null
+++ b/vendor/php-http/promise/CHANGELOG.md
@@ -0,0 +1,48 @@
+# Change Log
+
+## 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/vendor/php-http/promise/LICENSE b/vendor/php-http/promise/LICENSE
new file mode 100644
index 000000000..4558d6f06
--- /dev/null
+++ b/vendor/php-http/promise/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015-2016 PHP HTTP Team <[email protected]>
+
+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/vendor/php-http/promise/README.md b/vendor/php-http/promise/README.md
new file mode 100644
index 000000000..ee95e0933
--- /dev/null
+++ b/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://img.shields.io/travis/php-http/promise.svg?style=flat-square)](https://travis-ci.org/php-http/promise)
+[![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 [[email protected]](mailto:[email protected]).
+
+
+## License
+
+The MIT License (MIT). Please see [License File](LICENSE) for more information.
diff --git a/vendor/php-http/promise/composer.json b/vendor/php-http/promise/composer.json
new file mode 100644
index 000000000..812167bc8
--- /dev/null
+++ b/vendor/php-http/promise/composer.json
@@ -0,0 +1,38 @@
+{
+ "name": "php-http/promise",
+ "description": "Promise used for asynchronous HTTP requests",
+ "license": "MIT",
+ "keywords": ["promise"],
+ "homepage": "http://httplug.io",
+ "authors": [
+ {
+ "name": "Joel Wurtz",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "[email protected]"
+ }
+ ],
+ "require": {
+ "php" : "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "friends-of-phpspec/phpspec-code-coverage" : "^4.3.2",
+ "phpspec/phpspec": "^5.1.2 || ^6.2"
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Promise\\": "src/"
+ }
+ },
+ "scripts": {
+ "test": "vendor/bin/phpspec run",
+ "test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ }
+}
diff --git a/vendor/php-http/promise/src/FulfilledPromise.php b/vendor/php-http/promise/src/FulfilledPromise.php
new file mode 100644
index 000000000..f60f686a2
--- /dev/null
+++ b/vendor/php-http/promise/src/FulfilledPromise.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Http\Promise;
+
+/**
+ * A promise already fulfilled.
+ *
+ * @author Joel Wurtz <[email protected]>
+ */
+final class FulfilledPromise implements Promise
+{
+ /**
+ * @var mixed
+ */
+ private $result;
+
+ /**
+ * @param $result
+ */
+ public function __construct($result)
+ {
+ $this->result = $result;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ 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);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getState()
+ {
+ return Promise::FULFILLED;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function wait($unwrap = true)
+ {
+ if ($unwrap) {
+ return $this->result;
+ }
+ }
+}
diff --git a/vendor/php-http/promise/src/Promise.php b/vendor/php-http/promise/src/Promise.php
new file mode 100644
index 000000000..3258ed0d3
--- /dev/null
+++ b/vendor/php-http/promise/src/Promise.php
@@ -0,0 +1,69 @@
+<?php
+
+namespace Http\Promise;
+
+/**
+ * Promise represents a value that may not be available yet, but will be resolved at some point in future.
+ * It acts like a proxy to the actual value.
+ *
+ * This interface is an extension of the promises/a+ specification.
+ *
+ * @see https://promisesaplus.com/
+ *
+ * @author Joel Wurtz <[email protected]>
+ * @author Márk Sági-Kazár <[email protected]>
+ */
+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 mixed Resolved value, null if $unwrap is set to false
+ *
+ * @throws \Exception the rejection reason if $unwrap is set to true and the request failed
+ */
+ public function wait($unwrap = true);
+}
diff --git a/vendor/php-http/promise/src/RejectedPromise.php b/vendor/php-http/promise/src/RejectedPromise.php
new file mode 100644
index 000000000..e396a40f7
--- /dev/null
+++ b/vendor/php-http/promise/src/RejectedPromise.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Http\Promise;
+
+/**
+ * A rejected promise.
+ *
+ * @author Joel Wurtz <[email protected]>
+ */
+final class RejectedPromise implements Promise
+{
+ /**
+ * @var \Exception
+ */
+ private $exception;
+
+ /**
+ * @param \Exception $exception
+ */
+ public function __construct(\Exception $exception)
+ {
+ $this->exception = $exception;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ 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);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getState()
+ {
+ return Promise::REJECTED;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function wait($unwrap = true)
+ {
+ if ($unwrap) {
+ throw $this->exception;
+ }
+ }
+}
diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md
deleted file mode 100644
index 58ddab05a..000000000
--- a/vendor/psr/cache/CHANGELOG.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file, in reverse chronological order by release.
-
-## 1.0.1 - 2016-08-06
-
-### Fixed
-
-- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
-- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
-- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
-- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
-
-## 1.0.0 - 2015-12-11
-
-Initial stable release; reflects accepted PSR-6 specification
diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt
deleted file mode 100644
index b1c2c97b9..000000000
--- a/vendor/psr/cache/LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015 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/vendor/psr/cache/README.md b/vendor/psr/cache/README.md
deleted file mode 100644
index 9855a318b..000000000
--- a/vendor/psr/cache/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Caching Interface
-==============
-
-This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url].
-
-Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism.
-
-The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
-
-[psr-url]: https://www.php-fig.org/psr/psr-6/
-[package-url]: https://packagist.org/packages/psr/cache
-[implementation-url]: https://packagist.org/providers/psr/cache-implementation
diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json
deleted file mode 100644
index 4b687971e..000000000
--- a/vendor/psr/cache/composer.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "psr/cache",
- "description": "Common interface for caching libraries",
- "keywords": ["psr", "psr-6", "cache"],
- "license": "MIT",
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "require": {
- "php": ">=8.0.0"
- },
- "autoload": {
- "psr-4": {
- "Psr\\Cache\\": "src/"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- }
-}
diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php
deleted file mode 100644
index bb785f46c..000000000
--- a/vendor/psr/cache/src/CacheException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace Psr\Cache;
-
-/**
- * Exception interface for all exceptions thrown by an Implementing Library.
- */
-interface CacheException extends \Throwable
-{
-}
diff --git a/vendor/psr/cache/src/CacheItemInterface.php b/vendor/psr/cache/src/CacheItemInterface.php
deleted file mode 100644
index 2b2e4bb88..000000000
--- a/vendor/psr/cache/src/CacheItemInterface.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-
-namespace Psr\Cache;
-
-/**
- * CacheItemInterface defines an interface for interacting with objects inside a cache.
- *
- * Each Item object MUST be associated with a specific key, which can be set
- * according to the implementing system and is typically passed by the
- * Cache\CacheItemPoolInterface object.
- *
- * The Cache\CacheItemInterface object encapsulates the storage and retrieval of
- * cache items. Each Cache\CacheItemInterface is generated by a
- * Cache\CacheItemPoolInterface object, which is responsible for any required
- * setup as well as associating the object with a unique Key.
- * Cache\CacheItemInterface objects MUST be able to store and retrieve any type
- * of PHP value defined in the Data section of the specification.
- *
- * Calling Libraries MUST NOT instantiate Item objects themselves. They may only
- * be requested from a Pool object via the getItem() method. Calling Libraries
- * SHOULD NOT assume that an Item created by one Implementing Library is
- * compatible with a Pool from another Implementing Library.
- */
-interface CacheItemInterface
-{
- /**
- * Returns the key for the current cache item.
- *
- * The key is loaded by the Implementing Library, but should be available to
- * the higher level callers when needed.
- *
- * @return string
- * The key string for this cache item.
- */
- public function getKey(): string;
-
- /**
- * Retrieves the value of the item from the cache associated with this object's key.
- *
- * The value returned must be identical to the value originally stored by set().
- *
- * If isHit() returns false, this method MUST return null. Note that null
- * is a legitimate cached value, so the isHit() method SHOULD be used to
- * differentiate between "null value was found" and "no value was found."
- *
- * @return mixed
- * The value corresponding to this cache item's key, or null if not found.
- */
- public function get(): mixed;
-
- /**
- * Confirms if the cache item lookup resulted in a cache hit.
- *
- * Note: This method MUST NOT have a race condition between calling isHit()
- * and calling get().
- *
- * @return bool
- * True if the request resulted in a cache hit. False otherwise.
- */
- public function isHit(): bool;
-
- /**
- * Sets the value represented by this cache item.
- *
- * The $value argument may be any item that can be serialized by PHP,
- * although the method of serialization is left up to the Implementing
- * Library.
- *
- * @param mixed $value
- * The serializable value to be stored.
- *
- * @return static
- * The invoked object.
- */
- public function set(mixed $value): static;
-
- /**
- * Sets the expiration time for this cache item.
- *
- * @param ?\DateTimeInterface $expiration
- * The point in time after which the item MUST be considered expired.
- * If null is passed explicitly, a default value MAY be used. If none is set,
- * the value should be stored permanently or for as long as the
- * implementation allows.
- *
- * @return static
- * The called object.
- */
- public function expiresAt(?\DateTimeInterface $expiration): static;
-
- /**
- * Sets the expiration time for this cache item.
- *
- * @param int|\DateInterval|null $time
- * The period of time from the present after which the item MUST be considered
- * expired. An integer parameter is understood to be the time in seconds until
- * expiration. If null is passed explicitly, a default value MAY be used.
- * If none is set, the value should be stored permanently or for as long as the
- * implementation allows.
- *
- * @return static
- * The called object.
- */
- public function expiresAfter(int|\DateInterval|null $time): static;
-}
diff --git a/vendor/psr/cache/src/CacheItemPoolInterface.php b/vendor/psr/cache/src/CacheItemPoolInterface.php
deleted file mode 100644
index 4b3017c75..000000000
--- a/vendor/psr/cache/src/CacheItemPoolInterface.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-
-namespace Psr\Cache;
-
-/**
- * CacheItemPoolInterface generates CacheItemInterface objects.
- *
- * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from
- * the Calling Library and return the associated Cache\CacheItemInterface object.
- * It is also the primary point of interaction with the entire cache collection.
- * All configuration and initialization of the Pool is left up to an
- * Implementing Library.
- */
-interface CacheItemPoolInterface
-{
- /**
- * Returns a Cache Item representing the specified key.
- *
- * This method must always return a CacheItemInterface object, even in case of
- * a cache miss. It MUST NOT return null.
- *
- * @param string $key
- * The key for which to return the corresponding Cache Item.
- *
- * @throws InvalidArgumentException
- * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
- * MUST be thrown.
- *
- * @return CacheItemInterface
- * The corresponding Cache Item.
- */
- public function getItem(string $key): CacheItemInterface;
-
- /**
- * Returns a traversable set of cache items.
- *
- * @param string[] $keys
- * An indexed array of keys of items to retrieve.
- *
- * @throws InvalidArgumentException
- * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
- * MUST be thrown.
- *
- * @return iterable
- * An iterable collection of Cache Items keyed by the cache keys of
- * each item. A Cache item will be returned for each key, even if that
- * key is not found. However, if no keys are specified then an empty
- * traversable MUST be returned instead.
- */
- public function getItems(array $keys = []): iterable;
-
- /**
- * Confirms if the cache contains specified cache item.
- *
- * Note: This method MAY avoid retrieving the cached value for performance reasons.
- * This could result in a race condition with CacheItemInterface::get(). To avoid
- * such situation use CacheItemInterface::isHit() instead.
- *
- * @param string $key
- * The key for which to check existence.
- *
- * @throws InvalidArgumentException
- * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
- * MUST be thrown.
- *
- * @return bool
- * True if item exists in the cache, false otherwise.
- */
- public function hasItem(string $key): bool;
-
- /**
- * Deletes all items in the pool.
- *
- * @return bool
- * True if the pool was successfully cleared. False if there was an error.
- */
- public function clear(): bool;
-
- /**
- * Removes the item from the pool.
- *
- * @param string $key
- * The key to delete.
- *
- * @throws InvalidArgumentException
- * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
- * MUST be thrown.
- *
- * @return bool
- * True if the item was successfully removed. False if there was an error.
- */
- public function deleteItem(string $key): bool;
-
- /**
- * Removes multiple items from the pool.
- *
- * @param string[] $keys
- * An array of keys that should be removed from the pool.
- *
- * @throws InvalidArgumentException
- * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
- * MUST be thrown.
- *
- * @return bool
- * True if the items were successfully removed. False if there was an error.
- */
- public function deleteItems(array $keys): bool;
-
- /**
- * Persists a cache item immediately.
- *
- * @param CacheItemInterface $item
- * The cache item to save.
- *
- * @return bool
- * True if the item was successfully persisted. False if there was an error.
- */
- public function save(CacheItemInterface $item): bool;
-
- /**
- * Sets a cache item to be persisted later.
- *
- * @param CacheItemInterface $item
- * The cache item to save.
- *
- * @return bool
- * False if the item could not be queued or if a commit was attempted and failed. True otherwise.
- */
- public function saveDeferred(CacheItemInterface $item): bool;
-
- /**
- * Persists any deferred cache items.
- *
- * @return bool
- * True if all not-yet-saved items were successfully saved or there were none. False otherwise.
- */
- public function commit(): bool;
-}
diff --git a/vendor/psr/cache/src/InvalidArgumentException.php b/vendor/psr/cache/src/InvalidArgumentException.php
deleted file mode 100644
index be7c6fa0e..000000000
--- a/vendor/psr/cache/src/InvalidArgumentException.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-namespace Psr\Cache;
-
-/**
- * Exception interface for invalid cache arguments.
- *
- * Any time an invalid argument is passed into a method it must throw an
- * exception class which implements Psr\Cache\InvalidArgumentException.
- */
-interface InvalidArgumentException extends CacheException
-{
-}
diff --git a/vendor/psr/http-client/CHANGELOG.md b/vendor/psr/http-client/CHANGELOG.md
new file mode 100644
index 000000000..babba7c7b
--- /dev/null
+++ b/vendor/psr/http-client/CHANGELOG.md
@@ -0,0 +1,31 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.3
+
+Add `source` link in composer.json. No code changes.
+
+## 1.0.2
+
+Allow PSR-7 (psr/http-message) 2.0. No code changes.
+
+## 1.0.1
+
+Allow installation with PHP 8. No code changes.
+
+## 1.0.0
+
+First stable release. No changes since 0.3.0.
+
+## 0.3.0
+
+Added Interface suffix on exceptions
+
+## 0.2.0
+
+All exceptions are in `Psr\Http\Client` namespace
+
+## 0.1.0
+
+First release
diff --git a/vendor/psr/http-client/LICENSE b/vendor/psr/http-client/LICENSE
new file mode 100644
index 000000000..cd5e0020a
--- /dev/null
+++ b/vendor/psr/http-client/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2017 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/vendor/psr/http-client/README.md b/vendor/psr/http-client/README.md
new file mode 100644
index 000000000..84af5c55d
--- /dev/null
+++ b/vendor/psr/http-client/README.md
@@ -0,0 +1,12 @@
+HTTP Client
+===========
+
+This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url].
+
+Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client.
+
+The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
+
+[psr-url]: https://www.php-fig.org/psr/psr-18
+[package-url]: https://packagist.org/packages/psr/http-client
+[implementation-url]: https://packagist.org/providers/psr/http-client-implementation
diff --git a/vendor/psr/http-client/composer.json b/vendor/psr/http-client/composer.json
new file mode 100644
index 000000000..6fed350be
--- /dev/null
+++ b/vendor/psr/http-client/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "psr/http-client",
+ "description": "Common interface for HTTP clients",
+ "keywords": ["psr", "psr-18", "http", "http-client"],
+ "homepage": "https://github.com/php-fig/http-client",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
+ "require": {
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Client\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/psr/http-client/src/ClientExceptionInterface.php b/vendor/psr/http-client/src/ClientExceptionInterface.php
new file mode 100644
index 000000000..aa0b9cf14
--- /dev/null
+++ b/vendor/psr/http-client/src/ClientExceptionInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Psr\Http\Client;
+
+/**
+ * Every HTTP client related exception MUST implement this interface.
+ */
+interface ClientExceptionInterface extends \Throwable
+{
+}
diff --git a/vendor/psr/http-client/src/ClientInterface.php b/vendor/psr/http-client/src/ClientInterface.php
new file mode 100644
index 000000000..ad99fd4b7
--- /dev/null
+++ b/vendor/psr/http-client/src/ClientInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Psr\Http\Client;
+
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+interface ClientInterface
+{
+ /**
+ * Sends a PSR-7 request and returns a PSR-7 response.
+ *
+ * @param RequestInterface $request
+ *
+ * @return ResponseInterface
+ *
+ * @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
+ */
+ public function sendRequest(RequestInterface $request): ResponseInterface;
+}
diff --git a/vendor/psr/http-client/src/NetworkExceptionInterface.php b/vendor/psr/http-client/src/NetworkExceptionInterface.php
new file mode 100644
index 000000000..4a11627c7
--- /dev/null
+++ b/vendor/psr/http-client/src/NetworkExceptionInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Psr\Http\Client;
+
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Thrown when the request cannot be completed because of network issues.
+ *
+ * There is no response object as this exception is thrown when no response has been received.
+ *
+ * Example: the target host name can not be resolved or the connection failed.
+ */
+interface NetworkExceptionInterface extends ClientExceptionInterface
+{
+ /**
+ * Returns the request.
+ *
+ * The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
+ *
+ * @return RequestInterface
+ */
+ public function getRequest(): RequestInterface;
+}
diff --git a/vendor/psr/http-client/src/RequestExceptionInterface.php b/vendor/psr/http-client/src/RequestExceptionInterface.php
new file mode 100644
index 000000000..b17fc34fd
--- /dev/null
+++ b/vendor/psr/http-client/src/RequestExceptionInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Psr\Http\Client;
+
+use Psr\Http\Message\RequestInterface;
+
+/**
+ * Exception for when a request failed.
+ *
+ * Examples:
+ * - Request is invalid (e.g. method is missing)
+ * - Runtime request errors (e.g. the body stream is not seekable)
+ */
+interface RequestExceptionInterface extends ClientExceptionInterface
+{
+ /**
+ * Returns the request.
+ *
+ * The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
+ *
+ * @return RequestInterface
+ */
+ public function getRequest(): RequestInterface;
+}
diff --git a/vendor/psr/http-factory/LICENSE b/vendor/psr/http-factory/LICENSE
new file mode 100644
index 000000000..3f1559b2a
--- /dev/null
+++ b/vendor/psr/http-factory/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 PHP-FIG
+
+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/vendor/psr/http-factory/README.md b/vendor/psr/http-factory/README.md
new file mode 100644
index 000000000..bf8913b57
--- /dev/null
+++ b/vendor/psr/http-factory/README.md
@@ -0,0 +1,12 @@
+HTTP Factories
+==============
+
+This repository holds all interfaces related to [PSR-17 (HTTP Factories)][psr-url].
+
+Note that this is not a HTTP Factory implementation of its own. It is merely interfaces that describe the components of a HTTP Factory.
+
+The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
+
+[psr-url]: https://www.php-fig.org/psr/psr-17/
+[package-url]: https://packagist.org/packages/psr/http-factory
+[implementation-url]: https://packagist.org/providers/psr/http-factory-implementation
diff --git a/vendor/psr/http-factory/composer.json b/vendor/psr/http-factory/composer.json
new file mode 100644
index 000000000..d1bbddeea
--- /dev/null
+++ b/vendor/psr/http-factory/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "psr/http-factory",
+ "description": "Common interfaces for PSR-7 HTTP message factories",
+ "keywords": [
+ "psr",
+ "psr-7",
+ "psr-17",
+ "http",
+ "factory",
+ "message",
+ "request",
+ "response"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=7.0.0",
+ "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/vendor/psr/http-factory/src/RequestFactoryInterface.php b/vendor/psr/http-factory/src/RequestFactoryInterface.php
new file mode 100644
index 000000000..cb39a08bf
--- /dev/null
+++ b/vendor/psr/http-factory/src/RequestFactoryInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface RequestFactoryInterface
+{
+ /**
+ * Create a new request.
+ *
+ * @param string $method The HTTP method associated with the request.
+ * @param UriInterface|string $uri The URI associated with the request. If
+ * the value is a string, the factory MUST create a UriInterface
+ * instance based on it.
+ *
+ * @return RequestInterface
+ */
+ public function createRequest(string $method, $uri): RequestInterface;
+}
diff --git a/vendor/psr/http-factory/src/ResponseFactoryInterface.php b/vendor/psr/http-factory/src/ResponseFactoryInterface.php
new file mode 100644
index 000000000..212562f00
--- /dev/null
+++ b/vendor/psr/http-factory/src/ResponseFactoryInterface.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface ResponseFactoryInterface
+{
+ /**
+ * Create a new response.
+ *
+ * @param int $code HTTP status code; defaults to 200
+ * @param string $reasonPhrase Reason phrase to associate with status code
+ * in generated response; if none is provided implementations MAY use
+ * the defaults as suggested in the HTTP specification.
+ *
+ * @return ResponseInterface
+ */
+ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface;
+}
diff --git a/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php b/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php
new file mode 100644
index 000000000..9fe031a8f
--- /dev/null
+++ b/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface ServerRequestFactoryInterface
+{
+ /**
+ * Create a new server request.
+ *
+ * Note that server-params are taken precisely as given - no parsing/processing
+ * of the given values is performed, and, in particular, no attempt is made to
+ * determine the HTTP method or URI, which must be provided explicitly.
+ *
+ * @param string $method The HTTP method associated with the request.
+ * @param UriInterface|string $uri The URI associated with the request. If
+ * the value is a string, the factory MUST create a UriInterface
+ * instance based on it.
+ * @param array $serverParams Array of SAPI parameters with which to seed
+ * the generated request instance.
+ *
+ * @return ServerRequestInterface
+ */
+ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface;
+}
diff --git a/vendor/psr/http-factory/src/StreamFactoryInterface.php b/vendor/psr/http-factory/src/StreamFactoryInterface.php
new file mode 100644
index 000000000..90e3240c4
--- /dev/null
+++ b/vendor/psr/http-factory/src/StreamFactoryInterface.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface StreamFactoryInterface
+{
+ /**
+ * Create a new stream from a string.
+ *
+ * The stream SHOULD be created with a temporary resource.
+ *
+ * @param string $content String content with which to populate the stream.
+ *
+ * @return StreamInterface
+ */
+ public function createStream(string $content = ''): StreamInterface;
+
+ /**
+ * Create a stream from an existing file.
+ *
+ * The file MUST be opened using the given mode, which may be any mode
+ * supported by the `fopen` function.
+ *
+ * The `$filename` MAY be any string supported by `fopen()`.
+ *
+ * @param string $filename Filename or stream URI to use as basis of stream.
+ * @param string $mode Mode with which to open the underlying filename/stream.
+ *
+ * @return StreamInterface
+ * @throws \RuntimeException If the file cannot be opened.
+ * @throws \InvalidArgumentException If the mode is invalid.
+ */
+ public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface;
+
+ /**
+ * Create a new stream from an existing resource.
+ *
+ * The stream MUST be readable and may be writable.
+ *
+ * @param resource $resource PHP resource to use as basis of stream.
+ *
+ * @return StreamInterface
+ */
+ public function createStreamFromResource($resource): StreamInterface;
+}
diff --git a/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php b/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php
new file mode 100644
index 000000000..7db4e30af
--- /dev/null
+++ b/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface UploadedFileFactoryInterface
+{
+ /**
+ * Create a new uploaded file.
+ *
+ * If a size is not provided it will be determined by checking the size of
+ * the file.
+ *
+ * @see http://php.net/manual/features.file-upload.post-method.php
+ * @see http://php.net/manual/features.file-upload.errors.php
+ *
+ * @param StreamInterface $stream Underlying stream representing the
+ * uploaded file content.
+ * @param int $size in bytes
+ * @param int $error PHP file upload error
+ * @param string $clientFilename Filename as provided by the client, if any.
+ * @param string $clientMediaType Media type as provided by the client, if any.
+ *
+ * @return UploadedFileInterface
+ *
+ * @throws \InvalidArgumentException If the file resource is not readable.
+ */
+ public function createUploadedFile(
+ StreamInterface $stream,
+ int $size = null,
+ int $error = \UPLOAD_ERR_OK,
+ string $clientFilename = null,
+ string $clientMediaType = null
+ ): UploadedFileInterface;
+}
diff --git a/vendor/psr/http-factory/src/UriFactoryInterface.php b/vendor/psr/http-factory/src/UriFactoryInterface.php
new file mode 100644
index 000000000..06df0b46a
--- /dev/null
+++ b/vendor/psr/http-factory/src/UriFactoryInterface.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Psr\Http\Message;
+
+interface UriFactoryInterface
+{
+ /**
+ * Create a new URI.
+ *
+ * @param string $uri
+ *
+ * @return UriInterface
+ *
+ * @throws \InvalidArgumentException If the given URI cannot be parsed.
+ */
+ public function createUri(string $uri = ''): UriInterface;
+}
diff --git a/vendor/psr/http-message/CHANGELOG.md b/vendor/psr/http-message/CHANGELOG.md
new file mode 100644
index 000000000..74b1ef923
--- /dev/null
+++ b/vendor/psr/http-message/CHANGELOG.md
@@ -0,0 +1,36 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.1 - 2016-08-06
+
+### Added
+
+- Nothing.
+
+### Deprecated
+
+- Nothing.
+
+### Removed
+
+- Nothing.
+
+### Fixed
+
+- Updated all `@return self` annotation references in interfaces to use
+ `@return static`, which more closelly follows the semantics of the
+ specification.
+- Updated the `MessageInterface::getHeaders()` return annotation to use the
+ value `string[][]`, indicating the format is a nested array of strings.
+- Updated the `@link` annotation for `RequestInterface::withRequestTarget()`
+ to point to the correct section of RFC 7230.
+- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation
+ to add the parameter name (`$uploadedFiles`).
+- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()`
+ method to correctly reference the method parameter (it was referencing an
+ incorrect parameter name previously).
+
+## 1.0.0 - 2016-05-18
+
+Initial stable release; reflects accepted PSR-7 specification.
diff --git a/vendor/psr/http-message/LICENSE b/vendor/psr/http-message/LICENSE
new file mode 100644
index 000000000..c2d8e452d
--- /dev/null
+++ b/vendor/psr/http-message/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 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/vendor/psr/http-message/README.md b/vendor/psr/http-message/README.md
new file mode 100644
index 000000000..2668be6c3
--- /dev/null
+++ b/vendor/psr/http-message/README.md
@@ -0,0 +1,16 @@
+PSR Http Message
+================
+
+This repository holds all interfaces/classes/traits related to
+[PSR-7](http://www.php-fig.org/psr/psr-7/).
+
+Note that this is not a HTTP message implementation of its own. It is merely an
+interface that describes a HTTP message. See the specification for more details.
+
+Usage
+-----
+
+Before reading the usage guide we recommend reading the PSR-7 interfaces method list:
+
+* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md)
+* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md) \ No newline at end of file
diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json
new file mode 100644
index 000000000..c66e5aba4
--- /dev/null
+++ b/vendor/psr/http-message/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "psr/http-message",
+ "description": "Common interface for HTTP messages",
+ "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"],
+ "homepage": "https://github.com/php-fig/http-message",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/psr/http-message/docs/PSR7-Interfaces.md b/vendor/psr/http-message/docs/PSR7-Interfaces.md
new file mode 100644
index 000000000..3a7e7dda6
--- /dev/null
+++ b/vendor/psr/http-message/docs/PSR7-Interfaces.md
@@ -0,0 +1,130 @@
+# Interfaces
+
+The purpose of this list is to help in finding the methods when working with PSR-7. This can be considered as a cheatsheet for PSR-7 interfaces.
+
+The interfaces defined in PSR-7 are the following:
+
+| Class Name | Description |
+|---|---|
+| [Psr\Http\Message\MessageInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagemessageinterface) | Representation of a HTTP message |
+| [Psr\Http\Message\RequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagerequestinterface) | Representation of an outgoing, client-side request. |
+| [Psr\Http\Message\ServerRequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageserverrequestinterface) | Representation of an incoming, server-side HTTP request. |
+| [Psr\Http\Message\ResponseInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageresponseinterface) | Representation of an outgoing, server-side response. |
+| [Psr\Http\Message\StreamInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagestreaminterface) | Describes a data stream |
+| [Psr\Http\Message\UriInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuriinterface) | Value object representing a URI. |
+| [Psr\Http\Message\UploadedFileInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuploadedfileinterface) | Value object representing a file uploaded through an HTTP request. |
+
+## `Psr\Http\Message\MessageInterface` Methods
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getProtocolVersion()` | Retrieve HTTP protocol version | 1.0 or 1.1 |
+| `withProtocolVersion($version)` | Returns new message instance with given HTTP protocol version | |
+| `getHeaders()` | Retrieve all HTTP Headers | [Request Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields), [Response Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields) |
+| `hasHeader($name)` | Checks if HTTP Header with given name exists | |
+| `getHeader($name)` | Retrieves a array with the values for a single header | |
+| `getHeaderLine($name)` | Retrieves a comma-separated string of the values for a single header | |
+| `withHeader($name, $value)` | Returns new message instance with given HTTP Header | if the header existed in the original instance, replaces the header value from the original message with the value provided when creating the new instance. |
+| `withAddedHeader($name, $value)` | Returns new message instance with appended value to given header | If header already exists value will be appended, if not a new header will be created |
+| `withoutHeader($name)` | Removes HTTP Header with given name| |
+| `getBody()` | Retrieves the HTTP Message Body | Returns object implementing `StreamInterface`|
+| `withBody(StreamInterface $body)` | Returns new message instance with given HTTP Message Body | |
+
+
+## `Psr\Http\Message\RequestInterface` Methods
+
+Same methods as `Psr\Http\Message\MessageInterface` + the following methods:
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getRequestTarget()` | Retrieves the message's request target | origin-form, absolute-form, authority-form, asterisk-form ([RFC7230](https://www.rfc-editor.org/rfc/rfc7230.txt)) |
+| `withRequestTarget($requestTarget)` | Return a new message instance with the specific request-target | |
+| `getMethod()` | Retrieves the HTTP method of the request. | GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE (defined in [RFC7231](https://tools.ietf.org/html/rfc7231)), PATCH (defined in [RFC5789](https://tools.ietf.org/html/rfc5789)) |
+| `withMethod($method)` | Returns a new message instance with the provided HTTP method | |
+| `getUri()` | Retrieves the URI instance | |
+| `withUri(UriInterface $uri, $preserveHost = false)` | Returns a new message instance with the provided URI | |
+
+
+## `Psr\Http\Message\ServerRequestInterface` Methods
+
+Same methods as `Psr\Http\Message\RequestInterface` + the following methods:
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getServerParams() ` | Retrieve server parameters | Typically derived from `$_SERVER` |
+| `getCookieParams()` | Retrieves cookies sent by the client to the server. | Typically derived from `$_COOKIES` |
+| `withCookieParams(array $cookies)` | Returns a new request instance with the specified cookies | |
+| `withQueryParams(array $query)` | Returns a new request instance with the specified query string arguments | |
+| `getUploadedFiles()` | Retrieve normalized file upload data | |
+| `withUploadedFiles(array $uploadedFiles)` | Returns a new request instance with the specified uploaded files | |
+| `getParsedBody()` | Retrieve any parameters provided in the request body | |
+| `withParsedBody($data)` | Returns a new request instance with the specified body parameters | |
+| `getAttributes()` | Retrieve attributes derived from the request | |
+| `getAttribute($name, $default = null)` | Retrieve a single derived request attribute | |
+| `withAttribute($name, $value)` | Returns a new request instance with the specified derived request attribute | |
+| `withoutAttribute($name)` | Returns a new request instance that without the specified derived request attribute | |
+
+## `Psr\Http\Message\ResponseInterface` Methods:
+
+Same methods as `Psr\Http\Message\MessageInterface` + the following methods:
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getStatusCode()` | Gets the response status code. | |
+| `withStatus($code, $reasonPhrase = '')` | Returns a new response instance with the specified status code and, optionally, reason phrase. | |
+| `getReasonPhrase()` | Gets the response reason phrase associated with the status code. | |
+
+## `Psr\Http\Message\StreamInterface` Methods
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `__toString()` | Reads all data from the stream into a string, from the beginning to end. | |
+| `close()` | Closes the stream and any underlying resources. | |
+| `detach()` | Separates any underlying resources from the stream. | |
+| `getSize()` | Get the size of the stream if known. | |
+| `eof()` | Returns true if the stream is at the end of the stream.| |
+| `isSeekable()` | Returns whether or not the stream is seekable. | |
+| `seek($offset, $whence = SEEK_SET)` | Seek to a position in the stream. | |
+| `rewind()` | Seek to the beginning of the stream. | |
+| `isWritable()` | Returns whether or not the stream is writable. | |
+| `write($string)` | Write data to the stream. | |
+| `isReadable()` | Returns whether or not the stream is readable. | |
+| `read($length)` | Read data from the stream. | |
+| `getContents()` | Returns the remaining contents in a string | |
+| `getMetadata($key = null)()` | Get stream metadata as an associative array or retrieve a specific key. | |
+
+## `Psr\Http\Message\UriInterface` Methods
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getScheme()` | Retrieve the scheme component of the URI. | |
+| `getAuthority()` | Retrieve the authority component of the URI. | |
+| `getUserInfo()` | Retrieve the user information component of the URI. | |
+| `getHost()` | Retrieve the host component of the URI. | |
+| `getPort()` | Retrieve the port component of the URI. | |
+| `getPath()` | Retrieve the path component of the URI. | |
+| `getQuery()` | Retrieve the query string of the URI. | |
+| `getFragment()` | Retrieve the fragment component of the URI. | |
+| `withScheme($scheme)` | Return an instance with the specified scheme. | |
+| `withUserInfo($user, $password = null)` | Return an instance with the specified user information. | |
+| `withHost($host)` | Return an instance with the specified host. | |
+| `withPort($port)` | Return an instance with the specified port. | |
+| `withPath($path)` | Return an instance with the specified path. | |
+| `withQuery($query)` | Return an instance with the specified query string. | |
+| `withFragment($fragment)` | Return an instance with the specified URI fragment. | |
+| `__toString()` | Return the string representation as a URI reference. | |
+
+## `Psr\Http\Message\UploadedFileInterface` Methods
+
+| Method Name | Description | Notes |
+|------------------------------------| ----------- | ----- |
+| `getStream()` | Retrieve a stream representing the uploaded file. | |
+| `moveTo($targetPath)` | Move the uploaded file to a new location. | |
+| `getSize()` | Retrieve the file size. | |
+| `getError()` | Retrieve the error associated with the uploaded file. | |
+| `getClientFilename()` | Retrieve the filename sent by the client. | |
+| `getClientMediaType()` | Retrieve the media type sent by the client. | |
+
+> `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/vendor/psr/http-message/docs/PSR7-Usage.md b/vendor/psr/http-message/docs/PSR7-Usage.md
new file mode 100644
index 000000000..b6d048a34
--- /dev/null
+++ b/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/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php
new file mode 100644
index 000000000..a83c98518
--- /dev/null
+++ b/vendor/psr/http-message/src/MessageInterface.php
@@ -0,0 +1,187 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * HTTP messages consist of requests from a client to a server and responses
+ * from a server to a client. This interface defines the methods common to
+ * each.
+ *
+ * Messages are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ *
+ * @link http://www.ietf.org/rfc/rfc7230.txt
+ * @link http://www.ietf.org/rfc/rfc7231.txt
+ */
+interface MessageInterface
+{
+ /**
+ * Retrieves the HTTP protocol version as a string.
+ *
+ * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
+ *
+ * @return string HTTP protocol version.
+ */
+ public function getProtocolVersion(): string;
+
+ /**
+ * Return an instance with the specified HTTP protocol version.
+ *
+ * The version string MUST contain only the HTTP version number (e.g.,
+ * "1.1", "1.0").
+ *
+ * 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 protocol version.
+ *
+ * @param string $version HTTP protocol version
+ * @return static
+ */
+ public function withProtocolVersion(string $version): MessageInterface;
+
+ /**
+ * Retrieves all message header values.
+ *
+ * The keys represent the header name as it will be sent over the wire, and
+ * each value is an array of strings associated with the header.
+ *
+ * // Represent the headers as a string
+ * foreach ($message->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(): array;
+
+ /**
+ * 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): bool;
+
+ /**
+ * 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): array;
+
+ /**
+ * 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): string;
+
+ /**
+ * 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): MessageInterface;
+
+ /**
+ * 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): MessageInterface;
+
+ /**
+ * 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): MessageInterface;
+
+ /**
+ * Gets the body of the message.
+ *
+ * @return StreamInterface Returns the body as a stream.
+ */
+ public function getBody(): StreamInterface;
+
+ /**
+ * 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): MessageInterface;
+}
diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php
new file mode 100644
index 000000000..33f85e559
--- /dev/null
+++ b/vendor/psr/http-message/src/RequestInterface.php
@@ -0,0 +1,130 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an outgoing, client-side request.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - HTTP method
+ * - URI
+ * - Headers
+ * - Message body
+ *
+ * During construction, implementations MUST attempt to set the Host header from
+ * a provided URI if no Host header is provided.
+ *
+ * Requests are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface RequestInterface extends MessageInterface
+{
+ /**
+ * Retrieves the message's request target.
+ *
+ * Retrieves the message's request-target either as it will appear (for
+ * clients), as it appeared at request (for servers), or as it was
+ * specified for the instance (see withRequestTarget()).
+ *
+ * In most cases, this will be the origin-form of the composed URI,
+ * unless a value was provided to the concrete implementation (see
+ * withRequestTarget() below).
+ *
+ * If no URI is available, and no request-target has been specifically
+ * provided, this method MUST return the string "/".
+ *
+ * @return string
+ */
+ public function getRequestTarget(): string;
+
+ /**
+ * Return an instance with the specific request-target.
+ *
+ * If the request needs a non-origin-form request-target — e.g., for
+ * specifying an absolute-form, authority-form, or asterisk-form —
+ * this method may be used to create an instance with the specified
+ * request-target, verbatim.
+ *
+ * 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
+ * changed request target.
+ *
+ * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
+ * request-target forms allowed in request messages)
+ * @param string $requestTarget
+ * @return static
+ */
+ public function withRequestTarget(string $requestTarget): RequestInterface;
+
+
+ /**
+ * Retrieves the HTTP method of the request.
+ *
+ * @return string Returns the request method.
+ */
+ public function getMethod(): string;
+
+ /**
+ * Return an instance with the provided HTTP method.
+ *
+ * While HTTP method names are typically all uppercase characters, HTTP
+ * method names are case-sensitive and thus implementations SHOULD NOT
+ * modify the given string.
+ *
+ * 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
+ * changed request method.
+ *
+ * @param string $method Case-sensitive method.
+ * @return static
+ * @throws \InvalidArgumentException for invalid HTTP methods.
+ */
+ public function withMethod(string $method): RequestInterface;
+
+ /**
+ * Retrieves the URI instance.
+ *
+ * This method MUST return a UriInterface instance.
+ *
+ * @link http://tools.ietf.org/html/rfc3986#section-4.3
+ * @return UriInterface Returns a UriInterface instance
+ * representing the URI of the request.
+ */
+ public function getUri(): UriInterface;
+
+ /**
+ * Returns an instance with the provided URI.
+ *
+ * This method MUST update the Host header of the returned request by
+ * default if the URI contains a host component. If the URI does not
+ * contain a host component, any pre-existing Host header MUST be carried
+ * over to the returned request.
+ *
+ * You can opt-in to preserving the original state of the Host header by
+ * setting `$preserveHost` to `true`. When `$preserveHost` is set to
+ * `true`, this method interacts with the Host header in the following ways:
+ *
+ * - If the Host header is missing or empty, and the new URI contains
+ * a host component, this method MUST update the Host header in the returned
+ * request.
+ * - If the Host header is missing or empty, and the new URI does not contain a
+ * host component, this method MUST NOT update the Host header in the returned
+ * request.
+ * - If a Host header is present and non-empty, this method MUST NOT update
+ * the Host header in the returned request.
+ *
+ * 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 UriInterface instance.
+ *
+ * @link http://tools.ietf.org/html/rfc3986#section-4.3
+ * @param UriInterface $uri New request URI to use.
+ * @param bool $preserveHost Preserve the original state of the Host header.
+ * @return static
+ */
+ public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface;
+}
diff --git a/vendor/psr/http-message/src/ResponseInterface.php b/vendor/psr/http-message/src/ResponseInterface.php
new file mode 100644
index 000000000..e9299a914
--- /dev/null
+++ b/vendor/psr/http-message/src/ResponseInterface.php
@@ -0,0 +1,68 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an outgoing, server-side response.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - Status code and reason phrase
+ * - Headers
+ * - Message body
+ *
+ * Responses are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface ResponseInterface extends MessageInterface
+{
+ /**
+ * Gets the response status code.
+ *
+ * The status code is a 3-digit integer result code of the server's attempt
+ * to understand and satisfy the request.
+ *
+ * @return int Status code.
+ */
+ public function getStatusCode(): int;
+
+ /**
+ * Return an instance with the specified status code and, optionally, reason phrase.
+ *
+ * If no reason phrase is specified, implementations MAY choose to default
+ * to the RFC 7231 or IANA recommended reason phrase for the response's
+ * status code.
+ *
+ * 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 status and reason phrase.
+ *
+ * @link http://tools.ietf.org/html/rfc7231#section-6
+ * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+ * @param int $code The 3-digit integer result code to set.
+ * @param string $reasonPhrase The reason phrase to use with the
+ * provided status code; if none is provided, implementations MAY
+ * use the defaults as suggested in the HTTP specification.
+ * @return static
+ * @throws \InvalidArgumentException For invalid status code arguments.
+ */
+ public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface;
+
+ /**
+ * Gets the response reason phrase associated with the status code.
+ *
+ * Because a reason phrase is not a required element in a response
+ * status line, the reason phrase value MAY be null. Implementations MAY
+ * choose to return the default RFC 7231 recommended reason phrase (or those
+ * listed in the IANA HTTP Status Code Registry) for the response's
+ * status code.
+ *
+ * @link http://tools.ietf.org/html/rfc7231#section-6
+ * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+ * @return string Reason phrase; must return an empty string if none present.
+ */
+ public function getReasonPhrase(): string;
+}
diff --git a/vendor/psr/http-message/src/ServerRequestInterface.php b/vendor/psr/http-message/src/ServerRequestInterface.php
new file mode 100644
index 000000000..8625d0e10
--- /dev/null
+++ b/vendor/psr/http-message/src/ServerRequestInterface.php
@@ -0,0 +1,261 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Representation of an incoming, server-side HTTP request.
+ *
+ * Per the HTTP specification, this interface includes properties for
+ * each of the following:
+ *
+ * - Protocol version
+ * - HTTP method
+ * - URI
+ * - Headers
+ * - Message body
+ *
+ * Additionally, it encapsulates all data as it has arrived to the
+ * application from the CGI and/or PHP environment, including:
+ *
+ * - The values represented in $_SERVER.
+ * - Any cookies provided (generally via $_COOKIE)
+ * - Query string arguments (generally via $_GET, or as parsed via parse_str())
+ * - Upload files, if any (as represented by $_FILES)
+ * - Deserialized body parameters (generally from $_POST)
+ *
+ * $_SERVER values MUST be treated as immutable, as they represent application
+ * state at the time of request; as such, no methods are provided to allow
+ * modification of those values. The other values provide such methods, as they
+ * can be restored from $_SERVER or the request body, and may need treatment
+ * during the application (e.g., body parameters may be deserialized based on
+ * content type).
+ *
+ * Additionally, this interface recognizes the utility of introspecting a
+ * request to derive and match additional parameters (e.g., via URI path
+ * matching, decrypting cookie values, deserializing non-form-encoded body
+ * content, matching authorization headers to users, etc). These parameters
+ * are stored in an "attributes" property.
+ *
+ * Requests are considered immutable; all methods that might change state MUST
+ * be implemented such that they retain the internal state of the current
+ * message and return an instance that contains the changed state.
+ */
+interface ServerRequestInterface extends RequestInterface
+{
+ /**
+ * Retrieve server parameters.
+ *
+ * Retrieves data related to the incoming request environment,
+ * typically derived from PHP's $_SERVER superglobal. The data IS NOT
+ * REQUIRED to originate from $_SERVER.
+ *
+ * @return array
+ */
+ public function getServerParams(): array;
+
+ /**
+ * Retrieve cookies.
+ *
+ * Retrieves cookies sent by the client to the server.
+ *
+ * The data MUST be compatible with the structure of the $_COOKIE
+ * superglobal.
+ *
+ * @return array
+ */
+ public function getCookieParams(): array;
+
+ /**
+ * Return an instance with the specified cookies.
+ *
+ * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
+ * be compatible with the structure of $_COOKIE. Typically, this data will
+ * be injected at instantiation.
+ *
+ * This method MUST NOT update the related Cookie header of the request
+ * instance, nor related 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 cookie values.
+ *
+ * @param array $cookies Array of key/value pairs representing cookies.
+ * @return static
+ */
+ public function withCookieParams(array $cookies): ServerRequestInterface;
+
+ /**
+ * Retrieve query string arguments.
+ *
+ * Retrieves the deserialized query string arguments, if any.
+ *
+ * Note: the query params might not be in sync with the URI or server
+ * params. If you need to ensure you are only getting the original
+ * values, you may need to parse the query string from `getUri()->getQuery()`
+ * or from the `QUERY_STRING` server param.
+ *
+ * @return array
+ */
+ public function getQueryParams(): array;
+
+ /**
+ * 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): ServerRequestInterface;
+
+ /**
+ * 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(): array;
+
+ /**
+ * 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): ServerRequestInterface;
+
+ /**
+ * 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): ServerRequestInterface;
+
+ /**
+ * 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(): array;
+
+ /**
+ * 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): ServerRequestInterface;
+
+ /**
+ * 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): ServerRequestInterface;
+}
diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php
new file mode 100644
index 000000000..a62aabb82
--- /dev/null
+++ b/vendor/psr/http-message/src/StreamInterface.php
@@ -0,0 +1,158 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Describes a data stream.
+ *
+ * Typically, an instance will wrap a PHP stream; this interface provides
+ * a wrapper around the most common operations, including serialization of
+ * the entire stream to a string.
+ */
+interface StreamInterface
+{
+ /**
+ * Reads all data from the stream into a string, from the beginning to end.
+ *
+ * This method MUST attempt to seek to the beginning of the stream before
+ * reading data and read the stream until the end is reached.
+ *
+ * Warning: This could attempt to load a large amount of data into memory.
+ *
+ * This method MUST NOT raise an exception in order to conform with PHP's
+ * string casting operations.
+ *
+ * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
+ * @return string
+ */
+ public function __toString(): string;
+
+ /**
+ * Closes the stream and any underlying resources.
+ *
+ * @return void
+ */
+ public function close(): void;
+
+ /**
+ * Separates any underlying resources from the stream.
+ *
+ * After the stream has been detached, the stream is in an unusable state.
+ *
+ * @return resource|null Underlying PHP stream, if any
+ */
+ public function detach();
+
+ /**
+ * Get the size of the stream if known.
+ *
+ * @return int|null Returns the size in bytes if known, or null if unknown.
+ */
+ public function getSize(): ?int;
+
+ /**
+ * Returns the current position of the file read/write pointer
+ *
+ * @return int Position of the file pointer
+ * @throws \RuntimeException on error.
+ */
+ public function tell(): int;
+
+ /**
+ * Returns true if the stream is at the end of the stream.
+ *
+ * @return bool
+ */
+ public function eof(): bool;
+
+ /**
+ * Returns whether or not the stream is seekable.
+ *
+ * @return bool
+ */
+ public function isSeekable(): bool;
+
+ /**
+ * Seek to a position in the stream.
+ *
+ * @link http://www.php.net/manual/en/function.fseek.php
+ * @param int $offset Stream offset
+ * @param int $whence Specifies how the cursor position will be calculated
+ * based on the seek offset. Valid values are identical to the built-in
+ * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to
+ * offset bytes SEEK_CUR: Set position to current location plus offset
+ * SEEK_END: Set position to end-of-stream plus offset.
+ * @throws \RuntimeException on failure.
+ */
+ public function seek(int $offset, int $whence = SEEK_SET): void;
+
+ /**
+ * Seek to the beginning of the stream.
+ *
+ * If the stream is not seekable, this method will raise an exception;
+ * otherwise, it will perform a seek(0).
+ *
+ * @see seek()
+ * @link http://www.php.net/manual/en/function.fseek.php
+ * @throws \RuntimeException on failure.
+ */
+ public function rewind(): void;
+
+ /**
+ * Returns whether or not the stream is writable.
+ *
+ * @return bool
+ */
+ public function isWritable(): bool;
+
+ /**
+ * Write data to the stream.
+ *
+ * @param string $string The string that is to be written.
+ * @return int Returns the number of bytes written to the stream.
+ * @throws \RuntimeException on failure.
+ */
+ public function write(string $string): int;
+
+ /**
+ * Returns whether or not the stream is readable.
+ *
+ * @return bool
+ */
+ public function isReadable(): bool;
+
+ /**
+ * Read data from the stream.
+ *
+ * @param int $length Read up to $length bytes from the object and return
+ * them. Fewer than $length bytes may be returned if underlying stream
+ * call returns fewer bytes.
+ * @return string Returns the data read from the stream, or an empty string
+ * if no bytes are available.
+ * @throws \RuntimeException if an error occurs.
+ */
+ public function read(int $length): string;
+
+ /**
+ * Returns the remaining contents in a string
+ *
+ * @return string
+ * @throws \RuntimeException if unable to read or an error occurs while
+ * reading.
+ */
+ public function getContents(): string;
+
+ /**
+ * Get stream metadata as an associative array or retrieve a specific key.
+ *
+ * The keys returned are identical to the keys returned from PHP's
+ * stream_get_meta_data() function.
+ *
+ * @link http://php.net/manual/en/function.stream-get-meta-data.php
+ * @param string|null $key Specific metadata to retrieve.
+ * @return array|mixed|null Returns an associative array if no key is
+ * provided. Returns a specific key value if a key is provided and the
+ * value is found, or null if the key is not found.
+ */
+ public function getMetadata(?string $key = null);
+}
diff --git a/vendor/psr/http-message/src/UploadedFileInterface.php b/vendor/psr/http-message/src/UploadedFileInterface.php
new file mode 100644
index 000000000..dd19d6538
--- /dev/null
+++ b/vendor/psr/http-message/src/UploadedFileInterface.php
@@ -0,0 +1,123 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Value object representing a file uploaded through an HTTP request.
+ *
+ * Instances of this interface are considered immutable; all methods that
+ * might change state MUST be implemented such that they retain the internal
+ * state of the current instance and return an instance that contains the
+ * changed state.
+ */
+interface UploadedFileInterface
+{
+ /**
+ * Retrieve a stream representing the uploaded file.
+ *
+ * This method MUST return a StreamInterface instance, representing the
+ * uploaded file. The purpose of this method is to allow utilizing native PHP
+ * stream functionality to manipulate the file upload, such as
+ * stream_copy_to_stream() (though the result will need to be decorated in a
+ * native PHP stream wrapper to work with such functions).
+ *
+ * If the moveTo() method has been called previously, this method MUST raise
+ * an exception.
+ *
+ * @return StreamInterface Stream representation of the uploaded file.
+ * @throws \RuntimeException in cases when no stream is available or can be
+ * created.
+ */
+ public function getStream(): StreamInterface;
+
+ /**
+ * Move the uploaded file to a new location.
+ *
+ * Use this method as an alternative to move_uploaded_file(). This method is
+ * guaranteed to work in both SAPI and non-SAPI environments.
+ * Implementations must determine which environment they are in, and use the
+ * appropriate method (move_uploaded_file(), rename(), or a stream
+ * operation) to perform the operation.
+ *
+ * $targetPath may be an absolute path, or a relative path. If it is a
+ * relative path, resolution should be the same as used by PHP's rename()
+ * function.
+ *
+ * The original file or stream MUST be removed on completion.
+ *
+ * If this method is called more than once, any subsequent calls MUST raise
+ * an exception.
+ *
+ * When used in an SAPI environment where $_FILES is populated, when writing
+ * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
+ * used to ensure permissions and upload status are verified correctly.
+ *
+ * If you wish to move to a stream, use getStream(), as SAPI operations
+ * cannot guarantee writing to stream destinations.
+ *
+ * @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 \InvalidArgumentException if the $targetPath 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(string $targetPath): void;
+
+ /**
+ * Retrieve the file size.
+ *
+ * Implementations SHOULD return the value stored in the "size" key of
+ * the file in the $_FILES array if available, as PHP calculates this based
+ * on the actual size transmitted.
+ *
+ * @return int|null The file size in bytes or null if unknown.
+ */
+ public function getSize(): ?int;
+
+ /**
+ * Retrieve the error associated with the uploaded file.
+ *
+ * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
+ *
+ * If the file was uploaded successfully, this method MUST return
+ * UPLOAD_ERR_OK.
+ *
+ * Implementations SHOULD return the value stored in the "error" key of
+ * the file in the $_FILES array.
+ *
+ * @see http://php.net/manual/en/features.file-upload.errors.php
+ * @return int One of PHP's UPLOAD_ERR_XXX constants.
+ */
+ public function getError(): int;
+
+ /**
+ * Retrieve the filename sent by the client.
+ *
+ * Do not trust the value returned by this method. A client could send
+ * a malicious filename with the intention to corrupt or hack your
+ * application.
+ *
+ * Implementations SHOULD return the value stored in the "name" key of
+ * the file in the $_FILES array.
+ *
+ * @return string|null The filename sent by the client or null if none
+ * was provided.
+ */
+ public function getClientFilename(): ?string;
+
+ /**
+ * Retrieve the media type sent by the client.
+ *
+ * Do not trust the value returned by this method. A client could send
+ * a malicious media type with the intention to corrupt or hack your
+ * application.
+ *
+ * Implementations SHOULD return the value stored in the "type" key of
+ * the file in the $_FILES array.
+ *
+ * @return string|null The media type sent by the client or null if none
+ * was provided.
+ */
+ public function getClientMediaType(): ?string;
+}
diff --git a/vendor/psr/http-message/src/UriInterface.php b/vendor/psr/http-message/src/UriInterface.php
new file mode 100644
index 000000000..15e2cf286
--- /dev/null
+++ b/vendor/psr/http-message/src/UriInterface.php
@@ -0,0 +1,324 @@
+<?php
+
+namespace Psr\Http\Message;
+
+/**
+ * Value object representing a URI.
+ *
+ * This interface is meant to represent URIs according to RFC 3986 and to
+ * provide methods for most common operations. Additional functionality for
+ * working with URIs can be provided on top of the interface or externally.
+ * Its primary use is for HTTP requests, but may also be used in other
+ * contexts.
+ *
+ * Instances of this interface are considered immutable; all methods that
+ * might change state MUST be implemented such that they retain the internal
+ * state of the current instance and return an instance that contains the
+ * changed state.
+ *
+ * Typically the Host header will be also be present in the request message.
+ * For server-side requests, the scheme will typically be discoverable in the
+ * server parameters.
+ *
+ * @link http://tools.ietf.org/html/rfc3986 (the URI specification)
+ */
+interface UriInterface
+{
+ /**
+ * Retrieve the scheme component of the URI.
+ *
+ * If no scheme is present, this method MUST return an empty string.
+ *
+ * The value returned MUST be normalized to lowercase, per RFC 3986
+ * Section 3.1.
+ *
+ * The trailing ":" character is not part of the scheme and MUST NOT be
+ * added.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.1
+ * @return string The URI scheme.
+ */
+ public function getScheme(): string;
+
+ /**
+ * Retrieve the authority component of the URI.
+ *
+ * If no authority information is present, this method MUST return an empty
+ * string.
+ *
+ * The authority syntax of the URI is:
+ *
+ * <pre>
+ * [user-info@]host[:port]
+ * </pre>
+ *
+ * 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(): string;
+
+ /**
+ * 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(): string;
+
+ /**
+ * 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(): string;
+
+ /**
+ * 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(): ?int;
+
+ /**
+ * 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(): string;
+
+ /**
+ * 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(): string;
+
+ /**
+ * 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(): string;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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): UriInterface;
+
+ /**
+ * 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(): string;
+}
diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE
new file mode 100644
index 000000000..be5540c2a
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Ralph Khattar
+
+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/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md
new file mode 100644
index 000000000..9430d76bb
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/README.md
@@ -0,0 +1,27 @@
+getallheaders
+=============
+
+PHP `getallheaders()` polyfill. Compatible with PHP >= 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/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json
new file mode 100644
index 000000000..de8ce62e4
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "ralouphie/getallheaders",
+ "description": "A polyfill for getallheaders.",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "[email protected]"
+ }
+ ],
+ "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/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php
new file mode 100644
index 000000000..c7285a5ba
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/src/getallheaders.php
@@ -0,0 +1,46 @@
+<?php
+
+if (!function_exists('getallheaders')) {
+
+ /**
+ * Get all HTTP header key/values as an associative array for the current request.
+ *
+ * @return string[string] The HTTP header key/value pairs.
+ */
+ function getallheaders()
+ {
+ $headers = array();
+
+ $copy_server = array(
+ 'CONTENT_TYPE' => '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/vendor/symfony/deprecation-contracts/.gitignore b/vendor/symfony/deprecation-contracts/.gitignore
new file mode 100644
index 000000000..c49a5d8df
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md
new file mode 100644
index 000000000..7932e2613
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/CHANGELOG.md
@@ -0,0 +1,5 @@
+CHANGELOG
+=========
+
+The changelog is maintained for all Symfony contracts at the following URL:
+https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE
new file mode 100644
index 000000000..406242ff2
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2020-2022 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/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md
new file mode 100644
index 000000000..4957933a6
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/README.md
@@ -0,0 +1,26 @@
+Symfony Deprecation Contracts
+=============================
+
+A generic function and convention to trigger deprecation notices.
+
+This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
+
+By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
+the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
+
+The function requires at least 3 arguments:
+ - the name of the Composer package that is triggering the deprecation
+ - the version of the package that introduced the deprecation
+ - the message of the deprecation
+ - more arguments can be provided: they will be inserted in the message using `printf()` formatting
+
+Example:
+```php
+trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
+```
+
+This will generate the following message:
+`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
+
+While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
+`function trigger_deprecation() {}` in your application.
diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json
new file mode 100644
index 000000000..1c1b4ba0e
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "symfony/deprecation-contracts",
+ "type": "library",
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=8.0.2"
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php
new file mode 100644
index 000000000..2d56512ba
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/function.php
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (!function_exists('trigger_deprecation')) {
+ /**
+ * Triggers a silenced deprecation notice.
+ *
+ * @param string $package The name of the Composer package that is triggering the deprecation
+ * @param string $version The version of the package that introduced the deprecation
+ * @param string $message The message of the deprecation
+ * @param mixed ...$args Values to insert in the message using printf() formatting
+ *
+ * @author Nicolas Grekas <[email protected]>
+ */
+ function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
+ {
+ @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
+ }
+}
diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE
new file mode 100644
index 000000000..6e3afce69
--- /dev/null
+++ b/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/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php
new file mode 100644
index 000000000..2e0b96940
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Mbstring.php
@@ -0,0 +1,947 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * 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
+ *
+ * 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 <[email protected]>
+ *
+ * @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($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();
+ }
+
+ try {
+ $validEncoding = @self::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 (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);
+ }
+ }
+
+ 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;
+ }
+}
diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md
new file mode 100644
index 000000000..478b40da2
--- /dev/null
+++ b/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/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
new file mode 100644
index 000000000..512bba0bf
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php
@@ -0,0 +1,119 @@
+<?php
+
+return [
+ 'İ' => 'i̇',
+ 'µ' => 'μ',
+ 'ſ' => 's',
+ 'ͅ' => 'ι',
+ 'ς' => 'σ',
+ 'ϐ' => 'β',
+ 'ϑ' => 'θ',
+ 'ϕ' => 'φ',
+ 'ϖ' => 'π',
+ 'ϰ' => 'κ',
+ 'ϱ' => 'ρ',
+ 'ϵ' => 'ε',
+ 'ẛ' => 'ṡ',
+ 'ι' => 'ι',
+ 'ß' => 'ss',
+ 'ʼn' => 'ʼn',
+ 'ǰ' => 'ǰ',
+ 'ΐ' => 'ΐ',
+ 'ΰ' => 'ΰ',
+ 'և' => 'եւ',
+ 'ẖ' => 'ẖ',
+ 'ẗ' => 'ẗ',
+ 'ẘ' => 'ẘ',
+ 'ẙ' => 'ẙ',
+ 'ẚ' => 'aʾ',
+ 'ẞ' => 'ss',
+ 'ὐ' => 'ὐ',
+ 'ὒ' => 'ὒ',
+ 'ὔ' => 'ὔ',
+ 'ὖ' => 'ὖ',
+ 'ᾀ' => 'ἀι',
+ 'ᾁ' => 'ἁι',
+ 'ᾂ' => 'ἂι',
+ 'ᾃ' => 'ἃι',
+ 'ᾄ' => 'ἄι',
+ 'ᾅ' => 'ἅι',
+ 'ᾆ' => 'ἆι',
+ 'ᾇ' => 'ἇι',
+ 'ᾈ' => 'ἀι',
+ 'ᾉ' => 'ἁι',
+ 'ᾊ' => 'ἂι',
+ 'ᾋ' => 'ἃι',
+ 'ᾌ' => 'ἄι',
+ 'ᾍ' => 'ἅι',
+ 'ᾎ' => 'ἆι',
+ 'ᾏ' => 'ἇι',
+ 'ᾐ' => 'ἠι',
+ 'ᾑ' => 'ἡι',
+ 'ᾒ' => 'ἢι',
+ 'ᾓ' => 'ἣι',
+ 'ᾔ' => 'ἤι',
+ 'ᾕ' => 'ἥι',
+ 'ᾖ' => 'ἦι',
+ 'ᾗ' => 'ἧι',
+ 'ᾘ' => 'ἠι',
+ 'ᾙ' => 'ἡι',
+ 'ᾚ' => 'ἢι',
+ 'ᾛ' => 'ἣι',
+ 'ᾜ' => 'ἤι',
+ 'ᾝ' => 'ἥι',
+ 'ᾞ' => 'ἦι',
+ 'ᾟ' => 'ἧι',
+ 'ᾠ' => 'ὠι',
+ 'ᾡ' => 'ὡι',
+ 'ᾢ' => 'ὢι',
+ 'ᾣ' => 'ὣι',
+ 'ᾤ' => 'ὤι',
+ 'ᾥ' => 'ὥι',
+ 'ᾦ' => 'ὦι',
+ 'ᾧ' => 'ὧι',
+ 'ᾨ' => 'ὠι',
+ 'ᾩ' => 'ὡι',
+ 'ᾪ' => 'ὢι',
+ 'ᾫ' => 'ὣι',
+ 'ᾬ' => 'ὤι',
+ 'ᾭ' => 'ὥι',
+ 'ᾮ' => 'ὦι',
+ 'ᾯ' => 'ὧι',
+ 'ᾲ' => 'ὰι',
+ 'ᾳ' => 'αι',
+ 'ᾴ' => 'άι',
+ 'ᾶ' => 'ᾶ',
+ 'ᾷ' => 'ᾶι',
+ 'ᾼ' => 'αι',
+ 'ῂ' => 'ὴι',
+ 'ῃ' => 'ηι',
+ 'ῄ' => 'ήι',
+ 'ῆ' => 'ῆ',
+ 'ῇ' => 'ῆι',
+ 'ῌ' => 'ηι',
+ 'ῒ' => 'ῒ',
+ 'ῖ' => 'ῖ',
+ 'ῗ' => 'ῗ',
+ 'ῢ' => 'ῢ',
+ 'ῤ' => 'ῤ',
+ 'ῦ' => 'ῦ',
+ 'ῧ' => 'ῧ',
+ 'ῲ' => 'ὼι',
+ 'ῳ' => 'ωι',
+ 'ῴ' => 'ώι',
+ 'ῶ' => 'ῶ',
+ 'ῷ' => 'ῶι',
+ 'ῼ' => 'ωι',
+ 'ff' => 'ff',
+ 'fi' => 'fi',
+ 'fl' => 'fl',
+ 'ffi' => 'ffi',
+ 'ffl' => 'ffl',
+ 'ſt' => 'st',
+ 'st' => 'st',
+ 'ﬓ' => 'մն',
+ 'ﬔ' => 'մե',
+ 'ﬕ' => 'մի',
+ 'ﬖ' => 'վն',
+ 'ﬗ' => 'մխ',
+];
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
new file mode 100644
index 000000000..fac60b081
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
@@ -0,0 +1,1397 @@
+<?php
+
+return array (
+ 'A' => '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̇',
+ 'IJ' => 'ij',
+ 'Ĵ' => 'ĵ',
+ 'Ķ' => 'ķ',
+ 'Ĺ' => 'ĺ',
+ 'Ļ' => 'ļ',
+ 'Ľ' => 'ľ',
+ 'Ŀ' => 'ŀ',
+ 'Ł' => 'ł',
+ 'Ń' => 'ń',
+ 'Ņ' => 'ņ',
+ 'Ň' => 'ň',
+ 'Ŋ' => 'ŋ',
+ 'Ō' => 'ō',
+ 'Ŏ' => 'ŏ',
+ 'Ő' => 'ő',
+ 'Œ' => 'œ',
+ 'Ŕ' => 'ŕ',
+ 'Ŗ' => 'ŗ',
+ 'Ř' => 'ř',
+ 'Ś' => 'ś',
+ 'Ŝ' => 'ŝ',
+ 'Ş' => 'ş',
+ 'Š' => 'š',
+ 'Ţ' => 'ţ',
+ 'Ť' => 'ť',
+ 'Ŧ' => 'ŧ',
+ 'Ũ' => 'ũ',
+ 'Ū' => 'ū',
+ 'Ŭ' => 'ŭ',
+ 'Ů' => 'ů',
+ 'Ű' => 'ű',
+ 'Ų' => 'ų',
+ 'Ŵ' => 'ŵ',
+ 'Ŷ' => 'ŷ',
+ 'Ÿ' => 'ÿ',
+ 'Ź' => 'ź',
+ 'Ż' => 'ż',
+ 'Ž' => 'ž',
+ 'Ɓ' => 'ɓ',
+ 'Ƃ' => 'ƃ',
+ 'Ƅ' => 'ƅ',
+ 'Ɔ' => 'ɔ',
+ 'Ƈ' => 'ƈ',
+ 'Ɖ' => 'ɖ',
+ 'Ɗ' => 'ɗ',
+ 'Ƌ' => 'ƌ',
+ 'Ǝ' => 'ǝ',
+ 'Ə' => 'ə',
+ 'Ɛ' => 'ɛ',
+ 'Ƒ' => 'ƒ',
+ 'Ɠ' => 'ɠ',
+ 'Ɣ' => 'ɣ',
+ 'Ɩ' => 'ɩ',
+ 'Ɨ' => 'ɨ',
+ 'Ƙ' => 'ƙ',
+ 'Ɯ' => 'ɯ',
+ 'Ɲ' => 'ɲ',
+ 'Ɵ' => 'ɵ',
+ 'Ơ' => 'ơ',
+ 'Ƣ' => 'ƣ',
+ 'Ƥ' => 'ƥ',
+ 'Ʀ' => 'ʀ',
+ 'Ƨ' => 'ƨ',
+ 'Ʃ' => 'ʃ',
+ 'Ƭ' => 'ƭ',
+ 'Ʈ' => 'ʈ',
+ 'Ư' => 'ư',
+ 'Ʊ' => 'ʊ',
+ 'Ʋ' => 'ʋ',
+ 'Ƴ' => 'ƴ',
+ 'Ƶ' => 'ƶ',
+ 'Ʒ' => 'ʒ',
+ 'Ƹ' => 'ƹ',
+ 'Ƽ' => 'ƽ',
+ 'DŽ' => 'dž',
+ 'Dž' => 'dž',
+ 'LJ' => 'lj',
+ 'Lj' => 'lj',
+ 'NJ' => 'nj',
+ 'Nj' => 'nj',
+ 'Ǎ' => 'ǎ',
+ 'Ǐ' => 'ǐ',
+ 'Ǒ' => 'ǒ',
+ 'Ǔ' => 'ǔ',
+ 'Ǖ' => 'ǖ',
+ 'Ǘ' => 'ǘ',
+ 'Ǚ' => 'ǚ',
+ 'Ǜ' => 'ǜ',
+ 'Ǟ' => 'ǟ',
+ 'Ǡ' => 'ǡ',
+ 'Ǣ' => 'ǣ',
+ 'Ǥ' => 'ǥ',
+ 'Ǧ' => 'ǧ',
+ 'Ǩ' => 'ǩ',
+ 'Ǫ' => 'ǫ',
+ 'Ǭ' => 'ǭ',
+ 'Ǯ' => 'ǯ',
+ 'DZ' => 'dz',
+ 'Dz' => 'dz',
+ 'Ǵ' => 'ǵ',
+ 'Ƕ' => 'ƕ',
+ 'Ƿ' => 'ƿ',
+ 'Ǹ' => 'ǹ',
+ 'Ǻ' => 'ǻ',
+ 'Ǽ' => 'ǽ',
+ 'Ǿ' => 'ǿ',
+ 'Ȁ' => 'ȁ',
+ 'Ȃ' => 'ȃ',
+ 'Ȅ' => 'ȅ',
+ 'Ȇ' => 'ȇ',
+ 'Ȉ' => 'ȉ',
+ 'Ȋ' => 'ȋ',
+ 'Ȍ' => 'ȍ',
+ 'Ȏ' => 'ȏ',
+ 'Ȑ' => 'ȑ',
+ 'Ȓ' => 'ȓ',
+ 'Ȕ' => 'ȕ',
+ 'Ȗ' => 'ȗ',
+ 'Ș' => 'ș',
+ 'Ț' => 'ț',
+ 'Ȝ' => 'ȝ',
+ 'Ȟ' => 'ȟ',
+ 'Ƞ' => 'ƞ',
+ 'Ȣ' => 'ȣ',
+ 'Ȥ' => 'ȥ',
+ 'Ȧ' => 'ȧ',
+ 'Ȩ' => 'ȩ',
+ 'Ȫ' => 'ȫ',
+ 'Ȭ' => 'ȭ',
+ 'Ȯ' => 'ȯ',
+ 'Ȱ' => 'ȱ',
+ 'Ȳ' => 'ȳ',
+ 'Ⱥ' => 'ⱥ',
+ 'Ȼ' => 'ȼ',
+ 'Ƚ' => 'ƚ',
+ 'Ⱦ' => 'ⱦ',
+ 'Ɂ' => 'ɂ',
+ 'Ƀ' => 'ƀ',
+ 'Ʉ' => 'ʉ',
+ 'Ʌ' => 'ʌ',
+ 'Ɇ' => 'ɇ',
+ 'Ɉ' => 'ɉ',
+ 'Ɋ' => 'ɋ',
+ 'Ɍ' => 'ɍ',
+ 'Ɏ' => 'ɏ',
+ 'Ͱ' => 'ͱ',
+ 'Ͳ' => 'ͳ',
+ 'Ͷ' => 'ͷ',
+ 'Ϳ' => 'ϳ',
+ 'Ά' => 'ά',
+ 'Έ' => 'έ',
+ 'Ή' => 'ή',
+ 'Ί' => 'ί',
+ 'Ό' => 'ό',
+ 'Ύ' => 'ύ',
+ 'Ώ' => 'ώ',
+ 'Α' => 'α',
+ 'Β' => 'β',
+ 'Γ' => 'γ',
+ 'Δ' => 'δ',
+ 'Ε' => 'ε',
+ 'Ζ' => 'ζ',
+ 'Η' => 'η',
+ 'Θ' => 'θ',
+ 'Ι' => 'ι',
+ 'Κ' => 'κ',
+ 'Λ' => 'λ',
+ 'Μ' => 'μ',
+ 'Ν' => 'ν',
+ 'Ξ' => 'ξ',
+ 'Ο' => 'ο',
+ 'Π' => 'π',
+ 'Ρ' => 'ρ',
+ 'Σ' => 'σ',
+ 'Τ' => 'τ',
+ 'Υ' => 'υ',
+ 'Φ' => 'φ',
+ 'Χ' => 'χ',
+ 'Ψ' => 'ψ',
+ 'Ω' => 'ω',
+ 'Ϊ' => 'ϊ',
+ 'Ϋ' => 'ϋ',
+ 'Ϗ' => 'ϗ',
+ 'Ϙ' => 'ϙ',
+ 'Ϛ' => 'ϛ',
+ 'Ϝ' => 'ϝ',
+ 'Ϟ' => 'ϟ',
+ 'Ϡ' => 'ϡ',
+ 'Ϣ' => 'ϣ',
+ 'Ϥ' => 'ϥ',
+ 'Ϧ' => 'ϧ',
+ 'Ϩ' => 'ϩ',
+ 'Ϫ' => 'ϫ',
+ 'Ϭ' => 'ϭ',
+ 'Ϯ' => 'ϯ',
+ 'ϴ' => 'θ',
+ 'Ϸ' => 'ϸ',
+ 'Ϲ' => 'ϲ',
+ 'Ϻ' => 'ϻ',
+ 'Ͻ' => 'ͻ',
+ 'Ͼ' => 'ͼ',
+ 'Ͽ' => 'ͽ',
+ 'Ѐ' => 'ѐ',
+ 'Ё' => 'ё',
+ 'Ђ' => 'ђ',
+ 'Ѓ' => 'ѓ',
+ 'Є' => 'є',
+ 'Ѕ' => 'ѕ',
+ 'І' => 'і',
+ 'Ї' => 'ї',
+ 'Ј' => 'ј',
+ 'Љ' => 'љ',
+ 'Њ' => 'њ',
+ 'Ћ' => 'ћ',
+ 'Ќ' => 'ќ',
+ 'Ѝ' => 'ѝ',
+ 'Ў' => 'ў',
+ 'Џ' => 'џ',
+ 'А' => 'а',
+ 'Б' => 'б',
+ 'В' => 'в',
+ 'Г' => 'г',
+ 'Д' => 'д',
+ 'Е' => 'е',
+ 'Ж' => 'ж',
+ 'З' => 'з',
+ 'И' => 'и',
+ 'Й' => 'й',
+ 'К' => 'к',
+ 'Л' => 'л',
+ 'М' => 'м',
+ 'Н' => 'н',
+ 'О' => 'о',
+ 'П' => 'п',
+ 'Р' => 'р',
+ 'С' => 'с',
+ 'Т' => 'т',
+ 'У' => 'у',
+ 'Ф' => 'ф',
+ 'Х' => 'х',
+ 'Ц' => 'ц',
+ 'Ч' => 'ч',
+ 'Ш' => 'ш',
+ 'Щ' => 'щ',
+ 'Ъ' => 'ъ',
+ 'Ы' => 'ы',
+ 'Ь' => 'ь',
+ 'Э' => 'э',
+ 'Ю' => 'ю',
+ 'Я' => 'я',
+ 'Ѡ' => 'ѡ',
+ 'Ѣ' => 'ѣ',
+ 'Ѥ' => 'ѥ',
+ 'Ѧ' => 'ѧ',
+ 'Ѩ' => 'ѩ',
+ 'Ѫ' => 'ѫ',
+ 'Ѭ' => 'ѭ',
+ 'Ѯ' => 'ѯ',
+ 'Ѱ' => 'ѱ',
+ 'Ѳ' => 'ѳ',
+ 'Ѵ' => 'ѵ',
+ 'Ѷ' => 'ѷ',
+ 'Ѹ' => 'ѹ',
+ 'Ѻ' => 'ѻ',
+ 'Ѽ' => 'ѽ',
+ 'Ѿ' => 'ѿ',
+ 'Ҁ' => 'ҁ',
+ 'Ҋ' => 'ҋ',
+ 'Ҍ' => 'ҍ',
+ 'Ҏ' => 'ҏ',
+ 'Ґ' => 'ґ',
+ 'Ғ' => 'ғ',
+ 'Ҕ' => 'ҕ',
+ 'Җ' => 'җ',
+ 'Ҙ' => 'ҙ',
+ 'Қ' => 'қ',
+ 'Ҝ' => 'ҝ',
+ 'Ҟ' => 'ҟ',
+ 'Ҡ' => 'ҡ',
+ 'Ң' => 'ң',
+ 'Ҥ' => 'ҥ',
+ 'Ҧ' => 'ҧ',
+ 'Ҩ' => 'ҩ',
+ 'Ҫ' => 'ҫ',
+ 'Ҭ' => 'ҭ',
+ 'Ү' => 'ү',
+ 'Ұ' => 'ұ',
+ 'Ҳ' => 'ҳ',
+ 'Ҵ' => 'ҵ',
+ 'Ҷ' => 'ҷ',
+ 'Ҹ' => 'ҹ',
+ 'Һ' => 'һ',
+ 'Ҽ' => 'ҽ',
+ 'Ҿ' => 'ҿ',
+ 'Ӏ' => 'ӏ',
+ 'Ӂ' => 'ӂ',
+ 'Ӄ' => 'ӄ',
+ 'Ӆ' => 'ӆ',
+ 'Ӈ' => 'ӈ',
+ 'Ӊ' => 'ӊ',
+ 'Ӌ' => 'ӌ',
+ 'Ӎ' => 'ӎ',
+ 'Ӑ' => 'ӑ',
+ 'Ӓ' => 'ӓ',
+ 'Ӕ' => 'ӕ',
+ 'Ӗ' => 'ӗ',
+ 'Ә' => 'ә',
+ 'Ӛ' => 'ӛ',
+ 'Ӝ' => 'ӝ',
+ 'Ӟ' => 'ӟ',
+ 'Ӡ' => 'ӡ',
+ 'Ӣ' => 'ӣ',
+ 'Ӥ' => 'ӥ',
+ 'Ӧ' => 'ӧ',
+ 'Ө' => 'ө',
+ 'Ӫ' => 'ӫ',
+ 'Ӭ' => 'ӭ',
+ 'Ӯ' => 'ӯ',
+ 'Ӱ' => 'ӱ',
+ 'Ӳ' => 'ӳ',
+ 'Ӵ' => 'ӵ',
+ 'Ӷ' => 'ӷ',
+ 'Ӹ' => 'ӹ',
+ 'Ӻ' => 'ӻ',
+ 'Ӽ' => 'ӽ',
+ 'Ӿ' => 'ӿ',
+ 'Ԁ' => 'ԁ',
+ 'Ԃ' => 'ԃ',
+ 'Ԅ' => 'ԅ',
+ 'Ԇ' => 'ԇ',
+ 'Ԉ' => 'ԉ',
+ 'Ԋ' => 'ԋ',
+ 'Ԍ' => 'ԍ',
+ 'Ԏ' => 'ԏ',
+ 'Ԑ' => 'ԑ',
+ 'Ԓ' => 'ԓ',
+ 'Ԕ' => 'ԕ',
+ 'Ԗ' => 'ԗ',
+ 'Ԙ' => 'ԙ',
+ 'Ԛ' => 'ԛ',
+ 'Ԝ' => 'ԝ',
+ 'Ԟ' => 'ԟ',
+ 'Ԡ' => 'ԡ',
+ 'Ԣ' => 'ԣ',
+ 'Ԥ' => 'ԥ',
+ 'Ԧ' => 'ԧ',
+ 'Ԩ' => 'ԩ',
+ 'Ԫ' => 'ԫ',
+ 'Ԭ' => 'ԭ',
+ 'Ԯ' => 'ԯ',
+ 'Ա' => 'ա',
+ 'Բ' => 'բ',
+ 'Գ' => 'գ',
+ 'Դ' => 'դ',
+ 'Ե' => 'ե',
+ 'Զ' => 'զ',
+ 'Է' => 'է',
+ 'Ը' => 'ը',
+ 'Թ' => 'թ',
+ 'Ժ' => 'ժ',
+ 'Ի' => 'ի',
+ 'Լ' => 'լ',
+ 'Խ' => 'խ',
+ 'Ծ' => 'ծ',
+ 'Կ' => 'կ',
+ 'Հ' => 'հ',
+ 'Ձ' => 'ձ',
+ 'Ղ' => 'ղ',
+ 'Ճ' => 'ճ',
+ 'Մ' => 'մ',
+ 'Յ' => 'յ',
+ 'Ն' => 'ն',
+ 'Շ' => 'շ',
+ 'Ո' => 'ո',
+ 'Չ' => 'չ',
+ 'Պ' => 'պ',
+ 'Ջ' => 'ջ',
+ 'Ռ' => 'ռ',
+ 'Ս' => 'ս',
+ 'Վ' => 'վ',
+ 'Տ' => 'տ',
+ 'Ր' => 'ր',
+ 'Ց' => 'ց',
+ 'Ւ' => 'ւ',
+ 'Փ' => 'փ',
+ 'Ք' => 'ք',
+ 'Օ' => 'օ',
+ 'Ֆ' => 'ֆ',
+ 'Ⴀ' => 'ⴀ',
+ 'Ⴁ' => 'ⴁ',
+ 'Ⴂ' => 'ⴂ',
+ 'Ⴃ' => 'ⴃ',
+ 'Ⴄ' => 'ⴄ',
+ 'Ⴅ' => 'ⴅ',
+ 'Ⴆ' => 'ⴆ',
+ 'Ⴇ' => 'ⴇ',
+ 'Ⴈ' => 'ⴈ',
+ 'Ⴉ' => 'ⴉ',
+ 'Ⴊ' => 'ⴊ',
+ 'Ⴋ' => 'ⴋ',
+ 'Ⴌ' => 'ⴌ',
+ 'Ⴍ' => 'ⴍ',
+ 'Ⴎ' => 'ⴎ',
+ 'Ⴏ' => 'ⴏ',
+ 'Ⴐ' => 'ⴐ',
+ 'Ⴑ' => 'ⴑ',
+ 'Ⴒ' => 'ⴒ',
+ 'Ⴓ' => 'ⴓ',
+ 'Ⴔ' => 'ⴔ',
+ 'Ⴕ' => 'ⴕ',
+ 'Ⴖ' => 'ⴖ',
+ 'Ⴗ' => 'ⴗ',
+ 'Ⴘ' => 'ⴘ',
+ 'Ⴙ' => 'ⴙ',
+ 'Ⴚ' => 'ⴚ',
+ 'Ⴛ' => 'ⴛ',
+ 'Ⴜ' => 'ⴜ',
+ 'Ⴝ' => 'ⴝ',
+ 'Ⴞ' => 'ⴞ',
+ 'Ⴟ' => 'ⴟ',
+ 'Ⴠ' => 'ⴠ',
+ 'Ⴡ' => 'ⴡ',
+ 'Ⴢ' => 'ⴢ',
+ 'Ⴣ' => 'ⴣ',
+ 'Ⴤ' => 'ⴤ',
+ 'Ⴥ' => 'ⴥ',
+ 'Ⴧ' => 'ⴧ',
+ 'Ⴭ' => 'ⴭ',
+ 'Ꭰ' => 'ꭰ',
+ 'Ꭱ' => 'ꭱ',
+ 'Ꭲ' => 'ꭲ',
+ 'Ꭳ' => 'ꭳ',
+ 'Ꭴ' => 'ꭴ',
+ 'Ꭵ' => 'ꭵ',
+ 'Ꭶ' => 'ꭶ',
+ 'Ꭷ' => 'ꭷ',
+ 'Ꭸ' => 'ꭸ',
+ 'Ꭹ' => 'ꭹ',
+ 'Ꭺ' => 'ꭺ',
+ 'Ꭻ' => 'ꭻ',
+ 'Ꭼ' => 'ꭼ',
+ 'Ꭽ' => 'ꭽ',
+ 'Ꭾ' => 'ꭾ',
+ 'Ꭿ' => 'ꭿ',
+ 'Ꮀ' => 'ꮀ',
+ 'Ꮁ' => 'ꮁ',
+ 'Ꮂ' => 'ꮂ',
+ 'Ꮃ' => 'ꮃ',
+ 'Ꮄ' => 'ꮄ',
+ 'Ꮅ' => 'ꮅ',
+ 'Ꮆ' => 'ꮆ',
+ 'Ꮇ' => 'ꮇ',
+ 'Ꮈ' => 'ꮈ',
+ 'Ꮉ' => 'ꮉ',
+ 'Ꮊ' => 'ꮊ',
+ 'Ꮋ' => 'ꮋ',
+ 'Ꮌ' => 'ꮌ',
+ 'Ꮍ' => 'ꮍ',
+ 'Ꮎ' => 'ꮎ',
+ 'Ꮏ' => 'ꮏ',
+ 'Ꮐ' => 'ꮐ',
+ 'Ꮑ' => 'ꮑ',
+ 'Ꮒ' => 'ꮒ',
+ 'Ꮓ' => 'ꮓ',
+ 'Ꮔ' => 'ꮔ',
+ 'Ꮕ' => 'ꮕ',
+ 'Ꮖ' => 'ꮖ',
+ 'Ꮗ' => 'ꮗ',
+ 'Ꮘ' => 'ꮘ',
+ 'Ꮙ' => 'ꮙ',
+ 'Ꮚ' => 'ꮚ',
+ 'Ꮛ' => 'ꮛ',
+ 'Ꮜ' => 'ꮜ',
+ 'Ꮝ' => 'ꮝ',
+ 'Ꮞ' => 'ꮞ',
+ 'Ꮟ' => 'ꮟ',
+ 'Ꮠ' => 'ꮠ',
+ 'Ꮡ' => 'ꮡ',
+ 'Ꮢ' => 'ꮢ',
+ 'Ꮣ' => 'ꮣ',
+ 'Ꮤ' => 'ꮤ',
+ 'Ꮥ' => 'ꮥ',
+ 'Ꮦ' => 'ꮦ',
+ 'Ꮧ' => 'ꮧ',
+ 'Ꮨ' => 'ꮨ',
+ 'Ꮩ' => 'ꮩ',
+ 'Ꮪ' => 'ꮪ',
+ 'Ꮫ' => 'ꮫ',
+ 'Ꮬ' => 'ꮬ',
+ 'Ꮭ' => 'ꮭ',
+ 'Ꮮ' => 'ꮮ',
+ 'Ꮯ' => 'ꮯ',
+ 'Ꮰ' => 'ꮰ',
+ 'Ꮱ' => 'ꮱ',
+ 'Ꮲ' => 'ꮲ',
+ 'Ꮳ' => 'ꮳ',
+ 'Ꮴ' => 'ꮴ',
+ 'Ꮵ' => 'ꮵ',
+ 'Ꮶ' => 'ꮶ',
+ 'Ꮷ' => 'ꮷ',
+ 'Ꮸ' => 'ꮸ',
+ 'Ꮹ' => 'ꮹ',
+ 'Ꮺ' => 'ꮺ',
+ 'Ꮻ' => 'ꮻ',
+ 'Ꮼ' => 'ꮼ',
+ 'Ꮽ' => 'ꮽ',
+ 'Ꮾ' => 'ꮾ',
+ 'Ꮿ' => 'ꮿ',
+ 'Ᏸ' => 'ᏸ',
+ 'Ᏹ' => 'ᏹ',
+ 'Ᏺ' => 'ᏺ',
+ 'Ᏻ' => 'ᏻ',
+ 'Ᏼ' => 'ᏼ',
+ 'Ᏽ' => 'ᏽ',
+ 'Ა' => 'ა',
+ 'Ბ' => 'ბ',
+ 'Გ' => 'გ',
+ 'Დ' => 'დ',
+ 'Ე' => 'ე',
+ 'Ვ' => 'ვ',
+ 'Ზ' => 'ზ',
+ 'Თ' => 'თ',
+ 'Ი' => 'ი',
+ 'Კ' => 'კ',
+ 'Ლ' => 'ლ',
+ 'Მ' => 'მ',
+ 'Ნ' => 'ნ',
+ 'Ო' => 'ო',
+ 'Პ' => 'პ',
+ 'Ჟ' => 'ჟ',
+ 'Რ' => 'რ',
+ 'Ს' => 'ს',
+ 'Ტ' => 'ტ',
+ 'Უ' => 'უ',
+ 'Ფ' => 'ფ',
+ 'Ქ' => 'ქ',
+ 'Ღ' => 'ღ',
+ 'Ყ' => 'ყ',
+ 'Შ' => 'შ',
+ 'Ჩ' => 'ჩ',
+ 'Ც' => 'ც',
+ 'Ძ' => 'ძ',
+ 'Წ' => 'წ',
+ 'Ჭ' => 'ჭ',
+ 'Ხ' => 'ხ',
+ 'Ჯ' => 'ჯ',
+ 'Ჰ' => 'ჰ',
+ 'Ჱ' => 'ჱ',
+ 'Ჲ' => 'ჲ',
+ 'Ჳ' => 'ჳ',
+ 'Ჴ' => 'ჴ',
+ 'Ჵ' => 'ჵ',
+ 'Ჶ' => 'ჶ',
+ 'Ჷ' => 'ჷ',
+ 'Ჸ' => 'ჸ',
+ 'Ჹ' => 'ჹ',
+ 'Ჺ' => 'ჺ',
+ 'Ჽ' => 'ჽ',
+ 'Ჾ' => 'ჾ',
+ 'Ჿ' => 'ჿ',
+ 'Ḁ' => 'ḁ',
+ 'Ḃ' => 'ḃ',
+ 'Ḅ' => 'ḅ',
+ 'Ḇ' => 'ḇ',
+ 'Ḉ' => 'ḉ',
+ 'Ḋ' => 'ḋ',
+ 'Ḍ' => 'ḍ',
+ 'Ḏ' => 'ḏ',
+ 'Ḑ' => 'ḑ',
+ 'Ḓ' => 'ḓ',
+ 'Ḕ' => 'ḕ',
+ 'Ḗ' => 'ḗ',
+ 'Ḙ' => 'ḙ',
+ 'Ḛ' => 'ḛ',
+ 'Ḝ' => 'ḝ',
+ 'Ḟ' => 'ḟ',
+ 'Ḡ' => 'ḡ',
+ 'Ḣ' => 'ḣ',
+ 'Ḥ' => 'ḥ',
+ 'Ḧ' => 'ḧ',
+ 'Ḩ' => 'ḩ',
+ 'Ḫ' => 'ḫ',
+ 'Ḭ' => 'ḭ',
+ 'Ḯ' => 'ḯ',
+ 'Ḱ' => 'ḱ',
+ 'Ḳ' => 'ḳ',
+ 'Ḵ' => 'ḵ',
+ 'Ḷ' => 'ḷ',
+ 'Ḹ' => 'ḹ',
+ 'Ḻ' => 'ḻ',
+ 'Ḽ' => 'ḽ',
+ 'Ḿ' => 'ḿ',
+ 'Ṁ' => 'ṁ',
+ 'Ṃ' => 'ṃ',
+ 'Ṅ' => 'ṅ',
+ 'Ṇ' => 'ṇ',
+ 'Ṉ' => 'ṉ',
+ 'Ṋ' => 'ṋ',
+ 'Ṍ' => 'ṍ',
+ 'Ṏ' => 'ṏ',
+ 'Ṑ' => 'ṑ',
+ 'Ṓ' => 'ṓ',
+ 'Ṕ' => 'ṕ',
+ 'Ṗ' => 'ṗ',
+ 'Ṙ' => 'ṙ',
+ 'Ṛ' => 'ṛ',
+ 'Ṝ' => 'ṝ',
+ 'Ṟ' => 'ṟ',
+ 'Ṡ' => 'ṡ',
+ 'Ṣ' => 'ṣ',
+ 'Ṥ' => 'ṥ',
+ 'Ṧ' => 'ṧ',
+ 'Ṩ' => 'ṩ',
+ 'Ṫ' => 'ṫ',
+ 'Ṭ' => 'ṭ',
+ 'Ṯ' => 'ṯ',
+ 'Ṱ' => 'ṱ',
+ 'Ṳ' => 'ṳ',
+ 'Ṵ' => 'ṵ',
+ 'Ṷ' => 'ṷ',
+ 'Ṹ' => 'ṹ',
+ 'Ṻ' => 'ṻ',
+ 'Ṽ' => 'ṽ',
+ 'Ṿ' => 'ṿ',
+ 'Ẁ' => 'ẁ',
+ 'Ẃ' => 'ẃ',
+ 'Ẅ' => 'ẅ',
+ 'Ẇ' => 'ẇ',
+ 'Ẉ' => 'ẉ',
+ 'Ẋ' => 'ẋ',
+ 'Ẍ' => 'ẍ',
+ 'Ẏ' => 'ẏ',
+ 'Ẑ' => 'ẑ',
+ 'Ẓ' => 'ẓ',
+ 'Ẕ' => 'ẕ',
+ 'ẞ' => 'ß',
+ 'Ạ' => 'ạ',
+ 'Ả' => 'ả',
+ 'Ấ' => 'ấ',
+ 'Ầ' => 'ầ',
+ 'Ẩ' => 'ẩ',
+ 'Ẫ' => 'ẫ',
+ 'Ậ' => 'ậ',
+ 'Ắ' => 'ắ',
+ 'Ằ' => 'ằ',
+ 'Ẳ' => 'ẳ',
+ 'Ẵ' => 'ẵ',
+ 'Ặ' => 'ặ',
+ 'Ẹ' => 'ẹ',
+ 'Ẻ' => 'ẻ',
+ 'Ẽ' => 'ẽ',
+ 'Ế' => 'ế',
+ 'Ề' => 'ề',
+ 'Ể' => 'ể',
+ 'Ễ' => 'ễ',
+ 'Ệ' => 'ệ',
+ 'Ỉ' => 'ỉ',
+ 'Ị' => 'ị',
+ 'Ọ' => 'ọ',
+ 'Ỏ' => 'ỏ',
+ 'Ố' => 'ố',
+ 'Ồ' => 'ồ',
+ 'Ổ' => 'ổ',
+ 'Ỗ' => 'ỗ',
+ 'Ộ' => 'ộ',
+ 'Ớ' => 'ớ',
+ 'Ờ' => 'ờ',
+ 'Ở' => 'ở',
+ 'Ỡ' => 'ỡ',
+ 'Ợ' => 'ợ',
+ 'Ụ' => 'ụ',
+ 'Ủ' => 'ủ',
+ 'Ứ' => 'ứ',
+ 'Ừ' => 'ừ',
+ 'Ử' => 'ử',
+ 'Ữ' => 'ữ',
+ 'Ự' => 'ự',
+ 'Ỳ' => 'ỳ',
+ 'Ỵ' => 'ỵ',
+ 'Ỷ' => 'ỷ',
+ 'Ỹ' => 'ỹ',
+ 'Ỻ' => 'ỻ',
+ 'Ỽ' => 'ỽ',
+ 'Ỿ' => 'ỿ',
+ 'Ἀ' => 'ἀ',
+ 'Ἁ' => 'ἁ',
+ 'Ἂ' => 'ἂ',
+ 'Ἃ' => 'ἃ',
+ 'Ἄ' => 'ἄ',
+ 'Ἅ' => 'ἅ',
+ 'Ἆ' => 'ἆ',
+ 'Ἇ' => 'ἇ',
+ 'Ἐ' => 'ἐ',
+ 'Ἑ' => 'ἑ',
+ 'Ἒ' => 'ἒ',
+ 'Ἓ' => 'ἓ',
+ 'Ἔ' => 'ἔ',
+ 'Ἕ' => 'ἕ',
+ 'Ἠ' => 'ἠ',
+ 'Ἡ' => 'ἡ',
+ 'Ἢ' => 'ἢ',
+ 'Ἣ' => 'ἣ',
+ 'Ἤ' => 'ἤ',
+ 'Ἥ' => 'ἥ',
+ 'Ἦ' => 'ἦ',
+ 'Ἧ' => 'ἧ',
+ 'Ἰ' => 'ἰ',
+ 'Ἱ' => 'ἱ',
+ 'Ἲ' => 'ἲ',
+ 'Ἳ' => 'ἳ',
+ 'Ἴ' => 'ἴ',
+ 'Ἵ' => 'ἵ',
+ 'Ἶ' => 'ἶ',
+ 'Ἷ' => 'ἷ',
+ 'Ὀ' => 'ὀ',
+ 'Ὁ' => 'ὁ',
+ 'Ὂ' => 'ὂ',
+ 'Ὃ' => 'ὃ',
+ 'Ὄ' => 'ὄ',
+ 'Ὅ' => 'ὅ',
+ 'Ὑ' => 'ὑ',
+ 'Ὓ' => 'ὓ',
+ 'Ὕ' => 'ὕ',
+ 'Ὗ' => 'ὗ',
+ 'Ὠ' => 'ὠ',
+ 'Ὡ' => 'ὡ',
+ 'Ὢ' => 'ὢ',
+ 'Ὣ' => 'ὣ',
+ 'Ὤ' => 'ὤ',
+ 'Ὥ' => 'ὥ',
+ 'Ὦ' => 'ὦ',
+ 'Ὧ' => 'ὧ',
+ 'ᾈ' => 'ᾀ',
+ 'ᾉ' => 'ᾁ',
+ 'ᾊ' => 'ᾂ',
+ 'ᾋ' => 'ᾃ',
+ 'ᾌ' => 'ᾄ',
+ 'ᾍ' => 'ᾅ',
+ 'ᾎ' => 'ᾆ',
+ 'ᾏ' => 'ᾇ',
+ 'ᾘ' => 'ᾐ',
+ 'ᾙ' => 'ᾑ',
+ 'ᾚ' => 'ᾒ',
+ 'ᾛ' => 'ᾓ',
+ 'ᾜ' => 'ᾔ',
+ 'ᾝ' => 'ᾕ',
+ 'ᾞ' => 'ᾖ',
+ 'ᾟ' => 'ᾗ',
+ 'ᾨ' => 'ᾠ',
+ 'ᾩ' => 'ᾡ',
+ 'ᾪ' => 'ᾢ',
+ 'ᾫ' => 'ᾣ',
+ 'ᾬ' => 'ᾤ',
+ 'ᾭ' => 'ᾥ',
+ 'ᾮ' => 'ᾦ',
+ 'ᾯ' => 'ᾧ',
+ 'Ᾰ' => 'ᾰ',
+ 'Ᾱ' => 'ᾱ',
+ 'Ὰ' => 'ὰ',
+ 'Ά' => 'ά',
+ 'ᾼ' => 'ᾳ',
+ 'Ὲ' => 'ὲ',
+ 'Έ' => 'έ',
+ 'Ὴ' => 'ὴ',
+ 'Ή' => 'ή',
+ 'ῌ' => 'ῃ',
+ 'Ῐ' => 'ῐ',
+ 'Ῑ' => 'ῑ',
+ 'Ὶ' => 'ὶ',
+ 'Ί' => 'ί',
+ 'Ῠ' => 'ῠ',
+ 'Ῡ' => 'ῡ',
+ 'Ὺ' => 'ὺ',
+ 'Ύ' => 'ύ',
+ 'Ῥ' => 'ῥ',
+ 'Ὸ' => 'ὸ',
+ 'Ό' => 'ό',
+ 'Ὼ' => 'ὼ',
+ 'Ώ' => 'ώ',
+ 'ῼ' => 'ῳ',
+ 'Ω' => 'ω',
+ 'K' => 'k',
+ 'Å' => 'å',
+ 'Ⅎ' => 'ⅎ',
+ 'Ⅰ' => 'ⅰ',
+ 'Ⅱ' => 'ⅱ',
+ 'Ⅲ' => 'ⅲ',
+ 'Ⅳ' => 'ⅳ',
+ 'Ⅴ' => 'ⅴ',
+ 'Ⅵ' => 'ⅵ',
+ 'Ⅶ' => 'ⅶ',
+ 'Ⅷ' => 'ⅷ',
+ 'Ⅸ' => 'ⅸ',
+ 'Ⅹ' => 'ⅹ',
+ 'Ⅺ' => 'ⅺ',
+ 'Ⅻ' => 'ⅻ',
+ 'Ⅼ' => 'ⅼ',
+ 'Ⅽ' => 'ⅽ',
+ 'Ⅾ' => 'ⅾ',
+ 'Ⅿ' => 'ⅿ',
+ 'Ↄ' => 'ↄ',
+ 'Ⓐ' => 'ⓐ',
+ 'Ⓑ' => 'ⓑ',
+ 'Ⓒ' => 'ⓒ',
+ 'Ⓓ' => 'ⓓ',
+ 'Ⓔ' => 'ⓔ',
+ 'Ⓕ' => 'ⓕ',
+ 'Ⓖ' => 'ⓖ',
+ 'Ⓗ' => 'ⓗ',
+ 'Ⓘ' => 'ⓘ',
+ 'Ⓙ' => 'ⓙ',
+ 'Ⓚ' => 'ⓚ',
+ 'Ⓛ' => 'ⓛ',
+ 'Ⓜ' => 'ⓜ',
+ 'Ⓝ' => 'ⓝ',
+ 'Ⓞ' => 'ⓞ',
+ 'Ⓟ' => 'ⓟ',
+ 'Ⓠ' => 'ⓠ',
+ 'Ⓡ' => 'ⓡ',
+ 'Ⓢ' => 'ⓢ',
+ 'Ⓣ' => 'ⓣ',
+ 'Ⓤ' => 'ⓤ',
+ 'Ⓥ' => 'ⓥ',
+ 'Ⓦ' => 'ⓦ',
+ 'Ⓧ' => 'ⓧ',
+ 'Ⓨ' => 'ⓨ',
+ 'Ⓩ' => 'ⓩ',
+ 'Ⰰ' => 'ⰰ',
+ 'Ⰱ' => 'ⰱ',
+ 'Ⰲ' => 'ⰲ',
+ 'Ⰳ' => 'ⰳ',
+ 'Ⰴ' => 'ⰴ',
+ 'Ⰵ' => 'ⰵ',
+ 'Ⰶ' => 'ⰶ',
+ 'Ⰷ' => 'ⰷ',
+ 'Ⰸ' => 'ⰸ',
+ 'Ⰹ' => 'ⰹ',
+ 'Ⰺ' => 'ⰺ',
+ 'Ⰻ' => 'ⰻ',
+ 'Ⰼ' => 'ⰼ',
+ 'Ⰽ' => 'ⰽ',
+ 'Ⰾ' => 'ⰾ',
+ 'Ⰿ' => 'ⰿ',
+ 'Ⱀ' => 'ⱀ',
+ 'Ⱁ' => 'ⱁ',
+ 'Ⱂ' => 'ⱂ',
+ 'Ⱃ' => 'ⱃ',
+ 'Ⱄ' => 'ⱄ',
+ 'Ⱅ' => 'ⱅ',
+ 'Ⱆ' => 'ⱆ',
+ 'Ⱇ' => 'ⱇ',
+ 'Ⱈ' => 'ⱈ',
+ 'Ⱉ' => 'ⱉ',
+ 'Ⱊ' => 'ⱊ',
+ 'Ⱋ' => 'ⱋ',
+ 'Ⱌ' => 'ⱌ',
+ 'Ⱍ' => 'ⱍ',
+ 'Ⱎ' => 'ⱎ',
+ 'Ⱏ' => 'ⱏ',
+ 'Ⱐ' => 'ⱐ',
+ 'Ⱑ' => 'ⱑ',
+ 'Ⱒ' => 'ⱒ',
+ 'Ⱓ' => 'ⱓ',
+ 'Ⱔ' => 'ⱔ',
+ 'Ⱕ' => 'ⱕ',
+ 'Ⱖ' => 'ⱖ',
+ 'Ⱗ' => 'ⱗ',
+ 'Ⱘ' => 'ⱘ',
+ 'Ⱙ' => 'ⱙ',
+ 'Ⱚ' => 'ⱚ',
+ 'Ⱛ' => 'ⱛ',
+ 'Ⱜ' => 'ⱜ',
+ 'Ⱝ' => 'ⱝ',
+ 'Ⱞ' => 'ⱞ',
+ 'Ⱡ' => 'ⱡ',
+ 'Ɫ' => 'ɫ',
+ 'Ᵽ' => 'ᵽ',
+ 'Ɽ' => 'ɽ',
+ 'Ⱨ' => 'ⱨ',
+ 'Ⱪ' => 'ⱪ',
+ 'Ⱬ' => 'ⱬ',
+ 'Ɑ' => 'ɑ',
+ 'Ɱ' => 'ɱ',
+ 'Ɐ' => 'ɐ',
+ 'Ɒ' => 'ɒ',
+ 'Ⱳ' => 'ⱳ',
+ 'Ⱶ' => 'ⱶ',
+ 'Ȿ' => 'ȿ',
+ 'Ɀ' => 'ɀ',
+ 'Ⲁ' => 'ⲁ',
+ 'Ⲃ' => 'ⲃ',
+ 'Ⲅ' => 'ⲅ',
+ 'Ⲇ' => 'ⲇ',
+ 'Ⲉ' => 'ⲉ',
+ 'Ⲋ' => 'ⲋ',
+ 'Ⲍ' => 'ⲍ',
+ 'Ⲏ' => 'ⲏ',
+ 'Ⲑ' => 'ⲑ',
+ 'Ⲓ' => 'ⲓ',
+ 'Ⲕ' => 'ⲕ',
+ 'Ⲗ' => 'ⲗ',
+ 'Ⲙ' => 'ⲙ',
+ 'Ⲛ' => 'ⲛ',
+ 'Ⲝ' => 'ⲝ',
+ 'Ⲟ' => 'ⲟ',
+ 'Ⲡ' => 'ⲡ',
+ 'Ⲣ' => 'ⲣ',
+ 'Ⲥ' => 'ⲥ',
+ 'Ⲧ' => 'ⲧ',
+ 'Ⲩ' => 'ⲩ',
+ 'Ⲫ' => 'ⲫ',
+ 'Ⲭ' => 'ⲭ',
+ 'Ⲯ' => 'ⲯ',
+ 'Ⲱ' => 'ⲱ',
+ 'Ⲳ' => 'ⲳ',
+ 'Ⲵ' => 'ⲵ',
+ 'Ⲷ' => 'ⲷ',
+ 'Ⲹ' => 'ⲹ',
+ 'Ⲻ' => 'ⲻ',
+ 'Ⲽ' => 'ⲽ',
+ 'Ⲿ' => 'ⲿ',
+ 'Ⳁ' => 'ⳁ',
+ 'Ⳃ' => 'ⳃ',
+ 'Ⳅ' => 'ⳅ',
+ 'Ⳇ' => 'ⳇ',
+ 'Ⳉ' => 'ⳉ',
+ 'Ⳋ' => 'ⳋ',
+ 'Ⳍ' => 'ⳍ',
+ 'Ⳏ' => 'ⳏ',
+ 'Ⳑ' => 'ⳑ',
+ 'Ⳓ' => 'ⳓ',
+ 'Ⳕ' => 'ⳕ',
+ 'Ⳗ' => 'ⳗ',
+ 'Ⳙ' => 'ⳙ',
+ 'Ⳛ' => 'ⳛ',
+ 'Ⳝ' => 'ⳝ',
+ 'Ⳟ' => 'ⳟ',
+ 'Ⳡ' => 'ⳡ',
+ 'Ⳣ' => 'ⳣ',
+ 'Ⳬ' => 'ⳬ',
+ 'Ⳮ' => 'ⳮ',
+ 'Ⳳ' => 'ⳳ',
+ 'Ꙁ' => 'ꙁ',
+ 'Ꙃ' => 'ꙃ',
+ 'Ꙅ' => 'ꙅ',
+ 'Ꙇ' => 'ꙇ',
+ 'Ꙉ' => 'ꙉ',
+ 'Ꙋ' => 'ꙋ',
+ 'Ꙍ' => 'ꙍ',
+ 'Ꙏ' => 'ꙏ',
+ 'Ꙑ' => 'ꙑ',
+ 'Ꙓ' => 'ꙓ',
+ 'Ꙕ' => 'ꙕ',
+ 'Ꙗ' => 'ꙗ',
+ 'Ꙙ' => 'ꙙ',
+ 'Ꙛ' => 'ꙛ',
+ 'Ꙝ' => 'ꙝ',
+ 'Ꙟ' => 'ꙟ',
+ 'Ꙡ' => 'ꙡ',
+ 'Ꙣ' => 'ꙣ',
+ 'Ꙥ' => 'ꙥ',
+ 'Ꙧ' => 'ꙧ',
+ 'Ꙩ' => 'ꙩ',
+ 'Ꙫ' => 'ꙫ',
+ 'Ꙭ' => 'ꙭ',
+ 'Ꚁ' => 'ꚁ',
+ 'Ꚃ' => 'ꚃ',
+ 'Ꚅ' => 'ꚅ',
+ 'Ꚇ' => 'ꚇ',
+ 'Ꚉ' => 'ꚉ',
+ 'Ꚋ' => 'ꚋ',
+ 'Ꚍ' => 'ꚍ',
+ 'Ꚏ' => 'ꚏ',
+ 'Ꚑ' => 'ꚑ',
+ 'Ꚓ' => 'ꚓ',
+ 'Ꚕ' => 'ꚕ',
+ 'Ꚗ' => 'ꚗ',
+ 'Ꚙ' => 'ꚙ',
+ 'Ꚛ' => 'ꚛ',
+ 'Ꜣ' => 'ꜣ',
+ 'Ꜥ' => 'ꜥ',
+ 'Ꜧ' => 'ꜧ',
+ 'Ꜩ' => 'ꜩ',
+ 'Ꜫ' => 'ꜫ',
+ 'Ꜭ' => 'ꜭ',
+ 'Ꜯ' => 'ꜯ',
+ 'Ꜳ' => 'ꜳ',
+ 'Ꜵ' => 'ꜵ',
+ 'Ꜷ' => 'ꜷ',
+ 'Ꜹ' => 'ꜹ',
+ 'Ꜻ' => 'ꜻ',
+ 'Ꜽ' => 'ꜽ',
+ 'Ꜿ' => 'ꜿ',
+ 'Ꝁ' => 'ꝁ',
+ 'Ꝃ' => 'ꝃ',
+ 'Ꝅ' => 'ꝅ',
+ 'Ꝇ' => 'ꝇ',
+ 'Ꝉ' => 'ꝉ',
+ 'Ꝋ' => 'ꝋ',
+ 'Ꝍ' => 'ꝍ',
+ 'Ꝏ' => 'ꝏ',
+ 'Ꝑ' => 'ꝑ',
+ 'Ꝓ' => 'ꝓ',
+ 'Ꝕ' => 'ꝕ',
+ 'Ꝗ' => 'ꝗ',
+ 'Ꝙ' => 'ꝙ',
+ 'Ꝛ' => 'ꝛ',
+ 'Ꝝ' => 'ꝝ',
+ 'Ꝟ' => 'ꝟ',
+ 'Ꝡ' => 'ꝡ',
+ 'Ꝣ' => 'ꝣ',
+ 'Ꝥ' => 'ꝥ',
+ 'Ꝧ' => 'ꝧ',
+ 'Ꝩ' => 'ꝩ',
+ 'Ꝫ' => 'ꝫ',
+ 'Ꝭ' => 'ꝭ',
+ 'Ꝯ' => 'ꝯ',
+ 'Ꝺ' => 'ꝺ',
+ 'Ꝼ' => 'ꝼ',
+ 'Ᵹ' => 'ᵹ',
+ 'Ꝿ' => 'ꝿ',
+ 'Ꞁ' => 'ꞁ',
+ 'Ꞃ' => 'ꞃ',
+ 'Ꞅ' => 'ꞅ',
+ 'Ꞇ' => 'ꞇ',
+ 'Ꞌ' => 'ꞌ',
+ 'Ɥ' => 'ɥ',
+ 'Ꞑ' => 'ꞑ',
+ 'Ꞓ' => 'ꞓ',
+ 'Ꞗ' => 'ꞗ',
+ 'Ꞙ' => 'ꞙ',
+ 'Ꞛ' => 'ꞛ',
+ 'Ꞝ' => 'ꞝ',
+ 'Ꞟ' => 'ꞟ',
+ 'Ꞡ' => 'ꞡ',
+ 'Ꞣ' => 'ꞣ',
+ 'Ꞥ' => 'ꞥ',
+ 'Ꞧ' => 'ꞧ',
+ 'Ꞩ' => 'ꞩ',
+ 'Ɦ' => 'ɦ',
+ 'Ɜ' => 'ɜ',
+ 'Ɡ' => 'ɡ',
+ 'Ɬ' => 'ɬ',
+ 'Ɪ' => 'ɪ',
+ 'Ʞ' => 'ʞ',
+ 'Ʇ' => 'ʇ',
+ 'Ʝ' => 'ʝ',
+ 'Ꭓ' => 'ꭓ',
+ 'Ꞵ' => 'ꞵ',
+ 'Ꞷ' => 'ꞷ',
+ 'Ꞹ' => 'ꞹ',
+ 'Ꞻ' => 'ꞻ',
+ 'Ꞽ' => 'ꞽ',
+ 'Ꞿ' => 'ꞿ',
+ 'Ꟃ' => 'ꟃ',
+ 'Ꞔ' => 'ꞔ',
+ 'Ʂ' => 'ʂ',
+ 'Ᶎ' => 'ᶎ',
+ 'Ꟈ' => 'ꟈ',
+ 'Ꟊ' => 'ꟊ',
+ 'Ꟶ' => 'ꟶ',
+ 'A' => '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',
+ '𐐀' => '𐐨',
+ '𐐁' => '𐐩',
+ '𐐂' => '𐐪',
+ '𐐃' => '𐐫',
+ '𐐄' => '𐐬',
+ '𐐅' => '𐐭',
+ '𐐆' => '𐐮',
+ '𐐇' => '𐐯',
+ '𐐈' => '𐐰',
+ '𐐉' => '𐐱',
+ '𐐊' => '𐐲',
+ '𐐋' => '𐐳',
+ '𐐌' => '𐐴',
+ '𐐍' => '𐐵',
+ '𐐎' => '𐐶',
+ '𐐏' => '𐐷',
+ '𐐐' => '𐐸',
+ '𐐑' => '𐐹',
+ '𐐒' => '𐐺',
+ '𐐓' => '𐐻',
+ '𐐔' => '𐐼',
+ '𐐕' => '𐐽',
+ '𐐖' => '𐐾',
+ '𐐗' => '𐐿',
+ '𐐘' => '𐑀',
+ '𐐙' => '𐑁',
+ '𐐚' => '𐑂',
+ '𐐛' => '𐑃',
+ '𐐜' => '𐑄',
+ '𐐝' => '𐑅',
+ '𐐞' => '𐑆',
+ '𐐟' => '𐑇',
+ '𐐠' => '𐑈',
+ '𐐡' => '𐑉',
+ '𐐢' => '𐑊',
+ '𐐣' => '𐑋',
+ '𐐤' => '𐑌',
+ '𐐥' => '𐑍',
+ '𐐦' => '𐑎',
+ '𐐧' => '𐑏',
+ '𐒰' => '𐓘',
+ '𐒱' => '𐓙',
+ '𐒲' => '𐓚',
+ '𐒳' => '𐓛',
+ '𐒴' => '𐓜',
+ '𐒵' => '𐓝',
+ '𐒶' => '𐓞',
+ '𐒷' => '𐓟',
+ '𐒸' => '𐓠',
+ '𐒹' => '𐓡',
+ '𐒺' => '𐓢',
+ '𐒻' => '𐓣',
+ '𐒼' => '𐓤',
+ '𐒽' => '𐓥',
+ '𐒾' => '𐓦',
+ '𐒿' => '𐓧',
+ '𐓀' => '𐓨',
+ '𐓁' => '𐓩',
+ '𐓂' => '𐓪',
+ '𐓃' => '𐓫',
+ '𐓄' => '𐓬',
+ '𐓅' => '𐓭',
+ '𐓆' => '𐓮',
+ '𐓇' => '𐓯',
+ '𐓈' => '𐓰',
+ '𐓉' => '𐓱',
+ '𐓊' => '𐓲',
+ '𐓋' => '𐓳',
+ '𐓌' => '𐓴',
+ '𐓍' => '𐓵',
+ '𐓎' => '𐓶',
+ '𐓏' => '𐓷',
+ '𐓐' => '𐓸',
+ '𐓑' => '𐓹',
+ '𐓒' => '𐓺',
+ '𐓓' => '𐓻',
+ '𐲀' => '𐳀',
+ '𐲁' => '𐳁',
+ '𐲂' => '𐳂',
+ '𐲃' => '𐳃',
+ '𐲄' => '𐳄',
+ '𐲅' => '𐳅',
+ '𐲆' => '𐳆',
+ '𐲇' => '𐳇',
+ '𐲈' => '𐳈',
+ '𐲉' => '𐳉',
+ '𐲊' => '𐳊',
+ '𐲋' => '𐳋',
+ '𐲌' => '𐳌',
+ '𐲍' => '𐳍',
+ '𐲎' => '𐳎',
+ '𐲏' => '𐳏',
+ '𐲐' => '𐳐',
+ '𐲑' => '𐳑',
+ '𐲒' => '𐳒',
+ '𐲓' => '𐳓',
+ '𐲔' => '𐳔',
+ '𐲕' => '𐳕',
+ '𐲖' => '𐳖',
+ '𐲗' => '𐳗',
+ '𐲘' => '𐳘',
+ '𐲙' => '𐳙',
+ '𐲚' => '𐳚',
+ '𐲛' => '𐳛',
+ '𐲜' => '𐳜',
+ '𐲝' => '𐳝',
+ '𐲞' => '𐳞',
+ '𐲟' => '𐳟',
+ '𐲠' => '𐳠',
+ '𐲡' => '𐳡',
+ '𐲢' => '𐳢',
+ '𐲣' => '𐳣',
+ '𐲤' => '𐳤',
+ '𐲥' => '𐳥',
+ '𐲦' => '𐳦',
+ '𐲧' => '𐳧',
+ '𐲨' => '𐳨',
+ '𐲩' => '𐳩',
+ '𐲪' => '𐳪',
+ '𐲫' => '𐳫',
+ '𐲬' => '𐳬',
+ '𐲭' => '𐳭',
+ '𐲮' => '𐳮',
+ '𐲯' => '𐳯',
+ '𐲰' => '𐳰',
+ '𐲱' => '𐳱',
+ '𐲲' => '𐳲',
+ '𑢠' => '𑣀',
+ '𑢡' => '𑣁',
+ '𑢢' => '𑣂',
+ '𑢣' => '𑣃',
+ '𑢤' => '𑣄',
+ '𑢥' => '𑣅',
+ '𑢦' => '𑣆',
+ '𑢧' => '𑣇',
+ '𑢨' => '𑣈',
+ '𑢩' => '𑣉',
+ '𑢪' => '𑣊',
+ '𑢫' => '𑣋',
+ '𑢬' => '𑣌',
+ '𑢭' => '𑣍',
+ '𑢮' => '𑣎',
+ '𑢯' => '𑣏',
+ '𑢰' => '𑣐',
+ '𑢱' => '𑣑',
+ '𑢲' => '𑣒',
+ '𑢳' => '𑣓',
+ '𑢴' => '𑣔',
+ '𑢵' => '𑣕',
+ '𑢶' => '𑣖',
+ '𑢷' => '𑣗',
+ '𑢸' => '𑣘',
+ '𑢹' => '𑣙',
+ '𑢺' => '𑣚',
+ '𑢻' => '𑣛',
+ '𑢼' => '𑣜',
+ '𑢽' => '𑣝',
+ '𑢾' => '𑣞',
+ '𑢿' => '𑣟',
+ '𖹀' => '𖹠',
+ '𖹁' => '𖹡',
+ '𖹂' => '𖹢',
+ '𖹃' => '𖹣',
+ '𖹄' => '𖹤',
+ '𖹅' => '𖹥',
+ '𖹆' => '𖹦',
+ '𖹇' => '𖹧',
+ '𖹈' => '𖹨',
+ '𖹉' => '𖹩',
+ '𖹊' => '𖹪',
+ '𖹋' => '𖹫',
+ '𖹌' => '𖹬',
+ '𖹍' => '𖹭',
+ '𖹎' => '𖹮',
+ '𖹏' => '𖹯',
+ '𖹐' => '𖹰',
+ '𖹑' => '𖹱',
+ '𖹒' => '𖹲',
+ '𖹓' => '𖹳',
+ '𖹔' => '𖹴',
+ '𖹕' => '𖹵',
+ '𖹖' => '𖹶',
+ '𖹗' => '𖹷',
+ '𖹘' => '𖹸',
+ '𖹙' => '𖹹',
+ '𖹚' => '𖹺',
+ '𖹛' => '𖹻',
+ '𖹜' => '𖹼',
+ '𖹝' => '𖹽',
+ '𖹞' => '𖹾',
+ '𖹟' => '𖹿',
+ '𞤀' => '𞤢',
+ '𞤁' => '𞤣',
+ '𞤂' => '𞤤',
+ '𞤃' => '𞤥',
+ '𞤄' => '𞤦',
+ '𞤅' => '𞤧',
+ '𞤆' => '𞤨',
+ '𞤇' => '𞤩',
+ '𞤈' => '𞤪',
+ '𞤉' => '𞤫',
+ '𞤊' => '𞤬',
+ '𞤋' => '𞤭',
+ '𞤌' => '𞤮',
+ '𞤍' => '𞤯',
+ '𞤎' => '𞤰',
+ '𞤏' => '𞤱',
+ '𞤐' => '𞤲',
+ '𞤑' => '𞤳',
+ '𞤒' => '𞤴',
+ '𞤓' => '𞤵',
+ '𞤔' => '𞤶',
+ '𞤕' => '𞤷',
+ '𞤖' => '𞤸',
+ '𞤗' => '𞤹',
+ '𞤘' => '𞤺',
+ '𞤙' => '𞤻',
+ '𞤚' => '𞤼',
+ '𞤛' => '𞤽',
+ '𞤜' => '𞤾',
+ '𞤝' => '𞤿',
+ '𞤞' => '𞥀',
+ '𞤟' => '𞥁',
+ '𞤠' => '𞥂',
+ '𞤡' => '𞥃',
+);
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
new file mode 100644
index 000000000..2a8f6e73b
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
@@ -0,0 +1,5 @@
+<?php
+
+// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
+
+return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\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{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\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{0971}\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{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{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\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{10FC}\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{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\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{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\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{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\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{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\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{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\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{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\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{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{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{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\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{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u';
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
new file mode 100644
index 000000000..56b9cb852
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
@@ -0,0 +1,1489 @@
+<?php
+
+return array (
+ 'a' => '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',
+ 'ij' => 'IJ',
+ 'ĵ' => 'Ĵ',
+ 'ķ' => 'Ķ',
+ 'ĺ' => 'Ĺ',
+ 'ļ' => 'Ļ',
+ 'ľ' => 'Ľ',
+ 'ŀ' => 'Ŀ',
+ 'ł' => 'Ł',
+ 'ń' => 'Ń',
+ 'ņ' => 'Ņ',
+ 'ň' => 'Ň',
+ 'ŋ' => 'Ŋ',
+ 'ō' => 'Ō',
+ 'ŏ' => 'Ŏ',
+ 'ő' => 'Ő',
+ 'œ' => 'Œ',
+ 'ŕ' => 'Ŕ',
+ 'ŗ' => 'Ŗ',
+ 'ř' => 'Ř',
+ 'ś' => 'Ś',
+ 'ŝ' => 'Ŝ',
+ 'ş' => 'Ş',
+ 'š' => 'Š',
+ 'ţ' => 'Ţ',
+ 'ť' => 'Ť',
+ 'ŧ' => 'Ŧ',
+ 'ũ' => 'Ũ',
+ 'ū' => 'Ū',
+ 'ŭ' => 'Ŭ',
+ 'ů' => 'Ů',
+ 'ű' => 'Ű',
+ 'ų' => 'Ų',
+ 'ŵ' => 'Ŵ',
+ 'ŷ' => 'Ŷ',
+ 'ź' => 'Ź',
+ 'ż' => 'Ż',
+ 'ž' => 'Ž',
+ 'ſ' => 'S',
+ 'ƀ' => 'Ƀ',
+ 'ƃ' => 'Ƃ',
+ 'ƅ' => 'Ƅ',
+ 'ƈ' => 'Ƈ',
+ 'ƌ' => 'Ƌ',
+ 'ƒ' => 'Ƒ',
+ 'ƕ' => 'Ƕ',
+ 'ƙ' => 'Ƙ',
+ 'ƚ' => 'Ƚ',
+ 'ƞ' => 'Ƞ',
+ 'ơ' => 'Ơ',
+ 'ƣ' => 'Ƣ',
+ 'ƥ' => 'Ƥ',
+ 'ƨ' => 'Ƨ',
+ 'ƭ' => 'Ƭ',
+ 'ư' => 'Ư',
+ 'ƴ' => 'Ƴ',
+ 'ƶ' => 'Ƶ',
+ 'ƹ' => 'Ƹ',
+ 'ƽ' => 'Ƽ',
+ 'ƿ' => 'Ƿ',
+ 'Dž' => 'DŽ',
+ 'dž' => 'DŽ',
+ 'Lj' => 'LJ',
+ 'lj' => 'LJ',
+ 'Nj' => 'NJ',
+ 'nj' => 'NJ',
+ 'ǎ' => 'Ǎ',
+ 'ǐ' => 'Ǐ',
+ 'ǒ' => 'Ǒ',
+ 'ǔ' => 'Ǔ',
+ 'ǖ' => 'Ǖ',
+ 'ǘ' => 'Ǘ',
+ 'ǚ' => 'Ǚ',
+ 'ǜ' => 'Ǜ',
+ 'ǝ' => 'Ǝ',
+ 'ǟ' => 'Ǟ',
+ 'ǡ' => 'Ǡ',
+ 'ǣ' => 'Ǣ',
+ 'ǥ' => 'Ǥ',
+ 'ǧ' => 'Ǧ',
+ 'ǩ' => 'Ǩ',
+ 'ǫ' => 'Ǫ',
+ 'ǭ' => 'Ǭ',
+ 'ǯ' => 'Ǯ',
+ 'Dz' => 'DZ',
+ 'dz' => 'DZ',
+ 'ǵ' => 'Ǵ',
+ 'ǹ' => 'Ǹ',
+ 'ǻ' => 'Ǻ',
+ 'ǽ' => 'Ǽ',
+ 'ǿ' => 'Ǿ',
+ 'ȁ' => 'Ȁ',
+ 'ȃ' => 'Ȃ',
+ 'ȅ' => 'Ȅ',
+ 'ȇ' => 'Ȇ',
+ 'ȉ' => 'Ȉ',
+ 'ȋ' => 'Ȋ',
+ 'ȍ' => 'Ȍ',
+ 'ȏ' => 'Ȏ',
+ 'ȑ' => 'Ȑ',
+ 'ȓ' => 'Ȓ',
+ 'ȕ' => 'Ȕ',
+ 'ȗ' => 'Ȗ',
+ 'ș' => 'Ș',
+ 'ț' => 'Ț',
+ 'ȝ' => 'Ȝ',
+ 'ȟ' => 'Ȟ',
+ 'ȣ' => 'Ȣ',
+ 'ȥ' => 'Ȥ',
+ 'ȧ' => 'Ȧ',
+ 'ȩ' => 'Ȩ',
+ 'ȫ' => 'Ȫ',
+ 'ȭ' => 'Ȭ',
+ 'ȯ' => 'Ȯ',
+ 'ȱ' => 'Ȱ',
+ 'ȳ' => 'Ȳ',
+ 'ȼ' => 'Ȼ',
+ 'ȿ' => 'Ȿ',
+ 'ɀ' => 'Ɀ',
+ 'ɂ' => 'Ɂ',
+ 'ɇ' => 'Ɇ',
+ 'ɉ' => 'Ɉ',
+ 'ɋ' => 'Ɋ',
+ 'ɍ' => 'Ɍ',
+ 'ɏ' => 'Ɏ',
+ 'ɐ' => 'Ɐ',
+ 'ɑ' => 'Ɑ',
+ 'ɒ' => 'Ɒ',
+ 'ɓ' => 'Ɓ',
+ 'ɔ' => 'Ɔ',
+ 'ɖ' => 'Ɖ',
+ 'ɗ' => 'Ɗ',
+ 'ə' => 'Ə',
+ 'ɛ' => 'Ɛ',
+ 'ɜ' => 'Ɜ',
+ 'ɠ' => 'Ɠ',
+ 'ɡ' => 'Ɡ',
+ 'ɣ' => 'Ɣ',
+ 'ɥ' => 'Ɥ',
+ 'ɦ' => 'Ɦ',
+ 'ɨ' => 'Ɨ',
+ 'ɩ' => 'Ɩ',
+ 'ɪ' => 'Ɪ',
+ 'ɫ' => 'Ɫ',
+ 'ɬ' => 'Ɬ',
+ 'ɯ' => 'Ɯ',
+ 'ɱ' => 'Ɱ',
+ 'ɲ' => 'Ɲ',
+ 'ɵ' => 'Ɵ',
+ 'ɽ' => 'Ɽ',
+ 'ʀ' => 'Ʀ',
+ 'ʂ' => 'Ʂ',
+ 'ʃ' => 'Ʃ',
+ 'ʇ' => 'Ʇ',
+ 'ʈ' => 'Ʈ',
+ 'ʉ' => 'Ʉ',
+ 'ʊ' => 'Ʊ',
+ 'ʋ' => 'Ʋ',
+ 'ʌ' => 'Ʌ',
+ 'ʒ' => 'Ʒ',
+ 'ʝ' => 'Ʝ',
+ 'ʞ' => 'Ʞ',
+ 'ͅ' => 'Ι',
+ 'ͱ' => 'Ͱ',
+ 'ͳ' => 'Ͳ',
+ 'ͷ' => 'Ͷ',
+ 'ͻ' => 'Ͻ',
+ 'ͼ' => 'Ͼ',
+ 'ͽ' => 'Ͽ',
+ 'ά' => 'Ά',
+ 'έ' => 'Έ',
+ 'ή' => 'Ή',
+ 'ί' => 'Ί',
+ 'α' => 'Α',
+ 'β' => 'Β',
+ 'γ' => 'Γ',
+ 'δ' => 'Δ',
+ 'ε' => 'Ε',
+ 'ζ' => 'Ζ',
+ 'η' => 'Η',
+ 'θ' => 'Θ',
+ 'ι' => 'Ι',
+ 'κ' => 'Κ',
+ 'λ' => 'Λ',
+ 'μ' => 'Μ',
+ 'ν' => 'Ν',
+ 'ξ' => 'Ξ',
+ 'ο' => 'Ο',
+ 'π' => 'Π',
+ 'ρ' => 'Ρ',
+ 'ς' => 'Σ',
+ 'σ' => 'Σ',
+ 'τ' => 'Τ',
+ 'υ' => 'Υ',
+ 'φ' => 'Φ',
+ 'χ' => 'Χ',
+ 'ψ' => 'Ψ',
+ 'ω' => 'Ω',
+ 'ϊ' => 'Ϊ',
+ 'ϋ' => 'Ϋ',
+ 'ό' => 'Ό',
+ 'ύ' => 'Ύ',
+ 'ώ' => 'Ώ',
+ 'ϐ' => 'Β',
+ 'ϑ' => 'Θ',
+ 'ϕ' => 'Φ',
+ 'ϖ' => 'Π',
+ 'ϗ' => 'Ϗ',
+ 'ϙ' => 'Ϙ',
+ 'ϛ' => 'Ϛ',
+ 'ϝ' => 'Ϝ',
+ 'ϟ' => 'Ϟ',
+ 'ϡ' => 'Ϡ',
+ 'ϣ' => 'Ϣ',
+ 'ϥ' => 'Ϥ',
+ 'ϧ' => 'Ϧ',
+ 'ϩ' => 'Ϩ',
+ 'ϫ' => 'Ϫ',
+ 'ϭ' => 'Ϭ',
+ 'ϯ' => 'Ϯ',
+ 'ϰ' => 'Κ',
+ 'ϱ' => 'Ρ',
+ 'ϲ' => 'Ϲ',
+ 'ϳ' => 'Ϳ',
+ 'ϵ' => 'Ε',
+ 'ϸ' => 'Ϸ',
+ 'ϻ' => 'Ϻ',
+ 'а' => 'А',
+ 'б' => 'Б',
+ 'в' => 'В',
+ 'г' => 'Г',
+ 'д' => 'Д',
+ 'е' => 'Е',
+ 'ж' => 'Ж',
+ 'з' => 'З',
+ 'и' => 'И',
+ 'й' => 'Й',
+ 'к' => 'К',
+ 'л' => 'Л',
+ 'м' => 'М',
+ 'н' => 'Н',
+ 'о' => 'О',
+ 'п' => 'П',
+ 'р' => 'Р',
+ 'с' => 'С',
+ 'т' => 'Т',
+ 'у' => 'У',
+ 'ф' => 'Ф',
+ 'х' => 'Х',
+ 'ц' => 'Ц',
+ 'ч' => 'Ч',
+ 'ш' => 'Ш',
+ 'щ' => 'Щ',
+ 'ъ' => 'Ъ',
+ 'ы' => 'Ы',
+ 'ь' => 'Ь',
+ 'э' => 'Э',
+ 'ю' => 'Ю',
+ 'я' => 'Я',
+ 'ѐ' => 'Ѐ',
+ 'ё' => 'Ё',
+ 'ђ' => 'Ђ',
+ 'ѓ' => 'Ѓ',
+ 'є' => 'Є',
+ 'ѕ' => 'Ѕ',
+ 'і' => 'І',
+ 'ї' => 'Ї',
+ 'ј' => 'Ј',
+ 'љ' => 'Љ',
+ 'њ' => 'Њ',
+ 'ћ' => 'Ћ',
+ 'ќ' => 'Ќ',
+ 'ѝ' => 'Ѝ',
+ 'ў' => 'Ў',
+ 'џ' => 'Џ',
+ 'ѡ' => 'Ѡ',
+ 'ѣ' => 'Ѣ',
+ 'ѥ' => 'Ѥ',
+ 'ѧ' => 'Ѧ',
+ 'ѩ' => 'Ѩ',
+ 'ѫ' => 'Ѫ',
+ 'ѭ' => 'Ѭ',
+ 'ѯ' => 'Ѯ',
+ 'ѱ' => 'Ѱ',
+ 'ѳ' => 'Ѳ',
+ 'ѵ' => 'Ѵ',
+ 'ѷ' => 'Ѷ',
+ 'ѹ' => 'Ѹ',
+ 'ѻ' => 'Ѻ',
+ 'ѽ' => 'Ѽ',
+ 'ѿ' => 'Ѿ',
+ 'ҁ' => 'Ҁ',
+ 'ҋ' => 'Ҋ',
+ 'ҍ' => 'Ҍ',
+ 'ҏ' => 'Ҏ',
+ 'ґ' => 'Ґ',
+ 'ғ' => 'Ғ',
+ 'ҕ' => 'Ҕ',
+ 'җ' => 'Җ',
+ 'ҙ' => 'Ҙ',
+ 'қ' => 'Қ',
+ 'ҝ' => 'Ҝ',
+ 'ҟ' => 'Ҟ',
+ 'ҡ' => 'Ҡ',
+ 'ң' => 'Ң',
+ 'ҥ' => 'Ҥ',
+ 'ҧ' => 'Ҧ',
+ 'ҩ' => 'Ҩ',
+ 'ҫ' => 'Ҫ',
+ 'ҭ' => 'Ҭ',
+ 'ү' => 'Ү',
+ 'ұ' => 'Ұ',
+ 'ҳ' => 'Ҳ',
+ 'ҵ' => 'Ҵ',
+ 'ҷ' => 'Ҷ',
+ 'ҹ' => 'Ҹ',
+ 'һ' => 'Һ',
+ 'ҽ' => 'Ҽ',
+ 'ҿ' => 'Ҿ',
+ 'ӂ' => 'Ӂ',
+ 'ӄ' => 'Ӄ',
+ 'ӆ' => 'Ӆ',
+ 'ӈ' => 'Ӈ',
+ 'ӊ' => 'Ӊ',
+ 'ӌ' => 'Ӌ',
+ 'ӎ' => 'Ӎ',
+ 'ӏ' => 'Ӏ',
+ 'ӑ' => 'Ӑ',
+ 'ӓ' => 'Ӓ',
+ 'ӕ' => 'Ӕ',
+ 'ӗ' => 'Ӗ',
+ 'ә' => 'Ә',
+ 'ӛ' => 'Ӛ',
+ 'ӝ' => 'Ӝ',
+ 'ӟ' => 'Ӟ',
+ 'ӡ' => 'Ӡ',
+ 'ӣ' => 'Ӣ',
+ 'ӥ' => 'Ӥ',
+ 'ӧ' => 'Ӧ',
+ 'ө' => 'Ө',
+ 'ӫ' => 'Ӫ',
+ 'ӭ' => 'Ӭ',
+ 'ӯ' => 'Ӯ',
+ 'ӱ' => 'Ӱ',
+ 'ӳ' => 'Ӳ',
+ 'ӵ' => 'Ӵ',
+ 'ӷ' => 'Ӷ',
+ 'ӹ' => 'Ӹ',
+ 'ӻ' => 'Ӻ',
+ 'ӽ' => 'Ӽ',
+ 'ӿ' => 'Ӿ',
+ 'ԁ' => 'Ԁ',
+ 'ԃ' => 'Ԃ',
+ 'ԅ' => 'Ԅ',
+ 'ԇ' => 'Ԇ',
+ 'ԉ' => 'Ԉ',
+ 'ԋ' => 'Ԋ',
+ 'ԍ' => 'Ԍ',
+ 'ԏ' => 'Ԏ',
+ 'ԑ' => 'Ԑ',
+ 'ԓ' => 'Ԓ',
+ 'ԕ' => 'Ԕ',
+ 'ԗ' => 'Ԗ',
+ 'ԙ' => 'Ԙ',
+ 'ԛ' => 'Ԛ',
+ 'ԝ' => 'Ԝ',
+ 'ԟ' => 'Ԟ',
+ 'ԡ' => 'Ԡ',
+ 'ԣ' => 'Ԣ',
+ 'ԥ' => 'Ԥ',
+ 'ԧ' => 'Ԧ',
+ 'ԩ' => 'Ԩ',
+ 'ԫ' => 'Ԫ',
+ 'ԭ' => 'Ԭ',
+ 'ԯ' => 'Ԯ',
+ 'ա' => 'Ա',
+ 'բ' => 'Բ',
+ 'գ' => 'Գ',
+ 'դ' => 'Դ',
+ 'ե' => 'Ե',
+ 'զ' => 'Զ',
+ 'է' => 'Է',
+ 'ը' => 'Ը',
+ 'թ' => 'Թ',
+ 'ժ' => 'Ժ',
+ 'ի' => 'Ի',
+ 'լ' => 'Լ',
+ 'խ' => 'Խ',
+ 'ծ' => 'Ծ',
+ 'կ' => 'Կ',
+ 'հ' => 'Հ',
+ 'ձ' => 'Ձ',
+ 'ղ' => 'Ղ',
+ 'ճ' => 'Ճ',
+ 'մ' => 'Մ',
+ 'յ' => 'Յ',
+ 'ն' => 'Ն',
+ 'շ' => 'Շ',
+ 'ո' => 'Ո',
+ 'չ' => 'Չ',
+ 'պ' => 'Պ',
+ 'ջ' => 'Ջ',
+ 'ռ' => 'Ռ',
+ 'ս' => 'Ս',
+ 'վ' => 'Վ',
+ 'տ' => 'Տ',
+ 'ր' => 'Ր',
+ 'ց' => 'Ց',
+ 'ւ' => 'Ւ',
+ 'փ' => 'Փ',
+ 'ք' => 'Ք',
+ 'օ' => 'Օ',
+ 'ֆ' => 'Ֆ',
+ 'ა' => 'Ა',
+ 'ბ' => 'Ბ',
+ 'გ' => 'Გ',
+ 'დ' => 'Დ',
+ 'ე' => 'Ე',
+ 'ვ' => 'Ვ',
+ 'ზ' => 'Ზ',
+ 'თ' => 'Თ',
+ 'ი' => 'Ი',
+ 'კ' => 'Კ',
+ 'ლ' => 'Ლ',
+ 'მ' => 'Მ',
+ 'ნ' => 'Ნ',
+ 'ო' => 'Ო',
+ 'პ' => 'Პ',
+ 'ჟ' => 'Ჟ',
+ 'რ' => 'Რ',
+ 'ს' => 'Ს',
+ 'ტ' => 'Ტ',
+ 'უ' => 'Უ',
+ 'ფ' => 'Ფ',
+ 'ქ' => 'Ქ',
+ 'ღ' => 'Ღ',
+ 'ყ' => 'Ყ',
+ 'შ' => 'Შ',
+ 'ჩ' => 'Ჩ',
+ 'ც' => 'Ც',
+ 'ძ' => 'Ძ',
+ 'წ' => 'Წ',
+ 'ჭ' => 'Ჭ',
+ 'ხ' => 'Ხ',
+ 'ჯ' => 'Ჯ',
+ 'ჰ' => 'Ჰ',
+ 'ჱ' => 'Ჱ',
+ 'ჲ' => 'Ჲ',
+ 'ჳ' => 'Ჳ',
+ 'ჴ' => 'Ჴ',
+ 'ჵ' => 'Ჵ',
+ 'ჶ' => 'Ჶ',
+ 'ჷ' => 'Ჷ',
+ 'ჸ' => 'Ჸ',
+ 'ჹ' => 'Ჹ',
+ 'ჺ' => 'Ჺ',
+ 'ჽ' => 'Ჽ',
+ 'ჾ' => 'Ჾ',
+ 'ჿ' => 'Ჿ',
+ 'ᏸ' => 'Ᏸ',
+ 'ᏹ' => 'Ᏹ',
+ 'ᏺ' => 'Ᏺ',
+ 'ᏻ' => 'Ᏻ',
+ 'ᏼ' => 'Ᏼ',
+ 'ᏽ' => 'Ᏽ',
+ 'ᲀ' => 'В',
+ 'ᲁ' => 'Д',
+ 'ᲂ' => 'О',
+ 'ᲃ' => 'С',
+ 'ᲄ' => 'Т',
+ 'ᲅ' => 'Т',
+ 'ᲆ' => 'Ъ',
+ 'ᲇ' => 'Ѣ',
+ 'ᲈ' => 'Ꙋ',
+ 'ᵹ' => 'Ᵹ',
+ 'ᵽ' => 'Ᵽ',
+ 'ᶎ' => 'Ᶎ',
+ 'ḁ' => 'Ḁ',
+ 'ḃ' => 'Ḃ',
+ 'ḅ' => 'Ḅ',
+ 'ḇ' => 'Ḇ',
+ 'ḉ' => 'Ḉ',
+ 'ḋ' => 'Ḋ',
+ 'ḍ' => 'Ḍ',
+ 'ḏ' => 'Ḏ',
+ 'ḑ' => 'Ḑ',
+ 'ḓ' => 'Ḓ',
+ 'ḕ' => 'Ḕ',
+ 'ḗ' => 'Ḗ',
+ 'ḙ' => 'Ḙ',
+ 'ḛ' => 'Ḛ',
+ 'ḝ' => 'Ḝ',
+ 'ḟ' => 'Ḟ',
+ 'ḡ' => 'Ḡ',
+ 'ḣ' => 'Ḣ',
+ 'ḥ' => 'Ḥ',
+ 'ḧ' => 'Ḧ',
+ 'ḩ' => 'Ḩ',
+ 'ḫ' => 'Ḫ',
+ 'ḭ' => 'Ḭ',
+ 'ḯ' => 'Ḯ',
+ 'ḱ' => 'Ḱ',
+ 'ḳ' => 'Ḳ',
+ 'ḵ' => 'Ḵ',
+ 'ḷ' => 'Ḷ',
+ 'ḹ' => 'Ḹ',
+ 'ḻ' => 'Ḻ',
+ 'ḽ' => 'Ḽ',
+ 'ḿ' => 'Ḿ',
+ 'ṁ' => 'Ṁ',
+ 'ṃ' => 'Ṃ',
+ 'ṅ' => 'Ṅ',
+ 'ṇ' => 'Ṇ',
+ 'ṉ' => 'Ṉ',
+ 'ṋ' => 'Ṋ',
+ 'ṍ' => 'Ṍ',
+ 'ṏ' => 'Ṏ',
+ 'ṑ' => 'Ṑ',
+ 'ṓ' => 'Ṓ',
+ 'ṕ' => 'Ṕ',
+ 'ṗ' => 'Ṗ',
+ 'ṙ' => 'Ṙ',
+ 'ṛ' => 'Ṛ',
+ 'ṝ' => 'Ṝ',
+ 'ṟ' => 'Ṟ',
+ 'ṡ' => 'Ṡ',
+ 'ṣ' => 'Ṣ',
+ 'ṥ' => 'Ṥ',
+ 'ṧ' => 'Ṧ',
+ 'ṩ' => 'Ṩ',
+ 'ṫ' => 'Ṫ',
+ 'ṭ' => 'Ṭ',
+ 'ṯ' => 'Ṯ',
+ 'ṱ' => 'Ṱ',
+ 'ṳ' => 'Ṳ',
+ 'ṵ' => 'Ṵ',
+ 'ṷ' => 'Ṷ',
+ 'ṹ' => 'Ṹ',
+ 'ṻ' => 'Ṻ',
+ 'ṽ' => 'Ṽ',
+ 'ṿ' => 'Ṿ',
+ 'ẁ' => 'Ẁ',
+ 'ẃ' => 'Ẃ',
+ 'ẅ' => 'Ẅ',
+ 'ẇ' => 'Ẇ',
+ 'ẉ' => 'Ẉ',
+ 'ẋ' => 'Ẋ',
+ 'ẍ' => 'Ẍ',
+ 'ẏ' => 'Ẏ',
+ 'ẑ' => 'Ẑ',
+ 'ẓ' => 'Ẓ',
+ 'ẕ' => 'Ẕ',
+ 'ẛ' => 'Ṡ',
+ 'ạ' => 'Ạ',
+ 'ả' => 'Ả',
+ 'ấ' => 'Ấ',
+ 'ầ' => 'Ầ',
+ 'ẩ' => 'Ẩ',
+ 'ẫ' => 'Ẫ',
+ 'ậ' => 'Ậ',
+ 'ắ' => 'Ắ',
+ 'ằ' => 'Ằ',
+ 'ẳ' => 'Ẳ',
+ 'ẵ' => 'Ẵ',
+ 'ặ' => 'Ặ',
+ 'ẹ' => 'Ẹ',
+ 'ẻ' => 'Ẻ',
+ 'ẽ' => 'Ẽ',
+ 'ế' => 'Ế',
+ 'ề' => 'Ề',
+ 'ể' => 'Ể',
+ 'ễ' => 'Ễ',
+ 'ệ' => 'Ệ',
+ 'ỉ' => 'Ỉ',
+ 'ị' => 'Ị',
+ 'ọ' => 'Ọ',
+ 'ỏ' => 'Ỏ',
+ 'ố' => 'Ố',
+ 'ồ' => 'Ồ',
+ 'ổ' => 'Ổ',
+ 'ỗ' => 'Ỗ',
+ 'ộ' => 'Ộ',
+ 'ớ' => 'Ớ',
+ 'ờ' => 'Ờ',
+ 'ở' => 'Ở',
+ 'ỡ' => 'Ỡ',
+ 'ợ' => 'Ợ',
+ 'ụ' => 'Ụ',
+ 'ủ' => 'Ủ',
+ 'ứ' => 'Ứ',
+ 'ừ' => 'Ừ',
+ 'ử' => 'Ử',
+ 'ữ' => 'Ữ',
+ 'ự' => 'Ự',
+ 'ỳ' => 'Ỳ',
+ 'ỵ' => 'Ỵ',
+ 'ỷ' => 'Ỷ',
+ 'ỹ' => 'Ỹ',
+ 'ỻ' => 'Ỻ',
+ 'ỽ' => 'Ỽ',
+ 'ỿ' => 'Ỿ',
+ 'ἀ' => 'Ἀ',
+ 'ἁ' => 'Ἁ',
+ 'ἂ' => 'Ἂ',
+ 'ἃ' => 'Ἃ',
+ 'ἄ' => 'Ἄ',
+ 'ἅ' => 'Ἅ',
+ 'ἆ' => 'Ἆ',
+ 'ἇ' => 'Ἇ',
+ 'ἐ' => 'Ἐ',
+ 'ἑ' => 'Ἑ',
+ 'ἒ' => 'Ἒ',
+ 'ἓ' => 'Ἓ',
+ 'ἔ' => 'Ἔ',
+ 'ἕ' => 'Ἕ',
+ 'ἠ' => 'Ἠ',
+ 'ἡ' => 'Ἡ',
+ 'ἢ' => 'Ἢ',
+ 'ἣ' => 'Ἣ',
+ 'ἤ' => 'Ἤ',
+ 'ἥ' => 'Ἥ',
+ 'ἦ' => 'Ἦ',
+ 'ἧ' => 'Ἧ',
+ 'ἰ' => 'Ἰ',
+ 'ἱ' => 'Ἱ',
+ 'ἲ' => 'Ἲ',
+ 'ἳ' => 'Ἳ',
+ 'ἴ' => 'Ἴ',
+ 'ἵ' => 'Ἵ',
+ 'ἶ' => 'Ἶ',
+ 'ἷ' => 'Ἷ',
+ 'ὀ' => 'Ὀ',
+ 'ὁ' => 'Ὁ',
+ 'ὂ' => 'Ὂ',
+ 'ὃ' => 'Ὃ',
+ 'ὄ' => 'Ὄ',
+ 'ὅ' => 'Ὅ',
+ 'ὑ' => 'Ὑ',
+ 'ὓ' => 'Ὓ',
+ 'ὕ' => 'Ὕ',
+ 'ὗ' => 'Ὗ',
+ 'ὠ' => 'Ὠ',
+ 'ὡ' => 'Ὡ',
+ 'ὢ' => 'Ὢ',
+ 'ὣ' => 'Ὣ',
+ 'ὤ' => 'Ὤ',
+ 'ὥ' => 'Ὥ',
+ 'ὦ' => 'Ὦ',
+ 'ὧ' => 'Ὧ',
+ 'ὰ' => 'Ὰ',
+ 'ά' => 'Ά',
+ 'ὲ' => 'Ὲ',
+ 'έ' => 'Έ',
+ 'ὴ' => 'Ὴ',
+ 'ή' => 'Ή',
+ 'ὶ' => 'Ὶ',
+ 'ί' => 'Ί',
+ 'ὸ' => 'Ὸ',
+ 'ό' => 'Ό',
+ 'ὺ' => 'Ὺ',
+ 'ύ' => 'Ύ',
+ 'ὼ' => 'Ὼ',
+ 'ώ' => 'Ώ',
+ 'ᾀ' => 'ἈΙ',
+ 'ᾁ' => 'ἉΙ',
+ 'ᾂ' => 'ἊΙ',
+ 'ᾃ' => 'ἋΙ',
+ 'ᾄ' => 'ἌΙ',
+ 'ᾅ' => 'ἍΙ',
+ 'ᾆ' => 'ἎΙ',
+ 'ᾇ' => 'ἏΙ',
+ 'ᾐ' => 'ἨΙ',
+ 'ᾑ' => 'ἩΙ',
+ 'ᾒ' => 'ἪΙ',
+ 'ᾓ' => 'ἫΙ',
+ 'ᾔ' => 'ἬΙ',
+ 'ᾕ' => 'ἭΙ',
+ 'ᾖ' => 'ἮΙ',
+ 'ᾗ' => 'ἯΙ',
+ 'ᾠ' => 'ὨΙ',
+ 'ᾡ' => 'ὩΙ',
+ 'ᾢ' => 'ὪΙ',
+ 'ᾣ' => 'ὫΙ',
+ 'ᾤ' => 'ὬΙ',
+ 'ᾥ' => 'ὭΙ',
+ 'ᾦ' => 'ὮΙ',
+ 'ᾧ' => 'ὯΙ',
+ 'ᾰ' => 'Ᾰ',
+ 'ᾱ' => 'Ᾱ',
+ 'ᾳ' => 'ΑΙ',
+ 'ι' => 'Ι',
+ 'ῃ' => 'ΗΙ',
+ 'ῐ' => 'Ῐ',
+ 'ῑ' => 'Ῑ',
+ 'ῠ' => 'Ῠ',
+ 'ῡ' => 'Ῡ',
+ 'ῥ' => 'Ῥ',
+ 'ῳ' => 'ΩΙ',
+ 'ⅎ' => 'Ⅎ',
+ 'ⅰ' => 'Ⅰ',
+ 'ⅱ' => 'Ⅱ',
+ 'ⅲ' => 'Ⅲ',
+ 'ⅳ' => 'Ⅳ',
+ 'ⅴ' => 'Ⅴ',
+ 'ⅵ' => 'Ⅵ',
+ 'ⅶ' => 'Ⅶ',
+ 'ⅷ' => 'Ⅷ',
+ 'ⅸ' => 'Ⅸ',
+ 'ⅹ' => 'Ⅹ',
+ 'ⅺ' => 'Ⅺ',
+ 'ⅻ' => 'Ⅻ',
+ 'ⅼ' => 'Ⅼ',
+ 'ⅽ' => 'Ⅽ',
+ 'ⅾ' => 'Ⅾ',
+ 'ⅿ' => 'Ⅿ',
+ 'ↄ' => 'Ↄ',
+ 'ⓐ' => 'Ⓐ',
+ 'ⓑ' => 'Ⓑ',
+ 'ⓒ' => 'Ⓒ',
+ 'ⓓ' => 'Ⓓ',
+ 'ⓔ' => 'Ⓔ',
+ 'ⓕ' => 'Ⓕ',
+ 'ⓖ' => 'Ⓖ',
+ 'ⓗ' => 'Ⓗ',
+ 'ⓘ' => 'Ⓘ',
+ 'ⓙ' => 'Ⓙ',
+ 'ⓚ' => 'Ⓚ',
+ 'ⓛ' => 'Ⓛ',
+ 'ⓜ' => 'Ⓜ',
+ 'ⓝ' => 'Ⓝ',
+ 'ⓞ' => 'Ⓞ',
+ 'ⓟ' => 'Ⓟ',
+ 'ⓠ' => 'Ⓠ',
+ 'ⓡ' => 'Ⓡ',
+ 'ⓢ' => 'Ⓢ',
+ 'ⓣ' => 'Ⓣ',
+ 'ⓤ' => 'Ⓤ',
+ 'ⓥ' => 'Ⓥ',
+ 'ⓦ' => 'Ⓦ',
+ 'ⓧ' => 'Ⓧ',
+ 'ⓨ' => 'Ⓨ',
+ 'ⓩ' => 'Ⓩ',
+ 'ⰰ' => 'Ⰰ',
+ 'ⰱ' => 'Ⰱ',
+ 'ⰲ' => 'Ⰲ',
+ 'ⰳ' => 'Ⰳ',
+ 'ⰴ' => 'Ⰴ',
+ 'ⰵ' => 'Ⰵ',
+ 'ⰶ' => 'Ⰶ',
+ 'ⰷ' => 'Ⰷ',
+ 'ⰸ' => 'Ⰸ',
+ 'ⰹ' => 'Ⰹ',
+ 'ⰺ' => 'Ⰺ',
+ 'ⰻ' => 'Ⰻ',
+ 'ⰼ' => 'Ⰼ',
+ 'ⰽ' => 'Ⰽ',
+ 'ⰾ' => 'Ⰾ',
+ 'ⰿ' => 'Ⰿ',
+ 'ⱀ' => 'Ⱀ',
+ 'ⱁ' => 'Ⱁ',
+ 'ⱂ' => 'Ⱂ',
+ 'ⱃ' => 'Ⱃ',
+ 'ⱄ' => 'Ⱄ',
+ 'ⱅ' => 'Ⱅ',
+ 'ⱆ' => 'Ⱆ',
+ 'ⱇ' => 'Ⱇ',
+ 'ⱈ' => 'Ⱈ',
+ 'ⱉ' => 'Ⱉ',
+ 'ⱊ' => 'Ⱊ',
+ 'ⱋ' => 'Ⱋ',
+ 'ⱌ' => 'Ⱌ',
+ 'ⱍ' => 'Ⱍ',
+ 'ⱎ' => 'Ⱎ',
+ 'ⱏ' => 'Ⱏ',
+ 'ⱐ' => 'Ⱐ',
+ 'ⱑ' => 'Ⱑ',
+ 'ⱒ' => 'Ⱒ',
+ 'ⱓ' => 'Ⱓ',
+ 'ⱔ' => 'Ⱔ',
+ 'ⱕ' => 'Ⱕ',
+ 'ⱖ' => 'Ⱖ',
+ 'ⱗ' => 'Ⱗ',
+ 'ⱘ' => 'Ⱘ',
+ 'ⱙ' => 'Ⱙ',
+ 'ⱚ' => 'Ⱚ',
+ 'ⱛ' => 'Ⱛ',
+ 'ⱜ' => 'Ⱜ',
+ 'ⱝ' => 'Ⱝ',
+ 'ⱞ' => 'Ⱞ',
+ 'ⱡ' => 'Ⱡ',
+ 'ⱥ' => 'Ⱥ',
+ 'ⱦ' => 'Ⱦ',
+ 'ⱨ' => 'Ⱨ',
+ 'ⱪ' => 'Ⱪ',
+ 'ⱬ' => 'Ⱬ',
+ 'ⱳ' => 'Ⱳ',
+ 'ⱶ' => 'Ⱶ',
+ 'ⲁ' => 'Ⲁ',
+ 'ⲃ' => 'Ⲃ',
+ 'ⲅ' => 'Ⲅ',
+ 'ⲇ' => 'Ⲇ',
+ 'ⲉ' => 'Ⲉ',
+ 'ⲋ' => 'Ⲋ',
+ 'ⲍ' => 'Ⲍ',
+ 'ⲏ' => 'Ⲏ',
+ 'ⲑ' => 'Ⲑ',
+ 'ⲓ' => 'Ⲓ',
+ 'ⲕ' => 'Ⲕ',
+ 'ⲗ' => 'Ⲗ',
+ 'ⲙ' => 'Ⲙ',
+ 'ⲛ' => 'Ⲛ',
+ 'ⲝ' => 'Ⲝ',
+ 'ⲟ' => 'Ⲟ',
+ 'ⲡ' => 'Ⲡ',
+ 'ⲣ' => 'Ⲣ',
+ 'ⲥ' => 'Ⲥ',
+ 'ⲧ' => 'Ⲧ',
+ 'ⲩ' => 'Ⲩ',
+ 'ⲫ' => 'Ⲫ',
+ 'ⲭ' => 'Ⲭ',
+ 'ⲯ' => 'Ⲯ',
+ 'ⲱ' => 'Ⲱ',
+ 'ⲳ' => 'Ⲳ',
+ 'ⲵ' => 'Ⲵ',
+ 'ⲷ' => 'Ⲷ',
+ 'ⲹ' => 'Ⲹ',
+ 'ⲻ' => 'Ⲻ',
+ 'ⲽ' => 'Ⲽ',
+ 'ⲿ' => 'Ⲿ',
+ 'ⳁ' => 'Ⳁ',
+ 'ⳃ' => 'Ⳃ',
+ 'ⳅ' => 'Ⳅ',
+ 'ⳇ' => 'Ⳇ',
+ 'ⳉ' => 'Ⳉ',
+ 'ⳋ' => 'Ⳋ',
+ 'ⳍ' => 'Ⳍ',
+ 'ⳏ' => 'Ⳏ',
+ 'ⳑ' => 'Ⳑ',
+ 'ⳓ' => 'Ⳓ',
+ 'ⳕ' => 'Ⳕ',
+ 'ⳗ' => 'Ⳗ',
+ 'ⳙ' => 'Ⳙ',
+ 'ⳛ' => 'Ⳛ',
+ 'ⳝ' => 'Ⳝ',
+ 'ⳟ' => 'Ⳟ',
+ 'ⳡ' => 'Ⳡ',
+ 'ⳣ' => 'Ⳣ',
+ 'ⳬ' => 'Ⳬ',
+ 'ⳮ' => 'Ⳮ',
+ 'ⳳ' => 'Ⳳ',
+ 'ⴀ' => 'Ⴀ',
+ 'ⴁ' => 'Ⴁ',
+ 'ⴂ' => 'Ⴂ',
+ 'ⴃ' => 'Ⴃ',
+ 'ⴄ' => 'Ⴄ',
+ 'ⴅ' => 'Ⴅ',
+ 'ⴆ' => 'Ⴆ',
+ 'ⴇ' => 'Ⴇ',
+ 'ⴈ' => 'Ⴈ',
+ 'ⴉ' => 'Ⴉ',
+ 'ⴊ' => 'Ⴊ',
+ 'ⴋ' => 'Ⴋ',
+ 'ⴌ' => 'Ⴌ',
+ 'ⴍ' => 'Ⴍ',
+ 'ⴎ' => 'Ⴎ',
+ 'ⴏ' => 'Ⴏ',
+ 'ⴐ' => 'Ⴐ',
+ 'ⴑ' => 'Ⴑ',
+ 'ⴒ' => 'Ⴒ',
+ 'ⴓ' => 'Ⴓ',
+ 'ⴔ' => 'Ⴔ',
+ 'ⴕ' => 'Ⴕ',
+ 'ⴖ' => 'Ⴖ',
+ 'ⴗ' => 'Ⴗ',
+ 'ⴘ' => 'Ⴘ',
+ 'ⴙ' => 'Ⴙ',
+ 'ⴚ' => 'Ⴚ',
+ 'ⴛ' => 'Ⴛ',
+ 'ⴜ' => 'Ⴜ',
+ 'ⴝ' => 'Ⴝ',
+ 'ⴞ' => 'Ⴞ',
+ 'ⴟ' => 'Ⴟ',
+ 'ⴠ' => 'Ⴠ',
+ 'ⴡ' => 'Ⴡ',
+ 'ⴢ' => 'Ⴢ',
+ 'ⴣ' => 'Ⴣ',
+ 'ⴤ' => 'Ⴤ',
+ 'ⴥ' => 'Ⴥ',
+ 'ⴧ' => 'Ⴧ',
+ 'ⴭ' => 'Ⴭ',
+ 'ꙁ' => 'Ꙁ',
+ 'ꙃ' => 'Ꙃ',
+ 'ꙅ' => 'Ꙅ',
+ 'ꙇ' => 'Ꙇ',
+ 'ꙉ' => 'Ꙉ',
+ 'ꙋ' => 'Ꙋ',
+ 'ꙍ' => 'Ꙍ',
+ 'ꙏ' => 'Ꙏ',
+ 'ꙑ' => 'Ꙑ',
+ 'ꙓ' => 'Ꙓ',
+ 'ꙕ' => 'Ꙕ',
+ 'ꙗ' => 'Ꙗ',
+ 'ꙙ' => 'Ꙙ',
+ 'ꙛ' => 'Ꙛ',
+ 'ꙝ' => 'Ꙝ',
+ 'ꙟ' => 'Ꙟ',
+ 'ꙡ' => 'Ꙡ',
+ 'ꙣ' => 'Ꙣ',
+ 'ꙥ' => 'Ꙥ',
+ 'ꙧ' => 'Ꙧ',
+ 'ꙩ' => 'Ꙩ',
+ 'ꙫ' => 'Ꙫ',
+ 'ꙭ' => 'Ꙭ',
+ 'ꚁ' => 'Ꚁ',
+ 'ꚃ' => 'Ꚃ',
+ 'ꚅ' => 'Ꚅ',
+ 'ꚇ' => 'Ꚇ',
+ 'ꚉ' => 'Ꚉ',
+ 'ꚋ' => 'Ꚋ',
+ 'ꚍ' => 'Ꚍ',
+ 'ꚏ' => 'Ꚏ',
+ 'ꚑ' => 'Ꚑ',
+ 'ꚓ' => 'Ꚓ',
+ 'ꚕ' => 'Ꚕ',
+ 'ꚗ' => 'Ꚗ',
+ 'ꚙ' => 'Ꚙ',
+ 'ꚛ' => 'Ꚛ',
+ 'ꜣ' => 'Ꜣ',
+ 'ꜥ' => 'Ꜥ',
+ 'ꜧ' => 'Ꜧ',
+ 'ꜩ' => 'Ꜩ',
+ 'ꜫ' => 'Ꜫ',
+ 'ꜭ' => 'Ꜭ',
+ 'ꜯ' => 'Ꜯ',
+ 'ꜳ' => 'Ꜳ',
+ 'ꜵ' => 'Ꜵ',
+ 'ꜷ' => 'Ꜷ',
+ 'ꜹ' => 'Ꜹ',
+ 'ꜻ' => 'Ꜻ',
+ 'ꜽ' => 'Ꜽ',
+ 'ꜿ' => 'Ꜿ',
+ 'ꝁ' => 'Ꝁ',
+ 'ꝃ' => 'Ꝃ',
+ 'ꝅ' => 'Ꝅ',
+ 'ꝇ' => 'Ꝇ',
+ 'ꝉ' => 'Ꝉ',
+ 'ꝋ' => 'Ꝋ',
+ 'ꝍ' => 'Ꝍ',
+ 'ꝏ' => 'Ꝏ',
+ 'ꝑ' => 'Ꝑ',
+ 'ꝓ' => 'Ꝓ',
+ 'ꝕ' => 'Ꝕ',
+ 'ꝗ' => 'Ꝗ',
+ 'ꝙ' => 'Ꝙ',
+ 'ꝛ' => 'Ꝛ',
+ 'ꝝ' => 'Ꝝ',
+ 'ꝟ' => 'Ꝟ',
+ 'ꝡ' => 'Ꝡ',
+ 'ꝣ' => 'Ꝣ',
+ 'ꝥ' => 'Ꝥ',
+ 'ꝧ' => 'Ꝧ',
+ 'ꝩ' => 'Ꝩ',
+ 'ꝫ' => 'Ꝫ',
+ 'ꝭ' => 'Ꝭ',
+ 'ꝯ' => 'Ꝯ',
+ 'ꝺ' => 'Ꝺ',
+ 'ꝼ' => 'Ꝼ',
+ 'ꝿ' => 'Ꝿ',
+ 'ꞁ' => 'Ꞁ',
+ 'ꞃ' => 'Ꞃ',
+ 'ꞅ' => 'Ꞅ',
+ 'ꞇ' => 'Ꞇ',
+ 'ꞌ' => 'Ꞌ',
+ 'ꞑ' => 'Ꞑ',
+ 'ꞓ' => 'Ꞓ',
+ 'ꞔ' => 'Ꞔ',
+ 'ꞗ' => 'Ꞗ',
+ 'ꞙ' => 'Ꞙ',
+ 'ꞛ' => 'Ꞛ',
+ 'ꞝ' => 'Ꞝ',
+ 'ꞟ' => 'Ꞟ',
+ 'ꞡ' => 'Ꞡ',
+ 'ꞣ' => 'Ꞣ',
+ 'ꞥ' => 'Ꞥ',
+ 'ꞧ' => 'Ꞧ',
+ 'ꞩ' => 'Ꞩ',
+ 'ꞵ' => 'Ꞵ',
+ 'ꞷ' => 'Ꞷ',
+ 'ꞹ' => 'Ꞹ',
+ 'ꞻ' => 'Ꞻ',
+ 'ꞽ' => 'Ꞽ',
+ 'ꞿ' => 'Ꞿ',
+ 'ꟃ' => 'Ꟃ',
+ 'ꟈ' => 'Ꟈ',
+ 'ꟊ' => 'Ꟊ',
+ 'ꟶ' => 'Ꟶ',
+ 'ꭓ' => 'Ꭓ',
+ 'ꭰ' => 'Ꭰ',
+ 'ꭱ' => 'Ꭱ',
+ 'ꭲ' => 'Ꭲ',
+ 'ꭳ' => 'Ꭳ',
+ 'ꭴ' => 'Ꭴ',
+ 'ꭵ' => 'Ꭵ',
+ 'ꭶ' => 'Ꭶ',
+ 'ꭷ' => 'Ꭷ',
+ 'ꭸ' => 'Ꭸ',
+ 'ꭹ' => 'Ꭹ',
+ 'ꭺ' => 'Ꭺ',
+ 'ꭻ' => 'Ꭻ',
+ 'ꭼ' => 'Ꭼ',
+ 'ꭽ' => 'Ꭽ',
+ 'ꭾ' => 'Ꭾ',
+ 'ꭿ' => 'Ꭿ',
+ 'ꮀ' => 'Ꮀ',
+ 'ꮁ' => 'Ꮁ',
+ 'ꮂ' => 'Ꮂ',
+ 'ꮃ' => 'Ꮃ',
+ 'ꮄ' => 'Ꮄ',
+ 'ꮅ' => 'Ꮅ',
+ 'ꮆ' => 'Ꮆ',
+ 'ꮇ' => 'Ꮇ',
+ 'ꮈ' => 'Ꮈ',
+ 'ꮉ' => 'Ꮉ',
+ 'ꮊ' => 'Ꮊ',
+ 'ꮋ' => 'Ꮋ',
+ 'ꮌ' => 'Ꮌ',
+ 'ꮍ' => 'Ꮍ',
+ 'ꮎ' => 'Ꮎ',
+ 'ꮏ' => 'Ꮏ',
+ 'ꮐ' => 'Ꮐ',
+ 'ꮑ' => 'Ꮑ',
+ 'ꮒ' => 'Ꮒ',
+ 'ꮓ' => 'Ꮓ',
+ 'ꮔ' => 'Ꮔ',
+ 'ꮕ' => 'Ꮕ',
+ 'ꮖ' => 'Ꮖ',
+ 'ꮗ' => 'Ꮗ',
+ 'ꮘ' => 'Ꮘ',
+ 'ꮙ' => 'Ꮙ',
+ 'ꮚ' => 'Ꮚ',
+ 'ꮛ' => 'Ꮛ',
+ 'ꮜ' => 'Ꮜ',
+ 'ꮝ' => 'Ꮝ',
+ 'ꮞ' => 'Ꮞ',
+ 'ꮟ' => 'Ꮟ',
+ 'ꮠ' => 'Ꮠ',
+ 'ꮡ' => 'Ꮡ',
+ 'ꮢ' => 'Ꮢ',
+ 'ꮣ' => 'Ꮣ',
+ 'ꮤ' => 'Ꮤ',
+ 'ꮥ' => 'Ꮥ',
+ 'ꮦ' => 'Ꮦ',
+ 'ꮧ' => 'Ꮧ',
+ 'ꮨ' => 'Ꮨ',
+ 'ꮩ' => 'Ꮩ',
+ 'ꮪ' => 'Ꮪ',
+ 'ꮫ' => 'Ꮫ',
+ 'ꮬ' => 'Ꮬ',
+ 'ꮭ' => 'Ꮭ',
+ 'ꮮ' => 'Ꮮ',
+ 'ꮯ' => 'Ꮯ',
+ 'ꮰ' => 'Ꮰ',
+ 'ꮱ' => 'Ꮱ',
+ 'ꮲ' => 'Ꮲ',
+ 'ꮳ' => 'Ꮳ',
+ 'ꮴ' => 'Ꮴ',
+ 'ꮵ' => 'Ꮵ',
+ 'ꮶ' => 'Ꮶ',
+ 'ꮷ' => 'Ꮷ',
+ 'ꮸ' => 'Ꮸ',
+ 'ꮹ' => 'Ꮹ',
+ 'ꮺ' => 'Ꮺ',
+ 'ꮻ' => 'Ꮻ',
+ 'ꮼ' => 'Ꮼ',
+ 'ꮽ' => 'Ꮽ',
+ 'ꮾ' => 'Ꮾ',
+ 'ꮿ' => 'Ꮿ',
+ 'a' => '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',
+ '𐐨' => '𐐀',
+ '𐐩' => '𐐁',
+ '𐐪' => '𐐂',
+ '𐐫' => '𐐃',
+ '𐐬' => '𐐄',
+ '𐐭' => '𐐅',
+ '𐐮' => '𐐆',
+ '𐐯' => '𐐇',
+ '𐐰' => '𐐈',
+ '𐐱' => '𐐉',
+ '𐐲' => '𐐊',
+ '𐐳' => '𐐋',
+ '𐐴' => '𐐌',
+ '𐐵' => '𐐍',
+ '𐐶' => '𐐎',
+ '𐐷' => '𐐏',
+ '𐐸' => '𐐐',
+ '𐐹' => '𐐑',
+ '𐐺' => '𐐒',
+ '𐐻' => '𐐓',
+ '𐐼' => '𐐔',
+ '𐐽' => '𐐕',
+ '𐐾' => '𐐖',
+ '𐐿' => '𐐗',
+ '𐑀' => '𐐘',
+ '𐑁' => '𐐙',
+ '𐑂' => '𐐚',
+ '𐑃' => '𐐛',
+ '𐑄' => '𐐜',
+ '𐑅' => '𐐝',
+ '𐑆' => '𐐞',
+ '𐑇' => '𐐟',
+ '𐑈' => '𐐠',
+ '𐑉' => '𐐡',
+ '𐑊' => '𐐢',
+ '𐑋' => '𐐣',
+ '𐑌' => '𐐤',
+ '𐑍' => '𐐥',
+ '𐑎' => '𐐦',
+ '𐑏' => '𐐧',
+ '𐓘' => '𐒰',
+ '𐓙' => '𐒱',
+ '𐓚' => '𐒲',
+ '𐓛' => '𐒳',
+ '𐓜' => '𐒴',
+ '𐓝' => '𐒵',
+ '𐓞' => '𐒶',
+ '𐓟' => '𐒷',
+ '𐓠' => '𐒸',
+ '𐓡' => '𐒹',
+ '𐓢' => '𐒺',
+ '𐓣' => '𐒻',
+ '𐓤' => '𐒼',
+ '𐓥' => '𐒽',
+ '𐓦' => '𐒾',
+ '𐓧' => '𐒿',
+ '𐓨' => '𐓀',
+ '𐓩' => '𐓁',
+ '𐓪' => '𐓂',
+ '𐓫' => '𐓃',
+ '𐓬' => '𐓄',
+ '𐓭' => '𐓅',
+ '𐓮' => '𐓆',
+ '𐓯' => '𐓇',
+ '𐓰' => '𐓈',
+ '𐓱' => '𐓉',
+ '𐓲' => '𐓊',
+ '𐓳' => '𐓋',
+ '𐓴' => '𐓌',
+ '𐓵' => '𐓍',
+ '𐓶' => '𐓎',
+ '𐓷' => '𐓏',
+ '𐓸' => '𐓐',
+ '𐓹' => '𐓑',
+ '𐓺' => '𐓒',
+ '𐓻' => '𐓓',
+ '𐳀' => '𐲀',
+ '𐳁' => '𐲁',
+ '𐳂' => '𐲂',
+ '𐳃' => '𐲃',
+ '𐳄' => '𐲄',
+ '𐳅' => '𐲅',
+ '𐳆' => '𐲆',
+ '𐳇' => '𐲇',
+ '𐳈' => '𐲈',
+ '𐳉' => '𐲉',
+ '𐳊' => '𐲊',
+ '𐳋' => '𐲋',
+ '𐳌' => '𐲌',
+ '𐳍' => '𐲍',
+ '𐳎' => '𐲎',
+ '𐳏' => '𐲏',
+ '𐳐' => '𐲐',
+ '𐳑' => '𐲑',
+ '𐳒' => '𐲒',
+ '𐳓' => '𐲓',
+ '𐳔' => '𐲔',
+ '𐳕' => '𐲕',
+ '𐳖' => '𐲖',
+ '𐳗' => '𐲗',
+ '𐳘' => '𐲘',
+ '𐳙' => '𐲙',
+ '𐳚' => '𐲚',
+ '𐳛' => '𐲛',
+ '𐳜' => '𐲜',
+ '𐳝' => '𐲝',
+ '𐳞' => '𐲞',
+ '𐳟' => '𐲟',
+ '𐳠' => '𐲠',
+ '𐳡' => '𐲡',
+ '𐳢' => '𐲢',
+ '𐳣' => '𐲣',
+ '𐳤' => '𐲤',
+ '𐳥' => '𐲥',
+ '𐳦' => '𐲦',
+ '𐳧' => '𐲧',
+ '𐳨' => '𐲨',
+ '𐳩' => '𐲩',
+ '𐳪' => '𐲪',
+ '𐳫' => '𐲫',
+ '𐳬' => '𐲬',
+ '𐳭' => '𐲭',
+ '𐳮' => '𐲮',
+ '𐳯' => '𐲯',
+ '𐳰' => '𐲰',
+ '𐳱' => '𐲱',
+ '𐳲' => '𐲲',
+ '𑣀' => '𑢠',
+ '𑣁' => '𑢡',
+ '𑣂' => '𑢢',
+ '𑣃' => '𑢣',
+ '𑣄' => '𑢤',
+ '𑣅' => '𑢥',
+ '𑣆' => '𑢦',
+ '𑣇' => '𑢧',
+ '𑣈' => '𑢨',
+ '𑣉' => '𑢩',
+ '𑣊' => '𑢪',
+ '𑣋' => '𑢫',
+ '𑣌' => '𑢬',
+ '𑣍' => '𑢭',
+ '𑣎' => '𑢮',
+ '𑣏' => '𑢯',
+ '𑣐' => '𑢰',
+ '𑣑' => '𑢱',
+ '𑣒' => '𑢲',
+ '𑣓' => '𑢳',
+ '𑣔' => '𑢴',
+ '𑣕' => '𑢵',
+ '𑣖' => '𑢶',
+ '𑣗' => '𑢷',
+ '𑣘' => '𑢸',
+ '𑣙' => '𑢹',
+ '𑣚' => '𑢺',
+ '𑣛' => '𑢻',
+ '𑣜' => '𑢼',
+ '𑣝' => '𑢽',
+ '𑣞' => '𑢾',
+ '𑣟' => '𑢿',
+ '𖹠' => '𖹀',
+ '𖹡' => '𖹁',
+ '𖹢' => '𖹂',
+ '𖹣' => '𖹃',
+ '𖹤' => '𖹄',
+ '𖹥' => '𖹅',
+ '𖹦' => '𖹆',
+ '𖹧' => '𖹇',
+ '𖹨' => '𖹈',
+ '𖹩' => '𖹉',
+ '𖹪' => '𖹊',
+ '𖹫' => '𖹋',
+ '𖹬' => '𖹌',
+ '𖹭' => '𖹍',
+ '𖹮' => '𖹎',
+ '𖹯' => '𖹏',
+ '𖹰' => '𖹐',
+ '𖹱' => '𖹑',
+ '𖹲' => '𖹒',
+ '𖹳' => '𖹓',
+ '𖹴' => '𖹔',
+ '𖹵' => '𖹕',
+ '𖹶' => '𖹖',
+ '𖹷' => '𖹗',
+ '𖹸' => '𖹘',
+ '𖹹' => '𖹙',
+ '𖹺' => '𖹚',
+ '𖹻' => '𖹛',
+ '𖹼' => '𖹜',
+ '𖹽' => '𖹝',
+ '𖹾' => '𖹞',
+ '𖹿' => '𖹟',
+ '𞤢' => '𞤀',
+ '𞤣' => '𞤁',
+ '𞤤' => '𞤂',
+ '𞤥' => '𞤃',
+ '𞤦' => '𞤄',
+ '𞤧' => '𞤅',
+ '𞤨' => '𞤆',
+ '𞤩' => '𞤇',
+ '𞤪' => '𞤈',
+ '𞤫' => '𞤉',
+ '𞤬' => '𞤊',
+ '𞤭' => '𞤋',
+ '𞤮' => '𞤌',
+ '𞤯' => '𞤍',
+ '𞤰' => '𞤎',
+ '𞤱' => '𞤏',
+ '𞤲' => '𞤐',
+ '𞤳' => '𞤑',
+ '𞤴' => '𞤒',
+ '𞤵' => '𞤓',
+ '𞤶' => '𞤔',
+ '𞤷' => '𞤕',
+ '𞤸' => '𞤖',
+ '𞤹' => '𞤗',
+ '𞤺' => '𞤘',
+ '𞤻' => '𞤙',
+ '𞤼' => '𞤚',
+ '𞤽' => '𞤛',
+ '𞤾' => '𞤜',
+ '𞤿' => '𞤝',
+ '𞥀' => '𞤞',
+ '𞥁' => '𞤟',
+ '𞥂' => '𞤠',
+ '𞥃' => '𞤡',
+ 'ß' => 'SS',
+ 'ff' => 'FF',
+ 'fi' => 'FI',
+ 'fl' => 'FL',
+ 'ffi' => 'FFI',
+ 'ffl' => 'FFL',
+ 'ſt' => 'ST',
+ 'st' => 'ST',
+ 'և' => 'ԵՒ',
+ 'ﬓ' => 'ՄՆ',
+ 'ﬔ' => 'ՄԵ',
+ 'ﬕ' => 'ՄԻ',
+ 'ﬖ' => 'ՎՆ',
+ 'ﬗ' => 'ՄԽ',
+ 'ʼn' => 'ʼN',
+ 'ΐ' => 'Ϊ́',
+ 'ΰ' => 'Ϋ́',
+ 'ǰ' => 'J̌',
+ 'ẖ' => 'H̱',
+ 'ẗ' => 'T̈',
+ 'ẘ' => 'W̊',
+ 'ẙ' => 'Y̊',
+ 'ẚ' => 'Aʾ',
+ 'ὐ' => 'Υ̓',
+ 'ὒ' => 'Υ̓̀',
+ 'ὔ' => 'Υ̓́',
+ 'ὖ' => 'Υ̓͂',
+ 'ᾶ' => 'Α͂',
+ 'ῆ' => 'Η͂',
+ 'ῒ' => 'Ϊ̀',
+ 'ΐ' => 'Ϊ́',
+ 'ῖ' => 'Ι͂',
+ 'ῗ' => 'Ϊ͂',
+ 'ῢ' => 'Ϋ̀',
+ 'ΰ' => 'Ϋ́',
+ 'ῤ' => 'Ρ̓',
+ 'ῦ' => 'Υ͂',
+ 'ῧ' => 'Ϋ͂',
+ 'ῶ' => 'Ω͂',
+ 'ᾈ' => 'ἈΙ',
+ 'ᾉ' => 'ἉΙ',
+ 'ᾊ' => 'ἊΙ',
+ 'ᾋ' => 'ἋΙ',
+ 'ᾌ' => 'ἌΙ',
+ 'ᾍ' => 'ἍΙ',
+ 'ᾎ' => 'ἎΙ',
+ 'ᾏ' => 'ἏΙ',
+ 'ᾘ' => 'ἨΙ',
+ 'ᾙ' => 'ἩΙ',
+ 'ᾚ' => 'ἪΙ',
+ 'ᾛ' => 'ἫΙ',
+ 'ᾜ' => 'ἬΙ',
+ 'ᾝ' => 'ἭΙ',
+ 'ᾞ' => 'ἮΙ',
+ 'ᾟ' => 'ἯΙ',
+ 'ᾨ' => 'ὨΙ',
+ 'ᾩ' => 'ὩΙ',
+ 'ᾪ' => 'ὪΙ',
+ 'ᾫ' => 'ὫΙ',
+ 'ᾬ' => 'ὬΙ',
+ 'ᾭ' => 'ὭΙ',
+ 'ᾮ' => 'ὮΙ',
+ 'ᾯ' => 'ὯΙ',
+ 'ᾼ' => 'ΑΙ',
+ 'ῌ' => 'ΗΙ',
+ 'ῼ' => 'ΩΙ',
+ 'ᾲ' => 'ᾺΙ',
+ 'ᾴ' => 'ΆΙ',
+ 'ῂ' => 'ῊΙ',
+ 'ῄ' => 'ΉΙ',
+ 'ῲ' => 'ῺΙ',
+ 'ῴ' => 'ΏΙ',
+ 'ᾷ' => 'Α͂Ι',
+ 'ῇ' => 'Η͂Ι',
+ 'ῷ' => 'Ω͂Ι',
+);
diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php
new file mode 100644
index 000000000..ecf1a0352
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/bootstrap.php
@@ -0,0 +1,151 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * 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 (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/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php
new file mode 100644
index 000000000..2f9fb5b42
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/bootstrap80.php
@@ -0,0 +1,147 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * 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 (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/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json
new file mode 100644
index 000000000..943e50296
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/composer.json
@@ -0,0 +1,41 @@
+{
+ "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": "[email protected]"
+ },
+ {
+ "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": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE
new file mode 100644
index 000000000..0ed3a2465
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2020-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/vendor/symfony/polyfill-php80/Php80.php b/vendor/symfony/polyfill-php80/Php80.php
new file mode 100644
index 000000000..362dd1a95
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Php80.php
@@ -0,0 +1,115 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php80;
+
+/**
+ * @author Ion Bazan <[email protected]>
+ * @author Nico Oelgart <[email protected]>
+ * @author Nicolas Grekas <[email protected]>
+ *
+ * @internal
+ */
+final class Php80
+{
+ public static function fdiv(float $dividend, float $divisor): float
+ {
+ return @($dividend / $divisor);
+ }
+
+ public static function get_debug_type($value): string
+ {
+ switch (true) {
+ case null === $value: return 'null';
+ case \is_bool($value): return 'bool';
+ case \is_string($value): return 'string';
+ case \is_array($value): return 'array';
+ case \is_int($value): return 'int';
+ case \is_float($value): return 'float';
+ case \is_object($value): break;
+ case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
+ default:
+ if (null === $type = @get_resource_type($value)) {
+ return 'unknown';
+ }
+
+ if ('Unknown' === $type) {
+ $type = 'closed';
+ }
+
+ return "resource ($type)";
+ }
+
+ $class = \get_class($value);
+
+ if (false === strpos($class, '@')) {
+ return $class;
+ }
+
+ return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
+ }
+
+ public static function get_resource_id($res): int
+ {
+ if (!\is_resource($res) && null === @get_resource_type($res)) {
+ throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
+ }
+
+ return (int) $res;
+ }
+
+ public static function preg_last_error_msg(): string
+ {
+ switch (preg_last_error()) {
+ case \PREG_INTERNAL_ERROR:
+ return 'Internal error';
+ case \PREG_BAD_UTF8_ERROR:
+ return 'Malformed UTF-8 characters, possibly incorrectly encoded';
+ case \PREG_BAD_UTF8_OFFSET_ERROR:
+ return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
+ case \PREG_BACKTRACK_LIMIT_ERROR:
+ return 'Backtrack limit exhausted';
+ case \PREG_RECURSION_LIMIT_ERROR:
+ return 'Recursion limit exhausted';
+ case \PREG_JIT_STACKLIMIT_ERROR:
+ return 'JIT stack limit exhausted';
+ case \PREG_NO_ERROR:
+ return 'No error';
+ default:
+ return 'Unknown error';
+ }
+ }
+
+ public static function str_contains(string $haystack, string $needle): bool
+ {
+ return '' === $needle || false !== strpos($haystack, $needle);
+ }
+
+ public static function str_starts_with(string $haystack, string $needle): bool
+ {
+ return 0 === strncmp($haystack, $needle, \strlen($needle));
+ }
+
+ public static function str_ends_with(string $haystack, string $needle): bool
+ {
+ if ('' === $needle || $needle === $haystack) {
+ return true;
+ }
+
+ if ('' === $haystack) {
+ return false;
+ }
+
+ $needleLength = \strlen($needle);
+
+ return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/PhpToken.php b/vendor/symfony/polyfill-php80/PhpToken.php
new file mode 100644
index 000000000..fe6e69105
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/PhpToken.php
@@ -0,0 +1,103 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php80;
+
+/**
+ * @author Fedonyuk Anton <[email protected]>
+ *
+ * @internal
+ */
+class PhpToken implements \Stringable
+{
+ /**
+ * @var int
+ */
+ public $id;
+
+ /**
+ * @var string
+ */
+ public $text;
+
+ /**
+ * @var int
+ */
+ public $line;
+
+ /**
+ * @var int
+ */
+ public $pos;
+
+ public function __construct(int $id, string $text, int $line = -1, int $position = -1)
+ {
+ $this->id = $id;
+ $this->text = $text;
+ $this->line = $line;
+ $this->pos = $position;
+ }
+
+ public function getTokenName(): ?string
+ {
+ if ('UNKNOWN' === $name = token_name($this->id)) {
+ $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
+ }
+
+ return $name;
+ }
+
+ /**
+ * @param int|string|array $kind
+ */
+ public function is($kind): bool
+ {
+ foreach ((array) $kind as $value) {
+ if (\in_array($value, [$this->id, $this->text], true)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function isIgnorable(): bool
+ {
+ return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
+ }
+
+ public function __toString(): string
+ {
+ return (string) $this->text;
+ }
+
+ /**
+ * @return static[]
+ */
+ public static function tokenize(string $code, int $flags = 0): array
+ {
+ $line = 1;
+ $position = 0;
+ $tokens = token_get_all($code, $flags);
+ foreach ($tokens as $index => $token) {
+ if (\is_string($token)) {
+ $id = \ord($token);
+ $text = $token;
+ } else {
+ [$id, $text, $line] = $token;
+ }
+ $tokens[$index] = new static($id, $text, $line, $position);
+ $position += \strlen($text);
+ }
+
+ return $tokens;
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/README.md b/vendor/symfony/polyfill-php80/README.md
new file mode 100644
index 000000000..3816c559d
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/README.md
@@ -0,0 +1,25 @@
+Symfony Polyfill / Php80
+========================
+
+This component provides features added to PHP 8.0 core:
+
+- [`Stringable`](https://php.net/stringable) interface
+- [`fdiv`](https://php.net/fdiv)
+- [`ValueError`](https://php.net/valueerror) class
+- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class
+- `FILTER_VALIDATE_BOOL` constant
+- [`get_debug_type`](https://php.net/get_debug_type)
+- [`PhpToken`](https://php.net/phptoken) class
+- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)
+- [`str_contains`](https://php.net/str_contains)
+- [`str_starts_with`](https://php.net/str_starts_with)
+- [`str_ends_with`](https://php.net/str_ends_with)
+- [`get_resource_id`](https://php.net/get_resource_id)
+
+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/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
new file mode 100644
index 000000000..2b955423f
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+#[Attribute(Attribute::TARGET_CLASS)]
+final class Attribute
+{
+ public const TARGET_CLASS = 1;
+ public const TARGET_FUNCTION = 2;
+ public const TARGET_METHOD = 4;
+ public const TARGET_PROPERTY = 8;
+ public const TARGET_CLASS_CONSTANT = 16;
+ public const TARGET_PARAMETER = 32;
+ public const TARGET_ALL = 63;
+ public const IS_REPEATABLE = 64;
+
+ /** @var int */
+ public $flags;
+
+ public function __construct(int $flags = self::TARGET_ALL)
+ {
+ $this->flags = $flags;
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
new file mode 100644
index 000000000..bd1212f6e
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) {
+ class PhpToken extends Symfony\Polyfill\Php80\PhpToken
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
new file mode 100644
index 000000000..7c62d7508
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80000) {
+ interface Stringable
+ {
+ /**
+ * @return string
+ */
+ public function __toString();
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
new file mode 100644
index 000000000..01c6c6c8a
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80000) {
+ class UnhandledMatchError extends Error
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
new file mode 100644
index 000000000..783dbc28c
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80000) {
+ class ValueError extends Error
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/bootstrap.php b/vendor/symfony/polyfill-php80/bootstrap.php
new file mode 100644
index 000000000..e5f7dbc1a
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/bootstrap.php
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php80 as p;
+
+if (\PHP_VERSION_ID >= 80000) {
+ return;
+}
+
+if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
+ define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
+}
+
+if (!function_exists('fdiv')) {
+ function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
+}
+if (!function_exists('preg_last_error_msg')) {
+ function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
+}
+if (!function_exists('str_contains')) {
+ function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('str_starts_with')) {
+ function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('str_ends_with')) {
+ function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('get_debug_type')) {
+ function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
+}
+if (!function_exists('get_resource_id')) {
+ function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
+}
diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json
new file mode 100644
index 000000000..f1801f403
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "symfony/polyfill-php80",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/LICENSE b/vendor/symfony/polyfill-php81/LICENSE
new file mode 100644
index 000000000..99c6bdf35
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2021-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/vendor/symfony/polyfill-php81/Php81.php b/vendor/symfony/polyfill-php81/Php81.php
new file mode 100644
index 000000000..f0507b765
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/Php81.php
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php81;
+
+/**
+ * @author Nicolas Grekas <[email protected]>
+ *
+ * @internal
+ */
+final class Php81
+{
+ public static function array_is_list(array $array): bool
+ {
+ if ([] === $array || $array === array_values($array)) {
+ return true;
+ }
+
+ $nextKey = -1;
+
+ foreach ($array as $k => $v) {
+ if ($k !== ++$nextKey) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/README.md b/vendor/symfony/polyfill-php81/README.md
new file mode 100644
index 000000000..c07ef7820
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/README.md
@@ -0,0 +1,18 @@
+Symfony Polyfill / Php81
+========================
+
+This component provides features added to PHP 8.1 core:
+
+- [`array_is_list`](https://php.net/array_is_list)
+- [`enum_exists`](https://php.net/enum-exists)
+- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
+- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
+- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used)
+
+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/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
new file mode 100644
index 000000000..eb5952ee3
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
@@ -0,0 +1,51 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
+ /**
+ * @property string $data
+ */
+ class CURLStringFile extends CURLFile
+ {
+ private $data;
+
+ public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
+ {
+ $this->data = $data;
+ parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
+ }
+
+ public function __set(string $name, $value): void
+ {
+ if ('data' !== $name) {
+ $this->$name = $value;
+
+ return;
+ }
+
+ if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
+ throw new \TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
+ }
+
+ $this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
+ }
+
+ public function __isset(string $name): bool
+ {
+ return isset($this->$name);
+ }
+
+ public function &__get(string $name)
+ {
+ return $this->$name;
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
new file mode 100644
index 000000000..cb7720a8d
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80100) {
+ #[Attribute(Attribute::TARGET_METHOD)]
+ final class ReturnTypeWillChange
+ {
+ public function __construct()
+ {
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/bootstrap.php b/vendor/symfony/polyfill-php81/bootstrap.php
new file mode 100644
index 000000000..9f872e02f
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/bootstrap.php
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php81 as p;
+
+if (\PHP_VERSION_ID >= 80100) {
+ return;
+}
+
+if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
+ define('MYSQLI_REFRESH_REPLICA', 64);
+}
+
+if (!function_exists('array_is_list')) {
+ function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
+}
+
+if (!function_exists('enum_exists')) {
+ function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
+}
diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json
new file mode 100644
index 000000000..e02d673d4
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "symfony/polyfill-php81",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php81\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/LICENSE b/vendor/symfony/polyfill-php82/LICENSE
new file mode 100644
index 000000000..733c826eb
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/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/vendor/symfony/polyfill-php82/NoDynamicProperties.php b/vendor/symfony/polyfill-php82/NoDynamicProperties.php
new file mode 100644
index 000000000..450deff45
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/NoDynamicProperties.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php82;
+
+/**
+ * @internal
+ */
+trait NoDynamicProperties
+{
+ public function __set(string $name, $value): void
+ {
+ throw new \Error('Cannot create dynamic property '.self::class.'::$'.$name);
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Php82.php b/vendor/symfony/polyfill-php82/Php82.php
new file mode 100644
index 000000000..fcd1281a9
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Php82.php
@@ -0,0 +1,368 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php82;
+
+/**
+ * @author Alexander M. Turek <[email protected]>
+ * @author Greg Roach <[email protected]>
+ *
+ * @internal
+ */
+class Php82
+{
+ /**
+ * Determines if a string matches the ODBC quoting rules.
+ *
+ * A valid quoted string begins with a '{', ends with a '}', and has no '}'
+ * inside of the string that aren't repeated (as to be escaped).
+ *
+ * These rules are what .NET also follows.
+ *
+ * @see https://github.com/php/php-src/blob/838f6bffff6363a204a2597cbfbaad1d7ee3f2b6/main/php_odbc_utils.c#L31-L57
+ */
+ public static function odbc_connection_string_is_quoted(string $str): bool
+ {
+ if ('' === $str || '{' !== $str[0]) {
+ return false;
+ }
+
+ /* Check for } that aren't doubled up or at the end of the string */
+ $length = \strlen($str) - 1;
+ for ($i = 0; $i < $length; ++$i) {
+ if ('}' !== $str[$i]) {
+ continue;
+ }
+
+ if ('}' !== $str[++$i]) {
+ return $i === $length;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Determines if a value for a connection string should be quoted.
+ *
+ * The ODBC specification mentions:
+ * "Because of connection string and initialization file grammar, keywords and
+ * attribute values that contain the characters []{}(),;?*=!@ not enclosed
+ * with braces should be avoided."
+ *
+ * Note that it assumes that the string is *not* already quoted. You should
+ * check beforehand.
+ *
+ * @see https://github.com/php/php-src/blob/838f6bffff6363a204a2597cbfbaad1d7ee3f2b6/main/php_odbc_utils.c#L59-L73
+ */
+ public static function odbc_connection_string_should_quote(string $str): bool
+ {
+ return false !== strpbrk($str, '[]{}(),;?*=!@');
+ }
+
+ public static function odbc_connection_string_quote(string $str): string
+ {
+ return '{'.str_replace('}', '}}', $str).'}';
+ }
+
+ /**
+ * Implementation closely based on the original C code - including the GOTOs
+ * and pointer-style string access.
+ *
+ * @see https://github.com/php/php-src/blob/master/Zend/zend_ini.c
+ */
+ public static function ini_parse_quantity(string $value): int
+ {
+ // Avoid dependency on ctype_space()
+ $ctype_space = " \t\v\r\n\f";
+
+ $str = 0;
+ $str_end = \strlen($value);
+ $digits = $str;
+ $overflow = false;
+
+ /* Ignore leading whitespace, but keep it for error messages. */
+ while ($digits < $str_end && false !== strpos($ctype_space, $value[$digits])) {
+ ++$digits;
+ }
+
+ /* Ignore trailing whitespace, but keep it for error messages. */
+ while ($digits < $str_end && false !== strpos($ctype_space, $value[$str_end - 1])) {
+ --$str_end;
+ }
+
+ if ($digits === $str_end) {
+ return 0;
+ }
+
+ $is_negative = false;
+
+ if ('+' === $value[$digits]) {
+ ++$digits;
+ } elseif ('-' === $value[$digits]) {
+ $is_negative = true;
+ ++$digits;
+ }
+
+ if ($value[$digits] < '0' || $value[$digits] > 9) {
+ $message = sprintf(
+ 'Invalid quantity "%s": no valid leading digits, interpreting as "0" for backwards compatibility',
+ self::escapeString($value)
+ );
+
+ trigger_error($message, \E_USER_WARNING);
+
+ return 0;
+ }
+
+ $base = 10;
+ $allowed_digits = '0123456789';
+
+ if ('0' === $value[$digits] && ($digits + 1 === $str_end || false === strpos($allowed_digits, $value[$digits + 1]))) {
+ if ($digits + 1 === $str_end) {
+ return 0;
+ }
+
+ switch ($value[$digits + 1]) {
+ case 'g':
+ case 'G':
+ case 'm':
+ case 'M':
+ case 'k':
+ case 'K':
+ goto evaluation;
+ case 'x':
+ case 'X':
+ $base = 16;
+ $allowed_digits = '0123456789abcdefABCDEF';
+ break;
+ case 'o':
+ case 'O':
+ $base = 8;
+ $allowed_digits = '01234567';
+ break;
+ case 'b':
+ case 'B':
+ $base = 2;
+ $allowed_digits = '01';
+ break;
+ default:
+ $message = sprintf(
+ 'Invalid prefix "0%s", interpreting as "0" for backwards compatibility',
+ $value[$digits + 1]
+ );
+ trigger_error($message, \E_USER_WARNING);
+
+ return 0;
+ }
+
+ $digits += 2;
+ if ($digits === $str_end) {
+ $message = sprintf(
+ 'Invalid quantity "%s": no digits after base prefix, interpreting as "0" for backwards compatibility',
+ self::escapeString($value)
+ );
+ trigger_error($message, \E_USER_WARNING);
+
+ return 0;
+ }
+ }
+
+ evaluation:
+
+ if (10 === $base && '0' === $value[$digits]) {
+ $base = 8;
+ $allowed_digits = '01234567';
+ }
+
+ while ($digits < $str_end && ' ' === $value[$digits]) {
+ ++$digits;
+ }
+
+ if ($digits < $str_end && '+' === $value[$digits]) {
+ ++$digits;
+ } elseif ($digits < $str_end && '-' === $value[$digits]) {
+ $is_negative = true;
+ $overflow = true;
+ ++$digits;
+ }
+
+ $digits_end = $digits;
+
+ // The native function treats 0x0x123 the same as 0x123. This is a bug which we must replicate.
+ if (
+ 16 === $base
+ && $digits_end + 2 < $str_end
+ && '0x' === substr($value, $digits_end, 2)
+ && false !== strpos($allowed_digits, $value[$digits_end + 2])
+ ) {
+ $digits_end += 2;
+ }
+
+ while ($digits_end < $str_end && false !== strpos($allowed_digits, $value[$digits_end])) {
+ ++$digits_end;
+ }
+
+ $retval = base_convert(substr($value, $digits, $digits_end - $digits), $base, 10);
+
+ if ($is_negative && '0' === $retval) {
+ $is_negative = false;
+ $overflow = false;
+ }
+
+ // Check for overflow - remember that -PHP_INT_MIN = 1 + PHP_INT_MAX
+ if ($is_negative) {
+ $signed_max = strtr((string) \PHP_INT_MIN, ['-' => '']);
+ } else {
+ $signed_max = (string) \PHP_INT_MAX;
+ }
+
+ $max_length = max(\strlen($retval), \strlen($signed_max));
+
+ $tmp1 = str_pad($retval, $max_length, '0', \STR_PAD_LEFT);
+ $tmp2 = str_pad($signed_max, $max_length, '0', \STR_PAD_LEFT);
+
+ if ($tmp1 > $tmp2) {
+ $retval = -1;
+ $overflow = true;
+ } elseif ($is_negative) {
+ $retval = '-'.$retval;
+ }
+
+ $retval = (int) $retval;
+
+ if ($digits_end === $digits) {
+ $message = sprintf(
+ 'Invalid quantity "%s": no valid leading digits, interpreting as "0" for backwards compatibility',
+ self::escapeString($value)
+ );
+ trigger_error($message, \E_USER_WARNING);
+
+ return 0;
+ }
+
+ /* Allow for whitespace between integer portion and any suffix character */
+ while ($digits_end < $str_end && false !== strpos($ctype_space, $value[$digits_end])) {
+ ++$digits_end;
+ }
+
+ /* No exponent suffix. */
+ if ($digits_end === $str_end) {
+ goto end;
+ }
+
+ switch ($value[$str_end - 1]) {
+ case 'g':
+ case 'G':
+ $shift = 30;
+ break;
+ case 'm':
+ case 'M':
+ $shift = 20;
+ break;
+ case 'k':
+ case 'K':
+ $shift = 10;
+ break;
+ default:
+ /* Unknown suffix */
+ $invalid = self::escapeString($value);
+ $interpreted = self::escapeString(substr($value, $str, $digits_end - $str));
+ $chr = self::escapeString($value[$str_end - 1]);
+
+ $message = sprintf(
+ 'Invalid quantity "%s": unknown multiplier "%s", interpreting as "%s" for backwards compatibility',
+ $invalid,
+ $chr,
+ $interpreted
+ );
+
+ trigger_error($message, \E_USER_WARNING);
+
+ return $retval;
+ }
+
+ $factor = 1 << $shift;
+
+ if (!$overflow) {
+ if ($retval > 0) {
+ $overflow = $retval > \PHP_INT_MAX / $factor;
+ } else {
+ $overflow = $retval < \PHP_INT_MIN / $factor;
+ }
+ }
+
+ if (\is_float($retval * $factor)) {
+ $overflow = true;
+ $retval <<= $shift;
+ } else {
+ $retval *= $factor;
+ }
+
+ if ($digits_end !== $str_end - 1) {
+ /* More than one character in suffix */
+ $message = sprintf(
+ 'Invalid quantity "%s", interpreting as "%s%s" for backwards compatibility',
+ self::escapeString($value),
+ self::escapeString(substr($value, $str, $digits_end - $str)),
+ self::escapeString($value[$str_end - 1])
+ );
+ trigger_error($message, \E_USER_WARNING);
+
+ return $retval;
+ }
+
+ end:
+
+ if ($overflow) {
+ /* Not specifying the resulting value here because the caller may make
+ * additional conversions. Not specifying the allowed range
+ * because the caller may do narrower range checks. */
+ $message = sprintf(
+ 'Invalid quantity "%s": value is out of range, using overflow result for backwards compatibility',
+ self::escapeString($value)
+ );
+ trigger_error($message, \E_USER_WARNING);
+ }
+
+ return $retval;
+ }
+
+ /**
+ * Escape the string to avoid null bytes and to make non-printable chars visible.
+ */
+ private static function escapeString(string $string): string
+ {
+ $escaped = '';
+
+ for ($n = 0, $len = \strlen($string); $n < $len; ++$n) {
+ $c = \ord($string[$n]);
+
+ if ($c < 32 || '\\' === $string[$n] || $c > 126) {
+ switch ($string[$n]) {
+ case "\n": $escaped .= '\\n'; break;
+ case "\r": $escaped .= '\\r'; break;
+ case "\t": $escaped .= '\\t'; break;
+ case "\f": $escaped .= '\\f'; break;
+ case "\v": $escaped .= '\\v'; break;
+ case '\\': $escaped .= '\\\\'; break;
+ case "\x1B": $escaped .= '\\e'; break;
+ default:
+ $escaped .= '\\x'.strtoupper(sprintf('%02x', $c));
+ }
+ } else {
+ $escaped .= $string[$n];
+ }
+ }
+
+ return $escaped;
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/README.md b/vendor/symfony/polyfill-php82/README.md
new file mode 100644
index 000000000..b3191557a
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/README.md
@@ -0,0 +1,23 @@
+Symfony Polyfill / Php82
+========================
+
+This component provides features added to PHP 8.2 core:
+
+- [`AllowDynamicProperties`](https://wiki.php.net/rfc/deprecate_dynamic_properties)
+- [`SensitiveParameter`](https://wiki.php.net/rfc/redact_parameters_in_back_traces)
+- [`SensitiveParameterValue`](https://wiki.php.net/rfc/redact_parameters_in_back_traces)
+- [`Random\Engine`](https://wiki.php.net/rfc/rng_extension)
+- [`Random\Engine\CryptoSafeEngine`](https://wiki.php.net/rfc/rng_extension)
+- [`Random\Engine\Secure`](https://wiki.php.net/rfc/rng_extension) (check [arokettu/random-polyfill](https://packagist.org/packages/arokettu/random-polyfill) for more engines)
+- [`odbc_connection_string_is_quoted()`](https://php.net/odbc_connection_string_is_quoted)
+- [`odbc_connection_string_should_quote()`](https://php.net/odbc_connection_string_should_quote)
+- [`odbc_connection_string_quote()`](https://php.net/odbc_connection_string_quote)
+- [`ini_parse_quantity()`](https://php.net/ini_parse_quantity)
+
+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/vendor/symfony/polyfill-php82/Random/Engine/Secure.php b/vendor/symfony/polyfill-php82/Random/Engine/Secure.php
new file mode 100644
index 000000000..5565386c2
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Random/Engine/Secure.php
@@ -0,0 +1,50 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php82\Random\Engine;
+
+use Random\RandomException;
+use Symfony\Polyfill\Php82\NoDynamicProperties;
+
+/**
+ * @author Tim Düsterhus <[email protected]>
+ * @author Anton Smirnov <[email protected]>
+ *
+ * @internal
+ */
+class Secure
+{
+ use NoDynamicProperties;
+
+ public function generate(): string
+ {
+ try {
+ return random_bytes(\PHP_INT_SIZE);
+ } catch (\Exception $e) {
+ throw new RandomException($e->getMessage(), $e->getCode(), $e->getPrevious());
+ }
+ }
+
+ public function __sleep(): array
+ {
+ throw new \Exception("Serialization of 'Random\Engine\Secure' is not allowed");
+ }
+
+ public function __wakeup(): void
+ {
+ throw new \Exception("Unserialization of 'Random\Engine\Secure' is not allowed");
+ }
+
+ public function __clone()
+ {
+ throw new \Error('Trying to clone an uncloneable object of class Random\Engine\Secure');
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php b/vendor/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php
new file mode 100644
index 000000000..d216e0ade
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80200) {
+ #[Attribute(Attribute::TARGET_CLASS)]
+ final class AllowDynamicProperties
+ {
+ public function __construct()
+ {
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php
new file mode 100644
index 000000000..971ed570d
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/BrokenRandomEngineError.php
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random;
+
+if (\PHP_VERSION_ID < 80200) {
+ class BrokenRandomEngineError extends RandomError
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php
new file mode 100644
index 000000000..fb32496f1
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/CryptoSafeEngine.php
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random;
+
+if (\PHP_VERSION_ID < 80200) {
+ interface CryptoSafeEngine extends Engine
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine.php
new file mode 100644
index 000000000..4fc78c8fb
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random;
+
+if (\PHP_VERSION_ID < 80200) {
+ interface Engine
+ {
+ public function generate(): string;
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php
new file mode 100644
index 000000000..e779b5445
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/Engine/Secure.php
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random\Engine;
+
+use Symfony\Polyfill\Php82 as p;
+
+if (\PHP_VERSION_ID < 80200) {
+ final class Secure extends p\Random\Engine\Secure implements \Random\CryptoSafeEngine
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php
new file mode 100644
index 000000000..bf5e89e01
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomError.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random;
+
+use Symfony\Polyfill\Php82\NoDynamicProperties;
+
+if (\PHP_VERSION_ID < 80200) {
+ class RandomError extends \Error
+ {
+ use NoDynamicProperties;
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php b/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php
new file mode 100644
index 000000000..3b9aae140
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/Random/RandomException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Random;
+
+use Symfony\Polyfill\Php82\NoDynamicProperties;
+
+if (\PHP_VERSION_ID < 80200) {
+ class RandomException extends \Exception
+ {
+ use NoDynamicProperties;
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php b/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php
new file mode 100644
index 000000000..aea4dfbdd
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameter.php
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80200) {
+ #[Attribute(Attribute::TARGET_PARAMETER)]
+ final class SensitiveParameter
+ {
+ public function __construct()
+ {
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php b/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php
new file mode 100644
index 000000000..8349170b6
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/Resources/stubs/SensitiveParameterValue.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 80200) {
+ final class SensitiveParameterValue extends Symfony\Polyfill\Php82\SensitiveParameterValue
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/SensitiveParameterValue.php b/vendor/symfony/polyfill-php82/SensitiveParameterValue.php
new file mode 100644
index 000000000..944c0a659
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/SensitiveParameterValue.php
@@ -0,0 +1,47 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php82;
+
+/**
+ * @author Tim Düsterhus <[email protected]>
+ *
+ * @internal
+ */
+class SensitiveParameterValue
+{
+ private $value;
+
+ public function __construct($value)
+ {
+ $this->value = $value;
+ }
+
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ public function __debugInfo(): array
+ {
+ return [];
+ }
+
+ public function __sleep(): array
+ {
+ throw new \Exception("Serialization of 'SensitiveParameterValue' is not allowed");
+ }
+
+ public function __wakeup(): void
+ {
+ throw new \Exception("Unserialization of 'SensitiveParameterValue' is not allowed");
+ }
+}
diff --git a/vendor/symfony/polyfill-php82/bootstrap.php b/vendor/symfony/polyfill-php82/bootstrap.php
new file mode 100644
index 000000000..f875f3947
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/bootstrap.php
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php82 as p;
+
+if (\PHP_VERSION_ID >= 80200) {
+ return;
+}
+
+if (!extension_loaded('odbc')) {
+ return;
+}
+
+if (!function_exists('odbc_connection_string_is_quoted')) {
+ function odbc_connection_string_is_quoted(string $str): bool { return p\Php82::odbc_connection_string_is_quoted($str); }
+}
+
+if (!function_exists('odbc_connection_string_should_quote')) {
+ function odbc_connection_string_should_quote(string $str): bool { return p\Php82::odbc_connection_string_should_quote($str); }
+}
+
+if (!function_exists('odbc_connection_string_quote')) {
+ function odbc_connection_string_quote(string $str): string { return p\Php82::odbc_connection_string_quote($str); }
+}
+
+if (!function_exists('ini_parse_quantity')) {
+ function ini_parse_quantity(string $shorthand): int { return p\Php82::ini_parse_quantity($shorthand); }
+}
diff --git a/vendor/symfony/polyfill-php82/composer.json b/vendor/symfony/polyfill-php82/composer.json
new file mode 100644
index 000000000..e0422658a
--- /dev/null
+++ b/vendor/symfony/polyfill-php82/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "symfony/polyfill-php82",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php82\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}