From ba8a50c0591c14a63947bda81915988fb03067fe Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 28 Jan 2023 03:41:24 +0100 Subject: fix: Throw `NotFoundExceptionInterface` to fulfill PSR container interface if class not found Signed-off-by: Ferdinand Thiessen --- lib/public/AppFramework/QueryException.php | 2 +- lib/public/IContainer.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/public') diff --git a/lib/public/AppFramework/QueryException.php b/lib/public/AppFramework/QueryException.php index 3b73c92e7be..c525ddd8033 100644 --- a/lib/public/AppFramework/QueryException.php +++ b/lib/public/AppFramework/QueryException.php @@ -32,7 +32,7 @@ use Psr\Container\ContainerExceptionInterface; /** * Class QueryException * - * The class extends `NotFoundExceptionInterface` since 20.0.0 + * The class extends `ContainerExceptionInterface` since 20.0.0 * * @since 8.1.0 * @deprecated 20.0.0 catch \Psr\Container\ContainerExceptionInterface diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php index 86595e1e8f7..b27ddabb8e2 100644 --- a/lib/public/IContainer.php +++ b/lib/public/IContainer.php @@ -33,6 +33,7 @@ use Closure; use OCP\AppFramework\QueryException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; +use Psr\Container\NotFoundExceptionInterface; /** * Class IContainer @@ -70,6 +71,7 @@ interface IContainer extends ContainerInterface { * @return mixed * @psalm-return ($name is class-string ? T : mixed) * @throws ContainerExceptionInterface if the query could not be resolved + * @throws NotFoundExceptionInterface if the name could not be found within the container * @throws QueryException if the query could not be resolved * @since 6.0.0 * @deprecated 20.0.0 use \Psr\Container\ContainerInterface::get -- cgit v1.2.3