exp: jaeger tracing

jaeger-tracing
Andrew Dolgov 6 months ago
parent a37eab2610
commit 8f3646a9c9
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
  1. 33
      backend.php
  2. 11
      classes/counters.php
  3. 8
      classes/feeds.php
  4. 4
      classes/pref/feeds.php
  5. 3
      classes/rpc.php
  6. 49
      classes/tracer.php
  7. 3
      composer.json
  8. 259
      composer.lock
  9. 18
      vendor/autoload.php
  10. 156
      vendor/composer/ClassLoader.php
  11. 564
      vendor/composer/InstalledVersions.php
  12. 2
      vendor/composer/LICENSE
  13. 2
      vendor/composer/autoload_classmap.php
  14. 9
      vendor/composer/autoload_files.php
  15. 2
      vendor/composer/autoload_namespaces.php
  16. 7
      vendor/composer/autoload_psr4.php
  17. 49
      vendor/composer/autoload_real.php
  18. 38
      vendor/composer/autoload_static.php
  19. 270
      vendor/composer/installed.json
  20. 847
      vendor/composer/installed.php
  21. 16
      vendor/jonahgeorge/jaeger-client-php/.editorconfig
  22. 44
      vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml
  23. 17
      vendor/jonahgeorge/jaeger-client-php/.gitignore
  24. 3
      vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md
  25. 21
      vendor/jonahgeorge/jaeger-client-php/LICENSE
  26. 219
      vendor/jonahgeorge/jaeger-client-php/README.md
  27. 2
      vendor/jonahgeorge/jaeger-client-php/build/.gitignore
  28. 62
      vendor/jonahgeorge/jaeger-client-php/composer.json
  29. 26
      vendor/jonahgeorge/jaeger-client-php/examples/config.php
  30. 51
      vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php
  31. 37
      vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist
  32. 47
      vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist
  33. 27
      vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh
  34. 27
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php
  35. 39
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php
  36. 36
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php
  37. 41
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php
  38. 184
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php
  39. 85
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php
  40. 390
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php
  41. 100
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php
  42. 171
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php
  43. 51
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php
  44. 47
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php
  45. 35
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php
  46. 51
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php
  47. 32
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php
  48. 46
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php
  49. 28
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php
  50. 23
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php
  51. 35
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php
  52. 44
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php
  53. 10
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php
  54. 46
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php
  55. 68
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
  56. 88
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php
  57. 62
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php
  58. 29
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php
  59. 71
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php
  60. 45
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php
  61. 236
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php
  62. 12
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php
  63. 305
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php
  64. 476
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php
  65. 120
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
  66. 76
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php
  67. 30
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php
  68. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php
  69. 60
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php
  70. 83
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php
  71. 27
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php
  72. 55
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php
  73. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php
  74. 65
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php
  75. 83
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php
  76. 31
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php
  77. 55
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php
  78. 60
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php
  79. 61
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php
  80. 105
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php
  81. 31
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php
  82. 74
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php
  83. 55
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php
  84. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php
  85. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php
  86. 66
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php
  87. 88
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php
  88. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php
  89. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php
  90. 83
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php
  91. 27
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php
  92. 55
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php
  93. 56
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php
  94. 86
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php
  95. 28
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php
  96. 65
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php
  97. 87
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php
  98. 38
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php
  99. 106
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php
  100. 246
      vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -30,11 +30,16 @@
$op = (string)clean($op);
$method = (string)clean($method);
$scope = Tracer::start(__FILE__, ['tags' => $_REQUEST]);
startup_gettext();
$script_started = microtime(true);
if (!init_plugins()) return;
if (!init_plugins()) {
$scope->close();
return;
}
header("Content-Type: text/json; charset=utf-8");
@ -46,6 +51,8 @@
if (!\Sessions\validate_session()) {
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$scope->close();
return;
}
UserHelper::load_user_plugins($_SESSION["uid"]);
@ -53,6 +60,7 @@
if (Config::is_migration_needed()) {
print Errors::to_json(Errors::E_SCHEMA_MISMATCH);
$scope->close();
return;
}
@ -114,6 +122,7 @@
user_error("Refusing to invoke method $method of handler $op which starts with underscore.", E_USER_WARNING);
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$scope->close();
return;
}
@ -125,11 +134,19 @@
}
if (implements_interface($handler, 'IHandler')) {
$h_scope = Tracer::start("construct/$op");
$handler->__construct($_REQUEST);
$h_scope->close();
if (validate_csrf($csrf_token) || $handler->csrf_ignore($method)) {
if ($handler->before($method)) {
$b_scope = Tracer::start("before/$method");
$before = $handler->before($method);
$b_scope->close();
if ($before) {
if ($method && method_exists($handler, $method)) {
$m_scope = Tracer::start("method/$method");
$reflection = new ReflectionMethod($handler, $method);
if ($reflection->getNumberOfRequiredParameters() == 0) {
@ -139,6 +156,7 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
}
$m_scope->close();
} else {
if (method_exists($handler, "catchall")) {
$handler->catchall($method);
@ -147,17 +165,26 @@
print Errors::to_json(Errors::E_UNKNOWN_METHOD, ["info" => get_class($handler) . "->$method"]);
}
}
$a_scope = Tracer::start("after/$method");
$handler->after();
$a_scope->close();
$scope->close();
return;
} else {
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$scope->close();
return;
}
} else {
user_error("Refusing to invoke method $method of handler $op with invalid CSRF token.", E_USER_WARNING);
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$scope->close();
return;
}
}
@ -166,4 +193,4 @@
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNKNOWN_METHOD, [ "info" => (isset($handler) ? get_class($handler) : "UNKNOWN:".$op) . "->$method"]);
?>
$scope->close();

@ -145,6 +145,7 @@ class Counters {
* @return array<int, array<string, int|string>>
*/
private static function get_feeds(array $feed_ids = null): array {
$scope = Tracer::start(__FUNCTION__);
$ret = [];
@ -211,6 +212,8 @@ class Counters {
}
$scope->close();
return $ret;
}
@ -218,6 +221,8 @@ class Counters {
* @return array<int, array<string, int|string>>
*/
private static function get_global(): array {
$scope = Tracer::start(__FUNCTION__);
$ret = [
[
"id" => "global-unread",
@ -234,6 +239,8 @@ class Counters {
"counter" => $subcribed_feeds
]);
$scope->close();
return $ret;
}
@ -241,6 +248,7 @@ class Counters {
* @return array<int, array<string, int|string>>
*/
private static function get_virt(): array {
$scope = Tracer::start(__FUNCTION__);
$ret = [];
@ -287,6 +295,7 @@ class Counters {
}
}
$scope->close();
return $ret;
}
@ -295,6 +304,7 @@ class Counters {
* @return array<int, array<string, int|string>>
*/
static function get_labels(array $label_ids = null): array {
$scope = Tracer::start(__FUNCTION__);
$ret = [];
@ -346,6 +356,7 @@ class Counters {
array_push($ret, $cv);
}
$scope->close();
return $ret;
}
}

@ -987,6 +987,7 @@ 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(__FUNCTION__, ['tags' => ['args' => json_encode(func_get_args())]]);
$n_feed = (int) $feed;
$need_entries = false;
@ -1010,11 +1011,14 @@ class Feeds extends Handler_Protected {
$handler = PluginHost::getInstance()->get_feed_handler($feed_id);
if (implements_interface($handler, 'IVirtualFeed')) {
/** @var IVirtualFeed $handler */
$scope->close();
return $handler->get_unread($feed_id);
} else {
$scope->close();
return 0;
}
} else if ($n_feed == Feeds::FEED_RECENTLY_READ) {
$scope->close();
return 0;
// tags
} else if ($feed != "0" && $n_feed == 0) {
@ -1028,6 +1032,7 @@ class Feeds extends Handler_Protected {
$row = $sth->fetch();
// Handle 'SUM()' returning null if there are no results
$scope->close();
return $row["count"] ?? 0;
} else if ($n_feed == Feeds::FEED_STARRED) {
@ -1061,6 +1066,7 @@ class Feeds extends Handler_Protected {
$label_id = Labels::feed_to_label_id($feed);
$scope->close();
return self::_get_label_unread($label_id, $owner_uid);
}
@ -1080,6 +1086,7 @@ class Feeds extends Handler_Protected {
$sth->execute([$owner_uid]);
$row = $sth->fetch();
$scope->close();
return $row["unread"];
} else {
@ -1092,6 +1099,7 @@ class Feeds extends Handler_Protected {
$sth->execute([$feed, $owner_uid]);
$row = $sth->fetch();
$scope->close();
return $row["unread"];
}
}

@ -1104,12 +1104,16 @@ 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(__FUNCTION__, ['tags' => ['args' => json_encode(func_get_args())]]);
if (!$title)
$title = Feeds::_get_title($feed_id, false);
if ($unread === false)
$unread = Feeds::_get_counters($feed_id, false, true);
$scope->close();
return [
'id' => 'FEED:' . $feed_id,
'name' => $title,

@ -106,6 +106,8 @@ class RPC extends Handler_Protected {
}
function getAllCounters(): void {
$scope = Tracer::start(__FUNCTION__);
@$seq = (int) $_REQUEST['seq'];
$feed_id_count = (int) ($_REQUEST["feed_id_count"] ?? -1);
@ -132,6 +134,7 @@ class RPC extends Handler_Protected {
'seq' => $seq
];
$scope->close();
print json_encode($reply);
}

@ -0,0 +1,49 @@
<?php
use OpenTracing\GlobalTracer;
use OpenTracing\Scope;
class Tracer {
private static $instance;
public function __construct() {
$config = new \Jaeger\Config(
[
'sampler' => [
'type' => \Jaeger\SAMPLER_TYPE_CONST,
'param' => true,
],
'logging' => true,
"local_agent" => [
"reporting_host" => "172.17.172.39",
"reporting_port" => 6832
],
'dispatch_mode' => \Jaeger\Config::JAEGER_OVER_BINARY_UDP,
],
'tt-rss'
);
$config->initializeTracer();
register_shutdown_function(function() {
$tracer = GlobalTracer::get();
$tracer->flush();
});
}
private function _start(string $name, array $options = []) {
$tracer = GlobalTracer::get();
return $tracer->startActiveSpan($name, $options);
}
public static function start(string $name, array $options = []) : Scope {
return self::get_instance()->_start($name, $options);
}
public static function get_instance() : Tracer {
if (self::$instance == null)
self::$instance = new self();
return self::$instance;
}
}

@ -13,7 +13,8 @@
"spomky-labs/otphp": "^10.0",
"chillerlan/php-qrcode": "^4.3.3",
"mervick/material-design-icons": "^2.2",
"j4mie/idiorm": "dev-master"
"j4mie/idiorm": "dev-master",
"jonahgeorge/jaeger-client-php": "^1.4"
},
"require-dev": {
"phpstan/phpstan": "1.10.3",

259
composer.lock generated

@ -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": "d2be3e2749aff1bebf6257ecbfd6dcb3",
"content-hash": "de4af0d5d452fc73fe4f5d584163af9a",
"packages": [
{
"name": "beberlei/assert",
@ -280,6 +280,74 @@
},
"time": "2022-03-26T15:19:01+00:00"
},
{
"name": "jonahgeorge/jaeger-client-php",
"version": "v1.4.4",
"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"
},
"type": "library",
"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": "jcchavezs@gmail.com"
},
{
"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"
},
"time": "2023-01-31T13:40:20+00:00"
},
{
"name": "mervick/material-design-icons",
"version": "2.2.0",
@ -323,6 +391,94 @@
},
"time": "2016-02-22T01:05:40+00:00"
},
{
"name": "opentracing/opentracing",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/opentracing/opentracing-php.git",
"reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentracing/opentracing-php/zipball/cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
"reference": "cd60bd1fb2a25280600bc74c7f9e0c13881a9116",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "~0.12",
"phpunit/phpunit": "^7.0 || ^9.0",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
"autoload": {
"files": [
"src/OpenTracing/Tags.php",
"src/OpenTracing/Formats.php"
],
"psr-4": {
"OpenTracing\\": "src/OpenTracing/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "José Carlos Chávez",
"email": "jcchavezs@gmail.com"
}
],
"description": "OpenTracing API for PHP",
"support": {
"issues": "https://github.com/opentracing/opentracing-php/issues",
"source": "https://github.com/opentracing/opentracing-php/tree/1.0.2"
},
"time": "2022-01-27T19:59:21+00:00"
},
{
"name": "packaged/thrift",
"version": "0.13.01",
"source": {
"type": "git",
"url": "https://github.com/packaged/thrift.git",
"reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/packaged/thrift/zipball/e3dbcfb79e319971d64264ffe9c340590cc8a228",
"reference": "e3dbcfb79e319971d64264ffe9c340590cc8a228",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0 || ^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Thrift\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"description": "Apache Thrift",
"homepage": "http://thrift.apache.org/",
"keywords": [
"apache",
"thrift"
],
"support": {
"issues": "https://github.com/packaged/thrift/issues",
"source": "https://github.com/packaged/thrift/tree/0.13.01"
},
"time": "2021-01-25T13:32:28+00:00"
},
{
"name": "paragonie/constant_time_encoding",
"version": "v2.6.3",
@ -390,6 +546,105 @@
},
"time": "2022-06-14T06:56:20+00:00"
},
{
"name": "psr/cache",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Cache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
"keywords": [
"cache",
"psr",
"psr-6"
],
"support": {
"source": "https://github.com/php-fig/cache/tree/3.0.0"
},
"time": "2021-02-03T23:26:27+00:00"
},
{
"name": "psr/log",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"time": "2021-07-14T16:46:02+00:00"
},
{
"name": "spomky-labs/otphp",
"version": "v10.0.3",
@ -2690,5 +2945,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.0.0"
}

@ -2,24 +2,6 @@
// 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();

@ -42,79 +42,30 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@ -124,47 +75,28 @@ class ClassLoader
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
@ -179,11 +111,9 @@ 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 string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
@ -226,13 +156,11 @@ 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 string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @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
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@ -276,10 +204,8 @@ 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 string[]|string $paths The PSR-0 base directories
*
* @return void
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
@ -294,12 +220,10 @@ 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 string[]|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -319,8 +243,6 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -343,8 +265,6 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -365,8 +285,6 @@ 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)
{
@ -387,18 +305,14 @@ 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) {
return;
}
if ($prepend) {
//no-op
} elseif ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
@ -408,8 +322,6 @@ class ClassLoader
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
@ -424,18 +336,15 @@ class ClassLoader
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
includeFile($file);
return true;
}
return null;
}
/**
@ -490,11 +399,6 @@ class ClassLoader
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -560,26 +464,14 @@ class ClassLoader
return false;
}
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

@ -18,29 +18,459 @@ use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
* To require it's presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<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 $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',
),
),
);
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();
/**
@ -56,6 +486,7 @@ class InstalledVersions
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];