From 2f4daf495e2cb57de7cfec821e7043d302bb4395 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Wed, 17 Jun 2020 00:29:23 +0100 Subject: [PATCH] Typed properties - Return typed propertis - Set version. - Update the chaneglogs --- CHANGELOG.md | 9 ++++++++- app/Request/Parameter/Filter.php | 2 +- app/Request/Parameter/Request.php | 2 +- app/Request/Parameter/Search.php | 2 +- app/Request/Parameter/Sort.php | 2 +- app/Response/Cache/Key.php | 2 +- app/Response/Header/Header.php | 5 +---- app/Response/Header/Headers.php | 2 +- app/Rules/ResourceTypeName.php | 5 +++-- app/Utilities/Hash.php | 2 +- config/api/app/version.php | 4 ++-- resources/views/welcome.blade.php | 4 ++++ 12 files changed, 25 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dfae054..e89878bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/ -## [2.11.1] - 2020-06-16 +## [v2.11.2] - 2020-06-17 +### Changed +- We have split calls to clear public and private cache keys. +- We only clear public cache keys when modifying a public resource type. +- We have updated the web.config; the web.config file was referring to PHP7.3. +- Added removed class type hints now that we are running PHP7.4. + +## [v2.11.1] - 2020-06-16 ### Added - We have added an application cache for collections; we include the ETag header however we are not yet returning a 304. diff --git a/app/Request/Parameter/Filter.php b/app/Request/Parameter/Filter.php index b5fbf85a..0c44d517 100644 --- a/app/Request/Parameter/Filter.php +++ b/app/Request/Parameter/Filter.php @@ -15,7 +15,7 @@ */ class Filter { - private static $parameters = []; + private static array $parameters = []; /** * Check the URI for the filter parameter, if the format is valid split the diff --git a/app/Request/Parameter/Request.php b/app/Request/Parameter/Request.php index 17bf8e05..50056128 100644 --- a/app/Request/Parameter/Request.php +++ b/app/Request/Parameter/Request.php @@ -20,7 +20,7 @@ */ class Request { - private static $parameters = []; + private static array $parameters = []; /** * Fetch any GET parameters from the URI and alter the type if necessary diff --git a/app/Request/Parameter/Search.php b/app/Request/Parameter/Search.php index c0e461b4..9c365463 100644 --- a/app/Request/Parameter/Search.php +++ b/app/Request/Parameter/Search.php @@ -12,7 +12,7 @@ */ class Search { - private static $fields = []; + private static array $fields = []; /** * Check the URI for the search parameter, if the format is valid split the diff --git a/app/Request/Parameter/Sort.php b/app/Request/Parameter/Sort.php index ad354431..14a69e95 100644 --- a/app/Request/Parameter/Sort.php +++ b/app/Request/Parameter/Sort.php @@ -12,7 +12,7 @@ */ class Sort { - private static $fields = []; + private static array $fields = []; /** * Check the URI for the sort parameter, if the format is valid split the diff --git a/app/Response/Cache/Key.php b/app/Response/Cache/Key.php index b9fc3286..570aca90 100644 --- a/app/Response/Cache/Key.php +++ b/app/Response/Cache/Key.php @@ -7,7 +7,7 @@ class Key { - private $hash; + private Hash $hash; public function __construct() { diff --git a/app/Response/Header/Header.php b/app/Response/Header/Header.php index af71002c..0e8d5634 100644 --- a/app/Response/Header/Header.php +++ b/app/Response/Header/Header.php @@ -16,10 +16,7 @@ */ class Header { - /** - * @var array - */ - private $headers; + private array $headers; public function __construct() { diff --git a/app/Response/Header/Headers.php b/app/Response/Header/Headers.php index 2b4fdb09..efad4046 100644 --- a/app/Response/Header/Headers.php +++ b/app/Response/Header/Headers.php @@ -13,7 +13,7 @@ */ class Headers { - private $headers; + private Header $headers; public function __construct() { diff --git a/app/Rules/ResourceTypeName.php b/app/Rules/ResourceTypeName.php index c989004d..77992679 100644 --- a/app/Rules/ResourceTypeName.php +++ b/app/Rules/ResourceTypeName.php @@ -1,4 +1,5 @@ '2.11.1', + 'version'=> '2.11.2', 'prefix' => 'v2', - 'release_date' => '2020-06-16', + 'release_date' => '2020-06-17', 'changelog' => [ 'api' => '/v2/changelog', 'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md' diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index f5986c60..5b40986b 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -241,6 +241,10 @@ function gtag(){dataLayer.push(arguments);}
  • We have moved our `RoutePermission` utility class; the `Permission` class sits inside the `App\Request` namespace.
  • We have moved and simplified our `Parameter` classes; the `Parameter` classes sit inside the `App\Request` namespace.
  • We have moved and renamed the `RequestUtility` class; the `BodyValidation` class sits in the `App\Request` namespace.
  • +
  • We have split calls to clear public and private cache keys.
  • +
  • We only clear public cache keys when modifying a public resource type.
  • +
  • We have updated the web.config; the web.config file was referring to PHP7.3.
  • +
  • Added removed class type hints now that we are running PHP7.4.
  • Fixed