From 8b75b5efbe2f5cceafaf459b91d508af0056b2b4 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Mon, 9 Jan 2023 14:07:59 +0100 Subject: [PATCH 1/9] MOL-969: Add entities --- .../DAL/RefundItem/RefundItemCollection.php | 14 ++ .../DAL/RefundItem/RefundItemDefinition.php | 49 +++++++ .../DAL/RefundItem/RefundItemEntity.php | 133 ++++++++++++++++++ .../Migration1672671475RefundItem.php | 40 ++++++ src/Resources/config/services/services.xml | 1 + .../config/services/subscription/services.xml | 3 + 6 files changed, 240 insertions(+) create mode 100644 src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php create mode 100644 src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php create mode 100644 src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php create mode 100644 src/Migration/Migration1672671475RefundItem.php diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php new file mode 100644 index 000000000..d1ea7a652 --- /dev/null +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php @@ -0,0 +1,14 @@ +addFlags(new Required(), new PrimaryKey(), new ApiAware()), + (new StringField('type', 'type'))->addFlags(new Required(), new ApiAware()), + (new StringField('refund_id', 'refundId'))->addFlags(new Required(), new ApiAware()), + (new IntField('quantity', 'quantity'))->addFlags(new Required(), new ApiAware()), + (new FloatField('amount', 'amount'))->addFlags(new Required(), new ApiAware()), + (new StringField('mollie_line_id', 'mollieLineId'))->addFlags(new Required(), new ApiAware()), + (new FkField('line_item_id', 'lineItemId', OrderLineItemDefinition::class))->addFlags(new ApiAware()), + ]); + } +} diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php new file mode 100644 index 000000000..544dbc2c8 --- /dev/null +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -0,0 +1,133 @@ +type; + } + + /** + * @param string $type + */ + public function setType(string $type): void + { + $this->type = $type; + } + + /** + * @return string + */ + public function getRefundId(): string + { + return $this->refundId; + } + + /** + * @param string $refundId + */ + public function setRefundId(string $refundId): void + { + $this->refundId = $refundId; + } + + /** + * @return string + */ + public function getMollieLineId(): string + { + return $this->mollieLineId; + } + + /** + * @param string $mollieLineId + */ + public function setMollieLineId(string $mollieLineId): void + { + $this->mollieLineId = $mollieLineId; + } + + /** + * @return int + */ + public function getQuantity(): int + { + return $this->quantity; + } + + /** + * @param int $quantity + */ + public function setQuantity(int $quantity): void + { + $this->quantity = $quantity; + } + + /** + * @return float + */ + public function getAmount(): float + { + return $this->amount; + } + + /** + * @param float $amount + */ + public function setAmount(float $amount): void + { + $this->amount = $amount; + } + + /** + * @return string + */ + public function getLineItemId(): ?string + { + return $this->lineItemId; + } + + /** + * @param string $lineItemId + */ + public function setLineItemId(string $lineItemId): void + { + $this->lineItemId = $lineItemId; + } + + /** + * @return null|OrderLineItemEntity + */ + public function getOrderLineItem(): ?OrderLineItemEntity + { + return $this->orderLineItem; + } + + /** + * @param OrderLineItemEntity $orderLineItem + */ + public function setOrderLineItem(OrderLineItemEntity $orderLineItem): void + { + $this->orderLineItem = $orderLineItem; + } +} diff --git a/src/Migration/Migration1672671475RefundItem.php b/src/Migration/Migration1672671475RefundItem.php new file mode 100644 index 000000000..741e2116b --- /dev/null +++ b/src/Migration/Migration1672671475RefundItem.php @@ -0,0 +1,40 @@ +executeStatement($sql); + } + + public function updateDestructive(Connection $connection): void + { + // implement update destructive + } +} diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml index a66335c50..8330dcbf6 100644 --- a/src/Resources/config/services/services.xml +++ b/src/Resources/config/services/services.xml @@ -72,6 +72,7 @@ + diff --git a/src/Resources/config/services/subscription/services.xml b/src/Resources/config/services/subscription/services.xml index fe79063e4..6bddb0c50 100755 --- a/src/Resources/config/services/subscription/services.xml +++ b/src/Resources/config/services/subscription/services.xml @@ -35,6 +35,9 @@ + + + From fe76e4282e1dc8be181b7cd07f6f0912565df38e Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Thu, 21 Sep 2023 09:23:58 +0200 Subject: [PATCH 2/9] MOL-969: store refunds in db --- composer.json | 5 +- composer.lock | 1530 +++++++++-------- .../OrderLineItem/OrderLineItemExtension.php | 33 + .../DAL/Refund/RefundDefinition.php | 3 + .../RefundManager/DAL/Refund/RefundEntity.php | 28 + .../DAL/RefundItem/RefundItemDefinition.php | 13 +- .../DAL/RefundItem/RefundItemEntity.php | 47 +- .../RefundManager/RefundData/RefundData.php | 7 +- .../RefundManager/RefundManager.php | 60 +- src/Hydrator/RefundHydrator.php | 23 +- .../Migration1672671475RefundItem.php | 12 +- .../services/refundmanager/services.xml | 9 +- src/Resources/config/services/services.xml | 5 +- .../config/services/subscription/services.xml | 4 +- src/Service/OrderService.php | 3 +- src/Service/Refund/Mollie/RefundMetadata.php | 13 +- src/Service/Refund/RefundService.php | 19 +- 17 files changed, 1071 insertions(+), 743 deletions(-) create mode 100644 src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php diff --git a/composer.json b/composer.json index bd114ce88..03e2e12ab 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ "config": { "optimize-autoloader": true, "allow-plugins": { - "infection/extension-installer": true + "infection/extension-installer": true, + "php-http/discovery": true } }, "autoload": { @@ -64,7 +65,7 @@ "require": { "php": ">=7.4", "ext-curl": "*", - "mollie/mollie-api-php": "2.40.1" + "mollie/mollie-api-php": "2.61.0" }, "require-dev": { "phpunit/phpunit": "^9.5", diff --git a/composer.lock b/composer.lock index c97289de9..a75c5e721 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2ffbf5f15690099f310448e96e981166", + "content-hash": "5cd478db4a08e7096ed3285163ebb7e6", "packages": [ { "name": "composer/ca-bundle", - "version": "1.3.6", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "90d087e988ff194065333d16bc5cf649872d9cdb" + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/90d087e988ff194065333d16bc5cf649872d9cdb", - "reference": "90d087e988ff194065333d16bc5cf649872d9cdb", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", + "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", "shasum": "" }, "require": { @@ -64,7 +64,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.6" + "source": "https://github.com/composer/ca-bundle/tree/1.3.7" }, "funding": [ { @@ -80,20 +80,20 @@ "type": "tidelift" } ], - "time": "2023-06-06T12:02:59+00:00" + "time": "2023-08-30T09:31:38+00:00" }, { "name": "mollie/mollie-api-php", - "version": "v2.40.1", + "version": "v2.61.0", "source": { "type": "git", "url": "https://github.com/mollie/mollie-api-php.git", - "reference": "b99ad3662b4141efa9ee8eb83a04c2d3c100f83c" + "reference": "d3ec7a191985aa57bec9b4425a665e95b4ba346a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/b99ad3662b4141efa9ee8eb83a04c2d3c100f83c", - "reference": "b99ad3662b4141efa9ee8eb83a04c2d3c100f83c", + "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/d3ec7a191985aa57bec9b4425a665e95b4ba346a", + "reference": "d3ec7a191985aa57bec9b4425a665e95b4ba346a", "shasum": "" }, "require": { @@ -101,13 +101,14 @@ "ext-curl": "*", "ext-json": "*", "ext-openssl": "*", - "php": ">=5.6" + "php": "^7.2|^8.0" }, "require-dev": { - "eloquent/liberator": "^2.0", + "eloquent/liberator": "^2.0||^3.0", "friendsofphp/php-cs-fixer": "^3.0", "guzzlehttp/guzzle": "^6.3 || ^7.0", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.1 || ^8.5 || ^9.5" + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^8.5 || ^9.5" }, "suggest": { "mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information." @@ -169,24 +170,24 @@ ], "support": { "issues": "https://github.com/mollie/mollie-api-php/issues", - "source": "https://github.com/mollie/mollie-api-php/tree/v2.40.1" + "source": "https://github.com/mollie/mollie-api-php/tree/v2.61.0" }, - "time": "2022-01-18T18:16:13+00:00" + "time": "2023-07-31T15:37:46+00:00" } ], "packages-dev": [ { "name": "aws/aws-crt-php", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/awslabs/aws-crt-php.git", - "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5" + "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/1926277fc71d253dfa820271ac5987bdb193ccf5", - "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/2f1dc7b7eda080498be96a4a6d683a41583030e9", + "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9", "shasum": "" }, "require": { @@ -225,22 +226,22 @@ ], "support": { "issues": "https://github.com/awslabs/aws-crt-php/issues", - "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.1" + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.2" }, - "time": "2023-03-24T20:22:19+00:00" + "time": "2023-07-20T16:49:55+00:00" }, { "name": "aws/aws-sdk-php", - "version": "3.271.9", + "version": "3.281.10", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8593b1a898f2d0be56bea94aa9b379e670ae1eb3" + "reference": "049604298f769fa218549d8ff5cac1981f0a349a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8593b1a898f2d0be56bea94aa9b379e670ae1eb3", - "reference": "8593b1a898f2d0be56bea94aa9b379e670ae1eb3", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/049604298f769fa218549d8ff5cac1981f0a349a", + "reference": "049604298f769fa218549d8ff5cac1981f0a349a", "shasum": "" }, "require": { @@ -249,11 +250,11 @@ "ext-pcre": "*", "ext-simplexml": "*", "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", - "guzzlehttp/promises": "^1.4.0", + "guzzlehttp/promises": "^1.4.0 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "mtdowling/jmespath.php": "^2.6", - "php": ">=5.5", - "psr/http-message": "^1.0" + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { "andrewsville/php-token-reflection": "^1.4", @@ -268,7 +269,7 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", "sebastian/comparator": "^1.2.3 || ^4.0", @@ -320,9 +321,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.271.9" + "source": "https://github.com/aws/aws-sdk-php/tree/3.281.10" }, - "time": "2023-06-06T18:22:57+00:00" + "time": "2023-09-19T18:33:42+00:00" }, { "name": "boxblinkracer/phpunuhi", @@ -330,12 +331,12 @@ "source": { "type": "git", "url": "https://github.com/boxblinkracer/phpunuhi.git", - "reference": "feb03e8998f85707726696d43b86a9486f453ad9" + "reference": "df3fb5c625c1105860ee26eaad116945f6b6e1ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/boxblinkracer/phpunuhi/zipball/feb03e8998f85707726696d43b86a9486f453ad9", - "reference": "feb03e8998f85707726696d43b86a9486f453ad9", + "url": "https://api.github.com/repos/boxblinkracer/phpunuhi/zipball/df3fb5c625c1105860ee26eaad116945f6b6e1ef", + "reference": "df3fb5c625c1105860ee26eaad116945f6b6e1ef", "shasum": "" }, "require": { @@ -388,32 +389,31 @@ ], "support": { "issues": "https://github.com/boxblinkracer/phpunuhi/issues", - "source": "https://github.com/boxblinkracer/phpunuhi/tree/v1.12.0" + "source": "https://github.com/boxblinkracer/phpunuhi/tree/v1.13.0" }, - "time": "2023-07-25T19:32:32+00:00" + "time": "2023-09-03T12:32:03+00:00" }, { "name": "brick/math", - "version": "0.9.3", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.9.2" + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "5.0.0" }, "type": "library", "autoload": { @@ -438,19 +438,15 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.3" + "source": "https://github.com/brick/math/tree/0.11.0" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" } ], - "time": "2021-08-15T20:50:18+00:00" + "time": "2023-01-15T23:15:59+00:00" }, { "name": "cocur/slugify", @@ -767,16 +763,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -826,9 +822,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -844,7 +840,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/spdx-licenses", @@ -994,16 +990,16 @@ }, { "name": "deeplcom/deepl-php", - "version": "v1.4.0", + "version": "v1.5.1", "source": { "type": "git", "url": "https://github.com/DeepLcom/deepl-php.git", - "reference": "b235af7647418ac74275e70476eff3b84f6c0ecc" + "reference": "732c025b00d9240cfb4233ea0b5ec02f6ea1078f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DeepLcom/deepl-php/zipball/b235af7647418ac74275e70476eff3b84f6c0ecc", - "reference": "b235af7647418ac74275e70476eff3b84f6c0ecc", + "url": "https://api.github.com/repos/DeepLcom/deepl-php/zipball/732c025b00d9240cfb4233ea0b5ec02f6ea1078f", + "reference": "732c025b00d9240cfb4233ea0b5ec02f6ea1078f", "shasum": "" }, "require": { @@ -1011,10 +1007,16 @@ "ext-json": "*", "ext-mbstring": "*", "php": ">=7.3.0", + "php-http/discovery": "^1.18", + "php-http/multipart-stream-builder": "^1.3", + "psr/http-client": "^1.0", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", + "guzzlehttp/guzzle": "^7.7.0", "php-mock/php-mock-phpunit": "^2.6", "phpunit/phpunit": "^9", "ramsey/uuid": "^4.2", @@ -1045,22 +1047,22 @@ ], "support": { "issues": "https://github.com/DeepLcom/deepl-php/issues", - "source": "https://github.com/DeepLcom/deepl-php/tree/v1.4.0" + "source": "https://github.com/DeepLcom/deepl-php/tree/v1.5.1" }, - "time": "2023-05-24T07:52:25+00:00" + "time": "2023-09-11T13:24:15+00:00" }, { "name": "defuse/php-encryption", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/defuse/php-encryption.git", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", "shasum": "" }, "require": { @@ -1069,7 +1071,8 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" }, "bin": [ "bin/generate-defuse-key" @@ -1111,9 +1114,9 @@ ], "support": { "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" }, - "time": "2021-04-09T23:57:26+00:00" + "time": "2023-06-19T06:10:36+00:00" }, { "name": "doctrine/annotations", @@ -1280,76 +1283,6 @@ ], "time": "2022-05-20T20:07:39+00:00" }, - { - "name": "doctrine/collections", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "phpstan/phpstan": "^1.4.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.8.0" - }, - "time": "2022-09-01T20:12:10+00:00" - }, { "name": "doctrine/dbal", "version": "2.13.9", @@ -1696,30 +1629,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -1746,7 +1679,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -1762,7 +1695,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "doctrine/lexer", @@ -1842,44 +1775,40 @@ }, { "name": "doctrine/persistence", - "version": "2.5.7", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "e36f22765f4d10a7748228babbf73da5edfeed3c" + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/e36f22765f4d10a7748228babbf73da5edfeed3c", - "reference": "e36f22765f4d10a7748228babbf73da5edfeed3c", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/63fee8c33bef740db6730eb2a750cd3da6495603", + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603", "shasum": "" }, "require": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/collections": "^1.0", - "doctrine/deprecations": "^0.5.3 || ^1", "doctrine/event-manager": "^1 || ^2", - "php": "^7.1 || ^8.0", + "php": "^7.2 || ^8.0", "psr/cache": "^1.0 || ^2.0 || ^3.0" }, "conflict": { - "doctrine/annotations": "<1.0 || >=3.0", "doctrine/common": "<2.10" }, "require-dev": { "composer/package-versions-deprecated": "^1.11", - "doctrine/annotations": "^1 || ^2", - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "doctrine/common": "^3.0", - "phpstan/phpstan": "~1.4.10 || 1.9.4", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.5", + "phpstan/phpstan": "1.9.4", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "vimeo/psalm": "4.30.0 || 5.3.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\": "src/Common", "Doctrine\\Persistence\\": "src/Persistence" } }, @@ -1914,7 +1843,7 @@ } ], "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://doctrine-project.org/projects/persistence.html", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", "keywords": [ "mapper", "object", @@ -1924,7 +1853,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/2.5.7" + "source": "https://github.com/doctrine/persistence/tree/3.2.0" }, "funding": [ { @@ -1940,7 +1869,7 @@ "type": "tidelift" } ], - "time": "2023-02-03T15:51:16+00:00" + "time": "2023-05-17T18:32:04+00:00" }, { "name": "egulias/email-validator", @@ -2011,21 +1940,21 @@ }, { "name": "enqueue/amqp-tools", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/amqp-tools.git", - "reference": "1a68bcae51fcbe6e55cac42d455e6064513a5111" + "reference": "866d45420aa354c1b465ec7636247c3c20f67bb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/amqp-tools/zipball/1a68bcae51fcbe6e55cac42d455e6064513a5111", - "reference": "1a68bcae51fcbe6e55cac42d455e6064513a5111", + "url": "https://api.github.com/repos/php-enqueue/amqp-tools/zipball/866d45420aa354c1b465ec7636247c3c20f67bb5", + "reference": "866d45420aa354c1b465ec7636247c3c20f67bb5", "shasum": "" }, "require": { "enqueue/dsn": "^0.10", - "php": "^7.3|^8.0", + "php": "^7.4|^8.0", "queue-interop/amqp-interop": "^0.8.2", "queue-interop/queue-interop": "^0.8" }, @@ -2066,26 +1995,26 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-03-23T09:50:55+00:00" }, { "name": "enqueue/dbal", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/dbal.git", - "reference": "39bc94d15f78771de1f8c3dd63e784fa10fc34be" + "reference": "2375961434e2a69b8710875f1c4e56f01b348a47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/dbal/zipball/39bc94d15f78771de1f8c3dd63e784fa10fc34be", - "reference": "39bc94d15f78771de1f8c3dd63e784fa10fc34be", + "url": "https://api.github.com/repos/php-enqueue/dbal/zipball/2375961434e2a69b8710875f1c4e56f01b348a47", + "reference": "2375961434e2a69b8710875f1c4e56f01b348a47", "shasum": "" }, "require": { "doctrine/dbal": "^2.12|^3.1", - "doctrine/persistence": "^1.3.3|^2.0", - "php": "^7.3|^8.0", + "doctrine/persistence": "^2.0|^3.0", + "php": "^7.4|^8.0", "queue-interop/queue-interop": "^0.8", "ramsey/uuid": "^3.5|^4" }, @@ -2128,24 +2057,24 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-05-12T13:06:33+00:00" }, { "name": "enqueue/dsn", - "version": "0.10.8", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/dsn.git", - "reference": "729fabaae6b24189d14598033b174bd72e825e9a" + "reference": "f4991fe46dd01477deb566727170341b255e8479" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/dsn/zipball/729fabaae6b24189d14598033b174bd72e825e9a", - "reference": "729fabaae6b24189d14598033b174bd72e825e9a", + "url": "https://api.github.com/repos/php-enqueue/dsn/zipball/f4991fe46dd01477deb566727170341b255e8479", + "reference": "f4991fe46dd01477deb566727170341b255e8479", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": "^7.4|^8.0" }, "require-dev": { "phpunit/phpunit": "^9.5" @@ -2181,26 +2110,26 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2021-02-09T12:01:28+00:00" + "time": "2023-03-23T09:50:55+00:00" }, { "name": "enqueue/enqueue", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/enqueue.git", - "reference": "fdd4ab8d70038711f076c2165df27afe5eb25191" + "reference": "9273d0760b40594bfc721c36117824f660a388df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/enqueue/zipball/fdd4ab8d70038711f076c2165df27afe5eb25191", - "reference": "fdd4ab8d70038711f076c2165df27afe5eb25191", + "url": "https://api.github.com/repos/php-enqueue/enqueue/zipball/9273d0760b40594bfc721c36117824f660a388df", + "reference": "9273d0760b40594bfc721c36117824f660a388df", "shasum": "" }, "require": { "enqueue/dsn": "^0.10", "enqueue/null": "^0.10", - "php": "^7.3|^8.0", + "php": "^7.4|^8.0", "psr/container": "^1.1 || ^2.0", "psr/log": "^1.0 || ^2.0 || ^3.0", "queue-interop/amqp-interop": "^0.8.2", @@ -2226,12 +2155,12 @@ "enqueue/stomp": "0.10.x-dev", "enqueue/test": "0.10.x-dev", "phpunit/phpunit": "^9.5", - "symfony/config": "^5.1|^6.0", - "symfony/console": "^5.1|^6.0", - "symfony/dependency-injection": "^5.1|^6.0", - "symfony/event-dispatcher": "^5.1|^6.0", - "symfony/http-kernel": "^5.1|^6.0", - "symfony/yaml": "^5.1|^6.0" + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.41|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "enqueue/amqp-ext": "AMQP transport (based on php extension)", @@ -2240,9 +2169,9 @@ "enqueue/redis": "Redis transport", "enqueue/sqs": "Amazon AWS SQS transport", "enqueue/stomp": "STOMP transport", - "symfony/config": "^5.1|^6.0", - "symfony/console": "^5.1|^6.0 If you want to use cli commands", - "symfony/dependency-injection": "^5.1|^6.0" + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0 If you want to use cli commands", + "symfony/dependency-injection": "^5.4|^6.0" }, "type": "library", "extra": { @@ -2277,33 +2206,33 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-03-23T09:50:55+00:00" }, { "name": "enqueue/enqueue-bundle", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/enqueue-bundle.git", - "reference": "32d1884ff33e6c0e34d106fb84e2181384b8191e" + "reference": "3eab4e7172ab0b4c021351bcdb5f44957c4e6789" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/enqueue-bundle/zipball/32d1884ff33e6c0e34d106fb84e2181384b8191e", - "reference": "32d1884ff33e6c0e34d106fb84e2181384b8191e", + "url": "https://api.github.com/repos/php-enqueue/enqueue-bundle/zipball/3eab4e7172ab0b4c021351bcdb5f44957c4e6789", + "reference": "3eab4e7172ab0b4c021351bcdb5f44957c4e6789", "shasum": "" }, "require": { "enqueue/enqueue": "^0.10", "enqueue/null": "^0.10", - "php": "^7.3|^8.0", + "php": "^7.4|^8.0", "queue-interop/amqp-interop": "^0.8.2", "queue-interop/queue-interop": "^0.8", - "symfony/framework-bundle": "^5.1|^6.0" + "symfony/framework-bundle": "^5.4|^6.0" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.0", - "doctrine/doctrine-bundle": "^2.0", + "doctrine/doctrine-bundle": "^2.3.2", "doctrine/mongodb-odm-bundle": "^3.5|^4.3", "enqueue/amqp-bunny": "0.10.x-dev", "enqueue/amqp-ext": "0.10.x-dev", @@ -2320,9 +2249,10 @@ "enqueue/test": "0.10.x-dev", "php-amqplib/php-amqplib": "^3.0", "phpunit/phpunit": "^9.5", - "symfony/browser-kit": "^5.1|^6.0", - "symfony/expression-language": "^5.1|^6.0", - "symfony/yaml": "^5.1|^6.0" + "symfony/browser-kit": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/validator": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "enqueue/async-command": "If want to run Symfony command via message queue", @@ -2361,24 +2291,24 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-03-23T09:50:55+00:00" }, { "name": "enqueue/null", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/null.git", - "reference": "7f2c3d2695e7ac4dcefa67c3cb69031fb2a932ea" + "reference": "c7174da80c59b04391c5194cebe46b6f85d79fb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/null/zipball/7f2c3d2695e7ac4dcefa67c3cb69031fb2a932ea", - "reference": "7f2c3d2695e7ac4dcefa67c3cb69031fb2a932ea", + "url": "https://api.github.com/repos/php-enqueue/null/zipball/c7174da80c59b04391c5194cebe46b6f85d79fb4", + "reference": "c7174da80c59b04391c5194cebe46b6f85d79fb4", "shasum": "" }, "require": { - "php": "^7.3|^8.0", + "php": "^7.4|^8.0", "queue-interop/queue-interop": "^0.8" }, "require-dev": { @@ -2418,25 +2348,25 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-03-23T09:50:55+00:00" }, { "name": "enqueue/redis", - "version": "0.10.18", + "version": "0.10.19", "source": { "type": "git", "url": "https://github.com/php-enqueue/redis.git", - "reference": "7c3156c812c5d039d0296e3a109d6d07cb62dc16" + "reference": "7aa6f64dd7fbd106aa3695d4fbd6ef5d579a5411" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-enqueue/redis/zipball/7c3156c812c5d039d0296e3a109d6d07cb62dc16", - "reference": "7c3156c812c5d039d0296e3a109d6d07cb62dc16", + "url": "https://api.github.com/repos/php-enqueue/redis/zipball/7aa6f64dd7fbd106aa3695d4fbd6ef5d579a5411", + "reference": "7aa6f64dd7fbd106aa3695d4fbd6ef5d579a5411", "shasum": "" }, "require": { "enqueue/dsn": "^0.10", - "php": "^7.3|^8.0", + "php": "^7.4|^8.0", "queue-interop/queue-interop": "^0.8", "ramsey/uuid": "^3.5|^4" }, @@ -2482,7 +2412,7 @@ "issues": "https://github.com/php-enqueue/enqueue-dev/issues", "source": "https://github.com/php-enqueue/enqueue-dev" }, - "time": "2023-02-26T03:18:02+00:00" + "time": "2023-05-20T05:16:02+00:00" }, { "name": "ezyang/htmlpurifier", @@ -2540,16 +2470,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.5.0", + "version": "v6.8.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2" + "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/e94e7353302b0c11ec3cfff7180cd0b1743975d2", - "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5dbc8959427416b8ee09a100d7a8588c00fb2e26", + "reference": "5dbc8959427416b8ee09a100d7a8588c00fb2e26", "shasum": "" }, "require": { @@ -2597,9 +2527,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.5.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.8.1" }, - "time": "2023-05-12T15:47:07+00:00" + "time": "2023-07-14T18:33:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -2852,32 +2782,32 @@ }, { "name": "google/cloud-core", - "version": "v1.51.2", + "version": "v1.52.4", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-core.git", - "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79" + "reference": "21c004745a32c71e03ab62effd7fbee0cf3ae7c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/85dc48d62143f4bbfaa34c24da95003371de7b79", - "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/21c004745a32c71e03ab62effd7fbee0cf3ae7c6", + "reference": "21c004745a32c71e03ab62effd7fbee0cf3ae7c6", "shasum": "" }, "require": { "google/auth": "^1.18", - "guzzlehttp/guzzle": "^5.3|^6.5.7|^7.4.4", - "guzzlehttp/promises": "^1.3", + "guzzlehttp/guzzle": "^6.5.8|^7.4.4", + "guzzlehttp/promises": "^1.4||^2.0", "guzzlehttp/psr7": "^1.7|^2.0", "monolog/monolog": "^1.1|^2.0|^3.0", "php": ">=7.4", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0|^2.0", "rize/uri-template": "~0.3" }, "require-dev": { "erusev/parsedown": "^1.6", "google/cloud-common-protos": "^0.4", - "google/gax": "^1.9", + "google/gax": "^1.19.1", "opis/closure": "^3", "phpdocumentor/reflection": "^5.0", "phpspec/prophecy-phpunit": "^2.0", @@ -2911,9 +2841,9 @@ ], "description": "Google Cloud PHP shared dependency, providing functionality useful to all components.", "support": { - "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.51.2" + "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.52.4" }, - "time": "2023-05-05T23:01:42+00:00" + "time": "2023-09-15T20:50:36+00:00" }, { "name": "google/cloud-storage", @@ -2971,21 +2901,21 @@ }, { "name": "google/cloud-translate", - "version": "v1.14.0", + "version": "v1.15.1", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-translate.git", - "reference": "f8e07aa5def686458b31ad355f232d25cbba4cd1" + "reference": "ae9f93672e8dd12d49fa75b4fdba838d622f58c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-translate/zipball/f8e07aa5def686458b31ad355f232d25cbba4cd1", - "reference": "f8e07aa5def686458b31ad355f232d25cbba4cd1", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-translate/zipball/ae9f93672e8dd12d49fa75b4fdba838d622f58c8", + "reference": "ae9f93672e8dd12d49fa75b4fdba838d622f58c8", "shasum": "" }, "require": { "google/cloud-core": "^1.39", - "google/gax": "^1.1", + "google/gax": "^1.19.1", "php": ">=7.4" }, "require-dev": { @@ -3020,9 +2950,9 @@ ], "description": "Cloud Translation Client for PHP", "support": { - "source": "https://github.com/googleapis/google-cloud-php-translate/tree/v1.14.0" + "source": "https://github.com/googleapis/google-cloud-php-translate/tree/v1.15.1" }, - "time": "2023-06-02T23:56:27+00:00" + "time": "2023-09-15T20:50:36+00:00" }, { "name": "google/common-protos", @@ -3269,16 +3199,16 @@ }, { "name": "google/protobuf", - "version": "v3.23.2", + "version": "v3.24.3", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "2349098298b847814e3af4f6452ec43c65c8c4fb" + "reference": "2fc191fc5e137829081b8700086ac6ed7003b925" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/2349098298b847814e3af4f6452ec43c65c8c4fb", - "reference": "2349098298b847814e3af4f6452ec43c65c8c4fb", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/2fc191fc5e137829081b8700086ac6ed7003b925", + "reference": "2fc191fc5e137829081b8700086ac6ed7003b925", "shasum": "" }, "require": { @@ -3307,22 +3237,22 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.23.2" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.24.3" }, - "time": "2023-05-25T22:33:09+00:00" + "time": "2023-09-07T15:39:13+00:00" }, { "name": "grpc/grpc", - "version": "1.52.0", + "version": "1.57.0", "source": { "type": "git", "url": "https://github.com/grpc/grpc-php.git", - "reference": "98394cd601a587ca68294e6209bd713856969105" + "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grpc/grpc-php/zipball/98394cd601a587ca68294e6209bd713856969105", - "reference": "98394cd601a587ca68294e6209bd713856969105", + "url": "https://api.github.com/repos/grpc/grpc-php/zipball/b610c42022ed3a22f831439cb93802f2a4502fdf", + "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf", "shasum": "" }, "require": { @@ -3351,9 +3281,9 @@ "rpc" ], "support": { - "source": "https://github.com/grpc/grpc-php/tree/v1.52.0" + "source": "https://github.com/grpc/grpc-php/tree/v1.57.0" }, - "time": "2023-02-25T05:20:08+00:00" + "time": "2023-08-14T23:57:54+00:00" }, { "name": "guzzlehttp/guzzle", @@ -4092,29 +4022,29 @@ }, { "name": "laminas/laminas-code", - "version": "4.7.1", + "version": "4.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "91aabc066d5620428120800c0eafc0411e441a62" + "reference": "36cbee228b427446419dd51944bdfb6bb8ddbcd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/91aabc066d5620428120800c0eafc0411e441a62", - "reference": "91aabc066d5620428120800c0eafc0411e441a62", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/36cbee228b427446419dd51944bdfb6bb8ddbcd0", + "reference": "36cbee228b427446419dd51944bdfb6bb8ddbcd0", "shasum": "" }, "require": { - "php": ">=7.4, <8.2" + "php": "~8.1.0 || ~8.2.0" }, "require-dev": { - "doctrine/annotations": "^1.13.2", + "doctrine/annotations": "^2.0.0", "ext-phar": "*", "laminas/laminas-coding-standard": "^2.3.0", "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.13.1" + "phpunit/phpunit": "^10.0.9", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.7.1" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", @@ -4122,9 +4052,6 @@ }, "type": "library", "autoload": { - "files": [ - "polyfill/ReflectionEnumPolyfill.php" - ], "psr-4": { "Laminas\\Code\\": "src/" } @@ -4154,35 +4081,38 @@ "type": "community_bridge" } ], - "time": "2022-11-21T01:32:31+00:00" + "time": "2023-09-06T14:56:25+00:00" }, { "name": "lcobucci/clock", - "version": "2.0.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3" + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/353d83fe2e6ae95745b16b3d911813df6a05bfb3", - "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": "~8.1.0 || ~8.2.0", + "stella-maris/clock": "^0.1.7" + }, + "provide": { + "psr/clock-implementation": "1.0" }, "require-dev": { - "infection/infection": "^0.17", - "lcobucci/coding-standard": "^6.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/php-code-coverage": "9.1.4", - "phpunit/phpunit": "9.3.7" + "infection/infection": "^0.26", + "lcobucci/coding-standard": "^9.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.27" }, "type": "library", "autoload": { @@ -4203,7 +4133,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.0.x" + "source": "https://github.com/lcobucci/clock/tree/2.3.0" }, "funding": [ { @@ -4215,7 +4145,7 @@ "type": "patreon" } ], - "time": "2020-08-27T18:56:02+00:00" + "time": "2022-12-19T14:38:11+00:00" }, { "name": "lcobucci/jwt", @@ -4561,26 +4491,26 @@ }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96", + "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -4601,7 +4531,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0" }, "funding": [ { @@ -4613,7 +4543,7 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2023-08-05T12:09:49+00:00" }, { "name": "league/oauth2-server", @@ -4705,37 +4635,38 @@ }, { "name": "league/uri", - "version": "6.7.2", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06" + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/d3b50812dd51f3fbf176344cc2981db03d10fe06", - "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0" + "php": "^8.1", + "psr/http-message": "^1.0.1" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.3.2", - "nyholm/psr7": "^1.5", - "php-http/psr7-integration-tests": "^1.1", - "phpstan/phpstan": "^1.2.0", + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^9.5.10", - "psr/http-factory": "^1.0" + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -4792,7 +4723,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.7.2" + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { @@ -4800,7 +4731,7 @@ "type": "github" } ], - "time": "2022-09-13T19:50:42+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { "name": "league/uri-interfaces", @@ -5091,25 +5022,25 @@ }, { "name": "mtdowling/jmespath.php", - "version": "2.6.1", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b", + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0", + "php": "^7.2.5 || ^8.0", "symfony/polyfill-mbstring": "^1.17" }, "require-dev": { - "composer/xdebug-handler": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^7.5.15" + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" }, "bin": [ "bin/jp.php" @@ -5117,7 +5048,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -5133,6 +5064,11 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", @@ -5146,9 +5082,9 @@ ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" + "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" }, - "time": "2021-06-14T00:11:39+00:00" + "time": "2023-08-25T10:54:48+00:00" }, { "name": "myclabs/deep-copy", @@ -5211,16 +5147,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -5261,9 +5197,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "nyholm/psr7", @@ -5819,6 +5755,140 @@ "abandoned": true, "time": "2020-10-14T08:39:05+00:00" }, + { + "name": "php-http/discovery", + "version": "1.19.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "symfony/phpunit-bridge": "^6.2" + }, + "type": "composer-plugin", + "extra": { + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr17", + "psr7" + ], + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.19.1" + }, + "time": "2023-07-11T07:02:26+00:00" + }, + { + "name": "php-http/multipart-stream-builder", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/multipart-stream-builder.git", + "reference": "f5938fd135d9fa442cc297dc98481805acfe2b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/f5938fd135d9fa442cc297dc98481805acfe2b6a", + "reference": "f5938fd135d9fa442cc297dc98481805acfe2b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/discovery": "^1.15", + "psr/http-factory-implementation": "^1.0" + }, + "require-dev": { + "nyholm/psr7": "^1.0", + "php-http/message": "^1.5", + "php-http/message-factory": "^1.0.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Message\\MultipartStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + } + ], + "description": "A builder class that help you create a multipart stream", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "multipart stream", + "stream" + ], + "support": { + "issues": "https://github.com/php-http/multipart-stream-builder/issues", + "source": "https://github.com/php-http/multipart-stream-builder/tree/1.3.0" + }, + "time": "2023-04-28T14:10:22+00:00" + }, { "name": "phpcompatibility/php-compatibility", "version": "9.3.5", @@ -5942,16 +6012,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -6007,7 +6077,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -6015,7 +6086,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6260,16 +6331,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.8", + "version": "9.6.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", - "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", "shasum": "" }, "require": { @@ -6284,7 +6355,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -6343,7 +6414,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" }, "funding": [ { @@ -6359,7 +6430,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T05:14:45+00:00" + "time": "2023-09-19T05:39:22+00:00" }, { "name": "psr/cache", @@ -6410,6 +6481,54 @@ }, "time": "2016-08-06T20:24:11+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "1.1.2", @@ -6858,21 +6977,20 @@ }, { "name": "ramsey/collection", - "version": "1.3.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", - "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "symfony/polyfill-php81": "^1.23" + "php": "^8.1" }, "require-dev": { "captainhook/plugin-composer": "^5.3", @@ -6932,7 +7050,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.3.0" + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, "funding": [ { @@ -6944,29 +7062,27 @@ "type": "tidelift" } ], - "time": "2022-12-27T19:12:24+00:00" + "time": "2022-12-31T21:50:55+00:00" }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.7.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "60a4c63ab724854332900504274f6150ff26d286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", + "reference": "60a4c63ab724854332900504274f6150ff26d286", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -6978,24 +7094,23 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -7003,9 +7118,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -7030,7 +7142,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.7.4" }, "funding": [ { @@ -7042,7 +7154,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2023-04-15T23:01:58+00:00" }, { "name": "react/promise", @@ -7291,16 +7403,16 @@ }, { "name": "sanmai/pipeline", - "version": "v6.7", + "version": "v6.8.1", "source": { "type": "git", "url": "https://github.com/sanmai/pipeline.git", - "reference": "0e5c45c8046298212347a0bfb659126af8e75d2e" + "reference": "2e88e466dd49f20c10a15330b3953d4d49c326e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sanmai/pipeline/zipball/0e5c45c8046298212347a0bfb659126af8e75d2e", - "reference": "0e5c45c8046298212347a0bfb659126af8e75d2e", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/2e88e466dd49f20c10a15330b3953d4d49c326e3", + "reference": "2e88e466dd49f20c10a15330b3953d4d49c326e3", "shasum": "" }, "require": { @@ -7308,7 +7420,7 @@ }, "require-dev": { "ergebnis/composer-normalize": "^2.8", - "friendsofphp/php-cs-fixer": "^3", + "friendsofphp/php-cs-fixer": "^3.17", "infection/infection": ">=0.10.5", "league/pipeline": "^0.3 || ^1.0", "phan/phan": ">=1.1", @@ -7344,7 +7456,7 @@ "description": "General-purpose collections pipeline", "support": { "issues": "https://github.com/sanmai/pipeline/issues", - "source": "https://github.com/sanmai/pipeline/tree/v6.7" + "source": "https://github.com/sanmai/pipeline/tree/v6.8.1" }, "funding": [ { @@ -7352,7 +7464,7 @@ "type": "github" } ], - "time": "2023-04-29T11:21:51+00:00" + "time": "2023-06-15T09:14:47+00:00" }, { "name": "scssphp/scssphp", @@ -7940,16 +8052,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -7992,7 +8104,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -8000,7 +8112,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -9249,6 +9361,53 @@ }, "time": "2020-01-22T14:45:26+00:00" }, + { + "name": "stella-maris/clock", + "version": "0.1.7", + "source": { + "type": "git", + "url": "https://github.com/stella-maris-solutions/clock.git", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "psr/clock": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "StellaMaris\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Heigl", + "role": "Maintainer" + } + ], + "description": "A pre-release of the proposed PSR-20 Clock-Interface", + "homepage": "https://gitlab.com/stella-maris/clock", + "keywords": [ + "clock", + "datetime", + "point in time", + "psr20" + ], + "support": { + "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" + }, + "time": "2022-11-25T16:15:06+00:00" + }, { "name": "superbalist/flysystem-google-storage", "version": "7.2.2", @@ -9302,28 +9461,28 @@ }, { "name": "symfony/amqp-messenger", - "version": "v5.4.22", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/amqp-messenger.git", - "reference": "6343af983ba7460f7ea984aacb95d1ed382f6e40" + "reference": "14cd4f200a500ed91d05c3dd44322067cc522aaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/amqp-messenger/zipball/6343af983ba7460f7ea984aacb95d1ed382f6e40", - "reference": "6343af983ba7460f7ea984aacb95d1ed382f6e40", + "url": "https://api.github.com/repos/symfony/amqp-messenger/zipball/14cd4f200a500ed91d05c3dd44322067cc522aaf", + "reference": "14cd4f200a500ed91d05c3dd44322067cc522aaf", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/messenger": "^5.3|^6.0" + "ext-amqp": "*", + "php": ">=8.0.2", + "symfony/messenger": "^5.4|^6.0" }, "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "symfony-messenger-bridge", "autoload": { @@ -9351,7 +9510,7 @@ "description": "Symfony AMQP extension Messenger Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/amqp-messenger/tree/v5.4.22" + "source": "https://github.com/symfony/amqp-messenger/tree/v6.0.19" }, "funding": [ { @@ -9367,7 +9526,7 @@ "type": "tidelift" } ], - "time": "2023-03-10T09:58:14+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/asset", @@ -9445,16 +9604,16 @@ }, { "name": "symfony/cache", - "version": "v5.4.23", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" + "reference": "62b7ae3bccc5b474a30fadc7ef6bbc362007d3f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", + "url": "https://api.github.com/repos/symfony/cache/zipball/62b7ae3bccc5b474a30fadc7ef6bbc362007d3f9", + "reference": "62b7ae3bccc5b474a30fadc7ef6bbc362007d3f9", "shasum": "" }, "require": { @@ -9522,7 +9681,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.23" + "source": "https://github.com/symfony/cache/tree/v5.4.28" }, "funding": [ { @@ -9538,7 +9697,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:38:51+00:00" + "time": "2023-08-05T08:32:42+00:00" }, { "name": "symfony/cache-contracts", @@ -9621,16 +9780,16 @@ }, { "name": "symfony/config", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4" + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/2a6b1111d038adfa15d52c0871e540f3b352d1e4", - "reference": "2a6b1111d038adfa15d52c0871e540f3b352d1e4", + "url": "https://api.github.com/repos/symfony/config/zipball/8109892f27beed9252bd1f1c1880aeb4ad842650", + "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650", "shasum": "" }, "require": { @@ -9680,7 +9839,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.4.21" + "source": "https://github.com/symfony/config/tree/v5.4.26" }, "funding": [ { @@ -9696,20 +9855,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-19T20:21:11+00:00" }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "f4f71842f24c2023b91237c72a365306f3c58827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", + "reference": "f4f71842f24c2023b91237c72a365306f3c58827", "shasum": "" }, "require": { @@ -9779,7 +9938,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.28" }, "funding": [ { @@ -9795,20 +9954,20 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-08-07T06:12:30+00:00" }, { "name": "symfony/debug-bundle", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/debug-bundle.git", - "reference": "8b4360bf8ce9a917ef8796c5e6065a185d8722bd" + "reference": "17c372891d4554d5d2f5cf602aef02c859ad52d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug-bundle/zipball/8b4360bf8ce9a917ef8796c5e6065a185d8722bd", - "reference": "8b4360bf8ce9a917ef8796c5e6065a185d8722bd", + "url": "https://api.github.com/repos/symfony/debug-bundle/zipball/17c372891d4554d5d2f5cf602aef02c859ad52d8", + "reference": "17c372891d4554d5d2f5cf602aef02c859ad52d8", "shasum": "" }, "require": { @@ -9858,7 +10017,7 @@ "description": "Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug-bundle/tree/v5.4.21" + "source": "https://github.com/symfony/debug-bundle/tree/v5.4.26" }, "funding": [ { @@ -9874,20 +10033,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-11T21:42:03+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da" + "reference": "addc22fed594f9ce04e73ef6a9d3e2416f77192d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4645e032d0963fb614969398ca28e47605b1a7da", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/addc22fed594f9ce04e73ef6a9d3e2416f77192d", + "reference": "addc22fed594f9ce04e73ef6a9d3e2416f77192d", "shasum": "" }, "require": { @@ -9947,7 +10106,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.24" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.28" }, "funding": [ { @@ -9963,7 +10122,7 @@ "type": "tidelift" } ], - "time": "2023-05-05T14:42:55+00:00" + "time": "2023-08-14T10:47:38+00:00" }, { "name": "symfony/deprecation-contracts", @@ -10034,32 +10193,31 @@ }, { "name": "symfony/doctrine-messenger", - "version": "v5.4.23", + "version": "v6.2.12", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-messenger.git", - "reference": "1667cc4d3b2741ada859f76743d25936d3617909" + "reference": "f8fb54b7325d0c3bcc2b1b1c70461eaa3dd7f0f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-messenger/zipball/1667cc4d3b2741ada859f76743d25936d3617909", - "reference": "1667cc4d3b2741ada859f76743d25936d3617909", + "url": "https://api.github.com/repos/symfony/doctrine-messenger/zipball/f8fb54b7325d0c3bcc2b1b1c70461eaa3dd7f0f5", + "reference": "f8fb54b7325d0c3bcc2b1b1c70461eaa3dd7f0f5", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/messenger": "^5.1|^6.0", + "doctrine/dbal": "^2.13|^3.0", + "php": ">=8.1", + "symfony/messenger": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2|^3" }, "conflict": { - "doctrine/dbal": "<2.13", "doctrine/persistence": "<1.3" }, "require-dev": { - "doctrine/dbal": "^2.13|^3.0", "doctrine/persistence": "^1.3|^2|^3", - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/property-access": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "symfony-messenger-bridge", "autoload": { @@ -10087,7 +10245,7 @@ "description": "Symfony Doctrine Messenger Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-messenger/tree/v5.4.23" + "source": "https://github.com/symfony/doctrine-messenger/tree/v6.2.12" }, "funding": [ { @@ -10103,7 +10261,7 @@ "type": "tidelift" } ], - "time": "2023-04-18T08:26:30+00:00" + "time": "2023-06-24T11:48:11+00:00" }, { "name": "symfony/dotenv", @@ -10178,16 +10336,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946" + "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946", - "reference": "c1b9be3b8a6f60f720bec28c4ffb6fb5b00a8946", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", + "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", "shasum": "" }, "require": { @@ -10229,7 +10387,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.24" + "source": "https://github.com/symfony/error-handler/tree/v5.4.26" }, "funding": [ { @@ -10245,20 +10403,20 @@ "type": "tidelift" } ], - "time": "2023-05-02T16:13:31+00:00" + "time": "2023-07-16T16:48:57+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -10314,7 +10472,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -10330,7 +10488,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -10413,16 +10571,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -10457,7 +10615,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -10473,20 +10631,20 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { @@ -10520,7 +10678,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -10536,20 +10694,20 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/framework-bundle", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "c06a56a47817d29318aaace1c655cbde16c998e8" + "reference": "b84ebb25405c7334976b5791bfbbe0e50f4e472c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/c06a56a47817d29318aaace1c655cbde16c998e8", - "reference": "c06a56a47817d29318aaace1c655cbde16c998e8", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/b84ebb25405c7334976b5791bfbbe0e50f4e472c", + "reference": "b84ebb25405c7334976b5791bfbbe0e50f4e472c", "shasum": "" }, "require": { @@ -10595,7 +10753,7 @@ "symfony/translation": "<5.3", "symfony/twig-bridge": "<4.4", "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", + "symfony/validator": "<5.3.11", "symfony/web-profiler-bundle": "<4.4", "symfony/workflow": "<5.2" }, @@ -10628,7 +10786,7 @@ "symfony/string": "^5.0|^6.0", "symfony/translation": "^5.3|^6.0", "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", + "symfony/validator": "^5.3.11|^6.0", "symfony/web-link": "^4.4|^5.0|^6.0", "symfony/workflow": "^5.2|^6.0", "symfony/yaml": "^4.4|^5.0|^6.0", @@ -10670,7 +10828,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v5.4.24" + "source": "https://github.com/symfony/framework-bundle/tree/v5.4.28" }, "funding": [ { @@ -10686,20 +10844,20 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:05:00+00:00" + "time": "2023-08-08T11:21:07+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5" + "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2", + "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2", "shasum": "" }, "require": { @@ -10746,7 +10904,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.24" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.28" }, "funding": [ { @@ -10762,20 +10920,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T07:21:23+00:00" + "time": "2023-08-21T07:23:18+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1" + "reference": "127a2322ca1828157901092518b8ea8e4e1109d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/127a2322ca1828157901092518b8ea8e4e1109d4", + "reference": "127a2322ca1828157901092518b8ea8e4e1109d4", "shasum": "" }, "require": { @@ -10858,7 +11016,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.24" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.28" }, "funding": [ { @@ -10874,7 +11032,7 @@ "type": "tidelift" } ], - "time": "2023-05-27T08:06:30+00:00" + "time": "2023-08-26T13:47:51+00:00" }, { "name": "symfony/inflector", @@ -10951,37 +11109,31 @@ }, { "name": "symfony/intl", - "version": "v5.4.23", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "962789bbc76c82c266623321ffc24416f574b636" + "reference": "1f8cb145c869ed089a8531c51a6a4b31ed0b3c69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/962789bbc76c82c266623321ffc24416f574b636", - "reference": "962789bbc76c82c266623321ffc24416f574b636", + "url": "https://api.github.com/repos/symfony/intl/zipball/1f8cb145c869ed089a8531c51a6a4b31ed0b3c69", + "reference": "1f8cb145c869ed089a8531c51a6a4b31ed0b3c69", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^4.4|^5.0|^6.0" + "symfony/filesystem": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "files": [ - "Resources/functions.php" - ], "psr-4": { "Symfony\\Component\\Intl\\": "" }, - "classmap": [ - "Resources/stubs" - ], "exclude-from-classmap": [ "/Tests/" ] @@ -11008,7 +11160,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library", + "description": "Provides access to the localization data of the ICU library", "homepage": "https://symfony.com", "keywords": [ "i18n", @@ -11019,7 +11171,7 @@ "localization" ], "support": { - "source": "https://github.com/symfony/intl/tree/v5.4.23" + "source": "https://github.com/symfony/intl/tree/v6.3.2" }, "funding": [ { @@ -11035,27 +11187,25 @@ "type": "tidelift" } ], - "time": "2023-04-13T10:36:25+00:00" + "time": "2023-07-20T07:43:09+00:00" }, { "name": "symfony/lock", - "version": "v5.4.22", + "version": "v6.1.11", "source": { "type": "git", "url": "https://github.com/symfony/lock.git", - "reference": "cc0565235e16ef403097fbd30eba59690bee6b3c" + "reference": "cbc3366559a568ed56d9e7ed6d8e29a083eebb5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/lock/zipball/cc0565235e16ef403097fbd30eba59690bee6b3c", - "reference": "cc0565235e16ef403097fbd30eba59690bee6b3c", + "url": "https://api.github.com/repos/symfony/lock/zipball/cbc3366559a568ed56d9e7ed6d8e29a083eebb5b", + "reference": "cbc3366559a568ed56d9e7ed6d8e29a083eebb5b", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "psr/log": "^1|^2|^3" }, "conflict": { "doctrine/dbal": "<2.13" @@ -11098,7 +11248,7 @@ "semaphore" ], "support": { - "source": "https://github.com/symfony/lock/tree/v5.4.22" + "source": "https://github.com/symfony/lock/tree/v6.1.11" }, "funding": [ { @@ -11114,7 +11264,7 @@ "type": "tidelift" } ], - "time": "2023-03-10T16:52:09+00:00" + "time": "2023-01-01T08:36:55+00:00" }, { "name": "symfony/mailer", @@ -11194,16 +11344,16 @@ }, { "name": "symfony/messenger", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/messenger.git", - "reference": "75e57d48758d43127377d1310970882446ec7d91" + "reference": "39b0c94ef74c3558caeb87fc480bcef6da65be82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/messenger/zipball/75e57d48758d43127377d1310970882446ec7d91", - "reference": "75e57d48758d43127377d1310970882446ec7d91", + "url": "https://api.github.com/repos/symfony/messenger/zipball/39b0c94ef74c3558caeb87fc480bcef6da65be82", + "reference": "39b0c94ef74c3558caeb87fc480bcef6da65be82", "shasum": "" }, "require": { @@ -11264,7 +11414,7 @@ "description": "Helps applications send and receive messages to/from other applications or via message queues", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/messenger/tree/v5.4.24" + "source": "https://github.com/symfony/messenger/tree/v5.4.28" }, "funding": [ { @@ -11280,20 +11430,20 @@ "type": "tidelift" } ], - "time": "2023-05-12T08:59:19+00:00" + "time": "2023-08-12T16:35:23+00:00" }, { "name": "symfony/mime", - "version": "v5.4.23", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3" + "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ae0a1032a450a3abf305ee44fc55ed423fbf16e3", - "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3", + "url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2", + "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2", "shasum": "" }, "require": { @@ -11308,7 +11458,7 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4", - "symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6" + "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", @@ -11316,7 +11466,7 @@ "symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" + "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2" }, "type": "library", "autoload": { @@ -11348,7 +11498,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.23" + "source": "https://github.com/symfony/mime/tree/v5.4.26" }, "funding": [ { @@ -11364,7 +11514,7 @@ "type": "tidelift" } ], - "time": "2023-04-19T09:49:13+00:00" + "time": "2023-07-27T06:29:31+00:00" }, { "name": "symfony/monolog-bridge", @@ -11602,28 +11752,27 @@ }, { "name": "symfony/password-hasher", - "version": "v5.4.21", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/password-hasher.git", - "reference": "7ce4529b2b2ea7de3b6f344a1a41f58201999180" + "reference": "d23ad221989e6b8278d050cabfd7b569eee84590" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/password-hasher/zipball/7ce4529b2b2ea7de3b6f344a1a41f58201999180", - "reference": "7ce4529b2b2ea7de3b6f344a1a41f58201999180", + "url": "https://api.github.com/repos/symfony/password-hasher/zipball/d23ad221989e6b8278d050cabfd7b569eee84590", + "reference": "d23ad221989e6b8278d050cabfd7b569eee84590", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "php": ">=8.1" }, "conflict": { - "symfony/security-core": "<5.3" + "symfony/security-core": "<5.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0", - "symfony/security-core": "^5.3|^6.0" + "symfony/console": "^5.4|^6.0", + "symfony/security-core": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -11655,7 +11804,7 @@ "password" ], "support": { - "source": "https://github.com/symfony/password-hasher/tree/v5.4.21" + "source": "https://github.com/symfony/password-hasher/tree/v6.3.0" }, "funding": [ { @@ -11671,20 +11820,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-02-14T09:04:20+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -11699,7 +11848,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -11737,7 +11886,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -11753,20 +11902,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -11778,7 +11927,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -11818,7 +11967,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -11834,20 +11983,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", "shasum": "" }, "require": { @@ -11861,7 +12010,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -11905,7 +12054,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -11921,20 +12070,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:30:37+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -11946,7 +12095,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -11989,7 +12138,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -12005,20 +12154,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -12033,7 +12182,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -12072,7 +12221,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -12088,7 +12237,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php70", @@ -12160,16 +12309,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", "shasum": "" }, "require": { @@ -12178,7 +12327,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -12216,7 +12365,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -12232,20 +12381,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -12254,7 +12403,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -12295,7 +12444,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -12311,7 +12460,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", @@ -12477,16 +12626,16 @@ }, { "name": "symfony/process", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64" + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64", + "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", "shasum": "" }, "require": { @@ -12519,7 +12668,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.24" + "source": "https://github.com/symfony/process/tree/v5.4.28" }, "funding": [ { @@ -12535,20 +12684,20 @@ "type": "tidelift" } ], - "time": "2023-05-17T11:26:05+00:00" + "time": "2023-08-07T10:36:04+00:00" }, { "name": "symfony/property-access", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "ffee082889586b5718347b291e04071f4d07b38f" + "reference": "0249e46f69e92049a488f39fcf531cb42c50caaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/ffee082889586b5718347b291e04071f4d07b38f", - "reference": "ffee082889586b5718347b291e04071f4d07b38f", + "url": "https://api.github.com/repos/symfony/property-access/zipball/0249e46f69e92049a488f39fcf531cb42c50caaa", + "reference": "0249e46f69e92049a488f39fcf531cb42c50caaa", "shasum": "" }, "require": { @@ -12600,7 +12749,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v5.4.22" + "source": "https://github.com/symfony/property-access/tree/v5.4.26" }, "funding": [ { @@ -12616,7 +12765,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T14:59:20+00:00" + "time": "2023-07-13T15:20:41+00:00" }, { "name": "symfony/property-info", @@ -12866,16 +13015,16 @@ }, { "name": "symfony/rate-limiter", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/rate-limiter.git", - "reference": "342acb2d23f6012f6150e7a8b167bf9cd931c0f8" + "reference": "189c8aa18be55c734d56d8ea8b0d1862e9a0e493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/342acb2d23f6012f6150e7a8b167bf9cd931c0f8", - "reference": "342acb2d23f6012f6150e7a8b167bf9cd931c0f8", + "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/189c8aa18be55c734d56d8ea8b0d1862e9a0e493", + "reference": "189c8aa18be55c734d56d8ea8b0d1862e9a0e493", "shasum": "" }, "require": { @@ -12916,7 +13065,7 @@ "rate-limiter" ], "support": { - "source": "https://github.com/symfony/rate-limiter/tree/v5.4.21" + "source": "https://github.com/symfony/rate-limiter/tree/v5.4.26" }, "funding": [ { @@ -12932,30 +13081,30 @@ "type": "tidelift" } ], - "time": "2023-02-21T19:46:44+00:00" + "time": "2023-07-10T11:10:11+00:00" }, { "name": "symfony/redis-messenger", - "version": "v5.4.23", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/redis-messenger.git", - "reference": "d9c0a6d7e3e925817f1ce7ec7416cc0e29b331e1" + "reference": "75183a574bae512ae38beb0f3e623e6c4d708789" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/redis-messenger/zipball/d9c0a6d7e3e925817f1ce7ec7416cc0e29b331e1", - "reference": "d9c0a6d7e3e925817f1ce7ec7416cc0e29b331e1", + "url": "https://api.github.com/repos/symfony/redis-messenger/zipball/75183a574bae512ae38beb0f3e623e6c4d708789", + "reference": "75183a574bae512ae38beb0f3e623e6c4d708789", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/messenger": "^5.1|^6.0" + "ext-redis": "*", + "php": ">=8.0.2", + "symfony/messenger": "^5.4|^6.0" }, "require-dev": { - "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/property-access": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "symfony-messenger-bridge", "autoload": { @@ -12983,7 +13132,7 @@ "description": "Symfony Redis extension Messenger Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/redis-messenger/tree/v5.4.23" + "source": "https://github.com/symfony/redis-messenger/tree/v6.0.19" }, "funding": [ { @@ -12999,20 +13148,20 @@ "type": "tidelift" } ], - "time": "2023-04-18T09:57:31+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/routing", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d" + "reference": "853fc7df96befc468692de0a48831b38f04d2cb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d", + "url": "https://api.github.com/repos/symfony/routing/zipball/853fc7df96befc468692de0a48831b38f04d2cb2", + "reference": "853fc7df96befc468692de0a48831b38f04d2cb2", "shasum": "" }, "require": { @@ -13073,7 +13222,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.22" + "source": "https://github.com/symfony/routing/tree/v5.4.26" }, "funding": [ { @@ -13089,7 +13238,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T14:59:20+00:00" + "time": "2023-07-24T13:28:37+00:00" }, { "name": "symfony/security-core", @@ -13186,20 +13335,21 @@ }, { "name": "symfony/security-csrf", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/security-csrf.git", - "reference": "776a538e5f20fb560a182f790979c71455694203" + "reference": "995fcfcc5a3be09df157b4960668f61cceb86611" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-csrf/zipball/776a538e5f20fb560a182f790979c71455694203", - "reference": "776a538e5f20fb560a182f790979c71455694203", + "url": "https://api.github.com/repos/symfony/security-csrf/zipball/995fcfcc5a3be09df157b4960668f61cceb86611", + "reference": "995fcfcc5a3be09df157b4960668f61cceb86611", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16", "symfony/security-core": "^4.4|^5.0|^6.0" }, @@ -13238,7 +13388,7 @@ "description": "Symfony Security Component - CSRF Library", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-csrf/tree/v5.4.21" + "source": "https://github.com/symfony/security-csrf/tree/v5.4.27" }, "funding": [ { @@ -13254,20 +13404,20 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-28T14:44:35+00:00" }, { "name": "symfony/serializer", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "12535bb7b1d3b53802bf18d61a98bb1145fabcdb" + "reference": "701e2b8d48a3a627ffe128b38fbe6c4cf3ddcb3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/12535bb7b1d3b53802bf18d61a98bb1145fabcdb", - "reference": "12535bb7b1d3b53802bf18d61a98bb1145fabcdb", + "url": "https://api.github.com/repos/symfony/serializer/zipball/701e2b8d48a3a627ffe128b38fbe6c4cf3ddcb3c", + "reference": "701e2b8d48a3a627ffe128b38fbe6c4cf3ddcb3c", "shasum": "" }, "require": { @@ -13282,7 +13432,7 @@ "phpdocumentor/type-resolver": "<1.4.0", "symfony/dependency-injection": "<4.4", "symfony/property-access": "<5.4", - "symfony/property-info": "<5.3.13", + "symfony/property-info": "<5.4.24|>=6,<6.2.11", "symfony/uid": "<5.3", "symfony/yaml": "<4.4" }, @@ -13299,7 +13449,7 @@ "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/mime": "^4.4|^5.0|^6.0", "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.3.13|^6.0", + "symfony/property-info": "^5.4.24|^6.2.11", "symfony/uid": "^5.3|^6.0", "symfony/validator": "^4.4|^5.0|^6.0", "symfony/var-dumper": "^4.4|^5.0|^6.0", @@ -13341,7 +13491,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v5.4.24" + "source": "https://github.com/symfony/serializer/tree/v5.4.28" }, "funding": [ { @@ -13357,7 +13507,7 @@ "type": "tidelift" } ], - "time": "2023-05-12T08:37:35+00:00" + "time": "2023-08-24T14:14:18+00:00" }, { "name": "symfony/service-contracts", @@ -13502,34 +13652,34 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v6.2.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "d0a29e15c4225c128d8de89241f923345393c0cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/d0a29e15c4225c128d8de89241f923345393c0cf", + "reference": "d0a29e15c4225c128d8de89241f923345393c0cf", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -13568,7 +13718,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v6.2.13" }, "funding": [ { @@ -13584,7 +13734,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-07-05T08:41:15+00:00" }, { "name": "symfony/translation", @@ -13763,16 +13913,16 @@ }, { "name": "symfony/twig-bridge", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "e5b174464f68be6876046db3ad6e217d9a7dbbac" + "reference": "832461a5f556df7933fd82e75b097d76182c640b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e5b174464f68be6876046db3ad6e217d9a7dbbac", - "reference": "e5b174464f68be6876046db3ad6e217d9a7dbbac", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/832461a5f556df7933fd82e75b097d76182c640b", + "reference": "832461a5f556df7933fd82e75b097d76182c640b", "shasum": "" }, "require": { @@ -13864,7 +14014,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v5.4.22" + "source": "https://github.com/symfony/twig-bridge/tree/v5.4.26" }, "funding": [ { @@ -13880,25 +14030,26 @@ "type": "tidelift" } ], - "time": "2023-03-31T08:28:44+00:00" + "time": "2023-07-20T16:28:53+00:00" }, { "name": "symfony/twig-bundle", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/twig-bundle.git", - "reference": "875d0edfc8df7505c1993419882c4071fc28c477" + "reference": "a16996ad54d75e220e91a0c7517437ad592eccca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/875d0edfc8df7505c1993419882c4071fc28c477", - "reference": "875d0edfc8df7505c1993419882c4071fc28c477", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/a16996ad54d75e220e91a0c7517437ad592eccca", + "reference": "a16996ad54d75e220e91a0c7517437ad592eccca", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/config": "^4.4|^5.0|^6.0", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/http-foundation": "^4.4|^5.0|^6.0", "symfony/http-kernel": "^5.0|^6.0", "symfony/polyfill-ctype": "~1.8", @@ -13953,7 +14104,7 @@ "description": "Provides a tight integration of Twig into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bundle/tree/v5.4.21" + "source": "https://github.com/symfony/twig-bundle/tree/v5.4.27" }, "funding": [ { @@ -13969,20 +14120,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-07-28T14:44:35+00:00" }, { "name": "symfony/validator", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "47794a3cb530e01593ecad9856ba80f5c011e36b" + "reference": "0acdcb86a8fc5ffd71c3b060184d2ed20a76a2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/47794a3cb530e01593ecad9856ba80f5c011e36b", - "reference": "47794a3cb530e01593ecad9856ba80f5c011e36b", + "url": "https://api.github.com/repos/symfony/validator/zipball/0acdcb86a8fc5ffd71c3b060184d2ed20a76a2c9", + "reference": "0acdcb86a8fc5ffd71c3b060184d2ed20a76a2c9", "shasum": "" }, "require": { @@ -14065,7 +14216,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v5.4.24" + "source": "https://github.com/symfony/validator/tree/v5.4.28" }, "funding": [ { @@ -14081,42 +14232,37 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:05:00+00:00" + "time": "2023-08-14T13:04:17+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.24", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3" + "reference": "34e5ca671222670ae00749d1f554713021f8ef63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/34e5ca671222670ae00749d1f554713021f8ef63", + "reference": "34e5ca671222670ae00749d1f554713021f8ef63", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, "bin": [ "Resources/bin/var-dump-server" ], @@ -14153,7 +14299,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.24" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.2" }, "funding": [ { @@ -14169,20 +14315,20 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:05:00+00:00" + "time": "2023-07-21T07:05:52+00:00" }, { "name": "symfony/var-exporter", - "version": "v5.4.21", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "be74908a6942fdd331554b3cec27ff41b45ccad4" + "reference": "11401fe94f960249b3c63a488c63ba73091c1e4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/be74908a6942fdd331554b3cec27ff41b45ccad4", - "reference": "be74908a6942fdd331554b3cec27ff41b45ccad4", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/11401fe94f960249b3c63a488c63ba73091c1e4a", + "reference": "11401fe94f960249b3c63a488c63ba73091c1e4a", "shasum": "" }, "require": { @@ -14226,7 +14372,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.4.21" + "source": "https://github.com/symfony/var-exporter/tree/v5.4.26" }, "funding": [ { @@ -14242,7 +14388,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T19:46:44+00:00" + "time": "2023-07-20T07:21:16+00:00" }, { "name": "symfony/yaml", diff --git a/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php b/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php new file mode 100644 index 000000000..a94b1725a --- /dev/null +++ b/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php @@ -0,0 +1,33 @@ +add(new OneToOneAssociationField(self::ORDER_LINE_ITEM_PROPERTY_NAME, 'id', 'order_line_item_id', RefundItemDefinition::class)); + } +} diff --git a/src/Components/RefundManager/DAL/Refund/RefundDefinition.php b/src/Components/RefundManager/DAL/Refund/RefundDefinition.php index 659281033..019de024f 100644 --- a/src/Components/RefundManager/DAL/Refund/RefundDefinition.php +++ b/src/Components/RefundManager/DAL/Refund/RefundDefinition.php @@ -3,6 +3,7 @@ namespace Kiener\MolliePayments\Components\RefundManager\DAL\Refund; +use Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem\RefundItemDefinition; use Shopware\Core\Checkout\Order\OrderDefinition; use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition; use Shopware\Core\Framework\DataAbstractionLayer\Field\FkField; @@ -10,6 +11,7 @@ use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\Required; use Shopware\Core\Framework\DataAbstractionLayer\Field\IdField; use Shopware\Core\Framework\DataAbstractionLayer\Field\LongTextField; +use Shopware\Core\Framework\DataAbstractionLayer\Field\OneToManyAssociationField; use Shopware\Core\Framework\DataAbstractionLayer\Field\ReferenceVersionField; use Shopware\Core\Framework\DataAbstractionLayer\Field\StringField; use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection; @@ -59,6 +61,7 @@ protected function defineFields(): FieldCollection new LongTextField('public_description', 'publicDescription'), new LongTextField('internal_description', 'internalDescription'), + new OneToManyAssociationField('refundItems', RefundItemDefinition::class, 'refund_id') ]); } } diff --git a/src/Components/RefundManager/DAL/Refund/RefundEntity.php b/src/Components/RefundManager/DAL/Refund/RefundEntity.php index 02c0ccada..a81ddccbc 100644 --- a/src/Components/RefundManager/DAL/Refund/RefundEntity.php +++ b/src/Components/RefundManager/DAL/Refund/RefundEntity.php @@ -2,6 +2,7 @@ namespace Kiener\MolliePayments\Components\RefundManager\DAL\Refund; +use Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem\RefundItemCollection; use Shopware\Core\Framework\DataAbstractionLayer\Entity; use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait; @@ -36,6 +37,17 @@ class RefundEntity extends Entity */ protected $internalDescription; + /** + * @var RefundItemCollection + */ + protected $refundItems; + + public function __construct() + { + $this->refundItems = new RefundItemCollection(); + } + + /** * @return string */ @@ -120,4 +132,20 @@ public function setInternalDescription(?string $internalDescription): void { $this->internalDescription = $internalDescription; } + + /** + * @return RefundItemCollection + */ + public function getRefundItems(): RefundItemCollection + { + return $this->refundItems; + } + + /** + * @param RefundItemCollection $refundItems + */ + public function setRefundItems(RefundItemCollection $refundItems): void + { + $this->refundItems = $refundItems; + } } diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php index f216eaa24..b930f4250 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php @@ -3,6 +3,8 @@ namespace Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem; +use Google\Protobuf\Api; +use Kiener\MolliePayments\Components\RefundManager\DAL\Refund\RefundDefinition; use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemDefinition; use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition; use Shopware\Core\Framework\DataAbstractionLayer\Field\FkField; @@ -12,6 +14,9 @@ use Shopware\Core\Framework\DataAbstractionLayer\Field\FloatField; use Shopware\Core\Framework\DataAbstractionLayer\Field\IdField; use Shopware\Core\Framework\DataAbstractionLayer\Field\IntField; +use Shopware\Core\Framework\DataAbstractionLayer\Field\ManyToOneAssociationField; +use Shopware\Core\Framework\DataAbstractionLayer\Field\OneToOneAssociationField; +use Shopware\Core\Framework\DataAbstractionLayer\Field\ReferenceVersionField; use Shopware\Core\Framework\DataAbstractionLayer\Field\StringField; use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection; @@ -39,11 +44,15 @@ protected function defineFields(): FieldCollection return new FieldCollection([ (new IdField('id', 'id'))->addFlags(new Required(), new PrimaryKey(), new ApiAware()), (new StringField('type', 'type'))->addFlags(new Required(), new ApiAware()), - (new StringField('refund_id', 'refundId'))->addFlags(new Required(), new ApiAware()), + (new FkField('refund_id', 'refundId', RefundDefinition::class))->addFlags(new ApiAware()), + (new ManyToOneAssociationField('refund', 'refund_id', RefundDefinition::class))->addFlags(new ApiAware()), (new IntField('quantity', 'quantity'))->addFlags(new Required(), new ApiAware()), + (new StringField('reference', 'reference'))->addFlags(new Required(), new ApiAware()), (new FloatField('amount', 'amount'))->addFlags(new Required(), new ApiAware()), (new StringField('mollie_line_id', 'mollieLineId'))->addFlags(new Required(), new ApiAware()), - (new FkField('line_item_id', 'lineItemId', OrderLineItemDefinition::class))->addFlags(new ApiAware()), + (new FkField('order_line_item_id', 'orderLineItemId', OrderLineItemDefinition::class))->addFlags(new Required(), new ApiAware()), + new ReferenceVersionField(OrderLineItemDefinition::class, 'order_line_item_version_id'), + (new OneToOneAssociationField('orderLineItem', 'order_line_item_id', 'id', OrderLineItemDefinition::class, false))->addFlags(new ApiAware()), ]); } } diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php index 544dbc2c8..2253a5879 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -3,6 +3,7 @@ namespace Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem; +use Kiener\MolliePayments\Components\RefundManager\DAL\Refund\RefundEntity; use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemEntity; use Shopware\Core\Framework\DataAbstractionLayer\Entity; use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait; @@ -13,10 +14,12 @@ final class RefundItemEntity extends Entity protected string $type; protected string $refundId; + protected ?RefundEntity $refund; + protected string $reference; protected string $mollieLineId; protected int $quantity; protected float $amount; - protected ?string $lineItemId; + protected ?string $orderLineItemId; protected ?OrderLineItemEntity $orderLineItem; /** @@ -102,17 +105,17 @@ public function setAmount(float $amount): void /** * @return string */ - public function getLineItemId(): ?string + public function getOrderLineItemId(): ?string { - return $this->lineItemId; + return $this->orderLineItemId; } /** - * @param string $lineItemId + * @param string $orderLineItemId */ - public function setLineItemId(string $lineItemId): void + public function setOrderLineItemId(string $orderLineItemId): void { - $this->lineItemId = $lineItemId; + $this->orderLineItemId = $orderLineItemId; } /** @@ -130,4 +133,36 @@ public function setOrderLineItem(OrderLineItemEntity $orderLineItem): void { $this->orderLineItem = $orderLineItem; } + + /** + * @return null|RefundEntity + */ + public function getRefund(): ?RefundEntity + { + return $this->refund; + } + + /** + * @param null|RefundEntity $refund + */ + public function setRefund(?RefundEntity $refund): void + { + $this->refund = $refund; + } + + /** + * @return string + */ + public function getReference(): string + { + return $this->reference; + } + + /** + * @param string $reference + */ + public function setReference(string $reference): void + { + $this->reference = $reference; + } } diff --git a/src/Components/RefundManager/RefundData/RefundData.php b/src/Components/RefundManager/RefundData/RefundData.php index b96c93cd3..4d79b7514 100644 --- a/src/Components/RefundManager/RefundData/RefundData.php +++ b/src/Components/RefundManager/RefundData/RefundData.php @@ -2,6 +2,7 @@ namespace Kiener\MolliePayments\Components\RefundManager\RefundData; +use Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem\RefundItemEntity; use Kiener\MolliePayments\Components\RefundManager\RefundData\OrderItem\AbstractItem; use Mollie\Api\Resources\Refund; @@ -135,10 +136,10 @@ public function toArray() /** @var array $refundsArray */ $refundsArray = $this->refunds; foreach ($refundsArray as $refundIndex => $refund) { - if (isset($refund['metadata']['composition']) && is_array($refund['metadata']['composition'])) { - foreach ($refund['metadata']['composition'] as $compositionIndex => $composition) { + if (property_exists($refund['metadata'], 'composition') && is_array($refund['metadata']->composition)) { + foreach ($refund['metadata']->composition as $compositionIndex => $composition) { if ((bool)$composition['swReference'] === false) { - $refundsArray[$refundIndex]['metadata']['composition'][$compositionIndex]['label'] = self::ROUNDING_ITEM_LABEL; + $refundsArray[$refundIndex]['metadata']->composition[$compositionIndex]['label'] = self::ROUNDING_ITEM_LABEL; } } } diff --git a/src/Components/RefundManager/RefundManager.php b/src/Components/RefundManager/RefundManager.php index 1e5ab2651..095f13651 100644 --- a/src/Components/RefundManager/RefundManager.php +++ b/src/Components/RefundManager/RefundManager.php @@ -16,6 +16,7 @@ use Kiener\MolliePayments\Service\MollieApi\Order; use Kiener\MolliePayments\Service\OrderServiceInterface; use Kiener\MolliePayments\Service\Refund\Item\RefundItem; +use Kiener\MolliePayments\Service\Refund\Mollie\DataCompressor; use Kiener\MolliePayments\Service\Refund\RefundServiceInterface; use Kiener\MolliePayments\Struct\MollieApi\OrderLineMetaDataStruct; use Kiener\MolliePayments\Struct\Order\OrderAttributes; @@ -128,6 +129,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont /** @var null|\Mollie\Api\Resources\Order $mollieOrder */ $mollieOrder = null; + if ($orderAttributes->isTypeSubscription()) { # pure subscription orders do not # have a real mollie order @@ -213,29 +215,34 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont ); } - - if (!$refund instanceof Refund) { + if (! $refund instanceof Refund) { # a problem happened, lets finish with an exception throw new CouldNotCreateMollieRefundException('', (string)$order->getOrderNumber()); } $refundAmount = (float)$refund->amount->value; + $refundMetaData = $refund->metadata; + + if (! property_exists($refundMetaData, 'type')) { + throw new CouldNotCreateMollieRefundException('', (string)$order->getOrderNumber()); + } + $refundData = [ + 'orderId' => $order->getId(), + 'orderVersionId' => $order->getVersionId(), + 'mollieRefundId' => $refund->id, + 'publicDescription' => $request->getDescription(), + 'internalDescription' => $request->getInternalDescription(), + + ]; + $refundItems = $this->convertToRepositoryArray($serviceItems, $refundMetaData->type); + if (count($refundItems) > 0) { + $refundData['refundItems'] = $refundItems; + } # SAVE LOCAL REFUND # --------------------------------------------------------------------------------------------- - $this->refundRepository->create( - [ - [ - 'orderId' => $order->getId(), - 'orderVersionId' => $order->getVersionId(), - 'mollieRefundId' => $refund->id, - 'publicDescription' => $request->getDescription(), - 'internalDescription' => $request->getInternalDescription(), - ] - ], - $context - ); + $this->refundRepository->create([$refundData], $context); # DISPATCH FLOW BUILDER @@ -441,4 +448,29 @@ private function convertToRefundItems(RefundRequest $request, OrderEntity $order return $serviceItems; } + + /** + * @param RefundItem[] $serviceItems + * @param string $type + * @return array + */ + private function convertToRepositoryArray(array $serviceItems, string $type): array + { + $data = []; + foreach ($serviceItems as $item) { + if ($item->getQuantity() <= 0) { + continue; + } + + $data[] = [ + 'type' => $type, + 'orderLineItemId' => $item->getShopwareLineID(), + 'mollieLineId' => $item->getMollieLineID(), + 'reference' => $item->getShopwareReference(), + 'quantity' => $item->getQuantity(), + 'amount' => $item->getAmount(), + ]; + } + return $data; + } } diff --git a/src/Hydrator/RefundHydrator.php b/src/Hydrator/RefundHydrator.php index 0e4a837cc..9ddc17708 100644 --- a/src/Hydrator/RefundHydrator.php +++ b/src/Hydrator/RefundHydrator.php @@ -3,8 +3,10 @@ namespace Kiener\MolliePayments\Hydrator; use Kiener\MolliePayments\Components\RefundManager\DAL\Order\OrderExtension; +use Kiener\MolliePayments\Components\RefundManager\DAL\OrderLineItem\OrderLineItemExtension; use Kiener\MolliePayments\Components\RefundManager\DAL\Refund\RefundCollection; use Kiener\MolliePayments\Components\RefundManager\DAL\Refund\RefundEntity; +use Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem\RefundItemEntity; use Mollie\Api\Resources\Refund; use Shopware\Core\Checkout\Order\OrderEntity; @@ -36,9 +38,10 @@ public function hydrate(Refund $refund, OrderEntity $order): array $metaData = ''; if (property_exists($refund, 'metadata')) { - $metaData = (string)$refund->metadata; + $metaData = $refund->metadata; } + $internalDescription = null; /** @var RefundCollection $shopwareRefunds */ @@ -52,9 +55,25 @@ public function hydrate(Refund $refund, OrderEntity $order): array $shopwareRefund = $shopwareRefunds->first(); if ($shopwareRefund !== null) { $internalDescription = $shopwareRefund->getInternalDescription(); + + $refundLineItems = $shopwareRefund->getRefundItems()->getElements(); + $metaData->composition = []; + /** @var RefundItemEntity $refundLineItem */ + foreach ($refundLineItems as $refundLineItem) { + $metaData->composition[]=[ + 'swLineId' => (string)$refundLineItem->getOrderLineItemId(), + 'mollieLineId' => $refundLineItem->getMollieLineId(), + 'swReference' => $refundLineItem->getReference(), + 'quantity' => $refundLineItem->getQuantity(), + 'amount' => $refundLineItem->getAmount() + ]; + } } } + + + return [ 'id' => $refund->id, 'orderId' => $refund->orderId, @@ -70,7 +89,7 @@ public function hydrate(Refund $refund, OrderEntity $order): array 'isProcessing' => $refund->isProcessing(), 'isQueued' => $refund->isQueued(), 'isTransferred' => $refund->isTransferred(), - 'metadata' => json_decode($metaData, true), + 'metadata' => $metaData ]; } } diff --git a/src/Migration/Migration1672671475RefundItem.php b/src/Migration/Migration1672671475RefundItem.php index 741e2116b..7af028f05 100644 --- a/src/Migration/Migration1672671475RefundItem.php +++ b/src/Migration/Migration1672671475RefundItem.php @@ -17,17 +17,21 @@ public function update(Connection $connection): void $sql = <<executeStatement($sql); diff --git a/src/Resources/config/services/refundmanager/services.xml b/src/Resources/config/services/refundmanager/services.xml index 72ea420ff..3e6ae3a34 100644 --- a/src/Resources/config/services/refundmanager/services.xml +++ b/src/Resources/config/services/refundmanager/services.xml @@ -8,9 +8,16 @@ - + + + + + + + + diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml index afaf3745c..78dfa8ffa 100644 --- a/src/Resources/config/services/services.xml +++ b/src/Resources/config/services/services.xml @@ -67,7 +67,7 @@ - + @@ -179,5 +179,8 @@ + + + diff --git a/src/Resources/config/services/subscription/services.xml b/src/Resources/config/services/subscription/services.xml index 8417f7cac..902f9c265 100755 --- a/src/Resources/config/services/subscription/services.xml +++ b/src/Resources/config/services/subscription/services.xml @@ -35,9 +35,7 @@ - - - + diff --git a/src/Service/OrderService.php b/src/Service/OrderService.php index 02a6941dd..46def6f4a 100644 --- a/src/Service/OrderService.php +++ b/src/Service/OrderService.php @@ -3,6 +3,7 @@ namespace Kiener\MolliePayments\Service; use Kiener\MolliePayments\Components\RefundManager\DAL\Order\OrderExtension; +use Kiener\MolliePayments\Components\RefundManager\DAL\OrderLineItem\OrderLineItemExtension; use Kiener\MolliePayments\Exception\CouldNotExtractMollieOrderIdException; use Kiener\MolliePayments\Exception\CouldNotExtractMollieOrderLineIdException; use Kiener\MolliePayments\Exception\OrderNumberNotFoundException; @@ -103,7 +104,7 @@ public function getOrder(string $orderId, Context $context): OrderEntity $criteria->addAssociation('transactions.paymentMethod'); $criteria->addAssociation('transactions.paymentMethod.appPaymentMethod.app'); $criteria->addAssociation('transactions.stateMachineState'); - $criteria->addAssociation(OrderExtension::REFUND_PROPERTY_NAME); # for refund manager + $criteria->addAssociation(OrderExtension::REFUND_PROPERTY_NAME.'.refundItems'); # for refund manager $order = $this->orderRepository->search($criteria, $context)->first(); diff --git a/src/Service/Refund/Mollie/RefundMetadata.php b/src/Service/Refund/Mollie/RefundMetadata.php index 7e87fd251..4066b44b3 100644 --- a/src/Service/Refund/Mollie/RefundMetadata.php +++ b/src/Service/Refund/Mollie/RefundMetadata.php @@ -3,6 +3,7 @@ namespace Kiener\MolliePayments\Service\Refund\Mollie; use Kiener\MolliePayments\Service\Refund\Item\RefundItem; +use Shopware\Core\Framework\Uuid\Uuid; class RefundMetadata { @@ -31,7 +32,6 @@ public function __construct(string $type, array $items) { $this->type = $type; $this->items = $items; - $this->dataCompression = new DataCompressor(); } @@ -39,10 +39,10 @@ public function __construct(string $type, array $items) * @param array $metadata * @return RefundMetadata */ - public static function fromArray(array $metadata): RefundMetadata + public static function fromArray(?\stdClass $metadata): RefundMetadata { - $type = (string)$metadata['type']; - $composition = (isset($metadata['composition'])) ? (array)$metadata['composition'] : []; + $type = (string)$metadata->type; + $composition = property_exists($metadata, 'composition') ? $metadata->composition : []; $items = []; @@ -82,8 +82,9 @@ public function toString(): string { $data = [ 'type' => $this->type, + 'referenceId' => $this->referenceId ]; - + /* foreach ($this->items as $item) { if ($item->getQuantity() <= 0) { continue; @@ -98,7 +99,7 @@ public function toString(): string 'quantity' => $item->getQuantity(), 'amount' => $item->getAmount(), ]; - } + }*/ return (string)json_encode($data); } diff --git a/src/Service/Refund/RefundService.php b/src/Service/Refund/RefundService.php index 8deb04cd0..ee0ea148d 100644 --- a/src/Service/Refund/RefundService.php +++ b/src/Service/Refund/RefundService.php @@ -21,6 +21,8 @@ use Mollie\Api\Resources\Refund; use Shopware\Core\Checkout\Order\OrderEntity; use Shopware\Core\Framework\Context; +use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository; +use Shopware\Core\Framework\Uuid\Uuid; use Shopware\Core\System\Currency\CurrencyEntity; class RefundService implements RefundServiceInterface @@ -46,6 +48,7 @@ class RefundService implements RefundServiceInterface private $gwMollie; + /** * @param Order $mollie * @param OrderService $orders @@ -76,11 +79,11 @@ public function refundFull(OrderEntity $order, string $description, string $inte $mollieOrder = $this->mollie->getMollieOrder($mollieOrderId, $order->getSalesChannelId()); - $metadata = new RefundMetadata(RefundItemType::FULL, $refundItems); - $params = [ 'description' => $description, - 'metadata' => $metadata->toString(), + 'metadata' => [ + 'type' => RefundItemType::FULL + ], ]; @@ -125,8 +128,6 @@ public function refundFull(OrderEntity $order, string $description, string $inte */ public function refundPartial(OrderEntity $order, string $description, string $internalDescription, float $amount, array $lineItems, Context $context): Refund { - $metadata = new RefundMetadata(RefundItemType::PARTIAL, $lineItems); - $payment = $this->getPayment($order); $refund = $payment->refund([ @@ -135,7 +136,9 @@ public function refundPartial(OrderEntity $order, string $description, string $i 'currency' => ($order->getCurrency() instanceof CurrencyEntity) ? $order->getCurrency()->getIsoCode() : '', ], 'description' => $description, - 'metadata' => $metadata->toString(), + 'metadata' => [ + 'type' => RefundItemType::PARTIAL + ], ]); if (!$refund instanceof Refund) { @@ -210,6 +213,10 @@ public function getRefunds(OrderEntity $order): array if ($refund->status === 'canceled') { continue; } + /** + * TODO: remove old compositions + */ + $refundsArray[] = $this->refundHydrator->hydrate($refund, $order); } From a15eca91140cf1bc2425f0f03cd9ca6fa2651e2d Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Mon, 25 Sep 2023 13:48:50 +0200 Subject: [PATCH 3/9] MOL-969: can save refund items --- .../DAL/RefundItem/RefundItemCollection.php | 3 + .../DAL/RefundItem/RefundItemDefinition.php | 4 +- .../DAL/RefundItem/RefundItemEntity.php | 62 ++++++++++++++++--- .../RefundManager/RefundData/RefundData.php | 2 +- .../RefundManager/RefundManager.php | 34 +++++----- src/Hydrator/RefundHydrator.php | 7 ++- .../Migration1644753635CreateSubscription.php | 2 - .../Migration1672671475RefundItem.php | 4 +- src/MolliePayments.php | 7 ++- .../Fixer/RoundingDifferenceFixer.php | 2 +- src/Service/Refund/Item/RefundItem.php | 19 +++++- src/Service/Refund/Mollie/RefundMetadata.php | 46 ++------------ src/Service/Refund/RefundService.php | 8 +-- .../Service/Refund/Item/RefundItemTest.php | 3 +- .../Refund/Mollie/RefundMetadataTest.php | 55 +--------------- 15 files changed, 119 insertions(+), 139 deletions(-) diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php index d1ea7a652..a0a896785 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemCollection.php @@ -5,6 +5,9 @@ use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection; +/** + * @extends EntityCollection + */ final class RefundItemCollection extends EntityCollection { protected function getExpectedClass(): string diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php index b930f4250..d271b85b6 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php @@ -47,10 +47,10 @@ protected function defineFields(): FieldCollection (new FkField('refund_id', 'refundId', RefundDefinition::class))->addFlags(new ApiAware()), (new ManyToOneAssociationField('refund', 'refund_id', RefundDefinition::class))->addFlags(new ApiAware()), (new IntField('quantity', 'quantity'))->addFlags(new Required(), new ApiAware()), - (new StringField('reference', 'reference'))->addFlags(new Required(), new ApiAware()), + (new StringField('reference', 'reference'))->addFlags(new ApiAware()), (new FloatField('amount', 'amount'))->addFlags(new Required(), new ApiAware()), (new StringField('mollie_line_id', 'mollieLineId'))->addFlags(new Required(), new ApiAware()), - (new FkField('order_line_item_id', 'orderLineItemId', OrderLineItemDefinition::class))->addFlags(new Required(), new ApiAware()), + (new FkField('order_line_item_id', 'orderLineItemId', OrderLineItemDefinition::class))->addFlags(new ApiAware()), new ReferenceVersionField(OrderLineItemDefinition::class, 'order_line_item_version_id'), (new OneToOneAssociationField('orderLineItem', 'order_line_item_id', 'id', OrderLineItemDefinition::class, false))->addFlags(new ApiAware()), ]); diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php index 2253a5879..3c26e993c 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -12,15 +12,51 @@ final class RefundItemEntity extends Entity { use EntityIdTrait; - protected string $type; - protected string $refundId; - protected ?RefundEntity $refund; - protected string $reference; - protected string $mollieLineId; - protected int $quantity; - protected float $amount; - protected ?string $orderLineItemId; - protected ?OrderLineItemEntity $orderLineItem; + /** + * @var string + */ + protected $type; + + /** + * @var string + */ + protected $refundId; + /** + * @var null|RefundEntity + */ + protected $refund; + /** + * @var string + */ + protected $reference; + /** + * @var string + */ + protected $mollieLineId; + + /** + * @var int + */ + protected $quantity; + + /** + * @var float + */ + protected $amount; + /** + * @var null|string + */ + protected $orderLineItemId; + + /** + * @var null|string + */ + protected $orderLineItemVersionId; + + /** + * @var null|OrderLineItemEntity + */ + protected $orderLineItem; /** * @return string @@ -165,4 +201,12 @@ public function setReference(string $reference): void { $this->reference = $reference; } + + /** + * @return null|string + */ + public function getOrderLineItemVersionId(): ?string + { + return $this->orderLineItemVersionId; + } } diff --git a/src/Components/RefundManager/RefundData/RefundData.php b/src/Components/RefundManager/RefundData/RefundData.php index 4d79b7514..2b95550ed 100644 --- a/src/Components/RefundManager/RefundData/RefundData.php +++ b/src/Components/RefundManager/RefundData/RefundData.php @@ -136,7 +136,7 @@ public function toArray() /** @var array $refundsArray */ $refundsArray = $this->refunds; foreach ($refundsArray as $refundIndex => $refund) { - if (property_exists($refund['metadata'], 'composition') && is_array($refund['metadata']->composition)) { + if (isset($refund['metadata']) && property_exists($refund['metadata'], 'composition') && is_array($refund['metadata']->composition)) { foreach ($refund['metadata']->composition as $compositionIndex => $composition) { if ((bool)$composition['swReference'] === false) { $refundsArray[$refundIndex]['metadata']->composition[$compositionIndex]['label'] = self::ROUNDING_ITEM_LABEL; diff --git a/src/Components/RefundManager/RefundManager.php b/src/Components/RefundManager/RefundManager.php index 095f13651..a63b4e7d3 100644 --- a/src/Components/RefundManager/RefundManager.php +++ b/src/Components/RefundManager/RefundManager.php @@ -13,9 +13,11 @@ use Kiener\MolliePayments\Components\RefundManager\Request\RefundRequestItem; use Kiener\MolliePayments\Components\RefundManager\Request\RefundRequestItemRoundingDiff; use Kiener\MolliePayments\Exception\CouldNotCreateMollieRefundException; +use Kiener\MolliePayments\Service\MollieApi\Fixer\RoundingDifferenceFixer; use Kiener\MolliePayments\Service\MollieApi\Order; use Kiener\MolliePayments\Service\OrderServiceInterface; use Kiener\MolliePayments\Service\Refund\Item\RefundItem; +use Kiener\MolliePayments\Service\Refund\Item\RefundItemType; use Kiener\MolliePayments\Service\Refund\Mollie\DataCompressor; use Kiener\MolliePayments\Service\Refund\RefundServiceInterface; use Kiener\MolliePayments\Struct\MollieApi\OrderLineMetaDataStruct; @@ -128,7 +130,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont /** @var null|\Mollie\Api\Resources\Order $mollieOrder */ $mollieOrder = null; - + $refundType = ''; if ($orderAttributes->isTypeSubscription()) { # pure subscription orders do not @@ -188,6 +190,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont } elseif ($request->isFullRefundWithItems($order)) { $this->appendRoundingItemFromMollieOrder($request, $mollieOrder); $serviceItems = $this->convertToRefundItems($request, $order, $mollieOrder); + $refundType = RefundItemType::FULL; $refund = $this->refundService->refundFull( $order, $request->getDescription(), @@ -196,6 +199,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont $context ); } elseif ($request->isPartialAmountOnly()) { + $refundType = RefundItemType::PARTIAL; $refund = $this->refundService->refundPartial( $order, $request->getDescription(), @@ -205,6 +209,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont $context ); } elseif ($request->isPartialAmountWithItems($order)) { + $refundType = RefundItemType::PARTIAL; $refund = $this->refundService->refundPartial( $order, $request->getDescription(), @@ -222,11 +227,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont $refundAmount = (float)$refund->amount->value; - $refundMetaData = $refund->metadata; - if (! property_exists($refundMetaData, 'type')) { - throw new CouldNotCreateMollieRefundException('', (string)$order->getOrderNumber()); - } $refundData = [ 'orderId' => $order->getId(), @@ -236,7 +237,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont 'internalDescription' => $request->getInternalDescription(), ]; - $refundItems = $this->convertToRepositoryArray($serviceItems, $refundMetaData->type); + $refundItems = $this->convertToRepositoryArray($serviceItems, $refundType); if (count($refundItems) > 0) { $refundData['refundItems'] = $refundItems; } @@ -386,8 +387,9 @@ private function convertToRefundItems(RefundRequest $request, OrderEntity $order foreach ($request->getItems() as $requestItem) { $mollieLineID = ''; - $shopwareReferenceID = ''; - + $shopwareReferenceID = RoundingDifferenceFixer::DEFAULT_TITLE; + $orderLineItemId = null; + $orderLineItemVersionId = null; $orderItem = $this->getOrderItem($order, $requestItem->getLineId()); # if we have a real line item, then extract @@ -395,11 +397,11 @@ private function convertToRefundItems(RefundRequest $request, OrderEntity $order if ($orderItem instanceof OrderLineItemEntity) { $orderItemAttributes = new OrderLineItemEntityAttributes($orderItem); $mollieLineID = $orderItemAttributes->getMollieOrderLineID(); - + $orderLineItemId = $orderItem->getId(); + $orderLineItemVersionId = $orderItem->getVersionId(); + $shopwareReferenceID = (string)$orderItem->getReferencedId(); if (isset($orderItem->getPayload()['productNumber'])) { $shopwareReferenceID = (string)$orderItem->getPayload()['productNumber']; - } else { - $shopwareReferenceID = (string)$orderItem->getReferencedId(); } } else { # yeah i know complexity...but for now lets keep it compact :) @@ -438,11 +440,12 @@ private function convertToRefundItems(RefundRequest $request, OrderEntity $order # for our refund service with all # required information $serviceItems[] = new RefundItem( - $requestItem->getLineId(), $mollieLineID, (string)$shopwareReferenceID, $requestItem->getQuantity(), - $requestItem->getAmount() + $requestItem->getAmount(), + $orderLineItemId, + $orderLineItemVersionId ); } @@ -452,7 +455,7 @@ private function convertToRefundItems(RefundRequest $request, OrderEntity $order /** * @param RefundItem[] $serviceItems * @param string $type - * @return array + * @return array */ private function convertToRepositoryArray(array $serviceItems, string $type): array { @@ -465,8 +468,9 @@ private function convertToRepositoryArray(array $serviceItems, string $type): ar $data[] = [ 'type' => $type, 'orderLineItemId' => $item->getShopwareLineID(), + 'orderLineItemVersionId' => $item->getShopwareLineVersionId(), 'mollieLineId' => $item->getMollieLineID(), - 'reference' => $item->getShopwareReference(), + 'reference' => (string)$item->getShopwareReference(), 'quantity' => $item->getQuantity(), 'amount' => $item->getAmount(), ]; diff --git a/src/Hydrator/RefundHydrator.php b/src/Hydrator/RefundHydrator.php index 9ddc17708..893327bc9 100644 --- a/src/Hydrator/RefundHydrator.php +++ b/src/Hydrator/RefundHydrator.php @@ -35,9 +35,9 @@ public function hydrate(Refund $refund, OrderEntity $order): array ]; } - $metaData = ''; + $metaData = new \stdClass(); - if (property_exists($refund, 'metadata')) { + if (property_exists($refund, 'metadata') && $refund->metadata instanceof \stdClass) { $metaData = $refund->metadata; } @@ -57,11 +57,14 @@ public function hydrate(Refund $refund, OrderEntity $order): array $internalDescription = $shopwareRefund->getInternalDescription(); $refundLineItems = $shopwareRefund->getRefundItems()->getElements(); + $metaData->composition = []; /** @var RefundItemEntity $refundLineItem */ foreach ($refundLineItems as $refundLineItem) { + $metaData->type = $refundLineItem->getType(); $metaData->composition[]=[ 'swLineId' => (string)$refundLineItem->getOrderLineItemId(), + 'swLineVersionId' => (string)$refundLineItem->getOrderLineItemVersionId(), 'mollieLineId' => $refundLineItem->getMollieLineId(), 'swReference' => $refundLineItem->getReference(), 'quantity' => $refundLineItem->getQuantity(), diff --git a/src/Migration/Migration1644753635CreateSubscription.php b/src/Migration/Migration1644753635CreateSubscription.php index 9d7b3acce..ecb748eb9 100755 --- a/src/Migration/Migration1644753635CreateSubscription.php +++ b/src/Migration/Migration1644753635CreateSubscription.php @@ -4,9 +4,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception; -use Shopware\Core\Defaults; use Shopware\Core\Framework\Migration\MigrationStep; -use Shopware\Core\Framework\Uuid\Uuid; class Migration1644753635CreateSubscription extends MigrationStep { diff --git a/src/Migration/Migration1672671475RefundItem.php b/src/Migration/Migration1672671475RefundItem.php index 7af028f05..21c5f748c 100644 --- a/src/Migration/Migration1672671475RefundItem.php +++ b/src/Migration/Migration1672671475RefundItem.php @@ -28,8 +28,8 @@ public function update(Connection $connection): void `created_at` datetime(3) NOT NULL, `updated_at` datetime(3) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `fk.order_line_item_id` (`order_line_item_id`), - CONSTRAINT `fk.order_line_item_id` FOREIGN KEY (`order_line_item_id`) REFERENCES `order_line_item` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + KEY `fk.order_line_item_id` (`order_line_item_id`,`order_line_item_version_id`), + CONSTRAINT `fk.order_line_item_id` FOREIGN KEY (`order_line_item_id`,`order_line_item_version_id`) REFERENCES `order_line_item` (`id`,`version_id`) ON DELETE SET NULL ON UPDATE CASCADE, KEY `fk.refund_id` (`refund_id`), CONSTRAINT `fk.refund_id` FOREIGN KEY (`refund_id`) REFERENCES `mollie_refund` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/src/MolliePayments.php b/src/MolliePayments.php index 979da2859..3669ede20 100644 --- a/src/MolliePayments.php +++ b/src/MolliePayments.php @@ -88,7 +88,9 @@ public function configureRoutes(RoutingConfigurator $routes, string $environment public function install(InstallContext $context): void { parent::install($context); - + if ($this->container === null) { + throw new Exception('Container is not initialized'); + } # that's the only part we use the Shopware repository directly, # and not our custom one, because our repositories are not yet registered in this function /** @var EntityRepository $shopwareRepoCustomFields */ @@ -164,6 +166,9 @@ public function deactivate(DeactivateContext $context): void */ private function preparePlugin(Context $context): void { + if ($this->container === null) { + throw new Exception('Container is not initialized'); + } /** @var PluginInstaller $pluginInstaller */ $pluginInstaller = $this->container->get(PluginInstaller::class); diff --git a/src/Service/MollieApi/Fixer/RoundingDifferenceFixer.php b/src/Service/MollieApi/Fixer/RoundingDifferenceFixer.php index 1203963a0..3f70ce6f8 100644 --- a/src/Service/MollieApi/Fixer/RoundingDifferenceFixer.php +++ b/src/Service/MollieApi/Fixer/RoundingDifferenceFixer.php @@ -9,7 +9,7 @@ class RoundingDifferenceFixer { - private const DEFAULT_TITLE = 'Automatic Rounding Difference'; + public const DEFAULT_TITLE = 'Automatic Rounding Difference'; private const DEFAULT_SKU = ''; diff --git a/src/Service/Refund/Item/RefundItem.php b/src/Service/Refund/Item/RefundItem.php index c199ef617..b8a715ecf 100644 --- a/src/Service/Refund/Item/RefundItem.php +++ b/src/Service/Refund/Item/RefundItem.php @@ -5,7 +5,7 @@ class RefundItem { /** - * @var string + * @var ?string */ private $shopwareLineID; @@ -28,6 +28,10 @@ class RefundItem * @var float */ private $amount; + /** + * @var null|string + */ + private $shopwareLineVersionId; /** @@ -37,20 +41,21 @@ class RefundItem * @param int $quantity * @param float $amount */ - public function __construct(string $shopwareLineID, string $mollieLineID, string $shopwareReference, int $quantity, float $amount) + public function __construct(string $mollieLineID, string $shopwareReference, int $quantity, float $amount, ?string $shopwareLineID, ?string $shopwareLineVersionId) { $this->shopwareLineID = $shopwareLineID; $this->mollieLineID = $mollieLineID; $this->shopwareReference = $shopwareReference; $this->quantity = $quantity; $this->amount = round($amount, 2); + $this->shopwareLineVersionId = $shopwareLineVersionId; } /** * @return string */ - public function getShopwareLineID(): string + public function getShopwareLineID(): ?string { return $this->shopwareLineID; } @@ -86,4 +91,12 @@ public function getMollieLineID(): string { return $this->mollieLineID; } + + /** + * @return null|string + */ + public function getShopwareLineVersionId(): ?string + { + return $this->shopwareLineVersionId; + } } diff --git a/src/Service/Refund/Mollie/RefundMetadata.php b/src/Service/Refund/Mollie/RefundMetadata.php index 4066b44b3..857ce1a10 100644 --- a/src/Service/Refund/Mollie/RefundMetadata.php +++ b/src/Service/Refund/Mollie/RefundMetadata.php @@ -3,14 +3,9 @@ namespace Kiener\MolliePayments\Service\Refund\Mollie; use Kiener\MolliePayments\Service\Refund\Item\RefundItem; -use Shopware\Core\Framework\Uuid\Uuid; class RefundMetadata { - /** - * @var DataCompressor - */ - private $dataCompression; /** * @var string @@ -32,14 +27,13 @@ public function __construct(string $type, array $items) { $this->type = $type; $this->items = $items; - $this->dataCompression = new DataCompressor(); } /** - * @param array $metadata + * @param \stdClass $metadata * @return RefundMetadata */ - public static function fromArray(?\stdClass $metadata): RefundMetadata + public static function fromArray(\stdClass $metadata): RefundMetadata { $type = (string)$metadata->type; $composition = property_exists($metadata, 'composition') ? $metadata->composition : []; @@ -48,11 +42,12 @@ public static function fromArray(?\stdClass $metadata): RefundMetadata foreach ($composition as $compItem) { $items[] = new RefundItem( - $compItem['swLineId'], $compItem['mollieLineId'], - $compItem['swReference'], + (string)$compItem['swReference'], $compItem['quantity'], - $compItem['amount'] + $compItem['amount'], + $compItem['swLineId'], + $compItem['swLineVersionId'] ); } @@ -74,33 +69,4 @@ public function getComposition(): array { return $this->items; } - - /** - * @return string - */ - public function toString(): string - { - $data = [ - 'type' => $this->type, - 'referenceId' => $this->referenceId - ]; - /* - foreach ($this->items as $item) { - if ($item->getQuantity() <= 0) { - continue; - } - - $swLineId = $this->dataCompression->compress($item->getShopwareLineID()); - - $data['composition'][] = [ - 'swLineId' => $swLineId, - 'mollieLineId' => $item->getMollieLineID(), - 'swReference' => $item->getShopwareReference(), - 'quantity' => $item->getQuantity(), - 'amount' => $item->getAmount(), - ]; - }*/ - - return (string)json_encode($data); - } } diff --git a/src/Service/Refund/RefundService.php b/src/Service/Refund/RefundService.php index ee0ea148d..0e09b20d2 100644 --- a/src/Service/Refund/RefundService.php +++ b/src/Service/Refund/RefundService.php @@ -81,9 +81,6 @@ public function refundFull(OrderEntity $order, string $description, string $inte $params = [ 'description' => $description, - 'metadata' => [ - 'type' => RefundItemType::FULL - ], ]; @@ -135,10 +132,7 @@ public function refundPartial(OrderEntity $order, string $description, string $i 'value' => number_format($amount, 2, '.', ''), 'currency' => ($order->getCurrency() instanceof CurrencyEntity) ? $order->getCurrency()->getIsoCode() : '', ], - 'description' => $description, - 'metadata' => [ - 'type' => RefundItemType::PARTIAL - ], + 'description' => $description ]); if (!$refund instanceof Refund) { diff --git a/tests/PHPUnit/Service/Refund/Item/RefundItemTest.php b/tests/PHPUnit/Service/Refund/Item/RefundItemTest.php index 602fe7f66..f133adc43 100644 --- a/tests/PHPUnit/Service/Refund/Item/RefundItemTest.php +++ b/tests/PHPUnit/Service/Refund/Item/RefundItemTest.php @@ -19,11 +19,12 @@ class RefundItemTest extends TestCase public function testAmountRounded() { $item = new RefundItem( - '', '', '', 1, 14.9899999, + '', + '' ); $this->assertEquals(14.99, $item->getAmount()); diff --git a/tests/PHPUnit/Service/Refund/Mollie/RefundMetadataTest.php b/tests/PHPUnit/Service/Refund/Mollie/RefundMetadataTest.php index d2604d612..79abe7183 100644 --- a/tests/PHPUnit/Service/Refund/Mollie/RefundMetadataTest.php +++ b/tests/PHPUnit/Service/Refund/Mollie/RefundMetadataTest.php @@ -44,65 +44,14 @@ public function testType() public function testCompositionItems() { $items = []; - $items[] = new RefundItem('sw1', 'mol1', 'art-123', 2, 9.99); - $items[] = new RefundItem('sw1', 'mol1', 'art-123', 2, 9.99); + $items[] = new RefundItem( 'mol1', 'art-123', 2, 9.99,'sw1','swVersion1'); + $items[] = new RefundItem('mol1', 'art-123', 2, 9.99,'sw1','swVersion1'); $metadata = new RefundMetadata('abc', $items); $this->assertCount(2, $metadata->getComposition()); } - /** - * This test verifies that its possible to assign composition items - * and that they are stored. - * - * @return void - */ - public function testToString() - { - $items = []; - $items[] = new RefundItem('sw1', 'mol1', 'art-123', 2, 9.99); - - $metadata = new RefundMetadata('FULL', $items); - - $expected = [ - 'type' => 'FULL', - 'composition' => [ - [ - 'swLineId' => 'sw1', - 'mollieLineId' => 'mol1', - 'swReference' => 'art-123', - 'quantity' => 2, - 'amount' => 9.99, - ] - ] - ]; - - $expected = json_encode($expected); - - $this->assertEquals($expected, $metadata->toString()); - } - - - /** - * This test verifies that our long IDs are correctly compressed - * and returned in our JSON output instead of the long IDs. - * - * @return void - */ - public function testCompression() - { - $items = []; - $items[] = new RefundItem('2a88d9b59d474c7e869d8071649be43c', 'mol1', 'c7bca22753c84d08b6178a50052b4146', 2, 9.99); - $metadata = new RefundMetadata('FULL', $items); - $outputJson = json_decode($metadata->toString(), true); - - $lineId = $outputJson['composition'][0]['swLineId']; - $swReference = $outputJson['composition'][0]['swReference']; - - $this->assertEquals(8, strlen($lineId)); - $this->assertEquals('2a88e43c', $lineId); - } } From 8a7a33daaaaf4dd712e53cd67ad2087edc112b55 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Mon, 25 Sep 2023 14:09:08 +0200 Subject: [PATCH 4/9] MOL-969: fix hydrator tests --- tests/PHPUnit/Hydrator/RefundHydratorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/PHPUnit/Hydrator/RefundHydratorTest.php b/tests/PHPUnit/Hydrator/RefundHydratorTest.php index 6588d1f4e..a9ab8e6ce 100644 --- a/tests/PHPUnit/Hydrator/RefundHydratorTest.php +++ b/tests/PHPUnit/Hydrator/RefundHydratorTest.php @@ -116,7 +116,7 @@ private function getExpectedData(?float $amount, ?float $settlementAmount, strin 'isProcessing' => $status == RefundStatus::STATUS_PROCESSING, 'isQueued' => $status == RefundStatus::STATUS_QUEUED, 'isTransferred' => $status == RefundStatus::STATUS_REFUNDED, - 'metadata' => null, + 'metadata' => new \stdClass(), ]; } From 178b17051c559a14b46e34eaa5224e211a4fca8b Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 27 Sep 2023 09:07:03 +0200 Subject: [PATCH 5/9] MOL-969: Fix styles --- .../Builder/RefundDataBuilder.php | 2 +- .../DAL/RefundItem/RefundItemEntity.php | 8 + .../Api/Order/RefundControllerBase.php | 2 +- src/Hydrator/RefundHydrator.php | 6 +- src/Resources/config/services/services.xml | 5 + .../Refund/CompositionRepairService.php | 157 ++++++++++++++++++ .../CompositionRepairServiceInterface.php | 13 ++ src/Service/Refund/RefundService.php | 19 ++- src/Service/Refund/RefundServiceInterface.php | 2 +- tests/PHPUnit/Fakes/FakeRefundService.php | 2 +- tests/PHPUnit/Hydrator/RefundHydratorTest.php | 2 +- 11 files changed, 207 insertions(+), 11 deletions(-) create mode 100644 src/Service/Refund/CompositionRepairService.php create mode 100644 src/Service/Refund/CompositionRepairServiceInterface.php diff --git a/src/Components/RefundManager/Builder/RefundDataBuilder.php b/src/Components/RefundManager/Builder/RefundDataBuilder.php index 44107df98..82a02ef4f 100644 --- a/src/Components/RefundManager/Builder/RefundDataBuilder.php +++ b/src/Components/RefundManager/Builder/RefundDataBuilder.php @@ -76,7 +76,7 @@ public function buildRefundData(OrderEntity $order, Context $context): RefundDat try { - $refunds = $this->refundService->getRefunds($order); + $refunds = $this->refundService->getRefunds($order, $context); } catch (PaymentNotFoundException $ex) { # if we dont have a payment, then theres also no refunds # we still need our data, only with an empty list of refunds diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php index 3c26e993c..d3480a298 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -209,4 +209,12 @@ public function getOrderLineItemVersionId(): ?string { return $this->orderLineItemVersionId; } + + /** + * @param null|string $orderLineItemVersionId + */ + public function setOrderLineItemVersionId(?string $orderLineItemVersionId): void + { + $this->orderLineItemVersionId = $orderLineItemVersionId; + } } diff --git a/src/Controller/Api/Order/RefundControllerBase.php b/src/Controller/Api/Order/RefundControllerBase.php index db9ff91b5..d8a69c6fd 100644 --- a/src/Controller/Api/Order/RefundControllerBase.php +++ b/src/Controller/Api/Order/RefundControllerBase.php @@ -267,7 +267,7 @@ private function listRefundsAction(string $orderId, Context $context): JsonRespo try { $order = $this->orderService->getOrder($orderId, $context); - $refunds = $this->refundService->getRefunds($order); + $refunds = $this->refundService->getRefunds($order, $context); return $this->json($refunds); } catch (\Throwable $e) { diff --git a/src/Hydrator/RefundHydrator.php b/src/Hydrator/RefundHydrator.php index 893327bc9..d90ec3691 100644 --- a/src/Hydrator/RefundHydrator.php +++ b/src/Hydrator/RefundHydrator.php @@ -37,8 +37,12 @@ public function hydrate(Refund $refund, OrderEntity $order): array $metaData = new \stdClass(); - if (property_exists($refund, 'metadata') && $refund->metadata instanceof \stdClass) { + if (property_exists($refund, 'metadata')) { + /** @var \stdClass|string $metaData */ $metaData = $refund->metadata; + if (is_string($metaData)) { + $metaData = json_decode($metaData); + } } diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml index 78dfa8ffa..488c22b1a 100644 --- a/src/Resources/config/services/services.xml +++ b/src/Resources/config/services/services.xml @@ -67,9 +67,14 @@ + + + + + diff --git a/src/Service/Refund/CompositionRepairService.php b/src/Service/Refund/CompositionRepairService.php new file mode 100644 index 000000000..c422ea979 --- /dev/null +++ b/src/Service/Refund/CompositionRepairService.php @@ -0,0 +1,157 @@ +refundItemRepository = $refundItemRepository; + } + + public function updateRefundItems(Refund $refund, OrderEntity $order, Context $context): OrderEntity + { + /** @var \stdClass|string $oldMetadata */ + $oldMetadata = $refund->metadata; + if (! is_string($oldMetadata)) { + return $order; + } + + $oldMetadata = json_decode($oldMetadata); + if (! property_exists($oldMetadata, 'composition') && ! is_array($oldMetadata->composition)) { + return $order; + } + + $oldCompositions = $oldMetadata->composition; + + /** @var ?RefundCollection $shopwareRefunds */ + $shopwareRefunds = $order->getExtension(OrderExtension::REFUND_PROPERTY_NAME); + + if ($shopwareRefunds === null) { + return $order; + } + + + $shopwareRefunds = $shopwareRefunds->filterByProperty('mollieRefundId', $refund->id); + + /** @var ?RefundEntity $shopwareRefund */ + $shopwareRefund = $shopwareRefunds->first(); + + if ($shopwareRefund === null) { + return $order; + } + + $refundLineItems = $shopwareRefund->getRefundItems()->getElements(); + if (count($refundLineItems) > 0) { + return $order; + } + /** @var ?OrderLineItemCollection $orderLineItems */ + $orderLineItems = $order->getLineItems(); + if ($orderLineItems === null) { + return $order; + } + $dataToSave = []; + foreach ($oldCompositions as $composition) { + $reference = $composition->swReference; + if (strlen($reference) === 0) { + $reference = RoundingDifferenceFixer::DEFAULT_TITLE; + } + + $row = [ + 'type' => $oldMetadata->type, + 'mollieLineId' => $composition->mollieLineId, + 'reference' => $reference, + 'quantity' => $composition->quantity, + 'amount' => $composition->amount, + 'refundId' => $shopwareRefund->getId(), + 'oderLineItemId' => null, + 'oderLineItemVersionId' => null, + ]; + $orderLineItem = $this->filterByMollieId($orderLineItems, $composition->mollieLineId); + if ($orderLineItem instanceof OrderLineItemEntity) { + $row['orderLineItemId'] = $orderLineItem->getId(); + $row['orderLineItemVersionId'] = $orderLineItem->getVersionId(); + } + + + $dataToSave[] = $row; + } + $entityWrittenContainerEvent = $this->refundItemRepository->create($dataToSave, $context); + $refundItems = $this->createEntitiesByEvent($entityWrittenContainerEvent); + $shopwareRefund->setRefundItems($refundItems); + return $order; + } + + private function createEntitiesByEvent(EntityWrittenContainerEvent $event): RefundItemCollection + { + $collection = new RefundItemCollection(); + $events = $event->getEvents(); + if ($events === null) { + return $collection; + } + /** @var EntityWrittenEvent $writtenEvent */ + $writtenEvent = $events->first(); + $results = $writtenEvent->getWriteResults(); + + foreach ($results as $result) { + $entity = new RefundItemEntity(); + $entity->setId($result->getProperty('id')); + $entity->setUniqueIdentifier($result->getProperty('id')); + $entity->setQuantity($result->getProperty('quantity')); + $entity->setReference($result->getProperty('reference')); + $entity->setAmount($result->getProperty('amount')); + $entity->setRefundId($result->getProperty('refundId')); + $entity->setMollieLineId($result->getProperty('mollieLineId')); + if ($result->getProperty('orderLineItemId') !== null && $result->getProperty('orderLineItemVersionId') !== null) { + $entity->setOrderLineItemId($result->getProperty('orderLineItemId')); + $entity->setOrderLineItemVersionId($result->getProperty('orderLineItemVersionId')); + } + + $entity->setType($result->getProperty('type')); + $entity->setCreatedAt($result->getProperty('createdAt')); + $collection->add($entity); + } + return $collection; + } + + private function filterByMollieId(OrderLineItemCollection $lineItems, string $mollieLineId): ?OrderLineItemEntity + { + $foundItem = null; + /** @var OrderLineItemEntity $lineItem */ + foreach ($lineItems as $lineItem) { + $customFields = $lineItem->getCustomFields(); + if ($customFields === null) { + continue; + } + if (! isset($customFields['mollie_payments']['order_line_id'])) { + continue; + } + if ($customFields['mollie_payments']['order_line_id'] === $mollieLineId) { + $foundItem = $lineItem; + break; + } + } + return $foundItem; + } +} diff --git a/src/Service/Refund/CompositionRepairServiceInterface.php b/src/Service/Refund/CompositionRepairServiceInterface.php new file mode 100644 index 000000000..0cc60f31e --- /dev/null +++ b/src/Service/Refund/CompositionRepairServiceInterface.php @@ -0,0 +1,13 @@ +mollie = $mollie; $this->orders = $orders; $this->refundHydrator = $refundHydrator; $this->gwMollie = $gwMollie; + $this->compositionRepairService = $compositionRepairService; } @@ -189,7 +194,7 @@ public function cancel(OrderEntity $order, string $refundId): bool * @throws CouldNotExtractMollieOrderIdException * @return array */ - public function getRefunds(OrderEntity $order): array + public function getRefunds(OrderEntity $order, Context $context): array { $orderAttributes = new OrderAttributes($order); @@ -207,9 +212,13 @@ public function getRefunds(OrderEntity $order): array if ($refund->status === 'canceled') { continue; } - /** - * TODO: remove old compositions - */ + if (property_exists($refund, 'metadata')) { + /** @var \stdClass|string $metadata */ + $metadata = $refund->metadata; + if (is_string($metadata)) { + $order = $this->compositionRepairService->updateRefundItems($refund, $order, $context); + } + } $refundsArray[] = $this->refundHydrator->hydrate($refund, $order); } diff --git a/src/Service/Refund/RefundServiceInterface.php b/src/Service/Refund/RefundServiceInterface.php index c028001f8..b107f7d95 100644 --- a/src/Service/Refund/RefundServiceInterface.php +++ b/src/Service/Refund/RefundServiceInterface.php @@ -43,7 +43,7 @@ public function cancel(OrderEntity $order, string $refundId): bool; * @param OrderEntity $order * @return Refund[] */ - public function getRefunds(OrderEntity $order): array; + public function getRefunds(OrderEntity $order, Context $context): array; /** * @param OrderEntity $order diff --git a/tests/PHPUnit/Fakes/FakeRefundService.php b/tests/PHPUnit/Fakes/FakeRefundService.php index db6bd886e..fce503478 100644 --- a/tests/PHPUnit/Fakes/FakeRefundService.php +++ b/tests/PHPUnit/Fakes/FakeRefundService.php @@ -108,7 +108,7 @@ public function cancel(OrderEntity $order, string $refundId): bool * @param OrderEntity $order * @return array */ - public function getRefunds(OrderEntity $order): array + public function getRefunds(OrderEntity $order, Context $context): array { // TODO: Implement getRefunds() method. } diff --git a/tests/PHPUnit/Hydrator/RefundHydratorTest.php b/tests/PHPUnit/Hydrator/RefundHydratorTest.php index a9ab8e6ce..6588d1f4e 100644 --- a/tests/PHPUnit/Hydrator/RefundHydratorTest.php +++ b/tests/PHPUnit/Hydrator/RefundHydratorTest.php @@ -116,7 +116,7 @@ private function getExpectedData(?float $amount, ?float $settlementAmount, strin 'isProcessing' => $status == RefundStatus::STATUS_PROCESSING, 'isQueued' => $status == RefundStatus::STATUS_QUEUED, 'isTransferred' => $status == RefundStatus::STATUS_REFUNDED, - 'metadata' => new \stdClass(), + 'metadata' => null, ]; } From 5d0e7d01c6bd7bd3b4f79f4dbb5b219a949063c2 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 27 Sep 2023 11:10:06 +0200 Subject: [PATCH 6/9] MOL-969: fix metadata --- src/Components/RefundManager/RefundManager.php | 2 ++ src/Hydrator/RefundHydrator.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/RefundManager/RefundManager.php b/src/Components/RefundManager/RefundManager.php index a63b4e7d3..76756817e 100644 --- a/src/Components/RefundManager/RefundManager.php +++ b/src/Components/RefundManager/RefundManager.php @@ -169,6 +169,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont if ($orderAttributes->isTypeSubscription()) { + $refundType = RefundItemType::PARTIAL; # we only have a transaction in the case of a subscription $refund = $this->refundService->refundPartial( $order, @@ -179,6 +180,7 @@ public function refund(OrderEntity $order, RefundRequest $request, Context $cont $context ); } else { + $refundType = RefundItemType::FULL; $refund = $this->refundService->refundFull( $order, $request->getDescription(), diff --git a/src/Hydrator/RefundHydrator.php b/src/Hydrator/RefundHydrator.php index d90ec3691..7ee0a8960 100644 --- a/src/Hydrator/RefundHydrator.php +++ b/src/Hydrator/RefundHydrator.php @@ -37,7 +37,7 @@ public function hydrate(Refund $refund, OrderEntity $order): array $metaData = new \stdClass(); - if (property_exists($refund, 'metadata')) { + if (property_exists($refund, 'metadata') && $refund->metadata !== null) { /** @var \stdClass|string $metaData */ $metaData = $refund->metadata; if (is_string($metaData)) { From e600e7d62337ef8402b7fea8742af29a069e4979 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 27 Sep 2023 11:13:54 +0200 Subject: [PATCH 7/9] MOL-969: fix merge --- src/MolliePayments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MolliePayments.php b/src/MolliePayments.php index 3499211b3..35e8d0959 100644 --- a/src/MolliePayments.php +++ b/src/MolliePayments.php @@ -94,7 +94,7 @@ public function install(InstallContext $context): void # that's the only part we use the Shopware repository directly, # and not our custom one, because our repositories are not yet registered in this function /** @var EntityRepository $shopwareRepoCustomFields */ - $shopwareRepoCustomFields = $container->get('custom_field_set.repository'); + $shopwareRepoCustomFields = $this->container->get('custom_field_set.repository'); if ($shopwareRepoCustomFields !== null) { $mollieRepoCustomFields = new CustomFieldSetRepository($shopwareRepoCustomFields); @@ -173,7 +173,7 @@ private function preparePlugin(Context $context): void throw new Exception('Container is not initialized'); } /** @var PluginInstaller $pluginInstaller */ - $pluginInstaller = $container->get(PluginInstaller::class); + $pluginInstaller = $this->container->get(PluginInstaller::class); $pluginInstaller->install($context); } From 370129170f8aa94b9e7701324c03b867813c0d4b Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 27 Sep 2023 13:17:58 +0200 Subject: [PATCH 8/9] MOL-969: update pr --- .../OrderLineItem/OrderLineItemExtension.php | 8 +-- .../DAL/RefundItem/RefundItemDefinition.php | 4 +- .../DAL/RefundItem/RefundItemEntity.php | 16 +++--- .../RefundManager/RefundManager.php | 2 +- src/Hydrator/RefundHydrator.php | 2 +- .../Migration1672671475RefundItem.php | 2 +- src/Resources/config/services/services.xml | 7 +-- ...ce.php => CompositionMigrationService.php} | 21 ++++++-- ... CompositionMigrationServiceInterface.php} | 2 +- src/Service/Refund/Mollie/DataCompressor.php | 37 ------------- src/Service/Refund/RefundService.php | 4 +- tests/PHPUnit/Hydrator/RefundHydratorTest.php | 2 +- .../Refund/Mollie/DataCompressorTest.php | 53 ------------------- 13 files changed, 46 insertions(+), 114 deletions(-) rename src/Service/Refund/{CompositionRepairService.php => CompositionMigrationService.php} (90%) rename src/Service/Refund/{CompositionRepairServiceInterface.php => CompositionMigrationServiceInterface.php} (86%) delete mode 100644 src/Service/Refund/Mollie/DataCompressor.php delete mode 100644 tests/PHPUnit/Service/Refund/Mollie/DataCompressorTest.php diff --git a/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php b/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php index a94b1725a..d1aff6f9d 100644 --- a/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php +++ b/src/Components/RefundManager/DAL/OrderLineItem/OrderLineItemExtension.php @@ -8,12 +8,14 @@ use Shopware\Core\Checkout\Order\Aggregate\OrderLineItem\OrderLineItemDefinition; use Shopware\Core\Framework\DataAbstractionLayer\EntityExtension; use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\CascadeDelete; +use Shopware\Core\Framework\DataAbstractionLayer\Field\ManyToOneAssociationField; +use Shopware\Core\Framework\DataAbstractionLayer\Field\OneToManyAssociationField; use Shopware\Core\Framework\DataAbstractionLayer\Field\OneToOneAssociationField; use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection; -final class OrderLineItemExtension extends EntityExtension +class OrderLineItemExtension extends EntityExtension { - const ORDER_LINE_ITEM_PROPERTY_NAME = 'refundLineItem'; + const ORDER_LINE_ITEM_PROPERTY_NAME = 'mollieRefundLineItems'; /** * @return string @@ -28,6 +30,6 @@ public function getDefinitionClass(): string */ public function extendFields(FieldCollection $collection): void { - $collection->add(new OneToOneAssociationField(self::ORDER_LINE_ITEM_PROPERTY_NAME, 'id', 'order_line_item_id', RefundItemDefinition::class)); + $collection->add(new OneToManyAssociationField(self::ORDER_LINE_ITEM_PROPERTY_NAME, RefundItemDefinition::class, 'order_line_item_id')); } } diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php index d271b85b6..4ccbc7132 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemDefinition.php @@ -47,12 +47,12 @@ protected function defineFields(): FieldCollection (new FkField('refund_id', 'refundId', RefundDefinition::class))->addFlags(new ApiAware()), (new ManyToOneAssociationField('refund', 'refund_id', RefundDefinition::class))->addFlags(new ApiAware()), (new IntField('quantity', 'quantity'))->addFlags(new Required(), new ApiAware()), - (new StringField('reference', 'reference'))->addFlags(new ApiAware()), + (new StringField('label', 'label'))->addFlags(new ApiAware()), (new FloatField('amount', 'amount'))->addFlags(new Required(), new ApiAware()), (new StringField('mollie_line_id', 'mollieLineId'))->addFlags(new Required(), new ApiAware()), (new FkField('order_line_item_id', 'orderLineItemId', OrderLineItemDefinition::class))->addFlags(new ApiAware()), new ReferenceVersionField(OrderLineItemDefinition::class, 'order_line_item_version_id'), - (new OneToOneAssociationField('orderLineItem', 'order_line_item_id', 'id', OrderLineItemDefinition::class, false))->addFlags(new ApiAware()), + (new ManyToOneAssociationField('orderLineItem', 'order_line_item_id', OrderLineItemDefinition::class))->addFlags(new ApiAware()), ]); } } diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php index d3480a298..67e5fde55 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -21,14 +21,17 @@ final class RefundItemEntity extends Entity * @var string */ protected $refundId; + /** * @var null|RefundEntity */ protected $refund; + /** * @var string */ - protected $reference; + protected $label; + /** * @var string */ @@ -43,6 +46,7 @@ final class RefundItemEntity extends Entity * @var float */ protected $amount; + /** * @var null|string */ @@ -189,17 +193,17 @@ public function setRefund(?RefundEntity $refund): void /** * @return string */ - public function getReference(): string + public function getLabel(): string { - return $this->reference; + return $this->label; } /** - * @param string $reference + * @param string $label */ - public function setReference(string $reference): void + public function setLabel(string $label): void { - $this->reference = $reference; + $this->label = $label; } /** diff --git a/src/Components/RefundManager/RefundManager.php b/src/Components/RefundManager/RefundManager.php index 76756817e..a2c3fa4d8 100644 --- a/src/Components/RefundManager/RefundManager.php +++ b/src/Components/RefundManager/RefundManager.php @@ -472,7 +472,7 @@ private function convertToRepositoryArray(array $serviceItems, string $type): ar 'orderLineItemId' => $item->getShopwareLineID(), 'orderLineItemVersionId' => $item->getShopwareLineVersionId(), 'mollieLineId' => $item->getMollieLineID(), - 'reference' => (string)$item->getShopwareReference(), + 'label' => (string)$item->getShopwareReference(), 'quantity' => $item->getQuantity(), 'amount' => $item->getAmount(), ]; diff --git a/src/Hydrator/RefundHydrator.php b/src/Hydrator/RefundHydrator.php index 8ce9ec116..d5f3ae6f4 100644 --- a/src/Hydrator/RefundHydrator.php +++ b/src/Hydrator/RefundHydrator.php @@ -70,7 +70,7 @@ public function hydrate(Refund $refund, OrderEntity $order): array 'swLineId' => (string)$refundLineItem->getOrderLineItemId(), 'swLineVersionId' => (string)$refundLineItem->getOrderLineItemVersionId(), 'mollieLineId' => $refundLineItem->getMollieLineId(), - 'swReference' => $refundLineItem->getReference(), + 'swReference' => $refundLineItem->getLabel(), 'quantity' => $refundLineItem->getQuantity(), 'amount' => $refundLineItem->getAmount() ]; diff --git a/src/Migration/Migration1672671475RefundItem.php b/src/Migration/Migration1672671475RefundItem.php index 21c5f748c..f8a7385ea 100644 --- a/src/Migration/Migration1672671475RefundItem.php +++ b/src/Migration/Migration1672671475RefundItem.php @@ -21,7 +21,7 @@ public function update(Connection $connection): void `order_line_item_version_id` binary(16) NULL, `mollie_line_id` VARCHAR(255), `type` VARCHAR(255), - `reference` VARCHAR(255), + `label` VARCHAR(255), `refund_id` binary(16) NOT NULL, `quantity` INT(10), `amount` DOUBLE, diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml index 488c22b1a..7b021e49a 100644 --- a/src/Resources/config/services/services.xml +++ b/src/Resources/config/services/services.xml @@ -67,10 +67,11 @@ - + - + + @@ -184,7 +185,7 @@ - + diff --git a/src/Service/Refund/CompositionRepairService.php b/src/Service/Refund/CompositionMigrationService.php similarity index 90% rename from src/Service/Refund/CompositionRepairService.php rename to src/Service/Refund/CompositionMigrationService.php index c422ea979..534df3956 100644 --- a/src/Service/Refund/CompositionRepairService.php +++ b/src/Service/Refund/CompositionMigrationService.php @@ -18,7 +18,7 @@ use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent; use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenEvent; -class CompositionRepairService implements CompositionRepairServiceInterface +class CompositionMigrationService implements CompositionMigrationServiceInterface { /** * @var EntityRepository @@ -63,14 +63,20 @@ public function updateRefundItems(Refund $refund, OrderEntity $order, Context $c } $refundLineItems = $shopwareRefund->getRefundItems()->getElements(); + + /** + * Exit criteria, if we have refund line items, then we exit here + */ if (count($refundLineItems) > 0) { return $order; } + /** @var ?OrderLineItemCollection $orderLineItems */ $orderLineItems = $order->getLineItems(); if ($orderLineItems === null) { return $order; } + $dataToSave = []; foreach ($oldCompositions as $composition) { $reference = $composition->swReference; @@ -81,14 +87,17 @@ public function updateRefundItems(Refund $refund, OrderEntity $order, Context $c $row = [ 'type' => $oldMetadata->type, 'mollieLineId' => $composition->mollieLineId, - 'reference' => $reference, + 'label' => $reference, 'quantity' => $composition->quantity, 'amount' => $composition->amount, 'refundId' => $shopwareRefund->getId(), 'oderLineItemId' => null, 'oderLineItemVersionId' => null, ]; + + $orderLineItem = $this->filterByMollieId($orderLineItems, $composition->mollieLineId); + if ($orderLineItem instanceof OrderLineItemEntity) { $row['orderLineItemId'] = $orderLineItem->getId(); $row['orderLineItemVersionId'] = $orderLineItem->getVersionId(); @@ -97,7 +106,13 @@ public function updateRefundItems(Refund $refund, OrderEntity $order, Context $c $dataToSave[] = $row; } + $entityWrittenContainerEvent = $this->refundItemRepository->create($dataToSave, $context); + + /** + * get the new inserted data from the written container event and create a new refund items collection and assign it to the refund. + * php is using here copy by reference so the order will have the new line items inside the refund and we do not need to reload the order entity again + */ $refundItems = $this->createEntitiesByEvent($entityWrittenContainerEvent); $shopwareRefund->setRefundItems($refundItems); return $order; @@ -119,7 +134,7 @@ private function createEntitiesByEvent(EntityWrittenContainerEvent $event): Refu $entity->setId($result->getProperty('id')); $entity->setUniqueIdentifier($result->getProperty('id')); $entity->setQuantity($result->getProperty('quantity')); - $entity->setReference($result->getProperty('reference')); + $entity->setLabel($result->getProperty('label')); $entity->setAmount($result->getProperty('amount')); $entity->setRefundId($result->getProperty('refundId')); $entity->setMollieLineId($result->getProperty('mollieLineId')); diff --git a/src/Service/Refund/CompositionRepairServiceInterface.php b/src/Service/Refund/CompositionMigrationServiceInterface.php similarity index 86% rename from src/Service/Refund/CompositionRepairServiceInterface.php rename to src/Service/Refund/CompositionMigrationServiceInterface.php index 0cc60f31e..9c690e36c 100644 --- a/src/Service/Refund/CompositionRepairServiceInterface.php +++ b/src/Service/Refund/CompositionMigrationServiceInterface.php @@ -7,7 +7,7 @@ use Shopware\Core\Checkout\Order\OrderEntity; use Shopware\Core\Framework\Context; -interface CompositionRepairServiceInterface +interface CompositionMigrationServiceInterface { public function updateRefundItems(Refund $refund, OrderEntity $order, Context $context): OrderEntity; } diff --git a/src/Service/Refund/Mollie/DataCompressor.php b/src/Service/Refund/Mollie/DataCompressor.php deleted file mode 100644 index f082ce86a..000000000 --- a/src/Service/Refund/Mollie/DataCompressor.php +++ /dev/null @@ -1,37 +0,0 @@ -= will be compressed - */ - private const LENGTH_THRESHOLD = 32; - - /** - * this is the length of the part in the - * beginning and end of the string to be compressed. - * this value * 2 is the final length - */ - private const LENGTH_PARTS = 4; - - - /** - * @param string $value - * @return string - */ - public function compress(string $value): string - { - if (strlen($value) < self::LENGTH_THRESHOLD) { - return $value; - } - - $firstPart = substr($value, 0, self::LENGTH_PARTS); - $lastPart = substr($value, -self::LENGTH_PARTS); - - return $firstPart . $lastPart; - } -} diff --git a/src/Service/Refund/RefundService.php b/src/Service/Refund/RefundService.php index e73951882..c13f9f4ce 100644 --- a/src/Service/Refund/RefundService.php +++ b/src/Service/Refund/RefundService.php @@ -48,7 +48,7 @@ class RefundService implements RefundServiceInterface private $gwMollie; /** - * @var CompositionRepairServiceInterface + * @var CompositionMigrationServiceInterface */ private $compositionRepairService; @@ -59,7 +59,7 @@ class RefundService implements RefundServiceInterface * @param RefundHydrator $refundHydrator * @param MollieGatewayInterface $gwMollie */ - public function __construct(Order $mollie, OrderService $orders, RefundHydrator $refundHydrator, MollieGatewayInterface $gwMollie, CompositionRepairServiceInterface $compositionRepairService) + public function __construct(Order $mollie, OrderService $orders, RefundHydrator $refundHydrator, MollieGatewayInterface $gwMollie, CompositionMigrationServiceInterface $compositionRepairService) { $this->mollie = $mollie; $this->orders = $orders; diff --git a/tests/PHPUnit/Hydrator/RefundHydratorTest.php b/tests/PHPUnit/Hydrator/RefundHydratorTest.php index 6588d1f4e..a9ab8e6ce 100644 --- a/tests/PHPUnit/Hydrator/RefundHydratorTest.php +++ b/tests/PHPUnit/Hydrator/RefundHydratorTest.php @@ -116,7 +116,7 @@ private function getExpectedData(?float $amount, ?float $settlementAmount, strin 'isProcessing' => $status == RefundStatus::STATUS_PROCESSING, 'isQueued' => $status == RefundStatus::STATUS_QUEUED, 'isTransferred' => $status == RefundStatus::STATUS_REFUNDED, - 'metadata' => null, + 'metadata' => new \stdClass(), ]; } diff --git a/tests/PHPUnit/Service/Refund/Mollie/DataCompressorTest.php b/tests/PHPUnit/Service/Refund/Mollie/DataCompressorTest.php deleted file mode 100644 index 1f4e41506..000000000 --- a/tests/PHPUnit/Service/Refund/Mollie/DataCompressorTest.php +++ /dev/null @@ -1,53 +0,0 @@ -comporessor = new DataCompressor(); - } - - /** - * This test verifies that a valid ID with length 32 is - * correctly compressed and returned. - * - * @return void - */ - public function testCompressID() - { - $value = $this->comporessor->compress('2a88d9b59d474c7e869d8071649be43c'); - - $this->assertEquals(8, strlen($value)); - $this->assertEquals('2a88e43c', $value); - } - - - /** - * This test verifies that invalid IDs with length < 32 are - * not compressed at all. - * - * @return void - */ - public function testInvalidIDsAreNotCompressed() - { - # string with length 31 - $value = $this->comporessor->compress('2a88d9b59d474c7e869d8071649be43'); - - $this->assertEquals(31, strlen($value)); - $this->assertEquals('2a88d9b59d474c7e869d8071649be43', $value); - } -} From 3c23202c9462f3254bb89924798f24136a815836 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 27 Sep 2023 13:32:28 +0200 Subject: [PATCH 9/9] MOL-969: create an array --- .../DAL/RefundItem/RefundItemEntity.php | 33 ++++++++++++++++++ .../RefundManager/RefundManager.php | 21 +++++++----- .../Refund/CompositionMigrationService.php | 34 +++++++++---------- 3 files changed, 62 insertions(+), 26 deletions(-) diff --git a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php index 67e5fde55..50f8fb98c 100644 --- a/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php +++ b/src/Components/RefundManager/DAL/RefundItem/RefundItemEntity.php @@ -221,4 +221,37 @@ public function setOrderLineItemVersionId(?string $orderLineItemVersionId): void { $this->orderLineItemVersionId = $orderLineItemVersionId; } + + /** + * @param string $type + * @param string $mollieLineId + * @param string $label + * @param int $quantity + * @param float $amount + * @param null|string $oderLineItemId + * @param null|string $oderLineItemVersionId + * @param null|string $refundId + * @return array + */ + public static function createEntryArray(string $type, string $mollieLineId, string $label, int $quantity, float $amount, ?string $oderLineItemId, ?string $oderLineItemVersionId, ?string $refundId): array + { + $row = [ + 'type' => $type, + 'mollieLineId' => $mollieLineId, + 'label' => $label, + 'quantity' => $quantity, + 'amount' => $amount, + 'oderLineItemId' => $oderLineItemId, + 'oderLineItemVersionId' => $oderLineItemVersionId, + ]; + + /** + * refundId is not given when we create a new entry because the id is created by shopware dal + */ + if ($refundId !== null) { + $row['refundId'] = $refundId; + } + + return $row; + } } diff --git a/src/Components/RefundManager/RefundManager.php b/src/Components/RefundManager/RefundManager.php index a2c3fa4d8..f3df010e9 100644 --- a/src/Components/RefundManager/RefundManager.php +++ b/src/Components/RefundManager/RefundManager.php @@ -6,6 +6,7 @@ use Kiener\MolliePayments\Compatibility\Bundles\FlowBuilder\FlowBuilderEventFactory; use Kiener\MolliePayments\Compatibility\Bundles\FlowBuilder\FlowBuilderFactoryInterface; use Kiener\MolliePayments\Components\RefundManager\Builder\RefundDataBuilder; +use Kiener\MolliePayments\Components\RefundManager\DAL\RefundItem\RefundItemEntity; use Kiener\MolliePayments\Components\RefundManager\DAL\Repository\RefundRepositoryInterface; use Kiener\MolliePayments\Components\RefundManager\Integrators\StockManagerInterface; use Kiener\MolliePayments\Components\RefundManager\RefundData\RefundData; @@ -466,16 +467,18 @@ private function convertToRepositoryArray(array $serviceItems, string $type): ar if ($item->getQuantity() <= 0) { continue; } + $row = RefundItemEntity::createEntryArray( + $type, + $item->getMollieLineID(), + $item->getShopwareReference(), + $item->getQuantity(), + $item->getAmount(), + $item->getShopwareLineID(), + $item->getShopwareLineVersionId(), + null + ); - $data[] = [ - 'type' => $type, - 'orderLineItemId' => $item->getShopwareLineID(), - 'orderLineItemVersionId' => $item->getShopwareLineVersionId(), - 'mollieLineId' => $item->getMollieLineID(), - 'label' => (string)$item->getShopwareReference(), - 'quantity' => $item->getQuantity(), - 'amount' => $item->getAmount(), - ]; + $data[] = $row; } return $data; } diff --git a/src/Service/Refund/CompositionMigrationService.php b/src/Service/Refund/CompositionMigrationService.php index 534df3956..fc83579eb 100644 --- a/src/Service/Refund/CompositionMigrationService.php +++ b/src/Service/Refund/CompositionMigrationService.php @@ -79,30 +79,30 @@ public function updateRefundItems(Refund $refund, OrderEntity $order, Context $c $dataToSave = []; foreach ($oldCompositions as $composition) { - $reference = $composition->swReference; - if (strlen($reference) === 0) { - $reference = RoundingDifferenceFixer::DEFAULT_TITLE; + $label = $composition->swReference; + if (strlen($label) === 0) { + $label = RoundingDifferenceFixer::DEFAULT_TITLE; } - $row = [ - 'type' => $oldMetadata->type, - 'mollieLineId' => $composition->mollieLineId, - 'label' => $reference, - 'quantity' => $composition->quantity, - 'amount' => $composition->amount, - 'refundId' => $shopwareRefund->getId(), - 'oderLineItemId' => null, - 'oderLineItemVersionId' => null, - ]; - - + $orderLineItemId = null; + $orderLineItemVersionId = null; $orderLineItem = $this->filterByMollieId($orderLineItems, $composition->mollieLineId); if ($orderLineItem instanceof OrderLineItemEntity) { - $row['orderLineItemId'] = $orderLineItem->getId(); - $row['orderLineItemVersionId'] = $orderLineItem->getVersionId(); + $orderLineItemId = $orderLineItem->getId(); + $orderLineItemVersionId = $orderLineItem->getVersionId(); } + $row = RefundItemEntity::createEntryArray( + $oldMetadata->type, + $composition->mollieLineId, + $label, + $composition->quantity, + $composition->amount, + $orderLineItemId, + $orderLineItemVersionId, + $shopwareRefund->getId() + ); $dataToSave[] = $row; }