From 3ce41e3fa9e2663043f26e65547dd49609ffe9f2 Mon Sep 17 00:00:00 2001 From: Leo Cavalcante Date: Tue, 11 Jul 2023 21:53:41 -0300 Subject: [PATCH 01/27] Create README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..42c26f6 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Hyperf Tracer + +🐾 Drop-in replacement for the Hyperf Tracer component. + +Suited for special needs. From 05afe003f6499feb66deab9fb59eb5f8498e38b7 Mon Sep 17 00:00:00 2001 From: leocavalcante Date: Wed, 12 Jul 2023 21:36:50 -0300 Subject: [PATCH 02/27] feat: bring changes --- .github/workflows/close-pull-request.yml | 13 - .github/workflows/release.yml | 25 - .gitignore | 2 + .php-cs-fixer.php | 99 + LICENSE | 2 +- class_map/Map.php | 9 +- class_map/SpanContext.php | 98 + class_map/ThriftUdpTransport.php | 42 +- composer.json | 38 +- composer.lock | 7203 ++++++++++++++++++++ phpstan.neon | 11 + phpunit.xml | 21 + publish/opentracing.php | 8 +- rector.php | 31 + src/Adapter/HttpClientFactory.php | 8 +- src/Adapter/JaegerTracerFactory.php | 8 +- src/Adapter/NoopTracerFactory.php | 24 + src/Adapter/ZipkinTracerFactory.php | 8 +- src/Annotation/Trace.php | 8 +- src/Aspect/DbAspect.php | 10 +- src/Aspect/ElasticserachAspect.php | 8 +- src/Aspect/HttpClientAspect.php | 112 +- src/Aspect/JsonRpcAspect.php | 9 +- src/Aspect/MethodAspect.php | 8 +- src/Aspect/MongoCollectionAspect.php | 121 + src/Aspect/RedisAspect.php | 12 +- src/Aspect/TraceAnnotationAspect.php | 8 +- src/ConfigProvider.php | 16 +- src/Contract/NamedFactoryInterface.php | 8 +- src/Exception/InvalidArgumentException.php | 8 +- src/ExceptionAppender.php | 31 + src/Listener/DbQueryExecutedListener.php | 18 +- src/Middleware/TraceMiddleware.php | 101 +- src/SpanStarter.php | 66 +- src/SpanTagManager.php | 14 +- src/SpanTagManagerFactory.php | 8 +- src/Support/Uri.php | 30 + src/Support/Uuid.php | 30 + src/SwitchManager.php | 13 +- src/SwitchManagerFactory.php | 8 +- src/TracerFactory.php | 21 +- tests/TraceMiddlewareTest.php | 80 + tests/TracerFactoryTest.php | 124 +- tests/UriTest.php | 48 + tests/UuidTest.php | 31 + tests/bootstrap.php | 14 + 46 files changed, 8272 insertions(+), 343 deletions(-) delete mode 100644 .github/workflows/close-pull-request.yml delete mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 .php-cs-fixer.php create mode 100644 class_map/SpanContext.php create mode 100644 composer.lock create mode 100644 phpstan.neon create mode 100644 phpunit.xml create mode 100644 rector.php create mode 100644 src/Adapter/NoopTracerFactory.php create mode 100644 src/Aspect/MongoCollectionAspect.php create mode 100644 src/ExceptionAppender.php create mode 100644 src/Support/Uri.php create mode 100644 src/Support/Uuid.php create mode 100644 tests/TraceMiddlewareTest.php create mode 100644 tests/UriTest.php create mode 100644 tests/UuidTest.php create mode 100644 tests/bootstrap.php diff --git a/.github/workflows/close-pull-request.yml b/.github/workflows/close-pull-request.yml deleted file mode 100644 index 591822c..0000000 --- a/.github/workflows/close-pull-request.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Close Pull Request - -on: - pull_request_target: - types: [opened] - -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: "Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks! " diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0f7d23f..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -name: Release - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b47ecda --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.cache +vendor/ diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 0000000..1b4f0b7 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,99 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + '@Symfony' => true, + '@DoctrineAnnotation' => true, + '@PhpCsFixer' => true, + 'header_comment' => [ + 'comment_type' => 'PHPDoc', + 'header' => $header, + 'separate' => 'none', + 'location' => 'after_declare_strict', + ], + 'array_syntax' => [ + 'syntax' => 'short' + ], + 'list_syntax' => [ + 'syntax' => 'short' + ], + 'concat_space' => [ + 'spacing' => 'one' + ], + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare', + ], + ], + 'general_phpdoc_annotation_remove' => [ + 'annotations' => [ + 'author' + ], + ], + 'ordered_imports' => [ + 'imports_order' => [ + 'class', 'function', 'const', + ], + 'sort_algorithm' => 'alpha', + ], + 'single_line_comment_style' => [ + 'comment_types' => [ + ], + ], + 'yoda_style' => [ + 'always_move_variable' => false, + 'equal' => false, + 'identical' => false, + ], + 'phpdoc_align' => [ + 'align' => 'left', + ], + 'multiline_whitespace_before_semicolons' => [ + 'strategy' => 'no_multi_line', + ], + 'constant_case' => [ + 'case' => 'lower', + ], + 'global_namespace_import' => [ + 'import_classes' => true, + 'import_constants' => true, + 'import_functions' => true, + ], + 'class_attributes_separation' => true, + 'combine_consecutive_unsets' => true, + 'declare_strict_types' => true, + 'linebreak_after_opening_tag' => true, + 'lowercase_static_reference' => true, + 'no_useless_else' => true, + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + 'not_operator_with_space' => false, + 'ordered_class_elements' => true, + 'php_unit_strict' => false, + 'phpdoc_separation' => false, + 'single_quote' => true, + 'standardize_not_equals' => true, + 'multiline_comment_opening_closing' => true, + 'global_namespace_import' => [ + 'import_classes' => true, + 'import_constants' => true, + 'import_functions' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->in(__DIR__) + ) + ->setUsingCache(true); diff --git a/LICENSE b/LICENSE index c35d3f5..36eac04 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) Hyperf +Copyright (c) Hyperf & OpenCodeCo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/class_map/Map.php b/class_map/Map.php index 26d3a8a..3869b42 100644 --- a/class_map/Map.php +++ b/class_map/Map.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Zipkin\Propagation; @@ -56,7 +56,6 @@ public function get($carrier, string $key): ?string } /** - * {@inheritdoc} * @param array|ArrayAccess $carrier */ public function put(&$carrier, string $key, string $value): void diff --git a/class_map/SpanContext.php b/class_map/SpanContext.php new file mode 100644 index 0000000..425889c --- /dev/null +++ b/class_map/SpanContext.php @@ -0,0 +1,98 @@ +baggage = $baggage ?? []; + } + + #[ReturnTypeWillChange] + public function getIterator(): ArrayIterator|iterable + { + return new ArrayIterator($this->baggage); + } + + public function getBaggageItem(string $key): ?string + { + return $this->baggage[$key] ?? null; + } + + /** + * @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(): string + { + return $this->traceId; + } + + public function setTraceId(string $traceId): self + { + $this->traceId = $traceId; + return $this; + } + + public function getParentId(): ?string + { + return $this->parentId; + } + + public function getSpanId(): string + { + return $this->spanId; + } + + public function getFlags(): ?int + { + return $this->flags; + } + + public function getBaggage(): array + { + return $this->baggage; + } + + public function getDebugId(): ?int + { + return $this->debugId; + } + + public function isDebugIdContainerOnly(): bool + { + return ($this->traceId === null) && ($this->debugId !== null); + } +} diff --git a/class_map/ThriftUdpTransport.php b/class_map/ThriftUdpTransport.php index e14c9a0..614cc93 100644 --- a/class_map/ThriftUdpTransport.php +++ b/class_map/ThriftUdpTransport.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Jaeger; @@ -26,35 +26,15 @@ class ThriftUdpTransport extends TTransport { - /** - * @var string - */ - private $host; - - /** - * @var int - */ - private $port; - - /** - * @var LoggerInterface - */ - private $logger; + private null|resource|Socket $socket = null; - /** - * @var null|resource|Socket - */ - private $socket; + private ?Channel $chan = null; - /** - * @var ?Channel - */ - private $chan; - - public function __construct(string $host, int $port, LoggerInterface $logger = null) - { - $this->host = $host; - $this->port = $port; + public function __construct( + private string $host, + private int $port, + private LoggerInterface $logger = null + ) { $this->logger = $logger ?? new NullLogger(); } diff --git a/composer.json b/composer.json index 33d6b2b..4b8caed 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,13 @@ { "name": "hyperf/tracer", - "description": "A open tracing system implemented for Hyperf or other coroutine framework", + "description": "Drop-in replacement for the Hyperf Tracer component.", "license": "MIT", "keywords": [ "php", "hyperf", "open-tracing", - "zipkin" + "zipkin", + "jaeger" ], "homepage": "https://hyperf.io", "support": { @@ -18,14 +19,25 @@ "require": { "php": ">=8.0", "psr/http-message": "^1.0|^2.0", - "hyperf/contract": "~3.0.0", - "hyperf/di": "~3.0.0", - "hyperf/guzzle": "~3.0.0", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", + "hyperf/contract": "^3.0", + "hyperf/di": "^3.0", + "hyperf/guzzle": "^3.0", + "hyperf/support": "^3.0", + "hyperf/utils": "^3.0", "jcchavezs/zipkin-opentracing": "^2.0", "opentracing/opentracing": "^1.0" }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.21", + "hyperf/config": "^3.0", + "hyperf/testing": "^3.0", + "jonahgeorge/jaeger-client-php": "^1.4", + "mockery/mockery": "^1.6", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-mockery": "^1.1", + "rector/rector": "^0.17.5" + }, "suggest": { "hyperf/event": "Required to use DbQueryExecutedListener.", "jonahgeorge/jaeger-client-php": "Required (^0.6) to use jaeger tracing." @@ -40,8 +52,18 @@ "HyperfTest\\Tracer\\": "tests/" } }, + "scripts": { + "test": "co-phpunit", + "test-coverage": "co-phpunit --coverage-clover clover.xml", + "cs-fix": "php-cs-fixer fix $1", + "analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon", + "rector": "rector process --clear-cache" + }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "phpstan/extension-installer": true + } }, "extra": { "branch-alias": { diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..2c8a34a --- /dev/null +++ b/composer.lock @@ -0,0 +1,7203 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "8921fe4d97dc8a17530cc0a020552f31", + "packages": [ + { + "name": "doctrine/inflector", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.8" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2023-06-16T13:40:37+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2023-02-25T20:23:15+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "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": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "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.7.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-05-21T14:04:53+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "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": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.0" + }, + "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-05-21T13:50:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "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": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "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.5.0" + }, + "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-04-17T16:11:26+00:00" + }, + { + "name": "hyperf/code-parser", + "version": "v3.0.18", + "source": { + "type": "git", + "url": "https://github.com/hyperf/code-parser.git", + "reference": "f1812421150d7ef95067eb6657c6f84514b6dfea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/code-parser/zipball/f1812421150d7ef95067eb6657c6f84514b6dfea", + "reference": "f1812421150d7ef95067eb6657c6f84514b6dfea", + "shasum": "" + }, + "require": { + "hyperf/collection": "~3.0.0", + "hyperf/stringable": "~3.0.0", + "hyperf/support": "~3.0.0", + "php": ">=8.0" + }, + "suggest": { + "jean85/pretty-package-versions": "Required to use PrettyVersions. (^1.2|^2.0)", + "nikic/php-parser": "Required to use PhpParser. (^4.0)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\CodeParser\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A code parser component for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "code-parser", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-26T03:02:31+00:00" + }, + { + "name": "hyperf/codec", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/hyperf/codec.git", + "reference": "7d3cbfa06c50ef52809acadfcbcd59424366f591" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/codec/zipball/7d3cbfa06c50ef52809acadfcbcd59424366f591", + "reference": "7d3cbfa06c50ef52809acadfcbcd59424366f591", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-xml": "*", + "hyperf/contract": "~3.0.0", + "php": ">=8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Codec\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A codec component for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "codec", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-24T09:49:41+00:00" + }, + { + "name": "hyperf/collection", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/collection.git", + "reference": "25be1f5643565dd19c05ee2da4156cfaa8bb71eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/collection/zipball/25be1f5643565dd19c05ee2da4156cfaa8bb71eb", + "reference": "25be1f5643565dd19c05ee2da4156cfaa8bb71eb", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "hyperf/macroable": "~3.0.0", + "php": ">=7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Collection package which come from illuminate/collections", + "homepage": "https://hyperf.io", + "keywords": [ + "collection", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-05T11:54:56+00:00" + }, + { + "name": "hyperf/conditionable", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/conditionable.git", + "reference": "4222cdc512e9e48e4375a480161c6365276ff803" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/conditionable/zipball/4222cdc512e9e48e4375a480161c6365276ff803", + "reference": "4222cdc512e9e48e4375a480161c6365276ff803", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Conditionable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Macroable package which come from illuminate/conditionable", + "homepage": "https://hyperf.io", + "keywords": [ + "conditionable", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-03-28T15:02:39+00:00" + }, + { + "name": "hyperf/context", + "version": "v3.0.18", + "source": { + "type": "git", + "url": "https://github.com/hyperf/context.git", + "reference": "8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/context/zipball/8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec", + "reference": "8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec", + "shasum": "" + }, + "require": { + "hyperf/engine": "^1.2|^2.0", + "php": ">=8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Context\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A coroutine/application context library.", + "homepage": "https://hyperf.io", + "keywords": [ + "Context", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-26T03:02:31+00:00" + }, + { + "name": "hyperf/contract", + "version": "v3.0.10", + "source": { + "type": "git", + "url": "https://github.com/hyperf/contract.git", + "reference": "93488df36b1c4e2fc16c630fb77c110bafffb141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/contract/zipball/93488df36b1c4e2fc16c630fb77c110bafffb141", + "reference": "93488df36b1c4e2fc16c630fb77c110bafffb141", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Contract\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The contracts of Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-03-10T04:21:37+00:00" + }, + { + "name": "hyperf/coordinator", + "version": "v3.0.22", + "source": { + "type": "git", + "url": "https://github.com/hyperf/coordinator.git", + "reference": "a49c2d22995b4115e8b21f1de58b992047c4d0fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/coordinator/zipball/a49c2d22995b4115e8b21f1de58b992047c4d0fd", + "reference": "a49c2d22995b4115e8b21f1de58b992047c4d0fd", + "shasum": "" + }, + "require": { + "hyperf/engine": "^1.2|^2.0", + "php": ">=8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Coordinator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Coordinator", + "homepage": "https://hyperf.io", + "keywords": [ + "Coordinator", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-05-26T13:44:16+00:00" + }, + { + "name": "hyperf/coroutine", + "version": "v3.0.16", + "source": { + "type": "git", + "url": "https://github.com/hyperf/coroutine.git", + "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/coroutine/zipball/4944ce69d5f35407e5dbcf7e9991f1db3366f254", + "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254", + "shasum": "" + }, + "require": { + "hyperf/context": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/engine": "^1.2|^2.0", + "php": ">=8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Coroutine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Coroutine", + "homepage": "https://hyperf.io", + "keywords": [ + "coroutine", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-12T05:34:25+00:00" + }, + { + "name": "hyperf/di", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/di.git", + "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/di/zipball/4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", + "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0", + "hyperf/code-parser": "~3.0.0", + "hyperf/pipeline": "~3.0.0", + "hyperf/support": "~3.0.0", + "nikic/php-parser": "^4.1", + "php": ">=8.0", + "php-di/phpdoc-reader": "^2.2", + "psr/container": "^1.0|^2.0", + "symfony/finder": "^5.0|^6.0", + "vlucas/phpdotenv": "^5.0" + }, + "suggest": { + "ext-pcntl": "Required to scan annotations.", + "hyperf/config": "Require this component for annotation scan progress to retrieve the scan path." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Di\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Di\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A DI for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "annotation", + "di", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-05T07:53:17+00:00" + }, + { + "name": "hyperf/engine", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/engine.git", + "reference": "3e0920ad7ba15a965f129143d3248f8e85e0c2d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/engine/zipball/3e0920ad7ba15a965f129143d3248f8e85e0c2d9", + "reference": "3e0920ad7ba15a965f129143d3248f8e85e0c2d9", + "shasum": "" + }, + "require": { + "hyperf/engine-contract": "~1.8.0", + "php": ">=8.0" + }, + "conflict": { + "ext-swoole": "<5.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "hyperf/guzzle": "^3.0", + "hyperf/http-message": " 3.0.*", + "mockery/mockery": "^1.5", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^9.4", + "swoole/ide-helper": "dev-master" + }, + "suggest": { + "ext-sockets": "*", + "ext-swoole": ">=5.0", + "hyperf/http-message": "Required to use ResponseEmitter.", + "psr/http-message": "Required to use WebSocket Frame." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.9-dev" + }, + "hyperf": { + "config": "Hyperf\\Engine\\ConfigProvider" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Engine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Coroutine engine provided by swoole.", + "keywords": [ + "engine", + "hyperf", + "php", + "swoole" + ], + "support": { + "issues": "https://github.com/hyperf/engine/issues", + "source": "https://github.com/hyperf/engine/tree/v2.9.0" + }, + "time": "2023-06-17T11:23:50+00:00" + }, + { + "name": "hyperf/engine-contract", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/engine-contract.git", + "reference": "69b9bb43d6c356be7c7eb2f55ff06282436a0e4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/engine-contract/zipball/69b9bb43d6c356be7c7eb2f55ff06282436a0e4d", + "reference": "69b9bb43d6c356be7c7eb2f55ff06282436a0e4d", + "shasum": "" + }, + "require": { + "php": ">=8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.0", + "mockery/mockery": "^1.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": ">=7.0", + "psr/http-message": "^1.0", + "swoole/ide-helper": "^4.5" + }, + "suggest": { + "psr/http-message": "Required to use WebSocket Frame." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Engine\\Contract\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Contract for Coroutine Engine", + "keywords": [ + "contract", + "coroutine", + "engine", + "hyperf", + "php" + ], + "support": { + "issues": "https://github.com/hyperf/engine-contract/issues", + "source": "https://github.com/hyperf/engine-contract/tree/v1.8.0" + }, + "time": "2023-06-17T11:16:19+00:00" + }, + { + "name": "hyperf/guzzle", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/guzzle.git", + "reference": "7791900eed289bd6584e2e52d2ec02b47f85740c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/guzzle/zipball/7791900eed289bd6584e2e52d2ec02b47f85740c", + "reference": "7791900eed289bd6584e2e52d2ec02b47f85740c", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=8.0", + "psr/container": "^1.0|^2.0", + "psr/http-message": "^1.0|^2.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "hyperf/pool": "Required to use pool handler." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Guzzle\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Guzzle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Swoole coroutine handler for guzzle", + "keywords": [ + "Guzzle", + "handler", + "php", + "swoole" + ], + "support": { + "issues": "https://github.com/hyperf/guzzle/issues", + "source": "https://github.com/hyperf/guzzle/tree/v3.0.24" + }, + "time": "2023-06-04T02:14:26+00:00" + }, + { + "name": "hyperf/macroable", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/macroable.git", + "reference": "822de69ba0c75aa9767a9cea487b84bf31d5240a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/macroable/zipball/822de69ba0c75aa9767a9cea487b84bf31d5240a", + "reference": "822de69ba0c75aa9767a9cea487b84bf31d5240a", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Macroable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Macroable package which come from illuminate/macroable", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "macroable", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2022-11-01T02:50:54+00:00" + }, + { + "name": "hyperf/pipeline", + "version": "v3.0.16", + "source": { + "type": "git", + "url": "https://github.com/hyperf/pipeline.git", + "reference": "a3f48561f5cfef5f697e7005446e16560024a443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/pipeline/zipball/a3f48561f5cfef5f697e7005446e16560024a443", + "reference": "a3f48561f5cfef5f697e7005446e16560024a443", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "psr/container": "^1.0|^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Pipeline\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Macroable package which come from illuminate/pipeline", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "pipeline", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-11T07:57:32+00:00" + }, + { + "name": "hyperf/serializer", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/serializer.git", + "reference": "c4efedaa072c5ffe196e95e0c74a9d90fd1e4811" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/serializer/zipball/c4efedaa072c5ffe196e95e0c74a9d90fd1e4811", + "reference": "c4efedaa072c5ffe196e95e0c74a9d90fd1e4811", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "php": ">=8.0" + }, + "suggest": { + "hyperf/di": "Required to use ExceptionNormalizer", + "symfony/property-access": "Required to use SymfonyNormalizer (^5.0|^6.0)", + "symfony/serializer": "Required to use SymfonyNormalizer (^5.0|^6.0)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Serializer\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A serializer component for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "swoole", + "tappable" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-24T07:07:56+00:00" + }, + { + "name": "hyperf/stringable", + "version": "v3.0.27", + "source": { + "type": "git", + "url": "https://github.com/hyperf/stringable.git", + "reference": "cd56584d5d7a2688e1c1a401c3c41c0a8143a920" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/stringable/zipball/cd56584d5d7a2688e1c1a401c3c41c0a8143a920", + "reference": "cd56584d5d7a2688e1c1a401c3c41c0a8143a920", + "shasum": "" + }, + "require": { + "hyperf/collection": "~3.0.0", + "hyperf/conditionable": "~3.0.0", + "hyperf/macroable": "~3.0.0", + "hyperf/tappable": "~3.0.0", + "php": ">=8.0" + }, + "suggest": { + "doctrine/inflector": "Required to use plural and singular methods.(^2.0|^3.0)", + "ramsey/uuid": "Required to use uuid and orderedUuid methods.(^4.7|^5.0)", + "symfony/uid": "Required to use ulid method.(^5.0|^6.0)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Stringable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Stringable package which come from illuminate/support", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "stringable", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-25T06:10:37+00:00" + }, + { + "name": "hyperf/support", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/support.git", + "reference": "576838e7185bf8eb749920a3285b399cb9c3a24b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/support/zipball/576838e7185bf8eb749920a3285b399cb9c3a24b", + "reference": "576838e7185bf8eb749920a3285b399cb9c3a24b", + "shasum": "" + }, + "require": { + "hyperf/collection": "~3.0.0", + "hyperf/context": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/coroutine": "~3.0.0", + "hyperf/macroable": "~3.0.0", + "hyperf/stringable": "~3.0.0", + "php": ">=8.0" + }, + "suggest": { + "nesbot/carbon": "Use Carbon as DateTime object.(^2.0)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Support\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A support component for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "support", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-08T06:55:09+00:00" + }, + { + "name": "hyperf/tappable", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/tappable.git", + "reference": "4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/tappable/zipball/4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a", + "reference": "4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Tappable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Hyperf Macroable package which come from illuminate/tappable", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "swoole", + "tappable" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-03-28T15:02:39+00:00" + }, + { + "name": "hyperf/utils", + "version": "v3.0.18", + "source": { + "type": "git", + "url": "https://github.com/hyperf/utils.git", + "reference": "2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/utils/zipball/2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6", + "reference": "2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^2.0", + "hyperf/code-parser": "~3.0.0", + "hyperf/codec": "~3.0.0", + "hyperf/collection": "~3.0.0", + "hyperf/context": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/coordinator": "~3.0.0", + "hyperf/coroutine": "~3.0.0", + "hyperf/engine": "^1.2|^2.0", + "hyperf/macroable": "~3.0.0", + "hyperf/serializer": "~3.0.0", + "hyperf/stringable": "~3.0.0", + "hyperf/support": "~3.0.0", + "php": ">=7.2" + }, + "suggest": { + "ext-swoole": "Required to use methods related to swoole (>=4.5).", + "hyperf/di": "Required to use ExceptionNormalizer", + "nikic/php-parser": "Required to use PhpParser. (^4.0)", + "ramsey/uuid": "Required to use uuid and orderedUuid methods", + "symfony/property-access": "Required to use SymfonyNormalizer (^5.0|^6.0)", + "symfony/serializer": "Required to use SymfonyNormalizer (^5.0|^6.0)", + "symfony/uid": "Required to use ulid method", + "symfony/var-dumper": "Required to use the dd function (^5.0|^6.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Hyperf\\Utils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A tools package that could help developer solved the problem quickly.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "swoole", + "utils" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-04-26T03:02:31+00:00" + }, + { + "name": "jcchavezs/zipkin-opentracing", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/jcchavezs/zipkin-php-opentracing.git", + "reference": "bb8f1c5c3643594c0328c7df98e49fef86c85710" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jcchavezs/zipkin-php-opentracing/zipball/bb8f1c5c3643594c0328c7df98e49fef86c85710", + "reference": "bb8f1c5c3643594c0328c7df98e49fef86c85710", + "shasum": "" + }, + "require": { + "opentracing/opentracing": "^1.0.1", + "openzipkin/zipkin": "^3.0.0", + "php": ">=7.4 || ^8.0" + }, + "provide": { + "opentracing/opentracing": "1.0.0" + }, + "require-dev": { + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.0", + "squizlabs/php_codesniffer": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipkinOpenTracing\\": "./src/ZipkinOpenTracing/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "José Carlos Chávez", + "email": "jcchavezs@gmail.com" + } + ], + "description": "A Zipkin bridge with OpenTracing", + "support": { + "issues": "https://github.com/jcchavezs/zipkin-php-opentracing/issues", + "source": "https://github.com/jcchavezs/zipkin-php-opentracing/tree/2.0.3" + }, + "funding": [ + { + "url": "https://www.paypal.me/jcchavezs", + "type": "paypal" + } + ], + "time": "2023-06-08T11:40:46+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.16.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + }, + "time": "2023-06-25T14:52:30+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": "openzipkin/zipkin", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/openzipkin/zipkin-php.git", + "reference": "de61dd5302af882b6812895a6e2e9eda80a9b6a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openzipkin/zipkin-php/zipball/de61dd5302af882b6812895a6e2e9eda80a9b6a3", + "reference": "de61dd5302af882b6812895a6e2e9eda80a9b6a3", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": "^7.4 || ^8.0", + "psr/http-message": "~1.0", + "psr/log": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "ext-mysqli": "*", + "jcchavezs/httptest": "~0.2", + "middlewares/fast-route": "^2.0", + "middlewares/request-handler": "^2.0", + "nyholm/psr7": "^1.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "~9", + "psr/http-client": "^1.0", + "psr/http-server-middleware": "^1.0", + "squizlabs/php_codesniffer": "3.*" + }, + "suggest": { + "ext-mysqli": "Allows to use mysqli instrumentation.", + "psr/http-client": "Allows to instrument HTTP clients following PSR18.", + "psr/http-server-middleware": "Allows to instrument HTTP servers via middlewares following PSR15." + }, + "type": "library", + "autoload": { + "files": [ + "./src/Zipkin/Propagation/Id.php", + "./src/Zipkin/Timestamp.php", + "./src/Zipkin/Kind.php", + "./src/Zipkin/Tags.php", + "./src/Zipkin/Annotations.php", + "./src/Zipkin/SpanName.php" + ], + "psr-4": { + "Zipkin\\": "./src/Zipkin/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "José Carlos Chávez", + "email": "jcchavezs@gmail.com" + } + ], + "description": "A Zipkin instrumentation for PHP", + "homepage": "https://github.com/openzipkin/zipkin-php", + "keywords": [ + "distributed-tracing", + "openzipkin", + "tracing", + "zipkin" + ], + "support": { + "issues": "https://github.com/openzipkin/zipkin-php/issues", + "source": "https://github.com/openzipkin/zipkin-php/tree/3.1.0" + }, + "time": "2023-05-24T05:24:25+00:00" + }, + { + "name": "php-di/phpdoc-reader", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-DI/PhpDocReader.git", + "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", + "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "mnapoli/hard-mode": "~0.3.0", + "phpunit/phpunit": "^8.5|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpDocReader\\": "src/PhpDocReader" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", + "keywords": [ + "phpdoc", + "reflection" + ], + "support": { + "issues": "https://github.com/PHP-DI/PhpDocReader/issues", + "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1" + }, + "time": "2020-10-12T12:39:22+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", + "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2023-02-25T19:38:58+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+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": "1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/1.1" + }, + "time": "2023-04-04T09:50:52+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": "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": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-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": "p@tchwork.com" + }, + { + "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.3.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-05-23T14:45:45+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.3.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-04-02T01:25:41+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-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": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-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": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "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.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.5.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "5.5-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2022-10-16T01:01:54+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "doctrine/annotations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.1" + }, + "time": "2023-02-02T22:02:53+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "84a527db05647743d50373e0ec53a152f2cde568" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-15T16:57:16+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.21.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/229b55b3eae4729a8e2a321441ba40fcb3720b86", + "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^2", + "doctrine/lexer": "^2 || ^3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^8.0.1", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.2.3", + "symfony/yaml": "^5.4 || ^6.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.21.1" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-07-05T21:50:25+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "hyperf/config", + "version": "v3.0.20", + "source": { + "type": "git", + "url": "https://github.com/hyperf/config.git", + "reference": "6503882f8547809d609b9489170037ceaef04962" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/config/zipball/6503882f8547809d609b9489170037ceaef04962", + "reference": "6503882f8547809d609b9489170037ceaef04962", + "shasum": "" + }, + "require": { + "hyperf/collection": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/support": "~3.0.0", + "hyperf/utils": "~3.0.0", + "php": ">=8.0", + "psr/container": "^1.0|^2.0", + "symfony/finder": "^5.0|^6.0" + }, + "suggest": { + "hyperf/di": "Allows using @Value annotation", + "hyperf/event": "Allows using @Value annotation", + "hyperf/framework": "Allows using @Value annotation", + "vlucas/phpdotenv": "Allows using enviroment value to override the config" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Config\\ConfigProvider" + } + }, + "autoload": { + "files": [ + "./src/Functions.php" + ], + "psr-4": { + "Hyperf\\Config\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "An independent component that provides configuration container.", + "homepage": "https://hyperf.io", + "keywords": [ + "config", + "configuration", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-05-09T03:02:12+00:00" + }, + { + "name": "hyperf/dispatcher", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/dispatcher.git", + "reference": "af232ac01c3dcb91ad565d6202e3e3bfb2fcf560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/dispatcher/zipball/af232ac01c3dcb91ad565d6202e3e3bfb2fcf560", + "reference": "af232ac01c3dcb91ad565d6202e3e3bfb2fcf560", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "php": ">=8.0", + "psr/container": "^1.0|^2.0", + "psr/http-message": "^1.0|^2.0", + "psr/http-server-middleware": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Dispatcher\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Dispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A HTTP Server for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "dispatcher", + "filter", + "hyperf", + "middleware", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-04T02:14:26+00:00" + }, + { + "name": "hyperf/event", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/event.git", + "reference": "e10cd5e8b7f02bad9c542c3592b495debba9a39a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/event/zipball/e10cd5e8b7f02bad9c542c3592b495debba9a39a", + "reference": "e10cd5e8b7f02bad9c542c3592b495debba9a39a", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "php": ">=8.0", + "psr/event-dispatcher": "^1.0" + }, + "suggest": { + "hyperf/di": "Required to use annotatioins." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Event\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "an event manager that implements PSR-14.", + "homepage": "https://hyperf.io", + "keywords": [ + "event", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2022-10-13T02:40:13+00:00" + }, + { + "name": "hyperf/exception-handler", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/exception-handler.git", + "reference": "bcadcd90f2d4f71e8e85f769256afdd4ea712ad3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/exception-handler/zipball/bcadcd90f2d4f71e8e85f769256afdd4ea712ad3", + "reference": "bcadcd90f2d4f71e8e85f769256afdd4ea712ad3", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "hyperf/dispatcher": "~3.0.0", + "hyperf/support": "~3.0.0", + "hyperf/utils": "~3.0.0", + "php": ">=8.0", + "psr/container": "^1.0|^2.0", + "psr/http-message": "^1.0|^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\ExceptionHandler\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\ExceptionHandler\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Exception handler for hyperf", + "homepage": "https://hyperf.io", + "keywords": [ + "exception-handler", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-04T02:14:26+00:00" + }, + { + "name": "hyperf/http-message", + "version": "v3.0.18", + "source": { + "type": "git", + "url": "https://github.com/hyperf/http-message.git", + "reference": "23affffb7a15842f990144b5bd49641e4de8dda4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/http-message/zipball/23affffb7a15842f990144b5bd49641e4de8dda4", + "reference": "23affffb7a15842f990144b5bd49641e4de8dda4", + "shasum": "" + }, + "require": { + "hyperf/codec": "~3.0.0", + "hyperf/engine": "^1.9|^2.7", + "hyperf/support": "~3.0.0", + "hyperf/utils": "~3.0.0", + "laminas/laminas-mime": "^2.7", + "php": ">=8.0", + "psr/http-message": "^1.0|^2.0" + }, + "suggest": { + "psr/container": "Required to replace RequestParserInterface." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\HttpMessage\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\HttpMessage\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "microservice framework base on swoole", + "keywords": [ + "http-message", + "hyperf", + "php", + "swoole" + ], + "support": { + "issues": "https://github.com/hyperf/http-message/issues", + "source": "https://github.com/hyperf/http-message/tree/v3.0.18" + }, + "time": "2023-04-26T03:02:31+00:00" + }, + { + "name": "hyperf/http-server", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/http-server.git", + "reference": "d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/http-server/zipball/d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1", + "reference": "d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1", + "shasum": "" + }, + "require": { + "hyperf/codec": "~3.0.0", + "hyperf/collection": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/coroutine": "~3.0.0", + "hyperf/dispatcher": "~3.0.0", + "hyperf/event": "~3.0.0", + "hyperf/exception-handler": "~3.0.0", + "hyperf/http-message": "~3.0.0", + "hyperf/macroable": "~3.0.0", + "hyperf/serializer": "~3.0.0", + "hyperf/server": "~3.0.0", + "hyperf/support": "~3.0.0", + "hyperf/utils": "~3.0.0", + "nikic/fast-route": "^1.3", + "php": ">=8.0", + "psr/container": "^1.0|^2.0" + }, + "suggest": { + "hyperf/di": "Required to use annotations." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\HttpServer\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\HttpServer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A HTTP Server for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "http", + "http-server", + "hyperf", + "php", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-06T12:33:49+00:00" + }, + { + "name": "hyperf/server", + "version": "v3.0.24", + "source": { + "type": "git", + "url": "https://github.com/hyperf/server.git", + "reference": "0a2bfa37355631a0f0484bfd08d815ad858d279c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/server/zipball/0a2bfa37355631a0f0484bfd08d815ad858d279c", + "reference": "0a2bfa37355631a0f0484bfd08d815ad858d279c", + "shasum": "" + }, + "require": { + "hyperf/contract": "~3.0.0", + "hyperf/engine": "^1.10|^2.8", + "hyperf/support": "~3.0.0", + "hyperf/tappable": "~3.0.0", + "hyperf/utils": "~3.0.0", + "php": ">=8.0", + "psr/container": "^1.0|^2.0", + "psr/event-dispatcher": "^1.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/console": "^5.0|^6.0" + }, + "suggest": { + "hyperf/event": "Dump the info after server start.", + "hyperf/framework": "Dump the info after server start." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "hyperf": { + "config": "Hyperf\\Server\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A base server library for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "server", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "time": "2023-06-07T05:27:29+00:00" + }, + { + "name": "hyperf/testing", + "version": "v3.0.23", + "source": { + "type": "git", + "url": "https://github.com/hyperf/testing.git", + "reference": "e660ba6f6f4c1dd46cc6203feeefd4638454108c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/testing/zipball/e660ba6f6f4c1dd46cc6203feeefd4638454108c", + "reference": "e660ba6f6f4c1dd46cc6203feeefd4638454108c", + "shasum": "" + }, + "require": { + "hyperf/codec": "~3.0.0", + "hyperf/collection": "~3.0.0", + "hyperf/contract": "~3.0.0", + "hyperf/coroutine": "~3.0.0", + "hyperf/http-message": "~3.0.0", + "hyperf/http-server": "~3.0.0", + "hyperf/support": "~3.0.0", + "hyperf/utils": "~3.0.0", + "php": ">=8.0", + "phpunit/phpunit": "^9.5", + "psr/container": "^1.0|^2.0", + "symfony/http-foundation": "^5.4|^6.0" + }, + "bin": [ + "co-phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Testing\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Testing for hyperf", + "keywords": [ + "php", + "swoole", + "testing" + ], + "support": { + "source": "https://github.com/hyperf/testing/tree/v3.0.23" + }, + "time": "2023-06-01T08:26:57+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": "laminas/laminas-mime", + "version": "2.11.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-mime.git", + "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/60ec04b755821c79c1987ce291b44e69f2c0831f", + "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^2.7 || ^3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-mime": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-mail": "^2.19.0", + "phpunit/phpunit": "~9.5.25" + }, + "suggest": { + "laminas/laminas-mail": "Laminas\\Mail component" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Mime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create and parse MIME messages and parts", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "mime" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-mime/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-mime/issues", + "rss": "https://github.com/laminas/laminas-mime/releases.atom", + "source": "https://github.com/laminas/laminas-mime" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-18T08:38:15+00:00" + }, + { + "name": "laminas/laminas-stdlib", + "version": "3.17.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-stdlib.git", + "reference": "dd35c868075bad80b6718959740913e178eb4274" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274", + "reference": "dd35c868075bad80b6718959740913e178eb4274", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-stdlib": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "^2.5", + "phpbench/phpbench": "^1.2.9", + "phpunit/phpunit": "^10.0.16", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "SPL extensions, array utilities, error handlers, and more", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "stdlib" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-stdlib/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-stdlib/issues", + "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", + "source": "https://github.com/laminas/laminas-stdlib" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-03-20T13:51:37+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191", + "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3", + "psalm/plugin-phpunit": "^0.18", + "vimeo/psalm": "^5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.6.x-dev" + } + }, + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.6.2" + }, + "time": "2023-06-07T09:07:52+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/fast-route", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "FastRoute\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "support": { + "issues": "https://github.com/nikic/FastRoute/issues", + "source": "https://github.com/nikic/FastRoute/tree/master" + }, + "time": "2018-02-13T20:26:39+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": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" + }, + "time": "2023-05-24T08:59:17+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.25", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "578f4e70d117f9a90699324c555922800ac38d8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c", + "reference": "578f4e70d117f9a90699324c555922800ac38d8c", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-07-06T12:11:37+00:00" + }, + { + "name": "phpstan/phpstan-mockery", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-mockery.git", + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.10" + }, + "require-dev": { + "mockery/mockery": "^1.2.4", + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan Mockery extension", + "support": { + "issues": "https://github.com/phpstan/phpstan-mockery/issues", + "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.1" + }, + "time": "2023-02-18T13:54:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.26", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-06T12:58:08+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-07-10T04:04:23+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/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-server-handler", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "support": { + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" + }, + "time": "2023-04-10T20:06:20+00:00" + }, + { + "name": "psr/http-server-middleware", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-server-handler": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-middleware/issues", + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" + }, + "time": "2023-04-11T06:14:47+00:00" + }, + { + "name": "rector/rector", + "version": "0.17.5", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "f4a5f45c420b797d8e8e9c540e14c8bbdddff62d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/f4a5f45c420b797d8e8e9c540e14c8bbdddff62d", + "reference": "f4a5f45c420b797d8e8e9c540e14c8bbdddff62d", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.10.20" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.15-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.17.5" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2023-07-12T08:42:12+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.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-05-29T12:49:39+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.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-04-21T14:41:17+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.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-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "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-06-01T08:30:39+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.2" + }, + "require-dev": { + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^5.4|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.3.1" + }, + "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-06-24T11:51:27+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.3.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-05-12T14:21:09+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-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": "p@tchwork.com" + }, + { + "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.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.3.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-05-19T08:06:44+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.3.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-05-23T14:45:45+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.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-02-16T10:14:28+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.3.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-03-21T21:06:29+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..f25d7d9 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,11 @@ +parameters: + bootstrapFiles: + - tests/bootstrap.php + paths: + - src + - tests + inferPrivatePropertyTypeFromConstructor: true + treatPhpDocTypesAsCertain: true + reportUnmatchedIgnoredErrors: false + ignoreErrors: + - '#Variable .* in PHPDoc tag @var does not exist#' diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..bb72997 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,21 @@ + + + + + src + + + + + tests + + + diff --git a/publish/opentracing.php b/publish/opentracing.php index 53fde1c..c81dfa7 100644 --- a/publish/opentracing.php +++ b/publish/opentracing.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ use Zipkin\Samplers\BinarySampler; diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..6d8c034 --- /dev/null +++ b/rector.php @@ -0,0 +1,31 @@ +paths([ + __DIR__ . '/class_map', + __DIR__ . '/publish', + __DIR__ . '/src', + __DIR__ . '/tests', + ]); + + // register a single rule + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + + // define sets of rules + $rectorConfig->sets([ + LevelSetList::UP_TO_PHP_80, + ]); +}; diff --git a/src/Adapter/HttpClientFactory.php b/src/Adapter/HttpClientFactory.php index 598aeef..2508b38 100644 --- a/src/Adapter/HttpClientFactory.php +++ b/src/Adapter/HttpClientFactory.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Adapter; diff --git a/src/Adapter/JaegerTracerFactory.php b/src/Adapter/JaegerTracerFactory.php index d7ccf0e..4ab3178 100644 --- a/src/Adapter/JaegerTracerFactory.php +++ b/src/Adapter/JaegerTracerFactory.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Adapter; diff --git a/src/Adapter/NoopTracerFactory.php b/src/Adapter/NoopTracerFactory.php new file mode 100644 index 0000000..d8f193b --- /dev/null +++ b/src/Adapter/NoopTracerFactory.php @@ -0,0 +1,24 @@ +arguments['keys']; $span = $this->startSpan('Db::' . $arguments['name']); - $span->setTag($this->spanTagManager->get('db', 'db.query'), json_encode($arguments['arguments'])); + $span->setTag($this->spanTagManager->get('db', 'db.query'), json_encode($arguments['arguments'], JSON_THROW_ON_ERROR)); try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { diff --git a/src/Aspect/ElasticserachAspect.php b/src/Aspect/ElasticserachAspect.php index 9b3259f..22c6761 100644 --- a/src/Aspect/ElasticserachAspect.php +++ b/src/Aspect/ElasticserachAspect.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 56a883a..9a0dcf8 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -2,60 +2,95 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; use GuzzleHttp\Client; -use Hyperf\Di\Aop\AbstractAspect; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Promise\Create; +use GuzzleHttp\Promise\PromiseInterface; +use GuzzleHttp\Psr7\Uri; +use Hyperf\Di\Aop\AroundInterface; use Hyperf\Di\Aop\ProceedingJoinPoint; +use Hyperf\Di\Exception\Exception; +use Hyperf\Tracer\ExceptionAppender; use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; +use Hyperf\Tracer\Support\Uri as SupportUri; use Hyperf\Tracer\SwitchManager; +use OpenTracing\Span; use OpenTracing\Tracer; use Psr\Http\Message\ResponseInterface; use Throwable; use const OpenTracing\Formats\TEXT_MAP; -class HttpClientAspect extends AbstractAspect +class HttpClientAspect implements AroundInterface { use SpanStarter; + use ExceptionAppender; - public array $classes = [ - Client::class . '::requestAsync', - ]; + public array $classes = [Client::class . '::requestAsync']; - public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public array $annotations = []; + + private Tracer $tracer; + + private SpanTagManager $spanTagManager; + + public function __construct(Tracer $tracer, private SwitchManager $switchManager, SpanTagManager $spanTagManager) { + $this->tracer = $tracer; + $this->spanTagManager = $spanTagManager; } /** * @return mixed return the value from process method of ProceedingJoinPoint, or the value that you handled + * @throws Exception + * @throws Throwable */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { - if ($this->switchManager->isEnable('guzzle') === false) { + if ($this->switchManager->isEnabled('guzzle') === false) { return $proceedingJoinPoint->process(); } $options = $proceedingJoinPoint->arguments['keys']['options']; if (isset($options['no_aspect']) && $options['no_aspect'] === true) { return $proceedingJoinPoint->process(); } + /** @var Client $instance */ + $instance = $proceedingJoinPoint->getInstance(); + /** @var Uri $base_uri */ + $base_uri = $instance->getConfig('base_uri'); $arguments = $proceedingJoinPoint->arguments; - $method = $arguments['keys']['method'] ?? 'Null'; - $uri = $arguments['keys']['uri'] ?? 'Null'; - $key = "HTTP Request [{$method}] {$uri}"; - $span = $this->startSpan($key); + $method = strtoupper($arguments['keys']['method'] ?? ''); + $uri = $arguments['keys']['uri'] ?? ''; + $host = $base_uri === null ? (parse_url($uri, PHP_URL_HOST) ?? '') : $base_uri->getHost(); + $span = $this->startSpan( + sprintf( + '%s %s/%s', + $method, + rtrim((string) ($base_uri ?? ''), '/'), + ltrim(parse_url(SupportUri::sanitize($uri), PHP_URL_PATH) ?? '', '/') + ) + ); + + $span->setTag('category', 'http'); + $span->setTag('component', 'GuzzleHttp'); + $span->setTag('kind', 'client'); $span->setTag('source', $proceedingJoinPoint->className . '::' . $proceedingJoinPoint->methodName); if ($this->spanTagManager->has('http_client', 'http.url')) { $span->setTag($this->spanTagManager->get('http_client', 'http.url'), $uri); } + if ($this->spanTagManager->has('http_client', 'http.host')) { + $span->setTag($this->spanTagManager->get('http_client', 'http.host'), $host); + } if ($this->spanTagManager->has('http_client', 'http.method')) { $span->setTag($this->spanTagManager->get('http_client', 'http.method'), $method); } @@ -69,18 +104,41 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $options['headers'] = array_replace($options['headers'] ?? [], $appendHeaders); $proceedingJoinPoint->arguments['keys']['options'] = $options; - try { - $result = $proceedingJoinPoint->process(); - if ($result instanceof ResponseInterface) { - $span->setTag($this->spanTagManager->get('http_client', 'http.status_code'), $result->getStatusCode()); - } - } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - throw $e; - } finally { - $span->finish(); - } + /** @var PromiseInterface $result */ + $result = $proceedingJoinPoint->process(); + $result->then( + $this->onFullFilled($span), + $this->onRejected($span) + ); + $span->finish(); + return $result; } + + private function onFullFilled(Span $span): callable + { + return function (ResponseInterface $response) use ($span) { + $span->setTag( + $this->spanTagManager->get('http_client', 'http.status_code'), + $response->getStatusCode() + ); + $span->setTag('otel.status_code', 'OK'); + }; + } + + private function onRejected(Span $span): callable + { + return function (RequestException $exception) use ($span) { + if ($this->switchManager->isEnabled('exception')) { + $this->appendExceptionToSpan($span, $exception); + } + + $span->setTag( + $this->spanTagManager->get('http_client', 'http.status_code'), + $exception->getResponse()->getStatusCode() + ); + + return Create::rejectionFor($exception); + }; + } } diff --git a/src/Aspect/JsonRpcAspect.php b/src/Aspect/JsonRpcAspect.php index c9f8327..4f14d97 100644 --- a/src/Aspect/JsonRpcAspect.php +++ b/src/Aspect/JsonRpcAspect.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; @@ -54,6 +54,7 @@ public function __construct(private ContainerInterface $container) public function process(ProceedingJoinPoint $proceedingJoinPoint) { + $result = []; if ($proceedingJoinPoint->methodName === '__generateRpcPath') { $path = $proceedingJoinPoint->process(); $key = "JsonRPC send [{$path}]"; diff --git a/src/Aspect/MethodAspect.php b/src/Aspect/MethodAspect.php index de45d5e..efe6597 100644 --- a/src/Aspect/MethodAspect.php +++ b/src/Aspect/MethodAspect.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; diff --git a/src/Aspect/MongoCollectionAspect.php b/src/Aspect/MongoCollectionAspect.php new file mode 100644 index 0000000..20013a5 --- /dev/null +++ b/src/Aspect/MongoCollectionAspect.php @@ -0,0 +1,121 @@ +tracer = $tracer; + $this->spanTagManager = $spanTagManager; + } + + public function process(ProceedingJoinPoint $proceedingJoinPoint) + { + if ($this->switchManager->isEnabled('mongo') === false) { + return $proceedingJoinPoint->process(); + } + + if (in_array($proceedingJoinPoint->methodName, $this->ignoredMethods)) { + return $proceedingJoinPoint->process(); + } + + $collectionName = $this->getCollectionName($proceedingJoinPoint); + $method = $proceedingJoinPoint->methodName; + $span = $this->startSpan( + sprintf( + 'Mongo::%s on %s', + $method, + $collectionName + ) + ); + + $span->setTag('category', 'datastore'); + $span->setTag('kind', 'client'); + $span->setTag('component', 'MongoDB'); + $span->setTag('db.system', 'mongodb'); + $span->setTag('source', $proceedingJoinPoint->className . '::' . $proceedingJoinPoint->methodName); + + if ($this->spanTagManager->has('mongo', 'collection')) { + $span->setTag($this->spanTagManager->get('mongo', 'collection'), $collectionName); + } + + if ($this->spanTagManager->has('mongo', 'method')) { + $span->setTag($this->spanTagManager->get('mongo', 'method'), $method); + } + + $appendHeaders = []; + $this->tracer->inject( + $span->getContext(), + TEXT_MAP, + $appendHeaders + ); + + try { + $result = $proceedingJoinPoint->process(); + $span->setTag('otel.status_code', 'OK'); + } catch (Throwable $exception) { + if ($this->switchManager->isEnabled('exception')) { + $this->appendExceptionToSpan($span, $exception); + } + throw $exception; + } finally { + $span->finish(); + } + + return $result; + } + + private function getCollectionName(ProceedingJoinPoint $proceedingJoinPoint): string + { + /** @var Collection $collection */ + $collection = $proceedingJoinPoint->getInstance(); + + $property = new ReflectionProperty(Collection::class, 'collection'); + $property->setAccessible(true); + + return $property->getValue($collection); + } +} diff --git a/src/Aspect/RedisAspect.php b/src/Aspect/RedisAspect.php index 5fa81f9..d0e805a 100644 --- a/src/Aspect/RedisAspect.php +++ b/src/Aspect/RedisAspect.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; @@ -43,10 +43,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $arguments = $proceedingJoinPoint->arguments['keys']; $span = $this->startSpan('Redis::' . $arguments['name']); - $span->setTag($this->spanTagManager->get('redis', 'arguments'), json_encode($arguments['arguments'])); + $span->setTag($this->spanTagManager->get('redis', 'arguments'), json_encode($arguments['arguments'], JSON_THROW_ON_ERROR)); try { $result = $proceedingJoinPoint->process(); - $span->setTag($this->spanTagManager->get('redis', 'result'), json_encode($result)); + $span->setTag($this->spanTagManager->get('redis', 'result'), json_encode($result, JSON_THROW_ON_ERROR)); } catch (Throwable $e) { $span->setTag('error', true); $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); diff --git a/src/Aspect/TraceAnnotationAspect.php b/src/Aspect/TraceAnnotationAspect.php index 3098a8e..7936f16 100644 --- a/src/Aspect/TraceAnnotationAspect.php +++ b/src/Aspect/TraceAnnotationAspect.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Aspect; diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 8396377..a32edd8 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -2,20 +2,23 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; use GuzzleHttp\Client; use Hyperf\Tracer\Aspect\HttpClientAspect; +use Hyperf\Tracer\Aspect\MongoCollectionAspect; use Hyperf\Tracer\Aspect\RedisAspect; use Hyperf\Tracer\Aspect\TraceAnnotationAspect; use Hyperf\Tracer\Listener\DbQueryExecutedListener; +use Hyperf\Tracer\Middleware\TraceMiddleware; +use Jaeger\SpanContext; use Jaeger\ThriftUdpTransport; use OpenTracing\Tracer; use Zipkin\Propagation\Map; @@ -34,11 +37,15 @@ public function __invoke(): array 'listeners' => [ DbQueryExecutedListener::class, ], + 'middlewares' => [ + TraceMiddleware::class, + ], 'annotations' => [ 'scan' => [ 'class_map' => [ Map::class => __DIR__ . '/../class_map/Map.php', ThriftUdpTransport::class => __DIR__ . '/../class_map/ThriftUdpTransport.php', + SpanContext::class => __DIR__ . '/../class_map/SpanContext.php', ], ], ], @@ -46,6 +53,7 @@ public function __invoke(): array HttpClientAspect::class, RedisAspect::class, TraceAnnotationAspect::class, + MongoCollectionAspect::class, ], 'publish' => [ [ diff --git a/src/Contract/NamedFactoryInterface.php b/src/Contract/NamedFactoryInterface.php index cfe81b5..12f33f2 100644 --- a/src/Contract/NamedFactoryInterface.php +++ b/src/Contract/NamedFactoryInterface.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Contract; diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 07bd8f0..898e427 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Exception; diff --git a/src/ExceptionAppender.php b/src/ExceptionAppender.php new file mode 100644 index 0000000..b73fe37 --- /dev/null +++ b/src/ExceptionAppender.php @@ -0,0 +1,31 @@ +setTag('error', true); + + $span->setTag('otel.status_code', 'ERROR'); + $span->setTag('otel.status_description', $exception->getMessage()); + + $span->setTag($this->spanTagManager->get('exception', 'class'), $exception::class); + $span->setTag($this->spanTagManager->get('exception', 'code'), $exception->getCode()); + $span->setTag($this->spanTagManager->get('exception', 'message'), $exception->getMessage()); + $span->setTag($this->spanTagManager->get('exception', 'stack_trace'), (string) $exception); + } +} diff --git a/src/Listener/DbQueryExecutedListener.php b/src/Listener/DbQueryExecutedListener.php index bef8cf6..1967f79 100644 --- a/src/Listener/DbQueryExecutedListener.php +++ b/src/Listener/DbQueryExecutedListener.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer\Listener; @@ -51,9 +51,17 @@ public function process(object $event): void } $endTime = microtime(true); - $span = $this->startSpan($this->spanTagManager->get('db', 'db.query'), [ + $span = $this->startSpan($sql, [ 'start_time' => (int) (($endTime - $event->time / 1000) * 1000 * 1000), ]); + + $span->setTag('category', 'datastore'); + $span->setTag('component', 'MySQL'); + $span->setTag('kind', 'client'); + $span->setTag('otel.status_code', 'OK'); + $span->setTag('db.system', 'mysql'); + $span->setTag('db.name', $event->connectionName); + $span->setTag($this->spanTagManager->get('db', 'db.statement'), $sql); $span->setTag($this->spanTagManager->get('db', 'db.query_time'), $event->time . ' ms'); $span->finish((int) ($endTime * 1000 * 1000)); diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index fe1a319..6e6c9e3 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -1,37 +1,63 @@ tracer = $tracer; + $this->spanTagManager = $spanTagManager; + $this->config = $config->get('opentracing'); } /** @@ -39,25 +65,38 @@ public function __construct(private Tracer $tracer, private SwitchManager $switc * Processes an incoming server request in order to produce a response. * If unable to produce the response itself, it may delegate to the provided * request handler to do so. + * @throws Throwable */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { + if (! empty($this->config['ignore_path']) && preg_match($this->config['ignore_path'], $request->getUri()->getPath())) { + return $handler->handle($request); + } + $span = $this->buildSpan($request); defer(function () { try { $this->tracer->flush(); - } catch (\Throwable) { + } catch (Throwable $exception) { + if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { + ApplicationContext::getContainer() + ->get(StdoutLoggerInterface::class) + ->error($exception->getMessage()); + } } }); try { $response = $handler->handle($request); $span->setTag($this->spanTagManager->get('response', 'status_code'), $response->getStatusCode()); + $span->setTag('otel.status_code', 'OK'); + $this->appendCustomResponseSpan($span, $response); } catch (Throwable $exception) { - $this->switchManager->isEnable('exception') && $this->appendExceptionToSpan($span, $exception); + $this->switchManager->isEnabled('exception') && $this->appendExceptionToSpan($span, $exception); if ($exception instanceof HttpException) { $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode()); } + $this->appendCustomExceptionSpan($span, $exception); throw $exception; } finally { $span->finish(); @@ -66,25 +105,49 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface return $response; } - protected function appendExceptionToSpan(Span $span, Throwable $exception): void + protected function appendCustomExceptionSpan(Span $span, Throwable $exception): void + { + // just for override + } + + protected function appendCustomResponseSpan(Span $span, ResponseInterface $response): void { - $span->setTag('error', true); - $span->setTag($this->spanTagManager->get('exception', 'class'), get_class($exception)); - $span->setTag($this->spanTagManager->get('exception', 'code'), $exception->getCode()); - $span->setTag($this->spanTagManager->get('exception', 'message'), $exception->getMessage()); - $span->setTag($this->spanTagManager->get('exception', 'stack_trace'), (string) $exception); + // just for override } protected function buildSpan(ServerRequestInterface $request): Span { - $uri = $request->getUri(); - $span = $this->startSpan('request'); + $path = $this->getPath($request->getUri()); + + $span = $this->startSpan($path, [], SPAN_KIND_RPC_SERVER); + + $span->setTag('kind', 'server'); + $span->setTag($this->spanTagManager->get('coroutine', 'id'), (string) Coroutine::id()); - $span->setTag($this->spanTagManager->get('request', 'path'), (string) $uri); + $span->setTag($this->spanTagManager->get('request', 'path'), $path); $span->setTag($this->spanTagManager->get('request', 'method'), $request->getMethod()); + foreach ($request->getHeaders() as $key => $value) { + if (preg_match($this->sensitive_headers_regex, $key)) { + continue; + } + $span->setTag($this->spanTagManager->get('request', 'header') . '.' . $key, implode(', ', $value)); } + + foreach ($request->getAttributes() as $key => $value) { + if (! is_string($value) || empty($value)) { + continue; + } + + $span->setTag("attribute.{$key}", $value); + } + return $span; } + + protected function getPath(UriInterface $uri): string + { + return Uri::sanitize($uri->getPath()); + } } diff --git a/src/SpanStarter.php b/src/SpanStarter.php index 7b9bb25..fc6717b 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -2,24 +2,27 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; -use Hyperf\Context\ApplicationContext; use Hyperf\Context\Context; -use Hyperf\Rpc; +use Hyperf\Contract\StdoutLoggerInterface; +use Hyperf\Engine\Exception\CoroutineDestroyedException; +use Hyperf\Tracer\Support\Uuid; +use Hyperf\Utils\ApplicationContext; +use Hyperf\Utils\Coroutine; use OpenTracing\Span; use Psr\Http\Message\ServerRequestInterface; use const OpenTracing\Formats\TEXT_MAP; use const OpenTracing\Tags\SPAN_KIND; -use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER; +use const OpenTracing\Tags\SPAN_KIND_RPC_CLIENT; trait SpanStarter { @@ -29,11 +32,10 @@ trait SpanStarter protected function startSpan( string $name, array $option = [], - string $kind = SPAN_KIND_RPC_SERVER + string $kind = SPAN_KIND_RPC_CLIENT ): Span { - $root = Context::get('tracer.root'); + $root = $this->getTracerRoot(Coroutine::id()); if (! $root instanceof Span) { - $container = ApplicationContext::getContainer(); /** @var ServerRequestInterface $request */ $request = Context::get(ServerRequestInterface::class); if (! $request instanceof ServerRequestInterface) { @@ -44,15 +46,8 @@ protected function startSpan( Context::set('tracer.root', $root); return $root; } - $carrier = array_map(function ($header) { - return $header[0]; - }, $request->getHeaders()); - if ($container->has(Rpc\Context::class) && $rpcContext = $container->get(Rpc\Context::class)) { - $rpcCarrier = $rpcContext->get('tracer.carrier'); - if (! empty($rpcCarrier)) { - $carrier = $rpcCarrier; - } - } + $carrier = array_map(static fn ($header) => $header[0], $request->getHeaders()); + // Extracts the context from the HTTP headers. $spanContext = $this->tracer->extract(TEXT_MAP, $carrier); if ($spanContext) { @@ -60,12 +55,45 @@ protected function startSpan( } $root = $this->tracer->startSpan($name, $option); $root->setTag(SPAN_KIND, $kind); + + if ($spanContext === null && ! empty($correlationId = $request->getHeaderLine('X-Request-ID'))) { + $root->getContext()->setTraceId((string) Uuid::asInt($correlationId)); + } + Context::set('tracer.root', $root); return $root; } $option['child_of'] = $root->getContext(); $child = $this->tracer->startSpan($name, $option); $child->setTag(SPAN_KIND, $kind); + $child->setTag('parent.name', $root->getOperationName()); return $child; } + + private function getTracerRoot(int $coroutineId): ?Span + { + /** @var null|Span $root */ + $root = Context::get('tracer.root', null, $coroutineId); + + if ($root instanceof Span) { + return $root; + } + + if ($coroutineId <= 1) { + return $root; + } + + try { + $parent_id = Coroutine::parentId($coroutineId); + } catch (CoroutineDestroyedException $exception) { + if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { + ApplicationContext::getContainer() + ->get(StdoutLoggerInterface::class) + ->warning($exception->getMessage()); + } + return null; + } + + return $this->getTracerRoot($parent_id); + } } diff --git a/src/SpanTagManager.php b/src/SpanTagManager.php index 3d6b631..27faf55 100644 --- a/src/SpanTagManager.php +++ b/src/SpanTagManager.php @@ -2,26 +2,26 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; class SpanTagManager { - private $tags = [ + private array $tags = [ 'http_client' => [ 'http.url' => 'http.url', 'http.method' => 'http.method', 'http.status_code' => 'http.status_code', ], 'redis' => [ - 'arguments' => 'redis.arguments', - 'result' => 'redis.result', + 'arguments' => 'db.arguments', + 'result' => 'db.result', ], 'db' => [ 'db.query' => 'db.query', diff --git a/src/SpanTagManagerFactory.php b/src/SpanTagManagerFactory.php index d673295..54ecedd 100644 --- a/src/SpanTagManagerFactory.php +++ b/src/SpanTagManagerFactory.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; diff --git a/src/Support/Uri.php b/src/Support/Uri.php new file mode 100644 index 0000000..98ff2ea --- /dev/null +++ b/src/Support/Uri.php @@ -0,0 +1,30 @@ +', + '/', + ], + $uri + ); + } +} diff --git a/src/Support/Uuid.php b/src/Support/Uuid.php new file mode 100644 index 0000000..60b505c --- /dev/null +++ b/src/Support/Uuid.php @@ -0,0 +1,30 @@ + false, 'redis' => false, diff --git a/src/SwitchManagerFactory.php b/src/SwitchManagerFactory.php index 1e1176d..0396ae9 100644 --- a/src/SwitchManagerFactory.php +++ b/src/SwitchManagerFactory.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; diff --git a/src/TracerFactory.php b/src/TracerFactory.php index 43e8b5f..1beeda4 100644 --- a/src/TracerFactory.php +++ b/src/TracerFactory.php @@ -2,31 +2,36 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace Hyperf\Tracer; +use Exception; use Hyperf\Contract\ConfigInterface; -use Hyperf\Tracer\Adapter\ZipkinTracerFactory; +use Hyperf\Tracer\Adapter\JaegerTracerFactory; use Hyperf\Tracer\Contract\NamedFactoryInterface; -use Hyperf\Tracer\Exception\InvalidArgumentException; +use InvalidArgumentException; +use OpenTracing\Tracer; use Psr\Container\ContainerInterface; class TracerFactory { - public function __invoke(ContainerInterface $container) + /** + * @throws Exception + */ + public function __invoke(ContainerInterface $container): Tracer { $config = $container->get(ConfigInterface::class); $name = $config->get('opentracing.default'); // v1.0 has no 'default' config. Fallback to v1.0 mode for backward compatibility. if (empty($name)) { - $factory = $container->get(ZipkinTracerFactory::class); + $factory = $container->get(JaegerTracerFactory::class); return $factory->make(''); } diff --git a/tests/TraceMiddlewareTest.php b/tests/TraceMiddlewareTest.php new file mode 100644 index 0000000..ecfe0f1 --- /dev/null +++ b/tests/TraceMiddlewareTest.php @@ -0,0 +1,80 @@ +tracer = Mockery::mock(Tracer::class); + $this->switchManager = Mockery::spy(SwitchManager::class); + $this->spanTagManager = Mockery::spy(SpanTagManager::class); + $this->config = Mockery::mock(ConfigInterface::class); + + $this->config + ->expects('get') + ->with('opentracing') + ->andReturn(['ignore_path' => '/^\/health$/']); + + $this->traceMiddleware = new TraceMiddleware( + $this->tracer, + $this->switchManager, + $this->spanTagManager, + $this->config, + ); + + parent::setUp(); + } + + public function testProcessIgnorePathIgnores(): void + { + $uri = Mockery::mock(UriInterface::class); + $uri->expects('getPath')->andReturn('/health'); + + $request = Mockery::mock(ServerRequestInterface::class); + $request->expects('getUri')->andReturn($uri); + + $handler = Mockery::mock(RequestHandlerInterface::class); + $handler->expects('handle')->with($request); + + $this->tracer->expects('startSpan')->never(); + $this->traceMiddleware->process($request, $handler); + } +} diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index 7df87b1..33ed8f8 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -2,24 +2,26 @@ declare(strict_types=1); /** - * This file is part of Hyperf. + * This file is part of Hyperf + OpenCodeCo * - * @link https://www.hyperf.io + * @link https://opencodeco.dev * @document https://hyperf.wiki - * @contact group@hyperf.io - * @license https://github.com/hyperf/hyperf/blob/master/LICENSE + * @contact leo@opencodeco.dev + * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ namespace HyperfTest\Tracer; +use Exception; use Hyperf\Config\Config; -use Hyperf\Context\ApplicationContext; +use Hyperf\Contract\ConfigInterface; use Hyperf\Di\Container; +use Hyperf\Tracer\Adapter\JaegerTracerFactory; use Hyperf\Tracer\TracerFactory; +use Hyperf\Utils\ApplicationContext; +use Jaeger\Tracer; use Mockery; +use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use PHPUnit\Framework\TestCase; -use Zipkin\Samplers\BinarySampler; - -use function Hyperf\Support\env; /** * @internal @@ -27,74 +29,12 @@ */ class TracerFactoryTest extends TestCase { - protected function tearDown(): void - { - Mockery::close(); - } - - public function testOldSetting() - { - $config = new Config([ - 'opentracing' => [ - 'zipkin' => [ - 'app' => [ - 'name' => env('APP_NAME', 'skeleton'), - // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null - 'ipv4' => '127.0.0.1', - 'ipv6' => null, - 'port' => 9501, - ], - 'options' => [ - 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), - 'timeout' => env('ZIPKIN_TIMEOUT', 1), - ], - 'sampler' => BinarySampler::createAsAlwaysSample(), - ], - ], - ]); - $container = $this->getContainer($config); - $factory = new TracerFactory(); - - $this->assertInstanceOf(\ZipkinOpenTracing\Tracer::class, $factory($container)); - } - - public function testZipkinFactory() - { - $config = new Config([ - 'opentracing' => [ - 'default' => 'zipkin', - 'enable' => [ - ], - 'tracer' => [ - 'zipkin' => [ - 'driver' => \Hyperf\Tracer\Adapter\ZipkinTracerFactory::class, - 'app' => [ - 'name' => 'skeleton', - // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null - 'ipv4' => '127.0.0.1', - 'ipv6' => null, - 'port' => 9501, - ], - 'options' => [ - ], - 'sampler' => BinarySampler::createAsAlwaysSample(), - ], - 'jaeger' => [ - 'driver' => \Hyperf\Tracer\Adapter\JaegerTracerFactory::class, - 'name' => 'skeleton', - 'options' => [ - ], - ], - ], - ], - ]); - $container = $this->getContainer($config); - $factory = new TracerFactory(); - - $this->assertInstanceOf(\ZipkinOpenTracing\Tracer::class, $factory($container)); - } + use MockeryPHPUnitIntegration; - public function testJaegerFactory() + /** + * @throws Exception + */ + public function testJaegerFactory(): void { $config = new Config([ 'opentracing' => [ @@ -102,21 +42,8 @@ public function testJaegerFactory() 'enable' => [ ], 'tracer' => [ - 'zipkin' => [ - 'driver' => \Hyperf\Tracer\Adapter\ZipkinTracerFactory::class, - 'app' => [ - 'name' => 'skeleton', - // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null - 'ipv4' => '127.0.0.1', - 'ipv6' => null, - 'port' => 9501, - ], - 'options' => [ - ], - 'sampler' => BinarySampler::createAsAlwaysSample(), - ], 'jaeger' => [ - 'driver' => \Hyperf\Tracer\Adapter\JaegerTracerFactory::class, + 'driver' => JaegerTracerFactory::class, 'name' => 'skeleton', 'options' => [ ], @@ -127,23 +54,20 @@ public function testJaegerFactory() $container = $this->getContainer($config); $factory = new TracerFactory(); - $this->assertInstanceOf(\Jaeger\Tracer::class, $factory($container)); + $this->assertInstanceOf(Tracer::class, $factory($container)); } protected function getContainer($config) { $container = Mockery::mock(Container::class); - $client = Mockery::mock(\Hyperf\Tracer\Adapter\HttpClientFactory::class); - $container->shouldReceive('get') - ->with(\Hyperf\Tracer\Adapter\ZipkinTracerFactory::class) - ->andReturn(new \Hyperf\Tracer\Adapter\ZipkinTracerFactory($config, $client)); - $container->shouldReceive('get') - ->with(\Hyperf\Tracer\Adapter\JaegerTracerFactory::class) - ->andReturn(new \Hyperf\Tracer\Adapter\JaegerTracerFactory($config)); - $container->shouldReceive('get') - ->with(\Hyperf\Contract\ConfigInterface::class) - ->andReturn($config); + $container->allows('get') + ->with(JaegerTracerFactory::class) + ->andReturns(new JaegerTracerFactory($config)); + + $container->allows('get') + ->with(ConfigInterface::class) + ->andReturns($config); ApplicationContext::setContainer($container); diff --git a/tests/UriTest.php b/tests/UriTest.php new file mode 100644 index 0000000..67126b2 --- /dev/null +++ b/tests/UriTest.php @@ -0,0 +1,48 @@ +', Uri::sanitize('/v2/test/123')); + self::assertSame('/v3/test//bar', Uri::sanitize('/v3/test/123/bar')); + self::assertSame('/v4/test//bar//', Uri::sanitize('/v4/test/123/bar/456/')); + self::assertSame('/v5/test//', Uri::sanitize('/v5/test/123/456')); + self::assertSame('/v6/test///', Uri::sanitize('/v6/test/123/456/')); + self::assertSame('/v7/test///', Uri::sanitize('/v7/test/123/456/789')); + self::assertSame('/v8/test////', Uri::sanitize('/v8/test/123/456/789/')); + } + + public function testClearUriUuids(): void + { + $uuid = '123e4567-e89b-12d3-a456-426614174000'; + + self::assertSame('/v1/test', Uri::sanitize('/v1/test')); + self::assertSame('/v2/test/', Uri::sanitize("/v2/test/{$uuid}")); + self::assertSame('/v3/test//bar', Uri::sanitize("/v3/test/{$uuid}/bar")); + self::assertSame('/v4/test//bar//', Uri::sanitize("/v4/test/{$uuid}/bar/{$uuid}/")); + self::assertSame('/v5/test//', Uri::sanitize("/v5/test/{$uuid}/{$uuid}")); + self::assertSame('/v6/test///', Uri::sanitize("/v6/test/{$uuid}/{$uuid}/")); + self::assertSame('/v7/test///', Uri::sanitize("/v7/test/{$uuid}/{$uuid}/{$uuid}")); + self::assertSame('/v8/test////', Uri::sanitize("/v8/test/{$uuid}/{$uuid}/{$uuid}/")); + } +} diff --git a/tests/UuidTest.php b/tests/UuidTest.php new file mode 100644 index 0000000..eabd4ac --- /dev/null +++ b/tests/UuidTest.php @@ -0,0 +1,31 @@ + Date: Wed, 26 Jul 2023 14:36:27 -0300 Subject: [PATCH 03/27] fix(deps): Jaeger is a requirement --- composer.json | 6 +- composer.lock | 470 ++++++++++++++++++++++++++------------------------ 2 files changed, 244 insertions(+), 232 deletions(-) diff --git a/composer.json b/composer.json index 4b8caed..6d20c1e 100644 --- a/composer.json +++ b/composer.json @@ -18,20 +18,20 @@ }, "require": { "php": ">=8.0", - "psr/http-message": "^1.0|^2.0", "hyperf/contract": "^3.0", "hyperf/di": "^3.0", "hyperf/guzzle": "^3.0", "hyperf/support": "^3.0", "hyperf/utils": "^3.0", "jcchavezs/zipkin-opentracing": "^2.0", - "opentracing/opentracing": "^1.0" + "jonahgeorge/jaeger-client-php": "^1.4", + "opentracing/opentracing": "^1.0", + "psr/http-message": "^1.0|^2.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.21", "hyperf/config": "^3.0", "hyperf/testing": "^3.0", - "jonahgeorge/jaeger-client-php": "^1.4", "mockery/mockery": "^1.6", "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.10", diff --git a/composer.lock b/composer.lock index 2c8a34a..4f839d5 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": "8921fe4d97dc8a17530cc0a020552f31", + "content-hash": "f42f85bc37ab21c5cb3edf2d38e78db3", "packages": [ { "name": "doctrine/inflector", @@ -611,16 +611,16 @@ }, { "name": "hyperf/codec", - "version": "v3.0.1", + "version": "v3.0.30", "source": { "type": "git", "url": "https://github.com/hyperf/codec.git", - "reference": "7d3cbfa06c50ef52809acadfcbcd59424366f591" + "reference": "30b170b59770c7f92ae845fca777b8ea8a953599" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/codec/zipball/7d3cbfa06c50ef52809acadfcbcd59424366f591", - "reference": "7d3cbfa06c50ef52809acadfcbcd59424366f591", + "url": "https://api.github.com/repos/hyperf/codec/zipball/30b170b59770c7f92ae845fca777b8ea8a953599", + "reference": "30b170b59770c7f92ae845fca777b8ea8a953599", "shasum": "" }, "require": { @@ -629,6 +629,9 @@ "hyperf/contract": "~3.0.0", "php": ">=8.0" }, + "suggest": { + "ext-igbinary": "Required to use IgbinarySerializerPacker." + }, "type": "library", "extra": { "branch-alias": { @@ -658,20 +661,20 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-24T09:49:41+00:00" + "time": "2023-07-18T12:10:42+00:00" }, { "name": "hyperf/collection", - "version": "v3.0.24", + "version": "v3.0.29", "source": { "type": "git", "url": "https://github.com/hyperf/collection.git", - "reference": "25be1f5643565dd19c05ee2da4156cfaa8bb71eb" + "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/collection/zipball/25be1f5643565dd19c05ee2da4156cfaa8bb71eb", - "reference": "25be1f5643565dd19c05ee2da4156cfaa8bb71eb", + "url": "https://api.github.com/repos/hyperf/collection/zipball/c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", + "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", "shasum": "" }, "require": { @@ -711,7 +714,7 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-05T11:54:56+00:00" + "time": "2023-07-14T03:41:52+00:00" }, { "name": "hyperf/conditionable", @@ -1027,20 +1030,20 @@ }, { "name": "hyperf/engine", - "version": "v2.9.0", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/hyperf/engine.git", - "reference": "3e0920ad7ba15a965f129143d3248f8e85e0c2d9" + "reference": "9b27b29041403b8ee397ffe1e5254816e18cb5b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/engine/zipball/3e0920ad7ba15a965f129143d3248f8e85e0c2d9", - "reference": "3e0920ad7ba15a965f129143d3248f8e85e0c2d9", + "url": "https://api.github.com/repos/hyperf/engine/zipball/9b27b29041403b8ee397ffe1e5254816e18cb5b9", + "reference": "9b27b29041403b8ee397ffe1e5254816e18cb5b9", "shasum": "" }, "require": { - "hyperf/engine-contract": "~1.8.0", + "hyperf/engine-contract": "~1.9.0", "php": ">=8.0" }, "conflict": { @@ -1064,7 +1067,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.9-dev" + "dev-master": "2.10-dev" }, "hyperf": { "config": "Hyperf\\Engine\\ConfigProvider" @@ -1091,22 +1094,22 @@ ], "support": { "issues": "https://github.com/hyperf/engine/issues", - "source": "https://github.com/hyperf/engine/tree/v2.9.0" + "source": "https://github.com/hyperf/engine/tree/v2.10.0" }, - "time": "2023-06-17T11:23:50+00:00" + "time": "2023-07-14T02:28:58+00:00" }, { "name": "hyperf/engine-contract", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/hyperf/engine-contract.git", - "reference": "69b9bb43d6c356be7c7eb2f55ff06282436a0e4d" + "reference": "45c9c49766d8b0e539975fe4c5ed6807221c4b38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/engine-contract/zipball/69b9bb43d6c356be7c7eb2f55ff06282436a0e4d", - "reference": "69b9bb43d6c356be7c7eb2f55ff06282436a0e4d", + "url": "https://api.github.com/repos/hyperf/engine-contract/zipball/45c9c49766d8b0e539975fe4c5ed6807221c4b38", + "reference": "45c9c49766d8b0e539975fe4c5ed6807221c4b38", "shasum": "" }, "require": { @@ -1126,7 +1129,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1148,9 +1151,9 @@ ], "support": { "issues": "https://github.com/hyperf/engine-contract/issues", - "source": "https://github.com/hyperf/engine-contract/tree/v1.8.0" + "source": "https://github.com/hyperf/engine-contract/tree/v1.9.0" }, - "time": "2023-06-17T11:16:19+00:00" + "time": "2023-07-14T02:21:02+00:00" }, { "name": "hyperf/guzzle", @@ -1663,6 +1666,74 @@ ], "time": "2023-06-08T11:40:46+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": "nikic/php-parser", "version": "v4.16.0", @@ -1844,6 +1915,45 @@ }, "time": "2023-05-24T05:24:25+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": "php-di/phpdoc-reader", "version": "2.2.1", @@ -1961,6 +2071,55 @@ ], "time": "2023-02-25T19:38:58+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/container", "version": "2.0.2", @@ -3106,16 +3265,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.21.1", + "version": "v3.22.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86" + "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/229b55b3eae4729a8e2a321441ba40fcb3720b86", - "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", "shasum": "" }, "require": { @@ -3125,7 +3284,7 @@ "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", - "php": "^8.0.1", + "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", "symfony/console": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", @@ -3139,6 +3298,7 @@ "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", "keradus/cli-executor": "^2.0", "mikey179/vfsstream": "^1.6.11", @@ -3190,7 +3350,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.21.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" }, "funding": [ { @@ -3198,7 +3358,7 @@ "type": "github" } ], - "time": "2023-07-05T21:50:25+00:00" + "time": "2023-07-16T23:08:06+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3680,16 +3840,16 @@ }, { "name": "hyperf/testing", - "version": "v3.0.23", + "version": "v3.0.30", "source": { "type": "git", "url": "https://github.com/hyperf/testing.git", - "reference": "e660ba6f6f4c1dd46cc6203feeefd4638454108c" + "reference": "fa9d8c1e79bc4958be5a2642387e1915a7fc9f13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/testing/zipball/e660ba6f6f4c1dd46cc6203feeefd4638454108c", - "reference": "e660ba6f6f4c1dd46cc6203feeefd4638454108c", + "url": "https://api.github.com/repos/hyperf/testing/zipball/fa9d8c1e79bc4958be5a2642387e1915a7fc9f13", + "reference": "fa9d8c1e79bc4958be5a2642387e1915a7fc9f13", "shasum": "" }, "require": { @@ -3731,77 +3891,9 @@ "testing" ], "support": { - "source": "https://github.com/hyperf/testing/tree/v3.0.23" - }, - "time": "2023-06-01T08:26:57+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" + "source": "https://github.com/hyperf/testing/tree/v3.0.30" }, - "time": "2023-01-31T13:40:20+00:00" + "time": "2023-07-21T03:15:25+00:00" }, { "name": "laminas/laminas-mime", @@ -3925,37 +4017,33 @@ }, { "name": "mockery/mockery", - "version": "1.6.2", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191" + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191", + "url": "https://api.github.com/repos/mockery/mockery/zipball/d1413755e26fe56a63455f7753221c86cbb88f66", + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.4 || ^8.0" + "php": ">=7.4,<8.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9.3", - "psalm/plugin-phpunit": "^0.18", - "vimeo/psalm": "^5.9" + "psalm/plugin-phpunit": "^0.18.4", + "symplify/easy-coding-standard": "^11.5.0", + "vimeo/psalm": "^5.13.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.6.x-dev" - } - }, "autoload": { "files": [ "library/helpers.php", @@ -3973,12 +4061,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -3996,10 +4092,13 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.6.2" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2023-06-07T09:07:52+00:00" + "time": "2023-07-19T15:51:02+00:00" }, { "name": "myclabs/deep-copy", @@ -4110,45 +4209,6 @@ }, "time": "2018-02-13T20:26:39+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": "phar-io/manifest", "version": "2.0.3", @@ -4306,16 +4366,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.25", + "version": "1.10.26", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c" + "reference": "5d660cbb7e1b89253a47147ae44044f49832351f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f", + "reference": "5d660cbb7e1b89253a47147ae44044f49832351f", "shasum": "" }, "require": { @@ -4364,7 +4424,7 @@ "type": "tidelift" } ], - "time": "2023-07-06T12:11:37+00:00" + "time": "2023-07-19T12:44:37+00:00" }, { "name": "phpstan/phpstan-mockery", @@ -4418,16 +4478,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -4483,7 +4543,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -4491,7 +4552,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4837,55 +4898,6 @@ ], "time": "2023-07-10T04:04:23+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/event-dispatcher", "version": "1.0.0", @@ -5051,21 +5063,21 @@ }, { "name": "rector/rector", - "version": "0.17.5", + "version": "0.17.7", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "f4a5f45c420b797d8e8e9c540e14c8bbdddff62d" + "reference": "0e76101aa329911b7fec43106aac5843a978b209" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/f4a5f45c420b797d8e8e9c540e14c8bbdddff62d", - "reference": "f4a5f45c420b797d8e8e9c540e14c8bbdddff62d", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/0e76101aa329911b7fec43106aac5843a978b209", + "reference": "0e76101aa329911b7fec43106aac5843a978b209", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.20" + "phpstan/phpstan": "^1.10.26" }, "conflict": { "rector/rector-doctrine": "*", @@ -5100,7 +5112,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.17.5" + "source": "https://github.com/rectorphp/rector/tree/0.17.7" }, "funding": [ { @@ -5108,7 +5120,7 @@ "type": "github" } ], - "time": "2023-07-12T08:42:12+00:00" + "time": "2023-07-23T20:44:23+00:00" }, { "name": "sebastian/cli-parser", From 7bac2f6aa05842cbb095217621dff8c120902a43 Mon Sep 17 00:00:00 2001 From: leocavalcante Date: Thu, 27 Jul 2023 17:27:18 -0300 Subject: [PATCH 04/27] fix: Typo --- src/Aspect/DbAspect.php | 2 +- src/Aspect/MethodAspect.php | 2 +- src/Aspect/RedisAspect.php | 2 +- src/Listener/DbQueryExecutedListener.php | 2 +- src/SwitchManager.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Aspect/DbAspect.php b/src/Aspect/DbAspect.php index 240c782..661f01a 100644 --- a/src/Aspect/DbAspect.php +++ b/src/Aspect/DbAspect.php @@ -37,7 +37,7 @@ public function __construct(private Tracer $tracer, private SwitchManager $switc */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { - if ($this->switchManager->isEnable('db') === false) { + if ($this->switchManager->isEnabled('db') === false) { return $proceedingJoinPoint->process(); } diff --git a/src/Aspect/MethodAspect.php b/src/Aspect/MethodAspect.php index efe6597..c196fe9 100644 --- a/src/Aspect/MethodAspect.php +++ b/src/Aspect/MethodAspect.php @@ -35,7 +35,7 @@ public function __construct(private Tracer $tracer, private SwitchManager $switc */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { - if ($this->switchManager->isEnable('method') === false) { + if ($this->switchManager->isEnabled('method') === false) { return $proceedingJoinPoint->process(); } diff --git a/src/Aspect/RedisAspect.php b/src/Aspect/RedisAspect.php index d0e805a..ce42059 100644 --- a/src/Aspect/RedisAspect.php +++ b/src/Aspect/RedisAspect.php @@ -37,7 +37,7 @@ public function __construct(private Tracer $tracer, private SwitchManager $switc */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { - if ($this->switchManager->isEnable('redis') === false) { + if ($this->switchManager->isEnabled('redis') === false) { return $proceedingJoinPoint->process(); } diff --git a/src/Listener/DbQueryExecutedListener.php b/src/Listener/DbQueryExecutedListener.php index 1967f79..51ae82b 100644 --- a/src/Listener/DbQueryExecutedListener.php +++ b/src/Listener/DbQueryExecutedListener.php @@ -40,7 +40,7 @@ public function listen(): array */ public function process(object $event): void { - if ($this->switchManager->isEnable('db') === false) { + if ($this->switchManager->isEnabled('db') === false) { return; } $sql = $event->sql; diff --git a/src/SwitchManager.php b/src/SwitchManager.php index 7b0b20d..06ba0ae 100644 --- a/src/SwitchManager.php +++ b/src/SwitchManager.php @@ -37,7 +37,7 @@ public function apply(array $config): void /** * Determine if the tracer is enabled ? */ - public function isEnable(string $identifier): bool + public function isEnabled(string $identifier): bool { if (! isset($this->config[$identifier])) { return false; From 25fd60ce08880f25439a43f9f14b0b5882c94add Mon Sep 17 00:00:00 2001 From: Leo Cavalcante Date: Wed, 16 Aug 2023 21:35:41 -0300 Subject: [PATCH 05/27] Don't require a tracer.root to enable a Span (#2) Sometimes, the Span could be called inside a coroutine, then it will not have a tracer.root on its Context. --- src/SwitchManager.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SwitchManager.php b/src/SwitchManager.php index 06ba0ae..4644b47 100644 --- a/src/SwitchManager.php +++ b/src/SwitchManager.php @@ -39,10 +39,6 @@ public function apply(array $config): void */ public function isEnabled(string $identifier): bool { - if (! isset($this->config[$identifier])) { - return false; - } - - return $this->config[$identifier] && Context::get('tracer.root') instanceof Span; + return $this->config[$identifier] ?? false; } } From abec70833c8f6040e3e42c9adb8a80df70d2a189 Mon Sep 17 00:00:00 2001 From: Leo Cavalcante Date: Mon, 4 Sep 2023 21:28:46 -0300 Subject: [PATCH 06/27] chore(docs): Better readme --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42c26f6..7193034 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,19 @@ # Hyperf Tracer -🐾 Drop-in replacement for the Hyperf Tracer component. +🔭 Drop-in replacement for the `hyperf/tracer` component. -Suited for special needs. +Suited for special needs, especially for OpenTelemetry, New Relic and Dynatrace platforms. + +## Getting started + +### Install + +#### Add OpenCodeCo's Composer repository: +```shell +composer config repositories.opencodeco composer https://composer.opencodeco.dev +``` + +#### Update your `hyperf/tracer`: +```shell +composer update hyperf/tracer +``` From 774a9f53d6fa4f59e1cf829adeb60541f93e8730 Mon Sep 17 00:00:00 2001 From: Vitor Rodrigues Date: Fri, 15 Sep 2023 12:09:08 -0300 Subject: [PATCH 07/27] Refactor/uri sanitize fix patterns (#3) * add vscode and jetbrains ide folders into gitignore * refactor and add new patters and replacements * add tests --- .gitignore | 2 ++ src/Support/Uri.php | 6 +++++- tests/UriTest.php | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b47ecda..0f09d0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.cache +.idea +.vscode vendor/ diff --git a/src/Support/Uri.php b/src/Support/Uri.php index 98ff2ea..8269458 100644 --- a/src/Support/Uri.php +++ b/src/Support/Uri.php @@ -17,11 +17,15 @@ public static function sanitize(string $uri): string { return preg_replace( [ - '/\/(?<=\/)([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})(?=\/)?/', + '/\/(?<=\/)([A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12})(?=\/)?/i', + '/\/(?<=\/)([A-Z]{3}-?\d[0-9A-Z]\d{2})(?=\/)?/i', + '/\/(?<=\/)[0-9A-F]{24}(?=\/)?/i', '/\/(?<=\/)\d+(?=\/)?/', ], [ '/', + '/', + '/', '/', ], $uri diff --git a/tests/UriTest.php b/tests/UriTest.php index 67126b2..d4da1ce 100644 --- a/tests/UriTest.php +++ b/tests/UriTest.php @@ -32,6 +32,25 @@ public function testSanitizeNumbers(): void self::assertSame('/v8/test////', Uri::sanitize('/v8/test/123/456/789/')); } + public function testSanitizeLicensePlatesStrings(): void + { + self::assertSame('/v1/test', Uri::sanitize('/v1/test')); + self::assertSame('/v2/test/', Uri::sanitize('/v2/test/PET9D49')); + self::assertSame('/v2/test/', Uri::sanitize('/v2/test/PET9349')); + self::assertSame('/v3/test//bar', Uri::sanitize('/v3/test/PET9D49/bar')); + self::assertSame('/v3/test//bar', Uri::sanitize('/v3/test/PET9349/bar')); + self::assertSame('/v4/test//bar//', Uri::sanitize('/v4/test/PET9D49/bar/PET9D49/')); + self::assertSame('/v4/test//bar//', Uri::sanitize('/v4/test/PET9349/bar/PET9349/')); + self::assertSame('/v5/test//', Uri::sanitize('/v5/test/PET9D49/PET9D49')); + self::assertSame('/v5/test//', Uri::sanitize('/v5/test/PET9349/PET9349')); + self::assertSame('/v6/test///', Uri::sanitize('/v6/test/PET9D49/PET9D49/')); + self::assertSame('/v6/test///', Uri::sanitize('/v6/test/PET9349/PET9349/')); + self::assertSame('/v7/test///', Uri::sanitize('/v7/test/PET9D49/PET9D49/PET9D49')); + self::assertSame('/v7/test///', Uri::sanitize('/v7/test/PET9349/PET9349/PET9349')); + self::assertSame('/v8/test////', Uri::sanitize('/v8/test/PET9D49/PET9D49/PET9D49/')); + self::assertSame('/v8/test////', Uri::sanitize('/v8/test/PET9349/PET9349/PET9349/')); + } + public function testClearUriUuids(): void { $uuid = '123e4567-e89b-12d3-a456-426614174000'; @@ -45,4 +64,18 @@ public function testClearUriUuids(): void self::assertSame('/v7/test///', Uri::sanitize("/v7/test/{$uuid}/{$uuid}/{$uuid}")); self::assertSame('/v8/test////', Uri::sanitize("/v8/test/{$uuid}/{$uuid}/{$uuid}/")); } + + public function testClearUriOids(): void + { + $oid = '650229807612bba4984d1fc7'; + + self::assertSame('/v1/test', Uri::sanitize('/v1/test')); + self::assertSame('/v2/test/', Uri::sanitize("/v2/test/{$oid}")); + self::assertSame('/v3/test//bar', Uri::sanitize("/v3/test/{$oid}/bar")); + self::assertSame('/v4/test//bar//', Uri::sanitize("/v4/test/{$oid}/bar/{$oid}/")); + self::assertSame('/v5/test//', Uri::sanitize("/v5/test/{$oid}/{$oid}")); + self::assertSame('/v6/test///', Uri::sanitize("/v6/test/{$oid}/{$oid}/")); + self::assertSame('/v7/test///', Uri::sanitize("/v7/test/{$oid}/{$oid}/{$oid}")); + self::assertSame('/v8/test////', Uri::sanitize("/v8/test/{$oid}/{$oid}/{$oid}/")); + } } From b28b031b25a19714b6c66e888d9689f1bb26021d Mon Sep 17 00:00:00 2001 From: celosauro <52496242+celosauro@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:12:53 -0300 Subject: [PATCH 08/27] Fix: TypeError & warnings (#4) * Fix: TypeError & warnings * Fix: TypeError & warnings --- class_map/ThriftUdpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class_map/ThriftUdpTransport.php b/class_map/ThriftUdpTransport.php index 614cc93..da42fa1 100644 --- a/class_map/ThriftUdpTransport.php +++ b/class_map/ThriftUdpTransport.php @@ -33,7 +33,7 @@ class ThriftUdpTransport extends TTransport public function __construct( private string $host, private int $port, - private LoggerInterface $logger = null + private ?LoggerInterface $logger = null ) { $this->logger = $logger ?? new NullLogger(); } From 2bf095f00d13c36ae798c661f5be29342f862f18 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:18:23 -0300 Subject: [PATCH 09/27] Upgrade deprecations (#5) --- src/Middleware/TraceMiddleware.php | 4 ++-- src/SpanStarter.php | 4 ++-- tests/TracerFactoryTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index 6e6c9e3..0624127 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -23,8 +23,8 @@ use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\Support\Uri; use Hyperf\Tracer\SwitchManager; -use Hyperf\Utils\ApplicationContext; -use Hyperf\Utils\Coroutine; +use Hyperf\Context\ApplicationContext; +use Hyperf\Coroutine\Coroutine; use OpenTracing\Span; use OpenTracing\Tracer; use Psr\Http\Message\ResponseInterface; diff --git a/src/SpanStarter.php b/src/SpanStarter.php index fc6717b..bf8d97f 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -15,8 +15,8 @@ use Hyperf\Contract\StdoutLoggerInterface; use Hyperf\Engine\Exception\CoroutineDestroyedException; use Hyperf\Tracer\Support\Uuid; -use Hyperf\Utils\ApplicationContext; -use Hyperf\Utils\Coroutine; +use Hyperf\Context\ApplicationContext; +use Hyperf\Coroutine\Coroutine; use OpenTracing\Span; use Psr\Http\Message\ServerRequestInterface; diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index 33ed8f8..2611390 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -17,7 +17,7 @@ use Hyperf\Di\Container; use Hyperf\Tracer\Adapter\JaegerTracerFactory; use Hyperf\Tracer\TracerFactory; -use Hyperf\Utils\ApplicationContext; +use Hyperf\Context\ApplicationContext; use Jaeger\Tracer; use Mockery; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; From 5f5b4de935d6755a71ed98f35652b398938683c8 Mon Sep 17 00:00:00 2001 From: Leo Cavalcante Date: Tue, 5 Dec 2023 12:28:15 -0300 Subject: [PATCH 10/27] Fix defer function (#6) fix: Defer function --- composer.json | 2 +- composer.lock | 2261 +++++++++++++++------------- src/Middleware/TraceMiddleware.php | 6 +- src/SpanStarter.php | 4 +- src/SwitchManager.php | 3 - tests/TracerFactoryTest.php | 2 +- 6 files changed, 1217 insertions(+), 1061 deletions(-) diff --git a/composer.json b/composer.json index 6d20c1e..5164859 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ } }, "scripts": { - "test": "co-phpunit", + "test": "co-phpunit", "test-coverage": "co-phpunit --coverage-clover clover.xml", "cs-fix": "php-cs-fixer fix $1", "analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon", diff --git a/composer.lock b/composer.lock index 4f839d5..1daff2e 100644 --- a/composer.lock +++ b/composer.lock @@ -169,24 +169,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -215,7 +215,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -227,26 +227,26 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.7.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "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" @@ -255,11 +255,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "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", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -337,7 +337,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -353,28 +353,28 @@ "type": "tidelift" } ], - "time": "2023-05-21T14:04:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "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" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -420,7 +420,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.0" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -436,20 +436,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T13:50:22+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -463,9 +463,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -536,7 +536,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -552,27 +552,27 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "hyperf/code-parser", - "version": "v3.0.18", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/code-parser.git", - "reference": "f1812421150d7ef95067eb6657c6f84514b6dfea" + "reference": "b2b42ea957463fbdf6fbb762fcff0ff578c36a4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/code-parser/zipball/f1812421150d7ef95067eb6657c6f84514b6dfea", - "reference": "f1812421150d7ef95067eb6657c6f84514b6dfea", + "url": "https://api.github.com/repos/hyperf/code-parser/zipball/b2b42ea957463fbdf6fbb762fcff0ff578c36a4c", + "reference": "b2b42ea957463fbdf6fbb762fcff0ff578c36a4c", "shasum": "" }, "require": { - "hyperf/collection": "~3.0.0", - "hyperf/stringable": "~3.0.0", - "hyperf/support": "~3.0.0", - "php": ">=8.0" + "hyperf/collection": "~3.1.0", + "hyperf/stringable": "~3.1.0", + "hyperf/support": "~3.1.0", + "php": ">=8.1" }, "suggest": { "jean85/pretty-package-versions": "Required to use PrettyVersions. (^1.2|^2.0)", @@ -581,7 +581,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -607,27 +607,37 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-26T03:02:31+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/codec", - "version": "v3.0.30", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/codec.git", - "reference": "30b170b59770c7f92ae845fca777b8ea8a953599" + "reference": "18db58e92688b7992e3d939b6c5b7790a45f2d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/codec/zipball/30b170b59770c7f92ae845fca777b8ea8a953599", - "reference": "30b170b59770c7f92ae845fca777b8ea8a953599", + "url": "https://api.github.com/repos/hyperf/codec/zipball/18db58e92688b7992e3d939b6c5b7790a45f2d2b", + "reference": "18db58e92688b7992e3d939b6c5b7790a45f2d2b", "shasum": "" }, "require": { "ext-json": "*", "ext-xml": "*", - "hyperf/contract": "~3.0.0", - "php": ">=8.0" + "hyperf/contract": "~3.1.0", + "php": ">=8.1" }, "suggest": { "ext-igbinary": "Required to use IgbinarySerializerPacker." @@ -635,7 +645,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -661,31 +671,41 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-07-18T12:10:42+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/collection", - "version": "v3.0.29", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/collection.git", - "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad" + "reference": "a71303f5d21786253f6814aa9e1663c5e53ec575" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/collection/zipball/c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", - "reference": "c2e3f919f8c445da69e0e0c10920c6fc0754b9ad", + "url": "https://api.github.com/repos/hyperf/collection/zipball/a71303f5d21786253f6814aa9e1663c5e53ec575", + "reference": "a71303f5d21786253f6814aa9e1663c5e53ec575", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "hyperf/macroable": "~3.0.0", - "php": ">=7.4" + "hyperf/contract": "~3.1.0", + "hyperf/macroable": "~3.1.0", + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -714,29 +734,39 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-07-14T03:41:52+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/conditionable", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/conditionable.git", - "reference": "4222cdc512e9e48e4375a480161c6365276ff803" + "reference": "18da1405ae39a775bd3fae8cec98841eaa22f013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/conditionable/zipball/4222cdc512e9e48e4375a480161c6365276ff803", - "reference": "4222cdc512e9e48e4375a480161c6365276ff803", + "url": "https://api.github.com/repos/hyperf/conditionable/zipball/18da1405ae39a775bd3fae8cec98841eaa22f013", + "reference": "18da1405ae39a775bd3fae8cec98841eaa22f013", "shasum": "" }, "require": { - "php": ">=7.4" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -762,30 +792,43 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-03-28T15:02:39+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/context", - "version": "v3.0.18", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/context.git", - "reference": "8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec" + "reference": "8307d6c924ed67c7abd47874ec14f0e2e3e4b732" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/context/zipball/8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec", - "reference": "8cff8cc1c70c1a8c390a13b97986ddd5e47fa2ec", + "url": "https://api.github.com/repos/hyperf/context/zipball/8307d6c924ed67c7abd47874ec14f0e2e3e4b732", + "reference": "8307d6c924ed67c7abd47874ec14f0e2e3e4b732", "shasum": "" }, "require": { - "hyperf/engine": "^1.2|^2.0", - "php": ">=8.0" + "hyperf/engine": "^2.0", + "php": ">=8.1" + }, + "suggest": { + "swow/psr7-plus": "Required to use RequestContext and ResponseContext" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -811,29 +854,39 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-26T03:02:31+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/contract", - "version": "v3.0.10", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/contract.git", - "reference": "93488df36b1c4e2fc16c630fb77c110bafffb141" + "reference": "2b2f3610fce6c080c6b61764cad2745f7c9a312b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/contract/zipball/93488df36b1c4e2fc16c630fb77c110bafffb141", - "reference": "93488df36b1c4e2fc16c630fb77c110bafffb141", + "url": "https://api.github.com/repos/hyperf/contract/zipball/2b2f3610fce6c080c6b61764cad2745f7c9a312b", + "reference": "2b2f3610fce6c080c6b61764cad2745f7c9a312b", "shasum": "" }, "require": { - "php": ">=8.0" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -858,30 +911,40 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-03-10T04:21:37+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/coordinator", - "version": "v3.0.22", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/coordinator.git", - "reference": "a49c2d22995b4115e8b21f1de58b992047c4d0fd" + "reference": "9f589319ba689ece5e4399b7ee218a223b089cba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/coordinator/zipball/a49c2d22995b4115e8b21f1de58b992047c4d0fd", - "reference": "a49c2d22995b4115e8b21f1de58b992047c4d0fd", + "url": "https://api.github.com/repos/hyperf/coordinator/zipball/9f589319ba689ece5e4399b7ee218a223b089cba", + "reference": "9f589319ba689ece5e4399b7ee218a223b089cba", "shasum": "" }, "require": { - "hyperf/engine": "^1.2|^2.0", - "php": ">=8.0" + "hyperf/engine": "^2.0", + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -907,32 +970,42 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-05-26T13:44:16+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/coroutine", - "version": "v3.0.16", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/coroutine.git", - "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254" + "reference": "60ed5835ec00a07da9fb34fb605fd7a99c9f8a5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/coroutine/zipball/4944ce69d5f35407e5dbcf7e9991f1db3366f254", - "reference": "4944ce69d5f35407e5dbcf7e9991f1db3366f254", + "url": "https://api.github.com/repos/hyperf/coroutine/zipball/60ed5835ec00a07da9fb34fb605fd7a99c9f8a5e", + "reference": "60ed5835ec00a07da9fb34fb605fd7a99c9f8a5e", "shasum": "" }, "require": { - "hyperf/context": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/engine": "^1.2|^2.0", - "php": ">=8.0" + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/engine": "^2.0", + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -961,29 +1034,40 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-12T05:34:25+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/di", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/di.git", - "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2" + "reference": "08efa8748caf3af777707b82c270b60313bfd878" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/di/zipball/4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", - "reference": "4fa46897ffe0e1f2d1260a65a1e25dadaacbdcd2", + "url": "https://api.github.com/repos/hyperf/di/zipball/08efa8748caf3af777707b82c270b60313bfd878", + "reference": "08efa8748caf3af777707b82c270b60313bfd878", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0", - "hyperf/code-parser": "~3.0.0", - "hyperf/pipeline": "~3.0.0", - "hyperf/support": "~3.0.0", + "hyperf/code-parser": "~3.1.0", + "hyperf/pipeline": "~3.1.0", + "hyperf/stdlib": "~3.1.0", + "hyperf/support": "~3.1.0", "nikic/php-parser": "^4.1", - "php": ">=8.0", + "php": ">=8.1", "php-di/phpdoc-reader": "^2.2", "psr/container": "^1.0|^2.0", "symfony/finder": "^5.0|^6.0", @@ -996,7 +1080,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Di\\ConfigProvider" @@ -1026,20 +1110,30 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-05T07:53:17+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/engine", - "version": "v2.10.0", + "version": "v2.10.3", "source": { "type": "git", "url": "https://github.com/hyperf/engine.git", - "reference": "9b27b29041403b8ee397ffe1e5254816e18cb5b9" + "reference": "7e7238708f29f39df643aba25485ba1c075943c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/engine/zipball/9b27b29041403b8ee397ffe1e5254816e18cb5b9", - "reference": "9b27b29041403b8ee397ffe1e5254816e18cb5b9", + "url": "https://api.github.com/repos/hyperf/engine/zipball/7e7238708f29f39df643aba25485ba1c075943c1", + "reference": "7e7238708f29f39df643aba25485ba1c075943c1", "shasum": "" }, "require": { @@ -1094,9 +1188,9 @@ ], "support": { "issues": "https://github.com/hyperf/engine/issues", - "source": "https://github.com/hyperf/engine/tree/v2.10.0" + "source": "https://github.com/hyperf/engine/tree/v2.10.3" }, - "time": "2023-07-14T02:28:58+00:00" + "time": "2023-09-30T14:57:09+00:00" }, { "name": "hyperf/engine-contract", @@ -1157,21 +1251,21 @@ }, { "name": "hyperf/guzzle", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/guzzle.git", - "reference": "7791900eed289bd6584e2e52d2ec02b47f85740c" + "reference": "df01c9b6ba645347a05113c6bcac2314145e611c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/guzzle/zipball/7791900eed289bd6584e2e52d2ec02b47f85740c", - "reference": "7791900eed289bd6584e2e52d2ec02b47f85740c", + "url": "https://api.github.com/repos/hyperf/guzzle/zipball/df01c9b6ba645347a05113c6bcac2314145e611c", + "reference": "df01c9b6ba645347a05113c6bcac2314145e611c", "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.3|^7.0", - "php": ">=8.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0", "psr/http-message": "^1.0|^2.0" }, @@ -1182,7 +1276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Guzzle\\ConfigProvider" @@ -1206,31 +1300,41 @@ ], "support": { "issues": "https://github.com/hyperf/guzzle/issues", - "source": "https://github.com/hyperf/guzzle/tree/v3.0.24" + "source": "https://github.com/hyperf/guzzle/tree/v3.1.0" }, - "time": "2023-06-04T02:14:26+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/macroable", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/macroable.git", - "reference": "822de69ba0c75aa9767a9cea487b84bf31d5240a" + "reference": "de5b07be74d666f04ecef4ce5ee6ceb97d846cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/macroable/zipball/822de69ba0c75aa9767a9cea487b84bf31d5240a", - "reference": "822de69ba0c75aa9767a9cea487b84bf31d5240a", + "url": "https://api.github.com/repos/hyperf/macroable/zipball/de5b07be74d666f04ecef4ce5ee6ceb97d846cfa", + "reference": "de5b07be74d666f04ecef4ce5ee6ceb97d846cfa", "shasum": "" }, "require": { - "php": ">=7.4" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1256,30 +1360,40 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2022-11-01T02:50:54+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/pipeline", - "version": "v3.0.16", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/pipeline.git", - "reference": "a3f48561f5cfef5f697e7005446e16560024a443" + "reference": "44352f9b20c61c372dae655894f7a8f2bb86d0de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/pipeline/zipball/a3f48561f5cfef5f697e7005446e16560024a443", - "reference": "a3f48561f5cfef5f697e7005446e16560024a443", + "url": "https://api.github.com/repos/hyperf/pipeline/zipball/44352f9b20c61c372dae655894f7a8f2bb86d0de", + "reference": "44352f9b20c61c372dae655894f7a8f2bb86d0de", "shasum": "" }, "require": { - "php": ">=8.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1305,25 +1419,35 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-11T07:57:32+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/serializer", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/serializer.git", - "reference": "c4efedaa072c5ffe196e95e0c74a9d90fd1e4811" + "reference": "8fae2fa4342cbefead70b54e42e11c228d8be94b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/serializer/zipball/c4efedaa072c5ffe196e95e0c74a9d90fd1e4811", - "reference": "c4efedaa072c5ffe196e95e0c74a9d90fd1e4811", + "url": "https://api.github.com/repos/hyperf/serializer/zipball/8fae2fa4342cbefead70b54e42e11c228d8be94b", + "reference": "8fae2fa4342cbefead70b54e42e11c228d8be94b", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "php": ">=8.0" + "hyperf/contract": "~3.1.0", + "php": ">=8.1" }, "suggest": { "hyperf/di": "Required to use ExceptionNormalizer", @@ -1333,7 +1457,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Serializer\\ConfigProvider" @@ -1362,28 +1486,97 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-24T07:07:56+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" + }, + { + "name": "hyperf/stdlib", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/hyperf/stdlib.git", + "reference": "25b73da235551d0d71d9157324709abaea36c455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hyperf/stdlib/zipball/25b73da235551d0d71d9157324709abaea36c455", + "reference": "25b73da235551d0d71d9157324709abaea36c455", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Hyperf\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A stdlib component for Hyperf.", + "homepage": "https://hyperf.io", + "keywords": [ + "hyperf", + "php", + "stdlib", + "swoole" + ], + "support": { + "docs": "https://hyperf.wiki", + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" + }, + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/stringable", - "version": "v3.0.27", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/stringable.git", - "reference": "cd56584d5d7a2688e1c1a401c3c41c0a8143a920" + "reference": "10465337a7bbf528ab28bd84330d795a5b3e06bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/stringable/zipball/cd56584d5d7a2688e1c1a401c3c41c0a8143a920", - "reference": "cd56584d5d7a2688e1c1a401c3c41c0a8143a920", + "url": "https://api.github.com/repos/hyperf/stringable/zipball/10465337a7bbf528ab28bd84330d795a5b3e06bd", + "reference": "10465337a7bbf528ab28bd84330d795a5b3e06bd", "shasum": "" }, "require": { - "hyperf/collection": "~3.0.0", - "hyperf/conditionable": "~3.0.0", - "hyperf/macroable": "~3.0.0", - "hyperf/tappable": "~3.0.0", - "php": ">=8.0" + "ext-mbstring": "*", + "hyperf/collection": "~3.1.0", + "hyperf/conditionable": "~3.1.0", + "hyperf/macroable": "~3.1.0", + "hyperf/tappable": "~3.1.0", + "php": ">=8.1" }, "suggest": { "doctrine/inflector": "Required to use plural and singular methods.(^2.0|^3.0)", @@ -1393,7 +1586,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1422,30 +1615,40 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-25T06:10:37+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/support", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/support.git", - "reference": "576838e7185bf8eb749920a3285b399cb9c3a24b" + "reference": "7752db2c4d292e4a44dadbc49e39bdfba4c8947e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/support/zipball/576838e7185bf8eb749920a3285b399cb9c3a24b", - "reference": "576838e7185bf8eb749920a3285b399cb9c3a24b", + "url": "https://api.github.com/repos/hyperf/support/zipball/7752db2c4d292e4a44dadbc49e39bdfba4c8947e", + "reference": "7752db2c4d292e4a44dadbc49e39bdfba4c8947e", "shasum": "" }, "require": { - "hyperf/collection": "~3.0.0", - "hyperf/context": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/coroutine": "~3.0.0", - "hyperf/macroable": "~3.0.0", - "hyperf/stringable": "~3.0.0", - "php": ">=8.0" + "hyperf/collection": "~3.1.0", + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/coroutine": "~3.1.0", + "hyperf/macroable": "~3.1.0", + "hyperf/stringable": "~3.1.0", + "php": ">=8.1" }, "suggest": { "nesbot/carbon": "Use Carbon as DateTime object.(^2.0)" @@ -1453,7 +1656,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1482,29 +1685,39 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-08T06:55:09+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/tappable", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/tappable.git", - "reference": "4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a" + "reference": "f640e37006dad09ca6f2b9a4cf047907aaebf002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/tappable/zipball/4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a", - "reference": "4f90b9026a5bdce5b3e6be29a2ab7a86c54f372a", + "url": "https://api.github.com/repos/hyperf/tappable/zipball/f640e37006dad09ca6f2b9a4cf047907aaebf002", + "reference": "f640e37006dad09ca6f2b9a4cf047907aaebf002", "shasum": "" }, "require": { - "php": ">=7.4" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1533,60 +1746,52 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-03-28T15:02:39+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/utils", - "version": "v3.0.18", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/utils.git", - "reference": "2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6" + "reference": "10522904195eb5af9090bbd072589fb387c91041" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/utils/zipball/2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6", - "reference": "2e59cef3dd562053fe7c9b2a41e7243b4ee23bd6", + "url": "https://api.github.com/repos/hyperf/utils/zipball/10522904195eb5af9090bbd072589fb387c91041", + "reference": "10522904195eb5af9090bbd072589fb387c91041", "shasum": "" }, "require": { "doctrine/inflector": "^2.0", - "hyperf/code-parser": "~3.0.0", - "hyperf/codec": "~3.0.0", - "hyperf/collection": "~3.0.0", - "hyperf/context": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/coordinator": "~3.0.0", - "hyperf/coroutine": "~3.0.0", - "hyperf/engine": "^1.2|^2.0", - "hyperf/macroable": "~3.0.0", - "hyperf/serializer": "~3.0.0", - "hyperf/stringable": "~3.0.0", - "hyperf/support": "~3.0.0", - "php": ">=7.2" - }, - "suggest": { - "ext-swoole": "Required to use methods related to swoole (>=4.5).", - "hyperf/di": "Required to use ExceptionNormalizer", - "nikic/php-parser": "Required to use PhpParser. (^4.0)", - "ramsey/uuid": "Required to use uuid and orderedUuid methods", - "symfony/property-access": "Required to use SymfonyNormalizer (^5.0|^6.0)", - "symfony/serializer": "Required to use SymfonyNormalizer (^5.0|^6.0)", - "symfony/uid": "Required to use ulid method", - "symfony/var-dumper": "Required to use the dd function (^5.0|^6.0)." + "hyperf/code-parser": "~3.1.0", + "hyperf/codec": "~3.1.0", + "hyperf/collection": "~3.1.0", + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/coordinator": "~3.1.0", + "hyperf/coroutine": "~3.1.0", + "hyperf/engine": "^2.0", + "hyperf/macroable": "~3.1.0", + "hyperf/serializer": "~3.1.0", + "hyperf/stringable": "~3.1.0", + "hyperf/support": "~3.1.0", + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "files": [ - "src/Functions.php" - ], - "psr-4": { - "Hyperf\\Utils\\": "src/" + "dev-master": "3.1-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -1607,7 +1812,17 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-04-26T03:02:31+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "jcchavezs/zipkin-opentracing", @@ -1668,16 +1883,16 @@ }, { "name": "jonahgeorge/jaeger-client-php", - "version": "v1.4.4", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/jonahgeorge/jaeger-client-php.git", - "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b" + "reference": "39e35bc3168da12cf596038cd1332e700b5131e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jonahgeorge/jaeger-client-php/zipball/3173d9c68ad8cea16058f25337982b00cc3d1c2b", - "reference": "3173d9c68ad8cea16058f25337982b00cc3d1c2b", + "url": "https://api.github.com/repos/jonahgeorge/jaeger-client-php/zipball/39e35bc3168da12cf596038cd1332e700b5131e9", + "reference": "39e35bc3168da12cf596038cd1332e700b5131e9", "shasum": "" }, "require": { @@ -1730,22 +1945,22 @@ ], "support": { "issues": "https://github.com/jonahgeorge/jaeger-client-php/issues", - "source": "https://github.com/jonahgeorge/jaeger-client-php/tree/v1.4.4" + "source": "https://github.com/jonahgeorge/jaeger-client-php/tree/v1.5.0" }, - "time": "2023-01-31T13:40:20+00:00" + "time": "2023-08-26T09:30:03+00:00" }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1786,9 +2001,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "opentracing/opentracing", @@ -1841,22 +2056,22 @@ }, { "name": "openzipkin/zipkin", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/openzipkin/zipkin-php.git", - "reference": "de61dd5302af882b6812895a6e2e9eda80a9b6a3" + "reference": "e2809f8b6775796d2116b3ca73576a1734296ff6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/openzipkin/zipkin-php/zipball/de61dd5302af882b6812895a6e2e9eda80a9b6a3", - "reference": "de61dd5302af882b6812895a6e2e9eda80a9b6a3", + "url": "https://api.github.com/repos/openzipkin/zipkin-php/zipball/e2809f8b6775796d2116b3ca73576a1734296ff6", + "reference": "e2809f8b6775796d2116b3ca73576a1734296ff6", "shasum": "" }, "require": { "ext-curl": "*", "php": "^7.4 || ^8.0", - "psr/http-message": "~1.0", + "psr/http-message": "~1.0 || ~2.0", "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { @@ -1911,9 +2126,9 @@ ], "support": { "issues": "https://github.com/openzipkin/zipkin-php/issues", - "source": "https://github.com/openzipkin/zipkin-php/tree/3.1.0" + "source": "https://github.com/openzipkin/zipkin-php/tree/3.2.0" }, - "time": "2023-05-24T05:24:25+00:00" + "time": "2023-09-28T20:54:04+00:00" }, { "name": "packaged/thrift", @@ -1998,16 +2213,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { @@ -2015,7 +2230,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -2057,7 +2272,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -2069,7 +2284,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "psr/cache", @@ -2175,16 +2390,16 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -2221,9 +2436,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -2282,16 +2497,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -2300,7 +2515,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2315,7 +2530,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -2329,9 +2544,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -2429,7 +2644,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -2476,7 +2691,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -2496,23 +2711,23 @@ }, { "name": "symfony/finder", - "version": "v6.3.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "url": "https://api.github.com/repos/symfony/finder/zipball/11d736e97f116ac375a81f96e662911a34cd50ce", + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce", "shasum": "" }, "require": { "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -2540,7 +2755,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v6.4.0" }, "funding": [ { @@ -2556,20 +2771,20 @@ "type": "tidelift" } ], - "time": "2023-04-02T01:25:41+00:00" + "time": "2023-10-31T17:30:12+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -2584,7 +2799,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2622,7 +2837,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -2638,20 +2853,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -2666,7 +2881,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2705,7 +2920,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -2721,20 +2936,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -2743,7 +2958,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2788,7 +3003,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -2804,35 +3019,35 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -2844,7 +3059,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -2876,7 +3091,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -2888,22 +3103,22 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2023-11-12T22:43:29+00:00" } ], "packages-dev": [ { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -2945,7 +3160,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -2961,20 +3176,20 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -3024,9 +3239,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -3042,7 +3257,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -3055,165 +3270,23 @@ "dist": { "type": "zip", "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^8.1" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3222,97 +3295,82 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "Restarts a process without Xdebug.", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "Xdebug", + "performance" ], "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", + "url": "https://packagist.com", "type": "custom" }, { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" + "url": "https://github.com/composer", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2022-12-15T16:57:16+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.22.0", + "version": "v3.40.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", - "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4344562a516b76afe8f2d64b2e52214c30d64ed8", + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^6.3.8 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -3350,7 +3408,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.2" }, "funding": [ { @@ -3358,7 +3416,7 @@ "type": "github" } ], - "time": "2023-07-16T23:08:06+00:00" + "time": "2023-12-03T09:21:33+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3413,28 +3471,28 @@ }, { "name": "hyperf/config", - "version": "v3.0.20", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/config.git", - "reference": "6503882f8547809d609b9489170037ceaef04962" + "reference": "f619a0e6118704707932de56fa8e86ffeec042f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/config/zipball/6503882f8547809d609b9489170037ceaef04962", - "reference": "6503882f8547809d609b9489170037ceaef04962", + "url": "https://api.github.com/repos/hyperf/config/zipball/f619a0e6118704707932de56fa8e86ffeec042f1", + "reference": "f619a0e6118704707932de56fa8e86ffeec042f1", "shasum": "" }, "require": { - "hyperf/collection": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", - "php": ">=8.0", + "hyperf/collection": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/support": "~3.1.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0", "symfony/finder": "^5.0|^6.0" }, "suggest": { + "hyperf/context": "Required to use config()", "hyperf/di": "Allows using @Value annotation", "hyperf/event": "Allows using @Value annotation", "hyperf/framework": "Allows using @Value annotation", @@ -3443,7 +3501,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Config\\ConfigProvider" @@ -3476,25 +3534,35 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-05-09T03:02:12+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/dispatcher", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/dispatcher.git", - "reference": "af232ac01c3dcb91ad565d6202e3e3bfb2fcf560" + "reference": "582dc948da50db771294130bba465d8163f11ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/dispatcher/zipball/af232ac01c3dcb91ad565d6202e3e3bfb2fcf560", - "reference": "af232ac01c3dcb91ad565d6202e3e3bfb2fcf560", + "url": "https://api.github.com/repos/hyperf/dispatcher/zipball/582dc948da50db771294130bba465d8163f11ab1", + "reference": "582dc948da50db771294130bba465d8163f11ab1", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "php": ">=8.0", + "hyperf/contract": "~3.1.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0", "psr/http-message": "^1.0|^2.0", "psr/http-server-middleware": "^1.0" @@ -3502,7 +3570,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Dispatcher\\ConfigProvider" @@ -3533,25 +3601,36 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-04T02:14:26+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/event", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/event.git", - "reference": "e10cd5e8b7f02bad9c542c3592b495debba9a39a" + "reference": "6eada5f74ce80786c567d5aed0361d51175217bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/event/zipball/e10cd5e8b7f02bad9c542c3592b495debba9a39a", - "reference": "e10cd5e8b7f02bad9c542c3592b495debba9a39a", + "url": "https://api.github.com/repos/hyperf/event/zipball/6eada5f74ce80786c567d5aed0361d51175217bb", + "reference": "6eada5f74ce80786c567d5aed0361d51175217bb", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "php": ">=8.0", + "hyperf/contract": "~3.1.0", + "hyperf/stdlib": "~3.1.0", + "php": ">=8.1", "psr/event-dispatcher": "^1.0" }, "suggest": { @@ -3560,7 +3639,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Event\\ConfigProvider" @@ -3589,35 +3668,54 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2022-10-13T02:40:13+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/exception-handler", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/exception-handler.git", - "reference": "bcadcd90f2d4f71e8e85f769256afdd4ea712ad3" + "reference": "941a7b426d7ecc6f34fa56d19749e8ab57a737f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/exception-handler/zipball/bcadcd90f2d4f71e8e85f769256afdd4ea712ad3", - "reference": "bcadcd90f2d4f71e8e85f769256afdd4ea712ad3", + "url": "https://api.github.com/repos/hyperf/exception-handler/zipball/941a7b426d7ecc6f34fa56d19749e8ab57a737f8", + "reference": "941a7b426d7ecc6f34fa56d19749e8ab57a737f8", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "hyperf/dispatcher": "~3.0.0", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", - "php": ">=8.0", + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/dispatcher": "~3.1.0", + "hyperf/http-message": "~3.1.0", + "hyperf/stdlib": "~3.1.0", + "hyperf/support": "~3.1.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0", - "psr/http-message": "^1.0|^2.0" + "psr/http-message": "^1.0|^2.0", + "swow/psr7-plus": "^1.0" + }, + "suggest": { + "hyperf/di": "Required to use #[ExceptionHandler]", + "hyperf/event": "Required to use listeners", + "hyperf/framework": "Required to use listeners", + "hyperf/stringable": "Required to use WhoopsExceptionHandler" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\ExceptionHandler\\ConfigProvider" @@ -3645,30 +3743,40 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-04T02:14:26+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/http-message", - "version": "v3.0.18", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/http-message.git", - "reference": "23affffb7a15842f990144b5bd49641e4de8dda4" + "reference": "1aa6b862003262d1186f5978f251970f687c16d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/http-message/zipball/23affffb7a15842f990144b5bd49641e4de8dda4", - "reference": "23affffb7a15842f990144b5bd49641e4de8dda4", + "url": "https://api.github.com/repos/hyperf/http-message/zipball/1aa6b862003262d1186f5978f251970f687c16d5", + "reference": "1aa6b862003262d1186f5978f251970f687c16d5", "shasum": "" }, "require": { - "hyperf/codec": "~3.0.0", - "hyperf/engine": "^1.9|^2.7", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", + "hyperf/codec": "~3.1.0", + "hyperf/engine": "^2.7", + "hyperf/support": "~3.1.0", "laminas/laminas-mime": "^2.7", - "php": ">=8.0", - "psr/http-message": "^1.0|^2.0" + "php": ">=8.1", + "psr/http-message": "^1.0|^2.0", + "swow/psr7-plus": "^1.0" }, "suggest": { "psr/container": "Required to replace RequestParserInterface." @@ -3676,7 +3784,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\HttpMessage\\ConfigProvider" @@ -3700,41 +3808,53 @@ ], "support": { "issues": "https://github.com/hyperf/http-message/issues", - "source": "https://github.com/hyperf/http-message/tree/v3.0.18" + "source": "https://github.com/hyperf/http-message/tree/v3.1.0" }, - "time": "2023-04-26T03:02:31+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/http-server", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/http-server.git", - "reference": "d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1" + "reference": "022da795a5b2712380b657b2c736d85f70b33395" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/http-server/zipball/d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1", - "reference": "d8a3256a6b32879b6d7bfd308cc1dca9d8d27de1", + "url": "https://api.github.com/repos/hyperf/http-server/zipball/022da795a5b2712380b657b2c736d85f70b33395", + "reference": "022da795a5b2712380b657b2c736d85f70b33395", "shasum": "" }, "require": { - "hyperf/codec": "~3.0.0", - "hyperf/collection": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/coroutine": "~3.0.0", - "hyperf/dispatcher": "~3.0.0", - "hyperf/event": "~3.0.0", - "hyperf/exception-handler": "~3.0.0", - "hyperf/http-message": "~3.0.0", - "hyperf/macroable": "~3.0.0", - "hyperf/serializer": "~3.0.0", - "hyperf/server": "~3.0.0", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", + "hyperf/codec": "~3.1.0", + "hyperf/collection": "~3.1.0", + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/coroutine": "~3.1.0", + "hyperf/dispatcher": "~3.1.0", + "hyperf/event": "~3.1.0", + "hyperf/exception-handler": "~3.1.0", + "hyperf/http-message": "~3.1.0", + "hyperf/macroable": "~3.1.0", + "hyperf/serializer": "~3.1.0", + "hyperf/server": "~3.1.0", + "hyperf/stdlib": "~3.1.0", + "hyperf/support": "~3.1.0", "nikic/fast-route": "^1.3", - "php": ">=8.0", - "psr/container": "^1.0|^2.0" + "php": ">=8.1", + "psr/container": "^1.0|^2.0", + "swow/psr7-plus": "^1.0" }, "suggest": { "hyperf/di": "Required to use annotations." @@ -3742,7 +3862,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\HttpServer\\ConfigProvider" @@ -3772,29 +3892,39 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-06T12:33:49+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/server", - "version": "v3.0.24", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/server.git", - "reference": "0a2bfa37355631a0f0484bfd08d815ad858d279c" + "reference": "2c667e0977945d26a56bec53b1c946286cffc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/server/zipball/0a2bfa37355631a0f0484bfd08d815ad858d279c", - "reference": "0a2bfa37355631a0f0484bfd08d815ad858d279c", + "url": "https://api.github.com/repos/hyperf/server/zipball/2c667e0977945d26a56bec53b1c946286cffc3a2", + "reference": "2c667e0977945d26a56bec53b1c946286cffc3a2", "shasum": "" }, "require": { - "hyperf/contract": "~3.0.0", - "hyperf/engine": "^1.10|^2.8", - "hyperf/support": "~3.0.0", - "hyperf/tappable": "~3.0.0", - "hyperf/utils": "~3.0.0", - "php": ">=8.0", + "hyperf/contract": "~3.1.0", + "hyperf/coordinator": "~3.1.0", + "hyperf/engine": "^2.8", + "hyperf/support": "~3.1.0", + "hyperf/tappable": "~3.1.0", + "php": ">=8.1", "psr/container": "^1.0|^2.0", "psr/event-dispatcher": "^1.0", "psr/log": "^1.0|^2.0|^3.0", @@ -3807,7 +3937,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Server\\ConfigProvider" @@ -3836,43 +3966,56 @@ "pull-request": "https://github.com/hyperf/hyperf/pulls", "source": "https://github.com/hyperf/hyperf" }, - "time": "2023-06-07T05:27:29+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-24T03:10:53+00:00" }, { "name": "hyperf/testing", - "version": "v3.0.30", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/hyperf/testing.git", - "reference": "fa9d8c1e79bc4958be5a2642387e1915a7fc9f13" + "reference": "a0b4f5472953ccadb4b54a39dfd6695dff5d3dcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hyperf/testing/zipball/fa9d8c1e79bc4958be5a2642387e1915a7fc9f13", - "reference": "fa9d8c1e79bc4958be5a2642387e1915a7fc9f13", + "url": "https://api.github.com/repos/hyperf/testing/zipball/a0b4f5472953ccadb4b54a39dfd6695dff5d3dcd", + "reference": "a0b4f5472953ccadb4b54a39dfd6695dff5d3dcd", "shasum": "" }, "require": { - "hyperf/codec": "~3.0.0", - "hyperf/collection": "~3.0.0", - "hyperf/contract": "~3.0.0", - "hyperf/coroutine": "~3.0.0", - "hyperf/http-message": "~3.0.0", - "hyperf/http-server": "~3.0.0", - "hyperf/support": "~3.0.0", - "hyperf/utils": "~3.0.0", - "php": ">=8.0", - "phpunit/phpunit": "^9.5", + "hyperf/codec": "~3.1.0", + "hyperf/collection": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/coroutine": "~3.1.0", + "hyperf/http-message": "~3.1.0", + "hyperf/http-server": "~3.1.0", + "hyperf/support": "~3.1.0", + "hyperf/utils": "~3.1.0", + "php": ">=8.1", + "phpunit/phpunit": "^10.0", "psr/container": "^1.0|^2.0", "symfony/http-foundation": "^5.4|^6.0" }, + "suggest": { + "fakerphp/faker": "Required to use Faker feature.(^1.23)" + }, "bin": [ "co-phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3886,32 +4029,43 @@ ], "description": "Testing for hyperf", "keywords": [ + "dev", "php", "swoole", "testing" ], "support": { - "source": "https://github.com/hyperf/testing/tree/v3.0.30" + "source": "https://github.com/hyperf/testing/tree/v3.1.0" }, - "time": "2023-07-21T03:15:25+00:00" + "funding": [ + { + "url": "https://hyperf.wiki/#/zh-cn/donate", + "type": "custom" + }, + { + "url": "https://opencollective.com/hyperf", + "type": "open_collective" + } + ], + "time": "2023-11-29T03:44:48+00:00" }, { "name": "laminas/laminas-mime", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mime.git", - "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f" + "reference": "08cc544778829b7d68d27a097885bd6e7130135e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/60ec04b755821c79c1987ce291b44e69f2c0831f", - "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f", + "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/08cc544778829b7d68d27a097885bd6e7130135e", + "reference": "08cc544778829b7d68d27a097885bd6e7130135e", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^2.7 || ^3.0", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-mime": "*" @@ -3954,34 +4108,34 @@ "type": "community_bridge" } ], - "time": "2022-10-18T08:38:15+00:00" + "time": "2023-11-02T16:47:19+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.17.0", + "version": "3.18.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "dd35c868075bad80b6718959740913e178eb4274" + "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274", - "reference": "dd35c868075bad80b6718959740913e178eb4274", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.9", - "phpunit/phpunit": "^10.0.16", + "phpbench/phpbench": "^1.2.14", + "phpunit/phpunit": "^10.3.3", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.8" + "vimeo/psalm": "^5.15.0" }, "type": "library", "autoload": { @@ -4013,35 +4167,35 @@ "type": "community_bridge" } ], - "time": "2023-03-20T13:51:37+00:00" + "time": "2023-09-19T10:15:21+00:00" }, { "name": "mockery/mockery", - "version": "1.6.4", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "d1413755e26fe56a63455f7753221c86cbb88f66" + "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1413755e26fe56a63455f7753221c86cbb88f66", - "reference": "d1413755e26fe56a63455f7753221c86cbb88f66", + "url": "https://api.github.com/repos/mockery/mockery/zipball/b8e0bb7d8c604046539c1115994632c74dcb361e", + "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": ">=7.4,<8.3" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3", + "phpunit/phpunit": "^8.5 || ^9.6.10", "psalm/plugin-phpunit": "^0.18.4", "symplify/easy-coding-standard": "^11.5.0", - "vimeo/psalm": "^5.13.1" + "vimeo/psalm": "^4.30" }, "type": "library", "autoload": { @@ -4098,7 +4252,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2023-07-19T15:51:02+00:00" + "time": "2023-08-09T00:03:52+00:00" }, { "name": "myclabs/deep-copy", @@ -4366,16 +4520,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.26", + "version": "1.10.47", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f" + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f", - "reference": "5d660cbb7e1b89253a47147ae44044f49832351f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", + "reference": "84dbb33b520ea28b6cf5676a3941f4bae1c1ff39", "shasum": "" }, "require": { @@ -4424,7 +4578,7 @@ "type": "tidelift" } ], - "time": "2023-07-19T12:44:37+00:00" + "time": "2023-12-01T15:19:17+00:00" }, { "name": "phpstan/phpstan-mockery", @@ -4478,16 +4632,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.27", + "version": "10.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735", + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735", "shasum": "" }, "require": { @@ -4495,18 +4649,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -4515,7 +4669,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -4544,7 +4698,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9" }, "funding": [ { @@ -4552,32 +4706,32 @@ "type": "github" } ], - "time": "2023-07-26T13:44:30+00:00" + "time": "2023-11-23T12:23:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4604,7 +4758,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -4612,28 +4767,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -4641,7 +4796,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4667,7 +4822,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -4675,32 +4830,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -4726,7 +4881,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -4734,32 +4890,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4785,7 +4941,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -4793,24 +4949,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "10.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "5aedff46afba98dddecaa12349ec044d9103d4fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5aedff46afba98dddecaa12349ec044d9103d4fe", + "reference": "5aedff46afba98dddecaa12349ec044d9103d4fe", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -4820,27 +4975,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -4848,7 +5002,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -4880,7 +5034,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.2" }, "funding": [ { @@ -4896,7 +5050,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-12-05T14:54:33+00:00" }, { "name": "psr/event-dispatcher", @@ -5063,16 +5217,16 @@ }, { "name": "rector/rector", - "version": "0.17.7", + "version": "0.17.13", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "0e76101aa329911b7fec43106aac5843a978b209" + "reference": "e2003ba7c5bda06d7bb419cf4be8dae5f8672132" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/0e76101aa329911b7fec43106aac5843a978b209", - "reference": "0e76101aa329911b7fec43106aac5843a978b209", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/e2003ba7c5bda06d7bb419cf4be8dae5f8672132", + "reference": "e2003ba7c5bda06d7bb419cf4be8dae5f8672132", "shasum": "" }, "require": { @@ -5089,11 +5243,6 @@ "bin/rector" ], "type": "library", - "extra": { - "branch-alias": { - "dev-main": "0.15-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -5112,7 +5261,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.17.7" + "source": "https://github.com/rectorphp/rector/tree/0.17.13" }, "funding": [ { @@ -5120,32 +5269,32 @@ "type": "github" } ], - "time": "2023-07-23T20:44:23+00:00" + "time": "2023-08-14T16:33:29+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5168,7 +5317,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -5176,32 +5325,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5224,7 +5373,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -5232,32 +5381,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5279,7 +5428,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -5287,34 +5436,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5353,7 +5504,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -5361,33 +5513,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -5410,7 +5562,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -5418,33 +5571,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5476,7 +5629,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -5484,27 +5638,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -5512,7 +5666,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5531,7 +5685,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -5539,7 +5693,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -5547,34 +5702,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -5616,7 +5771,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -5624,38 +5780,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5680,7 +5833,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -5688,33 +5842,33 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -5737,7 +5891,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -5745,34 +5900,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5794,7 +5949,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -5802,32 +5957,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -5849,7 +6004,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -5857,32 +6012,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5912,7 +6067,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -5920,32 +6075,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/type", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -5960,14 +6115,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -5975,32 +6131,29 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { - "name": "sebastian/type", - "version": "3.2.1", + "name": "sebastian/version", + "version": "4.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -6019,11 +6172,11 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -6031,73 +6184,70 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "swow/psr7-plus", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/swow/psr7-plus.git", + "reference": "7acc4924be907d2ff64edee5a2bd116620e56364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/swow/psr7-plus/zipball/7acc4924be907d2ff64edee5a2bd116620e56364", + "reference": "7acc4924be907d2ff64edee5a2bd116620e56364", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1|^2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Swow\\Psr7\\Message\\": "src/Message/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "twose", + "email": "twosee@php.net" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Modern strong-typed interfaces for Psr7, not only HTTP but also WebSocket", + "keywords": [ + "http", + "psr17", + "psr7", + "swow", + "websocket" + ], "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/swow/swow", + "source": "https://github.com/swow/psr7-plus/tree/v1.1.2" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-06-15T09:18:11+00:00" }, { "name": "symfony/console", - "version": "v6.3.0", + "version": "v6.4.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", "shasum": "" }, "require": { @@ -6105,7 +6255,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { "symfony/dependency-injection": "<5.4", @@ -6119,12 +6269,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6158,7 +6312,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.0" + "source": "https://github.com/symfony/console/tree/v6.4.1" }, "funding": [ { @@ -6174,28 +6328,28 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-11-30T10:54:28+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c459b40ffe67c49af6fd392aac374c9edf8a027e", + "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -6204,13 +6358,13 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6238,7 +6392,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.0" }, "funding": [ { @@ -6254,11 +6408,11 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-27T16:29:09+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -6314,7 +6468,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" }, "funding": [ { @@ -6334,20 +6488,20 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "7da8ea2362a283771478c5f7729cfcb43a76b8b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7da8ea2362a283771478c5f7729cfcb43a76b8b7", + "reference": "7da8ea2362a283771478c5f7729cfcb43a76b8b7", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -6377,7 +6531,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v7.0.0" }, "funding": [ { @@ -6393,20 +6547,20 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2023-07-27T06:33:22+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.1", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66" + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", + "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", "shasum": "" }, "require": { @@ -6416,17 +6570,17 @@ "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.2" + "symfony/cache": "<6.3" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/dbal": "^2.13.1|^3|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^5.4|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" + "symfony/cache": "^6.3|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/rate-limiter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6454,7 +6608,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.1" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" }, "funding": [ { @@ -6470,24 +6624,24 @@ "type": "tidelift" } ], - "time": "2023-06-24T11:51:27+00:00" + "time": "2023-11-20T16:41:16+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + "reference": "700ff4096e346f54cb628ea650767c8130f1001f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f", + "reference": "700ff4096e346f54cb628ea650767c8130f1001f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -6521,7 +6675,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.0.0" }, "funding": [ { @@ -6537,20 +6691,20 @@ "type": "tidelift" } ], - "time": "2023-05-12T14:21:09+00:00" + "time": "2023-08-08T10:20:21+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -6562,7 +6716,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6602,7 +6756,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -6618,20 +6772,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -6643,7 +6797,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6686,7 +6840,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -6702,20 +6856,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -6724,7 +6878,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6765,7 +6919,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -6781,20 +6935,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", - "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", "shasum": "" }, "require": { @@ -6804,7 +6958,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6817,7 +6971,10 @@ ], "psr-4": { "Symfony\\Polyfill\\Php83\\": "" - } + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6842,7 +6999,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" }, "funding": [ { @@ -6858,24 +7015,24 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-08-16T06:22:46+00:00" }, { "name": "symfony/process", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "url": "https://api.github.com/repos/symfony/process/zipball/13bdb1670c7f510494e04fcb2bfa29af63db9c0d", + "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -6903,7 +7060,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.0" + "source": "https://github.com/symfony/process/tree/v7.0.0" }, "funding": [ { @@ -6919,20 +7076,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-11-20T16:43:42+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { @@ -6985,7 +7142,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -7001,24 +7158,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -7047,7 +7204,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.0.0" }, "funding": [ { @@ -7063,24 +7220,24 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2023-07-05T13:06:06+00:00" }, { "name": "symfony/string", - "version": "v6.3.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "url": "https://api.github.com/repos/symfony/string/zipball/92bd2bfbba476d4a1838e5e12168bef2fd1e6620", + "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -7090,11 +7247,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7133,7 +7290,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.0" + "source": "https://github.com/symfony/string/tree/v7.0.0" }, "funding": [ { @@ -7149,20 +7306,20 @@ "type": "tidelift" } ], - "time": "2023-03-21T21:06:29+00:00" + "time": "2023-11-29T08:40:23+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -7191,7 +7348,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -7199,7 +7356,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], @@ -7211,5 +7368,5 @@ "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index 0624127..c31dddf 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -15,16 +15,16 @@ */ namespace Hyperf\Tracer\Middleware; +use Hyperf\Context\ApplicationContext; use Hyperf\Contract\ConfigInterface; use Hyperf\Contract\StdoutLoggerInterface; +use Hyperf\Coroutine\Coroutine; use Hyperf\HttpMessage\Exception\HttpException; use Hyperf\Tracer\ExceptionAppender; use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\Support\Uri; use Hyperf\Tracer\SwitchManager; -use Hyperf\Context\ApplicationContext; -use Hyperf\Coroutine\Coroutine; use OpenTracing\Span; use OpenTracing\Tracer; use Psr\Http\Message\ResponseInterface; @@ -34,6 +34,8 @@ use Psr\Http\Server\RequestHandlerInterface; use Throwable; +use function Hyperf\Coroutine\defer; + use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER; class TraceMiddleware implements MiddlewareInterface diff --git a/src/SpanStarter.php b/src/SpanStarter.php index bf8d97f..0ad63f2 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -11,12 +11,12 @@ */ namespace Hyperf\Tracer; +use Hyperf\Context\ApplicationContext; use Hyperf\Context\Context; use Hyperf\Contract\StdoutLoggerInterface; +use Hyperf\Coroutine\Coroutine; use Hyperf\Engine\Exception\CoroutineDestroyedException; use Hyperf\Tracer\Support\Uuid; -use Hyperf\Context\ApplicationContext; -use Hyperf\Coroutine\Coroutine; use OpenTracing\Span; use Psr\Http\Message\ServerRequestInterface; diff --git a/src/SwitchManager.php b/src/SwitchManager.php index 4644b47..26738d7 100644 --- a/src/SwitchManager.php +++ b/src/SwitchManager.php @@ -11,9 +11,6 @@ */ namespace Hyperf\Tracer; -use Hyperf\Context\Context; -use OpenTracing\Span; - class SwitchManager { private array $config diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index 2611390..e53cc3f 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -13,11 +13,11 @@ use Exception; use Hyperf\Config\Config; +use Hyperf\Context\ApplicationContext; use Hyperf\Contract\ConfigInterface; use Hyperf\Di\Container; use Hyperf\Tracer\Adapter\JaegerTracerFactory; use Hyperf\Tracer\TracerFactory; -use Hyperf\Context\ApplicationContext; use Jaeger\Tracer; use Mockery; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; From 3d578e949eff90d2b6400d10c2c2665e91233eb8 Mon Sep 17 00:00:00 2001 From: Eduardo Dias Date: Mon, 22 Jan 2024 12:21:46 -0300 Subject: [PATCH 11/27] Change tracer span name (#7) fix: changing trace span name fix: changing trace span name --- src/Middleware/TraceMiddleware.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index c31dddf..e53bba9 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -120,8 +120,9 @@ protected function appendCustomResponseSpan(Span $span, ResponseInterface $respo protected function buildSpan(ServerRequestInterface $request): Span { $path = $this->getPath($request->getUri()); + $spanName = sprintf('%s %s', $request->getMethod(), $path); - $span = $this->startSpan($path, [], SPAN_KIND_RPC_SERVER); + $span = $this->startSpan($spanName, [], SPAN_KIND_RPC_SERVER); $span->setTag('kind', 'server'); From 29e0957dffc1ab54c3e4657a7080fa4cd05e3ef4 Mon Sep 17 00:00:00 2001 From: Eduardo Dias Date: Thu, 21 Mar 2024 17:56:26 -0300 Subject: [PATCH 12/27] fix: Sanitize URI regular expressions (OID & License Plate) (#9) * fix: regex to catch OID longer than 24 caracteres * fix: license plate regex - License plate is considered valid if it has 7 or 8 numbers --- src/Support/Uri.php | 4 ++-- tests/UriTest.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Support/Uri.php b/src/Support/Uri.php index 8269458..f29ce45 100644 --- a/src/Support/Uri.php +++ b/src/Support/Uri.php @@ -18,8 +18,8 @@ public static function sanitize(string $uri): string return preg_replace( [ '/\/(?<=\/)([A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12})(?=\/)?/i', - '/\/(?<=\/)([A-Z]{3}-?\d[0-9A-Z]\d{2})(?=\/)?/i', - '/\/(?<=\/)[0-9A-F]{24}(?=\/)?/i', + '/\/(?<=\/)((?=.{7,8}$)|(?=.{7,8}\/))([A-Z]{3}-?\d[0-9A-Z]\d{2})/i', + '/\/(?<=\/)[0-9A-F]{24,}(?=\/)?/i', '/\/(?<=\/)\d+(?=\/)?/', ], [ diff --git a/tests/UriTest.php b/tests/UriTest.php index d4da1ce..d984e3b 100644 --- a/tests/UriTest.php +++ b/tests/UriTest.php @@ -49,6 +49,7 @@ public function testSanitizeLicensePlatesStrings(): void self::assertSame('/v7/test///', Uri::sanitize('/v7/test/PET9349/PET9349/PET9349')); self::assertSame('/v8/test////', Uri::sanitize('/v8/test/PET9D49/PET9D49/PET9D49/')); self::assertSame('/v8/test////', Uri::sanitize('/v8/test/PET9349/PET9349/PET9349/')); + self::assertSame('/v8/test/PET9349FOOBAR/foo/', Uri::sanitize('/v8/test/PET9349FOOBAR/foo/PET9349')); } public function testClearUriUuids(): void @@ -68,6 +69,7 @@ public function testClearUriUuids(): void public function testClearUriOids(): void { $oid = '650229807612bba4984d1fc7'; + $oidLonger = 'ddb21302b3c66b5111bb99a907f783e2a29947f0'; self::assertSame('/v1/test', Uri::sanitize('/v1/test')); self::assertSame('/v2/test/', Uri::sanitize("/v2/test/{$oid}")); @@ -77,5 +79,7 @@ public function testClearUriOids(): void self::assertSame('/v6/test///', Uri::sanitize("/v6/test/{$oid}/{$oid}/")); self::assertSame('/v7/test///', Uri::sanitize("/v7/test/{$oid}/{$oid}/{$oid}")); self::assertSame('/v8/test////', Uri::sanitize("/v8/test/{$oid}/{$oid}/{$oid}/")); + self::assertSame('/v2/token//foo/', Uri::sanitize("/v2/token/{$oidLonger}/foo/{$oid}")); + self::assertSame('/v3/token//foo//bar', Uri::sanitize("/v3/token/$oidLonger/foo/{$oid}/bar")); } } From c1cca003270a3f6416344196b5aa1bb83e6f33b8 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Tue, 21 May 2024 15:25:31 -0300 Subject: [PATCH 13/27] fix resource type warning (#12) --- class_map/ThriftUdpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class_map/ThriftUdpTransport.php b/class_map/ThriftUdpTransport.php index da42fa1..e97a2b1 100644 --- a/class_map/ThriftUdpTransport.php +++ b/class_map/ThriftUdpTransport.php @@ -26,7 +26,7 @@ class ThriftUdpTransport extends TTransport { - private null|resource|Socket $socket = null; + private null|Socket $socket = null; private ?Channel $chan = null; From 71c3ddd21a4b125560ba45a87af38804b7085736 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:04:47 -0300 Subject: [PATCH 14/27] ensuring that options tags will not send array that will break the span (#13) --- src/Adapter/JaegerTracerFactory.php | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Adapter/JaegerTracerFactory.php b/src/Adapter/JaegerTracerFactory.php index 4ab3178..dfe7890 100644 --- a/src/Adapter/JaegerTracerFactory.php +++ b/src/Adapter/JaegerTracerFactory.php @@ -46,15 +46,21 @@ public function make(string $name): Tracer private function parseConfig(): array { + $options = $this->getConfig('options', [ + 'sampler' => [ + 'type' => SAMPLER_TYPE_CONST, + 'param' => true, + ], + 'logging' => false + ]); + + if (isset($options['tags'])) { + $options['tags'] = $this->sanitizeTags($options['tags']); + } + return [ $this->getConfig('name', 'skeleton'), - $this->getConfig('options', [ - 'sampler' => [ - 'type' => SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => false, - ]), + $options ]; } @@ -67,4 +73,13 @@ private function getPrefix(): string { return rtrim($this->prefix . $this->name, '.') . '.'; } + + private function sanitizeTags(array $tags = []): array + { + $tagsSanitized = []; + foreach ($tags as $key => $value) { + $tagsSanitized[$key] = (is_array($value)) ? $value[0] : $value; + } + return $tagsSanitized; + } } From 8e345365aeed0a279919561db4a7a2ce0f8c872b Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:45:07 -0300 Subject: [PATCH 15/27] Revert "ensuring that options tags will not send array that will break the span" (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "ensuring that options tags will not send array that will break the sp…" This reverts commit 71c3ddd21a4b125560ba45a87af38804b7085736. --- src/Adapter/JaegerTracerFactory.php | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/Adapter/JaegerTracerFactory.php b/src/Adapter/JaegerTracerFactory.php index dfe7890..4ab3178 100644 --- a/src/Adapter/JaegerTracerFactory.php +++ b/src/Adapter/JaegerTracerFactory.php @@ -46,21 +46,15 @@ public function make(string $name): Tracer private function parseConfig(): array { - $options = $this->getConfig('options', [ - 'sampler' => [ - 'type' => SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => false - ]); - - if (isset($options['tags'])) { - $options['tags'] = $this->sanitizeTags($options['tags']); - } - return [ $this->getConfig('name', 'skeleton'), - $options + $this->getConfig('options', [ + 'sampler' => [ + 'type' => SAMPLER_TYPE_CONST, + 'param' => true, + ], + 'logging' => false, + ]), ]; } @@ -73,13 +67,4 @@ private function getPrefix(): string { return rtrim($this->prefix . $this->name, '.') . '.'; } - - private function sanitizeTags(array $tags = []): array - { - $tagsSanitized = []; - foreach ($tags as $key => $value) { - $tagsSanitized[$key] = (is_array($value)) ? $value[0] : $value; - } - return $tagsSanitized; - } } From 0e1297c0eead35c15983ada3906766d286ec9d29 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:38:38 -0300 Subject: [PATCH 16/27] Otel Codec (#17) * Otel Codec * adding annotation * removing strict_types to maintain compatibility * renaming parentId to spanId --- class_map/TextCodec.php | 202 ++++++++++++++++++++++++++++++++++ src/ConfigProvider.php | 2 + src/Support/TextCodecOtel.php | 152 +++++++++++++++++++++++++ 3 files changed, 356 insertions(+) create mode 100644 class_map/TextCodec.php create mode 100644 src/Support/TextCodecOtel.php diff --git a/class_map/TextCodec.php b/class_map/TextCodec.php new file mode 100644 index 0000000..84fe86c --- /dev/null +++ b/class_map/TextCodec.php @@ -0,0 +1,202 @@ +urlEncoding = $urlEncoding; + $this->traceIdHeader = str_replace('_', '-', strtolower($traceIdHeader)); + $this->baggagePrefix = str_replace('_', '-', strtolower($baggageHeaderPrefix)); + $this->debugIdHeader = str_replace('_', '-', strtolower($debugIdHeader)); + $this->prefixLength = strlen($baggageHeaderPrefix); + $this->openTelemetryCodec = new TextCodecOtel(); + } + + /** + * {@inheritdoc} + * + * @param SpanContext $spanContext + * @param mixed $carrier + * + * @return void + * @see \Jaeger\Tracer::inject + * + */ + public function inject(SpanContext $spanContext, &$carrier) + { + $this->openTelemetryCodec->inject($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} + * + * @param mixed $carrier + * @return SpanContext|null + * + * @throws Exception + * @see \Jaeger\Tracer::extract + * + */ + public function extract($carrier) + { + $spanContext = $this->openTelemetryCodec->extract($carrier); + if ($spanContext !== null) { + return $spanContext; + } + + $traceId = null; + $spanId = null; + $parentId = null; + $flags = null; + $baggage = null; + $debugId = null; + + foreach ((array)$carrier as $key => $value) { + $ucKey = strtolower($key); + + if ($ucKey === $this->traceIdHeader) { + if ($this->urlEncoding) { + $value = urldecode($value); + } + [$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; + if (is_int($traceId)) { + $traceId = sprintf('%016x', $traceId); + } + return sprintf('%s:%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 [ + $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/src/ConfigProvider.php b/src/ConfigProvider.php index a32edd8..aa06d5d 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -22,6 +22,7 @@ use Jaeger\ThriftUdpTransport; use OpenTracing\Tracer; use Zipkin\Propagation\Map; +use Jaeger\Codec\TextCodec; class ConfigProvider { @@ -46,6 +47,7 @@ public function __invoke(): array Map::class => __DIR__ . '/../class_map/Map.php', ThriftUdpTransport::class => __DIR__ . '/../class_map/ThriftUdpTransport.php', SpanContext::class => __DIR__ . '/../class_map/SpanContext.php', + TextCodec::class => __DIR__ . '/../class_map/TextCodec.php', ], ], ], diff --git a/src/Support/TextCodecOtel.php b/src/Support/TextCodecOtel.php new file mode 100644 index 0000000..fd4b2af --- /dev/null +++ b/src/Support/TextCodecOtel.php @@ -0,0 +1,152 @@ +traceIdHeader] = $this->spanContextToString( + $spanContext->getTraceId(), + $spanContext->getSpanId(), + $spanContext->getFlags() + ); + + $baggage = $spanContext->getBaggage(); + if (empty($baggage)) { + return; + } + + $baggageHeader = []; + + foreach ($baggage as $key => $value) { + $baggageHeader[] = $key . '=' . $value; + } + $carrier[$this->traceStateHeader] = implode(',', $baggageHeader); + } + + /** + * {@inheritdoc} + * + * @param mixed $carrier + * @return SpanContext|null + * + * @throws Exception + * @see \Jaeger\Tracer::extract + * + */ + public function extract($carrier) + { + $baggage = []; + $carrier = (array)$carrier; + + if (!isset($carrier[$this->traceIdHeader])) { + return null; + } + + [$version, $traceId, $spanId, $flags] = $this->spanContextFromString($carrier[$this->traceIdHeader]); + if (!empty($carrier[$this->traceStateHeader])) { + $traceStateHeaders = $carrier[$this->traceStateHeader]; + $state = explode(',', $traceStateHeaders); + foreach ($state as $stateItem) { + $stateItem = trim($stateItem); + $stateItem = explode('=', $stateItem); + if (count($stateItem) !== 2) { + continue; + } + $stateKey = $stateItem[0]; + $stateValue = $stateItem[1]; + $baggage[$stateKey] = $stateValue; + } + } + + if ($traceId === null && $baggage !== []) { + throw new Exception('baggage without trace ctx'); + } + + if ($traceId === null) { + return null; + } + + return new SpanContext($traceId, $spanId, null, $flags, $baggage); + } + + /** + * Store a span context to a string. + * + * @param string $traceId + * @param string $spanId + * @param string $flags + * @return string + */ + private function spanContextToString($traceId, $spanId, $flags) + { + if (strlen($traceId) < 32) { + $start = mb_substr($traceId, 0, 3); + $end = mb_substr($traceId, -3); + $middle = mb_substr($traceId, 3, mb_strlen($traceId) - 6); + $traceId = $start . $middle . $middle . $end; + $spanId = strtolower(dechex((int)$spanId)); + } + $flags = str_pad($flags, 2, "0", STR_PAD_LEFT); + return sprintf('%s-%s-%s-%s', self::VERSION, $traceId, $spanId, $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.'); + } + /** + * TraceId em Otel ja é um hexadecimal de 32 caracteres e precisa permanecer assim. + * Span id sofre conversões no caminho porém é reportado em hexa, por isso é necessária a conversão + */ + + return [ + $parts[0], + $parts[1],// + CodecUtility::hexToInt64($parts[2]),// + $parts[3], + ]; + } +} From 328601919c7b8af75aa40b61ddf24665b8eb72f5 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:50:26 -0300 Subject: [PATCH 17/27] creating a decoder to treat the traceId and spandId as jaeger client does (#18) --- src/Support/JaegerDecoder.php | 35 +++++++++++++++++++++++++++++++++++ src/Support/TextCodecOtel.php | 14 ++++++-------- tests/JaegerDecoderTest.php | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 src/Support/JaegerDecoder.php create mode 100644 tests/JaegerDecoderTest.php diff --git a/src/Support/JaegerDecoder.php b/src/Support/JaegerDecoder.php new file mode 100644 index 0000000..08cf9d5 --- /dev/null +++ b/src/Support/JaegerDecoder.php @@ -0,0 +1,35 @@ + Date: Tue, 24 Sep 2024 11:54:21 -0300 Subject: [PATCH 18/27] fix Guzzle psr7 invalid header error (#20) --- class_map/TextCodec.php | 7 +++++- src/Support/GuzzleHeaderValidate.php | 37 ++++++++++++++++++++++++++++ src/Support/TextCodecOtel.php | 6 ++++- tests/GuzzleHeaderValidateTest.php | 35 ++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 src/Support/GuzzleHeaderValidate.php create mode 100644 tests/GuzzleHeaderValidateTest.php diff --git a/class_map/TextCodec.php b/class_map/TextCodec.php index 84fe86c..9c35b46 100644 --- a/class_map/TextCodec.php +++ b/class_map/TextCodec.php @@ -2,6 +2,7 @@ namespace Jaeger\Codec; +use Hyperf\Tracer\Support\GuzzleHeaderValidate; use Hyperf\Tracer\Support\TextCodecOtel; use Exception; use Jaeger\SpanContext; @@ -76,8 +77,12 @@ public function inject(SpanContext $spanContext, &$carrier) if ($this->urlEncoding) { $encodedValue = urlencode($value); } + $headerName = $this->baggagePrefix . $key; - $carrier[$this->baggagePrefix . $key] = $encodedValue; + if (!GuzzleHeaderValidate::isValidHeader($headerName, $encodedValue)) { + continue; + } + $carrier[$headerName] = $encodedValue; } } diff --git a/src/Support/GuzzleHeaderValidate.php b/src/Support/GuzzleHeaderValidate.php new file mode 100644 index 0000000..a392d73 --- /dev/null +++ b/src/Support/GuzzleHeaderValidate.php @@ -0,0 +1,37 @@ + $value) { - $baggageHeader[] = $key . '=' . $value; + $value = $key . '=' . $value; + if (!GuzzleHeaderValidate::isValidHeaderValue($value)) { + continue; + } + $baggageHeader[] = $value; } $carrier[$this->traceStateHeader] = implode(',', $baggageHeader); } diff --git a/tests/GuzzleHeaderValidateTest.php b/tests/GuzzleHeaderValidateTest.php new file mode 100644 index 0000000..5cc3cef --- /dev/null +++ b/tests/GuzzleHeaderValidateTest.php @@ -0,0 +1,35 @@ + Date: Mon, 30 Dec 2024 08:41:40 -0300 Subject: [PATCH 19/27] Fix Thrift UDP Transport (#21) --- class_map/ThriftUdpTransport.php | 41 +++++++++++++++++------------ src/Adapter/JaegerTracerFactory.php | 5 ++-- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/class_map/ThriftUdpTransport.php b/class_map/ThriftUdpTransport.php index e97a2b1..fed3f7f 100644 --- a/class_map/ThriftUdpTransport.php +++ b/class_map/ThriftUdpTransport.php @@ -9,21 +9,21 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Jaeger; -use Hyperf\Context\ApplicationContext; -use Hyperf\Contract\StdoutLoggerInterface; use Hyperf\Coordinator\Constants; use Hyperf\Coordinator\CoordinatorManager; use Hyperf\Coroutine\Coroutine; use Hyperf\Engine\Channel; use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; use Socket; use Thrift\Exception\TTransportException; use Thrift\Transport\TTransport; use Throwable; +use function Hyperf\Support\env; + class ThriftUdpTransport extends TTransport { private null|Socket $socket = null; @@ -33,10 +33,8 @@ class ThriftUdpTransport extends TTransport public function __construct( private string $host, private int $port, - private ?LoggerInterface $logger = null - ) { - $this->logger = $logger ?? new NullLogger(); - } + private LoggerInterface $logger + ) {} /** * Whether this transport is open. @@ -120,9 +118,17 @@ public function write($buf) $this->loop(); } - $this->chan->push(function () use ($buf) { + $pushed = $this->chan->push(function () use ($buf) { $this->doWrite($buf); - }); + }, (float) env('TRACE_THRIFT_UDP_TIMEOUT', 0.1)); + + if (! $pushed) { + $this->logger->error('ThriftUdpTransport error:' . match (true) { + $this->chan->isTimeout() => 'Channel Timeout', + $this->chan->isClosing() => 'Channel Close', + default => 'Channel Error' + }); + } } private function doOpen(): void @@ -151,7 +157,14 @@ private function loop(): void $this->chan = new Channel(1); Coroutine::create(function () { while (true) { - $this->doOpen(); + try { + $this->doOpen(); + } catch (Throwable $e) { + $this->chan->close(); + $this->chan = null; + throw $e; + } + while (true) { try { $closure = $this->chan->pop(); @@ -160,13 +173,7 @@ private function loop(): void } $closure->call($this); } catch (Throwable $e) { - if (ApplicationContext::hasContainer()) { - if (ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { - ApplicationContext::getContainer() - ->get(StdoutLoggerInterface::class) - ->error('ThriftUdpTransport error:' . $e->getMessage()); - } - } + $this->logger->error('ThriftUdpTransport error:' . $e->getMessage()); @socket_close($this->socket); $this->socket = null; break; diff --git a/src/Adapter/JaegerTracerFactory.php b/src/Adapter/JaegerTracerFactory.php index 4ab3178..e3a063a 100644 --- a/src/Adapter/JaegerTracerFactory.php +++ b/src/Adapter/JaegerTracerFactory.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Adapter; use Hyperf\Contract\ConfigInterface; @@ -26,9 +27,7 @@ class JaegerTracerFactory implements NamedFactoryInterface private string $name = ''; - public function __construct(private ConfigInterface $config, private ?LoggerInterface $logger = null, private ?CacheItemPoolInterface $cache = null) - { - } + public function __construct(private ConfigInterface $config, private LoggerInterface $logger, private ?CacheItemPoolInterface $cache = null) {} public function make(string $name): Tracer { From c8ffef951967c83a1ee06110f76480fd5e306855 Mon Sep 17 00:00:00 2001 From: Eliabner Teixeira <46829134+fkw3t@users.noreply.github.com> Date: Fri, 4 Apr 2025 15:56:22 -0300 Subject: [PATCH 20/27] Allow custom traces enrichment (#23) * feat: add custom append methods for override * chore: change get root span method visibility * feat: allow append custom span --- src/Aspect/HttpClientAspect.php | 28 ++++++++++++++++++++++------ src/Middleware/TraceMiddleware.php | 11 +++++++++-- src/SpanStarter.php | 2 +- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 9a0dcf8..9109da6 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -104,31 +104,45 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $options['headers'] = array_replace($options['headers'] ?? [], $appendHeaders); $proceedingJoinPoint->arguments['keys']['options'] = $options; + $this->appendCustomSpan($span, $options); + /** @var PromiseInterface $result */ $result = $proceedingJoinPoint->process(); $result->then( - $this->onFullFilled($span), - $this->onRejected($span) + $this->onFullFilled($span, $options), + $this->onRejected($span, $options) ); $span->finish(); return $result; } - private function onFullFilled(Span $span): callable + protected function appendCustomSpan(Span $span, array $options): void { - return function (ResponseInterface $response) use ($span) { + // just for override + } + + protected function appendCustomResponseSpan(Span $span, array $options, ?ResponseInterface $response): void + { + // just for override + } + + private function onFullFilled(Span $span, array $options): callable + { + return function (ResponseInterface $response) use ($span, $options) { $span->setTag( $this->spanTagManager->get('http_client', 'http.status_code'), $response->getStatusCode() ); $span->setTag('otel.status_code', 'OK'); + + $this->appendCustomResponseSpan($span, $options, $response); }; } - private function onRejected(Span $span): callable + private function onRejected(Span $span, array $options): callable { - return function (RequestException $exception) use ($span) { + return function (RequestException $exception) use ($span, $options) { if ($this->switchManager->isEnabled('exception')) { $this->appendExceptionToSpan($span, $exception); } @@ -138,6 +152,8 @@ private function onRejected(Span $span): callable $exception->getResponse()->getStatusCode() ); + $this->appendCustomResponseSpan($span, $options, $exception->getResponse()); + return Create::rejectionFor($exception); }; } diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index e53bba9..f1612d0 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -92,7 +92,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $response = $handler->handle($request); $span->setTag($this->spanTagManager->get('response', 'status_code'), $response->getStatusCode()); $span->setTag('otel.status_code', 'OK'); - $this->appendCustomResponseSpan($span, $response); + $this->appendCustomResponseSpan($span, $request, $response); } catch (Throwable $exception) { $this->switchManager->isEnabled('exception') && $this->appendExceptionToSpan($span, $exception); if ($exception instanceof HttpException) { @@ -112,7 +112,12 @@ protected function appendCustomExceptionSpan(Span $span, Throwable $exception): // just for override } - protected function appendCustomResponseSpan(Span $span, ResponseInterface $response): void + protected function appendCustomSpan(Span $span, ServerRequestInterface $request): void + { + // just for override + } + + protected function appendCustomResponseSpan(Span $span, ServerRequestInterface $request, ResponseInterface $response): void { // just for override } @@ -146,6 +151,8 @@ protected function buildSpan(ServerRequestInterface $request): Span $span->setTag("attribute.{$key}", $value); } + $this->appendCustomSpan($span, $request); + return $span; } diff --git a/src/SpanStarter.php b/src/SpanStarter.php index 0ad63f2..964d626 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -70,7 +70,7 @@ protected function startSpan( return $child; } - private function getTracerRoot(int $coroutineId): ?Span + public function getTracerRoot(int $coroutineId): ?Span { /** @var null|Span $root */ $root = Context::get('tracer.root', null, $coroutineId); From 00890fa68f8d1c7bf9974383ea3f15f7edde98a4 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Mon, 18 Aug 2025 16:22:47 -0300 Subject: [PATCH 21/27] Updating from main package (#24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [3.1]Bumps dependencies (#5796) Co-authored-by: 李铭昕 <715557344@qq.com> * Upgrade hyperf packages to version `~3.1.0` (#5801) * Bumps `phpunit` to `10.x` (#5802) Co-authored-by: 李铭昕 <715557344@qq.com> * Support swow psr7-plus interface for all components. (#5839) * Support aspect to `GuzzleHttp\Client::request()` (#5996) * Fixed the bug that `no_aspect` is overridden (#6013) * Allow using the tracer instance from context, append `Trace-Id` to Response Header (#6023) * Optimized the tracing in coroutine (#6027) Co-authored-by: 李铭昕 <715557344@qq.com> * Make `Hyperf\Coroutine\Traits\Container` as deprecated. (#6044) Co-authored-by: 李铭昕 <715557344@qq.com> * Using the tracer instance from coroutine context (#6046) * Supplement the missing tag configuration items (#6060) * Supplement the missing tag configuration items * Update CHANGELOG-3.0.md * Added `Kafka` reporter for zipkin (#6069) * Optimize kafka reporter (#6075) * Fix error that using non-zipkin driver of tracer (#6097) Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com> * Optimize kafka reporter of tracer (#6098) * Optimize the HttpClientFactory of tracer (#6100) * Allowed output log when an exception occurs (#6111) * Adds `RequestTraceListener` for `hyperf/tracer` (#6062) * Added `ignore_exceptions` for tracer (#6143) Co-authored-by: Deeka Wong * Record the exception message only by opening the exception switch and closing the ignore switch when using `trace`. (#6157) Co-authored-by: 李铭昕 <715557344@qq.com> * Upgrade actions/checkout to v4 (#6159) * Optimize `KafkaClientFactory` of `hyperf/tracer` (#6167) * Added RpcAspect and use it instead of JsonRpcAspect (#6198) * Added switch for `ElasticserachAspect` and `CoroutineAspect`. (#6200) * Added `Hyperf\Tracer\Aspect\GrpcAspect` (#6203) Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com> * Optimize the tracer component by replacing the direct instantiation with a closure at Context::getOrSet. (#6315) Co-authored-by: 李铭昕 <715557344@qq.com> * Changed the `branch-alias` of all components to `3.1-dev`. (#6320) * Fixed bug that the jaeger cannot show the http code when using `tracer`. (#6321) Co-authored-by: 李铭昕 <715557344@qq.com> * Use `Hyperf\Coroutine\Coroutine` instead of `Hyperf\Engine\Coroutine` (#6513) * Release v3.1.8 (#6515) Co-authored-by: Sharif <54396379+developersharif@users.noreply.github.com> Co-authored-by: guandeng Co-authored-by: Luffy <52o@qq52o.cn> * Added default config of noop driver for `hyperf/opentracing`. (#6550) * fix: noop tracer test (#6552) * Fixed implicitly nullable params (#6616) * Format code by the latest `cs-fixer`. (#6617) * chore: Update phpstan.neon.dist to level 6 (#6780) Co-authored-by: 李铭昕 <715557344@qq.com> * Added the request body and response body to the tracer (#6793) * Added composer.json normalize support (#6887) * Improve actions (#7088) * update github actions for all components. (#7090) * remove hyperf/utils compoent (#7411) * Fixed error versions for `hyperf/engine`. (#7429) * merge from main lib; resolving conflicts * bring recursive get root to TracerContext; resolving conflicts. * revert traceId with uuid creation; fix Typo; Removing workflow not needed; fix docblocks. * Fix Elasticsearch Typo (#7468) * fix import * fix http client aspect; fix import. * Update src/Aspect/HttpClientAspect.php Co-authored-by: Leonardo Teixeira --------- Co-authored-by: Deeka Wong Co-authored-by: 李铭昕 <715557344@qq.com> Co-authored-by: 张城铭 Co-authored-by: crayxn Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Co-authored-by: 宣言就是Siam <59419979@qq.com> Co-authored-by: lixinhan <327902941@qq.com> Co-authored-by: CodeWay Co-authored-by: Sharif <54396379+developersharif@users.noreply.github.com> Co-authored-by: guandeng Co-authored-by: Luffy <52o@qq52o.cn> Co-authored-by: Weslen Teche Co-authored-by: jonas-elias <48037643+jonas-elias@users.noreply.github.com> Co-authored-by: Leonardo Teixeira --- class_map/GlobalTracer.php | 59 +++++++ class_map/Map.php | 1 + class_map/ThriftUdpTransport.php | 2 +- composer.json | 28 ++-- publish/opentracing.php | 63 +++++++- src/Adapter/HttpClientFactory.php | 41 +---- src/Adapter/NoOpTracerFactory.php | 25 +++ src/Adapter/NoopTracerFactory.php | 1 + src/Adapter/Reporter/HttpClientFactory.php | 117 ++++++++++++++ src/Adapter/Reporter/Kafka.php | 69 ++++++++ src/Adapter/Reporter/KafkaClientFactory.php | 147 ++++++++++++++++++ src/Adapter/Reporter/ReporterFactory.php | 53 +++++++ src/Adapter/ZipkinTracerFactory.php | 18 ++- src/Annotation/Trace.php | 1 + src/Aspect/CoroutineAspect.php | 73 +++++++++ src/Aspect/CreateTraceContextAspect.php | 35 +++++ src/Aspect/DbAspect.php | 10 +- ...rachAspect.php => ElasticsearchAspect.php} | 16 +- src/Aspect/GrpcAspect.php | 131 ++++++++++++++++ src/Aspect/HttpClientAspect.php | 55 ++++--- src/Aspect/JsonRpcAspect.php | 91 +---------- src/Aspect/MethodAspect.php | 10 +- src/Aspect/RedisAspect.php | 10 +- src/Aspect/RpcAspect.php | 102 ++++++++++++ src/Aspect/TraceAnnotationAspect.php | 11 +- src/ConfigProvider.php | 13 ++ src/Contract/NamedFactoryInterface.php | 5 +- src/Exception/ConnectionClosedException.php | 19 +++ src/Exception/InvalidArgumentException.php | 1 + src/Exception/TimeoutException.php | 19 +++ src/Listener/DbQueryExecutedListener.php | 4 +- src/Listener/RequestTraceListener.php | 124 +++++++++++++++ src/Middleware/TraceMiddleware.php | 18 +-- src/SpanStarter.php | 59 ++----- src/SpanTagManager.php | 6 + src/SpanTagManagerFactory.php | 1 + src/SwitchManager.php | 28 +++- src/SwitchManagerFactory.php | 1 + src/TracerContext.php | 89 +++++++++++ src/TracerFactory.php | 1 + tests/TracerFactoryTest.php | 1 + 41 files changed, 1304 insertions(+), 254 deletions(-) create mode 100644 class_map/GlobalTracer.php create mode 100644 src/Adapter/NoOpTracerFactory.php create mode 100644 src/Adapter/Reporter/HttpClientFactory.php create mode 100644 src/Adapter/Reporter/Kafka.php create mode 100644 src/Adapter/Reporter/KafkaClientFactory.php create mode 100644 src/Adapter/Reporter/ReporterFactory.php create mode 100644 src/Aspect/CoroutineAspect.php create mode 100644 src/Aspect/CreateTraceContextAspect.php rename src/Aspect/{ElasticserachAspect.php => ElasticsearchAspect.php} (72%) create mode 100644 src/Aspect/GrpcAspect.php create mode 100644 src/Aspect/RpcAspect.php create mode 100644 src/Exception/ConnectionClosedException.php create mode 100644 src/Exception/TimeoutException.php create mode 100644 src/Listener/RequestTraceListener.php create mode 100644 src/TracerContext.php diff --git a/class_map/GlobalTracer.php b/class_map/GlobalTracer.php new file mode 100644 index 0000000..a66e13d --- /dev/null +++ b/class_map/GlobalTracer.php @@ -0,0 +1,59 @@ +call($this); } catch (Throwable $e) { - $this->logger->error('ThriftUdpTransport error:' . $e->getMessage()); + $this->logger->error('ThriftUdpTransport error:' . $e->getMessage()); @socket_close($this->socket); $this->socket = null; break; diff --git a/composer.json b/composer.json index 5164859..9743217 100644 --- a/composer.json +++ b/composer.json @@ -11,18 +11,23 @@ ], "homepage": "https://hyperf.io", "support": { - "docs": "https://hyperf.wiki", "issues": "https://github.com/hyperf/hyperf/issues", - "pull-request": "https://github.com/hyperf/hyperf/pulls", - "source": "https://github.com/hyperf/hyperf" + "source": "https://github.com/hyperf/hyperf", + "docs": "https://hyperf.wiki", + "pull-request": "https://github.com/hyperf/hyperf/pulls" }, "require": { - "php": ">=8.0", - "hyperf/contract": "^3.0", - "hyperf/di": "^3.0", - "hyperf/guzzle": "^3.0", - "hyperf/support": "^3.0", - "hyperf/utils": "^3.0", + "php": ">=8.1", + "hyperf/collection": "~3.1.0", + "hyperf/context": "~3.1.0", + "hyperf/contract": "~3.1.0", + "hyperf/coordinator": "~3.1.0", + "hyperf/coroutine": "~3.1.0", + "hyperf/di": "~3.1.0", + "hyperf/engine": "^2.0", + "hyperf/guzzle": "~3.1.0", + "hyperf/stringable": "~3.1.0", + "hyperf/support": "~3.1.0", "jcchavezs/zipkin-opentracing": "^2.0", "jonahgeorge/jaeger-client-php": "^1.4", "opentracing/opentracing": "^1.0", @@ -40,7 +45,8 @@ }, "suggest": { "hyperf/event": "Required to use DbQueryExecutedListener.", - "jonahgeorge/jaeger-client-php": "Required (^0.6) to use jaeger tracing." + "jonahgeorge/jaeger-client-php": "Required (^0.6) to use jaeger tracing.", + "longlang/phpkafka": "Required (^1.2) to use Kafka Producer." }, "autoload": { "psr-4": { @@ -67,7 +73,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" }, "hyperf": { "config": "Hyperf\\Tracer\\ConfigProvider" diff --git a/publish/opentracing.php b/publish/opentracing.php index c81dfa7..9944cfa 100644 --- a/publish/opentracing.php +++ b/publish/opentracing.php @@ -9,22 +9,34 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ +use Hyperf\Tracer\Adapter\JaegerTracerFactory; +use Hyperf\Tracer\Adapter\NoopTracerFactory; +use Hyperf\Tracer\Adapter\Reporter\Kafka; +use Hyperf\Tracer\Adapter\ZipkinTracerFactory; +use Zipkin\Reporters\Http; +use Zipkin\Reporters\Noop; use Zipkin\Samplers\BinarySampler; use function Hyperf\Support\env; return [ + // To disable hyperf/opentracing temporarily, set default driver to noop. 'default' => env('TRACER_DRIVER', 'zipkin'), 'enable' => [ - 'guzzle' => env('TRACER_ENABLE_GUZZLE', false), - 'redis' => env('TRACER_ENABLE_REDIS', false), + 'coroutine' => env('TRACER_ENABLE_COROUTINE', false), 'db' => env('TRACER_ENABLE_DB', false), - 'method' => env('TRACER_ENABLE_METHOD', false), + 'elasticserach' => env('TRACER_ENABLE_ELASTICSERACH', false), 'exception' => env('TRACER_ENABLE_EXCEPTION', false), + 'grpc' => env('TRACER_ENABLE_GRPC', false), + 'guzzle' => env('TRACER_ENABLE_GUZZLE', false), + 'method' => env('TRACER_ENABLE_METHOD', false), + 'redis' => env('TRACER_ENABLE_REDIS', false), + 'rpc' => env('TRACER_ENABLE_RPC', false), + 'ignore_exceptions' => [], ], 'tracer' => [ 'zipkin' => [ - 'driver' => Hyperf\Tracer\Adapter\ZipkinTracerFactory::class, + 'driver' => ZipkinTracerFactory::class, 'app' => [ 'name' => env('APP_NAME', 'skeleton'), // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null @@ -32,14 +44,39 @@ 'ipv6' => null, 'port' => 9501, ], - 'options' => [ - 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), - 'timeout' => env('ZIPKIN_TIMEOUT', 1), + 'reporter' => env('ZIPKIN_REPORTER', 'http'), // kafka, http + 'reporters' => [ + // options for http reporter + 'http' => [ + 'class' => Http::class, + 'constructor' => [ + 'options' => [ + 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), + 'timeout' => env('ZIPKIN_TIMEOUT', 1), + ], + ], + ], + // options for kafka reporter + 'kafka' => [ + 'class' => Kafka::class, + 'constructor' => [ + 'options' => [ + 'topic' => env('ZIPKIN_KAFKA_TOPIC', 'zipkin'), + 'bootstrap_servers' => env('ZIPKIN_KAFKA_BOOTSTRAP_SERVERS', '127.0.0.1:9092'), + 'acks' => (int) env('ZIPKIN_KAFKA_ACKS', -1), + 'connect_timeout' => (int) env('ZIPKIN_KAFKA_CONNECT_TIMEOUT', 1), + 'send_timeout' => (int) env('ZIPKIN_KAFKA_SEND_TIMEOUT', 1), + ], + ], + ], + 'noop' => [ + 'class' => Noop::class, + ], ], 'sampler' => BinarySampler::createAsAlwaysSample(), ], 'jaeger' => [ - 'driver' => Hyperf\Tracer\Adapter\JaegerTracerFactory::class, + 'driver' => JaegerTracerFactory::class, 'name' => env('APP_NAME', 'skeleton'), 'options' => [ /* @@ -58,6 +95,9 @@ ], ], ], + 'noop' => [ + 'driver' => NoopTracerFactory::class, + ], ], 'tags' => [ 'http_client' => [ @@ -82,14 +122,21 @@ ], 'request' => [ 'path' => 'request.path', + 'uri' => 'request.uri', 'method' => 'request.method', 'header' => 'request.header', + // 'body' => 'request.body', ], 'coroutine' => [ 'id' => 'coroutine.id', ], 'response' => [ 'status_code' => 'response.status_code', + // 'body' => 'response.body', + ], + 'rpc' => [ + 'path' => 'rpc.path', + 'status' => 'rpc.status', ], ], ]; diff --git a/src/Adapter/HttpClientFactory.php b/src/Adapter/HttpClientFactory.php index 2508b38..fcb1716 100644 --- a/src/Adapter/HttpClientFactory.php +++ b/src/Adapter/HttpClientFactory.php @@ -9,43 +9,12 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ -namespace Hyperf\Tracer\Adapter; -use Hyperf\Guzzle\ClientFactory as GuzzleClientFactory; -use RuntimeException; -use Zipkin\Reporters\Http\ClientFactory; +namespace Hyperf\Tracer\Adapter; -class HttpClientFactory implements ClientFactory +/** + * @deprecated v3.0, will remove in v3.1, use \Hyperf\Tracer\Adapter\Reporter\HttpClientFactory instead. + */ +class HttpClientFactory extends Reporter\HttpClientFactory { - public function __construct(private GuzzleClientFactory $guzzleClientFactory) - { - } - - public function build(array $options): callable - { - return function (string $payload) use ($options): void { - $url = $options['endpoint_url']; - unset($options['endpoint_url']); - $client = $this->guzzleClientFactory->create($options); - $additionalHeaders = $options['headers'] ?? []; - $requiredHeaders = [ - 'Content-Type' => 'application/json', - 'Content-Length' => strlen($payload), - 'b3' => '0', - ]; - $headers = array_merge($additionalHeaders, $requiredHeaders); - $response = $client->post($url, [ - 'body' => $payload, - 'headers' => $headers, - // If 'no_aspect' option is true, then the HttpClientAspect will not modify the client options. - 'no_aspect' => true, - ]); - $statusCode = $response->getStatusCode(); - if ($statusCode !== 202) { - throw new RuntimeException( - sprintf('Reporting of spans failed, status code %d', $statusCode) - ); - } - }; - } } diff --git a/src/Adapter/NoOpTracerFactory.php b/src/Adapter/NoOpTracerFactory.php new file mode 100644 index 0000000..d97829d --- /dev/null +++ b/src/Adapter/NoOpTracerFactory.php @@ -0,0 +1,25 @@ +loop(); + + return function (string $payload) use ($options): void { + $chan = $this->chan; + $clientFactory = $this->clientFactory; + + $chan->push(static function () use ($payload, $options, $clientFactory) { + $url = $options['endpoint_url']; + unset($options['endpoint_url']); + $client = $clientFactory->create($options); + $additionalHeaders = $options['headers'] ?? []; + $requiredHeaders = [ + 'Content-Type' => 'application/json', + 'Content-Length' => strlen($payload), + 'b3' => '0', + ]; + $headers = array_merge($additionalHeaders, $requiredHeaders); + $response = $client->post($url, [ + 'body' => $payload, + 'headers' => $headers, + // If 'no_aspect' option is true, then the HttpClientAspect will not modify the client options. + 'no_aspect' => true, + ]); + $statusCode = $response->getStatusCode(); + if (! in_array($statusCode, [200, 202])) { + throw new RuntimeException( + sprintf('Reporting of spans failed, status code %d', $statusCode) + ); + } + }); + + if ($chan->isClosing()) { + throw new RuntimeException('Connection closed.'); + } + }; + } + + public function close(): void + { + $chan = $this->chan; + $this->chan = null; + + $chan?->close(); + } + + protected function loop(): void + { + if ($this->chan != null) { + return; + } + + $this->chan = new Channel($this->channelSize); + + Coroutine::create(function () { + while (true) { + while (true) { + /** @var null|Closure $closure */ + $closure = $this->chan?->pop(); + if (! $closure) { + break 2; + } + try { + $closure(); + } catch (Throwable) { + break; + } finally { + $closure = null; + } + } + } + + $this->close(); + }); + + Coroutine::create(function () { + if (CoordinatorManager::until(Constants::WORKER_EXIT)->yield()) { + $this->close(); + } + }); + } +} diff --git a/src/Adapter/Reporter/Kafka.php b/src/Adapter/Reporter/Kafka.php new file mode 100644 index 0000000..2b7b613 --- /dev/null +++ b/src/Adapter/Reporter/Kafka.php @@ -0,0 +1,69 @@ +serializer = $serializer ?? new JsonV2Serializer(); + $this->logger = $logger ?? new NullLogger(); + } + + /** + * @param array|Span[] $spans + */ + public function report(array $spans): void + { + if (count($spans) === 0) { + return; + } + + $payload = $this->serializer->serialize($spans); + + if (! $payload) { + $this->logger->error( + sprintf('failed to encode spans with code %d', json_last_error()) + ); + return; + } + + $client = $this->clientFactory->build($this->options); + + try { + $client($payload); + } catch (Throwable $e) { + $this->logger->error(sprintf('failed to report spans: %s', $e->getMessage())); + } + } +} diff --git a/src/Adapter/Reporter/KafkaClientFactory.php b/src/Adapter/Reporter/KafkaClientFactory.php new file mode 100644 index 0000000..00ccc9a --- /dev/null +++ b/src/Adapter/Reporter/KafkaClientFactory.php @@ -0,0 +1,147 @@ +options = $options; + if (isset($options['channel_size'])) { + $this->channelSize = (int) $options['channel_size']; + } + + $this->loop(); + + return function (string $payload) use ($options): void { + $topic = $options['topic'] ?? 'zipkin'; + $key = $options['key'] ?? uniqid('', true); + $headers = $options['headers'] ?? []; + $partitionIndex = $options['partition_index'] ?? null; + $chan = $this->chan; + + $chan->push(function () use ($topic, $key, $payload, $headers, $partitionIndex) { + try { + $this->producer->send($topic, $payload, $key, $headers, $partitionIndex); + } catch (Throwable $e) { + throw $e; + } + }); + + if ($chan->isClosing()) { + throw new ConnectionClosedException('Connection closed.'); + } + }; + } + + public function close(): void + { + $chan = $this->chan; + $producer = $this->producer; + $this->chan = null; + $this->producer = null; + + $chan?->close(); + $producer?->close(); + } + + protected function loop(): void + { + if ($this->chan != null) { + return; + } + + $this->chan = new Channel($this->channelSize); + + Coroutine::create(function () { + while (true) { + $this->producer = $this->makeProducer(); + while (true) { + /** @var null|Closure $closure */ + $closure = $this->chan?->pop(); + if (! $closure) { + break 2; + } + try { + $closure->call($this); + } catch (Throwable) { + try { + $this->producer->close(); + } catch (Throwable) { + } + break; + } finally { + $closure = null; + } + } + } + + $this->close(); + }); + + Coroutine::create(function () { + if (CoordinatorManager::until(Constants::WORKER_EXIT)->yield()) { + while (! $this->chan->isEmpty()) { + msleep(100); + } + $this->close(); + } + }); + } + + protected function makeProducer(): Producer + { + $options = array_replace([ + 'bootstrap_servers' => '127.0.0.1:9092', + 'acks' => -1, + 'connect_timeout' => 1, + 'send_timeout' => 1, + ], $this->options); + $config = new ProducerConfig(); + + $config->setBootstrapServer($options['bootstrap_servers']); + $config->setUpdateBrokers(true); + if (is_int($options['acks'])) { + $config->setAcks($options['acks']); + } + if (is_float($options['connect_timeout'])) { + $config->setConnectTimeout($options['connect_timeout']); + } + if (is_float($options['send_timeout'])) { + $config->setSendTimeout($options['send_timeout']); + } + + return new Producer($config); + } +} diff --git a/src/Adapter/Reporter/ReporterFactory.php b/src/Adapter/Reporter/ReporterFactory.php new file mode 100644 index 0000000..e0d5e78 --- /dev/null +++ b/src/Adapter/Reporter/ReporterFactory.php @@ -0,0 +1,53 @@ +container->get(HttpClientFactory::class); + } + + if ($this->container->has(StdoutLoggerInterface::class)) { + $constructor['logger'] = $this->container->get(StdoutLoggerInterface::class); + } + + return make($class, $constructor); + } +} diff --git a/src/Adapter/ZipkinTracerFactory.php b/src/Adapter/ZipkinTracerFactory.php index aa76791..43b54b5 100644 --- a/src/Adapter/ZipkinTracerFactory.php +++ b/src/Adapter/ZipkinTracerFactory.php @@ -9,9 +9,11 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Adapter; use Hyperf\Contract\ConfigInterface; +use Hyperf\Tracer\Adapter\Reporter\ReporterFactory; use Hyperf\Tracer\Contract\NamedFactoryInterface; use Zipkin\Endpoint; use Zipkin\Reporters\Http; @@ -25,16 +27,16 @@ class ZipkinTracerFactory implements NamedFactoryInterface private string $name = ''; - public function __construct(private ConfigInterface $config, private HttpClientFactory $clientFactory) + public function __construct(private ConfigInterface $config, private ReporterFactory $reportFactory) { } public function make(string $name): \OpenTracing\Tracer { $this->name = $name; - [$app, $options, $sampler] = $this->parseConfig(); + [$app, $sampler, $reporterOption] = $this->parseConfig(); $endpoint = Endpoint::create($app['name'], $app['ipv4'], $app['ipv6'], $app['port']); - $reporter = new Http($options, $this->clientFactory); + $reporter = $this->reportFactory->make($reporterOption); $tracing = TracingBuilder::create() ->havingLocalEndpoint($endpoint) ->havingSampler($sampler) @@ -46,6 +48,7 @@ public function make(string $name): \OpenTracing\Tracer private function parseConfig(): array { // @TODO Detect the ipv4, ipv6, port from server object or system info automatically. + $reporter = (string) $this->getConfig('reporter', 'http'); return [ $this->getConfig('app', [ 'name' => 'skeleton', @@ -53,10 +56,13 @@ private function parseConfig(): array 'ipv6' => null, 'port' => 9501, ]), - $this->getConfig('options', [ - 'timeout' => 1, - ]), $this->getConfig('sampler', BinarySampler::createAsAlwaysSample()), + $this->getConfig('reporters.' . $reporter, [ + 'class' => Http::class, + 'constructor' => [ + 'options' => $this->getConfig('options', []), + ], + ]), ]; } diff --git a/src/Annotation/Trace.php b/src/Annotation/Trace.php index 80aee39..4aea6c7 100644 --- a/src/Annotation/Trace.php +++ b/src/Annotation/Trace.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Annotation; use Attribute; diff --git a/src/Aspect/CoroutineAspect.php b/src/Aspect/CoroutineAspect.php new file mode 100644 index 0000000..a6054dd --- /dev/null +++ b/src/Aspect/CoroutineAspect.php @@ -0,0 +1,73 @@ +switchManager->isEnabled('coroutine')) { + return $proceedingJoinPoint->process(); + } + + $callable = $proceedingJoinPoint->arguments['keys']['callable']; + $root = TracerContext::getRoot(); + + $proceedingJoinPoint->arguments['keys']['callable'] = function () use ($callable, $root) { + try { + if ($root instanceof Span) { + $tracer = TracerContext::getTracer(); + $child = $tracer->startSpan('coroutine', [ + 'child_of' => $root->getContext(), + ]); + if ($this->spanTagManager->has('coroutine', 'id')) { + $child->setTag($this->spanTagManager->get('coroutine', 'id'), Co::id()); + } + TracerContext::setRoot($child); + Co::defer(function () use ($child, $tracer) { + $child->finish(); + $tracer->flush(); + }); + } + + $callable(); + } catch (Throwable $e) { + if (isset($child) && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $child->setTag('error', true); + $child->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } + + throw $e; + } + }; + + return $proceedingJoinPoint->process(); + } +} diff --git a/src/Aspect/CreateTraceContextAspect.php b/src/Aspect/CreateTraceContextAspect.php new file mode 100644 index 0000000..b2ceb87 --- /dev/null +++ b/src/Aspect/CreateTraceContextAspect.php @@ -0,0 +1,35 @@ +process(); + if ($traceContext instanceof TraceContext) { + TracerContext::setTraceId($traceContext->getTraceId()); + } + return $traceContext; + } +} diff --git a/src/Aspect/DbAspect.php b/src/Aspect/DbAspect.php index 661f01a..66aff61 100644 --- a/src/Aspect/DbAspect.php +++ b/src/Aspect/DbAspect.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use Hyperf\DB\DB; @@ -17,7 +18,6 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; -use OpenTracing\Tracer; use Throwable; class DbAspect extends AbstractAspect @@ -28,7 +28,7 @@ class DbAspect extends AbstractAspect DB::class . '::__call', ]; - public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -47,8 +47,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } throw $e; } finally { $span->finish(); diff --git a/src/Aspect/ElasticserachAspect.php b/src/Aspect/ElasticsearchAspect.php similarity index 72% rename from src/Aspect/ElasticserachAspect.php rename to src/Aspect/ElasticsearchAspect.php index 22c6761..b050719 100644 --- a/src/Aspect/ElasticserachAspect.php +++ b/src/Aspect/ElasticsearchAspect.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use Elasticsearch\Client; @@ -17,10 +18,9 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; -use OpenTracing\Tracer; use Throwable; -class ElasticserachAspect extends AbstractAspect +class ElasticsearchAspect extends AbstractAspect { use SpanStarter; @@ -40,7 +40,7 @@ class ElasticserachAspect extends AbstractAspect Client::class . '::search', ]; - public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -49,13 +49,19 @@ public function __construct(private Tracer $tracer, private SwitchManager $switc */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { + if ($this->switchManager->isEnabled('elasticserach') === false) { + return $proceedingJoinPoint->process(); + } + $key = $proceedingJoinPoint->className . '::' . $proceedingJoinPoint->methodName; $span = $this->startSpan($key); try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } throw $e; } finally { $span->finish(); diff --git a/src/Aspect/GrpcAspect.php b/src/Aspect/GrpcAspect.php new file mode 100644 index 0000000..c18159f --- /dev/null +++ b/src/Aspect/GrpcAspect.php @@ -0,0 +1,131 @@ +switchManager = $container->get(SwitchManager::class); + $this->spanTagManager = $container->get(SpanTagManager::class); + $this->context = $container->get(Context::class); + } + + public function process(ProceedingJoinPoint $proceedingJoinPoint) + { + if (! $this->switchManager->isEnabled('grpc')) { + return $proceedingJoinPoint->process(); + } + + return match ($proceedingJoinPoint->methodName) { + 'send' => $this->processSend($proceedingJoinPoint), + 'recv' => $this->processRecv($proceedingJoinPoint), + default => $proceedingJoinPoint->process(), + }; + } + + private function processSend(ProceedingJoinPoint $proceedingJoinPoint) + { + $arguments = $proceedingJoinPoint->getArguments(); + /** @var Request $request */ + $request = $arguments[0]; + $key = "GRPC send [{$request->path}]"; + $span = $this->startSpan($key); + $carrier = []; + // Injects the context into the wire + TracerContext::getTracer()->inject( + $span->getContext(), + TEXT_MAP, + $carrier + ); + + // Merge tracer info + $request->headers = array_merge($request->headers, $carrier); + if ($this->spanTagManager->has('grpc', 'request.header')) { + foreach ($request->headers as $key => $value) { + $span->setTag($this->spanTagManager->get('grpc', 'request.header') . '.' . $key, $value); + } + } + + $this->context->set('tracer.carrier', $carrier); + CT::set('tracer.span.' . static::class, $span); + + try { + return $proceedingJoinPoint->process(); + } catch (Throwable $e) { + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } + throw $e; + } + } + + private function processRecv(ProceedingJoinPoint $proceedingJoinPoint) + { + /** @var null|Span $span */ + $span = CT::get('tracer.span.' . static::class); + + try { + /** @var bool|Response $result */ + $result = $proceedingJoinPoint->process(); + if ($result instanceof Response) { + if ($this->spanTagManager->has('grpc', 'response.header')) { + foreach ($result->headers as $key => $value) { + $span?->setTag($this->spanTagManager->get('grpc', 'response.header') . '.' . $key, $value); + } + } + } + } catch (Throwable $e) { + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e::class)) { + $span?->setTag('error', true); + $span?->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } + throw $e; + } finally { + $span?->finish(); + } + + return $result; + } +} diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 9109da6..19110f3 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use GuzzleHttp\Client; @@ -16,7 +17,7 @@ use GuzzleHttp\Promise\Create; use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7\Uri; -use Hyperf\Di\Aop\AroundInterface; +use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Di\Exception\Exception; use Hyperf\Tracer\ExceptionAppender; @@ -24,6 +25,7 @@ use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\Support\Uri as SupportUri; use Hyperf\Tracer\SwitchManager; +use Hyperf\Tracer\TracerContext; use OpenTracing\Span; use OpenTracing\Tracer; use Psr\Http\Message\ResponseInterface; @@ -31,29 +33,22 @@ use const OpenTracing\Formats\TEXT_MAP; -class HttpClientAspect implements AroundInterface +class HttpClientAspect extends AbstractAspect { use SpanStarter; use ExceptionAppender; - public array $classes = [Client::class . '::requestAsync']; - - public array $annotations = []; - - private Tracer $tracer; - - private SpanTagManager $spanTagManager; + public array $classes = [ + Client::class . '::request', + Client::class . '::requestAsync', + ]; - public function __construct(Tracer $tracer, private SwitchManager $switchManager, SpanTagManager $spanTagManager) + public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { - $this->tracer = $tracer; - $this->spanTagManager = $spanTagManager; } /** * @return mixed return the value from process method of ProceedingJoinPoint, or the value that you handled - * @throws Exception - * @throws Throwable */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { @@ -96,7 +91,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) } $appendHeaders = []; // Injects the context into the wire - $this->tracer->inject( + TracerContext::getTracer()->inject( $span->getContext(), TEXT_MAP, $appendHeaders @@ -106,13 +101,25 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $this->appendCustomSpan($span, $options); - /** @var PromiseInterface $result */ - $result = $proceedingJoinPoint->process(); - $result->then( - $this->onFullFilled($span, $options), - $this->onRejected($span, $options) - ); - $span->finish(); + try { + $result = $proceedingJoinPoint->process(); + if ($result instanceof PromiseInterface) { + $result->then( + $this->onFullFilled($span, $options), + $this->onRejected($span, $options) + ); + } elseif ($result instanceof ResponseInterface) { + $this->onFullFilled($span, $options)($result); + } + } catch (Throwable $e) { + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } + throw $e; + } finally { + $span->finish(); + } return $result; } @@ -132,7 +139,7 @@ private function onFullFilled(Span $span, array $options): callable return function (ResponseInterface $response) use ($span, $options) { $span->setTag( $this->spanTagManager->get('http_client', 'http.status_code'), - $response->getStatusCode() + (string) $response->getStatusCode() ); $span->setTag('otel.status_code', 'OK'); @@ -149,7 +156,7 @@ private function onRejected(Span $span, array $options): callable $span->setTag( $this->spanTagManager->get('http_client', 'http.status_code'), - $exception->getResponse()->getStatusCode() + (string) $exception->getResponse()->getStatusCode() ); $this->appendCustomResponseSpan($span, $options, $exception->getResponse()); diff --git a/src/Aspect/JsonRpcAspect.php b/src/Aspect/JsonRpcAspect.php index 4f14d97..9412225 100644 --- a/src/Aspect/JsonRpcAspect.php +++ b/src/Aspect/JsonRpcAspect.php @@ -9,93 +9,12 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ -namespace Hyperf\Tracer\Aspect; - -use Hyperf\Context\Context as CT; -use Hyperf\Di\Aop\AbstractAspect; -use Hyperf\Di\Aop\ProceedingJoinPoint; -use Hyperf\Rpc\Context; -use Hyperf\RpcClient\AbstractServiceClient; -use Hyperf\RpcClient\Client; -use Hyperf\Tracer\SpanStarter; -use Hyperf\Tracer\SpanTagManager; -use Hyperf\Tracer\SwitchManager; -use OpenTracing\Span; -use OpenTracing\Tracer; -use Psr\Container\ContainerInterface; -use Throwable; -use const OpenTracing\Formats\TEXT_MAP; +namespace Hyperf\Tracer\Aspect; -class JsonRpcAspect extends AbstractAspect +/** + * @deprecated since v3.0, will be removed in v3.1. + */ +class JsonRpcAspect extends RpcAspect { - use SpanStarter; - - public array $classes = [ - AbstractServiceClient::class . '::__generateRpcPath', - Client::class . '::send', - ]; - - private Tracer $tracer; - - private SwitchManager $switchManager; - - private SpanTagManager $spanTagManager; - - private Context $context; - - public function __construct(private ContainerInterface $container) - { - $this->tracer = $container->get(Tracer::class); - $this->switchManager = $container->get(SwitchManager::class); - $this->spanTagManager = $container->get(SpanTagManager::class); - $this->context = $container->get(Context::class); - } - - public function process(ProceedingJoinPoint $proceedingJoinPoint) - { - $result = []; - if ($proceedingJoinPoint->methodName === '__generateRpcPath') { - $path = $proceedingJoinPoint->process(); - $key = "JsonRPC send [{$path}]"; - $span = $this->startSpan($key); - if ($this->spanTagManager->has('rpc', 'path')) { - $span->setTag($this->spanTagManager->get('rpc', 'path'), $path); - } - $carrier = []; - // Injects the context into the wire - $this->tracer->inject( - $span->getContext(), - TEXT_MAP, - $carrier - ); - $this->context->set('tracer.carrier', $carrier); - CT::set('tracer.span.' . static::class, $span); - return $path; - } - - if ($proceedingJoinPoint->methodName === 'send') { - try { - $result = $proceedingJoinPoint->process(); - } catch (Throwable $e) { - if ($span = CT::get('tracer.span.' . static::class)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - CT::set('tracer.span.' . static::class, $span); - } - throw $e; - } finally { - /** @var Span $span */ - if ($span = CT::get('tracer.span.' . static::class)) { - if ($this->spanTagManager->has('rpc', 'status')) { - $span->setTag($this->spanTagManager->get('rpc', 'status'), isset($result['result']) ? 'OK' : 'Failed'); - } - $span->finish(); - } - } - - return $result; - } - return $proceedingJoinPoint->process(); - } } diff --git a/src/Aspect/MethodAspect.php b/src/Aspect/MethodAspect.php index c196fe9..c9aa8a2 100644 --- a/src/Aspect/MethodAspect.php +++ b/src/Aspect/MethodAspect.php @@ -9,13 +9,13 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SwitchManager; -use OpenTracing\Tracer; use Throwable; class MethodAspect extends AbstractAspect @@ -26,7 +26,7 @@ class MethodAspect extends AbstractAspect 'App*', ]; - public function __construct(private Tracer $tracer, private SwitchManager $switchManager) + public function __construct(private SwitchManager $switchManager) { } @@ -44,8 +44,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } throw $e; } finally { $span->finish(); diff --git a/src/Aspect/RedisAspect.php b/src/Aspect/RedisAspect.php index ce42059..7cbb5c0 100644 --- a/src/Aspect/RedisAspect.php +++ b/src/Aspect/RedisAspect.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; @@ -17,7 +18,6 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; -use OpenTracing\Tracer; use Throwable; class RedisAspect extends AbstractAspect @@ -28,7 +28,7 @@ class RedisAspect extends AbstractAspect Redis::class . '::__call', ]; - public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -48,8 +48,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $result = $proceedingJoinPoint->process(); $span->setTag($this->spanTagManager->get('redis', 'result'), json_encode($result, JSON_THROW_ON_ERROR)); } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } throw $e; } finally { $span->finish(); diff --git a/src/Aspect/RpcAspect.php b/src/Aspect/RpcAspect.php new file mode 100644 index 0000000..074a8e6 --- /dev/null +++ b/src/Aspect/RpcAspect.php @@ -0,0 +1,102 @@ +switchManager = $container->get(SwitchManager::class); + $this->spanTagManager = $container->get(SpanTagManager::class); + $this->context = $container->get(Context::class); + } + + public function process(ProceedingJoinPoint $proceedingJoinPoint) + { + if (static::class == self::class && $this->switchManager->isEnabled('rpc') === false) { + return $proceedingJoinPoint->process(); + } + + if ($proceedingJoinPoint->methodName === '__generateRpcPath') { + $path = $proceedingJoinPoint->process(); + $key = "RPC send [{$path}]"; + $span = $this->startSpan($key); + if ($this->spanTagManager->has('rpc', 'path')) { + $span->setTag($this->spanTagManager->get('rpc', 'path'), $path); + } + $carrier = []; + // Injects the context into the wire + TracerContext::getTracer()->inject( + $span->getContext(), + TEXT_MAP, + $carrier + ); + $this->context->set('tracer.carrier', $carrier); + CT::set('tracer.span.' . static::class, $span); + return $path; + } + + if ($proceedingJoinPoint->methodName === 'send') { + try { + $result = $proceedingJoinPoint->process(); + } catch (Throwable $e) { + if (($span = CT::get('tracer.span.' . static::class)) && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + CT::set('tracer.span.' . static::class, $span); + } + throw $e; + } finally { + /** @var Span $span */ + if ($span = CT::get('tracer.span.' . static::class)) { + if ($this->spanTagManager->has('rpc', 'status')) { + $span->setTag($this->spanTagManager->get('rpc', 'status'), isset($result['result']) ? 'OK' : 'Failed'); + } + $span->finish(); + } + } + + return $result; + } + return $proceedingJoinPoint->process(); + } +} diff --git a/src/Aspect/TraceAnnotationAspect.php b/src/Aspect/TraceAnnotationAspect.php index 7936f16..226dc35 100644 --- a/src/Aspect/TraceAnnotationAspect.php +++ b/src/Aspect/TraceAnnotationAspect.php @@ -9,13 +9,14 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Tracer\Annotation\Trace; use Hyperf\Tracer\SpanStarter; -use OpenTracing\Tracer; +use Hyperf\Tracer\SwitchManager; use Throwable; class TraceAnnotationAspect extends AbstractAspect @@ -26,7 +27,7 @@ class TraceAnnotationAspect extends AbstractAspect Trace::class, ]; - public function __construct(private Tracer $tracer) + public function __construct(private SwitchManager $switchManager) { } @@ -50,8 +51,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + } throw $e; } finally { $span->finish(); diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index aa06d5d..cf20577 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,17 +9,24 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; use GuzzleHttp\Client; +use Hyperf\Tracer\Aspect\CoroutineAspect; +use Hyperf\Tracer\Aspect\CreateTraceContextAspect; +use Hyperf\Tracer\Aspect\ElasticsearchAspect; +use Hyperf\Tracer\Aspect\GrpcAspect; use Hyperf\Tracer\Aspect\HttpClientAspect; use Hyperf\Tracer\Aspect\MongoCollectionAspect; use Hyperf\Tracer\Aspect\RedisAspect; +use Hyperf\Tracer\Aspect\RpcAspect; use Hyperf\Tracer\Aspect\TraceAnnotationAspect; use Hyperf\Tracer\Listener\DbQueryExecutedListener; use Hyperf\Tracer\Middleware\TraceMiddleware; use Jaeger\SpanContext; use Jaeger\ThriftUdpTransport; +use OpenTracing\GlobalTracer; use OpenTracing\Tracer; use Zipkin\Propagation\Map; use Jaeger\Codec\TextCodec; @@ -44,6 +51,7 @@ public function __invoke(): array 'annotations' => [ 'scan' => [ 'class_map' => [ + GlobalTracer::class => __DIR__ . '/../class_map/GlobalTracer.php', Map::class => __DIR__ . '/../class_map/Map.php', ThriftUdpTransport::class => __DIR__ . '/../class_map/ThriftUdpTransport.php', SpanContext::class => __DIR__ . '/../class_map/SpanContext.php', @@ -52,8 +60,13 @@ public function __invoke(): array ], ], 'aspects' => [ + CoroutineAspect::class, + CreateTraceContextAspect::class, + ElasticsearchAspect::class, + GrpcAspect::class, HttpClientAspect::class, RedisAspect::class, + RpcAspect::class, TraceAnnotationAspect::class, MongoCollectionAspect::class, ], diff --git a/src/Contract/NamedFactoryInterface.php b/src/Contract/NamedFactoryInterface.php index 12f33f2..9bd6222 100644 --- a/src/Contract/NamedFactoryInterface.php +++ b/src/Contract/NamedFactoryInterface.php @@ -9,12 +9,15 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer\Contract; +use OpenTracing\Tracer; + interface NamedFactoryInterface { /** * Create the object from factory. */ - public function make(string $name): \OpenTracing\Tracer; + public function make(string $name): Tracer; } diff --git a/src/Exception/ConnectionClosedException.php b/src/Exception/ConnectionClosedException.php new file mode 100644 index 0000000..79f53b1 --- /dev/null +++ b/src/Exception/ConnectionClosedException.php @@ -0,0 +1,19 @@ + $this->handleRequestReceived($event), + RequestHandled::class => $this->handleRequestHandled($event), + RequestTerminated::class => $this->handleRequestTerminated($event), + default => '', // fix phpstan error + }; + } + + protected function handleRequestReceived(RequestReceived $event): void + { + $this->buildSpan($event->request); + } + + protected function handleRequestHandled(RequestHandled $event): void + { + if ($event->response instanceof ResponsePlusInterface && $traceId = TracerContext::getTraceId()) { + $event->response->addHeader('Trace-Id', $traceId); + } + } + + protected function handleRequestTerminated(RequestTerminated $event): void + { + $response = $event->response; + + if (! $response) { + return; + } + + $tracer = TracerContext::getTracer(); + $span = TracerContext::getRoot(); + $span->setTag($this->spanTagManager->get('response', 'status_code'), (string) $response->getStatusCode()); + if ($this->spanTagManager->has('response', 'body')) { + $span->setTag($this->spanTagManager->get('response', 'body'), (string) $response->getBody()); + } + + if ($event->exception && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($event->exception)) { + $this->appendExceptionToSpan($span, $exception = $event->exception); + + if ($exception instanceof HttpException) { + $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode()); + if ($this->spanTagManager->has('response', 'body')) { + $span->setTag($this->spanTagManager->get('response', 'body'), (string) $response->getBody()); + } + } + } + + $span->finish(); + $tracer->flush(); + } + + protected function appendExceptionToSpan(Span $span, Throwable $exception): void + { + $span->setTag('error', true); + $span->setTag($this->spanTagManager->get('exception', 'class'), get_class($exception)); + $span->setTag($this->spanTagManager->get('exception', 'code'), (string) $exception->getCode()); + $span->setTag($this->spanTagManager->get('exception', 'message'), $exception->getMessage()); + $span->setTag($this->spanTagManager->get('exception', 'stack_trace'), (string) $exception); + } + + protected function buildSpan(ServerRequestInterface $request): Span + { + $uri = $request->getUri(); + $span = $this->startSpan(sprintf('request: %s %s', $request->getMethod(), $uri->getPath())); + $span->setTag($this->spanTagManager->get('coroutine', 'id'), (string) Coroutine::id()); + $span->setTag($this->spanTagManager->get('request', 'path'), (string) $uri->getPath()); + $span->setTag($this->spanTagManager->get('request', 'method'), $request->getMethod()); + $span->setTag($this->spanTagManager->get('request', 'uri'), (string) $uri); + if ($this->spanTagManager->has('request', 'body')) { + $span->setTag($this->spanTagManager->get('request', 'body'), (string) $request->getBody()); + } + foreach ($request->getHeaders() as $key => $value) { + $span->setTag($this->spanTagManager->get('request', 'header') . '.' . $key, implode(', ', $value)); + } + return $span; + } +} diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index f1612d0..334f779 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -1,8 +1,4 @@ tracer = $tracer; $this->spanTagManager = $spanTagManager; $this->config = $config->get('opentracing'); } @@ -74,12 +68,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface if (! empty($this->config['ignore_path']) && preg_match($this->config['ignore_path'], $request->getUri()->getPath())) { return $handler->handle($request); } - + $tracer = TracerContext::getTracer(); $span = $this->buildSpan($request); - defer(function () { + defer(function () use($tracer){ try { - $this->tracer->flush(); + $tracer->flush(); } catch (Throwable $exception) { if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { ApplicationContext::getContainer() @@ -96,7 +90,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface } catch (Throwable $exception) { $this->switchManager->isEnabled('exception') && $this->appendExceptionToSpan($span, $exception); if ($exception instanceof HttpException) { - $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode()); + $span->setTag($this->spanTagManager->get('response', 'status_code'), (string) $exception->getStatusCode()); } $this->appendCustomExceptionSpan($span, $exception); throw $exception; diff --git a/src/SpanStarter.php b/src/SpanStarter.php index 964d626..5b04689 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -9,14 +9,12 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; -use Hyperf\Context\ApplicationContext; -use Hyperf\Context\Context; -use Hyperf\Contract\StdoutLoggerInterface; -use Hyperf\Coroutine\Coroutine; -use Hyperf\Engine\Exception\CoroutineDestroyedException; use Hyperf\Tracer\Support\Uuid; +use Hyperf\Context\RequestContext; +use Hyperf\Rpc; use OpenTracing\Span; use Psr\Http\Message\ServerRequestInterface; @@ -34,66 +32,39 @@ protected function startSpan( array $option = [], string $kind = SPAN_KIND_RPC_CLIENT ): Span { - $root = $this->getTracerRoot(Coroutine::id()); + $root = TracerContext::getRoot(); + $tracer = TracerContext::getTracer(); if (! $root instanceof Span) { - /** @var ServerRequestInterface $request */ - $request = Context::get(ServerRequestInterface::class); + $request = RequestContext::getOrNull(); if (! $request instanceof ServerRequestInterface) { - // If the request object is absent, we are probably in a commandline context. + // If the request object is absent, we are probably in a commandLine context. // Throwing an exception is unnecessary. - $root = $this->tracer->startSpan($name, $option); + $root = $tracer->startSpan($name, $option); $root->setTag(SPAN_KIND, $kind); - Context::set('tracer.root', $root); + TracerContext::setRoot($root); return $root; } $carrier = array_map(static fn ($header) => $header[0], $request->getHeaders()); // Extracts the context from the HTTP headers. - $spanContext = $this->tracer->extract(TEXT_MAP, $carrier); + $spanContext = $tracer->extract(TEXT_MAP, $carrier); if ($spanContext) { $option['child_of'] = $spanContext; } - $root = $this->tracer->startSpan($name, $option); + $root = $tracer->startSpan($name, $option); $root->setTag(SPAN_KIND, $kind); - if ($spanContext === null && ! empty($correlationId = $request->getHeaderLine('X-Request-ID'))) { - $root->getContext()->setTraceId((string) Uuid::asInt($correlationId)); + if ($spanContext === null && !empty($correlationId = $request->getHeaderLine('X-Request-ID'))) { + $root->getContext()->setTraceId((string)Uuid::asInt($correlationId)); } - Context::set('tracer.root', $root); + TracerContext::setRoot($root); return $root; } $option['child_of'] = $root->getContext(); - $child = $this->tracer->startSpan($name, $option); + $child = $tracer->startSpan($name, $option); $child->setTag(SPAN_KIND, $kind); $child->setTag('parent.name', $root->getOperationName()); return $child; } - - public function getTracerRoot(int $coroutineId): ?Span - { - /** @var null|Span $root */ - $root = Context::get('tracer.root', null, $coroutineId); - - if ($root instanceof Span) { - return $root; - } - - if ($coroutineId <= 1) { - return $root; - } - - try { - $parent_id = Coroutine::parentId($coroutineId); - } catch (CoroutineDestroyedException $exception) { - if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { - ApplicationContext::getContainer() - ->get(StdoutLoggerInterface::class) - ->warning($exception->getMessage()); - } - return null; - } - - return $this->getTracerRoot($parent_id); - } } diff --git a/src/SpanTagManager.php b/src/SpanTagManager.php index 27faf55..be740e7 100644 --- a/src/SpanTagManager.php +++ b/src/SpanTagManager.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; class SpanTagManager @@ -19,6 +20,10 @@ class SpanTagManager 'http.method' => 'http.method', 'http.status_code' => 'http.status_code', ], + 'grpc' => [ + 'request.header' => 'grpc.request.header', + 'response.header' => 'grpc.response.header', + ], 'redis' => [ 'arguments' => 'db.arguments', 'result' => 'db.result', @@ -40,6 +45,7 @@ class SpanTagManager ], 'request' => [ 'path' => 'request.path', + 'uri' => 'request.uri', 'method' => 'request.method', 'header' => 'request.header', ], diff --git a/src/SpanTagManagerFactory.php b/src/SpanTagManagerFactory.php index 54ecedd..e863bf5 100644 --- a/src/SpanTagManagerFactory.php +++ b/src/SpanTagManagerFactory.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; use Hyperf\Contract\ConfigInterface; diff --git a/src/SwitchManager.php b/src/SwitchManager.php index 26738d7..7db6404 100644 --- a/src/SwitchManager.php +++ b/src/SwitchManager.php @@ -9,11 +9,19 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; +use Hyperf\Context\Context; +use OpenTracing\Span; +use Throwable; + class SwitchManager { - private array $config + /** + * @var array + */ + private $config = [ 'guzzle' => false, 'redis' => false, @@ -21,6 +29,7 @@ class SwitchManager // beta feature, please don't enable 'method' in production environment 'method' => false, 'error' => false, + 'ignore_exceptions' => [], ]; /** @@ -36,6 +45,21 @@ public function apply(array $config): void */ public function isEnabled(string $identifier): bool { - return $this->config[$identifier] ?? false; + if (! isset($this->config[$identifier])) { + return false; + } + + return $this->config[$identifier] && Context::get('tracer.root') instanceof Span; + } + + public function isIgnoreException(string|Throwable $exception): bool + { + $ignoreExceptions = $this->config['ignore_exceptions'] ?? []; + foreach ($ignoreExceptions as $ignoreException) { + if (is_a($exception, $ignoreException, true)) { + return true; + } + } + return false; } } diff --git a/src/SwitchManagerFactory.php b/src/SwitchManagerFactory.php index 0396ae9..38c7395 100644 --- a/src/SwitchManagerFactory.php +++ b/src/SwitchManagerFactory.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; use Hyperf\Contract\ConfigInterface; diff --git a/src/TracerContext.php b/src/TracerContext.php new file mode 100644 index 0000000..d86f713 --- /dev/null +++ b/src/TracerContext.php @@ -0,0 +1,89 @@ + make(Tracer::class)); + } + + public static function setRoot(Span $root): Span + { + return Context::set(self::ROOT, $root); + } + + public static function getRoot(): ?Span + { + return self::getTracerRoot(Coroutine::id()); + } + + public static function setTraceId(string $traceId): string + { + return Context::set(self::TRACE_ID, $traceId); + } + + public static function getTraceId(): ?string + { + return Context::get(self::TRACE_ID) ?: null; + } + + private static function getTracerRoot(int $coroutineId): ?Span + { + /** @var null|Span $root */ + $root = Context::get('tracer.root', null, $coroutineId); + + if ($root instanceof Span) { + return $root; + } + + if ($coroutineId <= 1) { + return $root; + } + + try { + $parent_id = Coroutine::parentId($coroutineId); + } catch (CoroutineDestroyedException $exception) { + if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { + ApplicationContext::getContainer() + ->get(StdoutLoggerInterface::class) + ->warning($exception->getMessage()); + } + return null; + } + + return self::getTracerRoot($parent_id); + } +} diff --git a/src/TracerFactory.php b/src/TracerFactory.php index 1beeda4..e9562c7 100644 --- a/src/TracerFactory.php +++ b/src/TracerFactory.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace Hyperf\Tracer; use Exception; diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index e53cc3f..221c4ca 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -9,6 +9,7 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ + namespace HyperfTest\Tracer; use Exception; From dec05fd3aa3c86dca571bc07fdfd2ac4294d530b Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:19:34 -0300 Subject: [PATCH 22/27] fix HttpClientAspect duplicated spans (#25) --- src/Aspect/HttpClientAspect.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 19110f3..61f05e6 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -39,7 +39,6 @@ class HttpClientAspect extends AbstractAspect use ExceptionAppender; public array $classes = [ - Client::class . '::request', Client::class . '::requestAsync', ]; From 9722259d82baa43d29171806318c0753e6b911ae Mon Sep 17 00:00:00 2001 From: Luiz Manhani Date: Fri, 29 Aug 2025 14:06:33 -0300 Subject: [PATCH 23/27] remove file --- src/Adapter/NoOpTracerFactory.php | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/Adapter/NoOpTracerFactory.php diff --git a/src/Adapter/NoOpTracerFactory.php b/src/Adapter/NoOpTracerFactory.php deleted file mode 100644 index d97829d..0000000 --- a/src/Adapter/NoOpTracerFactory.php +++ /dev/null @@ -1,25 +0,0 @@ - Date: Fri, 29 Aug 2025 14:06:44 -0300 Subject: [PATCH 24/27] remove file --- src/Adapter/NoopTracerFactory.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Adapter/NoopTracerFactory.php b/src/Adapter/NoopTracerFactory.php index 10d45f0..d97829d 100644 --- a/src/Adapter/NoopTracerFactory.php +++ b/src/Adapter/NoopTracerFactory.php @@ -2,12 +2,12 @@ declare(strict_types=1); /** - * This file is part of Hyperf + OpenCodeCo + * This file is part of Hyperf. * - * @link https://opencodeco.dev + * @link https://www.hyperf.io * @document https://hyperf.wiki - * @contact leo@opencodeco.dev - * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE + * @contact group@hyperf.io + * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ namespace Hyperf\Tracer\Adapter; @@ -16,7 +16,7 @@ use OpenTracing\NoopTracer; use OpenTracing\Tracer; -class NoopTracerFactory implements NamedFactoryInterface +class NoOpTracerFactory implements NamedFactoryInterface { public function make(string $name): Tracer { From 3fbfdf1a27e178caa988bc02ddf74a04d38c9e25 Mon Sep 17 00:00:00 2001 From: Luiz Manhani Date: Fri, 29 Aug 2025 14:08:02 -0300 Subject: [PATCH 25/27] Revert "fix HttpClientAspect duplicated spans (#25)" This reverts commit dec05fd3aa3c86dca571bc07fdfd2ac4294d530b. --- src/Aspect/HttpClientAspect.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 61f05e6..19110f3 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -39,6 +39,7 @@ class HttpClientAspect extends AbstractAspect use ExceptionAppender; public array $classes = [ + Client::class . '::request', Client::class . '::requestAsync', ]; From 8531e80cc8dc690a6a5def1b84c7a836ff038bdb Mon Sep 17 00:00:00 2001 From: Luiz Manhani Date: Fri, 29 Aug 2025 14:08:06 -0300 Subject: [PATCH 26/27] Revert "Updating from main package (#24)" This reverts commit 00890fa68f8d1c7bf9974383ea3f15f7edde98a4. --- class_map/GlobalTracer.php | 59 ------- class_map/Map.php | 1 - class_map/ThriftUdpTransport.php | 2 +- composer.json | 28 ++-- publish/opentracing.php | 63 +------- src/Adapter/HttpClientFactory.php | 41 ++++- src/Adapter/NoopTracerFactory.php | 1 - src/Adapter/Reporter/HttpClientFactory.php | 117 -------------- src/Adapter/Reporter/Kafka.php | 69 -------- src/Adapter/Reporter/KafkaClientFactory.php | 147 ------------------ src/Adapter/Reporter/ReporterFactory.php | 53 ------- src/Adapter/ZipkinTracerFactory.php | 18 +-- src/Annotation/Trace.php | 1 - src/Aspect/CoroutineAspect.php | 73 --------- src/Aspect/CreateTraceContextAspect.php | 35 ----- src/Aspect/DbAspect.php | 10 +- ...archAspect.php => ElasticserachAspect.php} | 16 +- src/Aspect/GrpcAspect.php | 131 ---------------- src/Aspect/HttpClientAspect.php | 55 +++---- src/Aspect/JsonRpcAspect.php | 91 ++++++++++- src/Aspect/MethodAspect.php | 10 +- src/Aspect/RedisAspect.php | 10 +- src/Aspect/RpcAspect.php | 102 ------------ src/Aspect/TraceAnnotationAspect.php | 11 +- src/ConfigProvider.php | 13 -- src/Contract/NamedFactoryInterface.php | 5 +- src/Exception/ConnectionClosedException.php | 19 --- src/Exception/InvalidArgumentException.php | 1 - src/Exception/TimeoutException.php | 19 --- src/Listener/DbQueryExecutedListener.php | 4 +- src/Listener/RequestTraceListener.php | 124 --------------- src/Middleware/TraceMiddleware.php | 18 ++- src/SpanStarter.php | 59 +++++-- src/SpanTagManager.php | 6 - src/SpanTagManagerFactory.php | 1 - src/SwitchManager.php | 28 +--- src/SwitchManagerFactory.php | 1 - src/TracerContext.php | 89 ----------- src/TracerFactory.php | 1 - tests/TracerFactoryTest.php | 1 - 40 files changed, 254 insertions(+), 1279 deletions(-) delete mode 100644 class_map/GlobalTracer.php delete mode 100644 src/Adapter/Reporter/HttpClientFactory.php delete mode 100644 src/Adapter/Reporter/Kafka.php delete mode 100644 src/Adapter/Reporter/KafkaClientFactory.php delete mode 100644 src/Adapter/Reporter/ReporterFactory.php delete mode 100644 src/Aspect/CoroutineAspect.php delete mode 100644 src/Aspect/CreateTraceContextAspect.php rename src/Aspect/{ElasticsearchAspect.php => ElasticserachAspect.php} (72%) delete mode 100644 src/Aspect/GrpcAspect.php delete mode 100644 src/Aspect/RpcAspect.php delete mode 100644 src/Exception/ConnectionClosedException.php delete mode 100644 src/Exception/TimeoutException.php delete mode 100644 src/Listener/RequestTraceListener.php delete mode 100644 src/TracerContext.php diff --git a/class_map/GlobalTracer.php b/class_map/GlobalTracer.php deleted file mode 100644 index a66e13d..0000000 --- a/class_map/GlobalTracer.php +++ /dev/null @@ -1,59 +0,0 @@ -call($this); } catch (Throwable $e) { - $this->logger->error('ThriftUdpTransport error:' . $e->getMessage()); + $this->logger->error('ThriftUdpTransport error:' . $e->getMessage()); @socket_close($this->socket); $this->socket = null; break; diff --git a/composer.json b/composer.json index 9743217..5164859 100644 --- a/composer.json +++ b/composer.json @@ -11,23 +11,18 @@ ], "homepage": "https://hyperf.io", "support": { - "issues": "https://github.com/hyperf/hyperf/issues", - "source": "https://github.com/hyperf/hyperf", "docs": "https://hyperf.wiki", - "pull-request": "https://github.com/hyperf/hyperf/pulls" + "issues": "https://github.com/hyperf/hyperf/issues", + "pull-request": "https://github.com/hyperf/hyperf/pulls", + "source": "https://github.com/hyperf/hyperf" }, "require": { - "php": ">=8.1", - "hyperf/collection": "~3.1.0", - "hyperf/context": "~3.1.0", - "hyperf/contract": "~3.1.0", - "hyperf/coordinator": "~3.1.0", - "hyperf/coroutine": "~3.1.0", - "hyperf/di": "~3.1.0", - "hyperf/engine": "^2.0", - "hyperf/guzzle": "~3.1.0", - "hyperf/stringable": "~3.1.0", - "hyperf/support": "~3.1.0", + "php": ">=8.0", + "hyperf/contract": "^3.0", + "hyperf/di": "^3.0", + "hyperf/guzzle": "^3.0", + "hyperf/support": "^3.0", + "hyperf/utils": "^3.0", "jcchavezs/zipkin-opentracing": "^2.0", "jonahgeorge/jaeger-client-php": "^1.4", "opentracing/opentracing": "^1.0", @@ -45,8 +40,7 @@ }, "suggest": { "hyperf/event": "Required to use DbQueryExecutedListener.", - "jonahgeorge/jaeger-client-php": "Required (^0.6) to use jaeger tracing.", - "longlang/phpkafka": "Required (^1.2) to use Kafka Producer." + "jonahgeorge/jaeger-client-php": "Required (^0.6) to use jaeger tracing." }, "autoload": { "psr-4": { @@ -73,7 +67,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.0-dev" }, "hyperf": { "config": "Hyperf\\Tracer\\ConfigProvider" diff --git a/publish/opentracing.php b/publish/opentracing.php index 9944cfa..c81dfa7 100644 --- a/publish/opentracing.php +++ b/publish/opentracing.php @@ -9,34 +9,22 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ -use Hyperf\Tracer\Adapter\JaegerTracerFactory; -use Hyperf\Tracer\Adapter\NoopTracerFactory; -use Hyperf\Tracer\Adapter\Reporter\Kafka; -use Hyperf\Tracer\Adapter\ZipkinTracerFactory; -use Zipkin\Reporters\Http; -use Zipkin\Reporters\Noop; use Zipkin\Samplers\BinarySampler; use function Hyperf\Support\env; return [ - // To disable hyperf/opentracing temporarily, set default driver to noop. 'default' => env('TRACER_DRIVER', 'zipkin'), 'enable' => [ - 'coroutine' => env('TRACER_ENABLE_COROUTINE', false), - 'db' => env('TRACER_ENABLE_DB', false), - 'elasticserach' => env('TRACER_ENABLE_ELASTICSERACH', false), - 'exception' => env('TRACER_ENABLE_EXCEPTION', false), - 'grpc' => env('TRACER_ENABLE_GRPC', false), 'guzzle' => env('TRACER_ENABLE_GUZZLE', false), - 'method' => env('TRACER_ENABLE_METHOD', false), 'redis' => env('TRACER_ENABLE_REDIS', false), - 'rpc' => env('TRACER_ENABLE_RPC', false), - 'ignore_exceptions' => [], + 'db' => env('TRACER_ENABLE_DB', false), + 'method' => env('TRACER_ENABLE_METHOD', false), + 'exception' => env('TRACER_ENABLE_EXCEPTION', false), ], 'tracer' => [ 'zipkin' => [ - 'driver' => ZipkinTracerFactory::class, + 'driver' => Hyperf\Tracer\Adapter\ZipkinTracerFactory::class, 'app' => [ 'name' => env('APP_NAME', 'skeleton'), // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null @@ -44,39 +32,14 @@ 'ipv6' => null, 'port' => 9501, ], - 'reporter' => env('ZIPKIN_REPORTER', 'http'), // kafka, http - 'reporters' => [ - // options for http reporter - 'http' => [ - 'class' => Http::class, - 'constructor' => [ - 'options' => [ - 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), - 'timeout' => env('ZIPKIN_TIMEOUT', 1), - ], - ], - ], - // options for kafka reporter - 'kafka' => [ - 'class' => Kafka::class, - 'constructor' => [ - 'options' => [ - 'topic' => env('ZIPKIN_KAFKA_TOPIC', 'zipkin'), - 'bootstrap_servers' => env('ZIPKIN_KAFKA_BOOTSTRAP_SERVERS', '127.0.0.1:9092'), - 'acks' => (int) env('ZIPKIN_KAFKA_ACKS', -1), - 'connect_timeout' => (int) env('ZIPKIN_KAFKA_CONNECT_TIMEOUT', 1), - 'send_timeout' => (int) env('ZIPKIN_KAFKA_SEND_TIMEOUT', 1), - ], - ], - ], - 'noop' => [ - 'class' => Noop::class, - ], + 'options' => [ + 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), + 'timeout' => env('ZIPKIN_TIMEOUT', 1), ], 'sampler' => BinarySampler::createAsAlwaysSample(), ], 'jaeger' => [ - 'driver' => JaegerTracerFactory::class, + 'driver' => Hyperf\Tracer\Adapter\JaegerTracerFactory::class, 'name' => env('APP_NAME', 'skeleton'), 'options' => [ /* @@ -95,9 +58,6 @@ ], ], ], - 'noop' => [ - 'driver' => NoopTracerFactory::class, - ], ], 'tags' => [ 'http_client' => [ @@ -122,21 +82,14 @@ ], 'request' => [ 'path' => 'request.path', - 'uri' => 'request.uri', 'method' => 'request.method', 'header' => 'request.header', - // 'body' => 'request.body', ], 'coroutine' => [ 'id' => 'coroutine.id', ], 'response' => [ 'status_code' => 'response.status_code', - // 'body' => 'response.body', - ], - 'rpc' => [ - 'path' => 'rpc.path', - 'status' => 'rpc.status', ], ], ]; diff --git a/src/Adapter/HttpClientFactory.php b/src/Adapter/HttpClientFactory.php index fcb1716..2508b38 100644 --- a/src/Adapter/HttpClientFactory.php +++ b/src/Adapter/HttpClientFactory.php @@ -9,12 +9,43 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Adapter; -/** - * @deprecated v3.0, will remove in v3.1, use \Hyperf\Tracer\Adapter\Reporter\HttpClientFactory instead. - */ -class HttpClientFactory extends Reporter\HttpClientFactory +use Hyperf\Guzzle\ClientFactory as GuzzleClientFactory; +use RuntimeException; +use Zipkin\Reporters\Http\ClientFactory; + +class HttpClientFactory implements ClientFactory { + public function __construct(private GuzzleClientFactory $guzzleClientFactory) + { + } + + public function build(array $options): callable + { + return function (string $payload) use ($options): void { + $url = $options['endpoint_url']; + unset($options['endpoint_url']); + $client = $this->guzzleClientFactory->create($options); + $additionalHeaders = $options['headers'] ?? []; + $requiredHeaders = [ + 'Content-Type' => 'application/json', + 'Content-Length' => strlen($payload), + 'b3' => '0', + ]; + $headers = array_merge($additionalHeaders, $requiredHeaders); + $response = $client->post($url, [ + 'body' => $payload, + 'headers' => $headers, + // If 'no_aspect' option is true, then the HttpClientAspect will not modify the client options. + 'no_aspect' => true, + ]); + $statusCode = $response->getStatusCode(); + if ($statusCode !== 202) { + throw new RuntimeException( + sprintf('Reporting of spans failed, status code %d', $statusCode) + ); + } + }; + } } diff --git a/src/Adapter/NoopTracerFactory.php b/src/Adapter/NoopTracerFactory.php index d97829d..840b395 100644 --- a/src/Adapter/NoopTracerFactory.php +++ b/src/Adapter/NoopTracerFactory.php @@ -9,7 +9,6 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ - namespace Hyperf\Tracer\Adapter; use Hyperf\Tracer\Contract\NamedFactoryInterface; diff --git a/src/Adapter/Reporter/HttpClientFactory.php b/src/Adapter/Reporter/HttpClientFactory.php deleted file mode 100644 index 9a0db1f..0000000 --- a/src/Adapter/Reporter/HttpClientFactory.php +++ /dev/null @@ -1,117 +0,0 @@ -loop(); - - return function (string $payload) use ($options): void { - $chan = $this->chan; - $clientFactory = $this->clientFactory; - - $chan->push(static function () use ($payload, $options, $clientFactory) { - $url = $options['endpoint_url']; - unset($options['endpoint_url']); - $client = $clientFactory->create($options); - $additionalHeaders = $options['headers'] ?? []; - $requiredHeaders = [ - 'Content-Type' => 'application/json', - 'Content-Length' => strlen($payload), - 'b3' => '0', - ]; - $headers = array_merge($additionalHeaders, $requiredHeaders); - $response = $client->post($url, [ - 'body' => $payload, - 'headers' => $headers, - // If 'no_aspect' option is true, then the HttpClientAspect will not modify the client options. - 'no_aspect' => true, - ]); - $statusCode = $response->getStatusCode(); - if (! in_array($statusCode, [200, 202])) { - throw new RuntimeException( - sprintf('Reporting of spans failed, status code %d', $statusCode) - ); - } - }); - - if ($chan->isClosing()) { - throw new RuntimeException('Connection closed.'); - } - }; - } - - public function close(): void - { - $chan = $this->chan; - $this->chan = null; - - $chan?->close(); - } - - protected function loop(): void - { - if ($this->chan != null) { - return; - } - - $this->chan = new Channel($this->channelSize); - - Coroutine::create(function () { - while (true) { - while (true) { - /** @var null|Closure $closure */ - $closure = $this->chan?->pop(); - if (! $closure) { - break 2; - } - try { - $closure(); - } catch (Throwable) { - break; - } finally { - $closure = null; - } - } - } - - $this->close(); - }); - - Coroutine::create(function () { - if (CoordinatorManager::until(Constants::WORKER_EXIT)->yield()) { - $this->close(); - } - }); - } -} diff --git a/src/Adapter/Reporter/Kafka.php b/src/Adapter/Reporter/Kafka.php deleted file mode 100644 index 2b7b613..0000000 --- a/src/Adapter/Reporter/Kafka.php +++ /dev/null @@ -1,69 +0,0 @@ -serializer = $serializer ?? new JsonV2Serializer(); - $this->logger = $logger ?? new NullLogger(); - } - - /** - * @param array|Span[] $spans - */ - public function report(array $spans): void - { - if (count($spans) === 0) { - return; - } - - $payload = $this->serializer->serialize($spans); - - if (! $payload) { - $this->logger->error( - sprintf('failed to encode spans with code %d', json_last_error()) - ); - return; - } - - $client = $this->clientFactory->build($this->options); - - try { - $client($payload); - } catch (Throwable $e) { - $this->logger->error(sprintf('failed to report spans: %s', $e->getMessage())); - } - } -} diff --git a/src/Adapter/Reporter/KafkaClientFactory.php b/src/Adapter/Reporter/KafkaClientFactory.php deleted file mode 100644 index 00ccc9a..0000000 --- a/src/Adapter/Reporter/KafkaClientFactory.php +++ /dev/null @@ -1,147 +0,0 @@ -options = $options; - if (isset($options['channel_size'])) { - $this->channelSize = (int) $options['channel_size']; - } - - $this->loop(); - - return function (string $payload) use ($options): void { - $topic = $options['topic'] ?? 'zipkin'; - $key = $options['key'] ?? uniqid('', true); - $headers = $options['headers'] ?? []; - $partitionIndex = $options['partition_index'] ?? null; - $chan = $this->chan; - - $chan->push(function () use ($topic, $key, $payload, $headers, $partitionIndex) { - try { - $this->producer->send($topic, $payload, $key, $headers, $partitionIndex); - } catch (Throwable $e) { - throw $e; - } - }); - - if ($chan->isClosing()) { - throw new ConnectionClosedException('Connection closed.'); - } - }; - } - - public function close(): void - { - $chan = $this->chan; - $producer = $this->producer; - $this->chan = null; - $this->producer = null; - - $chan?->close(); - $producer?->close(); - } - - protected function loop(): void - { - if ($this->chan != null) { - return; - } - - $this->chan = new Channel($this->channelSize); - - Coroutine::create(function () { - while (true) { - $this->producer = $this->makeProducer(); - while (true) { - /** @var null|Closure $closure */ - $closure = $this->chan?->pop(); - if (! $closure) { - break 2; - } - try { - $closure->call($this); - } catch (Throwable) { - try { - $this->producer->close(); - } catch (Throwable) { - } - break; - } finally { - $closure = null; - } - } - } - - $this->close(); - }); - - Coroutine::create(function () { - if (CoordinatorManager::until(Constants::WORKER_EXIT)->yield()) { - while (! $this->chan->isEmpty()) { - msleep(100); - } - $this->close(); - } - }); - } - - protected function makeProducer(): Producer - { - $options = array_replace([ - 'bootstrap_servers' => '127.0.0.1:9092', - 'acks' => -1, - 'connect_timeout' => 1, - 'send_timeout' => 1, - ], $this->options); - $config = new ProducerConfig(); - - $config->setBootstrapServer($options['bootstrap_servers']); - $config->setUpdateBrokers(true); - if (is_int($options['acks'])) { - $config->setAcks($options['acks']); - } - if (is_float($options['connect_timeout'])) { - $config->setConnectTimeout($options['connect_timeout']); - } - if (is_float($options['send_timeout'])) { - $config->setSendTimeout($options['send_timeout']); - } - - return new Producer($config); - } -} diff --git a/src/Adapter/Reporter/ReporterFactory.php b/src/Adapter/Reporter/ReporterFactory.php deleted file mode 100644 index e0d5e78..0000000 --- a/src/Adapter/Reporter/ReporterFactory.php +++ /dev/null @@ -1,53 +0,0 @@ -container->get(HttpClientFactory::class); - } - - if ($this->container->has(StdoutLoggerInterface::class)) { - $constructor['logger'] = $this->container->get(StdoutLoggerInterface::class); - } - - return make($class, $constructor); - } -} diff --git a/src/Adapter/ZipkinTracerFactory.php b/src/Adapter/ZipkinTracerFactory.php index 43b54b5..aa76791 100644 --- a/src/Adapter/ZipkinTracerFactory.php +++ b/src/Adapter/ZipkinTracerFactory.php @@ -9,11 +9,9 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Adapter; use Hyperf\Contract\ConfigInterface; -use Hyperf\Tracer\Adapter\Reporter\ReporterFactory; use Hyperf\Tracer\Contract\NamedFactoryInterface; use Zipkin\Endpoint; use Zipkin\Reporters\Http; @@ -27,16 +25,16 @@ class ZipkinTracerFactory implements NamedFactoryInterface private string $name = ''; - public function __construct(private ConfigInterface $config, private ReporterFactory $reportFactory) + public function __construct(private ConfigInterface $config, private HttpClientFactory $clientFactory) { } public function make(string $name): \OpenTracing\Tracer { $this->name = $name; - [$app, $sampler, $reporterOption] = $this->parseConfig(); + [$app, $options, $sampler] = $this->parseConfig(); $endpoint = Endpoint::create($app['name'], $app['ipv4'], $app['ipv6'], $app['port']); - $reporter = $this->reportFactory->make($reporterOption); + $reporter = new Http($options, $this->clientFactory); $tracing = TracingBuilder::create() ->havingLocalEndpoint($endpoint) ->havingSampler($sampler) @@ -48,7 +46,6 @@ public function make(string $name): \OpenTracing\Tracer private function parseConfig(): array { // @TODO Detect the ipv4, ipv6, port from server object or system info automatically. - $reporter = (string) $this->getConfig('reporter', 'http'); return [ $this->getConfig('app', [ 'name' => 'skeleton', @@ -56,13 +53,10 @@ private function parseConfig(): array 'ipv6' => null, 'port' => 9501, ]), - $this->getConfig('sampler', BinarySampler::createAsAlwaysSample()), - $this->getConfig('reporters.' . $reporter, [ - 'class' => Http::class, - 'constructor' => [ - 'options' => $this->getConfig('options', []), - ], + $this->getConfig('options', [ + 'timeout' => 1, ]), + $this->getConfig('sampler', BinarySampler::createAsAlwaysSample()), ]; } diff --git a/src/Annotation/Trace.php b/src/Annotation/Trace.php index 4aea6c7..80aee39 100644 --- a/src/Annotation/Trace.php +++ b/src/Annotation/Trace.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Annotation; use Attribute; diff --git a/src/Aspect/CoroutineAspect.php b/src/Aspect/CoroutineAspect.php deleted file mode 100644 index a6054dd..0000000 --- a/src/Aspect/CoroutineAspect.php +++ /dev/null @@ -1,73 +0,0 @@ -switchManager->isEnabled('coroutine')) { - return $proceedingJoinPoint->process(); - } - - $callable = $proceedingJoinPoint->arguments['keys']['callable']; - $root = TracerContext::getRoot(); - - $proceedingJoinPoint->arguments['keys']['callable'] = function () use ($callable, $root) { - try { - if ($root instanceof Span) { - $tracer = TracerContext::getTracer(); - $child = $tracer->startSpan('coroutine', [ - 'child_of' => $root->getContext(), - ]); - if ($this->spanTagManager->has('coroutine', 'id')) { - $child->setTag($this->spanTagManager->get('coroutine', 'id'), Co::id()); - } - TracerContext::setRoot($child); - Co::defer(function () use ($child, $tracer) { - $child->finish(); - $tracer->flush(); - }); - } - - $callable(); - } catch (Throwable $e) { - if (isset($child) && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $child->setTag('error', true); - $child->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } - - throw $e; - } - }; - - return $proceedingJoinPoint->process(); - } -} diff --git a/src/Aspect/CreateTraceContextAspect.php b/src/Aspect/CreateTraceContextAspect.php deleted file mode 100644 index b2ceb87..0000000 --- a/src/Aspect/CreateTraceContextAspect.php +++ /dev/null @@ -1,35 +0,0 @@ -process(); - if ($traceContext instanceof TraceContext) { - TracerContext::setTraceId($traceContext->getTraceId()); - } - return $traceContext; - } -} diff --git a/src/Aspect/DbAspect.php b/src/Aspect/DbAspect.php index 66aff61..661f01a 100644 --- a/src/Aspect/DbAspect.php +++ b/src/Aspect/DbAspect.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use Hyperf\DB\DB; @@ -18,6 +17,7 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; +use OpenTracing\Tracer; use Throwable; class DbAspect extends AbstractAspect @@ -28,7 +28,7 @@ class DbAspect extends AbstractAspect DB::class . '::__call', ]; - public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -47,10 +47,8 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); throw $e; } finally { $span->finish(); diff --git a/src/Aspect/ElasticsearchAspect.php b/src/Aspect/ElasticserachAspect.php similarity index 72% rename from src/Aspect/ElasticsearchAspect.php rename to src/Aspect/ElasticserachAspect.php index b050719..22c6761 100644 --- a/src/Aspect/ElasticsearchAspect.php +++ b/src/Aspect/ElasticserachAspect.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use Elasticsearch\Client; @@ -18,9 +17,10 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; +use OpenTracing\Tracer; use Throwable; -class ElasticsearchAspect extends AbstractAspect +class ElasticserachAspect extends AbstractAspect { use SpanStarter; @@ -40,7 +40,7 @@ class ElasticsearchAspect extends AbstractAspect Client::class . '::search', ]; - public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -49,19 +49,13 @@ public function __construct(private SwitchManager $switchManager, private SpanTa */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { - if ($this->switchManager->isEnabled('elasticserach') === false) { - return $proceedingJoinPoint->process(); - } - $key = $proceedingJoinPoint->className . '::' . $proceedingJoinPoint->methodName; $span = $this->startSpan($key); try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); throw $e; } finally { $span->finish(); diff --git a/src/Aspect/GrpcAspect.php b/src/Aspect/GrpcAspect.php deleted file mode 100644 index c18159f..0000000 --- a/src/Aspect/GrpcAspect.php +++ /dev/null @@ -1,131 +0,0 @@ -switchManager = $container->get(SwitchManager::class); - $this->spanTagManager = $container->get(SpanTagManager::class); - $this->context = $container->get(Context::class); - } - - public function process(ProceedingJoinPoint $proceedingJoinPoint) - { - if (! $this->switchManager->isEnabled('grpc')) { - return $proceedingJoinPoint->process(); - } - - return match ($proceedingJoinPoint->methodName) { - 'send' => $this->processSend($proceedingJoinPoint), - 'recv' => $this->processRecv($proceedingJoinPoint), - default => $proceedingJoinPoint->process(), - }; - } - - private function processSend(ProceedingJoinPoint $proceedingJoinPoint) - { - $arguments = $proceedingJoinPoint->getArguments(); - /** @var Request $request */ - $request = $arguments[0]; - $key = "GRPC send [{$request->path}]"; - $span = $this->startSpan($key); - $carrier = []; - // Injects the context into the wire - TracerContext::getTracer()->inject( - $span->getContext(), - TEXT_MAP, - $carrier - ); - - // Merge tracer info - $request->headers = array_merge($request->headers, $carrier); - if ($this->spanTagManager->has('grpc', 'request.header')) { - foreach ($request->headers as $key => $value) { - $span->setTag($this->spanTagManager->get('grpc', 'request.header') . '.' . $key, $value); - } - } - - $this->context->set('tracer.carrier', $carrier); - CT::set('tracer.span.' . static::class, $span); - - try { - return $proceedingJoinPoint->process(); - } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } - throw $e; - } - } - - private function processRecv(ProceedingJoinPoint $proceedingJoinPoint) - { - /** @var null|Span $span */ - $span = CT::get('tracer.span.' . static::class); - - try { - /** @var bool|Response $result */ - $result = $proceedingJoinPoint->process(); - if ($result instanceof Response) { - if ($this->spanTagManager->has('grpc', 'response.header')) { - foreach ($result->headers as $key => $value) { - $span?->setTag($this->spanTagManager->get('grpc', 'response.header') . '.' . $key, $value); - } - } - } - } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e::class)) { - $span?->setTag('error', true); - $span?->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } - throw $e; - } finally { - $span?->finish(); - } - - return $result; - } -} diff --git a/src/Aspect/HttpClientAspect.php b/src/Aspect/HttpClientAspect.php index 19110f3..9109da6 100644 --- a/src/Aspect/HttpClientAspect.php +++ b/src/Aspect/HttpClientAspect.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use GuzzleHttp\Client; @@ -17,7 +16,7 @@ use GuzzleHttp\Promise\Create; use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7\Uri; -use Hyperf\Di\Aop\AbstractAspect; +use Hyperf\Di\Aop\AroundInterface; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Di\Exception\Exception; use Hyperf\Tracer\ExceptionAppender; @@ -25,7 +24,6 @@ use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\Support\Uri as SupportUri; use Hyperf\Tracer\SwitchManager; -use Hyperf\Tracer\TracerContext; use OpenTracing\Span; use OpenTracing\Tracer; use Psr\Http\Message\ResponseInterface; @@ -33,22 +31,29 @@ use const OpenTracing\Formats\TEXT_MAP; -class HttpClientAspect extends AbstractAspect +class HttpClientAspect implements AroundInterface { use SpanStarter; use ExceptionAppender; - public array $classes = [ - Client::class . '::request', - Client::class . '::requestAsync', - ]; + public array $classes = [Client::class . '::requestAsync']; + + public array $annotations = []; + + private Tracer $tracer; + + private SpanTagManager $spanTagManager; - public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(Tracer $tracer, private SwitchManager $switchManager, SpanTagManager $spanTagManager) { + $this->tracer = $tracer; + $this->spanTagManager = $spanTagManager; } /** * @return mixed return the value from process method of ProceedingJoinPoint, or the value that you handled + * @throws Exception + * @throws Throwable */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { @@ -91,7 +96,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) } $appendHeaders = []; // Injects the context into the wire - TracerContext::getTracer()->inject( + $this->tracer->inject( $span->getContext(), TEXT_MAP, $appendHeaders @@ -101,25 +106,13 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $this->appendCustomSpan($span, $options); - try { - $result = $proceedingJoinPoint->process(); - if ($result instanceof PromiseInterface) { - $result->then( - $this->onFullFilled($span, $options), - $this->onRejected($span, $options) - ); - } elseif ($result instanceof ResponseInterface) { - $this->onFullFilled($span, $options)($result); - } - } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } - throw $e; - } finally { - $span->finish(); - } + /** @var PromiseInterface $result */ + $result = $proceedingJoinPoint->process(); + $result->then( + $this->onFullFilled($span, $options), + $this->onRejected($span, $options) + ); + $span->finish(); return $result; } @@ -139,7 +132,7 @@ private function onFullFilled(Span $span, array $options): callable return function (ResponseInterface $response) use ($span, $options) { $span->setTag( $this->spanTagManager->get('http_client', 'http.status_code'), - (string) $response->getStatusCode() + $response->getStatusCode() ); $span->setTag('otel.status_code', 'OK'); @@ -156,7 +149,7 @@ private function onRejected(Span $span, array $options): callable $span->setTag( $this->spanTagManager->get('http_client', 'http.status_code'), - (string) $exception->getResponse()->getStatusCode() + $exception->getResponse()->getStatusCode() ); $this->appendCustomResponseSpan($span, $options, $exception->getResponse()); diff --git a/src/Aspect/JsonRpcAspect.php b/src/Aspect/JsonRpcAspect.php index 9412225..4f14d97 100644 --- a/src/Aspect/JsonRpcAspect.php +++ b/src/Aspect/JsonRpcAspect.php @@ -9,12 +9,93 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; -/** - * @deprecated since v3.0, will be removed in v3.1. - */ -class JsonRpcAspect extends RpcAspect +use Hyperf\Context\Context as CT; +use Hyperf\Di\Aop\AbstractAspect; +use Hyperf\Di\Aop\ProceedingJoinPoint; +use Hyperf\Rpc\Context; +use Hyperf\RpcClient\AbstractServiceClient; +use Hyperf\RpcClient\Client; +use Hyperf\Tracer\SpanStarter; +use Hyperf\Tracer\SpanTagManager; +use Hyperf\Tracer\SwitchManager; +use OpenTracing\Span; +use OpenTracing\Tracer; +use Psr\Container\ContainerInterface; +use Throwable; + +use const OpenTracing\Formats\TEXT_MAP; + +class JsonRpcAspect extends AbstractAspect { + use SpanStarter; + + public array $classes = [ + AbstractServiceClient::class . '::__generateRpcPath', + Client::class . '::send', + ]; + + private Tracer $tracer; + + private SwitchManager $switchManager; + + private SpanTagManager $spanTagManager; + + private Context $context; + + public function __construct(private ContainerInterface $container) + { + $this->tracer = $container->get(Tracer::class); + $this->switchManager = $container->get(SwitchManager::class); + $this->spanTagManager = $container->get(SpanTagManager::class); + $this->context = $container->get(Context::class); + } + + public function process(ProceedingJoinPoint $proceedingJoinPoint) + { + $result = []; + if ($proceedingJoinPoint->methodName === '__generateRpcPath') { + $path = $proceedingJoinPoint->process(); + $key = "JsonRPC send [{$path}]"; + $span = $this->startSpan($key); + if ($this->spanTagManager->has('rpc', 'path')) { + $span->setTag($this->spanTagManager->get('rpc', 'path'), $path); + } + $carrier = []; + // Injects the context into the wire + $this->tracer->inject( + $span->getContext(), + TEXT_MAP, + $carrier + ); + $this->context->set('tracer.carrier', $carrier); + CT::set('tracer.span.' . static::class, $span); + return $path; + } + + if ($proceedingJoinPoint->methodName === 'send') { + try { + $result = $proceedingJoinPoint->process(); + } catch (Throwable $e) { + if ($span = CT::get('tracer.span.' . static::class)) { + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); + CT::set('tracer.span.' . static::class, $span); + } + throw $e; + } finally { + /** @var Span $span */ + if ($span = CT::get('tracer.span.' . static::class)) { + if ($this->spanTagManager->has('rpc', 'status')) { + $span->setTag($this->spanTagManager->get('rpc', 'status'), isset($result['result']) ? 'OK' : 'Failed'); + } + $span->finish(); + } + } + + return $result; + } + return $proceedingJoinPoint->process(); + } } diff --git a/src/Aspect/MethodAspect.php b/src/Aspect/MethodAspect.php index c9aa8a2..c196fe9 100644 --- a/src/Aspect/MethodAspect.php +++ b/src/Aspect/MethodAspect.php @@ -9,13 +9,13 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SwitchManager; +use OpenTracing\Tracer; use Throwable; class MethodAspect extends AbstractAspect @@ -26,7 +26,7 @@ class MethodAspect extends AbstractAspect 'App*', ]; - public function __construct(private SwitchManager $switchManager) + public function __construct(private Tracer $tracer, private SwitchManager $switchManager) { } @@ -44,10 +44,8 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); throw $e; } finally { $span->finish(); diff --git a/src/Aspect/RedisAspect.php b/src/Aspect/RedisAspect.php index 7cbb5c0..ce42059 100644 --- a/src/Aspect/RedisAspect.php +++ b/src/Aspect/RedisAspect.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; @@ -18,6 +17,7 @@ use Hyperf\Tracer\SpanStarter; use Hyperf\Tracer\SpanTagManager; use Hyperf\Tracer\SwitchManager; +use OpenTracing\Tracer; use Throwable; class RedisAspect extends AbstractAspect @@ -28,7 +28,7 @@ class RedisAspect extends AbstractAspect Redis::class . '::__call', ]; - public function __construct(private SwitchManager $switchManager, private SpanTagManager $spanTagManager) + public function __construct(private Tracer $tracer, private SwitchManager $switchManager, private SpanTagManager $spanTagManager) { } @@ -48,10 +48,8 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $result = $proceedingJoinPoint->process(); $span->setTag($this->spanTagManager->get('redis', 'result'), json_encode($result, JSON_THROW_ON_ERROR)); } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); throw $e; } finally { $span->finish(); diff --git a/src/Aspect/RpcAspect.php b/src/Aspect/RpcAspect.php deleted file mode 100644 index 074a8e6..0000000 --- a/src/Aspect/RpcAspect.php +++ /dev/null @@ -1,102 +0,0 @@ -switchManager = $container->get(SwitchManager::class); - $this->spanTagManager = $container->get(SpanTagManager::class); - $this->context = $container->get(Context::class); - } - - public function process(ProceedingJoinPoint $proceedingJoinPoint) - { - if (static::class == self::class && $this->switchManager->isEnabled('rpc') === false) { - return $proceedingJoinPoint->process(); - } - - if ($proceedingJoinPoint->methodName === '__generateRpcPath') { - $path = $proceedingJoinPoint->process(); - $key = "RPC send [{$path}]"; - $span = $this->startSpan($key); - if ($this->spanTagManager->has('rpc', 'path')) { - $span->setTag($this->spanTagManager->get('rpc', 'path'), $path); - } - $carrier = []; - // Injects the context into the wire - TracerContext::getTracer()->inject( - $span->getContext(), - TEXT_MAP, - $carrier - ); - $this->context->set('tracer.carrier', $carrier); - CT::set('tracer.span.' . static::class, $span); - return $path; - } - - if ($proceedingJoinPoint->methodName === 'send') { - try { - $result = $proceedingJoinPoint->process(); - } catch (Throwable $e) { - if (($span = CT::get('tracer.span.' . static::class)) && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - CT::set('tracer.span.' . static::class, $span); - } - throw $e; - } finally { - /** @var Span $span */ - if ($span = CT::get('tracer.span.' . static::class)) { - if ($this->spanTagManager->has('rpc', 'status')) { - $span->setTag($this->spanTagManager->get('rpc', 'status'), isset($result['result']) ? 'OK' : 'Failed'); - } - $span->finish(); - } - } - - return $result; - } - return $proceedingJoinPoint->process(); - } -} diff --git a/src/Aspect/TraceAnnotationAspect.php b/src/Aspect/TraceAnnotationAspect.php index 226dc35..7936f16 100644 --- a/src/Aspect/TraceAnnotationAspect.php +++ b/src/Aspect/TraceAnnotationAspect.php @@ -9,14 +9,13 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Aspect; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Tracer\Annotation\Trace; use Hyperf\Tracer\SpanStarter; -use Hyperf\Tracer\SwitchManager; +use OpenTracing\Tracer; use Throwable; class TraceAnnotationAspect extends AbstractAspect @@ -27,7 +26,7 @@ class TraceAnnotationAspect extends AbstractAspect Trace::class, ]; - public function __construct(private SwitchManager $switchManager) + public function __construct(private Tracer $tracer) { } @@ -51,10 +50,8 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) try { $result = $proceedingJoinPoint->process(); } catch (Throwable $e) { - if ($this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($e)) { - $span->setTag('error', true); - $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); - } + $span->setTag('error', true); + $span->log(['message', $e->getMessage(), 'code' => $e->getCode(), 'stacktrace' => $e->getTraceAsString()]); throw $e; } finally { $span->finish(); diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index cf20577..aa06d5d 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,24 +9,17 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; use GuzzleHttp\Client; -use Hyperf\Tracer\Aspect\CoroutineAspect; -use Hyperf\Tracer\Aspect\CreateTraceContextAspect; -use Hyperf\Tracer\Aspect\ElasticsearchAspect; -use Hyperf\Tracer\Aspect\GrpcAspect; use Hyperf\Tracer\Aspect\HttpClientAspect; use Hyperf\Tracer\Aspect\MongoCollectionAspect; use Hyperf\Tracer\Aspect\RedisAspect; -use Hyperf\Tracer\Aspect\RpcAspect; use Hyperf\Tracer\Aspect\TraceAnnotationAspect; use Hyperf\Tracer\Listener\DbQueryExecutedListener; use Hyperf\Tracer\Middleware\TraceMiddleware; use Jaeger\SpanContext; use Jaeger\ThriftUdpTransport; -use OpenTracing\GlobalTracer; use OpenTracing\Tracer; use Zipkin\Propagation\Map; use Jaeger\Codec\TextCodec; @@ -51,7 +44,6 @@ public function __invoke(): array 'annotations' => [ 'scan' => [ 'class_map' => [ - GlobalTracer::class => __DIR__ . '/../class_map/GlobalTracer.php', Map::class => __DIR__ . '/../class_map/Map.php', ThriftUdpTransport::class => __DIR__ . '/../class_map/ThriftUdpTransport.php', SpanContext::class => __DIR__ . '/../class_map/SpanContext.php', @@ -60,13 +52,8 @@ public function __invoke(): array ], ], 'aspects' => [ - CoroutineAspect::class, - CreateTraceContextAspect::class, - ElasticsearchAspect::class, - GrpcAspect::class, HttpClientAspect::class, RedisAspect::class, - RpcAspect::class, TraceAnnotationAspect::class, MongoCollectionAspect::class, ], diff --git a/src/Contract/NamedFactoryInterface.php b/src/Contract/NamedFactoryInterface.php index 9bd6222..12f33f2 100644 --- a/src/Contract/NamedFactoryInterface.php +++ b/src/Contract/NamedFactoryInterface.php @@ -9,15 +9,12 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer\Contract; -use OpenTracing\Tracer; - interface NamedFactoryInterface { /** * Create the object from factory. */ - public function make(string $name): Tracer; + public function make(string $name): \OpenTracing\Tracer; } diff --git a/src/Exception/ConnectionClosedException.php b/src/Exception/ConnectionClosedException.php deleted file mode 100644 index 79f53b1..0000000 --- a/src/Exception/ConnectionClosedException.php +++ /dev/null @@ -1,19 +0,0 @@ - $this->handleRequestReceived($event), - RequestHandled::class => $this->handleRequestHandled($event), - RequestTerminated::class => $this->handleRequestTerminated($event), - default => '', // fix phpstan error - }; - } - - protected function handleRequestReceived(RequestReceived $event): void - { - $this->buildSpan($event->request); - } - - protected function handleRequestHandled(RequestHandled $event): void - { - if ($event->response instanceof ResponsePlusInterface && $traceId = TracerContext::getTraceId()) { - $event->response->addHeader('Trace-Id', $traceId); - } - } - - protected function handleRequestTerminated(RequestTerminated $event): void - { - $response = $event->response; - - if (! $response) { - return; - } - - $tracer = TracerContext::getTracer(); - $span = TracerContext::getRoot(); - $span->setTag($this->spanTagManager->get('response', 'status_code'), (string) $response->getStatusCode()); - if ($this->spanTagManager->has('response', 'body')) { - $span->setTag($this->spanTagManager->get('response', 'body'), (string) $response->getBody()); - } - - if ($event->exception && $this->switchManager->isEnabled('exception') && ! $this->switchManager->isIgnoreException($event->exception)) { - $this->appendExceptionToSpan($span, $exception = $event->exception); - - if ($exception instanceof HttpException) { - $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode()); - if ($this->spanTagManager->has('response', 'body')) { - $span->setTag($this->spanTagManager->get('response', 'body'), (string) $response->getBody()); - } - } - } - - $span->finish(); - $tracer->flush(); - } - - protected function appendExceptionToSpan(Span $span, Throwable $exception): void - { - $span->setTag('error', true); - $span->setTag($this->spanTagManager->get('exception', 'class'), get_class($exception)); - $span->setTag($this->spanTagManager->get('exception', 'code'), (string) $exception->getCode()); - $span->setTag($this->spanTagManager->get('exception', 'message'), $exception->getMessage()); - $span->setTag($this->spanTagManager->get('exception', 'stack_trace'), (string) $exception); - } - - protected function buildSpan(ServerRequestInterface $request): Span - { - $uri = $request->getUri(); - $span = $this->startSpan(sprintf('request: %s %s', $request->getMethod(), $uri->getPath())); - $span->setTag($this->spanTagManager->get('coroutine', 'id'), (string) Coroutine::id()); - $span->setTag($this->spanTagManager->get('request', 'path'), (string) $uri->getPath()); - $span->setTag($this->spanTagManager->get('request', 'method'), $request->getMethod()); - $span->setTag($this->spanTagManager->get('request', 'uri'), (string) $uri); - if ($this->spanTagManager->has('request', 'body')) { - $span->setTag($this->spanTagManager->get('request', 'body'), (string) $request->getBody()); - } - foreach ($request->getHeaders() as $key => $value) { - $span->setTag($this->spanTagManager->get('request', 'header') . '.' . $key, implode(', ', $value)); - } - return $span; - } -} diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index 334f779..f1612d0 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -1,4 +1,8 @@ tracer = $tracer; $this->spanTagManager = $spanTagManager; $this->config = $config->get('opentracing'); } @@ -68,12 +74,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface if (! empty($this->config['ignore_path']) && preg_match($this->config['ignore_path'], $request->getUri()->getPath())) { return $handler->handle($request); } - $tracer = TracerContext::getTracer(); + $span = $this->buildSpan($request); - defer(function () use($tracer){ + defer(function () { try { - $tracer->flush(); + $this->tracer->flush(); } catch (Throwable $exception) { if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { ApplicationContext::getContainer() @@ -90,7 +96,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface } catch (Throwable $exception) { $this->switchManager->isEnabled('exception') && $this->appendExceptionToSpan($span, $exception); if ($exception instanceof HttpException) { - $span->setTag($this->spanTagManager->get('response', 'status_code'), (string) $exception->getStatusCode()); + $span->setTag($this->spanTagManager->get('response', 'status_code'), $exception->getStatusCode()); } $this->appendCustomExceptionSpan($span, $exception); throw $exception; diff --git a/src/SpanStarter.php b/src/SpanStarter.php index 5b04689..964d626 100644 --- a/src/SpanStarter.php +++ b/src/SpanStarter.php @@ -9,12 +9,14 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; +use Hyperf\Context\ApplicationContext; +use Hyperf\Context\Context; +use Hyperf\Contract\StdoutLoggerInterface; +use Hyperf\Coroutine\Coroutine; +use Hyperf\Engine\Exception\CoroutineDestroyedException; use Hyperf\Tracer\Support\Uuid; -use Hyperf\Context\RequestContext; -use Hyperf\Rpc; use OpenTracing\Span; use Psr\Http\Message\ServerRequestInterface; @@ -32,39 +34,66 @@ protected function startSpan( array $option = [], string $kind = SPAN_KIND_RPC_CLIENT ): Span { - $root = TracerContext::getRoot(); - $tracer = TracerContext::getTracer(); + $root = $this->getTracerRoot(Coroutine::id()); if (! $root instanceof Span) { - $request = RequestContext::getOrNull(); + /** @var ServerRequestInterface $request */ + $request = Context::get(ServerRequestInterface::class); if (! $request instanceof ServerRequestInterface) { - // If the request object is absent, we are probably in a commandLine context. + // If the request object is absent, we are probably in a commandline context. // Throwing an exception is unnecessary. - $root = $tracer->startSpan($name, $option); + $root = $this->tracer->startSpan($name, $option); $root->setTag(SPAN_KIND, $kind); - TracerContext::setRoot($root); + Context::set('tracer.root', $root); return $root; } $carrier = array_map(static fn ($header) => $header[0], $request->getHeaders()); // Extracts the context from the HTTP headers. - $spanContext = $tracer->extract(TEXT_MAP, $carrier); + $spanContext = $this->tracer->extract(TEXT_MAP, $carrier); if ($spanContext) { $option['child_of'] = $spanContext; } - $root = $tracer->startSpan($name, $option); + $root = $this->tracer->startSpan($name, $option); $root->setTag(SPAN_KIND, $kind); - if ($spanContext === null && !empty($correlationId = $request->getHeaderLine('X-Request-ID'))) { - $root->getContext()->setTraceId((string)Uuid::asInt($correlationId)); + if ($spanContext === null && ! empty($correlationId = $request->getHeaderLine('X-Request-ID'))) { + $root->getContext()->setTraceId((string) Uuid::asInt($correlationId)); } - TracerContext::setRoot($root); + Context::set('tracer.root', $root); return $root; } $option['child_of'] = $root->getContext(); - $child = $tracer->startSpan($name, $option); + $child = $this->tracer->startSpan($name, $option); $child->setTag(SPAN_KIND, $kind); $child->setTag('parent.name', $root->getOperationName()); return $child; } + + public function getTracerRoot(int $coroutineId): ?Span + { + /** @var null|Span $root */ + $root = Context::get('tracer.root', null, $coroutineId); + + if ($root instanceof Span) { + return $root; + } + + if ($coroutineId <= 1) { + return $root; + } + + try { + $parent_id = Coroutine::parentId($coroutineId); + } catch (CoroutineDestroyedException $exception) { + if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { + ApplicationContext::getContainer() + ->get(StdoutLoggerInterface::class) + ->warning($exception->getMessage()); + } + return null; + } + + return $this->getTracerRoot($parent_id); + } } diff --git a/src/SpanTagManager.php b/src/SpanTagManager.php index be740e7..27faf55 100644 --- a/src/SpanTagManager.php +++ b/src/SpanTagManager.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; class SpanTagManager @@ -20,10 +19,6 @@ class SpanTagManager 'http.method' => 'http.method', 'http.status_code' => 'http.status_code', ], - 'grpc' => [ - 'request.header' => 'grpc.request.header', - 'response.header' => 'grpc.response.header', - ], 'redis' => [ 'arguments' => 'db.arguments', 'result' => 'db.result', @@ -45,7 +40,6 @@ class SpanTagManager ], 'request' => [ 'path' => 'request.path', - 'uri' => 'request.uri', 'method' => 'request.method', 'header' => 'request.header', ], diff --git a/src/SpanTagManagerFactory.php b/src/SpanTagManagerFactory.php index e863bf5..54ecedd 100644 --- a/src/SpanTagManagerFactory.php +++ b/src/SpanTagManagerFactory.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; use Hyperf\Contract\ConfigInterface; diff --git a/src/SwitchManager.php b/src/SwitchManager.php index 7db6404..26738d7 100644 --- a/src/SwitchManager.php +++ b/src/SwitchManager.php @@ -9,19 +9,11 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; -use Hyperf\Context\Context; -use OpenTracing\Span; -use Throwable; - class SwitchManager { - /** - * @var array - */ - private $config + private array $config = [ 'guzzle' => false, 'redis' => false, @@ -29,7 +21,6 @@ class SwitchManager // beta feature, please don't enable 'method' in production environment 'method' => false, 'error' => false, - 'ignore_exceptions' => [], ]; /** @@ -45,21 +36,6 @@ public function apply(array $config): void */ public function isEnabled(string $identifier): bool { - if (! isset($this->config[$identifier])) { - return false; - } - - return $this->config[$identifier] && Context::get('tracer.root') instanceof Span; - } - - public function isIgnoreException(string|Throwable $exception): bool - { - $ignoreExceptions = $this->config['ignore_exceptions'] ?? []; - foreach ($ignoreExceptions as $ignoreException) { - if (is_a($exception, $ignoreException, true)) { - return true; - } - } - return false; + return $this->config[$identifier] ?? false; } } diff --git a/src/SwitchManagerFactory.php b/src/SwitchManagerFactory.php index 38c7395..0396ae9 100644 --- a/src/SwitchManagerFactory.php +++ b/src/SwitchManagerFactory.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; use Hyperf\Contract\ConfigInterface; diff --git a/src/TracerContext.php b/src/TracerContext.php deleted file mode 100644 index d86f713..0000000 --- a/src/TracerContext.php +++ /dev/null @@ -1,89 +0,0 @@ - make(Tracer::class)); - } - - public static function setRoot(Span $root): Span - { - return Context::set(self::ROOT, $root); - } - - public static function getRoot(): ?Span - { - return self::getTracerRoot(Coroutine::id()); - } - - public static function setTraceId(string $traceId): string - { - return Context::set(self::TRACE_ID, $traceId); - } - - public static function getTraceId(): ?string - { - return Context::get(self::TRACE_ID) ?: null; - } - - private static function getTracerRoot(int $coroutineId): ?Span - { - /** @var null|Span $root */ - $root = Context::get('tracer.root', null, $coroutineId); - - if ($root instanceof Span) { - return $root; - } - - if ($coroutineId <= 1) { - return $root; - } - - try { - $parent_id = Coroutine::parentId($coroutineId); - } catch (CoroutineDestroyedException $exception) { - if (ApplicationContext::hasContainer() && ApplicationContext::getContainer()->has(StdoutLoggerInterface::class)) { - ApplicationContext::getContainer() - ->get(StdoutLoggerInterface::class) - ->warning($exception->getMessage()); - } - return null; - } - - return self::getTracerRoot($parent_id); - } -} diff --git a/src/TracerFactory.php b/src/TracerFactory.php index e9562c7..1beeda4 100644 --- a/src/TracerFactory.php +++ b/src/TracerFactory.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace Hyperf\Tracer; use Exception; diff --git a/tests/TracerFactoryTest.php b/tests/TracerFactoryTest.php index 221c4ca..e53cc3f 100644 --- a/tests/TracerFactoryTest.php +++ b/tests/TracerFactoryTest.php @@ -9,7 +9,6 @@ * @contact leo@opencodeco.dev * @license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE */ - namespace HyperfTest\Tracer; use Exception; From 11701d33651dc53555717a3abf1df3bb07be9557 Mon Sep 17 00:00:00 2001 From: Luiz Manhani Date: Fri, 29 Aug 2025 14:08:58 -0300 Subject: [PATCH 27/27] fix noop file --- src/Adapter/NoopTracerFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapter/NoopTracerFactory.php b/src/Adapter/NoopTracerFactory.php index 840b395..cc8f113 100644 --- a/src/Adapter/NoopTracerFactory.php +++ b/src/Adapter/NoopTracerFactory.php @@ -15,7 +15,7 @@ use OpenTracing\NoopTracer; use OpenTracing\Tracer; -class NoOpTracerFactory implements NamedFactoryInterface +class NoopTracerFactory implements NamedFactoryInterface { public function make(string $name): Tracer {