From 9a2924769b90bcca669a58e6e0093597e999a74a Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Wed, 17 Apr 2024 15:14:05 +0200 Subject: [PATCH 1/3] Update core to working branch ISSUE: PIGAM-174, PIGAM-175 --- GXModules/Mollie/Mollie/composer.json | 4 ++-- 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, 33 insertions(+), 43 deletions(-) diff --git a/GXModules/Mollie/Mollie/composer.json b/GXModules/Mollie/Mollie/composer.json index 91cf4acf..19e86568 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -3,7 +3,7 @@ "version": "2.0.18", "require": { "php": ">=5.4", - "mollie/integration-core": "1.3.7" + "mollie/integration-core": "dev-fix/CS-5342" }, "repositories": [ { @@ -17,4 +17,4 @@ "Mollie\\Gambio\\": "Components" } } -} \ No newline at end of file +} diff --git a/GXModules/Mollie/Mollie/composer.lock b/GXModules/Mollie/Mollie/composer.lock index 273ab35f..1265114b 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": "18f52aa79568f086019540a453e650e6", + "content-hash": "4fed49a7e562a2ed47ea5c633387a432", "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 0256555b..d6dd78a7 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 989494f2330e72ae7b4011f167dfd498f34dc930 Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Fri, 19 Apr 2024 10:41:53 +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 19e86568..d17a9873 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -3,7 +3,7 @@ "version": "2.0.18", "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 1265114b..6ebb57ed 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": "4fed49a7e562a2ed47ea5c633387a432", + "content-hash": "6c45921436f5ccf50969ba65685d5d82", "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 d6dd78a7..47edfdea 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 c9eaf26800855236208278c61cf098138128dbbb Mon Sep 17 00:00:00 2001 From: Luka Simovic Date: Fri, 19 Apr 2024 11:32:48 +0200 Subject: [PATCH 3/3] Release version 2.0.19 ISSUE: PIGAM-174, PIGAM-175 --- GXModules/Mollie/Mollie/composer.json | 2 +- GXModules/Mollie/Mollie/vendor/composer/installed.php | 8 ++++---- README.md | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/GXModules/Mollie/Mollie/composer.json b/GXModules/Mollie/Mollie/composer.json index d17a9873..ee84aa11 100644 --- a/GXModules/Mollie/Mollie/composer.json +++ b/GXModules/Mollie/Mollie/composer.json @@ -1,6 +1,6 @@ { "name": "mollie/gambio", - "version": "2.0.18", + "version": "2.0.19", "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 47edfdea..54443c09 100644 --- a/GXModules/Mollie/Mollie/vendor/composer/installed.php +++ b/GXModules/Mollie/Mollie/vendor/composer/installed.php @@ -1,7 +1,7 @@ array( - 'pretty_version' => '2.0.18', - 'version' => '2.0.18.0', + 'pretty_version' => '2.0.19', + 'version' => '2.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,8 +11,8 @@ ), 'versions' => array( 'mollie/gambio' => array( - 'pretty_version' => '2.0.18', - 'version' => '2.0.18.0', + 'pretty_version' => '2.0.19', + 'version' => '2.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/README.md b/README.md index f7750b8a..bbd74ee5 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,9 @@ Read more about the integration configuration on [our Wiki](https://github.com/m # Release notes +*2.0.19* +- Add casting to array in DTO classes + *2.0.18* - Verify if the string constants are already defined @@ -107,4 +110,4 @@ Read more about the integration configuration on [our Wiki](https://github.com/m - Translations for NL, DE, and FR are added. *2.0.0* -- The initial release of Mollie integration with Gambio. \ No newline at end of file +- The initial release of Mollie integration with Gambio.