aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception')
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php72
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php25
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php24
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php26
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php19
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php34
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php100
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php21
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php41
-rw-r--r--srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php67
14 files changed, 509 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
new file mode 100644
index 0000000..c203b85
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
@@ -0,0 +1,72 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Thrown when a definition cannot be autowired.
+ */
+class AutowiringFailedException extends RuntimeException
+{
+ private $serviceId;
+ private $messageCallback;
+
+ public function __construct(string $serviceId, $message = '', int $code = 0, \Throwable $previous = null)
+ {
+ $this->serviceId = $serviceId;
+
+ if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) {
+ $message = $message();
+ }
+
+ if (!$message instanceof \Closure) {
+ parent::__construct($message, $code, $previous);
+
+ return;
+ }
+
+ $this->messageCallback = $message;
+ parent::__construct('', $code, $previous);
+
+ $this->message = new class($this->message, $this->messageCallback) {
+ private $message;
+ private $messageCallback;
+
+ public function __construct(&$message, &$messageCallback)
+ {
+ $this->message = &$message;
+ $this->messageCallback = &$messageCallback;
+ }
+
+ public function __toString(): string
+ {
+ $messageCallback = $this->messageCallback;
+ $this->messageCallback = null;
+
+ try {
+ return $this->message = $messageCallback();
+ } catch (\Throwable $e) {
+ return $this->message = $e->getMessage();
+ }
+ }
+ };
+ }
+
+ public function getMessageCallback(): ?\Closure
+ {
+ return $this->messageCallback;
+ }
+
+ public function getServiceId()
+ {
+ return $this->serviceId;
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
new file mode 100644
index 0000000..959238e
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base BadMethodCallException for Dependency Injection component.
+ */
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
new file mode 100644
index 0000000..04ac848
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception is thrown when an environment variable is not found.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+class EnvNotFoundException extends InvalidArgumentException
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
new file mode 100644
index 0000000..48b5e48
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
@@ -0,0 +1,25 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception wraps exceptions whose messages contain a reference to an env parameter.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+class EnvParameterException extends InvalidArgumentException
+{
+ public function __construct(array $envs, \Throwable $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
+ {
+ parent::__construct(sprintf($message, implode('", "', $envs)), 0, $previous);
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..6202df7
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+use Psr\Container\ContainerExceptionInterface;
+
+/**
+ * Base ExceptionInterface for Dependency Injection component.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
+ */
+interface ExceptionInterface extends ContainerExceptionInterface, \Throwable
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..119bb7d
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base InvalidArgumentException for Dependency Injection component.
+ *
+ * @author Bulat Shakirzyanov <bulat@theopenskyproject.com>
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php
new file mode 100644
index 0000000..206561f
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Thrown when trying to inject a parameter into a constructor/method with an incompatible type.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ * @author Julien Maulny <jmaulny@darkmira.fr>
+ */
+class InvalidParameterTypeException extends InvalidArgumentException
+{
+ public function __construct(string $serviceId, string $type, \ReflectionParameter $parameter)
+ {
+ parent::__construct(sprintf('Invalid definition for service "%s": argument %d of "%s::%s" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $parameter->getDeclaringClass()->getName(), $parameter->getDeclaringFunction()->getName(), $parameter->getType()->getName(), $type));
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php
new file mode 100644
index 0000000..17a070c
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/LogicException.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base LogicException for Dependency Injection component.
+ */
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
new file mode 100644
index 0000000..a61f143
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base OutOfBoundsException for Dependency Injection component.
+ */
+class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
new file mode 100644
index 0000000..2450ccb
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception is thrown when a circular reference in a parameter is detected.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class ParameterCircularReferenceException extends RuntimeException
+{
+ private $parameters;
+
+ public function __construct(array $parameters, \Throwable $previous = null)
+ {
+ parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous);
+
+ $this->parameters = $parameters;
+ }
+
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
new file mode 100644
index 0000000..7c0c5e3
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
@@ -0,0 +1,100 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+use Psr\Container\NotFoundExceptionInterface;
+
+/**
+ * This exception is thrown when a non-existent parameter is used.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class ParameterNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
+{
+ private $key;
+ private $sourceId;
+ private $sourceKey;
+ private $alternatives;
+ private $nonNestedAlternative;
+
+ /**
+ * @param string $key The requested parameter key
+ * @param string $sourceId The service id that references the non-existent parameter
+ * @param string $sourceKey The parameter key that references the non-existent parameter
+ * @param \Throwable $previous The previous exception
+ * @param string[] $alternatives Some parameter name alternatives
+ * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters
+ */
+ public function __construct(string $key, string $sourceId = null, string $sourceKey = null, \Throwable $previous = null, array $alternatives = [], string $nonNestedAlternative = null)
+ {
+ $this->key = $key;
+ $this->sourceId = $sourceId;
+ $this->sourceKey = $sourceKey;
+ $this->alternatives = $alternatives;
+ $this->nonNestedAlternative = $nonNestedAlternative;
+
+ parent::__construct('', 0, $previous);
+
+ $this->updateRepr();
+ }
+
+ public function updateRepr()
+ {
+ if (null !== $this->sourceId) {
+ $this->message = sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key);
+ } elseif (null !== $this->sourceKey) {
+ $this->message = sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key);
+ } else {
+ $this->message = sprintf('You have requested a non-existent parameter "%s".', $this->key);
+ }
+
+ if ($this->alternatives) {
+ if (1 == \count($this->alternatives)) {
+ $this->message .= ' Did you mean this: "';
+ } else {
+ $this->message .= ' Did you mean one of these: "';
+ }
+ $this->message .= implode('", "', $this->alternatives).'"?';
+ } elseif (null !== $this->nonNestedAlternative) {
+ $this->message .= ' You cannot access nested array items, do you want to inject "'.$this->nonNestedAlternative.'" instead?';
+ }
+ }
+
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ public function getSourceId()
+ {
+ return $this->sourceId;
+ }
+
+ public function getSourceKey()
+ {
+ return $this->sourceKey;
+ }
+
+ public function setSourceId($sourceId)
+ {
+ $this->sourceId = $sourceId;
+
+ $this->updateRepr();
+ }
+
+ public function setSourceKey($sourceKey)
+ {
+ $this->sourceKey = $sourceKey;
+
+ $this->updateRepr();
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php
new file mode 100644
index 0000000..5c24541
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/RuntimeException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base RuntimeException for Dependency Injection component.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
new file mode 100644
index 0000000..a38671b
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception is thrown when a circular reference is detected.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class ServiceCircularReferenceException extends RuntimeException
+{
+ private $serviceId;
+ private $path;
+
+ public function __construct(string $serviceId, array $path, \Throwable $previous = null)
+ {
+ parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous);
+
+ $this->serviceId = $serviceId;
+ $this->path = $path;
+ }
+
+ public function getServiceId()
+ {
+ return $this->serviceId;
+ }
+
+ public function getPath()
+ {
+ return $this->path;
+ }
+}
diff --git a/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
new file mode 100644
index 0000000..f91afae
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
@@ -0,0 +1,67 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+use Psr\Container\NotFoundExceptionInterface;
+
+/**
+ * This exception is thrown when a non-existent service is requested.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
+{
+ private $id;
+ private $sourceId;
+ private $alternatives;
+
+ public function __construct(string $id, string $sourceId = null, \Throwable $previous = null, array $alternatives = [], string $msg = null)
+ {
+ if (null !== $msg) {
+ // no-op
+ } elseif (null === $sourceId) {
+ $msg = sprintf('You have requested a non-existent service "%s".', $id);
+ } else {
+ $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id);
+ }
+
+ if ($alternatives) {
+ if (1 == \count($alternatives)) {
+ $msg .= ' Did you mean this: "';
+ } else {
+ $msg .= ' Did you mean one of these: "';
+ }
+ $msg .= implode('", "', $alternatives).'"?';
+ }
+
+ parent::__construct($msg, 0, $previous);
+
+ $this->id = $id;
+ $this->sourceId = $sourceId;
+ $this->alternatives = $alternatives;
+ }
+
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ public function getSourceId()
+ {
+ return $this->sourceId;
+ }
+
+ public function getAlternatives()
+ {
+ return $this->alternatives;
+ }
+}