diff --git a/module/Core/src/Exception/ValidationException.php b/module/Core/src/Exception/ValidationException.php index 510a31b0..eea23a5a 100644 --- a/module/Core/src/Exception/ValidationException.php +++ b/module/Core/src/Exception/ValidationException.php @@ -17,7 +17,7 @@ use function sprintf; use const PHP_EOL; -class ValidationException extends RuntimeException implements ProblemDetailsExceptionInterface +class ValidationException extends InvalidArgumentException implements ProblemDetailsExceptionInterface { use CommonProblemDetailsExceptionTrait; diff --git a/module/Core/src/Service/UrlShortener.php b/module/Core/src/Service/UrlShortener.php index 0e4062ec..70112bd7 100644 --- a/module/Core/src/Service/UrlShortener.php +++ b/module/Core/src/Service/UrlShortener.php @@ -130,6 +130,7 @@ class UrlShortener implements UrlShortenerInterface /** * @throws ShortUrlNotFoundException + * @fixme Move this method to a different service */ public function shortCodeToUrl(string $shortCode, ?string $domain = null): ShortUrl { diff --git a/module/Rest/src/Authentication/Plugin/AuthorizationHeaderPlugin.php b/module/Rest/src/Authentication/Plugin/AuthorizationHeaderPlugin.php index e5280ac6..d479d9d3 100644 --- a/module/Rest/src/Authentication/Plugin/AuthorizationHeaderPlugin.php +++ b/module/Rest/src/Authentication/Plugin/AuthorizationHeaderPlugin.php @@ -16,6 +16,7 @@ use function explode; use function sprintf; use function strtolower; +/** @deprecated */ class AuthorizationHeaderPlugin implements AuthenticationPluginInterface { public const HEADER_NAME = 'Authorization'; diff --git a/module/Rest/src/Util/RestUtils.php b/module/Rest/src/Util/RestUtils.php index 3f4f1161..6e2b77f0 100644 --- a/module/Rest/src/Util/RestUtils.php +++ b/module/Rest/src/Util/RestUtils.php @@ -22,14 +22,14 @@ class RestUtils /** @deprecated */ public const INVALID_SLUG_ERROR = Core\NonUniqueSlugException::TYPE; /** @deprecated */ + public const NOT_FOUND_ERROR = Core\TagNotFoundException::TYPE; + /** @deprecated */ + public const UNKNOWN_ERROR = 'UNKNOWN_ERROR'; + public const INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS'; public const INVALID_AUTH_TOKEN_ERROR = 'INVALID_AUTH_TOKEN'; public const INVALID_AUTHORIZATION_ERROR = 'INVALID_AUTHORIZATION'; public const INVALID_API_KEY_ERROR = 'INVALID_API_KEY'; - /** @deprecated */ - public const NOT_FOUND_ERROR = Core\TagNotFoundException::TYPE; - /** @deprecated */ - public const UNKNOWN_ERROR = 'UNKNOWN_ERROR'; /** @deprecated */ public static function getRestErrorCodeFromException(Throwable $e): string