From 307872b2506a91f1be21f5178be4afe10460ba4c Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Mon, 10 Oct 2022 15:03:25 +0100 Subject: [PATCH 01/25] Update workflow to v3 --- .github/workflows/ci.yml | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 644a18faf3..5b929dbe3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,35 +3,22 @@ on: workflow_dispatch: push: branches: - - 'v3' + - v3 pull_request: +permissions: + contents: read concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: - ecs: - name: ECS - uses: craftcms/.github/.github/workflows/ecs.yml@v2 + ci: + name: ci + uses: craftcms/.github/.github/workflows/ci.yml@v3 with: - php_version: '7.2' - prettier: - name: Prettier - uses: craftcms/.github/.github/workflows/prettier.yml@v2 - codecept: - name: Codeception - needs: [ecs, prettier] - uses: craftcms/.github/.github/workflows/codecept.yml@v2 - with: - php_versions: '["7.2", "7.3", "7.4", "8.0", "8.1"]' - notify-slack: - name: Notify Slack - needs: [ecs, prettier, codecept] - if: ${{ always() }} - uses: craftcms/.github/.github/workflows/notify-slack.yml@v2 - with: - success: ${{ needs.ecs.result == 'success' && needs.prettier.result == 'success' && needs.codecept.result == 'success' }} - failure: ${{ needs.ecs.result == 'failure' || needs.prettier.result == 'failure' || needs.codecept.result == 'failure' }} - failure_text_prefix: + craft_version: '4' + jobs: '["ecs", "prettier", "tests"]' + notify_slack: true + slack_subteam: secrets: token: ${{ secrets.GITHUB_TOKEN }} slack_webhook_url: ${{ secrets.SLACK_COMMERCE_WEBHOOK_URL }} From 1eaac889fbe3e47d86e846d5ce58e7c3e56cf364 Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Mon, 10 Oct 2022 15:06:01 +0100 Subject: [PATCH 02/25] Set correct Craft version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b929dbe3e..82a590a6eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: name: ci uses: craftcms/.github/.github/workflows/ci.yml@v3 with: - craft_version: '4' + craft_version: '3' jobs: '["ecs", "prettier", "tests"]' notify_slack: true slack_subteam: From 50b5246951a192d4553ea3e3777f377d73c9228e Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:29 -0400 Subject: [PATCH 03/25] Update source file commerce.php --- src/translations/en/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/en/commerce.php b/src/translations/en/commerce.php index 86350d6453..9a6d729afb 100644 --- a/src/translations/en/commerce.php +++ b/src/translations/en/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'Transaction ID', 'Transaction captured successfully: {message}' => 'Transaction captured successfully: {message}', 'Transaction refunded successfully: {message}' => 'Transaction refunded successfully: {message}', - 'Transaction type not supported.' => 'Transaction type not supported.', 'Transactions' => 'Transactions', 'Trial days credited' => 'Trial days credited', 'Trial expiration' => 'Trial expiration', From bbaf83f432a70c39424cec34a26f57546307b2a8 Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:30 -0400 Subject: [PATCH 04/25] New translations commerce.php (French) --- src/translations/fr/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/fr/commerce.php b/src/translations/fr/commerce.php index 9e80ad2037..cde92fcdae 100644 --- a/src/translations/fr/commerce.php +++ b/src/translations/fr/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'ID de la transaction', 'Transaction captured successfully: {message}' => 'Transaction capturée avec succès : {message}', 'Transaction refunded successfully: {message}' => 'Transaction remboursée avec succès : {message}', - 'Transaction type not supported.' => 'Type de transaction non pris en charge.', 'Transactions' => 'Transactions', 'Trial days credited' => 'Jours d’essai crédités', 'Trial expiration' => 'Expiration de l\'essai', From 6889bc76a962daeb417fb7066e9c81622c6a92c1 Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:32 -0400 Subject: [PATCH 05/25] New translations commerce.php (German) --- src/translations/de/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/de/commerce.php b/src/translations/de/commerce.php index ce17407abe..fdb33ef8fd 100644 --- a/src/translations/de/commerce.php +++ b/src/translations/de/commerce.php @@ -1059,7 +1059,6 @@ 'Transaction ID' => 'Transaktions-ID', 'Transaction captured successfully: {message}' => 'Transaktion erfolgreich erfasst: {message}', 'Transaction refunded successfully: {message}' => 'Transaktion erfolgreich erstattet: {message}', - 'Transaction type not supported.' => 'Transaktionsart wird nicht unterstützt.', 'Transactions' => 'Transaktionen', 'Trial days credited' => 'Testtage gutgeschrieben', 'Trial expiration' => 'Ablauf der Testphase', From ac39beaaf5c3d481f1e874fe61851730dc98dc70 Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:33 -0400 Subject: [PATCH 06/25] New translations commerce.php (Italian) --- src/translations/it/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/it/commerce.php b/src/translations/it/commerce.php index 8eb36d9a45..92a76ec5b5 100644 --- a/src/translations/it/commerce.php +++ b/src/translations/it/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'ID transazione', 'Transaction captured successfully: {message}' => 'Transazione acquisita correttamente: {message}', 'Transaction refunded successfully: {message}' => 'Transazione rimborsata correttamente: {message}', - 'Transaction type not supported.' => 'Tipo di transazione non supportato.', 'Transactions' => 'Transazioni', 'Trial days credited' => 'Giorni di prova concessi', 'Trial expiration' => 'Scadenza prova', From ff53f062a074d886b523a02a2186627737d1a4bc Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:34 -0400 Subject: [PATCH 07/25] New translations commerce.php (Japanese) --- src/translations/ja/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/ja/commerce.php b/src/translations/ja/commerce.php index 4829b20bc5..f261ae93da 100644 --- a/src/translations/ja/commerce.php +++ b/src/translations/ja/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => '取引 ID', 'Transaction captured successfully: {message}' => '取引は正しくキャプチャされました: {message}', 'Transaction refunded successfully: {message}' => '取引は正しく払い戻されました: {message}', - 'Transaction type not supported.' => '取引タイプがサポートされていません。', 'Transactions' => '取引', 'Trial days credited' => '付与されたトライアル期間', 'Trial expiration' => 'トライアル期限', From 5e4a34200c3815a7f211f150014469d2efb4675b Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:35 -0400 Subject: [PATCH 08/25] New translations commerce.php (Dutch) --- src/translations/nl/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/nl/commerce.php b/src/translations/nl/commerce.php index 40cf88ae8c..f64b813a2e 100644 --- a/src/translations/nl/commerce.php +++ b/src/translations/nl/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'Transactie-ID', 'Transaction captured successfully: {message}' => 'Transactie succesvol vastgelegd: {message}', 'Transaction refunded successfully: {message}' => 'Transactie succesvol terugbetaald: {message}', - 'Transaction type not supported.' => 'Transactietype niet ondersteund.', 'Transactions' => 'Transacties', 'Trial days credited' => 'Dagen voor proefversie gecrediteerd', 'Trial expiration' => 'Proefperiode verlopen', From 963135b72c985171e30707075ebbc2c2a60727bb Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:36 -0400 Subject: [PATCH 09/25] New translations commerce.php (Portuguese) --- src/translations/pt/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/pt/commerce.php b/src/translations/pt/commerce.php index a02b3cedf8..d2305790a9 100644 --- a/src/translations/pt/commerce.php +++ b/src/translations/pt/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'ID da transação', 'Transaction captured successfully: {message}' => 'Transação realizada com sucesso: {message}', 'Transaction refunded successfully: {message}' => 'Transação reembolsada com sucesso: {message}', - 'Transaction type not supported.' => 'Tipo de transação não suportado.', 'Transactions' => 'Transações', 'Trial days credited' => 'Dias de teste creditados', 'Trial expiration' => 'Data de validade do teste', From 0f48a78f78dc509fefb85a453e95bdcc7755396e Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:38 -0400 Subject: [PATCH 10/25] New translations commerce.php (Slovak) --- src/translations/sk/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/sk/commerce.php b/src/translations/sk/commerce.php index e8e8b73c9f..6366976a87 100644 --- a/src/translations/sk/commerce.php +++ b/src/translations/sk/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'ID transakcie', 'Transaction captured successfully: {message}' => 'Transakcia úspešne zachytená: {message}', 'Transaction refunded successfully: {message}' => 'Transakcia úspešne vrátená: {message}', - 'Transaction type not supported.' => 'Typ transakcie nie je podporovaný.', 'Transactions' => 'Transakcie', 'Trial days credited' => 'Priznané dni skúšobnej verzie', 'Trial expiration' => 'Vypršanie platnosti skúšobnej verzie', From 33f74db70b17e6aad12cbd83a7b773176b345f6d Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:39 -0400 Subject: [PATCH 11/25] New translations commerce.php (English, United Kingdom) --- src/translations/en-GB/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/en-GB/commerce.php b/src/translations/en-GB/commerce.php index e32679c321..5fbd441f45 100644 --- a/src/translations/en-GB/commerce.php +++ b/src/translations/en-GB/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'Transaction ID', 'Transaction captured successfully: {message}' => 'Transaction captured successfully: {message}', 'Transaction refunded successfully: {message}' => 'Transaction refunded successfully: {message}', - 'Transaction type not supported.' => 'Transaction type not supported.', 'Transactions' => 'Transactions', 'Trial days credited' => 'Trial days credited', 'Trial expiration' => 'Trial expiration', From 07fab763a1db077c710efbfde070e11cccdfe30e Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:40 -0400 Subject: [PATCH 12/25] New translations commerce.php (French, Canada) --- src/translations/fr-CA/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/fr-CA/commerce.php b/src/translations/fr-CA/commerce.php index 04b3086ba0..a585eb3718 100644 --- a/src/translations/fr-CA/commerce.php +++ b/src/translations/fr-CA/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'ID de la transaction', 'Transaction captured successfully: {message}' => 'Transaction collectée avec succès : {message}', 'Transaction refunded successfully: {message}' => 'Transaction remboursée avec succès : {message}', - 'Transaction type not supported.' => 'Type de transaction non pris en charge.', 'Transactions' => 'Transactions', 'Trial days credited' => 'Jours d’essai crédités', 'Trial expiration' => 'Expiration de l\'essai', From 95fb8a07ba9170d50cf7620f80b7c1a255c391a2 Mon Sep 17 00:00:00 2001 From: shinybrad <83238715+shinybrad@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:53:42 -0400 Subject: [PATCH 13/25] New translations commerce.php (Norwegian Bokmal) --- src/translations/nb/commerce.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/translations/nb/commerce.php b/src/translations/nb/commerce.php index 28dbc75f37..e4d8e0d4ca 100644 --- a/src/translations/nb/commerce.php +++ b/src/translations/nb/commerce.php @@ -1058,7 +1058,6 @@ 'Transaction ID' => 'Transaksjons-ID', 'Transaction captured successfully: {message}' => 'Vellykket fanging av transaksjoner: {message}', 'Transaction refunded successfully: {message}' => 'Vellykket refusjon av transaksjon: {message}', - 'Transaction type not supported.' => 'Transaksjonstype støttes ikke.', 'Transactions' => 'Transaksjoner', 'Trial days credited' => 'Prøvedager kreditert', 'Trial expiration' => 'Utløpstid for prøveperiode', From c9049cd48e07bb726cd473269ba0de2f97aa01ed Mon Sep 17 00:00:00 2001 From: Luke Holder Date: Wed, 26 Oct 2022 17:16:42 +0800 Subject: [PATCH 14/25] Fixed #3010 - `getSidebarHtml()` takes care of adding the status selector lightswitches in the universal element editor --- CHANGELOG.md | 1 + src/elements/Product.php | 24 +++--------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e03cc315..198ab2809f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Fixed a bug that could occur when querying products by `type`. ([#2966](https://github.com/craftcms/commerce/issues/2966)) - Fixed a bug where `availableForUseWithOrder` on payment gateways not respecting on payment transaction modal. ([#2988](https://github.com/craftcms/commerce/issues/2988)) - Fixed a bug where the “Template Path” was blank on the Emails index page. ([#3000](https://github.com/craftcms/commerce/issues/3000)) +- Fixed a bug where product slideout editors were showing additional status fields. ([#3010](https://github.com/craftcms/commerce/issues/3010)) ## 4.1.3 - 2022-10-07 diff --git a/src/elements/Product.php b/src/elements/Product.php index a6e76a29ea..11f9bac112 100644 --- a/src/elements/Product.php +++ b/src/elements/Product.php @@ -799,24 +799,6 @@ public function getSidebarHtml(bool $static): string // General Meta fields $topMetaHtml = Craft::$app->getView()->renderObjectTemplate('{% import "commerce/products/_fields" as productFields %}{{ productFields.generalMetaFields(product) }}', null, ['product' => $this], Craft::$app->getView()::TEMPLATE_MODE_CP); - // Enabled field - $topMetaHtml .= Cp::lightswitchFieldHtml([ - 'label' => Craft::t('commerce', 'Enabled'), - 'id' => 'enabled', - 'name' => 'enabled', - 'on' => $this->enabled, - ]); - - // Multi site enabled - if (Craft::$app->getIsMultiSite()) { - $topMetaHtml .= Cp::lightswitchFieldHtml([ - 'label' => Craft::t('commerce', 'Enabled for site'), - 'id' => 'enabledForSite', - 'name' => 'enabledForSite', - 'on' => $this->enabledForSite, - ]); - } - $html[] = Html::tag('div', $topMetaHtml, ['class' => 'meta']); $html[] = Html::tag('div', Craft::$app->getView()->renderObjectTemplate( @@ -1059,7 +1041,7 @@ protected function defineRules(): array [['postDate', 'expiryDate'], DateTimeValidator::class], [ ['variants'], - function() { + function () { if (empty($this->getVariants(true))) { $this->addError('variants', Craft::t('commerce', 'Must have at least one variant.')); } @@ -1069,7 +1051,7 @@ function() { ], [ ['variants'], - function() { + function () { $skus = []; foreach ($this->getVariants(true) as $variant) { if (isset($skus[$variant->sku])) { @@ -1083,7 +1065,7 @@ function() { ], [ ['variants'], - function() { + function () { foreach ($this->getVariants(true) as $i => $variant) { if ($this->getScenario() === self::SCENARIO_LIVE && $variant->enabled) { $variant->setScenario(self::SCENARIO_LIVE); From e7188409c9a97f6fea57e7964fb3e68281253967 Mon Sep 17 00:00:00 2001 From: Luke Holder Date: Wed, 26 Oct 2022 17:18:56 +0800 Subject: [PATCH 15/25] Formatting --- src/elements/Product.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/Product.php b/src/elements/Product.php index 11f9bac112..9ac3f71dff 100644 --- a/src/elements/Product.php +++ b/src/elements/Product.php @@ -1041,7 +1041,7 @@ protected function defineRules(): array [['postDate', 'expiryDate'], DateTimeValidator::class], [ ['variants'], - function () { + function() { if (empty($this->getVariants(true))) { $this->addError('variants', Craft::t('commerce', 'Must have at least one variant.')); } @@ -1051,7 +1051,7 @@ function () { ], [ ['variants'], - function () { + function() { $skus = []; foreach ($this->getVariants(true) as $variant) { if (isset($skus[$variant->sku])) { @@ -1065,7 +1065,7 @@ function () { ], [ ['variants'], - function () { + function() { foreach ($this->getVariants(true) as $i => $variant) { if ($this->getScenario() === self::SCENARIO_LIVE && $variant->enabled) { $variant->setScenario(self::SCENARIO_LIVE); From 0ea0fceebafd5a5121d275d75e71c179c3e059dd Mon Sep 17 00:00:00 2001 From: Luke Holder Date: Wed, 26 Oct 2022 21:26:51 +0800 Subject: [PATCH 16/25] Fixed example template address editing validation errors --- .../dist/shop/_private/address/fields.twig | 1 + .../dist/shop/customer/addresses/edit.twig | 22 ++++++++++--------- .../src/shop/_private/address/fields.twig | 1 + .../src/shop/customer/addresses/edit.twig | 22 ++++++++++--------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/example-templates/dist/shop/_private/address/fields.twig b/example-templates/dist/shop/_private/address/fields.twig index 1f9cda3fa4..d17b516d64 100644 --- a/example-templates/dist/shop/_private/address/fields.twig +++ b/example-templates/dist/shop/_private/address/fields.twig @@ -7,6 +7,7 @@ Outputs address form fields for editing an address. {# @var address \craft\elements\Address #} {% set addressName = addressName is defined ? addressName : '' %} {% set showLabelField = showLabelField is defined ? showLabelField : false %} + {# Define a simple a Twig macro for outputting validation errors and making template less redundant #} {% macro displayErrors(address, fieldName) %} {% if address and address.getErrors(fieldName) %} diff --git a/example-templates/dist/shop/customer/addresses/edit.twig b/example-templates/dist/shop/customer/addresses/edit.twig index 46c0baa244..24fea2362d 100644 --- a/example-templates/dist/shop/customer/addresses/edit.twig +++ b/example-templates/dist/shop/customer/addresses/edit.twig @@ -10,17 +10,19 @@ {% set redirect = craft.app.request.queryParam('redirect') %} {% set countryCode = craft.app.request.queryParam('countryCode') %} - {% if addressId %} - {% set address = collect(currentUser.addresses).firstWhere('id', addressId) %} - {% if not address %} - {% exit 404 %} + {% if not address is defined %} + {% if addressId %} + {% set address = collect(currentUser.addresses).firstWhere('id', addressId) %} + {% if not address %} + {% exit 404 %} + {% endif %} + {% else %} + {% set address = create({ + class: 'craft\\elements\\Address', + ownerId: currentUser.id, + countryCode: countryCode ?? 'US' + }) %} {% endif %} - {% else %} - {% set address = create({ - class: 'craft\\elements\\Address', - ownerId: currentUser.id, - countryCode: countryCode ?? 'US' - }) %} {% endif %} diff --git a/example-templates/src/shop/_private/address/fields.twig b/example-templates/src/shop/_private/address/fields.twig index 0ee9d12076..2021085cf8 100755 --- a/example-templates/src/shop/_private/address/fields.twig +++ b/example-templates/src/shop/_private/address/fields.twig @@ -7,6 +7,7 @@ Outputs address form fields for editing an address. {# @var address \craft\elements\Address #} {% set addressName = addressName is defined ? addressName : '' %} {% set showLabelField = showLabelField is defined ? showLabelField : false %} + {# Define a simple a Twig macro for outputting validation errors and making template less redundant #} {% macro displayErrors(address, fieldName) %} {% if address and address.getErrors(fieldName) %} diff --git a/example-templates/src/shop/customer/addresses/edit.twig b/example-templates/src/shop/customer/addresses/edit.twig index 9d2195e0ac..1108ee7c51 100644 --- a/example-templates/src/shop/customer/addresses/edit.twig +++ b/example-templates/src/shop/customer/addresses/edit.twig @@ -10,17 +10,19 @@ {% set redirect = craft.app.request.queryParam('redirect') %} {% set countryCode = craft.app.request.queryParam('countryCode') %} - {% if addressId %} - {% set address = collect(currentUser.addresses).firstWhere('id', addressId) %} - {% if not address %} - {% exit 404 %} + {% if not address is defined %} + {% if addressId %} + {% set address = collect(currentUser.addresses).firstWhere('id', addressId) %} + {% if not address %} + {% exit 404 %} + {% endif %} + {% else %} + {% set address = create({ + class: 'craft\\elements\\Address', + ownerId: currentUser.id, + countryCode: countryCode ?? 'US' + }) %} {% endif %} - {% else %} - {% set address = create({ - class: 'craft\\elements\\Address', - ownerId: currentUser.id, - countryCode: countryCode ?? 'US' - }) %} {% endif %} From fcb6be02236242f39dc14da0faf7e5933a31b2f2 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 08:07:30 -0700 Subject: [PATCH 17/25] Changelog tweaks --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3745dad7..7d0aa6a751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,11 @@ ## Unreleased ### Deprecated -- Deprecated `craft\commerce\elements\Order::getShippingMethod()`. Use `$shippingMethodName` and `$shippingMethodHandle` instead. +- Deprecated `craft\commerce\elements\Order::getShippingMethod()`. `$shippingMethodName` and `$shippingMethodHandle` should be used instead. ### Fixed -- Fixed a bug that occurred when using a custom shipping method. ([#2986](https://github.com/craftcms/commerce/issues/2986)) -- Fixed a bug that could occur when querying products by `type`. ([#2966](https://github.com/craftcms/commerce/issues/2966)) +- Fixed a bug where custom shipping methods weren’t applying to orders properly. ([#2986](https://github.com/craftcms/commerce/issues/2986)) +- Fixed a bug where passing an invalid product type handle into product queries’ `type` params wouldn’t have any effect. ([#2966](https://github.com/craftcms/commerce/issues/2966)) ## 3.4.17.2 - 2022-09-16 From bf9279eb9cadabc1016b541723bedd10be904b60 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 08:15:13 -0700 Subject: [PATCH 18/25] Release note tweaks --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ced6d9334..7be1394d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ - Fixed a bug where it wasn't possible to use a path value for the `loadCartRedirectUrl` setting. ([#2992](https://github.com/craftcms/commerce/pull/2992)) - Fixed a bug where custom shipping methods weren’t applying to orders properly. ([#2986](https://github.com/craftcms/commerce/issues/2986)) - Fixed a bug where passing an invalid product type handle into product queries’ `type` params wouldn’t have any effect. ([#2966](https://github.com/craftcms/commerce/issues/2966)) -- Fixed a bug where `availableForUseWithOrder` on payment gateways not respecting on payment transaction modal. ([#2988](https://github.com/craftcms/commerce/issues/2988)) -- Fixed a bug where the “Template Path” was blank on the Emails index page. ([#3000](https://github.com/craftcms/commerce/issues/3000)) +- Fixed a bug where payments made from Edit Order pages weren’t factoring in gateways’ `availableForUseWithOrder()` methods. ([#2988](https://github.com/craftcms/commerce/issues/2988)) +- Fixed a bug where the Emails index page wasn’t showing emails’ template paths. ([#3000](https://github.com/craftcms/commerce/issues/3000)) - Fixed a bug where product slideout editors were showing additional status fields. ([#3010](https://github.com/craftcms/commerce/issues/3010)) ## 4.1.3 - 2022-10-07 From f4d493e386976d3b6e5006cb90cafcad2c978ab5 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 09:08:32 -0700 Subject: [PATCH 19/25] Fix translation category --- src/elements/conditions/orders/ShippingMethodConditionRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elements/conditions/orders/ShippingMethodConditionRule.php b/src/elements/conditions/orders/ShippingMethodConditionRule.php index bcb0c17521..c75dccff6d 100644 --- a/src/elements/conditions/orders/ShippingMethodConditionRule.php +++ b/src/elements/conditions/orders/ShippingMethodConditionRule.php @@ -25,7 +25,7 @@ class ShippingMethodConditionRule extends BaseMultiSelectConditionRule implement */ public function getLabel(): string { - return Craft::t('app', 'Shipping Method'); + return Craft::t('commerce', 'Shipping Method'); } /** From c3f01e2420d0f295b8b5f4fc23ddba434cc4cc57 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 09:10:17 -0700 Subject: [PATCH 20/25] Merge the changelogs w/ the new headings --- CHANGELOG-WIP.md | 68 -------------------------------------- CHANGELOG.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 83 insertions(+), 70 deletions(-) delete mode 100644 CHANGELOG-WIP.md diff --git a/CHANGELOG-WIP.md b/CHANGELOG-WIP.md deleted file mode 100644 index 038c7621a9..0000000000 --- a/CHANGELOG-WIP.md +++ /dev/null @@ -1,68 +0,0 @@ -# Release Notes for Craft Commerce 4.2 (WIP) - -## 4.2.0 - Unreleased - -### Added -- `commerce/cart/*` actions now return `shippingAddress` and `billingAddress` values in JSON responses. ([#2921](https://github.com/craftcms/commerce/issues/2921)) -- Added `craft\commerce\base\Stat::getOrderStatuses()`. -- Added `craft\commerce\base\Stat::setOrderStatuses()`. -- Added `craft\commerce\base\StatInterface::getOrderStatuses()`. -- Added `craft\commerce\base\StatInterface::setOrderStatuses()`. -- Added `craft\commerce\base\StatWidgetTrait`. -- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSource()`. -- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSourceId()`. -- Added `craft\commerce\behaviors\CustomerBehavoir::setPrimaryPaymentSourceId()`. -- Added `craft\commerce\controllers\PaymentSourcesController::actionSetPrimaryPaymentSource()`. -- Added `craft\commerce\elements\conditions\customers\HasOrdersConditionRule`. -- Added `craft\commerce\elements\conditions\orders\CustomerConditionRule`. -- Added `craft\commerce\elements\conditions\orders\DateOrderedConditionRule`. -- Added `craft\commerce\elements\conditions\orders\HasPurchasableConditionRule`. -- Added `craft\commerce\elements\conditions\orders\IsCompletedConditionRule`. -- Added `craft\commerce\elements\conditions\orders\IsPaidConditionRule`. -- Added `craft\commerce\elements\conditions\orders\ItemSubtotalConditionRule`. -- Added `craft\commerce\elements\conditions\orders\ItemTotalConditionRule`. -- Added `craft\commerce\elements\conditions\orders\OrderCurrencyValuesAttributeConditionRule`. -- Added `craft\commerce\elements\conditions\orders\OrderStatusConditionRule`. -- Added `craft\commerce\elements\conditions\orders\OrderTextValuesAttributeConditionRule`. -- Added `craft\commerce\elements\conditions\orders\ReferenceConditionRule`. -- Added `craft\commerce\elements\conditions\orders\TotalConditionRule`. -- Added `craft\commerce\elements\conditions\orders\TotalDiscountConditionRule`. -- Added `craft\commerce\elements\conditions\orders\TotalPriceConditionRule`. -- Added `craft\commerce\elements\conditions\orders\TotalQtyConditionRule`. -- Added `craft\commerce\elements\conditions\orders\TotalTaxConditionRule`. -- Added `craft\commerce\elements\db\OrderQuery::$itemSubtotal`. -- Added `craft\commerce\elements\db\OrderQuery::$itemTotal`. -- Added `craft\commerce\elements\db\OrderQuery::$shippingMethodHandle`. -- Added `craft\commerce\elements\db\OrderQuery::$total`. -- Added `craft\commerce\elements\db\OrderQuery::$totalDiscount`. -- Added `craft\commerce\elements\db\OrderQuery::$totalPaid`. -- Added `craft\commerce\elements\db\OrderQuery::$totalPrice`. -- Added `craft\commerce\elements\db\OrderQuery::$totalQty`. -- Added `craft\commerce\elements\db\OrderQuery::$totalTax`. -- Added `craft\commerce\elements\db\OrderQuery::itemSubtotal()`. -- Added `craft\commerce\elements\db\OrderQuery::itemTotal()`. -- Added `craft\commerce\elements\db\OrderQuery::shippingMethodHandle()`. -- Added `craft\commerce\elements\db\OrderQuery::total()`. -- Added `craft\commerce\elements\db\OrderQuery::totalDiscount()`. -- Added `craft\commerce\elements\db\OrderQuery::totalPaid()`. -- Added `craft\commerce\elements\db\OrderQuery::totalPrice()`. -- Added `craft\commerce\elements\db\OrderQuery::totalQty()`. -- Added `craft\commerce\elements\db\OrderQuery::totalTax()`. -- Added `craft\commerce\elements\Order::$storedTotalQty`. -- Added `craft\commerce\elements\Order::autoSetPaymentSource()`. -- Added `craft\commerce\models\PaymentSource::getIsPrimary()`. -- Added `craft\commerce\models\Settings::$autoSetPaymentSource`. -- Added `craft\commerce\records\Customer::$primaryPaymentSourceId`. -- Added `craft\commerce\services\savePrimaryPaymentSourceId()`. -- Added `craft\commerce\elements\conditions\orders\ShippingMethodConditionRule`. - -### Changed -- Order condition builds now have access to the “Shipping Method” condition rule. -- It is now possible to set a primary payment source for a customer. -- It is now possible to set a quantity when adding a line item on the Order Edit page. ([#2993](https://github.com/craftcms/commerce/discussions/2993)) -- It is now possible to automatically set a customer’s primary payment source on new carts using the `autoSetPaymentSource` config setting. -- It is now possible to query orders by `itemTotal`, `itemSubtotal`, `shippingMethodHandle`, `totalDiscount`, `total`, `totalPaid`, `totalPrice`, `totalQty`, and `totalTax`. -- Querying an order by `reference` now allows a wider range of inputs. -- Shipping and Tax Categories are now archived instead of deleted. -- It is now possible to define how addresses are matched in `Order::hasMatchingAddresses()`. -- Update order status action now returns relevant flash messages on completion. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7be1394d48..4b30577fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,91 @@ ## Unreleased -### Deprecated +### Store Management +- Discounts’ “Match Customer” conditions can now have a “Has Orders” rule. +- Order conditions can now have a “Completed” rule. +- Order conditions can now have a “Customer” rule. +- Order conditions can now have a “Date Ordered” rule. +- Order conditions can now have a “Has Purchasable” rule. +- Order conditions can now have a “Item Subtotal” rule. +- Order conditions can now have a “Order Status” rule. +- Order conditions can now have a “Paid” rule. +- Order conditions can now have a “Reference” rule. +- Order conditions can now have a “Shipping Method” rule. +- Order conditions can now have a “Total” rule. +- Order conditions can now have a “Total Discount” rule. +- Order conditions can now have a “Total Price” rule. +- Order conditions can now have a “Total Qty” rule. +- Order conditions can now have a “Total Tax” rule. +- It’s now possible to assign primary payment sources on customers. +- It’s now possible to set the quantity when adding a line item on the Edit Order page. ([#2993](https://github.com/craftcms/commerce/discussions/2993)) +- The “Update Order Status…” bulk order action now returns a more helpful response message. + +### Administration +- Added the `autoSetPaymentSource` config setting, which can be enabled to automatically set a customers’ primary payment sources on new carts. +- Shipping and tax categories are now archived instead of deleted. + +### Development +- Order queries now have `itemTotal`, `itemSubtotal`, `shippingMethodHandle`, `totalDiscount`, `total`, `totalPaid`, `totalPrice`, `totalQty`, and `totalTax` params. +- Order queries’ `reference` params now accept a wider range of values. +- `commerce/cart/*` actions now return `shippingAddress` and `billingAddress` values in JSON responses. ([#2921](https://github.com/craftcms/commerce/issues/2921)) + +### Extending +- Added `craft\commerce\base\Stat::getOrderStatuses()`. +- Added `craft\commerce\base\Stat::setOrderStatuses()`. +- Added `craft\commerce\base\StatInterface::getOrderStatuses()`. +- Added `craft\commerce\base\StatInterface::setOrderStatuses()`. +- Added `craft\commerce\base\StatWidgetTrait`. +- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSource()`. +- Added `craft\commerce\behaviors\CustomerBehavoir::getPrimaryPaymentSourceId()`. +- Added `craft\commerce\behaviors\CustomerBehavoir::setPrimaryPaymentSourceId()`. +- Added `craft\commerce\controllers\PaymentSourcesController::actionSetPrimaryPaymentSource()`. +- Added `craft\commerce\elements\Order::$storedTotalQty`. +- Added `craft\commerce\elements\Order::autoSetPaymentSource()`. +- Added `craft\commerce\elements\conditions\customers\HasOrdersConditionRule`. +- Added `craft\commerce\elements\conditions\orders\CompletedConditionRule`. +- Added `craft\commerce\elements\conditions\orders\CustomerConditionRule`. +- Added `craft\commerce\elements\conditions\orders\DateOrderedConditionRule`. +- Added `craft\commerce\elements\conditions\orders\HasPurchasableConditionRule`. +- Added `craft\commerce\elements\conditions\orders\ItemSubtotalConditionRule`. +- Added `craft\commerce\elements\conditions\orders\ItemTotalConditionRule`. +- Added `craft\commerce\elements\conditions\orders\OrderCurrencyValuesAttributeConditionRule`. +- Added `craft\commerce\elements\conditions\orders\OrderStatusConditionRule`. +- Added `craft\commerce\elements\conditions\orders\OrderTextValuesAttributeConditionRule`. +- Added `craft\commerce\elements\conditions\orders\PaidConditionRule`. +- Added `craft\commerce\elements\conditions\orders\ReferenceConditionRule`. +- Added `craft\commerce\elements\conditions\orders\ShippingMethodConditionRule`. +- Added `craft\commerce\elements\conditions\orders\TotalConditionRule`. +- Added `craft\commerce\elements\conditions\orders\TotalDiscountConditionRule`. +- Added `craft\commerce\elements\conditions\orders\TotalPriceConditionRule`. +- Added `craft\commerce\elements\conditions\orders\TotalQtyConditionRule`. +- Added `craft\commerce\elements\conditions\orders\TotalTaxConditionRule`. +- Added `craft\commerce\elements\db\OrderQuery::$itemSubtotal`. +- Added `craft\commerce\elements\db\OrderQuery::$itemTotal`. +- Added `craft\commerce\elements\db\OrderQuery::$shippingMethodHandle`. +- Added `craft\commerce\elements\db\OrderQuery::$totalDiscount`. +- Added `craft\commerce\elements\db\OrderQuery::$totalPaid`. +- Added `craft\commerce\elements\db\OrderQuery::$totalPrice`. +- Added `craft\commerce\elements\db\OrderQuery::$totalQty`. +- Added `craft\commerce\elements\db\OrderQuery::$totalTax`. +- Added `craft\commerce\elements\db\OrderQuery::$total`. +- Added `craft\commerce\elements\db\OrderQuery::itemSubtotal()`. +- Added `craft\commerce\elements\db\OrderQuery::itemTotal()`. +- Added `craft\commerce\elements\db\OrderQuery::shippingMethodHandle()`. +- Added `craft\commerce\elements\db\OrderQuery::total()`. +- Added `craft\commerce\elements\db\OrderQuery::totalDiscount()`. +- Added `craft\commerce\elements\db\OrderQuery::totalPaid()`. +- Added `craft\commerce\elements\db\OrderQuery::totalPrice()`. +- Added `craft\commerce\elements\db\OrderQuery::totalQty()`. +- Added `craft\commerce\elements\db\OrderQuery::totalTax()`. +- Added `craft\commerce\models\PaymentSource::getIsPrimary()`. +- Added `craft\commerce\models\Settings::$autoSetPaymentSource`. +- Added `craft\commerce\records\Customer::$primaryPaymentSourceId`. +- Added `craft\commerce\services\savePrimaryPaymentSourceId()`. +- `craft\commerce\elements\Order::hasMatchingAddresses()` now has an `$attributes` argument, which can be used to customize which address attributes should be checked. - Deprecated `craft\commerce\elements\Order::getShippingMethod()`. `$shippingMethodName` and `$shippingMethodHandle` should be used instead. -### Fixed +### System - Fixed a bug where it wasn't possible to use a path value for the `loadCartRedirectUrl` setting. ([#2992](https://github.com/craftcms/commerce/pull/2992)) - Fixed a bug where custom shipping methods weren’t applying to orders properly. ([#2986](https://github.com/craftcms/commerce/issues/2986)) - Fixed a bug where passing an invalid product type handle into product queries’ `type` params wouldn’t have any effect. ([#2966](https://github.com/craftcms/commerce/issues/2966)) From 7edbae4fb80aaaf97a8a4782731116e391089a80 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 09:13:02 -0700 Subject: [PATCH 21/25] Extensibility [ci skip] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b30577fa5..75cfc37ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ - Order queries’ `reference` params now accept a wider range of values. - `commerce/cart/*` actions now return `shippingAddress` and `billingAddress` values in JSON responses. ([#2921](https://github.com/craftcms/commerce/issues/2921)) -### Extending +### Extensibility - Added `craft\commerce\base\Stat::getOrderStatuses()`. - Added `craft\commerce\base\Stat::setOrderStatuses()`. - Added `craft\commerce\base\StatInterface::getOrderStatuses()`. From 87982e2bc3cb7270b199df818d9795723423bdd9 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 26 Oct 2022 09:14:09 -0700 Subject: [PATCH 22/25] Mention the Craft CMS requirement change [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75cfc37ae8..8c047ab390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ - Deprecated `craft\commerce\elements\Order::getShippingMethod()`. `$shippingMethodName` and `$shippingMethodHandle` should be used instead. ### System +- Craft Commerce now requires Craft CMS 4.3.0 or later. - Fixed a bug where it wasn't possible to use a path value for the `loadCartRedirectUrl` setting. ([#2992](https://github.com/craftcms/commerce/pull/2992)) - Fixed a bug where custom shipping methods weren’t applying to orders properly. ([#2986](https://github.com/craftcms/commerce/issues/2986)) - Fixed a bug where passing an invalid product type handle into product queries’ `type` params wouldn’t have any effect. ([#2966](https://github.com/craftcms/commerce/issues/2966)) From fa46e18aeebdd7ca666cc3dd22c3df60b6fb1d63 Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Wed, 26 Oct 2022 17:20:35 +0100 Subject: [PATCH 23/25] Bump dependencies --- composer.json | 2 +- composer.lock | 210 +++++++++++++++++++++++++------------------------- 2 files changed, 105 insertions(+), 107 deletions(-) diff --git a/composer.json b/composer.json index 4a054e7eb9..6d09057056 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "prefer-stable": true, "require": { "php": "^8.0.2", - "craftcms/cms": "4.3.x-dev as 4.3.0", + "craftcms/cms": "^4.3.0", "dompdf/dompdf": "^2.0.0", "ibericode/vat": "^1.1.2", "iio/libmergepdf": "^4.0" diff --git a/composer.lock b/composer.lock index 03d6df2c4f..6aff126190 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "96a4b6a8b77b4b339583360e0d996d2b", + "content-hash": "9a8fa4e108f4ef90d0f184dd14f74f22", "packages": [ { "name": "cebe/markdown", @@ -136,16 +136,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c" + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/30897edbfb15e784fe55587b4f73ceefd3c4d98c", - "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", "shasum": "" }, "require": { @@ -192,7 +192,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.3" + "source": "https://github.com/composer/ca-bundle/tree/1.3.4" }, "funding": [ { @@ -208,7 +208,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T07:14:26+00:00" + "time": "2022-10-12T12:08:29+00:00" }, { "name": "composer/composer", @@ -678,16 +678,16 @@ }, { "name": "craftcms/cms", - "version": "4.3.x-dev", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/craftcms/cms.git", - "reference": "2f05b56486a9ef9ed0615f58a26a833490771639" + "reference": "57dd0fab44655df27200e3a67a975ad182cd5125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/cms/zipball/2f05b56486a9ef9ed0615f58a26a833490771639", - "reference": "2f05b56486a9ef9ed0615f58a26a833490771639", + "url": "https://api.github.com/repos/craftcms/cms/zipball/57dd0fab44655df27200e3a67a975ad182cd5125", + "reference": "57dd0fab44655df27200e3a67a975ad182cd5125", "shasum": "" }, "require": { @@ -792,7 +792,7 @@ "rss": "https://github.com/craftcms/cms/releases.atom", "source": "https://github.com/craftcms/cms" }, - "time": "2022-10-05T00:52:04+00:00" + "time": "2022-10-25T17:32:50+00:00" }, { "name": "craftcms/oauth2-craftid", @@ -1735,16 +1735,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1834,7 +1834,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1850,7 +1850,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "ibericode/vat", @@ -1963,16 +1963,16 @@ }, { "name": "illuminate/collections", - "version": "v9.34.0", + "version": "v9.37.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "a533ba3fce4e288a42f6287e1b9a685cdbc14f9f" + "reference": "32e3cd051cf1d12c1e7d5f7bb5a52d0dae8b7a8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/a533ba3fce4e288a42f6287e1b9a685cdbc14f9f", - "reference": "a533ba3fce4e288a42f6287e1b9a685cdbc14f9f", + "url": "https://api.github.com/repos/illuminate/collections/zipball/32e3cd051cf1d12c1e7d5f7bb5a52d0dae8b7a8b", + "reference": "32e3cd051cf1d12c1e7d5f7bb5a52d0dae8b7a8b", "shasum": "" }, "require": { @@ -2014,11 +2014,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-09-16T14:22:26+00:00" + "time": "2022-10-06T14:13:23+00:00" }, { "name": "illuminate/conditionable", - "version": "v9.34.0", + "version": "v9.37.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -2064,7 +2064,7 @@ }, { "name": "illuminate/contracts", - "version": "v9.34.0", + "version": "v9.37.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -2112,7 +2112,7 @@ }, { "name": "illuminate/macroable", - "version": "v9.34.0", + "version": "v9.37.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -2853,25 +2853,30 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -2897,9 +2902,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "pixelandtonic/imagine", @@ -3802,16 +3807,16 @@ }, { "name": "symfony/console", - "version": "v5.4.13", + "version": "v5.4.14", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" + "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "url": "https://api.github.com/repos/symfony/console/zipball/984ea2c0f45f42dfed01d2f3987b187467c4b16d", + "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d", "shasum": "" }, "require": { @@ -3881,7 +3886,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.13" + "source": "https://github.com/symfony/console/tree/v5.4.14" }, "funding": [ { @@ -3897,7 +3902,7 @@ "type": "tidelift" } ], - "time": "2022-08-26T13:50:20+00:00" + "time": "2022-10-07T08:01:20+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4258,16 +4263,16 @@ }, { "name": "symfony/http-client", - "version": "v6.0.13", + "version": "v6.0.14", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "2067d3c398d47292f3b413fcc4f56385c1afd0d4" + "reference": "ec183a587e3ad47f03cf1572d4b8437e0fc3e923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/2067d3c398d47292f3b413fcc4f56385c1afd0d4", - "reference": "2067d3c398d47292f3b413fcc4f56385c1afd0d4", + "url": "https://api.github.com/repos/symfony/http-client/zipball/ec183a587e3ad47f03cf1572d4b8437e0fc3e923", + "reference": "ec183a587e3ad47f03cf1572d4b8437e0fc3e923", "shasum": "" }, "require": { @@ -4322,7 +4327,7 @@ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-client/tree/v6.0.13" + "source": "https://github.com/symfony/http-client/tree/v6.0.14" }, "funding": [ { @@ -4338,7 +4343,7 @@ "type": "tidelift" } ], - "time": "2022-09-09T09:33:56+00:00" + "time": "2022-10-11T15:20:43+00:00" }, { "name": "symfony/http-client-contracts", @@ -4494,16 +4499,16 @@ }, { "name": "symfony/mime", - "version": "v6.0.13", + "version": "v6.0.14", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c1d6eba531d956c23b3127dc6ae6f5ac4a90db6c" + "reference": "c01b88b63418131daf2edd0bdc17fc8a6d1c939a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c1d6eba531d956c23b3127dc6ae6f5ac4a90db6c", - "reference": "c1d6eba531d956c23b3127dc6ae6f5ac4a90db6c", + "url": "https://api.github.com/repos/symfony/mime/zipball/c01b88b63418131daf2edd0bdc17fc8a6d1c939a", + "reference": "c01b88b63418131daf2edd0bdc17fc8a6d1c939a", "shasum": "" }, "require": { @@ -4515,7 +4520,8 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4" + "symfony/mailer": "<5.4", + "symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1", @@ -4523,7 +4529,7 @@ "symfony/dependency-injection": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" }, "type": "library", "autoload": { @@ -4555,7 +4561,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.0.13" + "source": "https://github.com/symfony/mime/tree/v6.0.14" }, "funding": [ { @@ -4571,7 +4577,7 @@ "type": "tidelift" } ], - "time": "2022-09-02T08:05:03+00:00" + "time": "2022-10-07T08:02:12+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5457,16 +5463,16 @@ }, { "name": "symfony/string", - "version": "v6.0.13", + "version": "v6.0.14", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05" + "reference": "3db7da820a6e4a584b714b3933c34c6a7db4d86c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/65e99fb179e7241606377e4042cd2161f3dd1c05", - "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05", + "url": "https://api.github.com/repos/symfony/string/zipball/3db7da820a6e4a584b714b3933c34c6a7db4d86c", + "reference": "3db7da820a6e4a584b714b3933c34c6a7db4d86c", "shasum": "" }, "require": { @@ -5522,7 +5528,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.13" + "source": "https://github.com/symfony/string/tree/v6.0.14" }, "funding": [ { @@ -5538,20 +5544,20 @@ "type": "tidelift" } ], - "time": "2022-09-02T08:05:03+00:00" + "time": "2022-10-10T09:34:08+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.0.13", + "version": "v6.0.14", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "367522dc769072f2abe554013e073eb079593829" + "reference": "72af925ddd41ca0372d166d004bc38a00c4608cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/367522dc769072f2abe554013e073eb079593829", - "reference": "367522dc769072f2abe554013e073eb079593829", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/72af925ddd41ca0372d166d004bc38a00c4608cc", + "reference": "72af925ddd41ca0372d166d004bc38a00c4608cc", "shasum": "" }, "require": { @@ -5610,7 +5616,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.0.13" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.14" }, "funding": [ { @@ -5626,20 +5632,20 @@ "type": "tidelift" } ], - "time": "2022-09-08T09:32:44+00:00" + "time": "2022-10-07T08:02:12+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.12", + "version": "v5.4.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c" + "reference": "e83fe9a72011f07c662da46a05603d66deeeb487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", - "reference": "7a3aa21ac8ab1a96cc6de5bbcab4bc9fc943b18c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487", + "reference": "e83fe9a72011f07c662da46a05603d66deeeb487", "shasum": "" }, "require": { @@ -5685,7 +5691,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.12" + "source": "https://github.com/symfony/yaml/tree/v5.4.14" }, "funding": [ { @@ -5701,7 +5707,7 @@ "type": "tidelift" } ], - "time": "2022-08-02T15:52:22+00:00" + "time": "2022-10-03T15:15:50+00:00" }, { "name": "tecnickcom/tcpdf", @@ -5984,16 +5990,16 @@ }, { "name": "voku/arrayy", - "version": "7.9.4", + "version": "7.9.5", "source": { "type": "git", "url": "https://github.com/voku/Arrayy.git", - "reference": "4a995937b91f15b95d9a170f803951069b2f0fa0" + "reference": "4635acfab7d1451124039a88fd5c700b28ee3906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/Arrayy/zipball/4a995937b91f15b95d9a170f803951069b2f0fa0", - "reference": "4a995937b91f15b95d9a170f803951069b2f0fa0", + "url": "https://api.github.com/repos/voku/Arrayy/zipball/4635acfab7d1451124039a88fd5c700b28ee3906", + "reference": "4635acfab7d1451124039a88fd5c700b28ee3906", "shasum": "" }, "require": { @@ -6063,7 +6069,7 @@ "type": "tidelift" } ], - "time": "2022-09-06T20:07:10+00:00" + "time": "2022-10-13T00:27:25+00:00" }, { "name": "voku/email-check", @@ -6217,16 +6223,16 @@ }, { "name": "voku/portable-utf8", - "version": "6.0.9", + "version": "6.0.10", "source": { "type": "git", "url": "https://github.com/voku/portable-utf8.git", - "reference": "eb2861c34203a9c2a7c275cba7014d6816604e89" + "reference": "35b21539c309cbc4697266591f3a4ae9ce4e029c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-utf8/zipball/eb2861c34203a9c2a7c275cba7014d6816604e89", - "reference": "eb2861c34203a9c2a7c275cba7014d6816604e89", + "url": "https://api.github.com/repos/voku/portable-utf8/zipball/35b21539c309cbc4697266591f3a4ae9ce4e029c", + "reference": "35b21539c309cbc4697266591f3a4ae9ce4e029c", "shasum": "" }, "require": { @@ -6292,7 +6298,7 @@ ], "support": { "issues": "https://github.com/voku/portable-utf8/issues", - "source": "https://github.com/voku/portable-utf8/tree/6.0.9" + "source": "https://github.com/voku/portable-utf8/tree/6.0.10" }, "funding": [ { @@ -6316,7 +6322,7 @@ "type": "tidelift" } ], - "time": "2022-09-01T09:54:03+00:00" + "time": "2022-10-05T23:42:43+00:00" }, { "name": "voku/stop-words", @@ -8570,16 +8576,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.8.7", + "version": "1.8.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "536ff0ed719b5679e9f09c17aeaee9b31969cb8e" + "reference": "46e223dd68a620da18855c23046ddb00940b4014" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/536ff0ed719b5679e9f09c17aeaee9b31969cb8e", - "reference": "536ff0ed719b5679e9f09c17aeaee9b31969cb8e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46e223dd68a620da18855c23046ddb00940b4014", + "reference": "46e223dd68a620da18855c23046ddb00940b4014", "shasum": "" }, "require": { @@ -8609,7 +8615,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.7" + "source": "https://github.com/phpstan/phpstan/tree/1.8.11" }, "funding": [ { @@ -8625,7 +8631,7 @@ "type": "tidelift" } ], - "time": "2022-10-04T14:09:33+00:00" + "time": "2022-10-24T15:45:13+00:00" }, { "name": "phpunit/php-code-coverage", @@ -9049,25 +9055,25 @@ }, { "name": "rector/rector", - "version": "0.14.5", + "version": "0.14.6", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "f7fd87b2435835f481e6a94ee28e09af412bd3cc" + "reference": "e61574288661334155de6e5f0f45497285abad5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/f7fd87b2435835f481e6a94ee28e09af412bd3cc", - "reference": "f7fd87b2435835f481e6a94ee28e09af412bd3cc", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/e61574288661334155de6e5f0f45497285abad5d", + "reference": "e61574288661334155de6e5f0f45497285abad5d", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.8.6" + "phpstan/phpstan": "^1.8.7" }, "conflict": { - "rector/rector-cakephp": "*", "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", "rector/rector-laravel": "*", "rector/rector-php-parser": "*", "rector/rector-phpoffice": "*", @@ -9095,7 +9101,7 @@ "description": "Instant Upgrade and Automated Refactoring of any PHP code", "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.14.5" + "source": "https://github.com/rectorphp/rector/tree/0.14.6" }, "funding": [ { @@ -9103,7 +9109,7 @@ "type": "github" } ], - "time": "2022-09-29T11:05:42+00:00" + "time": "2022-10-15T22:58:22+00:00" }, { "name": "sebastian/cli-parser", @@ -10530,17 +10536,9 @@ "time": "2021-12-12T23:02:06+00:00" } ], - "aliases": [ - { - "package": "craftcms/cms", - "version": "4.3.9999999.9999999-dev", - "alias": "4.3.0", - "alias_normalized": "4.3.0.0" - } - ], + "aliases": [], "minimum-stability": "dev", "stability-flags": { - "craftcms/cms": 20, "craftcms/ecs": 20, "craftcms/phpstan": 20, "craftcms/rector": 20 From cdb738d9b9774df570ec2706be76a0492d30fdb9 Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Wed, 26 Oct 2022 17:20:41 +0100 Subject: [PATCH 24/25] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3deaa8c118..1d067b887f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ You can learn all about it at [craftcms.com/commerce](https://craftcms.com/comme ## Requirements -This plugin requires Craft CMS 4.1 or later. +This plugin requires Craft CMS 4.3 or later. ## Installation From 8e30a27b8e7bd673940a0544dd119822fff1ed1f Mon Sep 17 00:00:00 2001 From: Nathaniel Hammond Date: Wed, 26 Oct 2022 17:31:02 +0100 Subject: [PATCH 25/25] Finish 4.2.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c047ab390..27bd1b779e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Craft Commerce -## Unreleased +## 4.2.0 - 2022-10-26 ### Store Management - Discounts’ “Match Customer” conditions can now have a “Has Orders” rule.