From 884fd92f1320d17daebb772297da03fb2cfa59b8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 1 Oct 2024 16:00:34 +0300 Subject: drop opentelemetry --- .../ClassInstantiationFailedException.php | 14 ------ .../src/Exception/DiscoveryFailedException.php | 51 ---------------------- .../src/Exception/NoCandidateFoundException.php | 47 -------------------- .../discovery/src/Exception/NotFoundException.php | 16 ------- .../src/Exception/PuliUnavailableException.php | 12 ----- .../src/Exception/StrategyUnavailableException.php | 15 ------- 6 files changed, 155 deletions(-) delete mode 100644 vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php delete mode 100644 vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php delete mode 100644 vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php delete mode 100644 vendor/php-http/discovery/src/Exception/NotFoundException.php delete mode 100644 vendor/php-http/discovery/src/Exception/PuliUnavailableException.php delete mode 100644 vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php (limited to 'vendor/php-http/discovery/src/Exception') diff --git a/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php b/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php deleted file mode 100644 index e95bf5d82..000000000 --- a/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -final class ClassInstantiationFailedException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php b/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php deleted file mode 100644 index 304b7276e..000000000 --- a/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -final class DiscoveryFailedException extends \Exception implements Exception -{ - /** - * @var \Exception[] - */ - private $exceptions; - - /** - * @param string $message - * @param \Exception[] $exceptions - */ - public function __construct($message, array $exceptions = []) - { - $this->exceptions = $exceptions; - - parent::__construct($message); - } - - /** - * @param \Exception[] $exceptions - */ - public static function create($exceptions) - { - $message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors'; - foreach ($exceptions as $e) { - $message .= "\n - ".$e->getMessage(); - } - $message .= "\n\n"; - - return new self($message, $exceptions); - } - - /** - * @return \Exception[] - */ - public function getExceptions() - { - return $this->exceptions; - } -} diff --git a/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php b/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php deleted file mode 100644 index 32f65db7b..000000000 --- a/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class NoCandidateFoundException extends \Exception implements Exception -{ - /** - * @param string $strategy - */ - public function __construct($strategy, array $candidates) - { - $classes = array_map( - function ($a) { - return $a['class']; - }, - $candidates - ); - - $message = sprintf( - 'No valid candidate found using strategy "%s". We tested the following candidates: %s.', - $strategy, - implode(', ', array_map([$this, 'stringify'], $classes)) - ); - - parent::__construct($message); - } - - private function stringify($mixed) - { - if (is_string($mixed)) { - return $mixed; - } - - if (is_array($mixed) && 2 === count($mixed)) { - return sprintf('%s::%s', $this->stringify($mixed[0]), $mixed[1]); - } - - return is_object($mixed) ? get_class($mixed) : gettype($mixed); - } -} diff --git a/vendor/php-http/discovery/src/Exception/NotFoundException.php b/vendor/php-http/discovery/src/Exception/NotFoundException.php deleted file mode 100644 index ef8b9c584..000000000 --- a/vendor/php-http/discovery/src/Exception/NotFoundException.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -/* final */ class NotFoundException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php b/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php deleted file mode 100644 index a6ade7332..000000000 --- a/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -final class PuliUnavailableException extends StrategyUnavailableException -{ -} diff --git a/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php b/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php deleted file mode 100644 index 89ecf3523..000000000 --- a/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -class StrategyUnavailableException extends \RuntimeException implements Exception -{ -} -- cgit v1.2.3-54-g00ecf