From f041f14ac5ac17daaf039f291d6e16d6251c7015 Mon Sep 17 00:00:00 2001 From: Mauro Bonfietti Date: Sun, 5 Sep 2021 16:12:28 -0300 Subject: [PATCH 1/2] Rollback + Fix Test + Update API Version. --- src/Controller/Home.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/Home.php b/src/Controller/Home.php index cf5b95c..4fac159 100644 --- a/src/Controller/Home.php +++ b/src/Controller/Home.php @@ -11,9 +11,9 @@ final class Home { - private const API_NAME = $_ENV['API_NAME']; + private const API_NAME = 'slim4-api-skeleton'; - private const API_VERSION = $_ENV['API_VERSION']; + private const API_VERSION = '0.37.0'; private Container $container; From 81886dd409174c50ed661a98805214e556541276 Mon Sep 17 00:00:00 2001 From: Mauro Bonfietti Date: Sun, 5 Sep 2021 16:14:40 -0300 Subject: [PATCH 2/2] Cleaning and minor changes. --- .env.example | 4 -- src/Helper/JsonResponse.php | 2 +- src/Helper/StatusCodeInterface.php | 75 ------------------------------ tests/integration/HomeTest.php | 2 +- 4 files changed, 2 insertions(+), 81 deletions(-) delete mode 100644 src/Helper/StatusCodeInterface.php diff --git a/.env.example b/.env.example index 5247bef..637a2a7 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,3 @@ -API_NAME='slim4-api-skeleton' -API_VERSION='0.1.0' -API_ENV='development' - DB_HOST='127.0.0.1' DB_NAME='slim4_api_skeleton' DB_USER='root' diff --git a/src/Helper/JsonResponse.php b/src/Helper/JsonResponse.php index 257d972..a6cfa69 100644 --- a/src/Helper/JsonResponse.php +++ b/src/Helper/JsonResponse.php @@ -4,8 +4,8 @@ namespace App\Helper; +use Fig\Http\Message\StatusCodeInterface; use Psr\Http\Message\ResponseInterface as Response; -use App\Helper\StatusCodeInterface; final class JsonResponse { diff --git a/src/Helper/StatusCodeInterface.php b/src/Helper/StatusCodeInterface.php deleted file mode 100644 index 41a91c1..0000000 --- a/src/Helper/StatusCodeInterface.php +++ /dev/null @@ -1,75 +0,0 @@ -