From c2cf6eef3b6c6bcf8a35e8d5cd95aaa6dacf29fb Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Thu, 27 Feb 2020 14:01:56 +0000 Subject: [PATCH 1/3] Fix year validation - Correct item class not being selected for min and max year validation. --- app/Validators/Parameters.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Validators/Parameters.php b/app/Validators/Parameters.php index 4b298649..b4d8df83 100644 --- a/app/Validators/Parameters.php +++ b/app/Validators/Parameters.php @@ -3,7 +3,8 @@ namespace App\Validators; -use App\ResourceTypeItem\Factory; +use App\ResourceTypeItem\Factory as ResourceTypeItemFactory; +use App\Item\Factory as ItemFactory; use App\Models\Category; use App\Models\ResourceType; use App\Models\Subcategory; @@ -29,6 +30,7 @@ class Parameters private static function find(array $parameter_names = []) { $request_parameters = request()->all(); + self::$parameters = []; foreach ($parameter_names as $parameter) { @@ -139,13 +141,13 @@ private static function validate(?int $resource_type_id, ?int $resource_id) $max_year_limit = intval(Date('Y')); if ($resource_type_id !== null && $resource_id === null) { - $item_interface = Factory::item($resource_type_id); + $item_interface = ResourceTypeItemFactory::item($resource_type_id); $min_year_limit = $item_interface->conditionalParameterMinYear($resource_type_id); $max_year_limit = $item_interface->conditionalParameterMaxYear($resource_type_id); } if ($resource_type_id !== null && $resource_id !== null) { - $item_interface = Factory::item($resource_type_id); + $item_interface = ItemFactory::item($resource_type_id); $min_year_limit = $item_interface->conditionalParameterMinYear($resource_id); $max_year_limit = $item_interface->conditionalParameterMaxYear($resource_id); } From f34720dac0c86c6cc04bb31b613d32ffb15a4129 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Thu, 27 Feb 2020 14:02:18 +0000 Subject: [PATCH 2/3] Corrected logo link - Link incorrect for logo --- resources/views/welcome.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 3ab3f33a..c6dd999d 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -31,7 +31,7 @@
From e1a5312990edcf84be87fdc1369a05490163b218 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Thu, 27 Feb 2020 14:14:28 +0000 Subject: [PATCH 3/3] v2.08.1 - Updated the CHANGELOG. - Set the new version and release date. --- CHANGELOG.md | 5 +++++ config/api/app/version.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96cc20da..62388ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/ +## [v2.08.1] - 2020-02-27 +### Fixed +- Select the correct year when validating the min and max year for year validation. +- The logo on the welcome page will redirect you to the API, not the app dashboard. + ## [v2.08.0] - 2020-02-26 ### Added - We have added a new item type, `simple item`. We intend that the 'simple item' type is useful for managing collections. The API will now allow you to list, add, edit and delete them. diff --git a/config/api/app/version.php b/config/api/app/version.php index 4ff45c95..95ce3cbf 100644 --- a/config/api/app/version.php +++ b/config/api/app/version.php @@ -3,9 +3,9 @@ declare(strict_types=1); return [ - 'version'=> '2.08.0', + 'version'=> '2.08.1', 'prefix' => 'v2', - 'release_date' => '2020-02-26', + 'release_date' => '2020-02-27', 'changelog' => [ 'api' => '/v2/changelog', 'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md'