From 1bd7d40331a8c156ba0964ffb6ab74981ce2c902 Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Wed, 17 Apr 2024 14:56:10 +0200 Subject: [PATCH 1/3] Update core to working branch ISSUE: PIGAM-174, PIGAM-175 --- GXModules/Mollie/Mollie/composer.json | 2 +- GXModules/Mollie/Mollie/composer.lock | 18 +++++++----------- .../Mollie/vendor/composer/installed.json | 14 ++++---------- .../Mollie/vendor/composer/installed.php | 6 +++--- .../src/BusinessLogic/Http/DTO/Customer.php | 8 ++++---- .../BusinessLogic/Http/DTO/Orders/Order.php | 6 +++--- .../Http/DTO/Orders/OrderLine.php | 8 ++++---- .../src/BusinessLogic/Http/DTO/Payment.php | 6 +++--- .../BusinessLogic/Http/DTO/Refunds/Refund.php | 6 +++--- 9 files changed, 32 insertions(+), 42 deletions(-) diff --git a/GXModules/Mollie/Mollie/composer.json b/GXModules/Mollie/Mollie/composer.json index 0df229e8..ab3a512c 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -3,7 +3,7 @@ "version": "3.0.21", "require": { "php": ">=5.4", - "mollie/integration-core": "1.3.7" + "mollie/integration-core": "dev-fix/CS-5342" }, "repositories": [ { diff --git a/GXModules/Mollie/Mollie/composer.lock b/GXModules/Mollie/Mollie/composer.lock index 3f2ee47a..30dfe255 100644 --- a/GXModules/Mollie/Mollie/composer.lock +++ b/GXModules/Mollie/Mollie/composer.lock @@ -4,21 +4,15 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dd0e69623f3527a1e38bd6fc7aa03662", + "content-hash": "a54191161d2be90a7db815a46e21cda5", "packages": [ { "name": "mollie/integration-core", - "version": "1.3.7", + "version": "dev-fix/CS-5342", "source": { "type": "git", "url": "git@github.com:mollie/orocore.git", - "reference": "20a6c72f2dc4df1602dff085f66da8d93a02a597" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mollie/orocore/zipball/20a6c72f2dc4df1602dff085f66da8d93a02a597", - "reference": "20a6c72f2dc4df1602dff085f66da8d93a02a597", - "shasum": "" + "reference": "1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8" }, "require": { "ext-json": "*", @@ -45,13 +39,15 @@ "proprietary" ], "description": "Mollie integrations core library", - "time": "2024-02-23T16:33:33+00:00" + "time": "2024-04-17T12:42:36+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "mollie/integration-core": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/GXModules/Mollie/Mollie/vendor/composer/installed.json b/GXModules/Mollie/Mollie/vendor/composer/installed.json index c56060e2..39159df8 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.json +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.json @@ -2,18 +2,12 @@ "packages": [ { "name": "mollie/integration-core", - "version": "1.3.7", - "version_normalized": "1.3.7.0", + "version": "dev-fix/CS-5342", + "version_normalized": "dev-fix/CS-5342", "source": { "type": "git", "url": "git@github.com:mollie/orocore.git", - "reference": "20a6c72f2dc4df1602dff085f66da8d93a02a597" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mollie/orocore/zipball/20a6c72f2dc4df1602dff085f66da8d93a02a597", - "reference": "20a6c72f2dc4df1602dff085f66da8d93a02a597", - "shasum": "" + "reference": "1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8" }, "require": { "ext-json": "*", @@ -24,7 +18,7 @@ "phpunit/phpunit": "^4.8.35", "symfony/console": "^5.1" }, - "time": "2024-02-23T16:33:33+00:00", + "time": "2024-04-17T12:42:36+00:00", "type": "library", "installation-source": "source", "autoload": { diff --git a/GXModules/Mollie/Mollie/vendor/composer/installed.php b/GXModules/Mollie/Mollie/vendor/composer/installed.php index fa5123e7..80de7d4e 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.php +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.php @@ -20,12 +20,12 @@ 'dev_requirement' => false, ), 'mollie/integration-core' => array( - 'pretty_version' => '1.3.7', - 'version' => '1.3.7.0', + 'pretty_version' => 'dev-fix/CS-5342', + 'version' => 'dev-fix/CS-5342', 'type' => 'library', 'install_path' => __DIR__ . '/../mollie/integration-core', 'aliases' => array(), - 'reference' => '20a6c72f2dc4df1602dff085f66da8d93a02a597', + 'reference' => '1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8', 'dev_requirement' => false, ), ), diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Customer.php b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Customer.php index 1d1ec1b0..d29f89ec 100644 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Customer.php +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Customer.php @@ -58,11 +58,11 @@ public static function fromArray(array $raw) $customer->mode = static::getValue($raw, 'mode'); $customer->email = static::getValue($raw, 'email'); $customer->locale = static::getValue($raw, 'locale'); - $customer->metadata = static::getValue($raw, 'metadata', array()); + $customer->metadata = (array)static::getValue($raw, 'metadata', array()); $customer->createdAt = static::getValue($raw, 'createdAt'); - foreach (static::getValue($raw, '_links', array()) as $linkKey => $linkData) { - $customer->links[$linkKey] = Link::fromArray($linkData); + foreach ((array)static::getValue($raw, '_links', array()) as $linkKey => $linkData) { + $customer->links[$linkKey] = Link::fromArray((array)$linkData); } return $customer; @@ -231,4 +231,4 @@ public function toArray() '_links' => $links, ); } -} \ No newline at end of file +} diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/Order.php b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/Order.php index a7b64580..440da3eb 100644 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/Order.php +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/Order.php @@ -162,7 +162,7 @@ public static function fromArray(array $raw) $order->amountRefunded = Amount::fromArray(static::getValue($raw, 'amountRefunded', array())); $order->status = static::getValue($raw, 'status'); $order->isCancelable = static::getValue($raw, 'isCancelable', true); - $order->metadata = static::getValue($raw, 'metadata', array()); + $order->metadata = (array)static::getValue($raw, 'metadata', array()); $order->createdAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'createdAt')); $order->expiresAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'expiresAt')); $order->expiredAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'expiredAt')); @@ -187,8 +187,8 @@ public static function fromArray(array $raw) $order->embedded['refunds'] = Refund::fromArrayBatch(static::getValue($raw['_embedded'], 'refunds', array())); } - foreach (static::getValue($raw, '_links', array()) as $linkKey => $linkData) { - $order->links[$linkKey] = Link::fromArray($linkData); + foreach ((array)static::getValue($raw, '_links', array()) as $linkKey => $linkData) { + $order->links[$linkKey] = Link::fromArray((array)$linkData); } if (!empty($raw['payment'])) { diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/OrderLine.php b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/OrderLine.php index d5d5b9f2..930b806b 100644 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/OrderLine.php +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Orders/OrderLine.php @@ -142,7 +142,7 @@ public static function fromArray(array $raw) $orderLine->type = static::getValue($raw, 'type', null); $orderLine->sku = static::getValue($raw, 'sku', null); - $orderLine->metadata = static::getValue($raw, 'metadata', array()); + $orderLine->metadata = (array)static::getValue($raw, 'metadata', array()); $orderLine->id = static::getValue($raw, 'id'); $orderLine->orderId = static::getValue($raw, 'orderId'); $orderLine->isCancelable = static::getValue($raw, 'isCancelable', false); @@ -166,8 +166,8 @@ public static function fromArray(array $raw) $orderLine->createdAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'createdAt')); - foreach (static::getValue($raw, '_links', array()) as $linkKey => $linkData) { - $orderLine->links[$linkKey] = Link::fromArray($linkData); + foreach ((array)static::getValue($raw, '_links', array()) as $linkKey => $linkData) { + $orderLine->links[$linkKey] = Link::fromArray((array)$linkData); } return $orderLine; @@ -645,4 +645,4 @@ public function setCreatedAt(\DateTime $createdAt) { $this->createdAt = $createdAt; } -} \ No newline at end of file +} diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Payment.php b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Payment.php index a4e3acbe..69c345ad 100644 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Payment.php +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Payment.php @@ -128,7 +128,7 @@ public static function fromArray(array $raw) $result->setLocale(static::getValue($raw, 'locale')); $method = static::getValue($raw, 'method', array()); $result->methods = is_array($method) ? $method : array($method); - $result->metadata = static::getValue($raw, 'metadata', array()); + $result->metadata = (array)static::getValue($raw, 'metadata', array()); $result->dueDate = \DateTime::createFromFormat(Order::MOLLIE_DATE_FORMAT, static::getValue($raw, 'dueDate')); $result->expiresAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'expiresAt')); @@ -138,8 +138,8 @@ public static function fromArray(array $raw) $result->shippingAddress = Address::fromArray($shippingAddress); } - foreach (static::getValue($raw, '_links', array()) as $linkKey => $linkData) { - $result->links[$linkKey] = Link::fromArray($linkData); + foreach ((array)static::getValue($raw, '_links', array()) as $linkKey => $linkData) { + $result->links[$linkKey] = Link::fromArray((array)$linkData); } if (array_key_exists('_embedded', $raw)) { diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Refunds/Refund.php b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Refunds/Refund.php index eeab004f..15c27c15 100644 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Refunds/Refund.php +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/src/BusinessLogic/Http/DTO/Refunds/Refund.php @@ -84,12 +84,12 @@ public static function fromArray(array $raw) $refund->lines = OrderLine::fromArrayBatch(static::getValue($raw, 'lines', array())); $refund->createdAt = \DateTime::createFromFormat(DATE_ATOM, static::getValue($raw, 'createdAt')); $refund->description = static::getValue($raw, 'description'); - $refund->metadata = static::getValue($raw, 'metadata', null); + $refund->metadata = (array)static::getValue($raw, 'metadata', null); $refund->paymentId = static::getValue($raw, 'paymentId'); $refund->orderId = static::getValue($raw, 'orderId'); - foreach (static::getValue($raw, '_links', array()) as $linkKey => $linkData) { - $refund->links[$linkKey] = Link::fromArray($linkData); + foreach ((array)static::getValue($raw, '_links', array()) as $linkKey => $linkData) { + $refund->links[$linkKey] = Link::fromArray((array)$linkData); } return $refund; From 0d0db106dfbc9f64563c0727c586a21f9f106ce3 Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Fri, 19 Apr 2024 10:36:02 +0200 Subject: [PATCH 2/3] Update core version to 1.3.8 ISSUE: PIGAM-174, PIGAM-175 --- GXModules/Mollie/Mollie/composer.json | 2 +- GXModules/Mollie/Mollie/composer.lock | 12 +++++------- .../Mollie/Mollie/vendor/composer/installed.json | 8 ++++---- .../Mollie/Mollie/vendor/composer/installed.php | 6 +++--- .../vendor/mollie/integration-core/CHANGELOG.md | 7 +++++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/GXModules/Mollie/Mollie/composer.json b/GXModules/Mollie/Mollie/composer.json index ab3a512c..5c769394 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -3,7 +3,7 @@ "version": "3.0.21", "require": { "php": ">=5.4", - "mollie/integration-core": "dev-fix/CS-5342" + "mollie/integration-core": "1.3.8" }, "repositories": [ { diff --git a/GXModules/Mollie/Mollie/composer.lock b/GXModules/Mollie/Mollie/composer.lock index 30dfe255..85ac1128 100644 --- a/GXModules/Mollie/Mollie/composer.lock +++ b/GXModules/Mollie/Mollie/composer.lock @@ -4,15 +4,15 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a54191161d2be90a7db815a46e21cda5", + "content-hash": "79f30bc44ba0702ceefdeeff320104c6", "packages": [ { "name": "mollie/integration-core", - "version": "dev-fix/CS-5342", + "version": "1.3.8", "source": { "type": "git", "url": "git@github.com:mollie/orocore.git", - "reference": "1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8" + "reference": "25034947afe94193297e6504cbbc1edc18cd219e" }, "require": { "ext-json": "*", @@ -39,15 +39,13 @@ "proprietary" ], "description": "Mollie integrations core library", - "time": "2024-04-17T12:42:36+00:00" + "time": "2024-04-19T07:26:56+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "mollie/integration-core": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/GXModules/Mollie/Mollie/vendor/composer/installed.json b/GXModules/Mollie/Mollie/vendor/composer/installed.json index 39159df8..688cc9f0 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.json +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.json @@ -2,12 +2,12 @@ "packages": [ { "name": "mollie/integration-core", - "version": "dev-fix/CS-5342", - "version_normalized": "dev-fix/CS-5342", + "version": "1.3.8", + "version_normalized": "1.3.8.0", "source": { "type": "git", "url": "git@github.com:mollie/orocore.git", - "reference": "1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8" + "reference": "25034947afe94193297e6504cbbc1edc18cd219e" }, "require": { "ext-json": "*", @@ -18,7 +18,7 @@ "phpunit/phpunit": "^4.8.35", "symfony/console": "^5.1" }, - "time": "2024-04-17T12:42:36+00:00", + "time": "2024-04-19T07:26:56+00:00", "type": "library", "installation-source": "source", "autoload": { diff --git a/GXModules/Mollie/Mollie/vendor/composer/installed.php b/GXModules/Mollie/Mollie/vendor/composer/installed.php index 80de7d4e..027dcf27 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.php +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.php @@ -20,12 +20,12 @@ 'dev_requirement' => false, ), 'mollie/integration-core' => array( - 'pretty_version' => 'dev-fix/CS-5342', - 'version' => 'dev-fix/CS-5342', + 'pretty_version' => '1.3.8', + 'version' => '1.3.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../mollie/integration-core', 'aliases' => array(), - 'reference' => '1a6c9a062d3a4cf2780d42e6fd48c1eb799a1cc8', + 'reference' => '25034947afe94193297e6504cbbc1edc18cd219e', 'dev_requirement' => false, ), ), diff --git a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/CHANGELOG.md b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/CHANGELOG.md index 03f758bb..01bc86f3 100755 --- a/GXModules/Mollie/Mollie/vendor/mollie/integration-core/CHANGELOG.md +++ b/GXModules/Mollie/Mollie/vendor/mollie/integration-core/CHANGELOG.md @@ -3,7 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [v1.3.7](https://github.com/mollie/orocore/tree/v1.3.6) - 2024-02-23 +## [v1.3.8](https://github.com/mollie/orocore/tree/v1.3.8) - 2024-04-19 +- Add casting to array in DTO classes + +## [v1.3.7](https://github.com/mollie/orocore/tree/v1.3.7) - 2024-02-23 - Do not call payments API with order token ## [v1.3.6](https://github.com/mollie/orocore/tree/v1.3.6) - 2022-09-15 @@ -88,4 +91,4 @@ WebHookTransformer. - Added ability for creating Mollie order/payment with multiple payment methods ## [v1.0.0](https://github.com/mollie/orocore/tree/v1.0.0) - 2020-02-18 -- First release of CORE \ No newline at end of file +- First release of CORE From 59ab8d79cdf127c0dfc1d6384ef9d4ee8c156e4a Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Fri, 19 Apr 2024 11:34:51 +0200 Subject: [PATCH 3/3] Release version 3.0.22 ISSUE: PIGAM-174, PIGAM-175 --- GXModules/Mollie/Mollie/composer.json | 2 +- GXModules/Mollie/Mollie/vendor/composer/installed.php | 8 ++++---- README.md | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/GXModules/Mollie/Mollie/composer.json b/GXModules/Mollie/Mollie/composer.json index 5c769394..10f9747f 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -1,6 +1,6 @@ { "name": "mollie/gambio", - "version": "3.0.21", + "version": "3.0.22", "require": { "php": ">=5.4", "mollie/integration-core": "1.3.8" diff --git a/GXModules/Mollie/Mollie/vendor/composer/installed.php b/GXModules/Mollie/Mollie/vendor/composer/installed.php index 027dcf27..2ee6a76e 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.php +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.php @@ -1,7 +1,7 @@ array( - 'pretty_version' => '3.0.21', - 'version' => '3.0.21.0', + 'pretty_version' => '3.0.22', + 'version' => '3.0.22.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,8 +11,8 @@ ), 'versions' => array( 'mollie/gambio' => array( - 'pretty_version' => '3.0.21', - 'version' => '3.0.21.0', + 'pretty_version' => '3.0.22', + 'version' => '3.0.22.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/README.md b/README.md index 269ccc57..665c1fbb 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ Read more about the integration configuration on [our Wiki](https://github.com/m # Release notes +*3.0.22* +- Add casting to array in DTO classes + *3.0.21* - Verify if the other string constants are already defined.