From edaf999bf522c3f08b4ddd1065128e13ae83420b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 7 Jan 2023 17:09:53 +0100 Subject: [PATCH] Fixed constant assignment on enum which is not valid for PHP 8.1 --- module/Core/src/Util/RedirectStatus.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/module/Core/src/Util/RedirectStatus.php b/module/Core/src/Util/RedirectStatus.php index a36719d2..76c047f4 100644 --- a/module/Core/src/Util/RedirectStatus.php +++ b/module/Core/src/Util/RedirectStatus.php @@ -2,16 +2,14 @@ namespace Shlinkio\Shlink\Core\Util; -use Fig\Http\Message\StatusCodeInterface; - use function Functional\contains; enum RedirectStatus: int { - case STATUS_301 = StatusCodeInterface::STATUS_MOVED_PERMANENTLY; - case STATUS_302 = StatusCodeInterface::STATUS_FOUND; - case STATUS_307 = StatusCodeInterface::STATUS_TEMPORARY_REDIRECT; - case STATUS_308 = StatusCodeInterface::STATUS_PERMANENT_REDIRECT; + case STATUS_301 = 301; // StatusCodeInterface::STATUS_MOVED_PERMANENTLY; + case STATUS_302 = 302; // StatusCodeInterface::STATUS_FOUND; + case STATUS_307 = 307; // StatusCodeInterface::STATUS_TEMPORARY_REDIRECT; + case STATUS_308 = 308; // StatusCodeInterface::STATUS_PERMANENT_REDIRECT; public function allowsCache(): bool {