From a7b19f40083056e65fe210fce1334ec9b664003e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20G=C5=82owala?= Date: Thu, 15 Jun 2023 09:19:33 +0200 Subject: [PATCH 1/2] Add second saturday WorkingDay value --- composer.json | 7 ++++--- src/Enum/DayType.php | 6 ++++++ tests/Integration/Service/data/parcelShops.json | 4 ++-- .../Service/data/parcelShops_expected_parcels.json | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index cb874ce..0a4b130 100755 --- a/composer.json +++ b/composer.json @@ -9,9 +9,10 @@ "guzzlehttp/guzzle": "^6.0 || ^7.0", "marc-mabe/php-enum": "^3.0|^4.3", "psr/log": "^1.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|<6.3", + "symfony/property-access": "^5.4|<6.3", + "symfony/property-info": "^5.4|<6.3", + "symfony/serializer": "^5.4|<6.3", "webmozart/assert": "^1.3" }, "require-dev": { diff --git a/src/Enum/DayType.php b/src/Enum/DayType.php index 5debe21..404bfe9 100644 --- a/src/Enum/DayType.php +++ b/src/Enum/DayType.php @@ -18,6 +18,7 @@ class DayType extends Enum implements \Serializable public const THURSDAY = 10; public const FRIDAY = 11; public const SATURDAY = 2; + public const SATURDAY_2 = 12; public const SUNDAY = 3; public static function friday(): self @@ -59,4 +60,9 @@ public static function workingDay(): self { return static::get(static::WORKING_DAY); } + + public static function saturday2(): self + { + return static::get(static::SATURDAY_2); + } } diff --git a/tests/Integration/Service/data/parcelShops.json b/tests/Integration/Service/data/parcelShops.json index e1b1d1a..beab6ef 100644 --- a/tests/Integration/Service/data/parcelShops.json +++ b/tests/Integration/Service/data/parcelShops.json @@ -231,8 +231,8 @@ "Until": "22:00:00" }, { - "Type": 3, - "TypeName": "LS.Nedjeljom", + "Type": 12, + "TypeName": "LS.Subotom", "From": "06:00:00", "Until": "22:00:00" } diff --git a/tests/Integration/Service/data/parcelShops_expected_parcels.json b/tests/Integration/Service/data/parcelShops_expected_parcels.json index 6dd16e8..09a54aa 100644 --- a/tests/Integration/Service/data/parcelShops_expected_parcels.json +++ b/tests/Integration/Service/data/parcelShops_expected_parcels.json @@ -279,8 +279,8 @@ "until": "22:00:00" }, { - "type": 3, - "typeName": "LS.Nedjeljom", + "type": 12, + "typeName": "LS.Subotom", "from": "06:00:00", "until": "22:00:00" } From 92e480395c37c9747ceadfe0d45c3523482bc2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20G=C5=82owala?= Date: Thu, 15 Jun 2023 09:27:48 +0200 Subject: [PATCH 2/2] Composer serialize < 6.3 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0a4b130..8558175 100755 --- a/composer.json +++ b/composer.json @@ -9,10 +9,10 @@ "guzzlehttp/guzzle": "^6.0 || ^7.0", "marc-mabe/php-enum": "^3.0|^4.3", "psr/log": "^1.0", - "symfony/http-kernel": "^5.4|<6.3", - "symfony/property-access": "^5.4|<6.3", - "symfony/property-info": "^5.4|<6.3", - "symfony/serializer": "^5.4|<6.3", + "symfony/http-kernel": "5.4 - 6.2", + "symfony/property-access": "5.4 - 6.2", + "symfony/property-info": "5.4 - 6.2", + "symfony/serializer": "5.4 - 6.2", "webmozart/assert": "^1.3" }, "require-dev": {