From 884fd92f1320d17daebb772297da03fb2cfa59b8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 1 Oct 2024 16:00:34 +0300 Subject: drop opentelemetry --- .../context/FiberBoundContextStorage.php | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 vendor/open-telemetry/context/FiberBoundContextStorage.php (limited to 'vendor/open-telemetry/context/FiberBoundContextStorage.php') diff --git a/vendor/open-telemetry/context/FiberBoundContextStorage.php b/vendor/open-telemetry/context/FiberBoundContextStorage.php deleted file mode 100644 index 667f73b3d..000000000 --- a/vendor/open-telemetry/context/FiberBoundContextStorage.php +++ /dev/null @@ -1,84 +0,0 @@ -storage = $storage; - } - - public function fork($id): void - { - $this->storage->fork($id); - } - - public function switch($id): void - { - $this->storage->switch($id); - } - - public function destroy($id): void - { - $this->storage->destroy($id); - } - - public function scope(): ?ContextStorageScopeInterface - { - $this->checkFiberMismatch(); - - if (($scope = $this->storage->scope()) === null) { - return null; - } - - return new FiberBoundContextStorageScope($scope); - } - - public function current(): ContextInterface - { - $this->checkFiberMismatch(); - - return $this->storage->current(); - } - - public function attach(ContextInterface $context): ContextStorageScopeInterface - { - $scope = $this->storage->attach($context); - assert(class_exists(Fiber::class, false)); - $scope[Fiber::class] = Fiber::getCurrent(); - - return new FiberBoundContextStorageScope($scope); - } - - private function checkFiberMismatch(): void - { - $scope = $this->storage->scope(); - assert(class_exists(Fiber::class, false)); - if ($scope && $scope[Fiber::class] !== Fiber::getCurrent()) { - trigger_error('Fiber context switching not supported', E_USER_WARNING); - } - } -} -- cgit v1.2.3-54-g00ecf