diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2023-01-28 03:41:24 +0100 |
---|---|---|
committer | Ferdinand Thiessen <rpm@fthiessen.de> | 2023-02-06 14:16:35 +0100 |
commit | ba8a50c0591c14a63947bda81915988fb03067fe (patch) | |
tree | 2656c23a7201bfd7d2b6440af3a3f527a7e3ade0 /lib/public | |
parent | 3473b69ad2df1862225cbdff884cf94996f554fc (diff) | |
download | nextcloud-server-ba8a50c0591c14a63947bda81915988fb03067fe.tar.gz nextcloud-server-ba8a50c0591c14a63947bda81915988fb03067fe.zip |
fix: Throw `NotFoundExceptionInterface` to fulfill PSR container interface if class not found
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/AppFramework/QueryException.php | 2 | ||||
-rw-r--r-- | lib/public/IContainer.php | 2 |
2 files changed, 3 insertions, 1 deletions
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 |