From a5a9c4c1829db844ab70e2143b31140b6df52ec8 Mon Sep 17 00:00:00 2001 From: Mateusz Krzeszowiak Date: Sun, 25 Oct 2020 10:18:25 +0100 Subject: [PATCH 001/985] Initialize authentication popup modal only when needed --- .../frontend/web/js/view/authentication-popup.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js b/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js index c14a59af49706..e97e69301b7db 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js +++ b/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js @@ -43,6 +43,20 @@ define([ /** Init popup login window */ setModalElement: function (element) { + var cart = customerData.get('cart'); + + if (cart().isGuestCheckoutAllowed === false) { + this.createPopup(element); + } else { + cart.subscribe(function(cartData) { + if (cartData.isGuestCheckoutAllowed === false) { + this.createPopup(element); + } + }, this); + } + }, + + createPopup: function(element) { if (authenticationPopup.modalWindow == null) { authenticationPopup.createPopUp(element); } From cad2c2525aa5d5033fd738bb9425959cf69578d0 Mon Sep 17 00:00:00 2001 From: Mateusz Krzeszowiak Date: Wed, 28 Oct 2020 14:35:15 +0100 Subject: [PATCH 002/985] Fix static and functional tests --- .../web/js/view/authentication-popup.js | 11 +++-- .../js/view/authentication-popup.test.js | 46 +++++++++++++++++-- 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js b/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js index e97e69301b7db..b77104f8f280e 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js +++ b/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js @@ -41,14 +41,16 @@ define([ }); }, - /** Init popup login window */ + /** + * Sets modal on given HTML element with on demand initialization. + */ setModalElement: function (element) { var cart = customerData.get('cart'); if (cart().isGuestCheckoutAllowed === false) { this.createPopup(element); } else { - cart.subscribe(function(cartData) { + cart.subscribe(function (cartData) { if (cartData.isGuestCheckoutAllowed === false) { this.createPopup(element); } @@ -56,7 +58,10 @@ define([ } }, - createPopup: function(element) { + /** + * Initializes authentication modal on given HTML element. + */ + createPopup: function (element) { if (authenticationPopup.modalWindow == null) { authenticationPopup.createPopUp(element); } diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/view/authentication-popup.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/view/authentication-popup.test.js index 8a8216a820dd4..a2497d82bbc0f 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/view/authentication-popup.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/view/authentication-popup.test.js @@ -4,7 +4,7 @@ */ /* eslint max-nested-callbacks: 0 */ -define(['squire'], function (Squire) { +define(['squire', 'ko'], function (Squire, ko) { 'use strict'; var injector = new Squire(), @@ -64,9 +64,47 @@ define(['squire'], function (Squire) { describe('Magento_Customer/js/view/authentication-popup', function () { describe('"setModalElement" method', function () { - it('Check for return value.', function () { - expect(obj.setModalElement()).toBeUndefined(); - expect(mocks['Magento_Customer/js/model/authentication-popup'].createPopUp).toHaveBeenCalled(); + it('skips modal initialization when cart is not initialized', function () { + mocks['Magento_Customer/js/customer-data'].get.and.returnValue( + ko.observable({}) + ); + + obj.setModalElement(); + + expect( + mocks['Magento_Customer/js/model/authentication-popup'] + .createPopUp + ).not.toHaveBeenCalled(); + }); + + it('skips modal initialization when guest checkout is allowed', function () { + mocks['Magento_Customer/js/customer-data'].get.and.returnValue( + ko.observable({ + isGuestCheckoutAllowed: true + }) + ); + + obj.setModalElement(); + + expect( + mocks['Magento_Customer/js/model/authentication-popup'] + .createPopUp + ).not.toHaveBeenCalled(); + }); + + it('initializes modal when guest checkout is disabled', function () { + mocks['Magento_Customer/js/customer-data'].get.and.returnValue( + ko.observable({ + isGuestCheckoutAllowed: false + }) + ); + + obj.setModalElement(); + + expect( + mocks['Magento_Customer/js/model/authentication-popup'] + .createPopUp + ).toHaveBeenCalled(); }); }); }); From 9901e8544402827ce32d985c7a35f487f1461935 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Tue, 24 Nov 2020 15:43:27 +0200 Subject: [PATCH 003/985] fix all selectors --- .../Mftf/Section/StorefrontCustomerSignInFormSection.xml | 6 +++--- .../Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml | 2 +- .../Checkout/Test/Mftf/Section/CheckoutShippingSection.xml | 4 ++-- .../Test/Mftf/Section/CheckoutSuccessMainSection.xml | 2 +- .../Test/Mftf/Section/CheckoutSuccessRegisterSection.xml | 2 +- .../StorefrontCustomerSignInFormSection.xml | 6 +++--- .../StorefrontCustomerSignInPopupFormSection.xml | 2 +- .../Test/Mftf/Section/StorefrontNewsletterManageSection.xml | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Captcha/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml b/app/code/Magento/Captcha/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml index 54aa36d1ca267..1aabfb8a0c428 100644 --- a/app/code/Magento/Captcha/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml +++ b/app/code/Magento/Captcha/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml @@ -9,8 +9,8 @@
- - - + + +
diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml index c39fab8a52e8e..9c30ff2c4d610 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.xml @@ -9,7 +9,7 @@
- + diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml index 59d46e8cca696..4e7e6100b0a7a 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml @@ -15,7 +15,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml index d15b89e58a550..abdb4ddac7343 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessMainSection.xml @@ -17,7 +17,7 @@ - + diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml index baee6cc7177c8..e029bf9ceb9be 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutSuccessRegisterSection.xml @@ -11,7 +11,7 @@
- +
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml index 2e40610c18f82..5405c8fd0731a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml @@ -8,9 +8,9 @@
- - - + + +
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml index c33736a54f442..246a8ecf7e8d9 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml @@ -9,7 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
- + diff --git a/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterManageSection.xml b/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterManageSection.xml index 9248970d9e623..77da0cd36395f 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterManageSection.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Section/StorefrontNewsletterManageSection.xml @@ -10,6 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
- +
From bd78d3c585b74d2d62afec8f94637d168952ab25 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Wed, 25 Nov 2020 11:16:08 +0200 Subject: [PATCH 004/985] fix selector --- .../StorefrontCustomerSignInPopupFormSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml index 246a8ecf7e8d9..c33736a54f442 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml @@ -9,7 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
- + From fe678cf88f1123c24349cb01044bd408fdfa7f6f Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Fri, 18 Dec 2020 23:01:19 +0100 Subject: [PATCH 005/985] REFACTOR: Remove misleading aliases, refactor --- app/code/Magento/Swatches/Helper/Data.php | 75 +++++++++++------------ 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/app/code/Magento/Swatches/Helper/Data.php b/app/code/Magento/Swatches/Helper/Data.php index dd257de331b91..f122a02c70f86 100644 --- a/app/code/Magento/Swatches/Helper/Data.php +++ b/app/code/Magento/Swatches/Helper/Data.php @@ -6,9 +6,9 @@ namespace Magento\Swatches\Helper; use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; -use Magento\Catalog\Api\Data\ProductInterface as Product; +use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Catalog\Model\Product as ModelProduct; +use Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product\Image\UrlBuilder; use Magento\Catalog\Model\ResourceModel\Eav\Attribute; use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection; @@ -23,8 +23,6 @@ use Magento\Swatches\Model\SwatchAttributeType; /** - * Class Helper Data - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Data @@ -83,8 +81,11 @@ class Data ]; /** - * Serializer to/from JSON. - * + * @var array + */ + private $swatchesCache = []; + + /** * @var Json */ private $serializer; @@ -106,7 +107,7 @@ class Data * @param SwatchCollectionFactory $swatchCollectionFactory * @param UrlBuilder $urlBuilder * @param Json|null $serializer - * @param SwatchAttributesProvider $swatchAttributesProvider + * @param SwatchAttributesProvider|null $swatchAttributesProvider * @param SwatchAttributeType|null $swatchTypeChecker */ public function __construct( @@ -123,12 +124,12 @@ public function __construct( $this->productRepository = $productRepository; $this->storeManager = $storeManager; $this->swatchCollectionFactory = $swatchCollectionFactory; + $this->imageUrlBuilder = $urlBuilder; $this->serializer = $serializer ?: ObjectManager::getInstance()->create(Json::class); $this->swatchAttributesProvider = $swatchAttributesProvider ?: ObjectManager::getInstance()->get(SwatchAttributesProvider::class); $this->swatchTypeChecker = $swatchTypeChecker ?: ObjectManager::getInstance()->create(SwatchAttributeType::class); - $this->imageUrlBuilder = $urlBuilder; } /** @@ -163,11 +164,11 @@ public function assembleAdditionalDataEavAttribute(Attribute $attribute) /** * Check is media attribute available * - * @param ModelProduct $product + * @param Product $product * @param string $attributeCode * @return bool */ - private function isMediaAvailable(ModelProduct $product, string $attributeCode): bool + private function isMediaAvailable(Product $product, string $attributeCode): bool { $isAvailable = false; @@ -186,11 +187,11 @@ private function isMediaAvailable(ModelProduct $product, string $attributeCode): * Load first variation * * @param string $attributeCode swatch_image|image - * @param ModelProduct $configurableProduct + * @param Product $configurableProduct * @param array $requiredAttributes - * @return bool|Product + * @return bool|ProductInterface */ - private function loadFirstVariation($attributeCode, ModelProduct $configurableProduct, array $requiredAttributes) + private function loadFirstVariation($attributeCode, Product $configurableProduct, array $requiredAttributes) { if ($this->isProductHasSwatch($configurableProduct)) { $usedProducts = $configurableProduct->getTypeInstance()->getUsedProducts($configurableProduct); @@ -210,11 +211,11 @@ private function loadFirstVariation($attributeCode, ModelProduct $configurablePr /** * Load first variation with swatch image * - * @param Product $configurableProduct + * @param ProductInterface|Product $configurableProduct * @param array $requiredAttributes - * @return bool|Product + * @return bool|ProductInterface */ - public function loadFirstVariationWithSwatchImage(Product $configurableProduct, array $requiredAttributes) + public function loadFirstVariationWithSwatchImage(ProductInterface $configurableProduct, array $requiredAttributes) { return $this->loadFirstVariation('swatch_image', $configurableProduct, $requiredAttributes); } @@ -222,11 +223,11 @@ public function loadFirstVariationWithSwatchImage(Product $configurableProduct, /** * Load first variation with image * - * @param Product $configurableProduct + * @param ProductInterface|Product $configurableProduct * @param array $requiredAttributes - * @return bool|Product + * @return bool|ProductInterface */ - public function loadFirstVariationWithImage(Product $configurableProduct, array $requiredAttributes) + public function loadFirstVariationWithImage(ProductInterface $configurableProduct, array $requiredAttributes) { return $this->loadFirstVariation('image', $configurableProduct, $requiredAttributes); } @@ -234,11 +235,11 @@ public function loadFirstVariationWithImage(Product $configurableProduct, array /** * Load Variation Product using fallback * - * @param Product $parentProduct + * @param ProductInterface $parentProduct * @param array $attributes - * @return bool|Product + * @return bool|ProductInterface */ - public function loadVariationByFallback(Product $parentProduct, array $attributes) + public function loadVariationByFallback(ProductInterface $parentProduct, array $attributes) { if (!$this->isProductHasSwatch($parentProduct)) { return false; @@ -318,12 +319,12 @@ private function addFilterByParent(ProductCollection $productCollection, $parent * ] * ] * - * @param ModelProduct $product + * @param Product $product * * @return array * @throws \Magento\Framework\Exception\LocalizedException */ - public function getProductMediaGallery(ModelProduct $product): array + public function getProductMediaGallery(Product $product): array { $baseImage = null; $gallery = []; @@ -394,22 +395,21 @@ private function getAllSizeImages($imageFile) /** * Retrieve collection of Swatch attributes * - * @param Product $product + * @param ProductInterface|Product $product * @return \Magento\Catalog\Model\ResourceModel\Eav\Attribute[] */ - private function getSwatchAttributes(Product $product) + private function getSwatchAttributes(ProductInterface $product) { - $swatchAttributes = $this->swatchAttributesProvider->provide($product); - return $swatchAttributes; + return $this->swatchAttributesProvider->provide($product); } /** * Retrieve collection of Eav Attributes from Configurable product * - * @param Product $product + * @param ProductInterface|Product $product * @return \Magento\Catalog\Model\ResourceModel\Eav\Attribute[] */ - public function getAttributesFromConfigurable(Product $product) + public function getAttributesFromConfigurable(ProductInterface $product) { $result = []; $typeInstance = $product->getTypeInstance(); @@ -428,10 +428,10 @@ public function getAttributesFromConfigurable(Product $product) /** * Retrieve all visible Swatch attributes for current product. * - * @param Product $product + * @param ProductInterface $product * @return array */ - public function getSwatchAttributesAsArray(Product $product) + public function getSwatchAttributesAsArray(ProductInterface $product) { $result = []; $swatchAttributes = $this->getSwatchAttributes($product); @@ -447,11 +447,6 @@ public function getSwatchAttributesAsArray(Product $product) return $result; } - /** - * @var array - */ - private $swatchesCache = []; - /** * Get swatch options by option id's according to fallback logic * @@ -511,7 +506,7 @@ private function getCachedSwatches(array $optionIds) private function setCachedSwatches(array $optionIds, array $swatches) { foreach ($optionIds as $optionId) { - $this->swatchesCache[$optionId] = isset($swatches[$optionId]) ? $swatches[$optionId] : null; + $this->swatchesCache[$optionId] = $swatches[$optionId] ?? null; } } @@ -543,10 +538,10 @@ private function addFallbackOptions(array $fallbackValues, array $swatches) /** * Check if the Product has Swatch attributes * - * @param Product $product + * @param ProductInterface $product * @return bool */ - public function isProductHasSwatch(Product $product) + public function isProductHasSwatch(ProductInterface $product) { return !empty($this->getSwatchAttributes($product)); } From 0ad8dc2d833a3d6e563f98abe3600e9476c5ff15 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sat, 19 Dec 2020 00:21:15 +0100 Subject: [PATCH 006/985] Refactor: PriceBackend plugin --- .../Model/Plugin/PriceBackend.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php b/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php index da9f1316c6bd7..a20212c74fbe7 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php +++ b/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php @@ -3,14 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\ConfigurableProduct\Model\Plugin; +use Magento\Catalog\Api\Data\ProductInterface; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; /** - * Class PriceBackend - * - * Make price validation optional for configurable product + * Make price validation optional for configurable product */ class PriceBackend { @@ -26,12 +27,10 @@ public function aroundValidate( \Closure $proceed, $object ) { - if ($object instanceof \Magento\Catalog\Model\Product - && $object->getTypeId() == Configurable::TYPE_CODE - ) { + if ($object instanceof ProductInterface && $object->getTypeId() === Configurable::TYPE_CODE) { return true; - } else { - return $proceed($object); } + + return $proceed($object); } } From 3ee2bd5b61838b7c64077739278d8fcf9807d698 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sat, 19 Dec 2020 00:22:29 +0100 Subject: [PATCH 007/985] Refactor: SecurityInfo plugin --- app/code/Magento/Store/Url/Plugin/SecurityInfo.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Store/Url/Plugin/SecurityInfo.php b/app/code/Magento/Store/Url/Plugin/SecurityInfo.php index bfca3e7341ef2..0de02564c83a4 100644 --- a/app/code/Magento/Store/Url/Plugin/SecurityInfo.php +++ b/app/code/Magento/Store/Url/Plugin/SecurityInfo.php @@ -3,10 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Store\Url\Plugin; -use \Magento\Store\Model\Store; -use \Magento\Store\Model\ScopeInterface as StoreScopeInterface; +use Magento\Store\Model\ScopeInterface as StoreScopeInterface; +use Magento\Store\Model\Store; /** * Plugin for \Magento\Framework\Url\SecurityInfo @@ -39,8 +41,8 @@ public function aroundIsSecure(\Magento\Framework\Url\SecurityInfo $subject, \Cl { if ($this->scopeConfig->getValue(Store::XML_PATH_SECURE_IN_FRONTEND, StoreScopeInterface::SCOPE_STORE)) { return $proceed($url); - } else { - return false; } + + return false; } } From b979e0a7b7c2317262bdb23ee168108d37a6421a Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sat, 19 Dec 2020 00:23:14 +0100 Subject: [PATCH 008/985] Refactor: GuestAuthorization plugin --- .../Webapi/Model/Plugin/GuestAuthorization.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Webapi/Model/Plugin/GuestAuthorization.php b/app/code/Magento/Webapi/Model/Plugin/GuestAuthorization.php index 78082fab8bd9c..31a941ebfea19 100644 --- a/app/code/Magento/Webapi/Model/Plugin/GuestAuthorization.php +++ b/app/code/Magento/Webapi/Model/Plugin/GuestAuthorization.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Webapi\Model\Plugin; @@ -11,7 +12,7 @@ /** * Plugin around \Magento\Framework\Authorization::isAllowed * - * Plugin to allow guest users to access resources with anonymous permission + * Allow guest users to access resources with "anonymous" resource */ class GuestAuthorization { @@ -22,8 +23,7 @@ class GuestAuthorization * @param \Closure $proceed * @param string $resource * @param string $privilege - * @return bool true If resource permission is anonymous, - * to allow any user access without further checks in parent method + * @return bool Is resource permission "anonymous", to allow any user access without further checks in parent method * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundIsAllowed( @@ -32,10 +32,10 @@ public function aroundIsAllowed( $resource, $privilege = null ) { - if ($resource == AuthorizationService::PERMISSION_ANONYMOUS) { + if ($resource === AuthorizationService::PERMISSION_ANONYMOUS) { return true; - } else { - return $proceed($resource, $privilege); } + + return $proceed($resource, $privilege); } } From 268d2bbefeecb980c6fbe48d1974f7ebe8fdb1b1 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sat, 19 Dec 2020 00:24:18 +0100 Subject: [PATCH 009/985] Refactor: PriceBackend plugin --- app/code/Magento/Bundle/Model/Plugin/PriceBackend.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php index 1914d5b5146c3..bed74f8d239aa 100644 --- a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php +++ b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php @@ -1,14 +1,15 @@ Date: Sat, 19 Dec 2020 00:25:31 +0100 Subject: [PATCH 010/985] Refactor: Widget Layout ResourceModel plugin --- .../Model/ResourceModel/Layout/Plugin.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php b/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php index 5525520fa1da0..7f50dfe6b629d 100644 --- a/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php +++ b/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php @@ -1,32 +1,29 @@ update = $update; } /** - * Around getDbUpdateString - * * @param \Magento\Framework\View\Model\Layout\Merge $subject * @param callable $proceed * @param string $handle From c559a2e2ca5ff39d2e8997174c9791440533dde1 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Fri, 8 Jan 2021 15:21:56 +0200 Subject: [PATCH 011/985] fixed a bunch of selectors --- .../GuestCheckoutFillNewBillingAddressActionGroup.xml | 2 +- .../GuestCheckoutFillNewShippingAddressActionGroup.xml | 2 +- .../GuestCheckoutFillingShippingSectionActionGroup.xml | 2 +- .../ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.xml | 4 ++-- .../Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml | 4 ++-- .../StorefrontProcessCheckoutToPaymentActionGroup.xml | 2 +- .../StorefrontTaxQuoteCheckoutGuestSimpleTest.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml index 22f9f100ed08f..5c0eb439dbb3c 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewBillingAddressActionGroup.xml @@ -18,7 +18,7 @@ - + diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.xml index aa48a7c2537bd..c9f315929dcfa 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.xml @@ -17,7 +17,7 @@ - + diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionActionGroup.xml index f020cb42725c8..831b141bb98eb 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionActionGroup.xml @@ -19,7 +19,7 @@ - + diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.xml index bc39e957b26fc..02cb9ebc72352 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoginAsCustomerOnCheckoutPageActionGroup.xml @@ -15,9 +15,9 @@ - + - + diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml index 1faecfb3bbb7e..5cab58f568cd0 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml @@ -13,8 +13,8 @@ Fills in the Customer details for the 'Shipping Address' section of the Storefront Checkout page. Selects 'Free Shipping'. Clicks on Next. Validates that the URL is present and correct. - - + + diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontProcessCheckoutToPaymentActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontProcessCheckoutToPaymentActionGroup.xml index c40f24836c815..bc0c48142e223 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontProcessCheckoutToPaymentActionGroup.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/StorefrontProcessCheckoutToPaymentActionGroup.xml @@ -16,7 +16,7 @@ - + diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml index d2f1b1aa44393..b178e8b689907 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutGuestSimpleTest.xml @@ -80,7 +80,7 @@ - + From 3ef8b095894ba1642ab5816bbc3ccc3f5e76a17c Mon Sep 17 00:00:00 2001 From: Vadim Malesh <51680850+engcom-Charlie@users.noreply.github.com> Date: Fri, 8 Jan 2021 17:05:21 +0200 Subject: [PATCH 012/985] fix email selector --- ...ckoutFillingShippingSectionUnavailablePaymentActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionUnavailablePaymentActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionUnavailablePaymentActionGroup.xml index 9ce14338f1223..9d7c72522d003 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionUnavailablePaymentActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionUnavailablePaymentActionGroup.xml @@ -17,7 +17,7 @@ - + From 20d7b75783efa7c9a12aa6a9c99e19ca89376d3c Mon Sep 17 00:00:00 2001 From: Vadim Malesh <51680850+engcom-Charlie@users.noreply.github.com> Date: Mon, 11 Jan 2021 13:05:37 +0200 Subject: [PATCH 013/985] fix email selector --- ...stCheckoutFillingShippingSectionWithoutRegionActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionWithoutRegionActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionWithoutRegionActionGroup.xml index 3db019c44dd0d..ada3674a07b8d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionWithoutRegionActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillingShippingSectionWithoutRegionActionGroup.xml @@ -17,7 +17,7 @@ - + From c3f47b3cd2e4a97ea30083c1322075861ff626df Mon Sep 17 00:00:00 2001 From: Vadim Malesh <51680850+engcom-Charlie@users.noreply.github.com> Date: Mon, 11 Jan 2021 13:08:00 +0200 Subject: [PATCH 014/985] fixed email selector for test --- .../Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml index 321511e4e86d9..54ad407d9fa3e 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontOnePageCheckoutDataWhenChangeQtyTest.xml @@ -36,7 +36,7 @@ - + From f4f290d072b41e14e7fd1f3a2d64b73f1ec276f5 Mon Sep 17 00:00:00 2001 From: Lewis Voncken Date: Fri, 19 Mar 2021 16:20:21 +0100 Subject: [PATCH 015/985] [FEATURE][issue#32554] Added caching to the storeConfig GraphQl Endpoint --- .../Model/Resolver/Store/Identity.php | 31 +++++++++++++++++++ .../Magento/StoreGraphQl/etc/schema.graphqls | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php new file mode 100644 index 0000000000000..a59b52d4b409c --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php @@ -0,0 +1,31 @@ +cacheTag], array_map(function ($key) { + return sprintf('%s_%s', $this->cacheTag, $key); + }, array_keys($resolvedData))); + return $ids; + } +} diff --git a/app/code/Magento/StoreGraphQl/etc/schema.graphqls b/app/code/Magento/StoreGraphQl/etc/schema.graphqls index 9efdb5a210403..6d8ac15913c23 100644 --- a/app/code/Magento/StoreGraphQl/etc/schema.graphqls +++ b/app/code/Magento/StoreGraphQl/etc/schema.graphqls @@ -1,7 +1,7 @@ # Copyright © Magento, Inc. All rights reserved. # See COPYING.txt for license details. type Query { - storeConfig : StoreConfig @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\StoreConfigResolver") @doc(description: "The store config query") @cache(cacheable: false) + storeConfig : StoreConfig @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\StoreConfigResolver") @doc(description: "The store config query") @cache(cacheIdentity: "Magento\\StoreGraphQl\\Model\\Resolver\\Store\\Identity") availableStores( useCurrentGroup: Boolean @doc(description: "Filter store views by current store group") ): [StoreConfig] @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\AvailableStoresResolver") @doc(description: "Get a list of available store views and their config information.") From 934cd11da84ff502a0fc0c07f7c1e6f7833b38aa Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Fri, 23 Apr 2021 16:07:30 +0300 Subject: [PATCH 016/985] magento/magento2#30672: Initialize authentication popup modal only when needed. --- .../Mftf/Page/StorefrontCustomerSignInPage.xml | 1 + .../StorefrontCustomerLoginSignUpSection.xml | 14 ++++++++++++++ ...ckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml index b4814a3e4bedd..8f4f0a1596a8a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml +++ b/app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerSignInPage.xml @@ -11,5 +11,6 @@
+
diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml new file mode 100644 index 0000000000000..87316466c07c9 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml @@ -0,0 +1,14 @@ + + + + +
+ +
+
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index 618c32b21ad03..e2bbcaee62cb5 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ - - + + From 78f46948d08dc098dd06ff9b2855c00ed62baf3e Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Thu, 13 May 2021 17:04:15 +0300 Subject: [PATCH 017/985] magento#30672: Initialize authentication popup modal only when needed - MFTF fix. --- ...ntGuestCheckoutShippingAddressFormPrefilledActionGroup.xml | 2 +- .../StorefrontCustomerSignInFormSection.xml | 4 ++-- .../Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontGuestCheckoutShippingAddressFormPrefilledActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontGuestCheckoutShippingAddressFormPrefilledActionGroup.xml index 300e9c60ff362..427e4ac4546c5 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontGuestCheckoutShippingAddressFormPrefilledActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontGuestCheckoutShippingAddressFormPrefilledActionGroup.xml @@ -17,7 +17,7 @@ - + diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml index 3f2e70f530542..3f8acf6f17851 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml @@ -8,8 +8,8 @@
- - + + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml index 4e967cdee8dfc..7465e4990ec45 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontLoginFormShowPasswordTest.xml @@ -29,6 +29,8 @@ - + + + From d5a525468eb0762ec7b4d4d0f23328ccc57c0ff8 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Fri, 14 May 2021 09:45:02 +0300 Subject: [PATCH 018/985] magento#30672: Initialize authentication popup modal only when needed - MFTF fix. --- ...ProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml index caba8a9f0f49d..2ea50b5527bc8 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml @@ -96,7 +96,7 @@ - + From d32b8e8478dc7c5ce9809084412fee48716660f9 Mon Sep 17 00:00:00 2001 From: Andrii Bilyi Date: Wed, 18 Aug 2021 10:40:51 +0300 Subject: [PATCH 019/985] Add regions for Ukraine --- .../Setup/Patch/Data/AddDataForUkraine.php | 114 ++++++++++++++++++ .../Magento/Directory/Model/RegionTest.php | 1 + 2 files changed, 115 insertions(+) create mode 100644 app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php diff --git a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php new file mode 100644 index 0000000000000..ca0a55956b443 --- /dev/null +++ b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php @@ -0,0 +1,114 @@ +moduleDataSetup = $moduleDataSetup; + $this->dataInstallerFactory = $dataInstallerFactory; + } + + /** + * @inheritdoc + */ + public function apply() + { + /** @var DataInstaller $dataInstaller */ + $dataInstaller = $this->dataInstallerFactory->create(); + $dataInstaller->addCountryRegions( + $this->moduleDataSetup->getConnection(), + $this->getDataForArgentina() + ); + + return $this; + } + + /** + * Argentina states data. + * + * @return array + */ + private function getDataForArgentina() + { + return [ + ['UA', 'UA-71', 'Cherkaska oblast'], + ['UA', 'UA-74', 'Chernihivska oblast'], + ['UA', 'UA-77', 'Chernivetska oblast'], + ['UA', 'UA-12', 'Dnipropetrovska oblast'], + ['UA', 'UA-14', 'Donetska oblast'], + ['UA', 'UA-26', 'Ivano-Frankivska oblast'], + ['UA', 'UA-63', 'Kharkivska oblast'], + ['UA', 'UA-65', 'Khersonska oblast'], + ['UA', 'UA-68', 'Khmelnytska oblast'], + ['UA', 'UA-35', 'Kirovohradska oblast'], + ['UA', 'UA-32', 'Kyivska oblast'], + ['UA', 'UA-09', 'Luhanska oblast'], + ['UA', 'UA-46', 'Lvivska oblast'], + ['UA', 'UA-48', 'Mykolaivska oblast'], + ['UA', 'UA-51', 'Odeska oblast'], + ['UA', 'UA-53', 'Poltavska oblast'], + ['UA', 'UA-56', 'Rivnenska oblast'], + ['UA', 'UA-59', 'Sumska oblast'], + ['UA', 'UA-61', 'Ternopilska oblast'], + ['UA', 'UA-05', 'Vinnytska oblast'], + ['UA', 'UA-07', 'Volynska oblast'], + ['UA', 'UA-21', 'Zakarpatska oblast'], + ['UA', 'UA-23', 'Zaporizka oblast'], + ['UA', 'UA-18', 'Zhytomyrska oblast'], + ['UA', 'UA-43', 'Avtonomna Respublika Krym'], + ['UA', 'UA-30', 'Kyiv'], + ['UA', 'UA-40', 'Sevastopol'], + ]; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return [ + InitializeDirectoryData::class, + ]; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php index d90131948d9bb..28a7dc75684de 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php @@ -72,6 +72,7 @@ public function getCountryIdDataProvider():array ['countryId' => 'SE'], ['countryId' => 'GR'], ['countryId' => 'DK'], + ['countryId' => 'UA'], ['countryId' => 'AL'] ]; } From d812f42d55126411223254d898827e016df68c07 Mon Sep 17 00:00:00 2001 From: Oleh Usik Date: Wed, 18 Aug 2021 15:39:08 +0300 Subject: [PATCH 020/985] Added Newsletter queue improvements --- .../Newsletter/Block/Adminhtml/Queue/Edit.php | 33 ++++++++++--------- .../Block/Adminhtml/Queue/Edit/Form.php | 4 ++- app/code/Magento/Newsletter/Model/Queue.php | 19 ++++++++++- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index ca90b5d84a10f..3211d7cb24a21 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -135,24 +135,25 @@ protected function _prepareLayout() ] ] ); - - $this->getToolbar()->addChild( - 'save_and_resume', - \Magento\Backend\Block\Widget\Button::class, - [ - 'label' => __('Save and Resume'), - 'class' => 'save', - 'data_attribute' => [ - 'mage-init' => [ - 'button' => [ - 'event' => 'save', - 'target' => '#queue_edit_form', - 'eventData' => ['action' => ['args' => ['_resume' => 1]]], + if ($this->getCanResume()) { + $this->getToolbar()->addChild( + 'save_and_resume', + \Magento\Backend\Block\Widget\Button::class, + [ + 'label' => __('Save and Resume'), + 'class' => 'save', + 'data_attribute' => [ + 'mage-init' => [ + 'button' => [ + 'event' => 'save', + 'target' => '#queue_edit_form', + 'eventData' => ['action' => ['args' => ['_resume' => 1]]], + ], ], - ], + ] ] - ] - ); + ); + } return parent::_prepareLayout(); } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php index 55a6509327ec6..46522450c272f 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -6,6 +6,8 @@ namespace Magento\Newsletter\Block\Adminhtml\Queue\Edit; +use Magento\Newsletter\Model\Queue; + /** * Newsletter queue edit form * @@ -227,7 +229,7 @@ protected function _prepareForm() 'value' => $queue->getTemplate()->getTemplateStyles() ] ); - } elseif (\Magento\Newsletter\Model\Queue::STATUS_NEVER != $queue->getQueueStatus()) { + } elseif (Queue::STATUS_NEVER != $queue->getQueueStatus() && $queue->getQueueStatus() != Queue::STATUS_PAUSE) { $fieldset->addField( 'text', 'textarea', diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index a3279f8c83699..2e80095748788 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -251,7 +251,11 @@ public function sendPerSubscriber($count = 20) ] ); - /** @var \Magento\Newsletter\Model\Subscriber $item */ + if ($this->getQueueStatus() != self::STATUS_SENDING && count($collection->getItems()) > 0) { + $this->startQueue(); + } + + /** @var Subscriber $item */ foreach ($collection->getItems() as $item) { $transport = $this->_transportBuilder->setTemplateOptions( ['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $item->getStoreId()] @@ -283,6 +287,19 @@ public function sendPerSubscriber($count = 20) return $this; } + /** + * Start queue: set status SENDING for queue + * + * @return $this + */ + private function startQueue() + { + $this->setQueueStatus(self::STATUS_SENDING); + $this->save(); + + return $this; + } + /** * Finish queue: set status SENT and update finish date * From a48b019dc2ba5e840afec5abed09826b4e68f5a7 Mon Sep 17 00:00:00 2001 From: Andrii Bilyi Date: Wed, 18 Aug 2021 17:29:58 +0300 Subject: [PATCH 021/985] Change Comments and Method from Argentina to Ukraine --- .../Directory/Setup/Patch/Data/AddDataForUkraine.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php index ca0a55956b443..972193bbc4c6b 100644 --- a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php +++ b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php @@ -13,7 +13,7 @@ use Magento\Framework\Setup\Patch\DataPatchInterface; /** - * Add Argentina States + * Add Ukraine Regions */ class AddDataForUkraine implements DataPatchInterface { @@ -28,7 +28,7 @@ class AddDataForUkraine implements DataPatchInterface private $dataInstallerFactory; /** - * AddDataForArgentina constructor. + * AddDataForUkraine constructor. * * @param ModuleDataSetupInterface $moduleDataSetup * @param DataInstallerFactory $dataInstallerFactory @@ -50,18 +50,18 @@ public function apply() $dataInstaller = $this->dataInstallerFactory->create(); $dataInstaller->addCountryRegions( $this->moduleDataSetup->getConnection(), - $this->getDataForArgentina() + $this->getDataForUkraine() ); return $this; } /** - * Argentina states data. + * Ukraine regions data. * * @return array */ - private function getDataForArgentina() + private function getDataForUkraine() { return [ ['UA', 'UA-71', 'Cherkaska oblast'], From 7d18f45c2e685d43119e5ceaaf2d46834548b97e Mon Sep 17 00:00:00 2001 From: Andrii Bilyi Date: Thu, 19 Aug 2021 19:06:47 +0300 Subject: [PATCH 022/985] Update app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php Co-authored-by: Eduard Chitoraga --- .../Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php index 972193bbc4c6b..a860088d96f79 100644 --- a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php +++ b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php @@ -61,7 +61,7 @@ public function apply() * * @return array */ - private function getDataForUkraine() + private function getDataForUkraine(): array { return [ ['UA', 'UA-71', 'Cherkaska oblast'], From 50e0ca7d046a2991208f3d2bdb42517fdb862fdf Mon Sep 17 00:00:00 2001 From: Andrii Bilyi Date: Thu, 19 Aug 2021 19:06:53 +0300 Subject: [PATCH 023/985] Update app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php Co-authored-by: Eduard Chitoraga --- .../Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php index a860088d96f79..74720e7b931a6 100644 --- a/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php +++ b/app/code/Magento/Directory/Setup/Patch/Data/AddDataForUkraine.php @@ -28,8 +28,6 @@ class AddDataForUkraine implements DataPatchInterface private $dataInstallerFactory; /** - * AddDataForUkraine constructor. - * * @param ModuleDataSetupInterface $moduleDataSetup * @param DataInstallerFactory $dataInstallerFactory */ From cb8ce85b23e63d3bafd0def3dc01f2078c5fe9e5 Mon Sep 17 00:00:00 2001 From: Andrii Bilyi Date: Fri, 27 Aug 2021 17:26:21 +0300 Subject: [PATCH 024/985] change country from UA to VA in tests --- .../Customer/CreateCustomerAddressTest.php | 4 +++- .../Customer/SetBillingAddressOnCartTest.php | 16 ++++++++-------- .../Customer/SetShippingAddressOnCartTest.php | 14 +++++++------- .../Magento/Directory/Model/RegionTest.php | 2 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php index 6c8ded61ca368..2b88621b407b4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php @@ -466,7 +466,8 @@ public function testCreateCustomerAddressWithRedundantStreetLine() public function testCreateCustomerAddressWithOptionalZipCode() { $newAddress = [ - 'country_code' => 'UA', + 'country_code' => 'VA', + 'postcode' => '00120', 'street' => ['Line 1 Street', 'Line 2'], 'company' => 'Company name', 'telephone' => '123456789', @@ -487,6 +488,7 @@ public function testCreateCustomerAddressWithOptionalZipCode() mutation { createCustomerAddress(input: { country_code: {$newAddress['country_code']} + postcode: "{$newAddress['postcode']}" street: ["{$newAddress['street'][0]}","{$newAddress['street'][1]}"] company: "{$newAddress['company']}" telephone: "{$newAddress['telephone']}" diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index a1ad0763865a8..38407fc5304c1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -1149,13 +1149,13 @@ public function testSetBillingAddressesWithNotRequiredRegion() cart_id: "$maskedQuoteId" billing_address: { address: { - firstname: "Vasyl" + firstname: "John" lastname: "Doe" - street: ["1 Svobody"] - city: "Lviv" - region: "Lviv" - postcode: "00000" - country_code: "UA" + street: ["Via della Posta"] + city: "Vatican City" + region: "Vatican City" + postcode: "00120" + country_code: "VA" telephone: "555-555-55-55" } } @@ -1177,8 +1177,8 @@ public function testSetBillingAddressesWithNotRequiredRegion() $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); self::assertArrayHasKey('cart', $response['setBillingAddressOnCart']); $cartResponse = $response['setBillingAddressOnCart']['cart']; - self::assertEquals('UA', $cartResponse['billing_address']['country']['code']); - self::assertEquals('Lviv', $cartResponse['billing_address']['region']['label']); + self::assertEquals('VA', $cartResponse['billing_address']['country']['code']); + self::assertEquals('Vatican City', $cartResponse['billing_address']['region']['label']); } /** diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php index 8c58913af41a7..bbd6089a8a315 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php @@ -883,11 +883,11 @@ public function testSetShippingAddressesWithNotRequiredRegion() address: { firstname: "Vasyl" lastname: "Doe" - street: ["1 Svobody"] - city: "Lviv" - region: "Lviv" - postcode: "00000" - country_code: "UA" + street: ["Via della Posta"] + city: "Vatican City" + region: "Vatican City" + postcode: "00120" + country_code: "VA" telephone: "555-555-55-55" } } @@ -910,8 +910,8 @@ public function testSetShippingAddressesWithNotRequiredRegion() $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); self::assertArrayHasKey('cart', $response['setShippingAddressesOnCart']); $cartResponse = $response['setShippingAddressesOnCart']['cart']; - self::assertEquals('UA', $cartResponse['shipping_addresses'][0]['country']['code']); - self::assertEquals('Lviv', $cartResponse['shipping_addresses'][0]['region']['label']); + self::assertEquals('VA', $cartResponse['shipping_addresses'][0]['country']['code']); + self::assertEquals('Vatican City', $cartResponse['shipping_addresses'][0]['region']['label']); } /** diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php index 28a7dc75684de..322aa492c8383 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/RegionTest.php @@ -72,8 +72,8 @@ public function getCountryIdDataProvider():array ['countryId' => 'SE'], ['countryId' => 'GR'], ['countryId' => 'DK'], + ['countryId' => 'AL'], ['countryId' => 'UA'], - ['countryId' => 'AL'] ]; } } From 94fb923f0e6406716784ba8cc8cb7dc90b56da34 Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Fri, 17 Sep 2021 16:32:07 +0100 Subject: [PATCH 025/985] Add --exclude-group to cron:run https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-group-run When you decide to split a single cron group with the `--group` flag it means you need to do so for every group in your instance. It's pretty common for third party modules to define their own groups whenever they like, so we have to keep up to date with the defined groups in the instance to keep adding these to our crontab when required. One of my instances currently has 11 groups to manage, more will come in the future. In my case I only really want to run the crons like ``` * * * * * bin/magento cron:run --exclude-group index * * * * * flock -n index.lock bin/magento cron:run --group index ``` This will give me better granular control over the indexer crons which can be useful when your store reaches hundreds of thousands of SKUs For future proofing I've made the `--exclude-group` flag stackable so you can define it multiple times like ``` * * * * * bin/magento cron:run --exclude-group index --exclude-group consumers ``` --- .../Cron/Console/Command/CronCommand.php | 12 +++ .../Observer/ProcessCronQueueObserver.php | 15 +++ .../Observer/ProcessCronQueueObserverTest.php | 99 +++++++++++++++++++ 3 files changed, 126 insertions(+) diff --git a/app/code/Magento/Cron/Console/Command/CronCommand.php b/app/code/Magento/Cron/Console/Command/CronCommand.php index 142a9a397eb5f..28e969df52f59 100644 --- a/app/code/Magento/Cron/Console/Command/CronCommand.php +++ b/app/code/Magento/Cron/Console/Command/CronCommand.php @@ -29,6 +29,11 @@ class CronCommand extends Command */ const INPUT_KEY_GROUP = 'group'; + /** + * Name of input option + */ + const INPUT_KEY_EXCLUDE_GROUP = 'exclude-group'; + /** * Object manager factory * @@ -70,6 +75,12 @@ protected function configure() InputOption::VALUE_REQUIRED, 'Run jobs only from specified group' ), + new InputOption( + self::INPUT_KEY_EXCLUDE_GROUP, + null, + InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, + 'Exclude jobs from the specified group' + ), new InputOption( Cli::INPUT_KEY_BOOTSTRAP, null, @@ -100,6 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $objectManager = $this->objectManagerFactory->create($omParams); $params[self::INPUT_KEY_GROUP] = $input->getOption(self::INPUT_KEY_GROUP); + $params[self::INPUT_KEY_EXCLUDE_GROUP] = $input->getOption(self::INPUT_KEY_EXCLUDE_GROUP); $params[ProcessCronQueueObserver::STANDALONE_PROCESS_STARTED] = '0'; $bootstrap = $input->getOption(Cli::INPUT_KEY_BOOTSTRAP); if ($bootstrap) { diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 0f266b5d62d83..a46f823cb28a2 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -250,6 +250,9 @@ function ($a, $b) { if (!$this->isGroupInFilter($groupId)) { continue; } + if ($this->isGroupInExcludeFilter($groupId)) { + continue; + } if ($this->_request->getParam(self::STANDALONE_PROCESS_STARTED) !== '1' && $this->getCronGroupConfigurationValue($groupId, 'use_separate_process') == 1 ) { @@ -795,6 +798,18 @@ private function isGroupInFilter($groupId): bool && trim($this->_request->getParam('group'), "'") !== $groupId); } + /** + * Is Group In Exclude Filter. + * + * @param string $groupId + * @return bool + */ + private function isGroupInExcludeFilter($groupId): bool + { + $excludeGroup = $this->_request->getParam('exclude-group', []); + return in_array($groupId, $excludeGroup); + } + /** * Process pending jobs. * diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index 4ca8ab53ffbad..a9412c7013c62 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -5,6 +5,7 @@ */ namespace Magento\Cron\Observer; +use Magento\Cron\Observer\ProcessCronQueueObserver; use \Magento\TestFramework\Helper\Bootstrap; class ProcessCronQueueObserverTest extends \PHPUnit\Framework\TestCase @@ -49,4 +50,102 @@ public function testDispatchNoFailed() $this->fail($item->getMessages()); } } + + /** + * @param array $expectedGroupsToRun + * @param null $group + * @param null $excludeGroup + * @dataProvider groupFiltersDataProvider + */ + public function testGroupFilters(array $expectedGroupsToRun, $group = null, $excludeGroup = null) + { + $request = Bootstrap::getObjectManager()->get(\Magento\Framework\App\Console\Request::class); + $lockManager = $this->createMock(\Magento\Framework\Lock\LockManagerInterface::class); + + // The jobs are locked when they are run, assert on them to see which groups would run + $expectedLockData = []; + foreach ($expectedGroupsToRun as $expectedGroupToRun) { + $expectedLockData[] = [ + ProcessCronQueueObserver::LOCK_PREFIX . $expectedGroupToRun, + ProcessCronQueueObserver::LOCK_TIMEOUT + ]; + } + + // No expected lock data, means we should never call it + if (empty($expectedLockData)){ + $lockManager->expects($this->never()) + ->method('lock'); + } + + $lockManager->expects($this->exactly(count($expectedLockData))) + ->method('lock') + ->withConsecutive(...$expectedLockData); + + $request->setParams( + [ + 'group' => $group, + 'exclude-group' => $excludeGroup, + 'standaloneProcessStarted' => '1' + ] + ); + $this->_model = Bootstrap::getObjectManager() + ->create(\Magento\Cron\Observer\ProcessCronQueueObserver::class, [ + 'request' => $request, + 'lockManager' => $lockManager + ]); + $this->_model->execute(new \Magento\Framework\Event\Observer()); + } + + /** + * @return array|array[] + */ + public function groupFiltersDataProvider(): array + { + $listOfGroups = []; + $config = Bootstrap::getObjectManager()->get(\Magento\Cron\Model\ConfigInterface::class); + foreach (array_keys($config->getJobs()) as $groupId) { + $listOfGroups[$groupId] = $groupId; + } + $listOfGroups = array_reverse($listOfGroups, true); + + return [ + 'no flags runs all groups' => [ + $listOfGroups // groups to run + ], + '--group=default should run' => [ + ['default'], // groups to run + 'default', // --group default + ], + '--group=default with --exclude-group=default, nothing should run' => [ + [], // groups to run + 'default', // --group default + ['default'], // --exclude-group default + ], + '--group=default with --exclude-group=index, default should run' => [ + ['default'], // groups to run + 'default', // --group default + ['index'], // --exclude-group index + ], + '--group=index with --exclude-group=default, index should run' => [ + ['index'], // groups to run + 'index', // --group index + ['default'], // --exclude-group default + ], + '--exclude-group=index, all other groups should run' => [ + array_filter($listOfGroups, function($g) { return $g !== 'index'; }), // groups to run, all but index + null, // + ['index'] // --exclude-group index + ], + '--exclude-group for every group runs nothing' => [ + [], // groups to run, none + null, // + $listOfGroups // groups to exclude, all of them + ], + 'exclude all groups but consumers, consumers runs' => [ + array_filter($listOfGroups, function($g) { return $g === 'consumers'; }), + null, + array_filter($listOfGroups, function($g) { return $g !== 'consumers'; }) + ], + ]; + } } From 03654f83217f2d01c76cd0dbef499abfd7c477bb Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Fri, 17 Sep 2021 17:30:13 +0100 Subject: [PATCH 026/985] Fix unit test --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index a46f823cb28a2..c186d95b1c30b 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -807,7 +807,7 @@ private function isGroupInFilter($groupId): bool private function isGroupInExcludeFilter($groupId): bool { $excludeGroup = $this->_request->getParam('exclude-group', []); - return in_array($groupId, $excludeGroup); + return is_array($excludeGroup) && in_array($groupId, $excludeGroup); } /** From 52580cc8aa29a3ee6cbe0110b2b7f3e7e5d3e592 Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Thu, 23 Sep 2021 09:10:22 +0100 Subject: [PATCH 027/985] Fix static analysis --- .../Magento/Cron/Console/Command/CronCommand.php | 2 ++ .../Cron/Observer/ProcessCronQueueObserverTest.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Cron/Console/Command/CronCommand.php b/app/code/Magento/Cron/Console/Command/CronCommand.php index 28e969df52f59..b3a5f570e939f 100644 --- a/app/code/Magento/Cron/Console/Command/CronCommand.php +++ b/app/code/Magento/Cron/Console/Command/CronCommand.php @@ -105,6 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln('' . 'Cron is disabled. Jobs were not run.' . ''); return; } + // phpcs:ignore Magento2.Security.Superglobal.SuperglobalUsageWarning $omParams = $_SERVER; $omParams[StoreManager::PARAM_RUN_CODE] = 'admin'; $omParams[Store::CUSTOM_ENTRY_POINT_PARAM] = true; @@ -128,5 +129,6 @@ protected function execute(InputInterface $input, OutputInterface $output) $cronObserver = $objectManager->create(\Magento\Framework\App\Cron::class, ['parameters' => $params]); $cronObserver->launch(); $output->writeln('' . 'Ran jobs by schedule.' . ''); + return Cli::RETURN_SUCCESS; } } diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index a9412c7013c62..e621c5f2eeec3 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -72,7 +72,7 @@ public function testGroupFilters(array $expectedGroupsToRun, $group = null, $exc } // No expected lock data, means we should never call it - if (empty($expectedLockData)){ + if (empty($expectedLockData)) { $lockManager->expects($this->never()) ->method('lock'); } @@ -132,7 +132,9 @@ public function groupFiltersDataProvider(): array ['default'], // --exclude-group default ], '--exclude-group=index, all other groups should run' => [ - array_filter($listOfGroups, function($g) { return $g !== 'index'; }), // groups to run, all but index + array_filter($listOfGroups, function ($g) { + return $g !== 'index'; + }), // groups to run, all but index null, // ['index'] // --exclude-group index ], @@ -142,9 +144,13 @@ public function groupFiltersDataProvider(): array $listOfGroups // groups to exclude, all of them ], 'exclude all groups but consumers, consumers runs' => [ - array_filter($listOfGroups, function($g) { return $g === 'consumers'; }), + array_filter($listOfGroups, function ($g) { + return $g === 'consumers'; + }), null, - array_filter($listOfGroups, function($g) { return $g !== 'consumers'; }) + array_filter($listOfGroups, function ($g) { + return $g !== 'consumers'; + }) ], ]; } From def25622adb261434682f76cf20855bb353ba5af Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Thu, 23 Sep 2021 11:29:35 +0100 Subject: [PATCH 028/985] Update test to run the same on EE and B2B Exclude the staging group etc, not relevant for our test --- .../Observer/ProcessCronQueueObserverTest.php | 56 ++++++++++++------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index e621c5f2eeec3..93e2fb6aec701 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -27,18 +27,18 @@ protected function setUp(): void $this->_model->execute(new \Magento\Framework\Event\Observer()); } - /** - * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * - */ - public function testDispatchScheduled() - { - $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - \Magento\Cron\Model\ResourceModel\Schedule\Collection::class - ); - $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); - $collection->addFieldToFilter('job_code', 'catalog_product_alert'); - $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); - } +// /** +// * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * +// */ +// public function testDispatchScheduled() +// { +// $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( +// \Magento\Cron\Model\ResourceModel\Schedule\Collection::class +// ); +// $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); +// $collection->addFieldToFilter('job_code', 'catalog_product_alert'); +// $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); +// } public function testDispatchNoFailed() { @@ -59,6 +59,11 @@ public function testDispatchNoFailed() */ public function testGroupFilters(array $expectedGroupsToRun, $group = null, $excludeGroup = null) { + $config = $this->createMock(\Magento\Cron\Model\ConfigInterface::class); + $config->expects($this->any()) + ->method('getJobs') + ->willReturn($this->getFilterTestCronGroups()); + $request = Bootstrap::getObjectManager()->get(\Magento\Framework\App\Console\Request::class); $lockManager = $this->createMock(\Magento\Framework\Lock\LockManagerInterface::class); @@ -91,7 +96,8 @@ public function testGroupFilters(array $expectedGroupsToRun, $group = null, $exc $this->_model = Bootstrap::getObjectManager() ->create(\Magento\Cron\Observer\ProcessCronQueueObserver::class, [ 'request' => $request, - 'lockManager' => $lockManager + 'lockManager' => $lockManager, + 'config' => $config ]); $this->_model->execute(new \Magento\Framework\Event\Observer()); } @@ -101,12 +107,7 @@ public function testGroupFilters(array $expectedGroupsToRun, $group = null, $exc */ public function groupFiltersDataProvider(): array { - $listOfGroups = []; - $config = Bootstrap::getObjectManager()->get(\Magento\Cron\Model\ConfigInterface::class); - foreach (array_keys($config->getJobs()) as $groupId) { - $listOfGroups[$groupId] = $groupId; - } - $listOfGroups = array_reverse($listOfGroups, true); + $listOfGroups = array_reverse(array_keys($this->getFilterTestCronGroups()), true); return [ 'no flags runs all groups' => [ @@ -154,4 +155,21 @@ public function groupFiltersDataProvider(): array ], ]; } + + /** + * Only run the filter group tests with a limited set of cron groups, keeps tests consistent between EE and CE + * + * @return array + */ + private function getFilterTestCronGroups() + { + $listOfGroups = []; + $config = Bootstrap::getObjectManager()->get(\Magento\Cron\Model\ConfigInterface::class); + foreach ($config->getJobs() as $groupId => $data) { + if (in_array($groupId, ['default', 'consumers', 'index'])) { + $listOfGroups[$groupId] = $data; + } + } + return $listOfGroups; + } } From fae148b2119d5593b643b4d4e01ce39a50bf5260 Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Thu, 23 Sep 2021 11:33:26 +0100 Subject: [PATCH 029/985] Update test to run the same on EE and B2B Exclude the staging group etc, not relevant for our test --- .../Observer/ProcessCronQueueObserverTest.php | 45 ++++++++----------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index 93e2fb6aec701..c15426adb1a9a 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -27,18 +27,18 @@ protected function setUp(): void $this->_model->execute(new \Magento\Framework\Event\Observer()); } -// /** -// * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * -// */ -// public function testDispatchScheduled() -// { -// $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( -// \Magento\Cron\Model\ResourceModel\Schedule\Collection::class -// ); -// $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); -// $collection->addFieldToFilter('job_code', 'catalog_product_alert'); -// $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); -// } + /** + * @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * * + */ + public function testDispatchScheduled() + { + $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\Cron\Model\ResourceModel\Schedule\Collection::class + ); + $collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING); + $collection->addFieldToFilter('job_code', 'catalog_product_alert'); + $this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.'); + } public function testDispatchNoFailed() { @@ -107,11 +107,10 @@ public function testGroupFilters(array $expectedGroupsToRun, $group = null, $exc */ public function groupFiltersDataProvider(): array { - $listOfGroups = array_reverse(array_keys($this->getFilterTestCronGroups()), true); return [ 'no flags runs all groups' => [ - $listOfGroups // groups to run + ['consumers', 'index', 'default'] // groups to run ], '--group=default should run' => [ ['default'], // groups to run @@ -133,25 +132,19 @@ public function groupFiltersDataProvider(): array ['default'], // --exclude-group default ], '--exclude-group=index, all other groups should run' => [ - array_filter($listOfGroups, function ($g) { - return $g !== 'index'; - }), // groups to run, all but index - null, // - ['index'] // --exclude-group index + ['consumers', 'default'], // groups to run, all but index + null, // + ['index'] // --exclude-group index ], '--exclude-group for every group runs nothing' => [ [], // groups to run, none null, // - $listOfGroups // groups to exclude, all of them + ['default', 'consumers', 'index'] // groups to exclude, all of them ], 'exclude all groups but consumers, consumers runs' => [ - array_filter($listOfGroups, function ($g) { - return $g === 'consumers'; - }), + ['consumers'], null, - array_filter($listOfGroups, function ($g) { - return $g !== 'consumers'; - }) + ['index', 'default'] ], ]; } From ef36a16e4200284e621a5eea473d65b21411a29d Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Fri, 24 Sep 2021 13:41:43 +0100 Subject: [PATCH 030/985] Update docblock in CronCommand.php https://github.com/magento/magento2/pull/34117#issuecomment-926587976 --- app/code/Magento/Cron/Console/Command/CronCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Cron/Console/Command/CronCommand.php b/app/code/Magento/Cron/Console/Command/CronCommand.php index b3a5f570e939f..aad9bcf33c64d 100644 --- a/app/code/Magento/Cron/Console/Command/CronCommand.php +++ b/app/code/Magento/Cron/Console/Command/CronCommand.php @@ -64,7 +64,7 @@ public function __construct( } /** - * {@inheritdoc} + * Configures the current command. */ protected function configure() { @@ -97,7 +97,11 @@ protected function configure() /** * Runs cron jobs if cron is not disabled in Magento configurations * - * {@inheritdoc} + * @param InputInterface $input + * @param OutputInterface $output + * @return int|void + * @throws \Magento\Framework\Exception\FileSystemException + * @throws \Magento\Framework\Exception\RuntimeException */ protected function execute(InputInterface $input, OutputInterface $output) { From c6c26d30c435efddb18543430678ad8fbcc26f6e Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Fri, 24 Sep 2021 14:31:16 +0100 Subject: [PATCH 031/985] Update docblock in CronCommand.php --- app/code/Magento/Cron/Console/Command/CronCommand.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Cron/Console/Command/CronCommand.php b/app/code/Magento/Cron/Console/Command/CronCommand.php index aad9bcf33c64d..d5d9a396ccaa8 100644 --- a/app/code/Magento/Cron/Console/Command/CronCommand.php +++ b/app/code/Magento/Cron/Console/Command/CronCommand.php @@ -100,8 +100,6 @@ protected function configure() * @param InputInterface $input * @param OutputInterface $output * @return int|void - * @throws \Magento\Framework\Exception\FileSystemException - * @throws \Magento\Framework\Exception\RuntimeException */ protected function execute(InputInterface $input, OutputInterface $output) { From a2f9e4b8d14d764e66dfacfd8866b39da99016ba Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 28 Sep 2021 22:21:27 +0100 Subject: [PATCH 032/985] Set process title when running cron job --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 0f266b5d62d83..b5eb6fdc85a17 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -339,6 +339,7 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, ); } + cli_set_process_title("Magento cron - group=$groupId - job=$jobCode"); $schedule->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', $this->dateTime->gmtTimestamp())); $this->retrier->execute( function () use ($schedule) { From 0ac321b79ba079a5c4bec42b1d770e10364c8726 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Thu, 30 Sep 2021 22:58:49 +0100 Subject: [PATCH 033/985] Preserve (most of the) original command line title --- .../Observer/ProcessCronQueueObserver.php | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index b5eb6fdc85a17..00d2a4d68f41c 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -9,6 +9,7 @@ */ namespace Magento\Cron\Observer; +use Laminas\Http\PhpEnvironment\Request; use Magento\Cron\Model\ResourceModel\Schedule\Collection as ScheduleCollection; use Magento\Cron\Model\Schedule; use Magento\Framework\App\State; @@ -128,6 +129,16 @@ class ProcessCronQueueObserver implements ObserverInterface */ protected $dateTime; + /** + * @var Request + */ + protected Request $environment; + + /** + * @var string + */ + protected string $originalProcessTitle; + /** * @var \Symfony\Component\Process\PhpExecutableFinder */ @@ -201,7 +212,8 @@ public function __construct( StatFactory $statFactory, \Magento\Framework\Lock\LockManagerInterface $lockManager, \Magento\Framework\Event\ManagerInterface $eventManager, - DeadlockRetrierInterface $retrier + DeadlockRetrierInterface $retrier, + Request $environment ) { $this->_objectManager = $objectManager; $this->_scheduleFactory = $scheduleFactory; @@ -211,6 +223,7 @@ public function __construct( $this->_request = $request; $this->_shell = $shell; $this->dateTime = $dateTime; + $this->environment = $environment; $this->phpExecutableFinder = $phpExecutableFinderFactory->create(); $this->logger = $logger; $this->state = $state; @@ -339,7 +352,17 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, ); } - cli_set_process_title("Magento cron - group=$groupId - job=$jobCode"); + if (!isset($this->originalProcessTitle)) { + $this->originalProcessTitle = implode(' ', $this->environment->getServer('argv')); + } + + if (strpos($this->originalProcessTitle, " --group=$groupId ") !== false) { + // Group is already shown, so no need to include here in duplicate + cli_set_process_title($this->originalProcessTitle . " # job: $jobCode"); + } else { + cli_set_process_title($this->originalProcessTitle . " # group: $groupId, job: $jobCode"); + } + $schedule->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', $this->dateTime->gmtTimestamp())); $this->retrier->execute( function () use ($schedule) { From 3613f8096fbd3faa7add9ad8611dfe413d7fba72 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Thu, 30 Sep 2021 23:00:50 +0100 Subject: [PATCH 034/985] Correct docblock --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 00d2a4d68f41c..80106512b7809 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -195,6 +195,7 @@ class ProcessCronQueueObserver implements ObserverInterface * @param \Magento\Framework\Lock\LockManagerInterface $lockManager * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param DeadlockRetrierInterface $retrier + * @param Request $environment * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( From 55bf25eb5af5440b5330d19a6fcabb3a8fe5635d Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Fri, 1 Oct 2021 22:34:41 +0100 Subject: [PATCH 035/985] Include PHP_BINARY in process title --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 80106512b7809..77e33fbfbf0d2 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -354,7 +354,7 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, } if (!isset($this->originalProcessTitle)) { - $this->originalProcessTitle = implode(' ', $this->environment->getServer('argv')); + $this->originalProcessTitle = PHP_BINARY . ' ' . implode(' ', $this->environment->getServer('argv')); } if (strpos($this->originalProcessTitle, " --group=$groupId ") !== false) { From a9f50039cb2d32b0394f626654d7d7e335fcffa3 Mon Sep 17 00:00:00 2001 From: Erfan Date: Mon, 4 Oct 2021 15:08:19 +0800 Subject: [PATCH 036/985] Added topic name to error message --- .../Config/QueueConfigItem/DataMapperTest.php | 43 +++++++++++++++++++ .../Config/QueueConfigItem/DataMapper.php | 4 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/MessageQueue/Test/Unit/Topology/Config/QueueConfigItem/DataMapperTest.php b/lib/internal/Magento/Framework/MessageQueue/Test/Unit/Topology/Config/QueueConfigItem/DataMapperTest.php index 46ea82b887db6..80987d762152b 100644 --- a/lib/internal/Magento/Framework/MessageQueue/Test/Unit/Topology/Config/QueueConfigItem/DataMapperTest.php +++ b/lib/internal/Magento/Framework/MessageQueue/Test/Unit/Topology/Config/QueueConfigItem/DataMapperTest.php @@ -14,6 +14,7 @@ use Magento\Framework\MessageQueue\Rpc\ResponseQueueNameBuilder; use Magento\Framework\MessageQueue\Topology\Config\Data; use Magento\Framework\MessageQueue\Topology\Config\QueueConfigItem\DataMapper; +use Magento\Framework\Phrase; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -289,4 +290,46 @@ public function testGetMappedDataForWildcard(): void ]; $this->assertEquals($expectedResult, $actualResult); } + + /** + * @return void + */ + public function testTopicIsSynchronousException(): void + { + $topicName = 'topic01'; + $data = [ + 'ex01' => [ + 'name' => 'ex01', + 'type' => 'topic', + 'connection' => 'amqp', + 'durable' => true, + 'internal' => false, + 'autoDelete' => false, + 'arguments' => ['some' => 'argument'], + 'bindings' => [ + 'bind01' => [ + 'id' => 'bind01', + 'topic' => $topicName, + 'destinationType' => 'queue', + 'destination' => 'some.queue', + 'disabled' => false, + 'arguments' => ['some' => 'arguments'], + ], + ], + ], + ]; + + $this->communicationConfigMock->expects($this->exactly(1)) + ->method('getTopic') + ->willThrowException(new LocalizedException( + new Phrase('Topic "%topic" is not configured.', ['topic' => $topicName]) + )); + + $this->configDataMock->expects($this->once())->method('get')->willReturn($data); + + $this->expectException(LocalizedException::class); + $this->expectExceptionMessage(sprintf('Error while checking if topic "%s" is synchronous', $topicName)); + + $this->model->getMappedData(); + } } diff --git a/lib/internal/Magento/Framework/MessageQueue/Topology/Config/QueueConfigItem/DataMapper.php b/lib/internal/Magento/Framework/MessageQueue/Topology/Config/QueueConfigItem/DataMapper.php index 912aa4a6b0fb1..8e17c45587ee5 100644 --- a/lib/internal/Magento/Framework/MessageQueue/Topology/Config/QueueConfigItem/DataMapper.php +++ b/lib/internal/Magento/Framework/MessageQueue/Topology/Config/QueueConfigItem/DataMapper.php @@ -145,7 +145,9 @@ private function isSynchronousTopic(string $topicName): bool $topic = $this->communicationConfig->getTopic($topicName); return (bool)$topic[CommunicationConfig::TOPIC_IS_SYNCHRONOUS]; } catch (LocalizedException $exception) { - throw new LocalizedException(new Phrase('Error while checking if topic is synchronous')); + throw new LocalizedException( + new Phrase('Error while checking if topic "%topic" is synchronous', ['topic' => $topicName]) + ); } } From 5969ba7608aed1d0ea312ff1b5316f059093c3fc Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Wed, 6 Oct 2021 23:15:08 +0100 Subject: [PATCH 037/985] Fix unit test --- .../Cron/Observer/ProcessCronQueueObserver.php | 10 +++++----- .../Unit/Observer/ProcessCronQueueObserverTest.php | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 77e33fbfbf0d2..ba5f98611937f 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -9,7 +9,7 @@ */ namespace Magento\Cron\Observer; -use Laminas\Http\PhpEnvironment\Request; +use Laminas\Http\PhpEnvironment\Request as Environment; use Magento\Cron\Model\ResourceModel\Schedule\Collection as ScheduleCollection; use Magento\Cron\Model\Schedule; use Magento\Framework\App\State; @@ -130,9 +130,9 @@ class ProcessCronQueueObserver implements ObserverInterface protected $dateTime; /** - * @var Request + * @var Environment */ - protected Request $environment; + protected Environment $environment; /** * @var string @@ -195,7 +195,7 @@ class ProcessCronQueueObserver implements ObserverInterface * @param \Magento\Framework\Lock\LockManagerInterface $lockManager * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param DeadlockRetrierInterface $retrier - * @param Request $environment + * @param Environment $environment * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -214,7 +214,7 @@ public function __construct( \Magento\Framework\Lock\LockManagerInterface $lockManager, \Magento\Framework\Event\ManagerInterface $eventManager, DeadlockRetrierInterface $retrier, - Request $environment + Environment $environment ) { $this->_objectManager = $objectManager; $this->_scheduleFactory = $scheduleFactory; diff --git a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php index 26b844a22a548..28849d388cba3 100644 --- a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php +++ b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php @@ -8,6 +8,7 @@ namespace Magento\Cron\Test\Unit\Observer; use Exception; +use Laminas\Http\PhpEnvironment\Request as Environment; use Magento\Cron\Model\Config; use Magento\Cron\Model\DeadlockRetrierInterface; use Magento\Cron\Model\ResourceModel\Schedule as ScheduleResourceModel; @@ -20,8 +21,8 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Console\Request as ConsoleRequest; use Magento\Framework\App\ObjectManager; -use Magento\Framework\App\State; use Magento\Framework\App\State as AppState; +use Magento\Framework\App\State; use Magento\Framework\DataObject; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\Event\ManagerInterface; @@ -219,6 +220,14 @@ protected function setUp(): void $this->retrierMock = $this->getMockForAbstractClass(DeadlockRetrierInterface::class); + $environmentMock = $this->getMockBuilder(Environment::class) + ->disableOriginalConstructor() + ->getMock(); + $environmentMock->expects($this->any()) + ->method('getServer') + ->with('argv') + ->willReturn($_SERVER['argv']); + $this->cronQueueObserver = new ProcessCronQueueObserver( $this->objectManagerMock, $this->scheduleFactoryMock, @@ -234,7 +243,8 @@ protected function setUp(): void $this->statFactory, $this->lockManagerMock, $this->eventManager, - $this->retrierMock + $this->retrierMock, + $environmentMock ); } From 7fa0082e08a6c7b5fa21fd6a45dd242d8901189a Mon Sep 17 00:00:00 2001 From: Marvin Hinz <35603466+marvinhinz@users.noreply.github.com> Date: Tue, 12 Oct 2021 14:51:21 +0200 Subject: [PATCH 038/985] Update varnish4.vcl --- app/code/Magento/PageCache/etc/varnish4.vcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 0f67aae1e6975..eb0c2194848ea 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -9,7 +9,7 @@ backend default { .port = "/* {{ port }} */"; .first_byte_timeout = 600s; .probe = { - .url = "/pub/health_check.php"; + .url = "/health_check.php"; .timeout = 2s; .interval = 5s; .window = 10; From 5626117b1197168eee84509699a3b06e2c5791c2 Mon Sep 17 00:00:00 2001 From: Marvin Hinz <35603466+marvinhinz@users.noreply.github.com> Date: Tue, 12 Oct 2021 14:51:33 +0200 Subject: [PATCH 039/985] Update varnish5.vcl --- app/code/Magento/PageCache/etc/varnish5.vcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index bd9e5c92f5077..6acd160b183aa 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -10,7 +10,7 @@ backend default { .port = "/* {{ port }} */"; .first_byte_timeout = 600s; .probe = { - .url = "/pub/health_check.php"; + .url = "/health_check.php"; .timeout = 2s; .interval = 5s; .window = 10; From 6f0601ae79a59584eb454eeef47c769f1d75817b Mon Sep 17 00:00:00 2001 From: Marvin Hinz <35603466+marvinhinz@users.noreply.github.com> Date: Tue, 12 Oct 2021 14:51:44 +0200 Subject: [PATCH 040/985] Update varnish6.vcl --- app/code/Magento/PageCache/etc/varnish6.vcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index 16dd9505e834b..e1b2e3184613b 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -10,7 +10,7 @@ backend default { .port = "/* {{ port }} */"; .first_byte_timeout = 600s; .probe = { - .url = "/pub/health_check.php"; + .url = "/health_check.php"; .timeout = 2s; .interval = 5s; .window = 10; From 67130707ad41ddb920bc1f9d97cef6ae8c10be8a Mon Sep 17 00:00:00 2001 From: Marvin Hinz <35603466+marvinhinz@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:18:50 +0200 Subject: [PATCH 041/985] Update Autoloader.php --- lib/internal/Magento/Framework/Code/Generator/Autoloader.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php index 35c138147e9d3..6c3a53af7e542 100644 --- a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php +++ b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php @@ -53,6 +53,7 @@ public function load($className) $this->_generator->generateClass($className); } catch (\Exception $exception) { $this->tryToLogExceptionMessageIfNotDuplicate($exception); + throw $exception; } } } From 0e2e10c2aaf33c98d9bd092507a3c2dbee06c778 Mon Sep 17 00:00:00 2001 From: Marvin Hinz Date: Tue, 12 Oct 2021 22:08:16 +0200 Subject: [PATCH 042/985] Revert "Update Autoloader.php" This reverts commit 67130707ad41ddb920bc1f9d97cef6ae8c10be8a. --- lib/internal/Magento/Framework/Code/Generator/Autoloader.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php index 6c3a53af7e542..35c138147e9d3 100644 --- a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php +++ b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php @@ -53,7 +53,6 @@ public function load($className) $this->_generator->generateClass($className); } catch (\Exception $exception) { $this->tryToLogExceptionMessageIfNotDuplicate($exception); - throw $exception; } } } From 07cabe45de60e76246c9fd177913a6b2c5cb9c4c Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 25 Oct 2021 22:38:32 +0100 Subject: [PATCH 043/985] Reduce property visibility --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index ba5f98611937f..6eeb7189d83f6 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -132,12 +132,12 @@ class ProcessCronQueueObserver implements ObserverInterface /** * @var Environment */ - protected Environment $environment; + private Environment $environment; /** * @var string */ - protected string $originalProcessTitle; + private string $originalProcessTitle; /** * @var \Symfony\Component\Process\PhpExecutableFinder From 4cca4c7df602d735262988f5a9586391450cb860 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 27 Nov 2021 13:02:50 +0000 Subject: [PATCH 044/985] Recover from failed merge conflict resolution --- app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index f53cbfda133c0..5e32fad035583 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -376,7 +376,7 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, cli_set_process_title($this->originalProcessTitle . " # group: $groupId, job: $jobCode"); } - $schedule->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', $this->dateTime->gmtTimestamp())); + $schedule->setExecutedAt(date('Y-m-d H:i:s', $this->dateTime->gmtTimestamp())); $this->retrier->execute( function () use ($schedule) { $schedule->save(); From ae72fdd165544ca2ba47e4c6d6451f2207c1d397 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 27 Nov 2021 13:03:41 +0000 Subject: [PATCH 045/985] Extract new feature to its own method --- .../Observer/ProcessCronQueueObserver.php | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 5e32fad035583..1085dcce64bbf 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -365,16 +365,7 @@ protected function _runJob($scheduledTime, $currentTime, $jobConfig, $schedule, ); } - if (!isset($this->originalProcessTitle)) { - $this->originalProcessTitle = PHP_BINARY . ' ' . implode(' ', $this->environment->getServer('argv')); - } - - if (strpos($this->originalProcessTitle, " --group=$groupId ") !== false) { - // Group is already shown, so no need to include here in duplicate - cli_set_process_title($this->originalProcessTitle . " # job: $jobCode"); - } else { - cli_set_process_title($this->originalProcessTitle . " # group: $groupId, job: $jobCode"); - } + $this->setProcessTitle($jobCode, $groupId); $schedule->setExecutedAt(date('Y-m-d H:i:s', $this->dateTime->gmtTimestamp())); $this->retrier->execute( @@ -954,4 +945,24 @@ function () use ($scheduleResource, $where) { $scheduleResource->getConnection() ); } + + /** + * Set the process title to include the job code and group + * + * @param string $jobCode + * @param string $groupId + */ + private function setProcessTitle(string $jobCode, string $groupId): void + { + if (!isset($this->originalProcessTitle)) { + $this->originalProcessTitle = PHP_BINARY . ' ' . implode(' ', $this->environment->getServer('argv')); + } + + if (strpos($this->originalProcessTitle, " --group=$groupId ") !== false) { + // Group is already shown, so no need to include here in duplicate + cli_set_process_title($this->originalProcessTitle . " # job: $jobCode"); + } else { + cli_set_process_title($this->originalProcessTitle . " # group: $groupId, job: $jobCode"); + } + } } From c584355fa59e5a321535aebb22638e2b5e532586 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 27 Nov 2021 13:05:20 +0000 Subject: [PATCH 046/985] Set required visibility on consts --- .../Observer/ProcessCronQueueObserver.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php index 1085dcce64bbf..95211a8d3622d 100644 --- a/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php +++ b/app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php @@ -35,59 +35,59 @@ class ProcessCronQueueObserver implements ObserverInterface /**#@+ * Cache key values */ - const CACHE_KEY_LAST_SCHEDULE_GENERATE_AT = 'cron_last_schedule_generate_at'; + public const CACHE_KEY_LAST_SCHEDULE_GENERATE_AT = 'cron_last_schedule_generate_at'; - const CACHE_KEY_LAST_HISTORY_CLEANUP_AT = 'cron_last_history_cleanup_at'; + public const CACHE_KEY_LAST_HISTORY_CLEANUP_AT = 'cron_last_history_cleanup_at'; /** * Flag for internal communication between processes for running * all jobs in a group in parallel as a separate process */ - const STANDALONE_PROCESS_STARTED = 'standaloneProcessStarted'; + public const STANDALONE_PROCESS_STARTED = 'standaloneProcessStarted'; /**#@-*/ /**#@+ * List of configurable constants used to calculate and validate during handling cron jobs */ - const XML_PATH_SCHEDULE_GENERATE_EVERY = 'schedule_generate_every'; + public const XML_PATH_SCHEDULE_GENERATE_EVERY = 'schedule_generate_every'; - const XML_PATH_SCHEDULE_AHEAD_FOR = 'schedule_ahead_for'; + public const XML_PATH_SCHEDULE_AHEAD_FOR = 'schedule_ahead_for'; - const XML_PATH_SCHEDULE_LIFETIME = 'schedule_lifetime'; + public const XML_PATH_SCHEDULE_LIFETIME = 'schedule_lifetime'; - const XML_PATH_HISTORY_CLEANUP_EVERY = 'history_cleanup_every'; + public const XML_PATH_HISTORY_CLEANUP_EVERY = 'history_cleanup_every'; - const XML_PATH_HISTORY_SUCCESS = 'history_success_lifetime'; + public const XML_PATH_HISTORY_SUCCESS = 'history_success_lifetime'; - const XML_PATH_HISTORY_FAILURE = 'history_failure_lifetime'; + public const XML_PATH_HISTORY_FAILURE = 'history_failure_lifetime'; /**#@-*/ /** * Value of seconds in one minute */ - const SECONDS_IN_MINUTE = 60; + public const SECONDS_IN_MINUTE = 60; /** * How long to wait for cron group to become unlocked */ - const LOCK_TIMEOUT = 60; + public const LOCK_TIMEOUT = 60; /** * Static lock prefix for cron group locking */ - const LOCK_PREFIX = 'CRON_'; + public const LOCK_PREFIX = 'CRON_'; /** * Timer ID for profiling */ - const CRON_TIMERID = 'job %s'; + public const CRON_TIMERID = 'job %s'; /** * Max retries for acquire locks for cron jobs */ - const MAX_RETRIES = 5; + public const MAX_RETRIES = 5; /** * @var ScheduleCollection From 9a71f4ecc7f718104ba3d69f863471f99f8eac79 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Thu, 6 Jan 2022 13:10:07 +0000 Subject: [PATCH 047/985] Remove use of superglobal --- .../Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php index 0a0e1193d2efa..1a67056c24e17 100644 --- a/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php +++ b/app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php @@ -226,7 +226,7 @@ protected function setUp(): void $environmentMock->expects($this->any()) ->method('getServer') ->with('argv') - ->willReturn($_SERVER['argv']); + ->willReturn([]); $this->cronQueueObserver = new ProcessCronQueueObserver( $this->objectManagerMock, From 3ca077faf68cebd94122efd96da3512bfe844e15 Mon Sep 17 00:00:00 2001 From: Serhii Chernenko Date: Mon, 14 Feb 2022 16:41:49 +0200 Subject: [PATCH 048/985] reference directive restored for _extends.less. extends replaced to mixins in _extend.less --- .../blank/web/css/source/_extends.less | 58 +++++++++++-------- .../blank/web/css/source/_sources.less | 2 +- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/app/design/frontend/Magento/blank/web/css/source/_extends.less b/app/design/frontend/Magento/blank/web/css/source/_extends.less index 32e18921a1c48..a3b38fe35789e 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_extends.less +++ b/app/design/frontend/Magento/blank/web/css/source/_extends.less @@ -177,13 +177,17 @@ // Abstract block title // --------------------------------------------- +@abs-block-title: { + margin-bottom: 15px; + + > strong { + .lib-heading(h3); + } +}; + & when (@media-common = true) { .abs-block-title { - margin-bottom: 15px; - - > strong { - .lib-heading(h3); - } + @abs-block-title(); } } @@ -194,7 +198,7 @@ & when (@media-common = true) { .abs-account-blocks { .block-title { - &:extend(.abs-block-title all); + @abs-block-title(); > .action { margin-left: 15px; @@ -330,13 +334,35 @@ } } +// +// Button as a link +// --------------------------------------------- + +@abs-action-button-as-link: { + .lib-button-as-link(@_margin: false); + border-radius: 0; + font-size: inherit; + font-weight: @font-weight__regular; + + &:active, + &:not(:focus) { + box-shadow: none; + } +}; + +& when (@media-common = true) { + .abs-action-button-as-link { + @abs-action-button-as-link(); + } +} + // // Action with icon remove with text // --------------------------------------------- & when (@media-common = true) { .abs-action-remove { - &:extend(.abs-action-button-as-link all); + @abs-action-button-as-link(); left: @indent__s; margin-left: 70%; position: absolute; @@ -677,24 +703,6 @@ } } -// -// Button as a link -// --------------------------------------------- - -& when (@media-common = true) { - .abs-action-button-as-link { - .lib-button-as-link(@_margin: false); - border-radius: 0; - font-size: inherit; - font-weight: @font-weight__regular; - - &:active, - &:not(:focus) { - box-shadow: none; - } - } -} - // // Button revert secondary color // --------------------------------------------- diff --git a/app/design/frontend/Magento/blank/web/css/source/_sources.less b/app/design/frontend/Magento/blank/web/css/source/_sources.less index 0e8c4b356a927..af7eda617217a 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_sources.less +++ b/app/design/frontend/Magento/blank/web/css/source/_sources.less @@ -4,7 +4,7 @@ // */ @import '_variables.less'; -@import '_extends.less'; +@import (reference) '_extends.less'; @import '_typography.less'; @import '_layout.less'; @import '_tables.less'; From b289baec1f7902ea171bfafffdf067d7eb1c4730 Mon Sep 17 00:00:00 2001 From: Vladyslav Sikailo Date: Wed, 23 Mar 2022 13:13:30 +0200 Subject: [PATCH 049/985] Fix typo which trigger performance bug Fix bug when Category Products Count cannot be taken from catalog_category_product_index table --- .../Magento/Catalog/Model/ResourceModel/Category/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 351e3314c9fb4..c02c3ddf0ce7e 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -327,7 +327,7 @@ public function loadProductCount($items, $countRegular = true, $countAnchor = tr $countSelect = $this->getProductsCountQuery($categoryIds, (bool)$websiteId); $categoryProductsCount = $this->_conn->fetchPairs($countSelect); foreach ($anchor as $item) { - $productsCount = isset($categoriesProductsCount[$item->getId()]) + $productsCount = isset($categoryProductsCount[$item->getId()]) ? (int)$categoryProductsCount[$item->getId()] : $this->getProductsCountFromCategoryTable($item, $websiteId); $item->setProductCount($productsCount); From 432228ccf399a110c4154805b71437afdef7f279 Mon Sep 17 00:00:00 2001 From: engcom-Charlie Date: Thu, 28 Apr 2022 12:45:11 +0530 Subject: [PATCH 050/985] 32554: Fixed the cache tags issue --- .../Magento/StoreGraphQl/Model/Resolver/Store/Identity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php index a59b52d4b409c..807c461972688 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php @@ -22,10 +22,11 @@ class Identity implements IdentityInterface */ public function getIdentities(array $resolvedData): array { + $data["id"] = empty($resolvedData) ? [] : $resolvedData["id"]; $ids = empty($resolvedData) ? [] : array_merge([$this->cacheTag], array_map(function ($key) { return sprintf('%s_%s', $this->cacheTag, $key); - }, array_keys($resolvedData))); + }, $data)); return $ids; } } From ef94ca30b3730796edb902d7ece9da29f87415a6 Mon Sep 17 00:00:00 2001 From: engcom-Charlie Date: Wed, 4 May 2022 17:40:47 +0530 Subject: [PATCH 051/985] 35216: Fixed static test --- .../Magento/Catalog/Model/ResourceModel/Category/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index c02c3ddf0ce7e..8f73fc66c0d2a 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -23,7 +23,7 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection { /** - * Event prefix + * Event prefix name * * @var string */ From 4aa01e2f02417efa3d2099b14e98463c6ed30cd8 Mon Sep 17 00:00:00 2001 From: magento packaging service Date: Mon, 1 Aug 2022 14:55:57 +0000 Subject: [PATCH 052/985] Updating composer versions for version-setter for 2.4.5 --- app/code/Magento/AdminAdobeIms/composer.json | 40 ++++++----- app/code/Magento/AdminAnalytics/composer.json | 24 ++++--- .../Magento/AdminNotification/composer.json | 24 ++++--- app/code/Magento/AdobeIms/composer.json | 20 +++--- app/code/Magento/AdobeImsApi/composer.json | 10 +-- .../AdvancedPricingImportExport/composer.json | 30 ++++---- app/code/Magento/AdvancedSearch/composer.json | 28 ++++---- app/code/Magento/Amqp/composer.json | 18 ++--- app/code/Magento/Analytics/composer.json | 18 ++--- .../AsynchronousOperations/composer.json | 26 +++---- app/code/Magento/Authorization/composer.json | 16 +++-- app/code/Magento/AwsS3/composer.json | 14 ++-- app/code/Magento/Backend/composer.json | 50 ++++++------- app/code/Magento/Backup/composer.json | 20 +++--- app/code/Magento/Bundle/composer.json | 52 +++++++------- app/code/Magento/BundleGraphQl/composer.json | 28 ++++---- .../Magento/BundleImportExport/composer.json | 26 +++---- .../Magento/CacheInvalidate/composer.json | 16 +++-- app/code/Magento/Captcha/composer.json | 26 +++---- .../Magento/CardinalCommerce/composer.json | 20 +++--- app/code/Magento/Catalog/composer.json | 70 ++++++++++--------- .../Magento/CatalogAnalytics/composer.json | 14 ++-- .../Magento/CatalogCmsGraphQl/composer.json | 22 +++--- .../CatalogCustomerGraphQl/composer.json | 16 +++-- app/code/Magento/CatalogGraphQl/composer.json | 36 +++++----- .../Magento/CatalogImportExport/composer.json | 34 ++++----- .../Magento/CatalogInventory/composer.json | 28 ++++---- .../CatalogInventoryGraphQl/composer.json | 18 ++--- app/code/Magento/CatalogRule/composer.json | 32 +++++---- .../CatalogRuleConfigurable/composer.json | 22 +++--- .../Magento/CatalogRuleGraphQl/composer.json | 14 ++-- app/code/Magento/CatalogSearch/composer.json | 38 +++++----- .../Magento/CatalogUrlRewrite/composer.json | 32 +++++---- .../CatalogUrlRewriteGraphQl/composer.json | 26 +++---- app/code/Magento/CatalogWidget/composer.json | 32 +++++---- app/code/Magento/Checkout/composer.json | 56 ++++++++------- .../Magento/CheckoutAgreements/composer.json | 22 +++--- .../CheckoutAgreementsGraphQl/composer.json | 18 ++--- app/code/Magento/Cms/composer.json | 34 ++++----- app/code/Magento/CmsGraphQl/composer.json | 24 ++++--- app/code/Magento/CmsUrlRewrite/composer.json | 20 +++--- .../CmsUrlRewriteGraphQl/composer.json | 24 ++++--- .../Magento/CompareListGraphQl/composer.json | 14 ++-- app/code/Magento/Config/composer.json | 28 ++++---- .../ConfigurableImportExport/composer.json | 26 +++---- .../Magento/ConfigurableProduct/composer.json | 50 ++++++------- .../ConfigurableProductGraphQl/composer.json | 24 ++++--- .../ConfigurableProductSales/composer.json | 22 +++--- app/code/Magento/Contact/composer.json | 22 +++--- app/code/Magento/Cookie/composer.json | 18 ++--- app/code/Magento/Cron/composer.json | 18 ++--- app/code/Magento/Csp/composer.json | 16 +++-- app/code/Magento/CurrencySymbol/composer.json | 24 ++++--- app/code/Magento/Customer/composer.json | 56 ++++++++------- .../Magento/CustomerAnalytics/composer.json | 14 ++-- .../CustomerDownloadableGraphQl/composer.json | 18 ++--- .../Magento/CustomerGraphQl/composer.json | 30 ++++---- .../CustomerImportExport/composer.json | 26 +++---- app/code/Magento/Deploy/composer.json | 22 +++--- app/code/Magento/Developer/composer.json | 18 ++--- app/code/Magento/Dhl/composer.json | 34 ++++----- app/code/Magento/Directory/composer.json | 20 +++--- .../Magento/DirectoryGraphQl/composer.json | 16 +++-- app/code/Magento/Downloadable/composer.json | 48 +++++++------ .../Magento/DownloadableGraphQl/composer.json | 28 ++++---- .../DownloadableImportExport/composer.json | 26 +++---- app/code/Magento/Eav/composer.json | 24 ++++--- app/code/Magento/EavGraphQl/composer.json | 16 +++-- app/code/Magento/Elasticsearch/composer.json | 32 +++++---- app/code/Magento/Elasticsearch6/composer.json | 24 ++++--- app/code/Magento/Elasticsearch7/composer.json | 24 ++++--- app/code/Magento/Email/composer.json | 34 ++++----- app/code/Magento/EncryptionKey/composer.json | 18 ++--- app/code/Magento/Fedex/composer.json | 30 ++++---- app/code/Magento/GiftMessage/composer.json | 34 ++++----- .../Magento/GiftMessageGraphQl/composer.json | 16 +++-- app/code/Magento/GoogleAdwords/composer.json | 18 ++--- .../Magento/GoogleAnalytics/composer.json | 22 +++--- app/code/Magento/GoogleGtag/composer.json | 22 +++--- .../Magento/GoogleOptimizer/composer.json | 28 ++++---- app/code/Magento/GraphQl/composer.json | 22 +++--- app/code/Magento/GraphQlCache/composer.json | 18 ++--- .../GroupedCatalogInventory/composer.json | 20 +++--- .../Magento/GroupedImportExport/composer.json | 24 ++++--- app/code/Magento/GroupedProduct/composer.json | 42 +++++------ .../GroupedProductGraphQl/composer.json | 16 +++-- app/code/Magento/ImportExport/composer.json | 26 +++---- app/code/Magento/Indexer/composer.json | 16 +++-- .../Magento/InstantPurchase/composer.json | 18 ++--- app/code/Magento/Integration/composer.json | 28 ++++---- .../Magento/JwtFrameworkAdapter/composer.json | 14 ++-- app/code/Magento/JwtUserToken/composer.json | 18 ++--- .../Magento/LayeredNavigation/composer.json | 18 ++--- .../Magento/LoginAsCustomer/composer.json | 22 +++--- .../LoginAsCustomerAdminUi/composer.json | 29 ++++---- .../Magento/LoginAsCustomerApi/composer.json | 10 +-- .../LoginAsCustomerAssistance/composer.json | 29 ++++---- .../LoginAsCustomerFrontendUi/composer.json | 17 ++--- .../LoginAsCustomerGraphQl/composer.json | 26 +++---- .../Magento/LoginAsCustomerLog/composer.json | 27 +++---- .../LoginAsCustomerPageCache/composer.json | 21 +++--- .../LoginAsCustomerQuote/composer.json | 23 +++--- .../LoginAsCustomerSales/composer.json | 23 +++--- app/code/Magento/Marketplace/composer.json | 16 +++-- app/code/Magento/MediaContent/composer.json | 14 ++-- .../Magento/MediaContentApi/composer.json | 12 ++-- .../Magento/MediaContentCatalog/composer.json | 18 ++--- .../Magento/MediaContentCms/composer.json | 14 ++-- .../MediaContentSynchronization/composer.json | 24 ++++--- .../composer.json | 12 ++-- .../composer.json | 16 +++-- .../composer.json | 16 +++-- app/code/Magento/MediaGallery/composer.json | 14 ++-- .../Magento/MediaGalleryApi/composer.json | 10 +-- .../Magento/MediaGalleryCatalog/composer.json | 14 ++-- .../composer.json | 24 ++++--- .../MediaGalleryCatalogUi/composer.json | 20 +++--- .../Magento/MediaGalleryCmsUi/composer.json | 14 ++-- .../MediaGalleryIntegration/composer.json | 32 +++++---- .../MediaGalleryMetadata/composer.json | 12 ++-- .../MediaGalleryMetadataApi/composer.json | 10 +-- .../MediaGalleryRenditions/composer.json | 24 ++++--- .../MediaGalleryRenditionsApi/composer.json | 10 +-- .../MediaGallerySynchronization/composer.json | 16 +++-- .../composer.json | 12 ++-- .../composer.json | 16 +++-- app/code/Magento/MediaGalleryUi/composer.json | 32 +++++---- .../Magento/MediaGalleryUiApi/composer.json | 16 +++-- app/code/Magento/MediaStorage/composer.json | 30 ++++---- app/code/Magento/MessageQueue/composer.json | 16 +++-- app/code/Magento/Msrp/composer.json | 28 ++++---- .../MsrpConfigurableProduct/composer.json | 20 +++--- .../Magento/MsrpGroupedProduct/composer.json | 20 +++--- app/code/Magento/Multishipping/composer.json | 34 ++++----- app/code/Magento/MysqlMq/composer.json | 18 ++--- .../Magento/NewRelicReporting/composer.json | 26 +++---- app/code/Magento/Newsletter/composer.json | 32 +++++---- .../Magento/NewsletterGraphQl/composer.json | 22 +++--- .../Magento/OfflinePayments/composer.json | 22 +++--- .../Magento/OfflineShipping/composer.json | 36 +++++----- app/code/Magento/PageCache/composer.json | 22 +++--- app/code/Magento/Payment/composer.json | 28 ++++---- app/code/Magento/PaymentGraphQl/composer.json | 18 ++--- app/code/Magento/Paypal/composer.json | 50 ++++++------- app/code/Magento/PaypalCaptcha/composer.json | 22 +++--- app/code/Magento/PaypalGraphQl/composer.json | 34 ++++----- app/code/Magento/Persistent/composer.json | 26 +++---- app/code/Magento/ProductAlert/composer.json | 32 +++++---- app/code/Magento/ProductVideo/composer.json | 30 ++++---- app/code/Magento/Quote/composer.json | 44 ++++++------ app/code/Magento/QuoteAnalytics/composer.json | 14 ++-- .../Magento/QuoteBundleOptions/composer.json | 12 ++-- .../QuoteConfigurableOptions/composer.json | 12 ++-- .../QuoteDownloadableLinks/composer.json | 12 ++-- app/code/Magento/QuoteGraphQl/composer.json | 40 ++++++----- .../RelatedProductGraphQl/composer.json | 18 ++--- .../Magento/ReleaseNotification/composer.json | 22 +++--- app/code/Magento/RemoteStorage/composer.json | 36 +++++----- app/code/Magento/Reports/composer.json | 48 +++++++------ app/code/Magento/RequireJs/composer.json | 14 ++-- app/code/Magento/Review/composer.json | 34 ++++----- .../Magento/ReviewAnalytics/composer.json | 14 ++-- app/code/Magento/ReviewGraphQl/composer.json | 22 +++--- app/code/Magento/Robots/composer.json | 18 ++--- app/code/Magento/Rss/composer.json | 20 +++--- app/code/Magento/Rule/composer.json | 22 +++--- app/code/Magento/Sales/composer.json | 64 +++++++++-------- app/code/Magento/SalesAnalytics/composer.json | 14 ++-- app/code/Magento/SalesGraphQl/composer.json | 24 ++++--- app/code/Magento/SalesInventory/composer.json | 22 +++--- app/code/Magento/SalesRule/composer.json | 58 +++++++-------- app/code/Magento/SalesSequence/composer.json | 14 ++-- app/code/Magento/SampleData/composer.json | 16 +++-- app/code/Magento/Search/composer.json | 24 ++++--- app/code/Magento/Security/composer.json | 24 ++++--- app/code/Magento/SendFriend/composer.json | 26 +++---- .../Magento/SendFriendGraphQl/composer.json | 16 +++-- app/code/Magento/Shipping/composer.json | 46 ++++++------ app/code/Magento/Sitemap/composer.json | 34 ++++----- app/code/Magento/Store/composer.json | 32 +++++---- app/code/Magento/StoreGraphQl/composer.json | 16 +++-- app/code/Magento/Swagger/composer.json | 14 ++-- app/code/Magento/SwaggerWebapi/composer.json | 16 +++-- .../Magento/SwaggerWebapiAsync/composer.json | 18 ++--- app/code/Magento/Swatches/composer.json | 38 +++++----- .../Magento/SwatchesGraphQl/composer.json | 20 +++--- .../SwatchesLayeredNavigation/composer.json | 14 ++-- app/code/Magento/Tax/composer.json | 44 ++++++------ app/code/Magento/TaxGraphQl/composer.json | 16 +++-- .../Magento/TaxImportExport/composer.json | 24 ++++--- app/code/Magento/Theme/composer.json | 40 ++++++----- app/code/Magento/ThemeGraphQl/composer.json | 14 ++-- app/code/Magento/Translation/composer.json | 26 +++---- app/code/Magento/Ui/composer.json | 26 +++---- app/code/Magento/Ups/composer.json | 30 ++++---- app/code/Magento/UrlRewrite/composer.json | 28 ++++---- .../Magento/UrlRewriteGraphQl/composer.json | 16 +++-- app/code/Magento/User/composer.json | 28 ++++---- app/code/Magento/Usps/composer.json | 30 ++++---- app/code/Magento/Variable/composer.json | 22 +++--- app/code/Magento/Vault/composer.json | 29 ++++---- app/code/Magento/VaultGraphQl/composer.json | 14 ++-- app/code/Magento/Version/composer.json | 14 ++-- app/code/Magento/Webapi/composer.json | 26 +++---- app/code/Magento/WebapiAsync/composer.json | 24 ++++--- app/code/Magento/WebapiSecurity/composer.json | 16 +++-- app/code/Magento/Weee/composer.json | 40 ++++++----- app/code/Magento/WeeeGraphQl/composer.json | 20 +++--- app/code/Magento/Widget/composer.json | 32 +++++---- app/code/Magento/Wishlist/composer.json | 48 +++++++------ .../Magento/WishlistAnalytics/composer.json | 14 ++-- .../Magento/WishlistGraphQl/composer.json | 22 +++--- .../adminhtml/Magento/backend/composer.json | 14 ++-- .../frontend/Magento/blank/composer.json | 14 ++-- .../frontend/Magento/luma/composer.json | 16 +++-- app/i18n/Magento/de_DE/composer.json | 6 +- app/i18n/Magento/en_US/composer.json | 6 +- app/i18n/Magento/es_ES/composer.json | 6 +- app/i18n/Magento/fr_FR/composer.json | 6 +- app/i18n/Magento/nl_NL/composer.json | 6 +- app/i18n/Magento/pt_BR/composer.json | 6 +- app/i18n/Magento/zh_Hans_CN/composer.json | 6 +- .../Magento/Framework/Amqp/composer.json | 18 ++--- .../Magento/Framework/Bulk/composer.json | 18 ++--- .../Framework/MessageQueue/composer.json | 18 ++--- lib/internal/Magento/Framework/composer.json | 10 +-- 226 files changed, 2889 insertions(+), 2445 deletions(-) diff --git a/app/code/Magento/AdminAdobeIms/composer.json b/app/code/Magento/AdminAdobeIms/composer.json index 0da1aa2549305..117c985f1adc4 100644 --- a/app/code/Magento/AdminAdobeIms/composer.json +++ b/app/code/Magento/AdminAdobeIms/composer.json @@ -1,33 +1,34 @@ { "name": "magento/module-admin-adobe-ims", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-adobe-ims": "*", - "magento/module-adobe-ims-api": "*", - "magento/module-config": "*", - "magento/module-backend": "*", - "magento/module-user": "*", - "magento/module-captcha": "*", - "magento/module-authorization": "*", - "magento/module-store": "*", - "magento/module-email": "*", - "magento/module-integration": "*", - "magento/module-jwt-user-token": "*", - "magento/module-security": "*" + "magento/framework": "103.0.*", + "magento/module-adobe-ims": "2.1.*", + "magento/module-adobe-ims-api": "2.1.*", + "magento/module-config": "101.2.*", + "magento/module-backend": "102.0.*", + "magento/module-user": "101.2.*", + "magento/module-captcha": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-email": "101.1.*", + "magento/module-integration": "100.4.*", + "magento/module-jwt-user-token": "100.4.*", + "magento/module-security": "100.4.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } + diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json index ef3829fd149c6..1f3efd6281a58 100644 --- a/app/code/Magento/AdminAnalytics/composer.json +++ b/app/code/Magento/AdminAnalytics/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-admin-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-release-notification": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-release-notification": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index 28ca1f626a2cd..54c910c5d3459 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-admin-notification", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/AdobeIms/composer.json b/app/code/Magento/AdobeIms/composer.json index 872c29ffc97b4..b35b052711334 100644 --- a/app/code/Magento/AdobeIms/composer.json +++ b/app/code/Magento/AdobeIms/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-adobe-ims", "description": "Magento module responsible for authentication to Adobe services", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-adobe-ims-api": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-user": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "2.1.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-adobe-ims-api": "2.1.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-user": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/AdobeImsApi/composer.json b/app/code/Magento/AdobeImsApi/composer.json index 231f1ddfa1513..5dd770ff3d660 100644 --- a/app/code/Magento/AdobeImsApi/composer.json +++ b/app/code/Magento/AdobeImsApi/composer.json @@ -1,15 +1,16 @@ { "name": "magento/module-adobe-ims-api", "description": "Implementation of Magento module responsible for authentication to Adobe services", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "2.1.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } + diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index 59ea74cf4ddcb..2164413314854 100644 --- a/app/code/Magento/AdvancedPricingImportExport/composer.json +++ b/app/code/Magento/AdvancedPricingImportExport/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-advanced-pricing-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/AdvancedSearch/composer.json b/app/code/Magento/AdvancedSearch/composer.json index 30205c5255cdd..7367a01eeba54 100644 --- a/app/code/Magento/AdvancedSearch/composer.json +++ b/app/code/Magento/AdvancedSearch/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-advanced-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-search": "*", - "magento/module-store": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/Amqp/composer.json b/app/code/Magento/Amqp/composer.json index c7d8d49fb0003..6f2b360634d3e 100644 --- a/app/code/Magento/Amqp/composer.json +++ b/app/code/Magento/Amqp/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-amqp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-amqp": "100.4.*", + "magento/framework-message-queue": "100.4.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json index 9bf08b4b068ca..8187695015c60 100644 --- a/app/code/Magento/Analytics/composer.json +++ b/app/code/Magento/Analytics/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/AsynchronousOperations/composer.json b/app/code/Magento/AsynchronousOperations/composer.json index b09ca94052e87..5d39b99918ecb 100644 --- a/app/code/Magento/AsynchronousOperations/composer.json +++ b/app/code/Magento/AsynchronousOperations/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-asynchronous-operations", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", - "magento/framework-bulk": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/framework-bulk": "101.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", "php": "~7.4.0||~8.1.0" }, "suggest": { - "magento/module-admin-notification": "*", + "magento/module-admin-notification": "100.4.*", "magento/module-logging": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index d122e8b29b46e..34392ac507373 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-authorization", "description": "Authorization module provides access to Magento ACL functionality.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/AwsS3/composer.json b/app/code/Magento/AwsS3/composer.json index 19078b9ee7b77..c74db49a09dfe 100644 --- a/app/code/Magento/AwsS3/composer.json +++ b/app/code/Magento/AwsS3/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-aws-s3", "description": "N/A", + "type": "magento2-module", + "license": [ + "proprietary" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-remote-storage": "*" + "magento/framework": "103.0.*", + "magento/module-remote-storage": "100.4.*" }, - "type": "magento2-module", - "license": [ - "proprietary" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 65aa05fe71e56..effee3ad64e77 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -1,38 +1,39 @@ { "name": "magento/module-backend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backup": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-developer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-sales": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-backup": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-developer": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-translation": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php", @@ -43,3 +44,4 @@ } } } + diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index e7437a3077aa7..0a7053ffa6a0c 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-backup", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index 47be75a42c254..c98745e5a182e 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -1,39 +1,40 @@ { "name": "magento/module-bundle", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-directory": "100.4.*" }, "suggest": { - "magento/module-webapi": "*", - "magento/module-bundle-sample-data": "*", - "magento/module-sales-rule": "*" + "magento/module-webapi": "100.4.*", + "magento/module-bundle-sample-data": "Sample Data version: 100.4.*", + "magento/module-sales-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -43,3 +44,4 @@ } } } + diff --git a/app/code/Magento/BundleGraphQl/composer.json b/app/code/Magento/BundleGraphQl/composer.json index 70a619cbf6837..06dc5f4a96ba0 100644 --- a/app/code/Magento/BundleGraphQl/composer.json +++ b/app/code/Magento/BundleGraphQl/composer.json @@ -2,23 +2,24 @@ "name": "magento/module-bundle-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-graph-ql": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-store": "*", - "magento/module-sales": "*", - "magento/module-sales-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-catalog": "104.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index ff7d0acc7c48d..dc9786e65003d 100644 --- a/app/code/Magento/BundleImportExport/composer.json +++ b/app/code/Magento/BundleImportExport/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-bundle-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-bundle": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json index c756a5fe602e9..bc179e2710bf3 100644 --- a/app/code/Magento/CacheInvalidate/composer.json +++ b/app/code/Magento/CacheInvalidate/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-cache-invalidate", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-page-cache": "*" + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index d4b94dbb586c2..13ab1995709de 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-captcha", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-authorization": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-authorization": "100.4.*", "laminas/laminas-captcha": "^2.12", "laminas/laminas-db": "^2.13.4" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/CardinalCommerce/composer.json b/app/code/Magento/CardinalCommerce/composer.json index 4c49c92cec1ea..d531c7f4634f1 100644 --- a/app/code/Magento/CardinalCommerce/composer.json +++ b/app/code/Magento/CardinalCommerce/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-cardinal-commerce", "description": "Provides a possibility to enable 3-D Secure 2.0 support for payment methods.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index 6597e88e9d995..127ad35268fba 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -1,48 +1,49 @@ { "name": "magento/module-catalog", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-checkout": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-indexer": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-product-alert": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-indexer": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-product-alert": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-catalog-sample-data": "*" + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-catalog-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -52,3 +53,4 @@ } } } + diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json index a41a47fa4764b..2fb9f4fb021cf 100644 --- a/app/code/Magento/CatalogAnalytics/composer.json +++ b/app/code/Magento/CatalogAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-catalog-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/CatalogCmsGraphQl/composer.json b/app/code/Magento/CatalogCmsGraphQl/composer.json index cf9e76f3b2ea2..b32b4635745c3 100644 --- a/app/code/Magento/CatalogCmsGraphQl/composer.json +++ b/app/code/Magento/CatalogCmsGraphQl/composer.json @@ -2,21 +2,22 @@ "name": "magento/module-catalog-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/CatalogCustomerGraphQl/composer.json b/app/code/Magento/CatalogCustomerGraphQl/composer.json index b1743ae964966..c7062a2d03e6a 100644 --- a/app/code/Magento/CatalogCustomerGraphQl/composer.json +++ b/app/code/Magento/CatalogCustomerGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-catalog-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-catalog-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-catalog-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/CatalogGraphQl/composer.json b/app/code/Magento/CatalogGraphQl/composer.json index c289f84a359ba..d7f4f0c44f901 100644 --- a/app/code/Magento/CatalogGraphQl/composer.json +++ b/app/code/Magento/CatalogGraphQl/composer.json @@ -2,28 +2,29 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-eav": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-catalog-search": "*", - "magento/framework": "*", - "magento/module-graph-ql": "*", - "magento/module-advanced-search": "*" + "magento/module-eav": "102.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-eav-graph-ql": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/framework": "103.0.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-advanced-search": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index dac8624086df0..130e27c8ba01f 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-catalog-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.5", "require": { "php": "~7.4.0||~8.1.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index 893de329628fa..778e1e61142c1 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ }, "abandoned": "magento/inventory-metapackage" } + diff --git a/app/code/Magento/CatalogInventoryGraphQl/composer.json b/app/code/Magento/CatalogInventoryGraphQl/composer.json index 38685524d5346..b585dba99e69e 100644 --- a/app/code/Magento/CatalogInventoryGraphQl/composer.json +++ b/app/code/Magento/CatalogInventoryGraphQl/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-catalog-inventory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index 531a12ac017ed..39e3fde80c33a 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-catalog-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-import-export": "*", - "magento/module-catalog-rule-sample-data": "*" + "magento/module-import-export": "101.0.*", + "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json index 68da972ae94f9..782229dd6daa3 100644 --- a/app/code/Magento/CatalogRuleConfigurable/composer.json +++ b/app/code/Magento/CatalogRuleConfigurable/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-catalog-rule-configurable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-configurable-product": "*" + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-configurable-product": "100.4.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/CatalogRuleGraphQl/composer.json b/app/code/Magento/CatalogRuleGraphQl/composer.json index 2c8c3ef20c96a..6bd7ef191d895 100644 --- a/app/code/Magento/CatalogRuleGraphQl/composer.json +++ b/app/code/Magento/CatalogRuleGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-catalog-rule-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-rule": "*" + "magento/module-catalog-rule": "101.2.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index 465d7daeebe18..1e9d7381a08e2 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -1,32 +1,33 @@ { "name": "magento/module-catalog-search", "description": "Catalog search", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-indexer": "*", - "magento/module-catalog-inventory": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-indexer": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } + diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index ce409e2186faa..0d7de0896c3d8 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-catalog-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json index 025234af6f865..d79c2ab17f611 100644 --- a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json +++ b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json @@ -2,23 +2,24 @@ "name": "magento/module-catalog-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*" + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-url-rewrite-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json index 33c5e3b3ba3ee..330a74b4157c0 100644 --- a/app/code/Magento/CatalogWidget/composer.json +++ b/app/code/Magento/CatalogWidget/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-catalog-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-rule": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index f277184d8986b..7b0b9682d3fa1 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -1,41 +1,42 @@ { "name": "magento/module-checkout", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-msrp": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-security": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-security": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-authorization": "100.4.*" }, "suggest": { - "magento/module-cookie": "*" + "magento/module-cookie": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } + diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index 753bef25e3e64..a1526eb506168 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-checkout-agreements", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-checkout": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json index de6bc855e7847..f75215e0e3e1f 100644 --- a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json +++ b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json @@ -2,19 +2,20 @@ "name": "magento/module-checkout-agreements-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-checkout-agreements": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-checkout-agreements": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index b3b2ba31db37b..f6b07734a85ff 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-cms", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "104.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-variable": "*", - "magento/module-widget": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "magento/module-widget": "101.2.*" }, "suggest": { - "magento/module-cms-sample-data": "*" + "magento/module-cms-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/CmsGraphQl/composer.json b/app/code/Magento/CmsGraphQl/composer.json index b2550344299fa..31cdf1b9242e7 100644 --- a/app/code/Magento/CmsGraphQl/composer.json +++ b/app/code/Magento/CmsGraphQl/composer.json @@ -2,22 +2,23 @@ "name": "magento/module-cms-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-widget": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-widget": "101.2.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index 8fb9bbfff22e2..635ee06491d27 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-cms-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json index 70a598d26d574..a9d224eeb6da3 100644 --- a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json +++ b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json @@ -2,22 +2,23 @@ "name": "magento/module-cms-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-store": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/module-cms-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite-graph-ql": "100.4.*", + "magento/module-cms-graph-ql": "100.4.*" }, "suggest": { - "magento/module-cms-url-rewrite": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/CompareListGraphQl/composer.json b/app/code/Magento/CompareListGraphQl/composer.json index e8fb5d588852e..bae7c7a6e3769 100644 --- a/app/code/Magento/CompareListGraphQl/composer.json +++ b/app/code/Magento/CompareListGraphQl/composer.json @@ -2,16 +2,17 @@ "name": "magento/module-compare-list-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 61100e6336c27..7417d30adc6b9 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-config", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cron": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*", - "magento/module-email": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index 98205def6a799..687fcea6d2c26 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-configurable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index 67b1ad2b2ed33..dc69dd6653c8d 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -1,38 +1,39 @@ { "name": "magento/module-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-msrp": "*", - "magento/module-webapi": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-product-video": "*", - "magento/module-configurable-sample-data": "*", - "magento/module-product-links-sample-data": "*", - "magento/module-tax": "*" + "magento/module-msrp": "100.4.*", + "magento/module-webapi": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-product-video": "100.4.*", + "magento/module-configurable-sample-data": "Sample Data version: 100.4.*", + "magento/module-product-links-sample-data": "Sample Data version: 100.4.*", + "magento/module-tax": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -42,3 +43,4 @@ } } } + diff --git a/app/code/Magento/ConfigurableProductGraphQl/composer.json b/app/code/Magento/ConfigurableProductGraphQl/composer.json index b839227511d88..0c742439aa66d 100644 --- a/app/code/Magento/ConfigurableProductGraphQl/composer.json +++ b/app/code/Magento/ConfigurableProductGraphQl/composer.json @@ -2,21 +2,22 @@ "name": "magento/module-configurable-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-configurable-product": "*", - "magento/module-graph-ql": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-catalog": "104.0.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json index 55b2e78bd24d2..4256442b87ac1 100644 --- a/app/code/Magento/ConfigurableProductSales/composer.json +++ b/app/code/Magento/ConfigurableProductSales/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-configurable-product-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-configurable-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-configurable-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index 00ea8f865928d..55e8dae73c64d 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-contact", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json index 6a5752792f7fb..6e0e1fc8ef258 100644 --- a/app/code/Magento/Cookie/composer.json +++ b/app/code/Magento/Cookie/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-cookie", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-backend": "*" + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index 0468a95b457c0..f6237ab319adf 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-cron", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Csp/composer.json b/app/code/Magento/Csp/composer.json index 2079a30d92068..cd5024361c709 100644 --- a/app/code/Magento/Csp/composer.json +++ b/app/code/Magento/Csp/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-csp", "description": "CSP module enables Content Security Policies for Magento", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index 4f6854cbee185..5023f810d9cd3 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-currency-symbol", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-page-cache": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index 2d76da56bff7d..c9caebbeea6f5 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -1,41 +1,42 @@ { "name": "magento/module-customer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-integration": "*", - "magento/module-media-storage": "*", - "magento/module-newsletter": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-integration": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-customer-sample-data": "*", - "magento/module-webapi": "*" + "magento/module-cookie": "100.4.*", + "magento/module-customer-sample-data": "Sample Data version: 100.4.*", + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -45,3 +46,4 @@ } } } + diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json index 396c7d4ca3364..c866756b082c0 100644 --- a/app/code/Magento/CustomerAnalytics/composer.json +++ b/app/code/Magento/CustomerAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-customer-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-customer": "103.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/CustomerDownloadableGraphQl/composer.json b/app/code/Magento/CustomerDownloadableGraphQl/composer.json index f33d05e18568a..80d7dc4632e6b 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/composer.json +++ b/app/code/Magento/CustomerDownloadableGraphQl/composer.json @@ -2,19 +2,20 @@ "name": "magento/module-customer-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-downloadable-graph-ql": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" + "magento/module-downloadable-graph-ql": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/CustomerGraphQl/composer.json b/app/code/Magento/CustomerGraphQl/composer.json index 30d94c20acc98..458f84ff0815f 100644 --- a/app/code/Magento/CustomerGraphQl/composer.json +++ b/app/code/Magento/CustomerGraphQl/composer.json @@ -2,24 +2,25 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-authorization": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-graph-ql": "*", - "magento/module-newsletter": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/framework": "*", - "magento/module-directory": "*", - "magento/module-tax": "*", - "magento/module-graph-ql-cache": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-authorization": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-tax": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 2f5c74020e602..e02d71b15fa46 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-customer-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json index e965b6222e375..fe8428363a3fa 100644 --- a/app/code/Magento/Deploy/composer.json +++ b/app/code/Magento/Deploy/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-deploy", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json index 49b9d324f0d11..3b8fc9acef793 100644 --- a/app/code/Magento/Developer/composer.json +++ b/app/code/Magento/Developer/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-developer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 9596f789be5fc..a869bb14a1019 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -1,31 +1,32 @@ { "name": "magento/module-dhl", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-checkout": "*" + "magento/module-checkout": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } + diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index c3973b9cee0c9..5d64c79182eba 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-directory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/DirectoryGraphQl/composer.json b/app/code/Magento/DirectoryGraphQl/composer.json index 6acbef5c5534c..bdcce07341439 100644 --- a/app/code/Magento/DirectoryGraphQl/composer.json +++ b/app/code/Magento/DirectoryGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-directory-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-directory": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index a9487f8c430d3..15d67030e173b 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -1,37 +1,38 @@ { "name": "magento/module-downloadable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-downloadable-sample-data": "*" + "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } + diff --git a/app/code/Magento/DownloadableGraphQl/composer.json b/app/code/Magento/DownloadableGraphQl/composer.json index 214b857bcd6f9..12c33eb3f184a 100644 --- a/app/code/Magento/DownloadableGraphQl/composer.json +++ b/app/code/Magento/DownloadableGraphQl/composer.json @@ -2,24 +2,25 @@ "name": "magento/module-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-quote-graph-ql": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*", - "magento/module-sales-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*", + "magento/module-sales-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json index d6daea4b2ac17..85b8a6502b917 100644 --- a/app/code/Magento/DownloadableImportExport/composer.json +++ b/app/code/Magento/DownloadableImportExport/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-downloadable-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index 60915bd4ba590..bea1c5502ae62 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-eav", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.1.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/EavGraphQl/composer.json b/app/code/Magento/EavGraphQl/composer.json index cfb8dc7ac9e11..40033f8c3cffa 100644 --- a/app/code/Magento/EavGraphQl/composer.json +++ b/app/code/Magento/EavGraphQl/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-eav-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-eav": "*" + "magento/framework": "103.0.*", + "magento/module-eav": "102.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 30e0899981e6b..6329165421eb4 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-elasticsearch", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "101.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-advanced-search": "*", - "magento/module-catalog": "*", - "magento/module-catalog-search": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-search": "*", - "magento/module-store": "*", - "magento/module-catalog-inventory": "*", - "magento/framework": "*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-search": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/framework": "103.0.*", "elasticsearch/elasticsearch": "~7.17.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/Elasticsearch6/composer.json b/app/code/Magento/Elasticsearch6/composer.json index 80eb60946a759..d9fb8cda96eaa 100644 --- a/app/code/Magento/Elasticsearch6/composer.json +++ b/app/code/Magento/Elasticsearch6/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-6", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-search": "101.1.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.17.0" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json index 69690fcf2aff8..8d9bf5ef63091 100644 --- a/app/code/Magento/Elasticsearch7/composer.json +++ b/app/code/Magento/Elasticsearch7/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-elasticsearch-7", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-elasticsearch": "*", + "magento/framework": "103.0.*", + "magento/module-elasticsearch": "101.0.*", "elasticsearch/elasticsearch": "~7.17.0", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*" + "magento/module-advanced-search": "100.4.*", + "magento/module-catalog-search": "102.0.*" }, "suggest": { - "magento/module-config": "*", - "magento/module-search": "*" + "magento/module-config": "101.2.*", + "magento/module-search": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 4499b1060a011..450bcb74ec788 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-email", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-require-js": "*", - "magento/module-media-storage": "*", - "magento/module-variable": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-variable": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json index c20cd852d2377..8d573ed694420 100644 --- a/app/code/Magento/EncryptionKey/composer.json +++ b/app/code/Magento/EncryptionKey/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-encryption-key", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index 1734040c2c487..66b3d7d5cab68 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-fedex", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index f205f2f4621d2..36cef4663935d 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-gift-message", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-eav": "*", - "magento/module-multishipping": "*" + "magento/module-eav": "102.1.*", + "magento/module-multishipping": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/GiftMessageGraphQl/composer.json b/app/code/Magento/GiftMessageGraphQl/composer.json index f9b980d26fa78..8849b1bc57787 100644 --- a/app/code/Magento/GiftMessageGraphQl/composer.json +++ b/app/code/Magento/GiftMessageGraphQl/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-gift-message-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-gift-message": "*" + "magento/framework": "103.0.*", + "magento/module-gift-message": "100.4.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 3637b38f9ab61..973e58065d292 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-google-adwords", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index bb94435c9e9fd..9f96b7fe681c2 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-google-analytics", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/GoogleGtag/composer.json b/app/code/Magento/GoogleGtag/composer.json index 13abce5dbf570..264798a90d62e 100644 --- a/app/code/Magento/GoogleGtag/composer.json +++ b/app/code/Magento/GoogleGtag/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-google-gtag", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cookie": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index 7afe12358fa53..9e7e67fef7d16 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-google-optimizer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-google-analytics": "*", - "magento/module-google-gtag": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-google-analytics": "100.4.*", + "magento/module-google-gtag": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/GraphQl/composer.json b/app/code/Magento/GraphQl/composer.json index 1a962eedc5d5a..e3790526a4b25 100644 --- a/app/code/Magento/GraphQl/composer.json +++ b/app/code/Magento/GraphQl/composer.json @@ -2,22 +2,23 @@ "name": "magento/module-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-eav": "*", - "magento/framework": "*", - "magento/module-webapi": "*", - "magento/module-new-relic-reporting": "*", - "magento/module-authorization": "*", + "magento/module-eav": "102.1.*", + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*", + "magento/module-new-relic-reporting": "100.4.*", + "magento/module-authorization": "100.4.*", "webonyx/graphql-php": "~14.11.5" }, "suggest": { - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql-cache": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/GraphQlCache/composer.json b/app/code/Magento/GraphQlCache/composer.json index 5be26cbf5990d..a945bb71b09f9 100644 --- a/app/code/Magento/GraphQlCache/composer.json +++ b/app/code/Magento/GraphQlCache/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-graph-ql-cache", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-page-cache": "*", - "magento/module-graph-ql": "*", - "magento/module-authorization": "*", - "magento/module-integration": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-page-cache": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-integration": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/GroupedCatalogInventory/composer.json b/app/code/Magento/GroupedCatalogInventory/composer.json index 1a5e6054130eb..706ae7743d48a 100644 --- a/app/code/Magento/GroupedCatalogInventory/composer.json +++ b/app/code/Magento/GroupedCatalogInventory/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-grouped-catalog-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-grouped-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-grouped-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index e411f55d00f4e..8c729fcdb8de8 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-grouped-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-import-export": "*", - "magento/module-eav": "*", - "magento/module-grouped-product": "*", - "magento/module-import-export": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-import-export": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index 105e711c75b41..61e9e5af41eeb 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -1,34 +1,35 @@ { "name": "magento/module-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-msrp": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-grouped-product-sample-data": "*" + "magento/module-grouped-product-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -38,3 +39,4 @@ } } } + diff --git a/app/code/Magento/GroupedProductGraphQl/composer.json b/app/code/Magento/GroupedProductGraphQl/composer.json index bb0f79e208dcb..bd0cb92ebb385 100644 --- a/app/code/Magento/GroupedProductGraphQl/composer.json +++ b/app/code/Magento/GroupedProductGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-grouped-product-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-grouped-product": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-grouped-product": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index b85162e9bec76..f0e2a6ff080d3 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.5", "require": { "php": "~7.4.0||~8.1.0", "ext-ctype": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index bdcd05d5a71e3..444781023aafe 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-indexer", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json index c399f60df1dbb..871658755ac9d 100644 --- a/app/code/Magento/InstantPurchase/composer.json +++ b/app/code/Magento/InstantPurchase/composer.json @@ -6,16 +6,17 @@ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-quote": "*", - "magento/module-vault": "*", - "magento/framework": "*" + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-vault": "101.2.*", + "magento/framework": "103.0.*" }, "autoload": { "files": [ @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index d3c226066226f..b28c201109cf9 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-integration", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-user": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/JwtFrameworkAdapter/composer.json b/app/code/Magento/JwtFrameworkAdapter/composer.json index a375ed0b197a8..2a85dddfe417d 100644 --- a/app/code/Magento/JwtFrameworkAdapter/composer.json +++ b/app/code/Magento/JwtFrameworkAdapter/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-jwt-framework-adapter", "description": "JWT Manager implementation based on jwt-framework", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "web-token/jwt-framework": "^v2.2.7" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/JwtUserToken/composer.json b/app/code/Magento/JwtUserToken/composer.json index d632d6e4a49b0..09414a2f64373 100644 --- a/app/code/Magento/JwtUserToken/composer.json +++ b/app/code/Magento/JwtUserToken/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-jwt-user-token", "description": "Introduces JWT token support for web API authentication", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-integration": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/module-integration": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index d6285b4260f5f..64fc58224c744 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomer/composer.json b/app/code/Magento/LoginAsCustomer/composer.json index 61a4e1c0dda96..7d5e66e254d5f 100755 --- a/app/code/Magento/LoginAsCustomer/composer.json +++ b/app/code/Magento/LoginAsCustomer/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-login-as-customer", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-backend": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerAdminUi/composer.json b/app/code/Magento/LoginAsCustomerAdminUi/composer.json index 6841ee3790cb3..2da57bc1f1eb6 100644 --- a/app/code/Magento/LoginAsCustomerAdminUi/composer.json +++ b/app/code/Magento/LoginAsCustomerAdminUi/composer.json @@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-admin-ui", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-frontend-ui": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-sales": "*", - "magento/module-store": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-frontend-ui": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +28,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerApi/composer.json b/app/code/Magento/LoginAsCustomerApi/composer.json index e4a0952ac0369..e073fb5e29bab 100644 --- a/app/code/Magento/LoginAsCustomerApi/composer.json +++ b/app/code/Magento/LoginAsCustomerApi/composer.json @@ -1,15 +1,16 @@ { "name": "magento/module-login-as-customer-api", "description": "Allow for admin to enter a customer account", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerAssistance/composer.json b/app/code/Magento/LoginAsCustomerAssistance/composer.json index 58e48bddc7c0f..e194cbb52936b 100644 --- a/app/code/Magento/LoginAsCustomerAssistance/composer.json +++ b/app/code/Magento/LoginAsCustomerAssistance/composer.json @@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-assistance", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-login-as-customer": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-login-as-customer-admin-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer": "100.4.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-login-as-customer-admin-ui": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -28,3 +28,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json index 8a5437dc42d28..79c8fb7e9fe40 100644 --- a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json +++ b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json @@ -1,18 +1,18 @@ { "name": "magento/module-login-as-customer-frontend-ui", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-customer": "*", - "magento/module-store": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +22,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerGraphQl/composer.json b/app/code/Magento/LoginAsCustomerGraphQl/composer.json index 25a5ef8ff8b6c..a9214bdf8ad19 100755 --- a/app/code/Magento/LoginAsCustomerGraphQl/composer.json +++ b/app/code/Magento/LoginAsCustomerGraphQl/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-login-as-customer-graph-ql", "description": "Flexible login as a customer so a merchant or merchant admin can log into an end customer's account to assist them with their account.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-assistance": "*", - "magento/module-integration": "*", - "magento/module-store": "*", - "magento/module-customer": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-login-as-customer-assistance": "100.4.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-customer": "103.0.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerLog/composer.json b/app/code/Magento/LoginAsCustomerLog/composer.json index 404511f7315f4..cb798372a4662 100644 --- a/app/code/Magento/LoginAsCustomerLog/composer.json +++ b/app/code/Magento/LoginAsCustomerLog/composer.json @@ -1,23 +1,23 @@ { "name": "magento/module-login-as-customer-log", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-ui": "*", - "magento/module-user": "*" - }, - "suggest": { - "magento/module-login-as-customer": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-login-as-customer-api": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -27,3 +27,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerPageCache/composer.json b/app/code/Magento/LoginAsCustomerPageCache/composer.json index 93f74f29ef246..ab29da4834fff 100644 --- a/app/code/Magento/LoginAsCustomerPageCache/composer.json +++ b/app/code/Magento/LoginAsCustomerPageCache/composer.json @@ -1,20 +1,20 @@ { "name": "magento/module-login-as-customer-page-cache", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-page-cache": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-page-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +24,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerQuote/composer.json b/app/code/Magento/LoginAsCustomerQuote/composer.json index f852948ab757f..cd20e600e3495 100644 --- a/app/code/Magento/LoginAsCustomerQuote/composer.json +++ b/app/code/Magento/LoginAsCustomerQuote/composer.json @@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-quote", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-quote": "*" - }, - "suggest": { - "magento/module-login-as-customer-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*" + }, + "suggest": { + "magento/module-login-as-customer-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } + diff --git a/app/code/Magento/LoginAsCustomerSales/composer.json b/app/code/Magento/LoginAsCustomerSales/composer.json index ba24858b6f548..d86e972a4a115 100644 --- a/app/code/Magento/LoginAsCustomerSales/composer.json +++ b/app/code/Magento/LoginAsCustomerSales/composer.json @@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-sales", - "description": "", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-user": "*", - "magento/module-login-as-customer-api": "*" - }, - "suggest": { - "magento/module-sales": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-user": "101.2.*", + "magento/module-login-as-customer-api": "100.4.*" + }, + "suggest": { + "magento/module-sales": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json index f468808298344..532d6872b486a 100644 --- a/app/code/Magento/Marketplace/composer.json +++ b/app/code/Magento/Marketplace/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-marketplace", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/MediaContent/composer.json b/app/code/Magento/MediaContent/composer.json index 7eb51b02f61eb..e47e10de7e66f 100644 --- a/app/code/Magento/MediaContent/composer.json +++ b/app/code/Magento/MediaContent/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-media-content", "description": "Magento module provides the implementation for managing relations between content and media files used in that content", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-api": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaContentApi/composer.json b/app/code/Magento/MediaContentApi/composer.json index 86dc6408cd6fd..125f58bae4c82 100644 --- a/app/code/Magento/MediaContentApi/composer.json +++ b/app/code/Magento/MediaContentApi/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-media-content-api", "description": "Magento module provides the API interfaces for managing relations between content and media files used in that content", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-gallery-api": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/MediaContentCatalog/composer.json b/app/code/Magento/MediaContentCatalog/composer.json index 822fd1ec73814..1e22e96975989 100644 --- a/app/code/Magento/MediaContentCatalog/composer.json +++ b/app/code/Magento/MediaContentCatalog/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-media-content-catalog", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Catalog module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-content-api": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/MediaContentCms/composer.json b/app/code/Magento/MediaContentCms/composer.json index 6cd121d00d2a2..72b3376b3ba84 100644 --- a/app/code/Magento/MediaContentCms/composer.json +++ b/app/code/Magento/MediaContentCms/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-media-content-cms", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Cms module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronization/composer.json b/app/code/Magento/MediaContentSynchronization/composer.json index a3062c163b246..9a9712190f77d 100644 --- a/app/code/Magento/MediaContentSynchronization/composer.json +++ b/app/code/Magento/MediaContentSynchronization/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-media-content-synchronization", "description": "Magento module provides implementation of the media content data synchronization.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-asynchronous-operations": "*" - }, - "suggest": { - "magento/module-media-gallery-synchronization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" + }, + "suggest": { + "magento/module-media-gallery-synchronization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronizationApi/composer.json b/app/code/Magento/MediaContentSynchronizationApi/composer.json index 953d665b79a4d..b6bf4dae10c8f 100644 --- a/app/code/Magento/MediaContentSynchronizationApi/composer.json +++ b/app/code/Magento/MediaContentSynchronizationApi/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-media-content-synchronization-api", "description": "Magento module responsible for the media content synchronization implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronizationCatalog/composer.json b/app/code/Magento/MediaContentSynchronizationCatalog/composer.json index 7a0375e30c370..00b185eea5cfd 100644 --- a/app/code/Magento/MediaContentSynchronizationCatalog/composer.json +++ b/app/code/Magento/MediaContentSynchronizationCatalog/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-catalog", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Catalog module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaContentSynchronizationCms/composer.json b/app/code/Magento/MediaContentSynchronizationCms/composer.json index 9e1236bcb863d..c5f213102070a 100644 --- a/app/code/Magento/MediaContentSynchronizationCms/composer.json +++ b/app/code/Magento/MediaContentSynchronizationCms/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-media-content-synchronization-cms", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Cms module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-content-synchronization-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGallery/composer.json b/app/code/Magento/MediaGallery/composer.json index ccea65f248c26..a4d764cc9697e 100644 --- a/app/code/Magento/MediaGallery/composer.json +++ b/app/code/Magento/MediaGallery/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery", "description": "Magento module responsible for media handling", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryApi/composer.json b/app/code/Magento/MediaGalleryApi/composer.json index d4299f8ef5e8d..4589ae750d5c4 100644 --- a/app/code/Magento/MediaGalleryApi/composer.json +++ b/app/code/Magento/MediaGalleryApi/composer.json @@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-api", "description": "Magento module responsible for media gallery asset attributes storage and management", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "101.0.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCatalog/composer.json b/app/code/Magento/MediaGalleryCatalog/composer.json index ce438f66fda19..e681c5903b381 100644 --- a/app/code/Magento/MediaGalleryCatalog/composer.json +++ b/app/code/Magento/MediaGalleryCatalog/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-catalog", "description": "Magento module responsible for catalog gallery processor delete operation handling", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/composer.json b/app/code/Magento/MediaGalleryCatalogIntegration/composer.json index 477312fd0e4fb..d538419f75eb9 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/composer.json +++ b/app/code/Magento/MediaGalleryCatalogIntegration/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-catalog-integration", "description": "Magento module responsible for extending catalog image uploader functionality", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-gallery-ui-api": "*" - }, - "suggest": { - "magento/module-catalog": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-gallery-ui-api": "100.4.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCatalogUi/composer.json b/app/code/Magento/MediaGalleryCatalogUi/composer.json index 296de50df5189..274c1d75d41d4 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/composer.json +++ b/app/code/Magento/MediaGalleryCatalogUi/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-media-gallery-catalog-ui", "description": "Magento module that implement category grid for media gallery.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-ui": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryCmsUi/composer.json b/app/code/Magento/MediaGalleryCmsUi/composer.json index 01e65b4212322..c0cfa93ed7ca7 100644 --- a/app/code/Magento/MediaGalleryCmsUi/composer.json +++ b/app/code/Magento/MediaGalleryCmsUi/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-media-gallery-cms-ui", "description": "Cms related UI elements in the magento media gallery", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-cms": "*", - "magento/module-backend": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-backend": "102.0.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryIntegration/composer.json b/app/code/Magento/MediaGalleryIntegration/composer.json index a29b109174369..ba07883b9722d 100644 --- a/app/code/Magento/MediaGalleryIntegration/composer.json +++ b/app/code/Magento/MediaGalleryIntegration/composer.json @@ -1,26 +1,24 @@ { "name": "magento/module-media-gallery-integration", "description": "Magento module responsible for integration of enhanced media gallery", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-ui": "*" - }, - "require-dev": { - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-catalog": "*", - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-ui": "101.2.*" + }, + "suggest": { + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -28,5 +26,9 @@ "psr-4": { "Magento\\MediaGalleryIntegration\\": "" } + }, + "require-dev": { + "magento/module-cms": "*" } } + diff --git a/app/code/Magento/MediaGalleryMetadata/composer.json b/app/code/Magento/MediaGalleryMetadata/composer.json index 88a54ffadab49..85ecdf94814ff 100644 --- a/app/code/Magento/MediaGalleryMetadata/composer.json +++ b/app/code/Magento/MediaGalleryMetadata/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-metadata", "description": "Magento module responsible for images metadata processing", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-metadata-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryMetadataApi/composer.json b/app/code/Magento/MediaGalleryMetadataApi/composer.json index ea8ec2763678b..7bb9be743cba1 100644 --- a/app/code/Magento/MediaGalleryMetadataApi/composer.json +++ b/app/code/Magento/MediaGalleryMetadataApi/composer.json @@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-metadata-api", "description": "Magento module responsible for media gallery metadata implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryRenditions/composer.json b/app/code/Magento/MediaGalleryRenditions/composer.json index e18f3ae6e78c3..88128b9b3ccaf 100644 --- a/app/code/Magento/MediaGalleryRenditions/composer.json +++ b/app/code/Magento/MediaGalleryRenditions/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-media-gallery-renditions", "description": "Magento module that implements height and width fields for for media gallery items.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-renditions-api": "*", - "magento/module-media-gallery-api": "*", - "magento/framework-message-queue": "*", - "magento/module-cms": "*" - }, - "suggest": { - "magento/module-media-content-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-renditions-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/module-cms": "104.0.*" + }, + "suggest": { + "magento/module-media-content-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryRenditionsApi/composer.json b/app/code/Magento/MediaGalleryRenditionsApi/composer.json index 589247e91f269..9e9f2f8f8408f 100644 --- a/app/code/Magento/MediaGalleryRenditionsApi/composer.json +++ b/app/code/Magento/MediaGalleryRenditionsApi/composer.json @@ -1,15 +1,16 @@ { "name": "magento/module-media-gallery-renditions-api", "description": "Magento module that is responsible for the API implementation of Media Gallery Renditions.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, "autoload": { "files": [ "registration.php" @@ -19,3 +20,4 @@ } } } + diff --git a/app/code/Magento/MediaGallerySynchronization/composer.json b/app/code/Magento/MediaGallerySynchronization/composer.json index 0a7b05a9f4fca..a7c1abeedeba3 100644 --- a/app/code/Magento/MediaGallerySynchronization/composer.json +++ b/app/code/Magento/MediaGallerySynchronization/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization", "description": "Magento module provides implementation of the media gallery data synchronization.", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/framework-message-queue": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/framework-message-queue": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGallerySynchronizationApi/composer.json b/app/code/Magento/MediaGallerySynchronizationApi/composer.json index e7b388d7f407d..39e1851e9155b 100644 --- a/app/code/Magento/MediaGallerySynchronizationApi/composer.json +++ b/app/code/Magento/MediaGallerySynchronizationApi/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-media-gallery-synchronization-api", "description": "Magento module responsible for the media gallery synchronization implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json b/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json index 38088910e6a78..df46bf6b541ef 100644 --- a/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json +++ b/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-synchronization-metadata", "description": "Magento module responsible for images metadata synchronization", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryUi/composer.json b/app/code/Magento/MediaGalleryUi/composer.json index c95c16cfc8ad2..55749c092a95d 100644 --- a/app/code/Magento/MediaGalleryUi/composer.json +++ b/app/code/Magento/MediaGalleryUi/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-media-gallery-ui", "description": "Magento module responsible for the media gallery UI implementation", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/module-store": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-api": "*", - "magento/module-cms": "*", - "magento/module-directory": "*", - "magento/module-authorization": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-media-gallery-ui-api": "100.4.*", + "magento/module-media-gallery-api": "101.0.*", + "magento/module-media-gallery-metadata-api": "100.4.*", + "magento/module-media-gallery-synchronization-api": "100.4.*", + "magento/module-media-content-api": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-directory": "100.4.*", + "magento/module-authorization": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/MediaGalleryUiApi/composer.json b/app/code/Magento/MediaGalleryUiApi/composer.json index b1078e8e3a4f7..7f483fadd6040 100644 --- a/app/code/Magento/MediaGalleryUiApi/composer.json +++ b/app/code/Magento/MediaGalleryUiApi/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-media-gallery-ui-api", "description": "Magento module responsible for the media gallery UI implementation API", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*" - }, - "suggest": { - "magento/module-cms": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*" + }, + "suggest": { + "magento/module-cms": "104.0.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json index 1654e1645e7ba..0647a13fdf62e 100644 --- a/app/code/Magento/MediaStorage/composer.json +++ b/app/code/Magento/MediaStorage/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-media-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-theme": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-theme": "101.1.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/MessageQueue/composer.json b/app/code/Magento/MessageQueue/composer.json index 2038e14ad32ed..39040100a7c4c 100644 --- a/app/code/Magento/MessageQueue/composer.json +++ b/app/code/Magento/MessageQueue/composer.json @@ -1,20 +1,21 @@ { "name": "magento/module-message-queue", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "magento/magento-composer-installer": "*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 926b35621be3d..c8f375da51fd2 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-msrp", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*" }, "suggest": { - "magento/module-bundle": "*", - "magento/module-msrp-sample-data": "*" + "magento/module-bundle": "101.0.*", + "magento/module-msrp-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/MsrpConfigurableProduct/composer.json b/app/code/Magento/MsrpConfigurableProduct/composer.json index 067a89c0be42a..08b8189548fa2 100644 --- a/app/code/Magento/MsrpConfigurableProduct/composer.json +++ b/app/code/Magento/MsrpConfigurableProduct/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-msrp-configurable-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-configurable-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-msrp": "100.4.*", + "magento/module-configurable-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/MsrpGroupedProduct/composer.json b/app/code/Magento/MsrpGroupedProduct/composer.json index 0ea4a60098282..0459ed15e5842 100644 --- a/app/code/Magento/MsrpGroupedProduct/composer.json +++ b/app/code/Magento/MsrpGroupedProduct/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-msrp-grouped-product", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-msrp": "*", - "magento/module-grouped-product": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-msrp": "100.4.*", + "magento/module-grouped-product": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index e796d7fd01b11..06e5850aabc45 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -1,28 +1,29 @@ { "name": "magento/module-multishipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-captcha": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-captcha": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } + diff --git a/app/code/Magento/MysqlMq/composer.json b/app/code/Magento/MysqlMq/composer.json index 8b62c6daf183c..3ddcef61c7ba0 100644 --- a/app/code/Magento/MysqlMq/composer.json +++ b/app/code/Magento/MysqlMq/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-mysql-mq", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { - "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework": "103.0.*", + "magento/framework-message-queue": "100.4.*", "magento/magento-composer-installer": "*", - "magento/module-store": "*", + "magento/module-store": "101.1.*", "php": "~7.4.0||~8.1.0" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json index b566a7117dc48..50514928a9cac 100644 --- a/app/code/Magento/NewRelicReporting/composer.json +++ b/app/code/Magento/NewRelicReporting/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-new-relic-reporting", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 9c3e3627e4cea..e9e865a60c370 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-newsletter", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-email": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-widget": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-email": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-widget": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/NewsletterGraphQl/composer.json b/app/code/Magento/NewsletterGraphQl/composer.json index 03fa7650257fb..2deffb6b9275f 100644 --- a/app/code/Magento/NewsletterGraphQl/composer.json +++ b/app/code/Magento/NewsletterGraphQl/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-newsletter-graph-ql", "description": "Provides GraphQl functionality for the newsletter subscriptions.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, - "type": "magento2-module", + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-customer": "*", - "magento/module-newsletter": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-customer": "103.0.*", + "magento/module-newsletter": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index cdd383aee71e5..74f2c5183fdac 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-offline-payments", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-payment": "*", - "magento/module-quote": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index e58f678e47770..9960906313e99 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -1,31 +1,32 @@ { "name": "magento/module-offline-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-checkout": "*", - "magento/module-offline-shipping-sample-data": "*" + "magento/module-checkout": "100.4.*", + "magento/module-offline-shipping-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } + diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index eef0e5edd3824..b56923d3d7a0c 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-page-cache", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-config": "*", - "magento/module-store": "*", - "magento/module-catalog": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index 8caad77d9b36b..30ee1d51ed63e 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-payment", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/PaymentGraphQl/composer.json b/app/code/Magento/PaymentGraphQl/composer.json index 8332d7dee0a4a..fc1d50dceb9f2 100644 --- a/app/code/Magento/PaymentGraphQl/composer.json +++ b/app/code/Magento/PaymentGraphQl/composer.json @@ -2,19 +2,20 @@ "name": "magento/module-payment-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.0", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-payment": "*", - "magento/module-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-graph-ql": "100.4.*" }, "suggest": { - "magento/module-store-graph-ql": "*" + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index b157a63fefeb2..c86532581f869 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -1,39 +1,40 @@ { "name": "magento/module-paypal", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.0.5", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-instant-purchase": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-vault": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-instant-purchase": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-vault": "101.2.*" }, "suggest": { - "magento/module-checkout-agreements": "*" + "magento/module-checkout-agreements": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -43,3 +44,4 @@ } } } + diff --git a/app/code/Magento/PaypalCaptcha/composer.json b/app/code/Magento/PaypalCaptcha/composer.json index 3f1f5bad59c3b..c45d080001343 100644 --- a/app/code/Magento/PaypalCaptcha/composer.json +++ b/app/code/Magento/PaypalCaptcha/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-paypal-captcha", "description": "Provides CAPTCHA validation for PayPal Payflow Pro", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-paypal": "*" + "magento/module-paypal": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/PaypalGraphQl/composer.json b/app/code/Magento/PaypalGraphQl/composer.json index ea8a43c64257d..11a3bbc6c39a2 100644 --- a/app/code/Magento/PaypalGraphQl/composer.json +++ b/app/code/Magento/PaypalGraphQl/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-paypal-graph-ql", "description": "GraphQl support for Paypal", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-paypal": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-payment": "*", - "magento/module-store": "*", - "magento/module-vault": "*" + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-paypal": "101.0.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-vault": "101.2.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-store-graph-ql": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-store-graph-ql": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index 3e4b24c38b92b..b2965378d3b1e 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-persistent", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-cron": "*", - "magento/module-customer": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-cron": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index 8533a0e37443e..60471458186a3 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-product-alert", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json index b6c7a51914295..78d378c1f193c 100644 --- a/app/code/Magento/ProductVideo/composer.json +++ b/app/code/Magento/ProductVideo/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-product-video", "description": "Add Video to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-customer": "*", - "magento/module-config": "*", - "magento/module-theme": "*" + "magento/module-customer": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json index 922f3d36fa918..03eb9f8638df6 100644 --- a/app/code/Magento/Quote/composer.json +++ b/app/code/Magento/Quote/composer.json @@ -1,35 +1,36 @@ { "name": "magento/module-quote", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-sales": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*" }, "suggest": { - "magento/module-webapi": "*" + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } + diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json index 038553b4d487e..e8803403c6bcb 100644 --- a/app/code/Magento/QuoteAnalytics/composer.json +++ b/app/code/Magento/QuoteAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-quote-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.4", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/QuoteBundleOptions/composer.json b/app/code/Magento/QuoteBundleOptions/composer.json index 79ad425b2d359..8709dc6815c56 100644 --- a/app/code/Magento/QuoteBundleOptions/composer.json +++ b/app/code/Magento/QuoteBundleOptions/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-quote-bundle-options", "description": "Magento module provides data provider for creating buy request for bundle products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/QuoteConfigurableOptions/composer.json b/app/code/Magento/QuoteConfigurableOptions/composer.json index 2da064db42965..140142767f03b 100644 --- a/app/code/Magento/QuoteConfigurableOptions/composer.json +++ b/app/code/Magento/QuoteConfigurableOptions/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-quote-configurable-options", "description": "Magento module provides data provider for creating buy request for configurable products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/QuoteDownloadableLinks/composer.json b/app/code/Magento/QuoteDownloadableLinks/composer.json index 2b4dcc3331b8e..d1f9ce29b81f0 100644 --- a/app/code/Magento/QuoteDownloadableLinks/composer.json +++ b/app/code/Magento/QuoteDownloadableLinks/composer.json @@ -1,16 +1,17 @@ { "name": "magento/module-quote-downloadable-links", "description": "Magento module provides data provider for creating buy request for links of downloadable products", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -20,3 +21,4 @@ } } } + diff --git a/app/code/Magento/QuoteGraphQl/composer.json b/app/code/Magento/QuoteGraphQl/composer.json index 4f885fa33a7b0..63a54bdaafec8 100644 --- a/app/code/Magento/QuoteGraphQl/composer.json +++ b/app/code/Magento/QuoteGraphQl/composer.json @@ -2,30 +2,31 @@ "name": "magento/module-quote-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-checkout": "*", - "magento/module-catalog": "*", - "magento/module-store": "*", - "magento/module-customer": "*", - "magento/module-customer-graph-ql": "*", - "magento/module-sales": "*", - "magento/module-directory": "*", - "magento/module-graph-ql": "*", - "magento/module-gift-message": "*", - "magento/module-catalog-inventory": "*" + "magento/framework": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-customer": "103.0.*", + "magento/module-customer-graph-ql": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-gift-message": "100.4.*", + "magento/module-catalog-inventory": "100.4.*" }, "suggest": { - "magento/module-graph-ql-cache": "*", - "magento/module-catalog-inventory-graph-ql": "*", - "magento/module-payment-graph-ql": "*" + "magento/module-graph-ql-cache": "100.4.*", + "magento/module-catalog-inventory-graph-ql": "100.4.*", + "magento/module-payment-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } + diff --git a/app/code/Magento/RelatedProductGraphQl/composer.json b/app/code/Magento/RelatedProductGraphQl/composer.json index 25bb6dc47722d..d06f681afc5ca 100644 --- a/app/code/Magento/RelatedProductGraphQl/composer.json +++ b/app/code/Magento/RelatedProductGraphQl/composer.json @@ -2,19 +2,20 @@ "name": "magento/module-related-product-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*", - "magento/framework": "*" + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -24,3 +25,4 @@ } } } + diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json index 039ea30e339be..6d8fdc57ff4eb 100644 --- a/app/code/Magento/ReleaseNotification/composer.json +++ b/app/code/Magento/ReleaseNotification/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-release-notification", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/module-user": "*", - "magento/module-backend": "*", - "magento/module-ui": "*", - "magento/framework": "*" - }, - "suggest": { - "magento/module-config": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/module-user": "101.2.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "magento/framework": "103.0.*" + }, + "suggest": { + "magento/module-config": "101.2.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/RemoteStorage/composer.json b/app/code/Magento/RemoteStorage/composer.json index ff2301d53ea60..80e27aeebf030 100644 --- a/app/code/Magento/RemoteStorage/composer.json +++ b/app/code/Magento/RemoteStorage/composer.json @@ -1,31 +1,32 @@ { "name": "magento/module-remote-storage", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "league/flysystem": "~2.4.3", "league/flysystem-aws-s3-v3": "^2.4.3" }, "suggest": { - "magento/module-backend": "*", - "magento/module-sitemap": "*", - "magento/module-cms": "*", - "magento/module-downloadable": "*", - "magento/module-catalog": "*", - "magento/module-media-storage": "*", - "magento/module-media-gallery-metadata": "*", - "magento/module-media-gallery-synchronization": "*", - "magento/module-import-export": "*", - "magento/module-catalog-import-export": "*", - "magento/module-downloadable-import-export": "*", + "magento/module-backend": "102.0.*", + "magento/module-sitemap": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-media-gallery-metadata": "100.4.*", + "magento/module-media-gallery-synchronization": "100.4.*", + "magento/module-import-export": "101.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-downloadable-import-export": "100.4.*", "predis/predis": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -35,3 +36,4 @@ } } } + diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index e758e3a739f91..5d9bf6b0b75ff 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -1,35 +1,36 @@ { "name": "magento/module-reports", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-downloadable": "*", - "magento/module-eav": "*", - "magento/module-quote": "*", - "magento/module-review": "*", - "magento/module-sales": "*", - "magento/module-sales-rule": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-directory": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-review": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } + diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index 746b09474ec03..ebf2d0c8892c1 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-require-js", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index b79ec24b633f3..408f49e51983d 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-review", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-newsletter": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-newsletter": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-cookie": "*", - "magento/module-review-sample-data": "*" + "magento/module-cookie": "100.4.*", + "magento/module-review-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json index 6694a8e8400cb..f4cd79b269fba 100644 --- a/app/code/Magento/ReviewAnalytics/composer.json +++ b/app/code/Magento/ReviewAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-review-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-review": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-review": "100.4.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/ReviewGraphQl/composer.json b/app/code/Magento/ReviewGraphQl/composer.json index ac1c11df1b8dc..1989614e17064 100644 --- a/app/code/Magento/ReviewGraphQl/composer.json +++ b/app/code/Magento/ReviewGraphQl/composer.json @@ -2,21 +2,22 @@ "name": "magento/module-review-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/module-catalog": "*", - "magento/module-review": "*", - "magento/module-store": "*", - "magento/framework": "*" + "magento/module-catalog": "104.0.*", + "magento/module-review": "100.4.*", + "magento/module-store": "101.1.*", + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*" + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json index d11d4568bf7d5..4d179f60e6ef3 100644 --- a/app/code/Magento/Robots/composer.json +++ b/app/code/Magento/Robots/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-robots", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-theme": "*" + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index 0b89505e7e618..401e256f75c7c 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-rss", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-customer": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index a1b60b7e57eeb..21d8d1f038bcf 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-eav": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index 710d5c07d0490..50fdeabdb1b33 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -1,45 +1,46 @@ { "name": "magento/module-sales", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "103.0.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-bundle": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-gift-message": "*", - "magento/module-media-storage": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales-rule": "*", - "magento/module-sales-sequence": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*" }, "suggest": { - "magento/module-sales-sample-data": "*" + "magento/module-sales-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -49,3 +50,4 @@ } } } + diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json index 6be5b39e3df33..4dde5a8139405 100644 --- a/app/code/Magento/SalesAnalytics/composer.json +++ b/app/code/Magento/SalesAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-sales-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.2", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/SalesGraphQl/composer.json b/app/code/Magento/SalesGraphQl/composer.json index dfa29321b033e..563e3b5430a06 100644 --- a/app/code/Magento/SalesGraphQl/composer.json +++ b/app/code/Magento/SalesGraphQl/composer.json @@ -2,21 +2,22 @@ "name": "magento/module-sales-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-catalog": "*", - "magento/module-tax": "*", - "magento/module-quote": "*", - "magento/module-graph-ql": "*", - "magento/module-shipping": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-catalog": "104.0.*", + "magento/module-tax": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-shipping": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json index e5c5e90f8dfb2..d4909a79c60f4 100644 --- a/app/code/Magento/SalesInventory/composer.json +++ b/app/code/Magento/SalesInventory/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-sales-inventory", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-sales": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index fef739ce979a7..d3e80e9e85910 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -1,42 +1,43 @@ { "name": "magento/module-sales-rule", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/framework-bulk": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-rule": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-rule": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*", - "magento/module-captcha": "*", - "magento/module-checkout": "*", - "magento/module-authorization": "*", - "magento/module-asynchronous-operations": "*" + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-rule": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "magento/module-captcha": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*" }, "suggest": { - "magento/module-sales-rule-sample-data": "*" + "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -46,3 +47,4 @@ } } } + diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json index d06655b83bfc2..739ae67c8bbd3 100644 --- a/app/code/Magento/SalesSequence/composer.json +++ b/app/code/Magento/SalesSequence/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-sales-sequence", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json index 05826fd71fc13..94cbfd14957da 100644 --- a/app/code/Magento/SampleData/composer.json +++ b/app/code/Magento/SampleData/composer.json @@ -1,21 +1,22 @@ { "name": "magento/module-sample-data", "description": "Sample Data fixtures", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/sample-data-media": "*" + "magento/sample-data-media": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "cli_commands.php", @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json index 4b9241f8303d7..b3f6c74bd39ea 100644 --- a/app/code/Magento/Search/composer.json +++ b/app/code/Magento/Search/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-search", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-search": "*", - "magento/module-reports": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-search": "102.0.*", + "magento/module-reports": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json index 07fd6655f678e..a482d1dfade46 100644 --- a/app/code/Magento/Security/composer.json +++ b/app/code/Magento/Security/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-security", "description": "Security management module", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-backend": "102.0.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-customer": "*" + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json index 47623f8f683a1..64540b0fd2212 100644 --- a/app/code/Magento/SendFriend/composer.json +++ b/app/code/Magento/SendFriend/composer.json @@ -1,24 +1,25 @@ { "name": "magento/module-send-friend", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-customer": "*", - "magento/module-store": "*", - "magento/module-captcha": "*", - "magento/module-authorization": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-captcha": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -28,3 +29,4 @@ } } } + diff --git a/app/code/Magento/SendFriendGraphQl/composer.json b/app/code/Magento/SendFriendGraphQl/composer.json index e836197fd42e1..c41cfbe183601 100644 --- a/app/code/Magento/SendFriendGraphQl/composer.json +++ b/app/code/Magento/SendFriendGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-send-friend-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-send-friend": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-send-friend": "100.4.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index 8afbe9553094f..55ea11e030b2f 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -1,37 +1,38 @@ { "name": "magento/module-shipping", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", "ext-gd": "*", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-contact": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-contact": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-fedex": "*", - "magento/module-ups": "*", - "magento/module-config": "*" + "magento/module-fedex": "100.4.*", + "magento/module-ups": "100.4.*", + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } + diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index be9826186e128..3dea4bdd961d8 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -1,30 +1,31 @@ { "name": "magento/module-sitemap", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-robots": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-robots": "101.1.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -34,3 +35,4 @@ } } } + diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 6dd17c590490e..41268e97508c5 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-store", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-media-storage": "*", - "magento/module-ui": "*", - "magento/module-customer": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/StoreGraphQl/composer.json b/app/code/Magento/StoreGraphQl/composer.json index d5cb8d1ff4176..e29fc85137289 100644 --- a/app/code/Magento/StoreGraphQl/composer.json +++ b/app/code/Magento/StoreGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-store-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-graph-ql": "100.4.*", + "magento/module-graph-ql-cache": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json index 0a7b1c401886c..4a9ed664a2f98 100644 --- a/app/code/Magento/Swagger/composer.json +++ b/app/code/Magento/Swagger/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-swagger", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/SwaggerWebapi/composer.json b/app/code/Magento/SwaggerWebapi/composer.json index dd1dc5d0011af..7b67e848f7045 100644 --- a/app/code/Magento/SwaggerWebapi/composer.json +++ b/app/code/Magento/SwaggerWebapi/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-swagger-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "103.0.*", + "magento/module-swagger": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/SwaggerWebapiAsync/composer.json b/app/code/Magento/SwaggerWebapiAsync/composer.json index e69821cc1067a..144a08cc35958 100644 --- a/app/code/Magento/SwaggerWebapiAsync/composer.json +++ b/app/code/Magento/SwaggerWebapiAsync/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-swagger-webapi-async", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swagger": "*" + "magento/framework": "103.0.*", + "magento/module-swagger": "100.4.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json index d2f9201e8be5e..fa3b5ef1aec3e 100644 --- a/app/code/Magento/Swatches/composer.json +++ b/app/code/Magento/Swatches/composer.json @@ -1,32 +1,33 @@ { "name": "magento/module-swatches", "description": "Add Swatches to Products", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-config": "*", - "magento/module-configurable-product": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, "suggest": { - "magento/module-layered-navigation": "*", - "magento/module-swatches-sample-data": "*" + "magento/module-layered-navigation": "100.4.*", + "magento/module-swatches-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -36,3 +37,4 @@ } } } + diff --git a/app/code/Magento/SwatchesGraphQl/composer.json b/app/code/Magento/SwatchesGraphQl/composer.json index 1dc7a1528ad1b..15dd0cb85abe9 100644 --- a/app/code/Magento/SwatchesGraphQl/composer.json +++ b/app/code/Magento/SwatchesGraphQl/composer.json @@ -2,20 +2,21 @@ "name": "magento/module-swatches-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-swatches": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*" + "magento/framework": "103.0.*", + "magento/module-swatches": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" }, "suggest": { - "magento/module-configurable-product-graph-ql": "*" + "magento/module-configurable-product-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/SwatchesLayeredNavigation/composer.json b/app/code/Magento/SwatchesLayeredNavigation/composer.json index 9af558ec757e4..120287d6a37fd 100644 --- a/app/code/Magento/SwatchesLayeredNavigation/composer.json +++ b/app/code/Magento/SwatchesLayeredNavigation/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-swatches-layered-navigation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", + "magento/framework": "103.0.*", "magento/magento-composer-installer": "*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index e5628b04cc3f9..09caf11c3e310 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -1,35 +1,36 @@ { "name": "magento/module-tax", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-reports": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-tax-sample-data": "*" + "magento/module-tax-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -39,3 +40,4 @@ } } } + diff --git a/app/code/Magento/TaxGraphQl/composer.json b/app/code/Magento/TaxGraphQl/composer.json index 3ebd323fbfe12..71174a3f91698 100644 --- a/app/code/Magento/TaxGraphQl/composer.json +++ b/app/code/Magento/TaxGraphQl/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-tax-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.1", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-tax": "*", - "magento/module-catalog-graph-ql": "*" + "magento/module-tax": "100.4.*", + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index b83fe6dcdacf1..e1f81eb8fe508 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -1,23 +1,24 @@ { "name": "magento/module-tax-import-export", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-directory": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-directory": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -27,3 +28,4 @@ } } } + diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index 80fe77d9c123f..c0d08788ba5b2 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -1,33 +1,34 @@ { "name": "magento/module-theme", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.1.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-cms": "*", - "magento/module-config": "*", - "magento/module-customer": "*", - "magento/module-eav": "*", - "magento/module-media-storage": "*", - "magento/module-require-js": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-widget": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*" }, "suggest": { - "magento/module-theme-sample-data": "*", - "magento/module-deploy": "*", - "magento/module-directory": "*" + "magento/module-theme-sample-data": "Sample Data version: 100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } + diff --git a/app/code/Magento/ThemeGraphQl/composer.json b/app/code/Magento/ThemeGraphQl/composer.json index dbb9afddd7df0..723fd8cb5c497 100644 --- a/app/code/Magento/ThemeGraphQl/composer.json +++ b/app/code/Magento/ThemeGraphQl/composer.json @@ -2,17 +2,18 @@ "name": "magento/module-theme-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, "suggest": { - "magento/module-store-graph-ql": "*" + "magento/module-store-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index 28f6a54cc301f..04edc01769524 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-translation", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-developer": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-deploy": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-developer": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-deploy": "100.4.*" }, "suggest": { - "magento/module-deploy": "*" + "magento/module-deploy": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 8d6650101b5b2..0d84575933179 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-ui", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-eav": "*", - "magento/module-store": "*", - "magento/module-user": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index e34416ef0c05f..62fa545c8764c 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -1,28 +1,29 @@ { "name": "magento/module-ups", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog-inventory": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-config": "*" + "magento/module-config": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -32,3 +33,4 @@ } } } + diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 84f06e17b6465..e10edbc542107 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-url-rewrite", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "102.0.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-cms": "*", - "magento/module-cms-url-rewrite": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/UrlRewriteGraphQl/composer.json b/app/code/Magento/UrlRewriteGraphQl/composer.json index 3e943ecf3e749..9cd0c7e97de75 100644 --- a/app/code/Magento/UrlRewriteGraphQl/composer.json +++ b/app/code/Magento/UrlRewriteGraphQl/composer.json @@ -2,18 +2,19 @@ "name": "magento/module-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-url-rewrite": "*" + "magento/framework": "103.0.*", + "magento/module-url-rewrite": "102.0.*" }, "suggest": { - "magento/module-graph-ql": "*" + "magento/module-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index 0008abc75e5be..58f743d445c7b 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-user", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-email": "*", - "magento/module-integration": "*", - "magento/module-security": "*", - "magento/module-store": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-email": "101.1.*", + "magento/module-integration": "100.4.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index 8471b83a41246..325763bac1df7 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -1,27 +1,28 @@ { "name": "magento/module-usps", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", "lib-libxml": "*", - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-config": "*", - "magento/module-directory": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -31,3 +32,4 @@ } } } + diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json index a65fefb589422..6dddcc0478259 100644 --- a/app/code/Magento/Variable/composer.json +++ b/app/code/Magento/Variable/composer.json @@ -1,22 +1,23 @@ { "name": "magento/module-variable", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-store": "*", - "magento/module-config": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-store": "101.1.*", + "magento/module-config": "101.2.*", + "magento/module-ui": "101.2.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -26,3 +27,4 @@ } } } + diff --git a/app/code/Magento/Vault/composer.json b/app/code/Magento/Vault/composer.json index e285571634993..feb1a84aa5d6c 100644 --- a/app/code/Magento/Vault/composer.json +++ b/app/code/Magento/Vault/composer.json @@ -1,25 +1,25 @@ { "name": "magento/module-vault", - "description": "", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-payment": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-theme": "*" + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +29,4 @@ } } } + diff --git a/app/code/Magento/VaultGraphQl/composer.json b/app/code/Magento/VaultGraphQl/composer.json index e4a5dd65fa76d..ef87a3c52af74 100644 --- a/app/code/Magento/VaultGraphQl/composer.json +++ b/app/code/Magento/VaultGraphQl/composer.json @@ -2,16 +2,17 @@ "name": "magento/module-vault-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-vault": "*", - "magento/module-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.1", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-vault": "101.2.*", + "magento/module-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json index dc9ac096f7215..7b5b70d1d5862 100644 --- a/app/code/Magento/Version/composer.json +++ b/app/code/Magento/Version/composer.json @@ -1,18 +1,19 @@ { "name": "magento/module-version", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -22,3 +23,4 @@ } } } + diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index 6a4823d2b1d15..b8f55026f9f84 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -1,26 +1,27 @@ { "name": "magento/module-webapi", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.4", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-authorization": "*", - "magento/module-backend": "*", - "magento/module-integration": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-integration": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-user": "*", - "magento/module-customer": "*" + "magento/module-user": "101.2.*", + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -30,3 +31,4 @@ } } } + diff --git a/app/code/Magento/WebapiAsync/composer.json b/app/code/Magento/WebapiAsync/composer.json index 7627a890f8303..612ce4620b9d4 100644 --- a/app/code/Magento/WebapiAsync/composer.json +++ b/app/code/Magento/WebapiAsync/composer.json @@ -1,25 +1,26 @@ { "name": "magento/module-webapi-async", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.3", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-webapi": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-store": "*" + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-store": "101.1.*" }, "suggest": { - "magento/module-user": "*", - "magento/module-customer": "*" + "magento/module-user": "101.2.*", + "magento/module-customer": "103.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -29,3 +30,4 @@ } } } + diff --git a/app/code/Magento/WebapiSecurity/composer.json b/app/code/Magento/WebapiSecurity/composer.json index bb4d8c10be48c..fb103bb1d2556 100644 --- a/app/code/Magento/WebapiSecurity/composer.json +++ b/app/code/Magento/WebapiSecurity/composer.json @@ -1,19 +1,20 @@ { "name": "magento/module-webapi-security", "description": "WebapiSecurity module provides option to loosen security on some webapi resources.", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-webapi": "*" + "magento/framework": "103.0.*", + "magento/module-webapi": "100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -23,3 +24,4 @@ } } } + diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 3086929d12c0a..8dd5f8e469215 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -1,33 +1,34 @@ { "name": "magento/module-weee", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-directory": "*", - "magento/module-eav": "*", - "magento/module-page-cache": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-bundle": "*" + "magento/module-bundle": "101.0.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -37,3 +38,4 @@ } } } + diff --git a/app/code/Magento/WeeeGraphQl/composer.json b/app/code/Magento/WeeeGraphQl/composer.json index 1cda2e3bc753b..67fe583b15bdc 100644 --- a/app/code/Magento/WeeeGraphQl/composer.json +++ b/app/code/Magento/WeeeGraphQl/composer.json @@ -2,20 +2,21 @@ "name": "magento/module-weee-graph-ql", "description": "N/A", "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "version": "100.4.2", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-store": "*", - "magento/module-tax": "*", - "magento/module-weee": "*" + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-weee": "100.4.*" }, "suggest": { - "magento/module-catalog-graph-ql": "*" + "magento/module-catalog-graph-ql": "100.4.*" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index 5538cc70bff45..538d5e7c0a895 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -1,29 +1,30 @@ { "name": "magento/module-widget", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-cms": "*", - "magento/module-email": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-variable": "*", - "magento/module-ui": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-variable": "100.4.*", + "magento/module-ui": "101.2.*" }, "suggest": { - "magento/module-widget-sample-data": "*" + "magento/module-widget-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -33,3 +34,4 @@ } } } + diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index 4a9ce797c9add..81fd73615f8e5 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -1,37 +1,38 @@ { "name": "magento/module-wishlist", "description": "N/A", + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "101.2.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-checkout": "*", - "magento/module-customer": "*", - "magento/module-rss": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "magento/module-theme": "*", - "magento/module-ui": "*", - "magento/module-captcha": "*" + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-rss": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-captcha": "100.4.*" }, "suggest": { - "magento/module-configurable-product": "*", - "magento/module-downloadable": "*", - "magento/module-bundle": "*", - "magento/module-cookie": "*", - "magento/module-grouped-product": "*", - "magento/module-wishlist-sample-data": "*" + "magento/module-configurable-product": "100.4.*", + "magento/module-downloadable": "100.4.*", + "magento/module-bundle": "101.0.*", + "magento/module-cookie": "100.4.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-wishlist-sample-data": "Sample Data version: 100.4.*" }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" @@ -41,3 +42,4 @@ } } } + diff --git a/app/code/Magento/WishlistAnalytics/composer.json b/app/code/Magento/WishlistAnalytics/composer.json index 0a313416ce474..7df3f9556c9bc 100644 --- a/app/code/Magento/WishlistAnalytics/composer.json +++ b/app/code/Magento/WishlistAnalytics/composer.json @@ -1,17 +1,18 @@ { "name": "magento/module-wishlist-analytics", "description": "N/A", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-wishlist": "*", - "magento/module-analytics": "*" - }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.3", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-wishlist": "101.2.*", + "magento/module-analytics": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -21,3 +22,4 @@ } } } + diff --git a/app/code/Magento/WishlistGraphQl/composer.json b/app/code/Magento/WishlistGraphQl/composer.json index ee08ec077c917..afff7c9efe3c1 100755 --- a/app/code/Magento/WishlistGraphQl/composer.json +++ b/app/code/Magento/WishlistGraphQl/composer.json @@ -2,20 +2,21 @@ "name": "magento/module-wishlist-graph-ql", "description": "N/A", "type": "magento2-module", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/module-wishlist": "*", - "magento/module-store": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-catalog": "*", - "magento/module-catalog-graph-ql": "*" - }, "license": [ "OSL-3.0", "AFL-3.0" ], + "version": "100.4.5", + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "103.0.*", + "magento/module-wishlist": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-quote-graph-ql": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-graph-ql": "100.4.*" + }, "autoload": { "files": [ "registration.php" @@ -25,3 +26,4 @@ } } } + diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index 450d82475e488..d381c41d95942 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -1,21 +1,23 @@ { "name": "magento/theme-adminhtml-backend", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index 741f700dfc1e2..1fd5fc17b5df7 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -1,21 +1,23 @@ { "name": "magento/theme-frontend-blank", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json index 34f1ef911a84c..192a0dd65432e 100644 --- a/app/design/frontend/Magento/luma/composer.json +++ b/app/design/frontend/Magento/luma/composer.json @@ -1,22 +1,24 @@ { "name": "magento/theme-frontend-luma", "description": "N/A", + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "config": { "sort-packages": true }, + "version": "100.4.5", "require": { "php": "~7.4.0||~8.1.0", - "magento/framework": "*", - "magento/theme-frontend-blank": "*" + "magento/framework": "103.0.*", + "magento/theme-frontend-blank": "100.4.*" }, - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/de_DE/composer.json b/app/i18n/Magento/de_DE/composer.json index 5a488a3e32c2b..fd23d037ba459 100644 --- a/app/i18n/Magento/de_DE/composer.json +++ b/app/i18n/Magento/de_DE/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/en_US/composer.json b/app/i18n/Magento/en_US/composer.json index 1108c70de28a6..194854d58bbe2 100644 --- a/app/i18n/Magento/en_US/composer.json +++ b/app/i18n/Magento/en_US/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-en_us", "description": "English (United States) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/es_ES/composer.json b/app/i18n/Magento/es_ES/composer.json index 5bc3cb5730adf..0b49475587d54 100644 --- a/app/i18n/Magento/es_ES/composer.json +++ b/app/i18n/Magento/es_ES/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/fr_FR/composer.json b/app/i18n/Magento/fr_FR/composer.json index 50c541308673b..ada414e6a7a32 100644 --- a/app/i18n/Magento/fr_FR/composer.json +++ b/app/i18n/Magento/fr_FR/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/nl_NL/composer.json b/app/i18n/Magento/nl_NL/composer.json index a182e179d4103..a881eed112ea0 100644 --- a/app/i18n/Magento/nl_NL/composer.json +++ b/app/i18n/Magento/nl_NL/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/pt_BR/composer.json b/app/i18n/Magento/pt_BR/composer.json index 46734cc09b363..6e10bc16f6a79 100644 --- a/app/i18n/Magento/pt_BR/composer.json +++ b/app/i18n/Magento/pt_BR/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/app/i18n/Magento/zh_Hans_CN/composer.json b/app/i18n/Magento/zh_Hans_CN/composer.json index ce214ce649f56..8491eced1389f 100644 --- a/app/i18n/Magento/zh_Hans_CN/composer.json +++ b/app/i18n/Magento/zh_Hans_CN/composer.json @@ -1,6 +1,7 @@ { "name": "magento/language-zh_hans_cn", "description": "Chinese (China) language", + "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -8,13 +9,14 @@ "config": { "sort-packages": true }, + "version": "100.4.0", "require": { - "magento/framework": "*" + "magento/framework": "103.0.*" }, - "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } + diff --git a/lib/internal/Magento/Framework/Amqp/composer.json b/lib/internal/Magento/Framework/Amqp/composer.json index 701f2df167065..038d0ff3bd8f8 100644 --- a/lib/internal/Magento/Framework/Amqp/composer.json +++ b/lib/internal/Magento/Framework/Amqp/composer.json @@ -1,25 +1,27 @@ { "name": "magento/framework-amqp", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "100.4.3", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0", "php-amqplib/php-amqplib": "~3.2.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\Amqp\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\Amqp\\": "" + } } } + diff --git a/lib/internal/Magento/Framework/Bulk/composer.json b/lib/internal/Magento/Framework/Bulk/composer.json index 7733ce9fea4c6..0e601aac8ade9 100644 --- a/lib/internal/Magento/Framework/Bulk/composer.json +++ b/lib/internal/Magento/Framework/Bulk/composer.json @@ -1,24 +1,26 @@ { "name": "magento/framework-bulk", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "101.0.1", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\Bulk\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\Bulk\\": "" + } } } + diff --git a/lib/internal/Magento/Framework/MessageQueue/composer.json b/lib/internal/Magento/Framework/MessageQueue/composer.json index 9039e5a8775b2..abf3e389ce969 100644 --- a/lib/internal/Magento/Framework/MessageQueue/composer.json +++ b/lib/internal/Magento/Framework/MessageQueue/composer.json @@ -1,24 +1,26 @@ { "name": "magento/framework-message-queue", "description": "N/A", - "config": { - "sort-packages": true - }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], + "config": { + "sort-packages": true + }, + "version": "100.4.5", "require": { - "magento/framework": "*", + "magento/framework": "103.0.*", "php": "~7.4.0||~8.1.0" }, "autoload": { - "psr-4": { - "Magento\\Framework\\MessageQueue\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\MessageQueue\\": "" + } } } + diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 2134b9a8463f8..986fcf01b5b85 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -9,6 +9,7 @@ "config": { "sort-packages": true }, + "version": "103.0.5", "require": { "php": "~7.4.0||~8.1.0", "ext-bcmath": "*", @@ -56,11 +57,12 @@ "ext-imagick": "Use Image Magick >=3.0.0 as an optional alternative image processing library" }, "autoload": { - "psr-4": { - "Magento\\Framework\\": "" - }, "files": [ "registration.php" - ] + ], + "psr-4": { + "Magento\\Framework\\": "" + } } } + From 1df4565907d40f14ee1c753cc2de2ce567bfa8d7 Mon Sep 17 00:00:00 2001 From: magento packaging service Date: Mon, 1 Aug 2022 14:58:27 +0000 Subject: [PATCH 053/985] Updating root composer files for publication service for 2.4.5 --- composer.json | 534 +++++++++++++++++++++++++------------------------- 1 file changed, 268 insertions(+), 266 deletions(-) diff --git a/composer.json b/composer.json index 1e6ef148e77a1..85a3eef7bb7a2 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "preferred-install": "dist", "sort-packages": true }, + "version": "2.4.5", "require": { "php": "~7.4.0||~8.1.0", "ext-bcmath": "*", @@ -80,6 +81,30 @@ "webonyx/graphql-php": "~14.11.6", "wikimedia/less.php": "^3.0.0" }, + "suggest": { + "ext-pcntl": "Need for run processes in parallel mode" + }, + "autoload": { + "exclude-from-classmap": [ + "**/dev/**", + "**/update/**", + "**/Test/**" + ], + "files": [ + "app/etc/NonComposerComponentRegistration.php" + ], + "psr-0": { + "": [ + "app/code/", + "generated/code/" + ] + }, + "psr-4": { + "Magento\\": "app/code/Magento/", + "Magento\\Framework\\": "lib/internal/Magento/Framework/", + "Magento\\Setup\\": "setup/src/Magento/Setup/" + } + }, "require-dev": { "allure-framework/allure-phpunit": "~1.5.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", @@ -95,294 +120,271 @@ "squizlabs/php_codesniffer": "~3.6.0", "symfony/finder": "^5.2" }, - "suggest": { - "ext-pcntl": "Need for run processes in parallel mode" + "conflict": { + "gene/bluefoot": "*" }, "replace": { - "magento/module-marketplace": "*", - "magento/module-admin-adobe-ims": "*", - "magento/module-admin-analytics": "*", - "magento/module-admin-notification": "*", - "magento/module-adobe-ims": "*", - "magento/module-adobe-ims-api": "*", - "magento/module-advanced-pricing-import-export": "*", - "magento/module-amqp": "*", - "magento/module-analytics": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-authorization": "*", - "magento/module-advanced-search": "*", - "magento/module-backend": "*", - "magento/module-backup": "*", - "magento/module-bundle": "*", - "magento/module-bundle-graph-ql": "*", - "magento/module-bundle-import-export": "*", - "magento/module-cache-invalidate": "*", - "magento/module-captcha": "*", - "magento/module-cardinal-commerce": "*", - "magento/module-catalog": "*", - "magento/module-catalog-customer-graph-ql": "*", - "magento/module-catalog-analytics": "*", - "magento/module-catalog-import-export": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-inventory-graph-ql": "*", - "magento/module-catalog-rule": "*", - "magento/module-catalog-rule-graph-ql": "*", - "magento/module-catalog-rule-configurable": "*", - "magento/module-catalog-search": "*", - "magento/module-catalog-url-rewrite": "*", - "magento/module-catalog-widget": "*", - "magento/module-checkout": "*", - "magento/module-checkout-agreements": "*", - "magento/module-checkout-agreements-graph-ql": "*", - "magento/module-cms": "*", - "magento/module-cms-url-rewrite": "*", - "magento/module-compare-list-graph-ql": "*", - "magento/module-config": "*", - "magento/module-configurable-import-export": "*", - "magento/module-configurable-product": "*", - "magento/module-configurable-product-sales": "*", - "magento/module-contact": "*", - "magento/module-cookie": "*", - "magento/module-cron": "*", - "magento/module-currency-symbol": "*", - "magento/module-customer": "*", - "magento/module-customer-analytics": "*", - "magento/module-customer-downloadable-graph-ql": "*", - "magento/module-customer-import-export": "*", - "magento/module-deploy": "*", - "magento/module-developer": "*", - "magento/module-dhl": "*", - "magento/module-directory": "*", - "magento/module-directory-graph-ql": "*", - "magento/module-downloadable": "*", - "magento/module-downloadable-graph-ql": "*", - "magento/module-downloadable-import-export": "*", - "magento/module-eav": "*", - "magento/module-elasticsearch": "*", - "magento/module-elasticsearch-6": "*", - "magento/module-elasticsearch-7": "*", - "magento/module-email": "*", - "magento/module-encryption-key": "*", - "magento/module-fedex": "*", - "magento/module-gift-message": "*", - "magento/module-gift-message-graph-ql": "*", - "magento/module-google-adwords": "*", - "magento/module-google-analytics": "*", - "magento/module-google-optimizer": "*", - "magento/module-google-gtag": "*", - "magento/module-graph-ql": "*", - "magento/module-graph-ql-cache": "*", - "magento/module-catalog-graph-ql": "*", - "magento/module-catalog-cms-graph-ql": "*", - "magento/module-catalog-url-rewrite-graph-ql": "*", - "magento/module-configurable-product-graph-ql": "*", - "magento/module-customer-graph-ql": "*", - "magento/module-eav-graph-ql": "*", - "magento/module-swatches-graph-ql": "*", - "magento/module-tax-graph-ql": "*", - "magento/module-url-rewrite-graph-ql": "*", - "magento/module-cms-url-rewrite-graph-ql": "*", - "magento/module-weee-graph-ql": "*", - "magento/module-cms-graph-ql": "*", - "magento/module-grouped-import-export": "*", - "magento/module-grouped-product": "*", - "magento/module-grouped-catalog-inventory": "*", - "magento/module-grouped-product-graph-ql": "*", - "magento/module-import-export": "*", - "magento/module-indexer": "*", - "magento/module-instant-purchase": "*", - "magento/module-integration": "*", - "magento/module-layered-navigation": "*", - "magento/module-login-as-customer": "*", - "magento/module-login-as-customer-admin-ui": "*", - "magento/module-login-as-customer-api": "*", - "magento/module-login-as-customer-assistance": "*", - "magento/module-login-as-customer-frontend-ui": "*", - "magento/module-login-as-customer-graph-ql": "*", - "magento/module-login-as-customer-log": "*", - "magento/module-login-as-customer-quote": "*", - "magento/module-login-as-customer-page-cache": "*", - "magento/module-login-as-customer-sales": "*", - "magento/module-media-content": "*", - "magento/module-media-content-api": "*", - "magento/module-media-content-catalog": "*", - "magento/module-media-content-cms": "*", - "magento/module-media-gallery": "*", - "magento/module-media-gallery-api": "*", - "magento/module-media-gallery-ui": "*", - "magento/module-media-gallery-ui-api": "*", - "magento/module-media-gallery-integration": "*", - "magento/module-media-gallery-synchronization": "*", - "magento/module-media-gallery-synchronization-api": "*", - "magento/module-media-content-synchronization": "*", - "magento/module-media-content-synchronization-api": "*", - "magento/module-media-content-synchronization-catalog": "*", - "magento/module-media-content-synchronization-cms": "*", - "magento/module-media-gallery-synchronization-metadata": "*", - "magento/module-media-gallery-metadata": "*", - "magento/module-media-gallery-metadata-api": "*", - "magento/module-media-gallery-catalog-ui": "*", - "magento/module-media-gallery-cms-ui": "*", - "magento/module-media-gallery-catalog-integration": "*", - "magento/module-media-gallery-catalog": "*", - "magento/module-media-gallery-renditions": "*", - "magento/module-media-gallery-renditions-api": "*", - "magento/module-media-storage": "*", - "magento/module-message-queue": "*", - "magento/module-msrp": "*", - "magento/module-msrp-configurable-product": "*", - "magento/module-msrp-grouped-product": "*", - "magento/module-multishipping": "*", - "magento/module-mysql-mq": "*", - "magento/module-new-relic-reporting": "*", - "magento/module-newsletter": "*", - "magento/module-newsletter-graph-ql": "*", - "magento/module-offline-payments": "*", - "magento/module-offline-shipping": "*", - "magento/module-page-cache": "*", - "magento/module-payment": "*", - "magento/module-payment-graph-ql": "*", - "magento/module-paypal": "*", - "magento/module-paypal-captcha": "*", - "magento/module-paypal-graph-ql": "*", - "magento/module-persistent": "*", - "magento/module-product-alert": "*", - "magento/module-product-video": "*", - "magento/module-quote": "*", - "magento/module-quote-analytics": "*", - "magento/module-quote-bundle-options": "*", - "magento/module-quote-configurable-options": "*", - "magento/module-quote-downloadable-links": "*", - "magento/module-quote-graph-ql": "*", - "magento/module-related-product-graph-ql": "*", - "magento/module-release-notification": "*", - "magento/module-reports": "*", - "magento/module-require-js": "*", - "magento/module-review": "*", - "magento/module-review-graph-ql": "*", - "magento/module-review-analytics": "*", - "magento/module-robots": "*", - "magento/module-rss": "*", - "magento/module-rule": "*", - "magento/module-sales": "*", - "magento/module-sales-analytics": "*", - "magento/module-sales-graph-ql": "*", - "magento/module-sales-inventory": "*", - "magento/module-sales-rule": "*", - "magento/module-sales-sequence": "*", - "magento/module-sample-data": "*", - "magento/module-search": "*", - "magento/module-security": "*", - "magento/module-send-friend": "*", - "magento/module-send-friend-graph-ql": "*", - "magento/module-shipping": "*", - "magento/module-sitemap": "*", - "magento/module-store": "*", - "magento/module-store-graph-ql": "*", - "magento/module-swagger": "*", - "magento/module-swagger-webapi": "*", - "magento/module-swagger-webapi-async": "*", - "magento/module-swatches": "*", - "magento/module-swatches-layered-navigation": "*", - "magento/module-tax": "*", - "magento/module-tax-import-export": "*", - "magento/module-theme": "*", - "magento/module-theme-graph-ql": "*", - "magento/module-translation": "*", - "magento/module-ui": "*", - "magento/module-ups": "*", - "magento/module-url-rewrite": "*", - "magento/module-user": "*", - "magento/module-usps": "*", - "magento/module-variable": "*", - "magento/module-vault": "*", - "magento/module-vault-graph-ql": "*", - "magento/module-version": "*", - "magento/module-webapi": "*", - "magento/module-webapi-async": "*", - "magento/module-webapi-security": "*", - "magento/module-weee": "*", - "magento/module-widget": "*", - "magento/module-wishlist": "*", - "magento/module-wishlist-graph-ql": "*", - "magento/module-wishlist-analytics": "*", - "magento/theme-adminhtml-backend": "*", - "magento/theme-frontend-blank": "*", - "magento/theme-frontend-luma": "*", - "magento/language-de_de": "*", - "magento/language-en_us": "*", - "magento/language-es_es": "*", - "magento/language-fr_fr": "*", - "magento/language-nl_nl": "*", - "magento/language-pt_br": "*", - "magento/language-zh_hans_cn": "*", - "magento/framework": "*", - "magento/framework-amqp": "*", - "magento/framework-bulk": "*", - "magento/framework-message-queue": "*", + "magento/module-marketplace": "100.4.3", + "magento/module-admin-adobe-ims": "100.4.0", + "magento/module-admin-analytics": "100.4.4", + "magento/module-admin-notification": "100.4.4", + "magento/module-adobe-ims": "2.1.4", + "magento/module-adobe-ims-api": "2.1.2", + "magento/module-advanced-pricing-import-export": "100.4.5", + "magento/module-amqp": "100.4.2", + "magento/module-analytics": "100.4.5", + "magento/module-asynchronous-operations": "100.4.5", + "magento/module-authorization": "100.4.5", + "magento/module-advanced-search": "100.4.3", + "magento/module-backend": "102.0.5", + "magento/module-backup": "100.4.5", + "magento/module-bundle": "101.0.5", + "magento/module-bundle-graph-ql": "100.4.5", + "magento/module-bundle-import-export": "100.4.4", + "magento/module-cache-invalidate": "100.4.3", + "magento/module-captcha": "100.4.5", + "magento/module-cardinal-commerce": "100.4.3", + "magento/module-catalog": "104.0.5", + "magento/module-catalog-customer-graph-ql": "100.4.4", + "magento/module-catalog-analytics": "100.4.2", + "magento/module-catalog-import-export": "101.1.5", + "magento/module-catalog-inventory": "100.4.5", + "magento/module-catalog-inventory-graph-ql": "100.4.2", + "magento/module-catalog-rule": "101.2.5", + "magento/module-catalog-rule-graph-ql": "100.4.2", + "magento/module-catalog-rule-configurable": "100.4.4", + "magento/module-catalog-search": "102.0.5", + "magento/module-catalog-url-rewrite": "100.4.5", + "magento/module-catalog-widget": "100.4.5", + "magento/module-checkout": "100.4.5", + "magento/module-checkout-agreements": "100.4.4", + "magento/module-checkout-agreements-graph-ql": "100.4.1", + "magento/module-cms": "104.0.5", + "magento/module-cms-url-rewrite": "100.4.4", + "magento/module-compare-list-graph-ql": "100.4.1", + "magento/module-config": "101.2.5", + "magento/module-configurable-import-export": "100.4.3", + "magento/module-configurable-product": "100.4.5", + "magento/module-configurable-product-sales": "100.4.2", + "magento/module-contact": "100.4.4", + "magento/module-cookie": "100.4.5", + "magento/module-cron": "100.4.5", + "magento/module-currency-symbol": "100.4.3", + "magento/module-customer": "103.0.5", + "magento/module-customer-analytics": "100.4.2", + "magento/module-customer-downloadable-graph-ql": "100.4.1", + "magento/module-customer-import-export": "100.4.5", + "magento/module-deploy": "100.4.5", + "magento/module-developer": "100.4.5", + "magento/module-dhl": "100.4.4", + "magento/module-directory": "100.4.5", + "magento/module-directory-graph-ql": "100.4.3", + "magento/module-downloadable": "100.4.5", + "magento/module-downloadable-graph-ql": "100.4.5", + "magento/module-downloadable-import-export": "100.4.4", + "magento/module-eav": "102.1.5", + "magento/module-elasticsearch": "101.0.5", + "magento/module-elasticsearch-6": "100.4.5", + "magento/module-elasticsearch-7": "100.4.5", + "magento/module-email": "101.1.5", + "magento/module-encryption-key": "100.4.3", + "magento/module-fedex": "100.4.3", + "magento/module-gift-message": "100.4.4", + "magento/module-gift-message-graph-ql": "100.4.3", + "magento/module-google-adwords": "100.4.2", + "magento/module-google-analytics": "100.4.1", + "magento/module-google-optimizer": "100.4.4", + "magento/module-google-gtag": "100.4.0", + "magento/module-graph-ql": "100.4.5", + "magento/module-graph-ql-cache": "100.4.2", + "magento/module-catalog-graph-ql": "100.4.5", + "magento/module-catalog-cms-graph-ql": "100.4.1", + "magento/module-catalog-url-rewrite-graph-ql": "100.4.3", + "magento/module-configurable-product-graph-ql": "100.4.5", + "magento/module-customer-graph-ql": "100.4.5", + "magento/module-eav-graph-ql": "100.4.2", + "magento/module-swatches-graph-ql": "100.4.3", + "magento/module-tax-graph-ql": "100.4.1", + "magento/module-url-rewrite-graph-ql": "100.4.4", + "magento/module-cms-url-rewrite-graph-ql": "100.4.3", + "magento/module-weee-graph-ql": "100.4.2", + "magento/module-cms-graph-ql": "100.4.2", + "magento/module-grouped-import-export": "100.4.3", + "magento/module-grouped-product": "100.4.5", + "magento/module-grouped-catalog-inventory": "100.4.2", + "magento/module-grouped-product-graph-ql": "100.4.5", + "magento/module-import-export": "101.0.5", + "magento/module-indexer": "100.4.5", + "magento/module-instant-purchase": "100.4.4", + "magento/module-integration": "100.4.5", + "magento/module-layered-navigation": "100.4.5", + "magento/module-login-as-customer": "100.4.5", + "magento/module-login-as-customer-admin-ui": "100.4.5", + "magento/module-login-as-customer-api": "100.4.4", + "magento/module-login-as-customer-assistance": "100.4.4", + "magento/module-login-as-customer-frontend-ui": "100.4.4", + "magento/module-login-as-customer-graph-ql": "100.4.2", + "magento/module-login-as-customer-log": "100.4.3", + "magento/module-login-as-customer-quote": "100.4.3", + "magento/module-login-as-customer-page-cache": "100.4.4", + "magento/module-login-as-customer-sales": "100.4.4", + "magento/module-media-content": "100.4.3", + "magento/module-media-content-api": "100.4.4", + "magento/module-media-content-catalog": "100.4.3", + "magento/module-media-content-cms": "100.4.3", + "magento/module-media-gallery": "100.4.4", + "magento/module-media-gallery-api": "101.0.4", + "magento/module-media-gallery-ui": "100.4.4", + "magento/module-media-gallery-ui-api": "100.4.3", + "magento/module-media-gallery-integration": "100.4.4", + "magento/module-media-gallery-synchronization": "100.4.4", + "magento/module-media-gallery-synchronization-api": "100.4.3", + "magento/module-media-content-synchronization": "100.4.4", + "magento/module-media-content-synchronization-api": "100.4.3", + "magento/module-media-content-synchronization-catalog": "100.4.2", + "magento/module-media-content-synchronization-cms": "100.4.2", + "magento/module-media-gallery-synchronization-metadata": "100.4.1", + "magento/module-media-gallery-metadata": "100.4.3", + "magento/module-media-gallery-metadata-api": "100.4.2", + "magento/module-media-gallery-catalog-ui": "100.4.2", + "magento/module-media-gallery-cms-ui": "100.4.2", + "magento/module-media-gallery-catalog-integration": "100.4.2", + "magento/module-media-gallery-catalog": "100.4.2", + "magento/module-media-gallery-renditions": "100.4.3", + "magento/module-media-gallery-renditions-api": "100.4.2", + "magento/module-media-storage": "100.4.4", + "magento/module-message-queue": "100.4.5", + "magento/module-msrp": "100.4.4", + "magento/module-msrp-configurable-product": "100.4.2", + "magento/module-msrp-grouped-product": "100.4.2", + "magento/module-multishipping": "100.4.5", + "magento/module-mysql-mq": "100.4.3", + "magento/module-new-relic-reporting": "100.4.3", + "magento/module-newsletter": "100.4.5", + "magento/module-newsletter-graph-ql": "100.4.2", + "magento/module-offline-payments": "100.4.3", + "magento/module-offline-shipping": "100.4.4", + "magento/module-page-cache": "100.4.5", + "magento/module-payment": "100.4.5", + "magento/module-payment-graph-ql": "100.4.0", + "magento/module-paypal": "101.0.5", + "magento/module-paypal-captcha": "100.4.2", + "magento/module-paypal-graph-ql": "100.4.3", + "magento/module-persistent": "100.4.5", + "magento/module-product-alert": "100.4.4", + "magento/module-product-video": "100.4.5", + "magento/module-quote": "101.2.5", + "magento/module-quote-analytics": "100.4.4", + "magento/module-quote-bundle-options": "100.4.1", + "magento/module-quote-configurable-options": "100.4.1", + "magento/module-quote-downloadable-links": "100.4.1", + "magento/module-quote-graph-ql": "100.4.5", + "magento/module-related-product-graph-ql": "100.4.2", + "magento/module-release-notification": "100.4.3", + "magento/module-reports": "100.4.5", + "magento/module-require-js": "100.4.1", + "magento/module-review": "100.4.5", + "magento/module-review-graph-ql": "100.4.1", + "magento/module-review-analytics": "100.4.2", + "magento/module-robots": "101.1.1", + "magento/module-rss": "100.4.3", + "magento/module-rule": "100.4.4", + "magento/module-sales": "103.0.5", + "magento/module-sales-analytics": "100.4.2", + "magento/module-sales-graph-ql": "100.4.5", + "magento/module-sales-inventory": "100.4.2", + "magento/module-sales-rule": "101.2.5", + "magento/module-sales-sequence": "100.4.2", + "magento/module-sample-data": "100.4.3", + "magento/module-search": "101.1.5", + "magento/module-security": "100.4.5", + "magento/module-send-friend": "100.4.3", + "magento/module-send-friend-graph-ql": "100.4.1", + "magento/module-shipping": "100.4.5", + "magento/module-sitemap": "100.4.4", + "magento/module-store": "101.1.5", + "magento/module-store-graph-ql": "100.4.3", + "magento/module-swagger": "100.4.4", + "magento/module-swagger-webapi": "100.4.1", + "magento/module-swagger-webapi-async": "100.4.1", + "magento/module-swatches": "100.4.5", + "magento/module-swatches-layered-navigation": "100.4.1", + "magento/module-tax": "100.4.5", + "magento/module-tax-import-export": "100.4.4", + "magento/module-theme": "101.1.5", + "magento/module-theme-graph-ql": "100.4.2", + "magento/module-translation": "100.4.5", + "magento/module-ui": "101.2.5", + "magento/module-ups": "100.4.5", + "magento/module-url-rewrite": "102.0.4", + "magento/module-user": "101.2.5", + "magento/module-usps": "100.4.4", + "magento/module-variable": "100.4.3", + "magento/module-vault": "101.2.5", + "magento/module-vault-graph-ql": "100.4.1", + "magento/module-version": "100.4.2", + "magento/module-webapi": "100.4.4", + "magento/module-webapi-async": "100.4.3", + "magento/module-webapi-security": "100.4.2", + "magento/module-weee": "100.4.5", + "magento/module-widget": "101.2.5", + "magento/module-wishlist": "101.2.5", + "magento/module-wishlist-graph-ql": "100.4.5", + "magento/module-wishlist-analytics": "100.4.3", + "magento/theme-adminhtml-backend": "100.4.5", + "magento/theme-frontend-blank": "100.4.5", + "magento/theme-frontend-luma": "100.4.5", + "magento/language-de_de": "100.4.0", + "magento/language-en_us": "100.4.0", + "magento/language-es_es": "100.4.0", + "magento/language-fr_fr": "100.4.0", + "magento/language-nl_nl": "100.4.0", + "magento/language-pt_br": "100.4.0", + "magento/language-zh_hans_cn": "100.4.0", + "magento/framework": "103.0.5", + "magento/framework-amqp": "100.4.3", + "magento/framework-bulk": "101.0.1", + "magento/framework-message-queue": "100.4.5", "trentrichardson/jquery-timepicker-addon": "1.4.3", "components/jquery": "1.11.0", "blueimp/jquery-file-upload": "5.6.14", "components/jqueryui": "1.10.4", "twbs/bootstrap": "3.1.0", "tinymce/tinymce": "3.4.7", - "magento/module-csp": "*", - "magento/module-aws-s3": "*", - "magento/module-remote-storage": "*", - "magento/module-jwt-framework-adapter": "*", - "magento/module-jwt-user-token": "*" + "magento/module-csp": "100.4.4", + "magento/module-aws-s3": "100.4.3", + "magento/module-remote-storage": "100.4.3", + "magento/module-jwt-framework-adapter": "100.4.1", + "magento/module-jwt-user-token": "100.4.0" }, - "conflict": { - "gene/bluefoot": "*" + "autoload-dev": { + "psr-4": { + "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/", + "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", + "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", + "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", + "Magento\\Tools\\": "dev/tools/Magento/Tools/", + "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/" + } }, + "prefer-stable": true, "extra": { "component_paths": { - "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", + "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", "components/jquery": [ "lib/web/jquery.js", "lib/web/jquery/jquery.min.js", "lib/web/jquery/jquery-migrate.js" ], - "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", "components/jqueryui": [ "lib/web/jquery/jquery-ui.js" ], + "tinymce/tinymce": "lib/web/tiny_mce_5", + "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", "twbs/bootstrap": [ "lib/web/jquery/jquery.tabs.js" - ], - "tinymce/tinymce": "lib/web/tiny_mce_5" - } - }, - "autoload": { - "psr-4": { - "Magento\\Framework\\": "lib/internal/Magento/Framework/", - "Magento\\Setup\\": "setup/src/Magento/Setup/", - "Magento\\": "app/code/Magento/" - }, - "psr-0": { - "": [ - "app/code/", - "generated/code/" ] - }, - "files": [ - "app/etc/NonComposerComponentRegistration.php" - ], - "exclude-from-classmap": [ - "**/dev/**", - "**/update/**", - "**/Test/**" - ] - }, - "autoload-dev": { - "psr-4": { - "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", - "Magento\\Tools\\": "dev/tools/Magento/Tools/", - "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/", - "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", - "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", - "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" } - }, - "prefer-stable": true + } } + From 60907f45dbbdf684df40c36b67591a7fa69ebd37 Mon Sep 17 00:00:00 2001 From: engcom-Charlie Date: Mon, 8 Aug 2022 18:35:53 +0530 Subject: [PATCH 054/985] FIxed static test failures --- app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index 3211d7cb24a21..d60c567073d67 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -22,7 +22,7 @@ class Edit extends \Magento\Backend\Block\Template protected $_template = 'Magento_Newsletter::queue/edit.phtml'; /** - * Core registry + * Magento Framework Core Registry * * @var \Magento\Framework\Registry */ @@ -43,6 +43,8 @@ public function __construct( } /** + * Queue Edit constructor + * * @return void */ protected function _construct() From e068a31ea122d0c63d49074fdcc5e6719fd1254d Mon Sep 17 00:00:00 2001 From: engcom-Charlie Date: Tue, 9 Aug 2022 17:49:09 +0530 Subject: [PATCH 055/985] Fixed static test failur --- app/code/Magento/Newsletter/Model/Queue.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index cb5e3c4ea8526..30c4ff598247d 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -219,6 +219,7 @@ public function setQueueStartAtByString($startAt) * @param int $count * @return $this * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ public function sendPerSubscriber($count = 20) { From 72d7d9bcf550b3db482fea34e545a50afe521fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= Date: Mon, 15 Aug 2022 13:00:49 +0200 Subject: [PATCH 056/985] Integration Tests: `setup:install` command hangs when question provided --- .../framework/Magento/TestFramework/Application.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php index 0c6c546149f7d..831f091036fc9 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Application.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php @@ -523,7 +523,7 @@ public function cleanup() * @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM */ $this->_shell->execute( - PHP_BINARY . ' -f %s setup:uninstall -vvv -n --magento-init-params=%s', + PHP_BINARY . ' -f %s setup:uninstall --no-interaction -vvv -n --magento-init-params=%s', [BP . '/bin/magento', $this->getInitParamsQuery()] ); } @@ -549,6 +549,7 @@ public function install($cleanup) $this->copyGlobalConfigFile(); $installParams = $this->getInstallCliParams(); + $installParams['--no-interaction'] = true; // performance optimization: restore DB from last good dump to make installation on top of it (much faster) // do not restore from the database if the cleanup option is set to ensure we have a clean DB to test on @@ -607,7 +608,9 @@ protected function runPostInstallCommands() $command = $postInstallSetupCommand['command']; $argumentsAndOptions = $postInstallSetupCommand['config']; - $argumentsAndOptionsPlaceholders = []; + $argumentsAndOptionsPlaceholders = [ + '--no-interaction' + ]; foreach (array_keys($argumentsAndOptions) as $key) { $isArgument = is_numeric($key); From 540c20c21955eed2bc7873cc4a8c595e52c6522d Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Thu, 1 Sep 2022 11:04:17 +0300 Subject: [PATCH 057/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../Checkout/view/frontend/web/js/model/cart/estimate-service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 71e6c39b4e319..1d40ad72b8f08 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -78,6 +78,7 @@ define([ }; quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); + quote.shippingAddress.subscribe(estimateTotalsShipping); quote.shippingMethod.subscribe(estimateTotalsShipping); quote.billingAddress.subscribe(estimateTotalsBilling); }); From 77c563b926de4045eceec821a12ae1e1e552798a Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Thu, 1 Sep 2022 18:11:52 +0300 Subject: [PATCH 058/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../view/frontend/web/js/model/cart/estimate-service.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 1d40ad72b8f08..733a8fe8159d7 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -77,8 +77,10 @@ define([ } }; - quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); + if(!quote.isVirtual()) { + quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); + quote.shippingMethod.subscribe(estimateTotalsShipping); + } quote.shippingAddress.subscribe(estimateTotalsShipping); - quote.shippingMethod.subscribe(estimateTotalsShipping); quote.billingAddress.subscribe(estimateTotalsBilling); }); From 493b6bb66aacb5acf3c7f1e5f4a962389d21561c Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 2 Sep 2022 16:13:31 +0300 Subject: [PATCH 059/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../frontend/web/js/model/cart/estimate-service.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 733a8fe8159d7..2f1c73774dc06 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -52,6 +52,9 @@ define([ shippingService.getShippingRates().subscribe(function (rates) { cartCache.set('rates', rates); }); + + // update totals based on shipping address / rates changes + totalsDefaultProvider.estimateTotals(quote.shippingAddress()); } }, @@ -77,10 +80,8 @@ define([ } }; - if(!quote.isVirtual()) { - quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); - quote.shippingMethod.subscribe(estimateTotalsShipping); - } - quote.shippingAddress.subscribe(estimateTotalsShipping); + + quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); + quote.shippingMethod.subscribe(estimateTotalsShipping); quote.billingAddress.subscribe(estimateTotalsBilling); }); From ee351df93e07e1f0ff8e9ea0f0153bd59e0620d6 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 2 Sep 2022 16:21:58 +0300 Subject: [PATCH 060/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../frontend/js/model/cart/estimate-service.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js index 3d8325a3ecd54..7a18d7f4bd7e1 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js @@ -97,8 +97,8 @@ define([ } }); expect(mocks['Magento_Checkout/js/model/shipping-service'].setShippingRates).toHaveBeenCalledWith(rates); - expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals).not - .toHaveBeenCalled(); + expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) + .not.toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates) .not.toHaveBeenCalled(); }); @@ -133,6 +133,8 @@ define([ .not.toHaveBeenCalledWith(rates); expect(mocks['Magento_Checkout/js/model/cart/cache'].set).not.toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates).toHaveBeenCalled(); + expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) + .toHaveBeenCalled(); }); it('test subscribe when shipping method was changed', function () { From 6d4cad4ef9f986ef23eeb7ec7b2834c7b25c80cb Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Tue, 6 Sep 2022 18:38:40 +0300 Subject: [PATCH 061/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../web/js/model/cart/estimate-service.js | 2 +- .../js/model/cart/estimate-service.test.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 2f1c73774dc06..24ce802e4ed5d 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -38,7 +38,7 @@ define([ cartCache.get('rates') ) { shippingService.setShippingRates(cartCache.get('rates')); - + quote.setTotals(cartCache.get('cart-data').totals); return; } diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js index 7a18d7f4bd7e1..f2b830e0e5e2c 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js @@ -20,13 +20,21 @@ define([ var injector = new Squire(), rates = 'flatrate', + totals = { + tax: 0.1, + totals: 10 + }, + cartData = { + totals: totals, + rates: null + }, mocks = { 'Magento_Checkout/js/model/quote': { shippingAddress: ko.observable(), isVirtual: function () {}, billingAddress: ko.observable(), - shippingMethod: ko.observable() - + shippingMethod: ko.observable(), + setTotals: function () {} }, 'Magento_Checkout/js/model/shipping-rate-processor/new-address': { getRates: jasmine.createSpy() @@ -42,7 +50,7 @@ define([ }, 'Magento_Checkout/js/model/cart/cache': { isChanged: function () {}, - get: jasmine.createSpy().and.returnValue(rates), + get: jasmine.createSpy().and.returnValues(rates, cartData), set: jasmine.createSpy() }, 'Magento_Customer/js/customer-data': { @@ -90,13 +98,16 @@ define([ spyOn(mocks['Magento_Checkout/js/model/quote'], 'isVirtual').and.returnValue(false); spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'isChanged').and.returnValue(false); spyOn(mocks['Magento_Checkout/js/model/shipping-service'], 'setShippingRates'); + spyOn(mocks['Magento_Checkout/js/model/quote'], 'setTotals'); mocks['Magento_Checkout/js/model/quote'].shippingAddress({ id: 2, getType: function () { return 'address_type_test'; } }); + expect(mocks['Magento_Checkout/js/model/cart/cache'].get('cart-data')).toBe(cartData); expect(mocks['Magento_Checkout/js/model/shipping-service'].setShippingRates).toHaveBeenCalledWith(rates); + expect(mocks['Magento_Checkout/js/model/quote'].setTotals).toHaveBeenCalledWith(cartData.totals); expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) .not.toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates) From c7dd8ca8a91a2c41987d723e751afe019af1b13d Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 7 Sep 2022 12:13:59 +0300 Subject: [PATCH 062/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../web/js/model/cart/estimate-service.js | 4 ++-- .../js/model/cart/estimate-service.test.js | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 24ce802e4ed5d..c4e30a9a9c229 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -35,10 +35,10 @@ define([ // check if user data not changed -> load rates from cache if (!cartCache.isChanged('address', quote.shippingAddress()) && !cartCache.isChanged('cartVersion', customerData.get('cart')()['data_id']) && - cartCache.get('rates') + cartCache.get('rates') && cartCache.get('totals') ) { shippingService.setShippingRates(cartCache.get('rates')); - quote.setTotals(cartCache.get('cart-data').totals); + quote.setTotals(cartCache.get('totals')); return; } diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js index f2b830e0e5e2c..f33755a6090d8 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js @@ -24,10 +24,6 @@ define([ tax: 0.1, totals: 10 }, - cartData = { - totals: totals, - rates: null - }, mocks = { 'Magento_Checkout/js/model/quote': { shippingAddress: ko.observable(), @@ -50,7 +46,7 @@ define([ }, 'Magento_Checkout/js/model/cart/cache': { isChanged: function () {}, - get: jasmine.createSpy().and.returnValues(rates, cartData), + get: jasmine.createSpy().and.returnValues(rates, totals, rates, totals), set: jasmine.createSpy() }, 'Magento_Customer/js/customer-data': { @@ -105,13 +101,12 @@ define([ return 'address_type_test'; } }); - expect(mocks['Magento_Checkout/js/model/cart/cache'].get('cart-data')).toBe(cartData); expect(mocks['Magento_Checkout/js/model/shipping-service'].setShippingRates).toHaveBeenCalledWith(rates); - expect(mocks['Magento_Checkout/js/model/quote'].setTotals).toHaveBeenCalledWith(cartData.totals); + expect(mocks['Magento_Checkout/js/model/quote'].setTotals).toHaveBeenCalledWith(totals); expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) - .not.toHaveBeenCalled(); + .toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates) - .not.toHaveBeenCalled(); + .toHaveBeenCalled(); }); it('test subscribe when shipping address was changed for virtual quote', function () { @@ -125,7 +120,7 @@ define([ expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) .toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates) - .not.toHaveBeenCalled(); + .toHaveBeenCalled(); }); it('test subscribe when shipping address was changed for not virtual quote', function () { From 4c624e95fc42859bb21d6bbc91811bef89fc145f Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 9 Sep 2022 15:10:13 +0300 Subject: [PATCH 063/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../web/js/model/cart/estimate-service.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index c4e30a9a9c229..596382360d71c 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -9,8 +9,10 @@ define([ 'Magento_Checkout/js/model/cart/totals-processor/default', 'Magento_Checkout/js/model/shipping-service', 'Magento_Checkout/js/model/cart/cache', - 'Magento_Customer/js/customer-data' -], function (quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData) { + 'Magento_Customer/js/customer-data', + 'Magento_Checkout/js/checkout-data', + 'Magento_Checkout/js/action/select-shipping-method' +], function (quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData, checkoutData, selectShippingMethodAction) { 'use strict'; var rateProcessors = {}, @@ -35,8 +37,9 @@ define([ // check if user data not changed -> load rates from cache if (!cartCache.isChanged('address', quote.shippingAddress()) && !cartCache.isChanged('cartVersion', customerData.get('cart')()['data_id']) && - cartCache.get('rates') && cartCache.get('totals') + cartCache.get('rates') //&& cartCache.get('totals') ) { + shippingService.setShippingRates(cartCache.get('rates')); quote.setTotals(cartCache.get('totals')); return; @@ -53,8 +56,12 @@ define([ cartCache.set('rates', rates); }); - // update totals based on shipping address / rates changes - totalsDefaultProvider.estimateTotals(quote.shippingAddress()); + // update totals based on updated shipping address / rates changes + if (cartCache.get('address') && + (!quote.shippingMethod() || !quote.shippingMethod()['method_code']) + ) { + totalsDefaultProvider.estimateTotals(quote.shippingAddress()); + } } }, @@ -80,7 +87,9 @@ define([ } }; - + /*if (!quote.shippingMethod() && cartCache.get('rates')) { + selectShippingMethodAction(cartCache.get('rates')[0]); + }*/ quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); quote.shippingMethod.subscribe(estimateTotalsShipping); quote.billingAddress.subscribe(estimateTotalsBilling); From c3e5ec1443bcbec71dfda5d3375fbba3a80dfe54 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 9 Sep 2022 17:45:08 +0300 Subject: [PATCH 064/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../frontend/web/js/model/cart/estimate-service.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 596382360d71c..589549a02136f 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -37,9 +37,8 @@ define([ // check if user data not changed -> load rates from cache if (!cartCache.isChanged('address', quote.shippingAddress()) && !cartCache.isChanged('cartVersion', customerData.get('cart')()['data_id']) && - cartCache.get('rates') //&& cartCache.get('totals') + cartCache.get('rates') ) { - shippingService.setShippingRates(cartCache.get('rates')); quote.setTotals(cartCache.get('totals')); return; @@ -57,9 +56,8 @@ define([ }); // update totals based on updated shipping address / rates changes - if (cartCache.get('address') && - (!quote.shippingMethod() || !quote.shippingMethod()['method_code']) - ) { + if (customerData.get('cart')()['data_id'] && + (!quote.shippingMethod() || !quote.shippingMethod()['method_code'])) { totalsDefaultProvider.estimateTotals(quote.shippingAddress()); } } @@ -87,9 +85,6 @@ define([ } }; - /*if (!quote.shippingMethod() && cartCache.get('rates')) { - selectShippingMethodAction(cartCache.get('rates')[0]); - }*/ quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates); quote.shippingMethod.subscribe(estimateTotalsShipping); quote.billingAddress.subscribe(estimateTotalsBilling); From 530b97e9de14d77ebd53c62c91e49cfa5ffe4b54 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 14 Sep 2022 15:22:27 +0300 Subject: [PATCH 065/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates --- .../frontend/web/js/model/cart/estimate-service.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 589549a02136f..afcfdab465997 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -53,16 +53,26 @@ define([ // save rates to cache after load shippingService.getShippingRates().subscribe(function (rates) { cartCache.set('rates', rates); + setShippingAddress(); }); // update totals based on updated shipping address / rates changes - if (customerData.get('cart')()['data_id'] && + if (cartCache.get('shipping-address') && cartCache.get('shipping-address').countryId && + cartCache.isChanged('shipping-address', quote.shippingAddress()) && (!quote.shippingMethod() || !quote.shippingMethod()['method_code'])) { totalsDefaultProvider.estimateTotals(quote.shippingAddress()); } } }, + /** + * Cache shipping address until changed + */ + setShippingAddress = function () { + var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); + cartCache.set('shipping-address', shippingAddress); + }, + /** * Estimate totals for shipping address. */ From 9f9949becefb3e90fdb0cd8def6be0d3363c3234 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 14 Sep 2022 22:00:09 +0300 Subject: [PATCH 066/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../Checkout/frontend/js/model/cart/estimate-service.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js index f33755a6090d8..7644876b5c0cd 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js @@ -46,7 +46,7 @@ define([ }, 'Magento_Checkout/js/model/cart/cache': { isChanged: function () {}, - get: jasmine.createSpy().and.returnValues(rates, totals, rates, totals), + get: jasmine.createSpy().and.returnValues(rates, rates, totals), set: jasmine.createSpy() }, 'Magento_Customer/js/customer-data': { @@ -104,7 +104,7 @@ define([ expect(mocks['Magento_Checkout/js/model/shipping-service'].setShippingRates).toHaveBeenCalledWith(rates); expect(mocks['Magento_Checkout/js/model/quote'].setTotals).toHaveBeenCalledWith(totals); expect(mocks['Magento_Checkout/js/model/cart/totals-processor/default'].estimateTotals) - .toHaveBeenCalled(); + .not.toHaveBeenCalled(); expect(mocks['Magento_Checkout/js/model/shipping-rate-processor/new-address'].getRates) .toHaveBeenCalled(); }); From 9815bd287ad80e5e8bba9a4577a988912ec1bc1a Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 14 Sep 2022 22:11:43 +0300 Subject: [PATCH 067/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../web/js/model/cart/estimate-service.js | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index afcfdab465997..3fa2e6c8302ac 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -4,20 +4,27 @@ */ define([ + 'underscore', 'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/model/shipping-rate-processor/new-address', 'Magento_Checkout/js/model/cart/totals-processor/default', 'Magento_Checkout/js/model/shipping-service', 'Magento_Checkout/js/model/cart/cache', - 'Magento_Customer/js/customer-data', - 'Magento_Checkout/js/checkout-data', - 'Magento_Checkout/js/action/select-shipping-method' -], function (quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData, checkoutData, selectShippingMethodAction) { + 'Magento_Customer/js/customer-data' +], function (_, quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData) { 'use strict'; var rateProcessors = {}, totalsProcessors = {}, + /** + * Cache shipping address until changed + */ + setShippingAddress = function () { + var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); + cartCache.set('shipping-address', shippingAddress); + }, + /** * Estimate totals for shipping address and update shipping rates. */ @@ -65,14 +72,6 @@ define([ } }, - /** - * Cache shipping address until changed - */ - setShippingAddress = function () { - var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); - cartCache.set('shipping-address', shippingAddress); - }, - /** * Estimate totals for shipping address. */ From 5ddd4852c4636781fc72b972f0c6c34fe3c4c4fe Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Thu, 15 Sep 2022 11:07:06 +0300 Subject: [PATCH 068/985] ACP2E-1143: trigger tax / subtotal estimates refresh on shipping address updates; jasmine unit test update --- .../Checkout/view/frontend/web/js/model/cart/estimate-service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 3fa2e6c8302ac..c9a00f1488eb5 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -22,6 +22,7 @@ define([ */ setShippingAddress = function () { var shippingAddress = _.pick(quote.shippingAddress(), cartCache.requiredFields); + cartCache.set('shipping-address', shippingAddress); }, From d182a3ba56e493aa464e0a41b29a13754cb7658a Mon Sep 17 00:00:00 2001 From: Roger Date: Thu, 15 Sep 2022 17:13:53 +0000 Subject: [PATCH 069/985] add phpstan-deprecation-rules --- composer.json | 1 + composer.lock | 52 ++++++++++++++++++- .../Test/Php/_files/phpstan/phpstan.neon | 2 + 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3f1d2e0698c82..930cc7371de2a 100644 --- a/composer.json +++ b/composer.json @@ -97,6 +97,7 @@ "pdepend/pdepend": "~2.10.0", "phpmd/phpmd": "^2.12.0", "phpstan/phpstan": "^1.6.8", + "phpstan/phpstan-deprecation-rules": "^1.0", "phpunit/phpunit": "~9.5.20", "sebastian/phpcpd": "^6.0.3", "squizlabs/php_codesniffer": "~3.6.0", diff --git a/composer.lock b/composer.lock index dc1cfdf4759f5..058829a97efe1 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": "df33bcfb264888cdbde343d14a9d772b", + "content-hash": "be553e2f6c952e978867b17377f8e0f4", "packages": [ { "name": "aws/aws-crt-php", @@ -11406,6 +11406,56 @@ ], "time": "2022-06-03T14:12:23+00:00" }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0" + }, + "time": "2021-09-23T11:02:21+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.15", diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index c6cf0a2a9c188..df311a3aea1ff 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -37,6 +37,8 @@ parameters: - '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#' - '#Constant T_[A-Z_]+ not found.#' +includes: + - %rootDir%/../../../vendor/phpstan/phpstan-deprecation-rules/rules.neon services: - From bec67082ec83cef2e75dbe6492f4cc678624e43f Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" Date: Mon, 19 Sep 2022 17:59:34 +0530 Subject: [PATCH 070/985] ACQE-3803: move qty-err selector into section --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index 7be02126e3a0f..8c36a04e60f90 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,5 +26,6 @@ +
From aceb90e613d95a2765a099044b48688e7da1b738 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" Date: Tue, 20 Sep 2022 10:49:28 +0530 Subject: [PATCH 071/985] ACQE-3803: xpath added for qty-err --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index 8c36a04e60f90..93b469a95183f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,6 +26,6 @@ - +
From 60994446882da70e5dab51196e59f3533cd23bf6 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" Date: Tue, 20 Sep 2022 14:01:22 +0530 Subject: [PATCH 072/985] ACQE-3803: xpath added for qty-err --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index 93b469a95183f..932b5bdda97de 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,6 +26,6 @@ - +
From 847c7997143d3c90b26f94480a9fe202f499faf7 Mon Sep 17 00:00:00 2001 From: Tu Van Date: Thu, 22 Sep 2022 14:07:47 +0700 Subject: [PATCH 073/985] Revert changes for fixing JS errors in customer data Revert code changes for fixing errors in customer data when component is not initialized - accident removed in a previous commit --- .../view/frontend/web/js/customer-data.js | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index 213aa105ba25b..1f580cfccd0b3 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -17,7 +17,9 @@ define([ ], function ($, _, ko, sectionConfig, url) { 'use strict'; - var options = {}, + var options = { + cookieLifeTime: 86400 //1 day by default + }, storage, storageInvalidation, invalidateCacheBySessionTimeOut, @@ -30,6 +32,18 @@ define([ url.setBaseUrl(window.BASE_URL); options.sectionLoadUrl = url.build('customer/section/load'); + function initStorage() { + $.cookieStorage.setConf({ + path: '/', + expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) + }); + storage = $.initNamespaceStorage('mage-cache-storage').localStorage; + storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; + } + + // Initialize storage with default parameters to prevent JS errors while component still not initialized + initStorage(); + /** * @param {Object} invalidateOptions */ @@ -217,14 +231,7 @@ define([ /** * Storage init */ - initStorage: function () { - $.cookieStorage.setConf({ - path: '/', - expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) - }); - storage = $.initNamespaceStorage('mage-cache-storage').localStorage; - storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; - }, + initStorage: initStorage, /** * Retrieve the list of sections that has expired since last page reload. @@ -389,6 +396,10 @@ define([ */ 'Magento_Customer/js/customer-data': function (settings) { options = settings; + + // re-init storage with a new settings + customerData.initStorage(); + customerData.initStorage(); invalidateCacheBySessionTimeOut(settings); invalidateCacheByCloseCookieSession(); From 2f9de7bc923d57af76ec98f016998bc5a2770cf4 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 4 Oct 2022 15:49:19 +0100 Subject: [PATCH 074/985] Improve error messaging when merged XML is invalid --- .../Framework/Config/Reader/Filesystem.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php index b05269b33689d..bbb40549bd27d 100644 --- a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php +++ b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php @@ -161,9 +161,28 @@ protected function _readFiles($fileList) ); } } + if ($this->validationState->isValidationRequired()) { $errors = []; if ($configMerger && !$configMerger->validate($this->_schemaFile, $errors)) { + // The merged XML is invalid, but each XML document is + // individually valid. (If they had errors, we've have thrown an + // exception in the loop above.) Let's work out which document + // is causing us a problem. + $configMerger = null; + foreach ($fileList as $key => $content) { + if (!$configMerger) { + $configMerger = $this->_createConfigMerger($this->_domDocumentClass, $content); + } else { + $configMerger->merge($content); + } + + if (!$configMerger->validate($this->_schemaFile)) { + array_unshift($errors, "Error in merged XML after reading $key"); + break; + } + } + $message = "Invalid Document \n"; throw new \Magento\Framework\Exception\LocalizedException( new \Magento\Framework\Phrase($message . implode("\n", $errors)) From a8d440e7b47a7b2723abae8a09cc9c9e1904d4de Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 4 Oct 2022 16:55:19 +0100 Subject: [PATCH 075/985] Correct grammar in comment --- .../Magento/Framework/Config/Reader/Filesystem.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php index bbb40549bd27d..d4e8d05514335 100644 --- a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php +++ b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php @@ -165,10 +165,9 @@ protected function _readFiles($fileList) if ($this->validationState->isValidationRequired()) { $errors = []; if ($configMerger && !$configMerger->validate($this->_schemaFile, $errors)) { - // The merged XML is invalid, but each XML document is - // individually valid. (If they had errors, we've have thrown an - // exception in the loop above.) Let's work out which document - // is causing us a problem. + // The merged XML is invalid, but each XML document is individually valid. + // (If they had errors, we would have thrown an exception in the loop above.) + // Let's work out which document is causing us a problem. $configMerger = null; foreach ($fileList as $key => $content) { if (!$configMerger) { From 6b1eb683365d28f02bdc1555138722bfdd952dbb Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 4 Oct 2022 16:57:16 +0100 Subject: [PATCH 076/985] Correct copyright block syntax --- lib/internal/Magento/Framework/Config/Reader/Filesystem.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php index d4e8d05514335..fe4eda5276a6b 100644 --- a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php +++ b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php @@ -1,15 +1,14 @@ Date: Tue, 4 Oct 2022 17:59:24 +0100 Subject: [PATCH 077/985] Update comments to appease linter --- lib/internal/Magento/Framework/Config/Reader/Filesystem.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php index fe4eda5276a6b..061d0a825acc1 100644 --- a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php +++ b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php @@ -7,8 +7,8 @@ namespace Magento\Framework\Config\Reader; /** -* Filesystem configuration loader. Loads configuration from XML files, split by scopes -* + * Filesystem configuration loader. Loads configuration from XML files, split by scopes + * * @SuppressWarnings(PHPMD.NumberOfChildren) * @api * @since 100.0.2 @@ -139,6 +139,7 @@ public function read($scope = null) * @param array $fileList * @return array * @throws \Magento\Framework\Exception\LocalizedException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _readFiles($fileList) { From 55d5c00d82091eaf256a3c6b219a7f24c269095d Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Thu, 6 Oct 2022 16:03:09 +0300 Subject: [PATCH 078/985] ACP2E-1143: allow giftcard to be displayed when multiple shipping method enabled --- .../view/frontend/web/js/model/cart/estimate-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index c9a00f1488eb5..3c99411f79503 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -45,7 +45,7 @@ define([ // check if user data not changed -> load rates from cache if (!cartCache.isChanged('address', quote.shippingAddress()) && !cartCache.isChanged('cartVersion', customerData.get('cart')()['data_id']) && - cartCache.get('rates') + cartCache.get('rates') && !cartCache.isChanged('totals', quote.getTotals()) ) { shippingService.setShippingRates(cartCache.get('rates')); quote.setTotals(cartCache.get('totals')); From 0bff41153ab09d78aaccbed584870a43a9b2a970 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Thu, 6 Oct 2022 21:19:17 +0300 Subject: [PATCH 079/985] ACP2E-1143: fix static test --- .../frontend/js/model/cart/estimate-service.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js index 7644876b5c0cd..6e3d46e56f209 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/cart/estimate-service.test.js @@ -30,7 +30,8 @@ define([ isVirtual: function () {}, billingAddress: ko.observable(), shippingMethod: ko.observable(), - setTotals: function () {} + setTotals: function () {}, + getTotals: function () {} }, 'Magento_Checkout/js/model/shipping-rate-processor/new-address': { getRates: jasmine.createSpy() @@ -92,7 +93,8 @@ define([ it('test subscribe when shipping address wasn\'t changed for not virtual quote', function () { spyOn(mocks['Magento_Checkout/js/model/quote'], 'isVirtual').and.returnValue(false); - spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'isChanged').and.returnValue(false); + spyOn(mocks['Magento_Checkout/js/model/quote'], 'getTotals').and.returnValue(false); + spyOn(mocks['Magento_Checkout/js/model/cart/cache'], 'isChanged').and.returnValues(false, false); spyOn(mocks['Magento_Checkout/js/model/shipping-service'], 'setShippingRates'); spyOn(mocks['Magento_Checkout/js/model/quote'], 'setTotals'); mocks['Magento_Checkout/js/model/quote'].shippingAddress({ From b99355ce45de26a1ed100aba024d971fc49d1115 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 7 Oct 2022 13:14:21 +0300 Subject: [PATCH 080/985] ACP2E-1143: fix missing tax smaller (< 1 ) --- .../Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js index 6813f780776ef..830342ab9884a 100644 --- a/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js +++ b/app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js @@ -21,7 +21,7 @@ define([ * @override */ ifShowValue: function () { - if (parseInt(this.getPureValue()) === 0) { //eslint-disable-line radix + if (this.isFullMode() && this.getPureValue() == 0) { //eslint-disable-line eqeqeq return isZeroTaxDisplayed; } From 925018543b4723ce876e754dcee7fef08a7332bd Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Fri, 7 Oct 2022 13:32:12 +0300 Subject: [PATCH 081/985] ACP2E-1143: update all totals in case there are changes --- .../Checkout/view/frontend/web/js/model/cart/estimate-service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js index 3c99411f79503..fb504cc24bdcd 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/cart/estimate-service.js @@ -69,6 +69,7 @@ define([ cartCache.isChanged('shipping-address', quote.shippingAddress()) && (!quote.shippingMethod() || !quote.shippingMethod()['method_code'])) { totalsDefaultProvider.estimateTotals(quote.shippingAddress()); + cartCache.set('totals', quote.getTotals()); } } }, From d36b631f564ea0eab7256bbea6dc54c1c38844fb Mon Sep 17 00:00:00 2001 From: Richard Sisco Date: Fri, 7 Oct 2022 14:14:06 -0500 Subject: [PATCH 082/985] Update validation.js to support accessibility - Add `required-entry` class requirement when adding `aria-required` to form elements --- lib/web/mage/validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 4ed2364f810d1..41626d5a4d92d 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1936,7 +1936,7 @@ define([ this.element .find('.field.required') .find('.control') - .find('input, select, textarea') + .find('input.required-entry, select.required-entry, textarea.required-entry') .attr('aria-required', 'true'); this._listenFormValidate(); From abb9ac267fc2372c672467b6a3232cfaee20ee7a Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk Date: Mon, 10 Oct 2022 00:50:59 -0500 Subject: [PATCH 083/985] ACP2E-1215: Customer has no any vault token save, but vault payment method appears in admin checkout - fix --- .../Unit/Plugin/PaymentMethodProcessTest.php | 142 ------------------ app/code/Magento/Payment/composer.json | 3 +- app/code/Magento/Payment/etc/di.xml | 8 - .../Plugin/PaymentMethodProcess.php | 27 +--- app/code/Magento/Vault/etc/di.xml | 3 + 5 files changed, 11 insertions(+), 172 deletions(-) delete mode 100644 app/code/Magento/Payment/Test/Unit/Plugin/PaymentMethodProcessTest.php rename app/code/Magento/{Payment => Vault}/Plugin/PaymentMethodProcess.php (55%) diff --git a/app/code/Magento/Payment/Test/Unit/Plugin/PaymentMethodProcessTest.php b/app/code/Magento/Payment/Test/Unit/Plugin/PaymentMethodProcessTest.php deleted file mode 100644 index 9a08f47727bb2..0000000000000 --- a/app/code/Magento/Payment/Test/Unit/Plugin/PaymentMethodProcessTest.php +++ /dev/null @@ -1,142 +0,0 @@ -tokensConfigProviderMock = $this->getMockBuilder(TokensConfigProvider::class) - ->disableOriginalConstructor() - ->getMock(); - $objectManagerHelper = new ObjectManager($this); - $this->containerMock = $objectManagerHelper->getObject(Container::class); - - $this->plugin = $objectManagerHelper->getObject( - PaymentMethodProcess::class, - [ - 'braintreeCCVault' => self::PAYMENT_METHOD_BRAINTREE_CC_VAULT, - 'tokensConfigProvider' => $this->tokensConfigProviderMock - ] - ); - } - - /** - * @param array $methods - * @param array $expectedResult - * @param array $tokenComponents - * @dataProvider afterGetMethodsDataProvider - */ - public function testAfterGetMethods(array $methods, array $expectedResult, array $tokenComponents) - { - - $this->tokensConfigProviderMock->method('getTokensComponents') - ->with(self::PAYMENT_METHOD_BRAINTREE_CC_VAULT) - ->willReturn($tokenComponents); - - $result = $this->plugin->afterGetMethods($this->containerMock, $methods); - $this->assertEquals($result, $expectedResult); - } - - /** - * Data provider for AfterGetMethods. - * - * @return array - */ - public function afterGetMethodsDataProvider(): array - { - $tokenUiComponentInterface = $this->getMockBuilder(TokenUiComponentInterface::class) - ->disableOriginalConstructor() - ->getMock(); - - $checkmoPaymentMethod = $this - ->getMockBuilder(PaymentMethodInterface::class) - ->disableOriginalConstructor() - ->setMethods(['getCode']) - ->getMockForAbstractClass(); - $brainTreePaymentMethod = $this - ->getMockBuilder(PaymentMethodInterface::class) - ->disableOriginalConstructor() - ->setMethods(['getCode']) - ->getMockForAbstractClass(); - $brainTreeCCVaultTPaymentMethod = $this - ->getMockBuilder(PaymentMethodInterface::class) - ->disableOriginalConstructor() - ->setMethods(['getCode']) - ->getMockForAbstractClass(); - - $checkmoPaymentMethod->expects($this->any())->method('getCode') - ->willReturn(self::PAYMENT_METHOD_CHECKMO); - $brainTreePaymentMethod->expects($this->any())->method('getCode') - ->willReturn(self::PAYMENT_METHOD_BRAINTREE); - $brainTreeCCVaultTPaymentMethod->expects($this->any())->method('getCode') - ->willReturn(self::PAYMENT_METHOD_BRAINTREE_CC_VAULT); - - $paymentMethods = [ - $checkmoPaymentMethod, - $brainTreePaymentMethod, - $brainTreeCCVaultTPaymentMethod, - ]; - $expectedResult1 = [ - $checkmoPaymentMethod, - $brainTreePaymentMethod, - $brainTreeCCVaultTPaymentMethod - ]; - $expectedResult2 = [ - $checkmoPaymentMethod, - $brainTreePaymentMethod, - ]; - - return [ - [$paymentMethods, $expectedResult1, [$tokenUiComponentInterface]], - [$paymentMethods, $expectedResult2, []], - ]; - } -} diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index 2f09f9b0c237f..8caad77d9b36b 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -13,8 +13,7 @@ "magento/module-quote": "*", "magento/module-sales": "*", "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-vault": "*" + "magento/module-ui": "*" }, "type": "magento2-module", "license": [ diff --git a/app/code/Magento/Payment/etc/di.xml b/app/code/Magento/Payment/etc/di.xml index a826dedf9f02c..b7422bb00d543 100644 --- a/app/code/Magento/Payment/etc/di.xml +++ b/app/code/Magento/Payment/etc/di.xml @@ -81,12 +81,4 @@ Magento\Payment\Model\Method\VirtualLogger - - - - - - braintree_cc_vault - - diff --git a/app/code/Magento/Payment/Plugin/PaymentMethodProcess.php b/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php similarity index 55% rename from app/code/Magento/Payment/Plugin/PaymentMethodProcess.php rename to app/code/Magento/Vault/Plugin/PaymentMethodProcess.php index 7808f4cb4af6b..d8cbb563d07a8 100644 --- a/app/code/Magento/Payment/Plugin/PaymentMethodProcess.php +++ b/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php @@ -5,38 +5,26 @@ */ declare(strict_types=1); -namespace Magento\Payment\Plugin; +namespace Magento\Vault\Plugin; -use Magento\Framework\App\ObjectManager; use Magento\Payment\Block\Form\Container; use Magento\Vault\Model\Ui\Adminhtml\TokensConfigProvider; +use Magento\Vault\Model\VaultPaymentInterface; -/** - * @SuppressWarnings(PHPMD) - */ class PaymentMethodProcess { - /** - * @var string - */ - private string $braintreeCCVault; - /** * @var TokensConfigProvider */ private TokensConfigProvider $tokensConfigProvider; /** - * @param string $braintreeCCVault - * @param TokensConfigProvider|null $tokensConfigProvider + * @param TokensConfigProvider $tokensConfigProvider */ public function __construct( - string $braintreeCCVault = '', - TokensConfigProvider $tokensConfigProvider = null + TokensConfigProvider $tokensConfigProvider ) { - $this->braintreeCCVault = $braintreeCCVault; - $this->tokensConfigProvider = $tokensConfigProvider ?? - ObjectManager::getInstance()->get(TokensConfigProvider::class); + $this->tokensConfigProvider = $tokensConfigProvider; } /** @@ -51,9 +39,8 @@ public function afterGetMethods(Container $container, array $results): array { $methods = []; foreach ($results as $result) { - if ($result->getCode() === $this->braintreeCCVault - && empty($this->tokensConfigProvider->getTokensComponents($result->getCode()))) { - + if ($result instanceOf VaultPaymentInterface && + empty($this->tokensConfigProvider->getTokensComponents($result->getCode()))) { continue; } $methods[] = $result; diff --git a/app/code/Magento/Vault/etc/di.xml b/app/code/Magento/Vault/etc/di.xml index e02aa9277258c..b594ff5b96833 100644 --- a/app/code/Magento/Vault/etc/di.xml +++ b/app/code/Magento/Vault/etc/di.xml @@ -57,4 +57,7 @@ + + + From 0449ca1bd4ac7fe594469e639f99495e574be3b6 Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk Date: Mon, 10 Oct 2022 09:32:12 -0500 Subject: [PATCH 084/985] ACP2E-1215: Customer has no any vault token save, but vault payment method appears in admin checkout - static fail fix --- app/code/Magento/Vault/Plugin/PaymentMethodProcess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php b/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php index d8cbb563d07a8..1bd1bc495bb77 100644 --- a/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php +++ b/app/code/Magento/Vault/Plugin/PaymentMethodProcess.php @@ -39,7 +39,7 @@ public function afterGetMethods(Container $container, array $results): array { $methods = []; foreach ($results as $result) { - if ($result instanceOf VaultPaymentInterface && + if ($result instanceof VaultPaymentInterface && empty($this->tokensConfigProvider->getTokensComponents($result->getCode()))) { continue; } From 464f51c1cd9933b0a91ca6d316971464023379d4 Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Tue, 11 Oct 2022 21:16:14 +0300 Subject: [PATCH 085/985] ACP2E-1143: update wait time for MC-39007 for correct grand total validation --- ...ontDisableMultishippingModeCheckoutOnBackToCartTest.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml index d3bc1e13222d8..d68fca8d99b51 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml @@ -56,13 +56,16 @@ + + + - + - + From d771e5c7ebe49a9ac77ecdfe420415074fa84dea Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 12 Oct 2022 21:36:15 +0300 Subject: [PATCH 086/985] ACP2E-1143: update wait time for MC-31863 for correct grand total validation --- ...pplyToGroupedProductWithInvisibleIndividualProductTest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml index d63df5fe50a6d..3e86cdf17767d 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml @@ -106,6 +106,10 @@ + + + + From 041944151ee7471b0c24666901f6b57c33f1e626 Mon Sep 17 00:00:00 2001 From: Igor Wulff Date: Mon, 17 Oct 2022 19:53:02 +0200 Subject: [PATCH 087/985] Improve performance of getData retrieval The getData() method is called hundred of thousand of times on PLP's without block_cache. Even when everything is cached without FPC, this method can be called thousands of times. A more direct retrieval of data and avoiding extra function calls benefits performance quite a bit. The following performance gains are monitored from a local environment in production mode: Former setup PLP without block_html: TIMER: 448.403317 ms COUNT AMOUNT: 284881x New setup PLP without block_html: TIMER: 251.413533 ms COUNT AMOUNT: 284881x Former setup PLP with block_html TIMER: 31.084917 ms COUNT AMOUNT: 16310x New setup PLP with block_html: TIMER: 13.384665 ms COUNT AMOUNT: 16310x --- lib/internal/Magento/Framework/DataObject.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/DataObject.php b/lib/internal/Magento/Framework/DataObject.php index 9b529ff6042cb..d0ac9b73f08f8 100644 --- a/lib/internal/Magento/Framework/DataObject.php +++ b/lib/internal/Magento/Framework/DataObject.php @@ -128,11 +128,10 @@ public function getData($key = '', $index = null) return $this->_data; } - /* process a/b/c key as ['a']['b']['c'] */ - if ($key !== null && strpos($key, '/') !== false) { + $data = $this->_data[$key] ?? null; + if ($data === null && $key !== null && strpos($key, '/') !== false) { + /* process a/b/c key as ['a']['b']['c'] */ $data = $this->getDataByPath($key); - } else { - $data = $this->_getData($key); } if ($index !== null) { From c65892493b435d5fb9be843776c9571c5bd4c91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= Date: Mon, 17 Oct 2022 15:53:28 -0700 Subject: [PATCH 088/985] Resolve Unit Tests --- .../tests/unit/testsuite/Magento/Test/ApplicationTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index acfbadeaf2d98..74c3e3b65daf7 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -183,7 +183,7 @@ public function installDataProvider() $installShellCommandExpectation = [ PHP_BINARY . ' -f %s setup:install -vvv ' . '--db-host=%s --db-user=%s --db-password=%s --db-name=%s --db-prefix=%s ' . - '--use-secure=%s --use-secure-admin=%s --magento-init-params=%s', + '--use-secure=%s --use-secure-admin=%s --magento-init-params=%s --no-interaction', [ BP . '/bin/magento', '/tmp/mysql.sock', @@ -214,7 +214,7 @@ public function installDataProvider() $installShellCommandExpectation, [ PHP_BINARY . ' -f %s %s -vvv ' . - '--host=%s --dbname=%s --username=%s --password=%s --magento-init-params=%s', + '--host=%s --dbname=%s --username=%s --password=%s --magento-init-params=%s --no-interaction', [ BP . '/bin/magento', 'setup:db-schema:add-slave', @@ -234,7 +234,7 @@ public function installDataProvider() [ $installShellCommandExpectation, [ - PHP_BINARY . ' -f %s %s -vvv %s %s --option1=%s -option2=%s --magento-init-params=%s', + PHP_BINARY . ' -f %s %s -vvv %s %s --option1=%s -option2=%s --magento-init-params=%s --no-interaction', [ BP . '/bin/magento', 'fake:command', From d53d0f9c1ba80e5914be687c4a26735d1d807853 Mon Sep 17 00:00:00 2001 From: Stanislav Ilnytskyi Date: Wed, 26 Oct 2022 11:23:47 +0200 Subject: [PATCH 089/985] fixed table difference insert during price reindex --- .../Catalog/Model/Indexer/Product/Price/AbstractAction.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index e69ab504880ef..d6a92d560a63f 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -179,7 +179,8 @@ protected function _syncData(array $processIds = []) // for backward compatibility split data from old idx table on dimension tables foreach ($this->dimensionCollectionFactory->create() as $dimensions) { $insertSelect = $this->getConnection()->select()->from( - ['ip_tmp' => $this->_defaultIndexerResource->getIdxTable()] + ['ip_tmp' => $this->_defaultIndexerResource->getIdxTable()], + array_keys($this->getConnection()->describeTable('catalog_product_index_price')) ); foreach ($dimensions as $dimension) { From 086beb4d7b1fd744dba2cc1027bd392215a7d2a7 Mon Sep 17 00:00:00 2001 From: "Manjusha.S" Date: Thu, 27 Oct 2022 13:45:09 +0530 Subject: [PATCH 090/985] Testing Purpose --- .../AdminCategoryFormDisplaySettingsUIValidationTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml index ab0ae5721a7a7..9ec19ee97eed0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest/AdminCategoryFormDisplaySettingsUIValidationTest.xml @@ -25,8 +25,10 @@ + + From 17d564a133a5fd3c1e771d110a8ba408ed84586f Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" Date: Fri, 28 Oct 2022 13:48:23 +0530 Subject: [PATCH 091/985] AC-2596 dependency file AdminCartPriceRulesSection added one element --- .../SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml index 60bf3d63e7e54..d097bb9eb8d5f 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesSection.xml @@ -9,6 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
+ From d5c4ad9076940a82f9880d9c684e4561b8711e9f Mon Sep 17 00:00:00 2001 From: engcom-Echo Date: Wed, 2 Nov 2022 15:48:14 +0530 Subject: [PATCH 092/985] 35948: Fixed static and unit test failure --- .../tests/unit/testsuite/Magento/Test/ApplicationTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index 74c3e3b65daf7..c48c913702254 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -194,6 +194,7 @@ public function installDataProvider() '0', '0', $this->getInitParamsQuery(sys_get_temp_dir()), + true ] ]; @@ -213,8 +214,8 @@ public function installDataProvider() [ $installShellCommandExpectation, [ - PHP_BINARY . ' -f %s %s -vvv ' . - '--host=%s --dbname=%s --username=%s --password=%s --magento-init-params=%s --no-interaction', + PHP_BINARY . ' -f %s %s -vvv --no-interaction ' . + '--host=%s --dbname=%s --username=%s --password=%s --magento-init-params=%s', [ BP . '/bin/magento', 'setup:db-schema:add-slave', @@ -234,7 +235,8 @@ public function installDataProvider() [ $installShellCommandExpectation, [ - PHP_BINARY . ' -f %s %s -vvv %s %s --option1=%s -option2=%s --magento-init-params=%s --no-interaction', + PHP_BINARY . ' -f %s %s -vvv --no-interaction %s %s --option1=%s -option2=%s + --magento-init-params=%s', [ BP . '/bin/magento', 'fake:command', From ce0a9fa4afb9f0b3c4dbcfe15a62b9d1ee59c5fa Mon Sep 17 00:00:00 2001 From: engcom-Echo Date: Wed, 2 Nov 2022 17:12:59 +0530 Subject: [PATCH 093/985] 35948: Fixed static and unit test failure --- .../tests/unit/testsuite/Magento/Test/ApplicationTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index c48c913702254..6e4242ae67947 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -235,8 +235,7 @@ public function installDataProvider() [ $installShellCommandExpectation, [ - PHP_BINARY . ' -f %s %s -vvv --no-interaction %s %s --option1=%s -option2=%s - --magento-init-params=%s', + PHP_BINARY . ' -f %s %s -vvv --no-interaction %s %s --option1=%s -option2=%s --magento-init-params=%s', // phpcs:ignore [ BP . '/bin/magento', 'fake:command', From e3418360fdcee83248b2e981f579c617314d212e Mon Sep 17 00:00:00 2001 From: Alexandra Zota Date: Wed, 2 Nov 2022 18:05:41 +0200 Subject: [PATCH 094/985] ACP2E-1143: update wait time for MC-39007 for correct grand total validation --- ...efrontDisableMultishippingModeCheckoutOnBackToCartTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml index d68fca8d99b51..02ef596cda7c9 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontDisableMultishippingModeCheckoutOnBackToCartTest.xml @@ -60,12 +60,12 @@ - + - + From dce6e9d50f5db673b7feaa4e1dd7eb290f237ef4 Mon Sep 17 00:00:00 2001 From: Peter Jaap Blaakmeer Date: Thu, 3 Nov 2022 12:14:48 +0100 Subject: [PATCH 095/985] Do not use store code in URLs when site is in single store mode --- app/code/Magento/Store/Model/Store.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index 97df81ff6ab7e..b3f19954ab075 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -21,6 +21,7 @@ use Magento\Framework\Url\ScopeInterface as UrlScopeInterface; use Magento\Framework\UrlInterface; use Magento\Store\Api\Data\StoreInterface; +use Magento\Store\Model\StoreManager; /** * Store model @@ -760,6 +761,7 @@ protected function _updatePathUseStoreView($url) public function isUseStoreInUrl() { return !($this->hasDisableStoreInUrl() && $this->getDisableStoreInUrl()) + && !$this->getConfig(StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED) && $this->getConfig(self::XML_PATH_STORE_IN_URL); } From 73713cec4da69e902cd8bd34bf628f6d039a566d Mon Sep 17 00:00:00 2001 From: aplapana Date: Mon, 7 Nov 2022 10:11:32 +0200 Subject: [PATCH 096/985] ACP2E-1234, added regex to strip widgets and style tags --- ...escriptionInProductEditFormActionGroup.xml | 19 +++++++ ...oductSetEditMetaDescriptionContentTest.xml | 57 +++++++++++++++++++ .../web/js/components/import-handler.js | 2 + 3 files changed, 78 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertMetaDescriptionInProductEditFormActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditMetaDescriptionContentTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertMetaDescriptionInProductEditFormActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertMetaDescriptionInProductEditFormActionGroup.xml new file mode 100644 index 0000000000000..6db711e24aac8 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertMetaDescriptionInProductEditFormActionGroup.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditMetaDescriptionContentTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditMetaDescriptionContentTest.xml new file mode 100644 index 0000000000000..54c6ffa904bb0 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditMetaDescriptionContentTest.xml @@ -0,0 +1,57 @@ + + + + + + + + + + <description value="Admin should be able to set/edit product Content when editing a simple product"/> + <severity value="MINOR"/> + <testCaseId value="AC-6971"/> + <group value="Catalog"/> + <group value="WYSIWYGDisabled"/> + </annotations> + <before> + <!--Admin Login--> + <actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/> + <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> + </before> + <after> + <!--Admin Logout--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Create product --> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + + <!--Add content--> + <!--A generic scroll scrolls past this element, in doing this it fails to execute certain actions on the element and others below it. By scrolling slightly above it resolves this issue.--> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollTo"/> + <actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openDescriptionDropDown"/> + <actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="fillLongDescription"> + <argument name="description" value="<style>#html-body [data-pb-style=A463JYO]</style><div data-content-type='block' data-appearance='default' data-element='main' data-pb-style='B1D1SCO'>{{widget type='Magento\Cms\Block\Widget\Block' template='widget/static_block/default.phtml' block_id='1' type_name='CMS Static Block'}}</div><p>HTML description</p>"/> + </actionGroup> + <actionGroup ref="AdminFillProductNameOnProductFormActionGroup" stepKey="fillProductName"> + <argument name="productName" value="simple"/> + </actionGroup> + + <!--Checking SEO content admin--> + <actionGroup ref="AssertMetaDescriptionInProductEditFormActionGroup" stepKey="seeProductMetaDescription"> + <argument name="productMetaDescription" value="simple HTML description"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/components/import-handler.js b/app/code/Magento/Catalog/view/adminhtml/web/js/components/import-handler.js index a5870d4023a54..6f1e2e66699a8 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/components/import-handler.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/components/import-handler.js @@ -72,6 +72,8 @@ define([ }); if (nonEmptyValueFlag) { + string = string.replace(/<style.*?>.*?<\/style>/gis, ''); //Remove style tags + string = string.replace(/{{widget.*?}}/gis, ''); //Remove widgets string = string.replace(/(<([^>]+)>)/ig, ''); // Remove html tags this.value(string); } else { From 47c388a093fd5621b19eb2089877db80254a937a Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Mon, 7 Nov 2022 10:56:04 -0600 Subject: [PATCH 097/985] ACP2E-1339: Orders can be placed via Rest API as a guest user even when "Allow Guest Checkout" is turned off --- ...ckoutEnabledBeforeAssignBillingAddress.php | 68 +++++++++++++++++++ ...IsGuestCheckoutEnabledBeforePlaceOrder.php | 68 +++++++++++++++++++ ...outEnabledBeforeSavePaymentInformation.php | 68 +++++++++++++++++++ ...utEnabledBeforeSaveShippingInformation.php | 68 +++++++++++++++++++ ...tCheckoutEnabledBeforeSetPaymentMethod.php | 68 +++++++++++++++++++ .../Magento/Checkout/etc/webapi_rest/di.xml | 24 +++++++ .../Magento/Checkout/etc/webapi_soap/di.xml | 24 +++++++ 7 files changed, 388 insertions(+) create mode 100644 app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php create mode 100644 app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php create mode 100644 app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php create mode 100644 app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php create mode 100644 app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php create mode 100644 app/code/Magento/Checkout/etc/webapi_rest/di.xml create mode 100644 app/code/Magento/Checkout/etc/webapi_soap/di.xml diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php new file mode 100644 index 0000000000000..b2eba4551570a --- /dev/null +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Plugin\Api; + +use Magento\Checkout\Helper\Data as CheckoutHelper; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\GuestBillingAddressManagementInterface; +use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Model\QuoteIdMaskFactory; + +class VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress +{ + /** + * @var CheckoutHelper + */ + private CheckoutHelper $checkoutHelper; + + /** + * @var QuoteIdMaskFactory + */ + private QuoteIdMaskFactory $quoteIdMaskFactory; + + /** + * @var CartRepositoryInterface + */ + private CartRepositoryInterface $cartRepository; + + /** + * @param CheckoutHelper $checkoutHelper + * @param QuoteIdMaskFactory $quoteIdMaskFactory + * @param CartRepositoryInterface $cartRepository + */ + public function __construct( + CheckoutHelper $checkoutHelper, + QuoteIdMaskFactory $quoteIdMaskFactory, + CartRepositoryInterface $cartRepository + ) { + $this->checkoutHelper = $checkoutHelper; + $this->quoteIdMaskFactory = $quoteIdMaskFactory; + $this->cartRepository = $cartRepository; + } + + /** + * Checks whether guest checkout is enabled before assigning billing address + * + * @param GuestBillingAddressManagementInterface $subject + * @param string $cartId + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeAssign( + GuestBillingAddressManagementInterface $subject, + $cartId + ): void { + /** @var $quoteIdMask QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + $quote = $this->cartRepository->get($quoteIdMask->getQuoteId()); + if (!$this->checkoutHelper->isAllowedGuestCheckout($quote)) { + throw new CouldNotSaveException(__('Sorry, guest checkout is not available.')); + } + } +} diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php new file mode 100644 index 0000000000000..603bb7942abc8 --- /dev/null +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Plugin\Api; + +use Magento\Checkout\Helper\Data as CheckoutHelper; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\GuestCartManagementInterface; +use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Model\QuoteIdMaskFactory; + +class VerifyIsGuestCheckoutEnabledBeforePlaceOrder +{ + /** + * @var CheckoutHelper + */ + private CheckoutHelper $checkoutHelper; + + /** + * @var QuoteIdMaskFactory + */ + private QuoteIdMaskFactory $quoteIdMaskFactory; + + /** + * @var CartRepositoryInterface + */ + private CartRepositoryInterface $cartRepository; + + /** + * @param CheckoutHelper $checkoutHelper + * @param QuoteIdMaskFactory $quoteIdMaskFactory + * @param CartRepositoryInterface $cartRepository + */ + public function __construct( + CheckoutHelper $checkoutHelper, + QuoteIdMaskFactory $quoteIdMaskFactory, + CartRepositoryInterface $cartRepository + ) { + $this->checkoutHelper = $checkoutHelper; + $this->quoteIdMaskFactory = $quoteIdMaskFactory; + $this->cartRepository = $cartRepository; + } + + /** + * Checks whether guest checkout is enabled before placing order + * + * @param GuestCartManagementInterface $subject + * @param string $cartId + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforePlaceOrder( + GuestCartManagementInterface $subject, + $cartId + ): void { + /** @var $quoteIdMask QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + $quote = $this->cartRepository->get($quoteIdMask->getQuoteId()); + if (!$this->checkoutHelper->isAllowedGuestCheckout($quote)) { + throw new CouldNotSaveException(__('Sorry, guest checkout is not available.')); + } + } +} diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php new file mode 100644 index 0000000000000..854af8e967ea3 --- /dev/null +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Plugin\Api; + +use Magento\Checkout\Api\GuestPaymentInformationManagementInterface; +use Magento\Checkout\Helper\Data as CheckoutHelper; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Model\QuoteIdMaskFactory; + +class VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation +{ + /** + * @var CheckoutHelper + */ + private CheckoutHelper $checkoutHelper; + + /** + * @var QuoteIdMaskFactory + */ + private QuoteIdMaskFactory $quoteIdMaskFactory; + + /** + * @var CartRepositoryInterface + */ + private CartRepositoryInterface $cartRepository; + + /** + * @param CheckoutHelper $checkoutHelper + * @param QuoteIdMaskFactory $quoteIdMaskFactory + * @param CartRepositoryInterface $cartRepository + */ + public function __construct( + CheckoutHelper $checkoutHelper, + QuoteIdMaskFactory $quoteIdMaskFactory, + CartRepositoryInterface $cartRepository + ) { + $this->checkoutHelper = $checkoutHelper; + $this->quoteIdMaskFactory = $quoteIdMaskFactory; + $this->cartRepository = $cartRepository; + } + + /** + * Checks whether guest checkout is enabled before saving payment information + * + * @param GuestPaymentInformationManagementInterface $subject + * @param string $cartId + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeSavePaymentInformation( + GuestPaymentInformationManagementInterface $subject, + $cartId + ): void { + /** @var $quoteIdMask QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + $quote = $this->cartRepository->get($quoteIdMask->getQuoteId()); + if (!$this->checkoutHelper->isAllowedGuestCheckout($quote)) { + throw new CouldNotSaveException(__('Sorry, guest checkout is not available.')); + } + } +} diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php new file mode 100644 index 0000000000000..a51a1f60b12c6 --- /dev/null +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Plugin\Api; + +use Magento\Checkout\Api\GuestShippingInformationManagementInterface; +use Magento\Checkout\Helper\Data as CheckoutHelper; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Model\QuoteIdMaskFactory; + +class VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation +{ + /** + * @var CheckoutHelper + */ + private CheckoutHelper $checkoutHelper; + + /** + * @var QuoteIdMaskFactory + */ + private QuoteIdMaskFactory $quoteIdMaskFactory; + + /** + * @var CartRepositoryInterface + */ + private CartRepositoryInterface $cartRepository; + + /** + * @param CheckoutHelper $checkoutHelper + * @param QuoteIdMaskFactory $quoteIdMaskFactory + * @param CartRepositoryInterface $cartRepository + */ + public function __construct( + CheckoutHelper $checkoutHelper, + QuoteIdMaskFactory $quoteIdMaskFactory, + CartRepositoryInterface $cartRepository + ) { + $this->checkoutHelper = $checkoutHelper; + $this->quoteIdMaskFactory = $quoteIdMaskFactory; + $this->cartRepository = $cartRepository; + } + + /** + * Checks whether guest checkout is enabled before saving shipping information + * + * @param GuestShippingInformationManagementInterface $subject + * @param string $cartId + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeSaveAddressInformation( + GuestShippingInformationManagementInterface $subject, + $cartId + ): void { + /** @var $quoteIdMask QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + $quote = $this->cartRepository->get($quoteIdMask->getQuoteId()); + if (!$this->checkoutHelper->isAllowedGuestCheckout($quote)) { + throw new CouldNotSaveException(__('Sorry, guest checkout is not available.')); + } + } +} diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php new file mode 100644 index 0000000000000..a37331f380f97 --- /dev/null +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php @@ -0,0 +1,68 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Checkout\Plugin\Api; + +use Magento\Checkout\Helper\Data as CheckoutHelper; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\GuestPaymentMethodManagementInterface; +use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Model\QuoteIdMaskFactory; + +class VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod +{ + /** + * @var CheckoutHelper + */ + private CheckoutHelper $checkoutHelper; + + /** + * @var QuoteIdMaskFactory + */ + private QuoteIdMaskFactory $quoteIdMaskFactory; + + /** + * @var CartRepositoryInterface + */ + private CartRepositoryInterface $cartRepository; + + /** + * @param CheckoutHelper $checkoutHelper + * @param QuoteIdMaskFactory $quoteIdMaskFactory + * @param CartRepositoryInterface $cartRepository + */ + public function __construct( + CheckoutHelper $checkoutHelper, + QuoteIdMaskFactory $quoteIdMaskFactory, + CartRepositoryInterface $cartRepository + ) { + $this->checkoutHelper = $checkoutHelper; + $this->quoteIdMaskFactory = $quoteIdMaskFactory; + $this->cartRepository = $cartRepository; + } + + /** + * Checks whether guest checkout is enabled before setting payment method + * + * @param GuestPaymentMethodManagementInterface $subject + * @param string $cartId + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeSet( + GuestPaymentMethodManagementInterface $subject, + $cartId + ): void { + /** @var $quoteIdMask QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + $quote = $this->cartRepository->get($quoteIdMask->getQuoteId()); + if (!$this->checkoutHelper->isAllowedGuestCheckout($quote)) { + throw new CouldNotSaveException(__('Sorry, guest checkout is not available.')); + } + } +} diff --git a/app/code/Magento/Checkout/etc/webapi_rest/di.xml b/app/code/Magento/Checkout/etc/webapi_rest/di.xml new file mode 100644 index 0000000000000..2f426d96b4ebc --- /dev/null +++ b/app/code/Magento/Checkout/etc/webapi_rest/di.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Checkout\Api\GuestPaymentInformationManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation"/> + </type> + <type name="Magento\Checkout\Api\GuestShippingInformationManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation"/> + </type> + <type name="Magento\Quote\Api\GuestCartManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforePlaceOrder"/> + </type> + <type name="Magento\Quote\Api\GuestPaymentMethodManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod"/> + </type> + <type name="Magento\Quote\Api\GuestBillingAddressManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress"/> + </type> +</config> diff --git a/app/code/Magento/Checkout/etc/webapi_soap/di.xml b/app/code/Magento/Checkout/etc/webapi_soap/di.xml new file mode 100644 index 0000000000000..2f426d96b4ebc --- /dev/null +++ b/app/code/Magento/Checkout/etc/webapi_soap/di.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Checkout\Api\GuestPaymentInformationManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation"/> + </type> + <type name="Magento\Checkout\Api\GuestShippingInformationManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation"/> + </type> + <type name="Magento\Quote\Api\GuestCartManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforePlaceOrder"/> + </type> + <type name="Magento\Quote\Api\GuestPaymentMethodManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod"/> + </type> + <type name="Magento\Quote\Api\GuestBillingAddressManagementInterface"> + <plugin name="verify_is_guest_checkout_enabled" type="Magento\Checkout\Plugin\Api\VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress"/> + </type> +</config> From 3c293b5741794cbffe37b4fd7bb43b4d2b00eefd Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Mon, 7 Nov 2022 13:13:41 -0600 Subject: [PATCH 098/985] ACP2E-1339: Orders can be placed via Rest API as a guest user even when "Allow Guest Checkout" is turned off --- ...ckoutEnabledBeforeAssignBillingAddress.php | 7 ++- ...IsGuestCheckoutEnabledBeforePlaceOrder.php | 5 +- ...outEnabledBeforeSavePaymentInformation.php | 10 +++- ...utEnabledBeforeSaveShippingInformation.php | 5 +- ...tCheckoutEnabledBeforeSetPaymentMethod.php | 5 +- .../Quote/Api/GuestCartManagementTest.php | 59 ++++++++++++++++++- 6 files changed, 83 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php index b2eba4551570a..e1184376f3a8b 100644 --- a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeAssignBillingAddress.php @@ -10,6 +10,7 @@ use Magento\Checkout\Helper\Data as CheckoutHelper; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\Data\AddressInterface; use Magento\Quote\Api\GuestBillingAddressManagementInterface; use Magento\Quote\Model\QuoteIdMask; use Magento\Quote\Model\QuoteIdMaskFactory; @@ -51,12 +52,16 @@ public function __construct( * * @param GuestBillingAddressManagementInterface $subject * @param string $cartId + * @param AddressInterface $address + * @param bool $useForShipping * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeAssign( GuestBillingAddressManagementInterface $subject, - $cartId + $cartId, + AddressInterface $address, + $useForShipping = false ): void { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php index 603bb7942abc8..3691b25c3082b 100644 --- a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforePlaceOrder.php @@ -10,6 +10,7 @@ use Magento\Checkout\Helper\Data as CheckoutHelper; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\Data\PaymentInterface; use Magento\Quote\Api\GuestCartManagementInterface; use Magento\Quote\Model\QuoteIdMask; use Magento\Quote\Model\QuoteIdMaskFactory; @@ -51,12 +52,14 @@ public function __construct( * * @param GuestCartManagementInterface $subject * @param string $cartId + * @param PaymentInterface|null $paymentMethod * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforePlaceOrder( GuestCartManagementInterface $subject, - $cartId + $cartId, + PaymentInterface $paymentMethod = null ): void { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php index 854af8e967ea3..1644bf945cd43 100644 --- a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSavePaymentInformation.php @@ -11,6 +11,8 @@ use Magento\Checkout\Helper\Data as CheckoutHelper; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\Data\AddressInterface; +use Magento\Quote\Api\Data\PaymentInterface; use Magento\Quote\Model\QuoteIdMask; use Magento\Quote\Model\QuoteIdMaskFactory; @@ -51,12 +53,18 @@ public function __construct( * * @param GuestPaymentInformationManagementInterface $subject * @param string $cartId + * @param string $email + * @param PaymentInterface $paymentMethod + * @param AddressInterface|null $billingAddress * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSavePaymentInformation( GuestPaymentInformationManagementInterface $subject, - $cartId + $cartId, + $email, + PaymentInterface $paymentMethod, + AddressInterface $billingAddress = null ): void { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php index a51a1f60b12c6..6888fe0a3ffe9 100644 --- a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSaveShippingInformation.php @@ -7,6 +7,7 @@ namespace Magento\Checkout\Plugin\Api; +use Magento\Checkout\Api\Data\ShippingInformationInterface; use Magento\Checkout\Api\GuestShippingInformationManagementInterface; use Magento\Checkout\Helper\Data as CheckoutHelper; use Magento\Framework\Exception\CouldNotSaveException; @@ -51,12 +52,14 @@ public function __construct( * * @param GuestShippingInformationManagementInterface $subject * @param string $cartId + * @param ShippingInformationInterface $addressInformation * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSaveAddressInformation( GuestShippingInformationManagementInterface $subject, - $cartId + $cartId, + ShippingInformationInterface $addressInformation ): void { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); diff --git a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php index a37331f380f97..3a2fcd96119c1 100644 --- a/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php +++ b/app/code/Magento/Checkout/Plugin/Api/VerifyIsGuestCheckoutEnabledBeforeSetPaymentMethod.php @@ -10,6 +10,7 @@ use Magento\Checkout\Helper\Data as CheckoutHelper; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\Data\PaymentInterface; use Magento\Quote\Api\GuestPaymentMethodManagementInterface; use Magento\Quote\Model\QuoteIdMask; use Magento\Quote\Model\QuoteIdMaskFactory; @@ -51,12 +52,14 @@ public function __construct( * * @param GuestPaymentMethodManagementInterface $subject * @param string $cartId + * @param PaymentInterface $method * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSet( GuestPaymentMethodManagementInterface $subject, - $cartId + $cartId, + PaymentInterface $method ): void { /** @var $quoteIdMask QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartManagementTest.php index ce9e4ee941785..68cc2c2b2315d 100644 --- a/dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartManagementTest.php @@ -6,14 +6,29 @@ namespace Magento\Quote\Api; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Checkout\Helper\Data; +use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; +use Magento\Checkout\Test\Fixture\SetDeliveryMethod as SetDeliveryMethodFixture; +use Magento\Checkout\Test\Fixture\SetGuestEmail as SetGuestEmailFixture; +use Magento\Checkout\Test\Fixture\SetPaymentMethod as SetPaymentMethodFixture; +use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; +use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; +use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; +use Magento\TestFramework\Fixture\Config; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\TestCase\WebapiAbstract; class GuestCartManagementTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'quoteGuestCartManagementV1'; - const RESOURCE_PATH = '/V1/guest-carts/'; + private const SERVICE_VERSION = 'V1'; + private const SERVICE_NAME = 'quoteGuestCartManagementV1'; + private const RESOURCE_PATH = '/V1/guest-carts/'; + /** + * @var array + */ protected $createdQuotes = []; /** @@ -378,4 +393,42 @@ public function testAssignCustomerByGuestUser() $this->_webApiCall($serviceInfo, $requestData); } + + #[ + Config(Data::XML_PATH_GUEST_CHECKOUT, 0), + DataFixture(ProductFixture::class, as: 'product'), + DataFixture(GuestCartFixture::class, as: 'cart'), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$product.id$']), + DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetGuestEmailFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetDeliveryMethodFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetPaymentMethodFixture::class, ['cart_id' => '$cart.id$']), + ] + public function testPlaceOrderWhenGuestCheckoutIsDisabled(): void + { + $this->expectExceptionMessage('Sorry, guest checkout is not available.'); + $fixtures = DataFixtureStorageManager::getStorage(); + $cart = $fixtures->get('cart'); + /** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */ + $quoteIdMask = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create(\Magento\Quote\Model\QuoteIdMaskFactory::class) + ->create(); + $quoteIdMask->load($cart->getId(), 'quote_id'); + //Use masked cart Id + $cartId = $quoteIdMask->getMaskedId(); + + $serviceInfo = [ + 'soap' => [ + 'service' => 'quoteGuestCartManagementV1', + 'operation' => 'quoteGuestCartManagementV1PlaceOrder', + 'serviceVersion' => 'V1', + ], + 'rest' => [ + 'resourcePath' => '/V1/guest-carts/' . $cartId . '/order', + 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_PUT, + ], + ]; + $this->_webApiCall($serviceInfo, ['cartId' => $cartId]); + } } From 0fdfe3cbf2879bbd5369ce317851fde26db5a0c1 Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Wed, 9 Nov 2022 09:06:36 +0530 Subject: [PATCH 099/985] AC-5245 --- .../Test/Mftf/Data/CatalogInventoryConfigData.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml index eb49519c78de7..767fe9bf2867e 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml @@ -54,3 +54,4 @@ <data key="value">0</data> </entity> </entities> + From d69195d7c1d11ca49fadfdff66ee7587da6a220b Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Wed, 9 Nov 2022 14:27:29 +0530 Subject: [PATCH 100/985] AC-5245 --- .../Mftf/Data/CatalogInventoryConfigData.xml | 57 ----------- .../Test/DisableInventoryBackOrdersTest.xml | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+), 57 deletions(-) delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml deleted file mode 100644 index 767fe9bf2867e..0000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="StockOptionsDisplayOutOfStockProductsEnable"> - <data key="path">cataloginventory/options/show_out_of_stock</data> - <data key="scope_id">0</data> - <data key="label">Yes</data> - <data key="value">1</data> - </entity> - <entity name="StockOptionsDisplayOutOfStockProductsDisable"> - <data key="path">cataloginventory/options/show_out_of_stock</data> - <data key="scope_id">0</data> - <data key="label">No</data> - <data key="value">0</data> - </entity> - <entity name="EnableCatalogInventoryConfigData"> - <!--Default Value --> - <data key="path">cataloginventory/options/can_subtract</data> - <data key="scope_id">0</data> - <data key="label">Yes</data> - <data key="value">1</data> - </entity> - <entity name="DisableCatalogInventoryConfigData"> - <data key="path">cataloginventory/options/can_subtract</data> - <data key="scope_id">0</data> - <data key="label">No</data> - <data key="value">0</data> - </entity> - <entity name="CatalogInventoryManageStockAutoReturnEnable"> - <!-- Magento default value --> - <data key="path">cataloginventory/item_options/auto_return</data> - <data key="value">1</data> - </entity> - <entity name="CatalogInventoryManageStockAutoReturnDisable"> - <!-- Magento default value --> - <data key="path">cataloginventory/item_options/auto_return</data> - <data key="value">0</data> - </entity> - <entity name="CatalogInventoryManageStockEnable"> - <!-- Magento default value --> - <data key="path">cataloginventory/item_options/manage_stock</data> - <data key="value">1</data> - </entity> - <entity name="CatalogInventoryManageStockDisable"> - <!-- Magento default value --> - <data key="path">cataloginventory/item_options/manage_stock</data> - <data key="value">0</data> - </entity> -</entities> - diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml new file mode 100644 index 0000000000000..065be98d19180 --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="DisabledInventoryBackOrdersTest"> + <annotations> + <features value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/> + <stories value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/> + <title value="OnePageCheckoutAndEnabledBackOrders"/> + <description value="[Disabled Inventory Check] Onepage Checkout and Enabled Backorders"/> + <severity value="CRITICAL"/> + <testCaseId value="AC-5245"/> + </annotations> + + <before> + <!--Enable Flat Rate--> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <!-- Enable Back Orders--> + <magentoCLI command="config:set cataloginventory/item_options/backorders 1" stepKey="EnableBackorders"/> + <!--Create Category--> + <createData entity="_defaultCategory" stepKey="testCategory"/> + <!-- Create SimpleProductwithPrice100 --> + <createData entity="SimpleProduct_100" stepKey="simpleProductOne"> + <requiredEntity createDataKey="testCategory"/> + </createData> + <!-- Assign SimpleProductOne to Category --> + <createData entity="AssignProductToCategory" stepKey="assignSimpleProductOneToTestCategory"> + <requiredEntity createDataKey="testCategory"/> + <requiredEntity createDataKey="simpleProductOne"/> + </createData> + <!--Set Enable Inventory Check On Cart Load = No--> + <magentoCLI command="config:set {{DisableInventoryCheckOnCartLoad.path}} {{DisableInventoryCheckOnCartLoad.value}}" stepKey="disableCartLoad"/> + <!-- Cache Flush--> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushConfigCache"> + <argument name="tags" value="config"/> + </actionGroup> + </before> + <!--Delete Category, Product and Set Enable Inventory Check On Cart Load = Yes--> + <after> + <magentoCLI command="config:set {{EnableInventoryCheckOnCartLoad.path}} {{EnableInventoryCheckOnCartLoad.value}}" stepKey="enableCartLoad"/> + <magentoCLI command="config:set cataloginventory/item_options/backorders 0" stepKey="EnableBackorders"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + <deleteData createDataKey="simpleProductOne" stepKey="deleteProduct"/> + <deleteData createDataKey="testCategory" stepKey="deleteTestCategory"/> + </after> + <!--Go to product page--> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory"> + <argument name="productUrlKey" value="$simpleProductOne.custom_attributes[url_key]$"/> + </actionGroup> + <!--Add Product to Shopping Cart--> + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> + <argument name="productName" value="$$simpleProductOne.name$$"/> + <argument name="productQty" value="2"/> + </actionGroup> + <actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openViewAndEditCart"/> + <!--Go to Checkout--> + <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="gotocheckout"/> + <!--Filling shipping information and click next--> + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> + <argument name="shippingMethod" value="Flat Rate"/> + <argument name="customerVar" value="Simple_US_Customer_NY"/> + <argument name="customerAddressVar" value="US_Address_NY"/> + </actionGroup> + <!--Select Payment Method--> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/> + <!-- Open and switch to a new browser tab. --> + <openNewTab stepKey="openNewTab"/> + <!-- Open Product From AdminPage--> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPageinNewTab"> + <argument name="productId" value="$simpleProductOne.id$"/> + </actionGroup> + <actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillVirtualProductQuantity"> + <argument name="productQty" value="1"/> + </actionGroup> + <actionGroup ref="SaveProductFormActionGroup" stepKey="clicksaveProduct"/> + <!-- Switch to Previous tab and Check Error message There are no source items with the in stock status* is displayed --> + <switchToPreviousTab stepKey="switchToPreviousTab"/> + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> + <waitForPageLoad stepKey="waitForSuccessMessage"/> + <!--See success messages--> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/> + <see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order # is: " stepKey="seeOrderNumber"/> + + <actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogPage"/> + <!--Apply Name Filter--> + <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions"> + <argument name="product" value="$$simpleProductOne$$"/> + </actionGroup> + <!--Check Simple qty changed to negative value "-1"--> + <see selector="{{AdminProductGridSection.productSalableQty('1', _defaultStock.name)}}" userInput="-1" stepKey="checkSalableQtyAfterPlaceOrder"/> + </test> +</tests> From 8b473fdd1cde441d98d6c2797a5fa937b6f11dbb Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Wed, 9 Nov 2022 16:29:49 +0530 Subject: [PATCH 101/985] Adding files --- .../Mftf/Data/CatalogInventoryConfigData.xml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml new file mode 100755 index 0000000000000..ba513a88c3bba --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="StockOptionsDisplayOutOfStockProductsEnable"> + <data key="path">cataloginventory/options/show_out_of_stock</data> + <data key="scope_id">0</data> + <data key="label">Yes</data> + <data key="value">1</data> + </entity> + <entity name="StockOptionsDisplayOutOfStockProductsDisable"> + <data key="path">cataloginventory/options/show_out_of_stock</data> + <data key="scope_id">0</data> + <data key="label">No</data> + <data key="value">0</data> + </entity> + <entity name="EnableCatalogInventoryConfigData"> + <!--Default Value --> + <data key="path">cataloginventory/options/can_subtract</data> + <data key="scope_id">0</data> + <data key="label">Yes</data> + <data key="value">1</data> + </entity> + <entity name="DisableCatalogInventoryConfigData"> + <data key="path">cataloginventory/options/can_subtract</data> + <data key="scope_id">0</data> + <data key="label">No</data> + <data key="value">0</data> + </entity> + <entity name="CatalogInventoryManageStockAutoReturnEnable"> + <!-- Magento default value --> + <data key="path">cataloginventory/item_options/auto_return</data> + <data key="value">1</data> + </entity> + <entity name="CatalogInventoryManageStockAutoReturnDisable"> + <!-- Magento default value --> + <data key="path">cataloginventory/item_options/auto_return</data> + <data key="value">0</data> + </entity> + <entity name="CatalogInventoryManageStockEnable"> + <!-- Magento default value --> + <data key="path">cataloginventory/item_options/manage_stock</data> + <data key="value">1</data> + </entity> + <entity name="CatalogInventoryManageStockDisable"> + <!-- Magento default value --> + <data key="path">cataloginventory/item_options/manage_stock</data> + <data key="value">0</data> + </entity> + <entity name="EnableInventoryCheckOnCartLoad"> + <data key="path">cataloginventory/options/enable_inventory_check</data> + <data key="value">1</data> + </entity> + <entity name="DisableInventoryCheckOnCartLoad"> + <data key="path">cataloginventory/options/enable_inventory_check</data> + <data key="value">0</data> + </entity> +</entities> From f87f637e3007a6496fe37124e5297b9de2973f1b Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 9 Nov 2022 18:18:18 +0530 Subject: [PATCH 102/985] Fixed bugs and add improvements for Newsletter Queue #33849: Fixed functional test failures --- .../Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml index 05ad191360b3c..eb5b017818231 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml @@ -16,7 +16,7 @@ Clicks the Queue Newsletter action. Sets Queue Date Start. Selects needed Store view if applicable. - Clicks the Save and Resume button. + Clicks the Save Template button. </description> </annotations> <arguments> @@ -28,7 +28,8 @@ <click selector="{{AdminNewsletterGridMainActionsSection.queueNewsletterOption}}" stepKey="cliclkQueueNewsletterOption"/> <fillField selector="{{QueueInformationSection.queueStartFrom}}" userInput="{{startAt}}" stepKey="setDate"/> <conditionalClick selector="{{QueueInformationSection.subscriberFromOption(storeView)}}" dependentSelector="{{QueueInformationSection.subscriberFromOption(storeView)}}" visible="true" stepKey="setStoreview"/> - <click selector="{{AdminNewsletterMainActionsSection.saveAndResumeButton}}" stepKey="clickSaveAndResumeButton"/> - <see userInput="You saved the newsletter queue." stepKey="seeSuccessMessage"/> + <click selector="{{AdminNewsletterMainActionsSection.saveTemplateButton}}" stepKey="clickSaveTemplate"/> + <waitForPageLoad stepKey="waitForSavingTemplate"/> + <see userInput="You saved the newsletter queue." stepKey="seeSuccessMessage"/> </actionGroup> </actionGroups> From b2fd12161cdd2aa1524637307994f77b084a24ee Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" <barryvdh@gmail.com> Date: Thu, 10 Nov 2022 10:10:38 +0100 Subject: [PATCH 103/985] Allow more htmlClasses --- lib/internal/Magento/Framework/View/Layout/etc/elements.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index e1bdfb81fd732..617d886af901c 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -119,7 +119,7 @@ <xs:simpleType name="htmlClassType"> <xs:restriction base="xs:string"> - <xs:pattern value="[a-zA-Z][a-zA-Z\d\-_:]*(\s[a-zA-Z][a-zA-Z\d\-_:]*)*"/> + <xs:pattern value="[a-zA-Z\-][a-zA-Z\d\-_/:.\[\]]*(\s[a-zA-Z][a-zA-Z\d\-_/:.\[\]]*)*"/> </xs:restriction> </xs:simpleType> From b60ce793db94ad5c4f9fae9381b2c47513418d1e Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 10 Nov 2022 12:37:04 +0200 Subject: [PATCH 104/985] ACP2E-1345, added default values for insert --- .../Bundle/Model/ResourceModel/Selection.php | 4 +-- .../Bundle/Api/ProductLinkManagementTest.php | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php index 45018406277f9..076147f8554b3 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php @@ -174,8 +174,8 @@ public function saveSelectionPrice($item) $values = [ 'selection_id' => $item->getSelectionId(), 'website_id' => $item->getWebsiteId(), - 'selection_price_type' => $item->getSelectionPriceType(), - 'selection_price_value' => $item->getSelectionPriceValue(), + 'selection_price_type' => $item->getSelectionPriceType() ?? 0, + 'selection_price_value' => $item->getSelectionPriceValue() ?? 0, 'parent_product_id' => $item->getParentProductId(), ]; $connection->insertOnDuplicate( diff --git a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php index 853616f5afc57..a38770032ae90 100644 --- a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php @@ -87,6 +87,32 @@ public function testAddChild() $this->assertGreaterThan(0, $childId); } + /** + * @magentoApiDataFixture Magento/Bundle/_files/product.php + * @magentoApiDataFixture Magento/Catalog/_files/product_virtual.php + */ + public function testAddChildWithoutPriceAndPriceType() + { + $productSku = 'bundle-product'; + $children = $this->getChildren($productSku); + + $optionId = $children[0]['option_id']; + + $linkedProduct = [ + 'sku' => 'virtual-product', + 'option_id' => $optionId, + 'position' => '1', + 'is_default' => 1, + 'priceType' => null, + 'price' => null, + 'qty' => 8, + 'can_change_quantity' => 1, + ]; + + $childId = $this->addChild($productSku, $optionId, $linkedProduct); + $this->assertGreaterThan(0, $childId); + } + /** * Verify empty out of stock bundle product is in stock after child has been added. * From 5f7b00fbb00bb349ede0f91a5365832d7a1eed7f Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 10 Nov 2022 14:05:29 +0200 Subject: [PATCH 105/985] ACP2E-1345, added default values for insert --- app/code/Magento/Bundle/Model/ResourceModel/Selection.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php index 076147f8554b3..abcf8ba859c9e 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php @@ -174,8 +174,10 @@ public function saveSelectionPrice($item) $values = [ 'selection_id' => $item->getSelectionId(), 'website_id' => $item->getWebsiteId(), - 'selection_price_type' => $item->getSelectionPriceType() ?? 0, - 'selection_price_value' => $item->getSelectionPriceValue() ?? 0, + //'selection_price_type' => $item->getSelectionPriceType() ?? 0, + 'selection_price_type' => $item->getSelectionPriceType(), + //'selection_price_value' => $item->getSelectionPriceValue() ?? 0, + 'selection_price_value' => $item->getSelectionPriceValue(), 'parent_product_id' => $item->getParentProductId(), ]; $connection->insertOnDuplicate( From bf1eac35877ce9542fa14f3f7cb5274e186fd1e5 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Thu, 10 Nov 2022 23:56:18 +0530 Subject: [PATCH 106/985] ACQE-3803: revert the changes --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index 932b5bdda97de..8c36a04e60f90 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,6 +26,6 @@ <element name="qtyInputWithProduct" type="input" selector="//tr//strong[contains(.,'{{productName}}')]/../../td[@class='col qty']//input" parameterized="true"/> <element name="customOptionRadio" type="input" selector="//span[contains(text(),'{{customOption}}')]/../../input" parameterized="true"/> <element name="onlyProductsLeft" type="block" selector="//div[@class='product-info-price']//div[@class='product-info-stock-sku']//div[@class='availability only']"/> - <element name="qtyErr" type="text" selector="div[data-ui-id='message-error'] div"/> + <element name="qtyErr" type="text" selector="#qty-error"/> </section> </sections> From 513e9813fef41669909c1a4cbdb7503c5dc0d606 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 7 Nov 2022 16:43:32 -0600 Subject: [PATCH 107/985] ACPT-826 --- .../Api/AsyncConfigPublisherInterface.php | 9 ++ .../Api/Data/AsyncConfigMessageInterface.php | 17 +++ .../Model/AsyncConfigPublisher.php | 48 ++++++++ .../Magento/AsyncConfig/Model/Consumer.php | 42 +++++++ .../Model/Entity/AsyncConfigMessage.php | 26 +++++ .../AsyncConfig/Setup/ConfigOptionsList.php | 110 ++++++++++++++++++ app/code/Magento/AsyncConfig/composer.json | 25 ++++ .../Magento/AsyncConfig/etc/communication.xml | 12 ++ app/code/Magento/AsyncConfig/etc/di.xml | 13 +++ app/code/Magento/AsyncConfig/etc/module.xml | 11 ++ app/code/Magento/AsyncConfig/etc/queue.xml | 12 ++ .../AsyncConfig/etc/queue_consumer.xml | 10 ++ .../AsyncConfig/etc/queue_publisher.xml | 10 ++ .../AsyncConfig/etc/queue_topology.xml | 12 ++ app/code/Magento/AsyncConfig/registration.php | 9 ++ .../Adminhtml/System/Config/Save.php | 57 ++++++--- app/code/Magento/Config/composer.json | 3 +- composer.json | 1 + 18 files changed, 409 insertions(+), 18 deletions(-) create mode 100644 app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php create mode 100644 app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php create mode 100644 app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php create mode 100644 app/code/Magento/AsyncConfig/Model/Consumer.php create mode 100644 app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php create mode 100644 app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php create mode 100644 app/code/Magento/AsyncConfig/composer.json create mode 100644 app/code/Magento/AsyncConfig/etc/communication.xml create mode 100644 app/code/Magento/AsyncConfig/etc/di.xml create mode 100644 app/code/Magento/AsyncConfig/etc/module.xml create mode 100644 app/code/Magento/AsyncConfig/etc/queue.xml create mode 100644 app/code/Magento/AsyncConfig/etc/queue_consumer.xml create mode 100644 app/code/Magento/AsyncConfig/etc/queue_publisher.xml create mode 100644 app/code/Magento/AsyncConfig/etc/queue_topology.xml create mode 100644 app/code/Magento/AsyncConfig/registration.php diff --git a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php new file mode 100644 index 0000000000000..7172e5b98eba9 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php @@ -0,0 +1,9 @@ +<?php + +namespace Magento\AsyncConfig\Api; + +interface AsyncConfigPublisherInterface +{ + + public function saveConfigData($configData); +} diff --git a/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php b/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php new file mode 100644 index 0000000000000..3f73a722d8070 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php @@ -0,0 +1,17 @@ +<?php + +namespace Magento\AsyncConfig\Api\Data; + +interface AsyncConfigMessageInterface +{ + /** + * @return string + */ + public function getConfigData(); + + /** + * @param string $data + * @return void + */ + public function setConfigData(string $data); +} diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php new file mode 100644 index 0000000000000..4007d229b5121 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -0,0 +1,48 @@ +<?php + +namespace Magento\AsyncConfig\Model; + +use Magento\Framework\MessageQueue\PublisherInterface; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterfaceFactory; + +class AsyncConfigPublisher implements \Magento\AsyncConfig\Api\AsyncConfigPublisherInterface +{ + /** + * @var PublisherInterface + */ + private $messagePublisher; + + /** + * @var AsyncConfigMessageInterfaceFactory + */ + private $asyncConfigFactory; + + /** + * @var Json + */ + private $serializer; + + + /** + * @param AsyncConfigMessageInterfaceFactory $asyncConfigFactory + * @param PublisherInterface $publisher + * @param Json $json + */ + public function __construct( + AsyncConfigMessageInterfaceFactory $asyncConfigFactory, + PublisherInterface $publisher, + Json $json + ) { + $this->asyncConfigFactory = $asyncConfigFactory; + $this->messagePublisher = $publisher; + $this->serializer = $json; + } + + public function saveConfigData($configData) + { + $asyncConfig = $this->asyncConfigFactory->create(); + $asyncConfig->setConfigData($this->serializer->serialize($configData)); + $this->messagePublisher->publish('async_config.saveConfig', $asyncConfig); + } +} diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php new file mode 100644 index 0000000000000..c1cb02c666053 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -0,0 +1,42 @@ +<?php + +namespace Magento\AsyncConfig\Model; + +use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface; +use Magento\Framework\Serialize\Serializer\Json; + +class Consumer +{ + /** + * Backend Config Model Factory + * + * @var \Magento\Config\Model\Config\Factory + */ + private $configFactory; + + /** + * @var Json + */ + private $serializer; + + public function __construct( + \Magento\Config\Model\Config\Factory $configFactory, + Json $json + ) { + $this->configFactory = $configFactory; + $this->serializer = $json; + } + /** + * @param AsyncConfigMessageInterface $asyncConfigMessage + * @return void + * @throws \Exception + */ + public function process(AsyncConfigMessageInterface $asyncConfigMessage): void + { + $configData = $asyncConfigMessage->getConfigData(); + $data = $this->serializer->unserialize($configData); + /** @var \Magento\Config\Model\Config $configModel */ + $configModel = $this->configFactory->create(['data' => $data]); + $configModel->save(); + } +} diff --git a/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php b/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php new file mode 100644 index 0000000000000..e014591603393 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php @@ -0,0 +1,26 @@ +<?php + +namespace Magento\AsyncConfig\Model\Entity; + +use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface; + +class AsyncConfigMessage implements AsyncConfigMessageInterface +{ + private $data; + + /** + * @inheritDoc + */ + public function getConfigData() + { + return $this->data; + } + + /** + * @inheritDoc + */ + public function setConfigData($data) + { + $this->data = $data; + } +} diff --git a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php new file mode 100644 index 0000000000000..c827fa7209571 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php @@ -0,0 +1,110 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\AsyncConfig\Setup; + +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Config\Data\ConfigData; +use Magento\Framework\Config\File\ConfigFilePool; +use Magento\Framework\Setup\ConfigOptionsListInterface; +use Magento\Framework\Setup\Option\SelectConfigOption; + +/** + * Deployment configuration options required for the Config module. + */ +class ConfigOptionsList implements ConfigOptionsListInterface +{ + /** + * Input key for the option + */ + public const INPUT_KEY_ASYNC_CONFIG_SAVE ='config-async'; + + /** + * Path to the values in the deployment config + */ + public const CONFIG_PATH_ASYNC_CONFIG_SAVE = 'config/async'; + + /** + * Default value + */ + private const DEFAULT_ASYNC_CONFIG = 0; + + /** + * The available configuration values + * + * @var array + */ + private $selectOptions = [0, 1]; + + /** + * @inheritdoc + */ + public function getOptions() + { + return [ + new SelectConfigOption( + self::INPUT_KEY_ASYNC_CONFIG_SAVE, + SelectConfigOption::FRONTEND_WIZARD_SELECT, + $this->selectOptions, + self::CONFIG_PATH_ASYNC_CONFIG_SAVE, + 'Enable async Admin Config Save? 1 - Yes, 0 - No', + self::DEFAULT_ASYNC_CONFIG + ), + ]; + } + + /** + * @inheritdoc + */ + public function createConfig(array $data, DeploymentConfig $deploymentConfig) + { + $configData = new ConfigData(ConfigFilePool::APP_ENV); + + if (!$this->isDataEmpty($data, self::INPUT_KEY_ASYNC_CONFIG_SAVE)) { + $configData->set( + self::CONFIG_PATH_ASYNC_CONFIG_SAVE, + (int)$data[self::INPUT_KEY_ASYNC_CONFIG_SAVE] + ); + } + + return [$configData]; + } + + /** + * @inheritdoc + */ + public function validate(array $options, DeploymentConfig $deploymentConfig) + { + $errors = []; + + if (!$this->isDataEmpty($options, self::INPUT_KEY_ASYNC_CONFIG_SAVE) && + !in_array( + $options[self::INPUT_KEY_ASYNC_CONFIG_SAVE], + $this->selectOptions + ) + ) { + $errors[] = 'You can use only 1 or 0 for ' . self::INPUT_KEY_ASYNC_CONFIG_SAVE . ' option'; + } + + return $errors; + } + + /** + * Check if data ($data) with key ($key) is empty + * + * @param array $data + * @param string $key + * @return bool + */ + private function isDataEmpty(array $data, $key) + { + if (isset($data[$key]) && $data[$key] !== '') { + return false; + } + return true; + } +} diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json new file mode 100644 index 0000000000000..3e433e07de4d5 --- /dev/null +++ b/app/code/Magento/AsyncConfig/composer.json @@ -0,0 +1,25 @@ +{ + "name": "magento/module-async-config", + "description": "N/A", + "config": { + "sort-packages": true + }, + "require": { + "php": "~7.4.0||~8.1.0", + "magento/framework": "*", + "magento/framework-message-queue": "*", + "magento/module-config": "*" + }, + "type": "magento2-module", + "license": [ + "proprietary" + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\AsyncConfig\\": "" + } + } +} diff --git a/app/code/Magento/AsyncConfig/etc/communication.xml b/app/code/Magento/AsyncConfig/etc/communication.xml new file mode 100644 index 0000000000000..c008ea2907391 --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/communication.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd"> + <topic name="async_config.saveConfig" request="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface"> + <handler name="saveConfigProcessor" type="Magento\AsyncConfig\Model\Consumer" method="process" /> + </topic> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml new file mode 100644 index 0000000000000..82628b5b211a0 --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <preference for="Magento\AsyncConfig\Api\AsyncConfigPublisherInterface" + type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> + <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" + type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/module.xml b/app/code/Magento/AsyncConfig/etc/module.xml new file mode 100644 index 0000000000000..67661f0e1826f --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/module.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> + <module name="Magento_AsyncConfig"> + </module> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/queue.xml b/app/code/Magento/AsyncConfig/etc/queue.xml new file mode 100644 index 0000000000000..0fa759904266b --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/queue.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd"> + <broker topic="async_config.saveConfig" exchange="magento"> + <queue name="saveConfig" consumer="saveConfigProcessor" handler="Magento\AsyncConfig\Model\Consumer::process"/> + </broker> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/queue_consumer.xml b/app/code/Magento/AsyncConfig/etc/queue_consumer.xml new file mode 100644 index 0000000000000..62855ceead1f6 --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/queue_consumer.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd"> + <consumer name="saveConfigProcessor" queue="saveConfig" handler="Magento\AsyncConfig\Model\Consumer::process" /> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/queue_publisher.xml b/app/code/Magento/AsyncConfig/etc/queue_publisher.xml new file mode 100644 index 0000000000000..b30c8b7cebffd --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/queue_publisher.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd"> + <publisher topic="async_config.saveConfig"/> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/queue_topology.xml b/app/code/Magento/AsyncConfig/etc/queue_topology.xml new file mode 100644 index 0000000000000..cb235e328cbc9 --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/queue_topology.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd"> + <exchange name="magento"> + <binding id="saveConfigBinding" topic="async_config.saveConfig" destination="saveConfig"/> + </exchange> +</config> diff --git a/app/code/Magento/AsyncConfig/registration.php b/app/code/Magento/AsyncConfig/registration.php new file mode 100644 index 0000000000000..3759211336006 --- /dev/null +++ b/app/code/Magento/AsyncConfig/registration.php @@ -0,0 +1,9 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\Framework\Component\ComponentRegistrar; + +ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AsyncConfig', __DIR__); diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 91f93e02dc651..6d36621c62117 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -6,14 +6,15 @@ namespace Magento\Config\Controller\Adminhtml\System\Config; -use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; +use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; use Magento\Config\Controller\Adminhtml\System\AbstractConfig; -use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\App\DeploymentConfig; /** * System Configuration Save Controller * - * @author Magento Core Team <core@magentocommerce.com> + * @author Magento Core Team <core@magentocommerce.com> * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Save extends AbstractConfig implements HttpPostActionInterface @@ -35,6 +36,18 @@ class Save extends AbstractConfig implements HttpPostActionInterface */ protected $string; + /** + * @var DeploymentConfig + */ + private $deploymentConfig; + + /** + * @var AsyncConfigPublisherInterface + */ + private $asyncConfigPublisher; + + public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; + /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Config\Model\Config\Structure $configStructure @@ -42,6 +55,8 @@ class Save extends AbstractConfig implements HttpPostActionInterface * @param \Magento\Config\Model\Config\Factory $configFactory * @param \Magento\Framework\Cache\FrontendInterface $cache * @param \Magento\Framework\Stdlib\StringUtils $string + * @param DeploymentConfig $deploymentConfig + * @param AsyncConfigPublisherInterface $asyncConfigPublisher */ public function __construct( \Magento\Backend\App\Action\Context $context, @@ -49,12 +64,16 @@ public function __construct( \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker, \Magento\Config\Model\Config\Factory $configFactory, \Magento\Framework\Cache\FrontendInterface $cache, - \Magento\Framework\Stdlib\StringUtils $string + \Magento\Framework\Stdlib\StringUtils $string, + DeploymentConfig $deploymentConfig, + AsyncConfigPublisherInterface $asyncConfigPublisher ) { parent::__construct($context, $configStructure, $sectionChecker); $this->_configFactory = $configFactory; $this->_cache = $cache; $this->string = $string; + $this->deploymentConfig = $deploymentConfig; + $this->asyncConfigPublisher = $asyncConfigPublisher; } /** @@ -215,11 +234,11 @@ public function execute() $website = $this->getRequest()->getParam('website'); $store = $this->getRequest()->getParam('store'); $configData = [ - 'section' => $section, - 'website' => $website, - 'store' => $store, - 'groups' => $this->_getGroupsForSave(), - ]; + 'section' => $section, + 'website' => $website, + 'store' => $store, + 'groups' => $this->_getGroupsForSave(), + ]; $configData = $this->filterNodes($configData); $groups = $this->getRequest()->getParam('groups'); @@ -228,17 +247,20 @@ public function execute() if (isset($groups['country']['fields']['eu_countries'])) { $countries = $groups['country']['fields']['eu_countries']; if (empty($countries['value']) && - !isset($countries['inherit'])) { + !isset($countries['inherit'])) { throw new LocalizedException( __('Something went wrong while saving this configuration.') ); } } } - - /** @var \Magento\Config\Model\Config $configModel */ - $configModel = $this->_configFactory->create(['data' => $configData]); - $configModel->save(); + if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { + /** @var \Magento\Config\Model\Config $configModel */ + $configModel = $this->_configFactory->create(['data' => $configData]); + $configModel->save(); + } else { + $this->asyncConfigPublisher->saveConfigData($configData); + } $this->_eventManager->dispatch( 'admin_system_config_save', ['configData' => $configData, 'request' => $this->getRequest()] @@ -259,6 +281,7 @@ public function execute() $this->_saveState($this->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); + return $resultRedirect->setPath( 'adminhtml/system_config/edit', [ @@ -283,7 +306,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf $filtered = []; foreach ($groups as $groupName => $childPaths) { //When group accepts arbitrary fields and clones them we allow it - $group = $this->_configStructure->getElement($prefix .'/' .$groupName); + $group = $this->_configStructure->getElement($prefix . '/' . $groupName); if (array_key_exists('clone_fields', $group->getData()) && $group->getData()['clone_fields']) { $filtered[$groupName] = $childPaths; continue; @@ -294,7 +317,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf if (array_key_exists('fields', $childPaths)) { foreach ($childPaths['fields'] as $field => $fieldData) { //Constructing config path for the $field - $path = $prefix .'/' .$groupName .'/' .$field; + $path = $prefix . '/' . $groupName . '/' . $field; $element = $this->_configStructure->getElement($path); if ($element && ($elementData = $element->getData()) @@ -311,7 +334,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf //Recursively filtering this group's groups. if (array_key_exists('groups', $childPaths) && $childPaths['groups']) { $filteredGroups = $this->filterPaths( - $prefix .'/' .$groupName, + $prefix . '/' . $groupName, $childPaths['groups'], $systemXmlConfig ); diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 61100e6336c27..13e20ba7198a4 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -13,7 +13,8 @@ "magento/module-directory": "*", "magento/module-email": "*", "magento/module-media-storage": "*", - "magento/module-store": "*" + "magento/module-store": "*", + "magento/module-async-config": "*" }, "type": "magento2-module", "license": [ diff --git a/composer.json b/composer.json index d54e4091079d7..3feddb4220deb 100644 --- a/composer.json +++ b/composer.json @@ -146,6 +146,7 @@ "magento/module-cms-url-rewrite": "*", "magento/module-compare-list-graph-ql": "*", "magento/module-config": "*", + "magento/module-async-config": "*", "magento/module-configurable-import-export": "*", "magento/module-configurable-product": "*", "magento/module-configurable-product-sales": "*", From 2925f61e17ca77127f0b9aa764c8fd64db2c4c43 Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Fri, 11 Nov 2022 09:08:49 +0530 Subject: [PATCH 108/985] Adding FlatRate due to broken test case in PR Build --- .../Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml index d4d54b601318d..3a00ba0aecada 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml @@ -20,7 +20,7 @@ </annotations> <before> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/> - + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct01"> <requiredEntity createDataKey="createCategory"/> From 2bd2d0accb1598992b10c10aafb2e8b5e2433cd6 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Fri, 11 Nov 2022 09:34:46 +0530 Subject: [PATCH 109/985] ACQE:3803 change selector --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index 8c36a04e60f90..ffe9c0abab8f0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,6 +26,6 @@ <element name="qtyInputWithProduct" type="input" selector="//tr//strong[contains(.,'{{productName}}')]/../../td[@class='col qty']//input" parameterized="true"/> <element name="customOptionRadio" type="input" selector="//span[contains(text(),'{{customOption}}')]/../../input" parameterized="true"/> <element name="onlyProductsLeft" type="block" selector="//div[@class='product-info-price']//div[@class='product-info-stock-sku']//div[@class='availability only']"/> - <element name="qtyErr" type="text" selector="#qty-error"/> + <element name="qtyErr" type="text" selector=".message-error div"/> </section> </sections> From 918c5c4f3278535d7bbe97da42164fcb9433eadc Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Fri, 11 Nov 2022 10:24:19 +0530 Subject: [PATCH 110/985] ACQE-3803: selector changed --- .../Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml index ffe9c0abab8f0..db0179e9d90ce 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml @@ -26,6 +26,6 @@ <element name="qtyInputWithProduct" type="input" selector="//tr//strong[contains(.,'{{productName}}')]/../../td[@class='col qty']//input" parameterized="true"/> <element name="customOptionRadio" type="input" selector="//span[contains(text(),'{{customOption}}')]/../../input" parameterized="true"/> <element name="onlyProductsLeft" type="block" selector="//div[@class='product-info-price']//div[@class='product-info-stock-sku']//div[@class='availability only']"/> - <element name="qtyErr" type="text" selector=".message-error div"/> + <element name="qtyErr" type="text" selector="//*[@data-ui-id='message-error']//div"/> </section> </sections> From b1f8810c28f26274779d454852647f9dfffe0820 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Fri, 11 Nov 2022 10:32:08 +0530 Subject: [PATCH 111/985] added element discountAmountError in AdminCartPriceRulesFormSection --- .../Test/Mftf/Section/AdminCartPriceRulesFormSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml index bade99ad47173..facd9ef4f863d 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml @@ -84,6 +84,7 @@ <element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/> <element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/> <element name="discountAmount" type="input" selector="input[name='discount_amount']"/> + <element name="discountAmountError" type="text" selector="//label[@class='admin__field-error' and text()='Please enter a number 0 or greater,without comma in this field.']"/> <element name="maximumQtyDiscount" type="input" selector="input[name='discount_qty']"/> <element name="discountStep" type="input" selector="input[name='discount_step']"/> <element name="applyToShippingAmount" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='apply_to_shipping']/../label"/> From 477d085ce01a3b41689d550160f98e96bc8a9fe4 Mon Sep 17 00:00:00 2001 From: sharuksyed <glo74186@adobe.com> Date: Fri, 11 Nov 2022 13:22:21 +0530 Subject: [PATCH 112/985] AC-3898 : Checking Bundle SKUs creation --- .../AdminCheckingBundleSKUsCreationTest.xml | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 app/code/Magento/Bundle/Test/Mftf/Test/AdminCheckingBundleSKUsCreationTest.xml diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCheckingBundleSKUsCreationTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCheckingBundleSKUsCreationTest.xml new file mode 100644 index 0000000000000..244ea386e7a11 --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCheckingBundleSKUsCreationTest.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCheckingBundleSKUsCreationTest"> + <annotations> + <title value="Checking Bundle SKUs creation"/> + <stories value="Checking Bundle SKUs creation"/> + <description value="Checking Bundle product SKUs in items ordered page"/> + <severity value="MAJOR"/> + <testCaseId value="AC-3898"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!-- create category, four simple products --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="simpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + <field key="sku">sp1</field> + </createData> + <createData entity="SimpleProduct" stepKey="simpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + <field key="sku">sp2</field> + </createData> + <createData entity="SimpleProduct" stepKey="simpleProduct3"> + <requiredEntity createDataKey="createCategory"/> + <field key="sku">sp3</field> + </createData> + <createData entity="SimpleProduct" stepKey="simpleProduct4"> + <requiredEntity createDataKey="createCategory"/> + <field key="sku">sp4</field> + </createData> + <createData entity="ApiBundleProductPriceViewRange" stepKey="bundleProduct"> + <field key="sku">bp1</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="CheckboxOption" stepKey="bundleOption1"> + <requiredEntity createDataKey="bundleProduct"/> + </createData> + <createData entity="CheckboxOption" stepKey="bundleOption2"> + <requiredEntity createDataKey="bundleProduct"/> + </createData> + <createData entity="ApiBundleLink" stepKey="linkProduct2ToOption1"> + <requiredEntity createDataKey="bundleProduct"/> + <requiredEntity createDataKey="bundleOption1"/> + <requiredEntity createDataKey="simpleProduct2"/> + </createData> + <createData entity="ApiBundleLink" stepKey="linkProduct4ToOption1"> + <requiredEntity createDataKey="bundleProduct"/> + <requiredEntity createDataKey="bundleOption1"/> + <requiredEntity createDataKey="simpleProduct4"/> + </createData> + <createData entity="ApiBundleLink" stepKey="linkProduct1ToOption2"> + <requiredEntity createDataKey="bundleProduct"/> + <requiredEntity createDataKey="bundleOption2"/> + <requiredEntity createDataKey="simpleProduct1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="linkProduct3ToOption2"> + <requiredEntity createDataKey="bundleProduct"/> + <requiredEntity createDataKey="bundleOption2"/> + <requiredEntity createDataKey="simpleProduct3"/> + </createData> + <!-- Create customer --> + <createData entity="Simple_US_Customer_NY" stepKey="customer"/> + <magentoCron stepKey="runCronIndex" groups="index"/> + </before> + <after> + <!-- delete created data --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> + <deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/> + <deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/> + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> + <deleteData createDataKey="customer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront"> + <argument name="Customer" value="$customer$"/> + </actionGroup> + <!-- Navigate to product on storeFront --> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage"> + <argument name="productUrlKey" value="$bundleProduct.custom_attributes[url_key]$"/> + </actionGroup> + <!--Click "Customize and Add to Cart" button--> + <click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/> + <click stepKey="selectFourthProduct" selector="{{StorefrontBundledSection.productCheckbox('1','2')}}"/> + <click stepKey="selectFirstProduct" selector="{{StorefrontBundledSection.productCheckbox('2','1')}}"/> + <click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddToCart"/> + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="navigateToCheckoutPage"/> + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlacePurchaseOrder"/> + <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> + <argument name="orderId" value="{$grabOrderNumber}"/> + </actionGroup> + <grabTextFrom selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" stepKey="grabSku"/> + <assertEquals stepKey="assertSKU"> + <actualResult type="variable">$grabSku</actualResult> + <expectedResult type="string"><![CDATA[SKU: bp1-sp4-sp1]]></expectedResult> + </assertEquals> + </test> +</tests> From 8c4a0b6a8bb9d78db80299f4999a1f7f56ef359a Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 11 Nov 2022 11:06:03 +0200 Subject: [PATCH 113/985] ACP2E-1345, added unit test --- .../Bundle/Model/ResourceModel/Selection.php | 7 +-- .../Model/ResourceModel/SelectionTest.php | 61 +++++++++++++++++++ .../Bundle/Api/ProductLinkManagementTest.php | 26 -------- 3 files changed, 64 insertions(+), 30 deletions(-) create mode 100644 app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php index abcf8ba859c9e..8952acaf83149 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php @@ -174,12 +174,11 @@ public function saveSelectionPrice($item) $values = [ 'selection_id' => $item->getSelectionId(), 'website_id' => $item->getWebsiteId(), - //'selection_price_type' => $item->getSelectionPriceType() ?? 0, - 'selection_price_type' => $item->getSelectionPriceType(), - //'selection_price_value' => $item->getSelectionPriceValue() ?? 0, - 'selection_price_value' => $item->getSelectionPriceValue(), + 'selection_price_type' => $item->getSelectionPriceType() ?? 0, + 'selection_price_value' => $item->getSelectionPriceValue() ?? 0, 'parent_product_id' => $item->getParentProductId(), ]; + $connection->insertOnDuplicate( $this->getTable('catalog_product_bundle_selection_price'), $values, diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php new file mode 100644 index 0000000000000..9473cb185e626 --- /dev/null +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -0,0 +1,61 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Bundle\Test\Unit\Model\ResourceModel; + +use Codeception\PHPUnit\TestCase; +use Magento\Bundle\Model\ResourceModel\Selection as ResourceSelection; +use Magento\Bundle\Model\Selection; +use Magento\Framework\DB\Adapter\AdapterInterface; + +/** + * Class to test Selection Resource Model + */ +class SelectionTest extends TestCase +{ + public function testSaveSelectionPrice() + { + $item = $this->getMockBuilder(Selection::class) + ->disableOriginalConstructor() + ->addMethods(['getSelectionId', 'getWebsiteId', 'getSelectionPriceType', 'getSelectionPriceValue', 'getParentProductId', 'getDefaultPriceScope']) + ->getMock(); + $values = [ + 'selection_id' => 1, + 'website_id' => 1, + 'selection_price_type' => null, + 'selection_price_value' => null, + 'parent_product_id' => 1, + ]; + $item->expects($this->once())->method('getDefaultPriceScope')->willReturn(false); + $item->expects($this->once())->method('getSelectionId')->willReturn($values['selection_id']); + $item->expects($this->once())->method('getWebsiteId')->willReturn($values['website_id']); + $item->expects($this->once())->method('getSelectionPriceType')->willReturn($values['selection_price_type']); + $item->expects($this->once())->method('getSelectionPriceValue')->willReturn($values['selection_price_value']); + $item->expects($this->once())->method('getParentProductId')->willReturn($values['parent_product_id']); + + $selection = $this->getMockBuilder(ResourceSelection::class) + ->disableOriginalConstructor() + ->onlyMethods(['getConnection', 'getTable']) + ->getMock(); + $selection->expects($this->any()) + ->method('getTable') + ->with('catalog_product_bundle_selection_price') + ->willReturn('catalog_product_bundle_selection_price'); + + $connection = $this->createMock(AdapterInterface::class); + $connection->expects($this->once()) + ->method('insertOnDuplicate') + ->with( + $selection->getTable('catalog_product_bundle_selection_price'), + $this->callback(function ($insertValues) { + return $insertValues['selection_price_type'] === 0 && $insertValues['selection_price_value'] === 0; + }), + ['selection_price_type', 'selection_price_value'] + ); + + $selection->expects($this->once())->method('getConnection')->willReturn($connection); + $selection->saveSelectionPrice($item); + } +} diff --git a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php index a38770032ae90..853616f5afc57 100644 --- a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/ProductLinkManagementTest.php @@ -87,32 +87,6 @@ public function testAddChild() $this->assertGreaterThan(0, $childId); } - /** - * @magentoApiDataFixture Magento/Bundle/_files/product.php - * @magentoApiDataFixture Magento/Catalog/_files/product_virtual.php - */ - public function testAddChildWithoutPriceAndPriceType() - { - $productSku = 'bundle-product'; - $children = $this->getChildren($productSku); - - $optionId = $children[0]['option_id']; - - $linkedProduct = [ - 'sku' => 'virtual-product', - 'option_id' => $optionId, - 'position' => '1', - 'is_default' => 1, - 'priceType' => null, - 'price' => null, - 'qty' => 8, - 'can_change_quantity' => 1, - ]; - - $childId = $this->addChild($productSku, $optionId, $linkedProduct); - $this->assertGreaterThan(0, $childId); - } - /** * Verify empty out of stock bundle product is in stock after child has been added. * From 3f6615b4b8b60b97ed0e4c46b217cd8365ab4e6a Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 11 Nov 2022 12:35:37 +0200 Subject: [PATCH 114/985] ACP2E-1345, addressed static --- .../Magento/Bundle/Model/ResourceModel/Selection.php | 9 +++++---- .../Test/Unit/Model/ResourceModel/SelectionTest.php | 9 ++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php index 8952acaf83149..14578aedd1dcc 100644 --- a/app/code/Magento/Bundle/Model/ResourceModel/Selection.php +++ b/app/code/Magento/Bundle/Model/ResourceModel/Selection.php @@ -5,10 +5,10 @@ */ namespace Magento\Bundle\Model\ResourceModel; -use Magento\Framework\App\ObjectManager; use Magento\Catalog\Api\Data\ProductInterface; -use Magento\Framework\EntityManager\MetadataPool; +use Magento\Framework\App\ObjectManager; use Magento\Framework\EntityManager\EntityManager; +use Magento\Framework\EntityManager\MetadataPool; use Magento\Framework\Model\ResourceModel\Db\Context; /** @@ -141,7 +141,7 @@ public function getParentIdsByChild($childId) '' )->join( ['e' => $this->metadataPool->getMetadata(ProductInterface::class)->getEntityTable()], - 'e.' . $metadata->getLinkField() . ' = ' . $this->getMainTable() . '.parent_product_id', + 'e.' . $metadata->getLinkField() . ' = ' . $this->getMainTable() . '.parent_product_id', ['e.entity_id as parent_product_id'] )->where( $this->getMainTable() . '.product_id IN(?)', @@ -188,7 +188,8 @@ public function saveSelectionPrice($item) } /** - * {@inheritdoc} + * @inheritdoc + * * @since 100.2.0 */ public function save(\Magento\Framework\Model\AbstractModel $object) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index 9473cb185e626..d514319e6ac76 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Bundle\Test\Unit\Model\ResourceModel; use Codeception\PHPUnit\TestCase; @@ -19,7 +20,13 @@ public function testSaveSelectionPrice() { $item = $this->getMockBuilder(Selection::class) ->disableOriginalConstructor() - ->addMethods(['getSelectionId', 'getWebsiteId', 'getSelectionPriceType', 'getSelectionPriceValue', 'getParentProductId', 'getDefaultPriceScope']) + ->addMethods([ + 'getSelectionId', + 'getWebsiteId', + 'getSelectionPriceType', + 'getSelectionPriceValue', + 'getParentProductId', + 'getDefaultPriceScope']) ->getMock(); $values = [ 'selection_id' => 1, From b543d27efffde1e95b3d2f52ea5f89caf741aeef Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 11 Nov 2022 14:19:20 +0200 Subject: [PATCH 115/985] ACP2E-1345, addressed static --- .../Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index d514319e6ac76..9c7cb9c73d4ee 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Bundle\Test\Unit\Model\ResourceModel; From 3180471032091bfd2c0cb12780c0c898bf45c5c0 Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Fri, 11 Nov 2022 18:45:30 +0530 Subject: [PATCH 116/985] ACQE-4203: AddingSeveralFPTToSimpleProductTest --- .../Section/AdminCreditMemosGridSection.xml | 1 + .../Mftf/Section/AdminInvoiceTotalSection.xml | 1 + .../AdminOrderDetailsInvoicesSection.xml | 1 + .../Mftf/Section/AdminOrderTotalSection.xml | 1 + .../AddingSeveralFPTToSimpleProductTest.xml | 206 ++++++++++++++++++ 5 files changed, 210 insertions(+) create mode 100644 app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemosGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemosGridSection.xml index bf194422defe3..5dea2a7161232 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemosGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemosGridSection.xml @@ -21,6 +21,7 @@ <element name="applyFilter" type="button" selector="button[data-action='grid-filter-apply']"/> <element name="memoId" type="text" selector="//*[@id='sales_order_view_tabs_order_creditmemos_content']//tbody/tr/td[2]/div"/> <element name="rowCreditMemos" type="text" selector="div.data-grid-cell-content"/> + <element name="viewButton" type="button" selector="//div[@id='sales_order_view_tabs_order_creditmemos_content']//a[@class='action-menu-item']"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml index abeddac6d7f1a..9350d3f3d94f3 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceTotalSection.xml @@ -17,5 +17,6 @@ <element name="itemName" type="text" selector=".col-product .product-title"/> <element name="itemTotalPrice" type="text" selector=".col-total .price"/> <element name="totalTax" type="text" selector=".summary-total .price"/> + <element name="backButton" type="button" selector="#back"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml index bcf8bdcae7c59..084da9633d000 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsInvoicesSection.xml @@ -11,5 +11,6 @@ <section name="AdminOrderDetailsInvoicesSection"> <element name="spinner" type="button" selector=".spinner"/> <element name="content" type="text" selector="#sales_order_view_tabs_order_invoices_content"/> + <element name="viewButton" type="button" selector=".data-grid-actions-cell>.action-menu-item"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml index 58fe442cdee6c..5170802be0990 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml @@ -11,6 +11,7 @@ <section name="AdminOrderTotalSection"> <element name="subTotal" type="text" selector=".order-subtotal-table tbody tr.col-0>td span.price"/> <element name="discount" type="text" selector=".order-subtotal-table tbody tr.col-1>td span.price"/> + <element name="totalField" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td/span/span[contains(@class, 'price')]" parameterized="true"/> <element name="grandTotal" type="text" selector=".order-subtotal-table tfoot tr.col-0>td span.price"/> <element name="shippingDescription" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[contains(text(), 'Shipping & Handling')]"/> <element name="shippingAndHandling" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[normalize-space(.)='Shipping & Handling']/following-sibling::td//span[@class='price']"/> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml new file mode 100644 index 0000000000000..0ab20d8c7c9da --- /dev/null +++ b/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AddingSeveralFPTToSimpleProductTest"> + <annotations> + <features value="Tax"/> + <stories value="Shopping cart taxes"/> + <title value="Adding Several FPT's To Simple Product"/> + <description value="Adding Several FPT's To Simple Product"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4477"/> + <group value="checkout"/> + <group value="tax"/> + <group value="weee"/> + </annotations> + + <before> + <!-- Preconditions --> + <!-- Customer is created with default addresses: --> + <createData entity="Simple_US_Customer_CA" stepKey="createCustomer"/> + + <!-- Store -> Configuration -> Sales -> Tax FPT Enable --> + <createData entity="WeeeConfigEnable" stepKey="enableFPT"/> + + <!-- Fixed Product Tax 1 attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeOne"/> + <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet1"> + <requiredEntity createDataKey="createProductFPTAttributeOne"/> + </createData> + + <!-- Fixed Product Tax 2 attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeTwo"/> + <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet2"> + <requiredEntity createDataKey="createProductFPTAttributeTwo"/> + </createData> + + <!-- Fixed Product Tax 3 attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeThree"/> + <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet3"> + <requiredEntity createDataKey="createProductFPTAttributeThree"/> + </createData> + + <!-- Fixed Product 4 Tax attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeFour"/> + <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet4"> + <requiredEntity createDataKey="createProductFPTAttributeFour"/> + </createData> + + <!-- Magento cache is flushed --> + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> + <argument name="tags" value="config full_page"/> + </actionGroup> + + <!-- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <!-- Simple Product is created --> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> + <field key="price">200.00</field> + </createData> + + <!-- Open Simple Pproduct in Edit mode --> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> + <argument name="productId" value="$createSimpleProduct.id$"/> + </actionGroup> + + <!-- Add values to FPT 1 --> + <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue1"> + <argument name="FPTAttributeCode" value="$createProductFPTAttributeOne.attribute_code$"/> + <argument name="countryForFPT" value="United States"/> + <argument name="stateForFPT" value="California"/> + <argument name="valueForFPT" value="2"/> + </actionGroup> + <!-- Add values to FPT 2 --> + <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue2"> + <argument name="FPTAttributeCode" value="$createProductFPTAttributeTwo.attribute_code$"/> + <argument name="countryForFPT" value="United States"/> + <argument name="stateForFPT" value="California"/> + <argument name="valueForFPT" value="6"/> + </actionGroup> + <!-- Add values to FPT 3 --> + <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue3"> + <argument name="FPTAttributeCode" value="$createProductFPTAttributeThree.attribute_code$"/> + <argument name="countryForFPT" value="United States"/> + <argument name="stateForFPT" value="New York"/> + <argument name="valueForFPT" value="11"/> + </actionGroup> + <!-- Add values to FPT 4 --> + <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue4"> + <argument name="FPTAttributeCode" value="$createProductFPTAttributeFour.attribute_code$"/> + <argument name="countryForFPT" value="Germany"/> + <argument name="stateForFPT" value="Berlin"/> + <argument name="valueForFPT" value="15"/> + </actionGroup> + <!-- Save Simple Product --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> + <magentoCron groups="index" stepKey="reindexBrokenIndices"/> + </before> + + <after> + <!-- Delete all four FPT Attributes --> + <deleteData createDataKey="createProductFPTAttributeOne" stepKey="deleteProductFPTAttribute1"/> + <deleteData createDataKey="createProductFPTAttributeTwo" stepKey="deleteProductFPTAttribute2"/> + <deleteData createDataKey="createProductFPTAttributeThree" stepKey="deleteProductFPTAttribute3"/> + <deleteData createDataKey="createProductFPTAttributeFour" stepKey="deleteProductFPTAttribute4"/> + <!-- Disable FPT --> + <createData entity="WeeeConfigDisable" stepKey="disableFPT"/> + <!-- Delete Simple Product --> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <!-- Delete created customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> + <!-- Logout from Admin --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + <magentoCron groups="index" stepKey="reindexBrokenIndices"/> + </after> + + <!-- Test Steps --> + <!-- Step 1: Go to Storefront as logged in Customer --> + <!-- Login as Customer and add Product to Cart--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <!-- Add simple product with qty 2 to shopping cart --> + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart"> + <argument name="productName" value="$createSimpleProduct.name$"/> + <argument name="productQty" value="2"/> + </actionGroup> + + <!-- Select Mini Cart and select 'View And Edit Cart' --> + <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="selectViewAndEditCart"/> + <!-- Scroll to summary section --> + <scrollTo selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="scrollToSummary"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{CheckoutCartSummarySection.amountFPT}}" userInput="$16" stepKey="checkFPTAmountInCheckoutPage"/> + <!-- Click Proceed to checkout --> + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> + <!-- Click next button to open payment section --> + <actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{CheckoutCartSummarySection.amountFPT}}" userInput="$16" stepKey="checkFPTAmountInOrderSummaryPage"/> + <!-- Checkout select Check/Money Order payment --> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> + + <!-- Goto Admin > Sales > Orders page --> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> + <!-- Reset admin order filter --> + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> + <fillField selector="{{AdminOrdersGridSection.search}}" userInput="{$grabOrderNumber}" stepKey="searchOrderNum"/> + <click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearch"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/> + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> + <scrollTo selector="{{AdminOrderTotalSection.subTotal}}" stepKey="scrollToOrderTotalSection"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{AdminOrderTotalSection.totalField('FPT')}}" userInput="$16.00" stepKey="seeFPTInOrderSummaryPage"/> + <!-- Create an invoice for an order --> + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoice"/> + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/> + <!-- Click on Invoice on the left tab --> + <click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="clickInvoices"/> + <waitForPageLoad stepKey="waitForLoadingMask5" /> + <see selector="{{AdminOrderDetailsInvoicesSection.content}}" userInput="{$grabOrderNumber}" stepKey="seeInvoice1"/> + <!-- Click on view Button --> + <click selector="{{AdminOrderDetailsInvoicesSection.viewButton}}" stepKey="clickViewButton"/> + <waitForPageLoad stepKey="waitForOrderInformationTabLoadingMask"/> + <scrollTo selector="{{AdminInvoiceTotalSection.grandTotal}}" stepKey="scrollToGrandTotalSection"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{AdminInvoiceTotalSection.total('FPT')}}" userInput="$16.00" stepKey="seeFPTInInvoicePage"/> + <!-- Click on back button --> + <click selector="{{AdminInvoiceTotalSection.backButton}}" stepKey="clickBackButton"/> + <!-- Create an Credit memo for an order --> + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemoForSecond" /> + <conditionalClick selector="{{AdminOrderDetailsMainActionsSection.modalOk}}" dependentSelector="{{AdminOrderDetailsMainActionsSection.modalOk}}" + visible="true" stepKey="acceptModal1"/> + + <!-- Scroll to summary section --> + <scrollTo selector="{{AdminCreditMemoTotalSection.grandTotal}}" stepKey="scrollToGrandTotalSectionInCreditMemoScreen"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{AdminCreditMemoTotalSection.total('FPT')}}" userInput="$16.00" stepKey="seeFPTInCreditMemoPage"/> + <!-- Click on refund offline button --> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOfflineForSecond"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the credit memo." stepKey="seeCreditMemoSuccessForSecond"/> + <!-- Click on Credit Memo on the left tab --> + <click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickCreditMemo"/> + <waitForPageLoad stepKey="waitForLoadingMask6" /> + <!-- Click on view button --> + <click selector="{{AdminCreditMemosGridSection.viewButton}}" stepKey="clickInformationInCreditMemo"/> + <scrollTo selector="{{AdminCreditMemoTotalSection.grandTotal}}" stepKey="scrollToGrandTotalSectionInCreditMemoPage"/> + <!-- See Order totals contain 16$ of FPT --> + <see selector="{{AdminCreditMemoTotalSection.total('FPT')}}" userInput="$16.00" stepKey="seeFPTInCreditMemoPageAgain"/> + </test> +</tests> From 9ef43a59215c9b9e864f99c1b292e64c4513fece Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Wed, 26 Oct 2022 11:28:39 -0500 Subject: [PATCH 117/985] ACP2E-1290: Cart Rule discount issue on shipping price --- .../Magento/SalesRule/Model/Validator.php | 3 +- .../Magento/SalesRule/Test/Fixture/Rule.php | 4 +- .../Rule/Action/Discount/CartFixedTest.php | 75 ++++++++++++++++++- 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php index 998d1c3a2a8e2..abf34172c7296 100644 --- a/app/code/Magento/SalesRule/Model/Validator.php +++ b/app/code/Magento/SalesRule/Model/Validator.php @@ -372,8 +372,7 @@ public function processShippingAmount(Address $address) $cartRules[$rule->getId()] = $rule->getDiscountAmount(); } if ($cartRules[$rule->getId()] > 0) { - $shippingQuoteAmount = (float) $address->getShippingAmount() - - (float) $address->getShippingDiscountAmount(); + $shippingQuoteAmount = (float) $address->getShippingAmount(); $quoteBaseSubtotal = (float) $quote->getBaseSubtotal(); $isMultiShipping = $this->cartFixedDiscountHelper->checkMultiShippingQuote($quote); if ($isAppliedToShipping) { diff --git a/app/code/Magento/SalesRule/Test/Fixture/Rule.php b/app/code/Magento/SalesRule/Test/Fixture/Rule.php index 3efec5f652c92..bea6f4569d78e 100644 --- a/app/code/Magento/SalesRule/Test/Fixture/Rule.php +++ b/app/code/Magento/SalesRule/Test/Fixture/Rule.php @@ -116,7 +116,9 @@ public function apply(array $data = []): ?DataObject $model->setActionsSerialized($this->serializer->serialize($actions)); $model->setConditionsSerialized($this->serializer->serialize($conditions)); - $this->resourceModel->save($model); + //FIXME: plug-ins are configured for \Magento\SalesRule\Model\Rule::save + // instead of \Magento\SalesRule\Model\ResourceModel\Rule::save() + $model->save(); return $model; } diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php index 661987ad26627..ff15eb07d4986 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php @@ -12,7 +12,10 @@ use Magento\Catalog\Model\Product\Attribute\Source\Status; use Magento\Catalog\Model\Product\Visibility; use Magento\Catalog\Model\ProductRepository; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Checkout\Api\Data\TotalsInformationInterface; use Magento\Checkout\Model\Session as CheckoutSession; +use Magento\Checkout\Model\TotalsInformationManagement; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\InputException; @@ -22,12 +25,17 @@ use Magento\Multishipping\Model\Checkout\Type\Multishipping; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Api\Data\CartItemInterface; +use Magento\Quote\Api\Data\TotalsInterface; use Magento\Quote\Api\GuestCartItemRepositoryInterface; use Magento\Quote\Api\GuestCartManagementInterface; use Magento\Quote\Api\GuestCartTotalRepositoryInterface; use Magento\Quote\Api\GuestCouponManagementInterface; use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\Address; +use Magento\Quote\Model\Quote\AddressFactory; use Magento\Quote\Model\QuoteIdMask; +use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; +use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Model\Order; @@ -35,7 +43,10 @@ use Magento\SalesRule\Api\RuleRepositoryInterface; use Magento\SalesRule\Model\Rule; use Magento\SalesRule\Model\RuleFactory; +use Magento\SalesRule\Test\Fixture\Rule as RuleFixture; use Magento\Store\Model\StoreManagerInterface; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -506,7 +517,7 @@ public function testDiscountsWhenByPercentRuleAppliedFirstAndCartFixedRuleSecond $expectedDiscounts ): void { //Update rule discount - /** @var \Magento\SalesRule\Model\Rule $rule */ + /** @var Rule $rule */ $rule = $this->getRule('50% off - July 4'); $rule->setDiscountAmount($percentDiscount); $this->saveRule($rule); @@ -577,6 +588,41 @@ public function testCartFixedDiscountPriceIncludeTax() $this->assertEquals(-5, $quote->getShippingAddress()->getDiscountAmount()); } + #[ + DataFixture(ProductFixture::class, ['price' => 15], 'p1'), + DataFixture(ProductFixture::class, ['price' => 10], 'p2'), + DataFixture( + RuleFixture::class, + [ + 'simple_action' => Rule::BY_PERCENT_ACTION, + 'discount_amount' => 50, + 'apply_to_shipping' => 1, + 'stop_rules_processing' => 0, + 'sort_order' => 1, + ] + ), + DataFixture( + RuleFixture::class, + [ + 'simple_action' => Rule::CART_FIXED_ACTION, + 'discount_amount' => 40, + 'apply_to_shipping' => 1, + 'stop_rules_processing' => 0, + 'sort_order' => 2 + ] + ), + DataFixture(GuestCartFixture::class, as: 'cart'), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p1.id$', 'qty' => 2]), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p2.id$', 'qty' => 2]) + ] + public function testCarFixedDiscountWithApplyToShippingAmountAfterADiscount(): void + { + $cart = DataFixtureStorageManager::getStorage()->get('cart'); + $totals = $this->getTotals((int) $cart->getId()); + $this->assertEquals(0, $totals->getGrandTotal()); + $this->assertEquals(-70, $totals->getDiscountAmount()); + } + /** * Get list of orders by quote id. * @@ -632,4 +678,31 @@ private function saveRule(Rule $rule): void $resourceModel = $this->objectManager->get(\Magento\SalesRule\Model\ResourceModel\Rule::class); $resourceModel->save($rule); } + /** + * @param int $cartId + * @return TotalsInterface + */ + private function getTotals(int $cartId): TotalsInterface + { + /** @var Address $address */ + $address = $this->objectManager->get(AddressFactory::class)->create(); + $totalsManagement = $this->objectManager->get(TotalsInformationManagement::class); + $address->setAddressType(Address::ADDRESS_TYPE_SHIPPING) + ->setCountryId('US') + ->setRegionId(12) + ->setRegion('California') + ->setPostcode('90230'); + $addressInformation = $this->objectManager->create( + TotalsInformationInterface::class, + [ + 'data' => [ + 'address' => $address, + 'shipping_method_code' => 'flatrate', + 'shipping_carrier_code' => 'flatrate', + ], + ] + ); + + return $totalsManagement->calculate($cartId, $addressInformation); + } } From 2f936f343a8d2bd3ebe897da4bc7191846bba110 Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Fri, 11 Nov 2022 21:13:12 +0530 Subject: [PATCH 118/985] ACQE-4203: Done the changes --- .../AddingSeveralFPTToSimpleProductTest.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml index 0ab20d8c7c9da..56e834ad39923 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/AddingSeveralFPTToSimpleProductTest.xml @@ -29,28 +29,28 @@ <!-- Store -> Configuration -> Sales -> Tax FPT Enable --> <createData entity="WeeeConfigEnable" stepKey="enableFPT"/> - <!-- Fixed Product Tax 1 attribute is created and added to default attribute set --> - <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeOne"/> + <!-- Fixed Product 1 Tax attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeFour"/> <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet1"> - <requiredEntity createDataKey="createProductFPTAttributeOne"/> + <requiredEntity createDataKey="createProductFPTAttributeFour"/> </createData> <!-- Fixed Product Tax 2 attribute is created and added to default attribute set --> - <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeTwo"/> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeThree"/> <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet2"> - <requiredEntity createDataKey="createProductFPTAttributeTwo"/> + <requiredEntity createDataKey="createProductFPTAttributeThree"/> </createData> <!-- Fixed Product Tax 3 attribute is created and added to default attribute set --> - <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeThree"/> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeTwo"/> <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet3"> - <requiredEntity createDataKey="createProductFPTAttributeThree"/> + <requiredEntity createDataKey="createProductFPTAttributeTwo"/> </createData> - <!-- Fixed Product 4 Tax attribute is created and added to default attribute set --> - <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeFour"/> + <!-- Fixed Product Tax 4 attribute is created and added to default attribute set --> + <createData entity="FPTProductAttribute" stepKey="createProductFPTAttributeOne"/> <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet4"> - <requiredEntity createDataKey="createProductFPTAttributeFour"/> + <requiredEntity createDataKey="createProductFPTAttributeOne"/> </createData> <!-- Magento cache is flushed --> From 44e2341a64a5cfafa7f2458634eb2f25c9743058 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Mon, 14 Nov 2022 11:31:18 +0530 Subject: [PATCH 119/985] ACQE-4219 --- ...SelectedOptionsAreRemovedFromAdminTest.xml | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest.xml diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest.xml new file mode 100644 index 0000000000000..963f144dfeaad --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest.xml @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest"> + <annotations> + <features value="Bundle"/> + <stories value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/> + <title value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/> + <description value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4608"/> + </annotations> + <before> + <!-- Create Customer Account --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <!-- simple product1--> + <createData entity="SimpleProduct" stepKey="SimpleProduct1"> + <field key="price">10.00</field> + </createData> + + <!-- simple product2 --> + <createData entity="SimpleProduct" stepKey="SimpleProduct2"> + <field key="price">15.00</field> + </createData> + + <createData entity="ApiBundleProduct" stepKey="createBundleProduct"/> + + <createData entity="RadioButtonsOption" stepKey="radioButtonsOption1"> + <requiredEntity createDataKey="createBundleProduct"/> + </createData> + + <createData entity="RadioButtonsOption" stepKey="radioButtonsOption2"> + <requiredEntity createDataKey="createBundleProduct"/> + </createData> + + <createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct1"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="radioButtonsOption1"/> + <requiredEntity createDataKey="SimpleProduct1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct12"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="radioButtonsOption2"/> + <requiredEntity createDataKey="SimpleProduct2"/> + </createData> + + <!-- Login as admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct1" stepKey="DeleteSimpleProduct1"/> + + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct2" stepKey="DeleteSimpleProduct2"/> + + <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> + + <!-- Log out --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!--Login customer on storefront--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer"> + <argument name="Customer" value="$$createCustomer$$" /> + </actionGroup> + <!--Open Product Page--> + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openBundleProductPage"> + <argument name="product" value="$createBundleProduct$"/> + </actionGroup> + <!--Add bundle to cart--> + <actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart"/> + <actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart"> + <argument name="quantity" value="1"/> + </actionGroup> + + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCart"/> + + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('1')}}" userInput="1 x $$SimpleProduct1.name$$ $10.00" stepKey="seeOptionValue1"/> + <see selector="{{StorefrontBundledSection.nthItemOptionsValue('2')}}" userInput="1 x $$SimpleProduct2.name$$ $15.00" stepKey="seeOptionValue2"/> + + <openNewTab stepKey="openNewTab"/> + + <!--Open bundle product in admin--> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> + <argument name="productId" value="$createBundleProduct.id$"/> + </actionGroup> + + <!-- Remove second option --> + <actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption"> + <argument name="deleteIndex" value="1"/> + </actionGroup> + + <!-- Save product form --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/> + + <switchToPreviousTab stepKey="switchToPreviousTab"/> + + <reloadPage stepKey="reloadPage"/> + + <dontSee selector="{{StorefrontBundledSection.nthItemOptionsValue('2')}}" userInput="1 x $$SimpleProduct1.name$$ $15.00" stepKey="assertNotBannerDescription"/> + + <actionGroup ref="AssertStorefrontErrorMessageSignInPopupFormActionGroup" stepKey="seeErrorMessage"> + <argument name="message" value="Some of the products below do not have all the required options."/> + </actionGroup> + + <click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/> + + <click selector="{{StorefrontProductInfoMainSection.updateCart}}" stepKey="clickUpdateCartButton"/> + + <click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> + + <see selector="{{CheckoutHeaderSection.shippingMethodStep}}" userInput="Shipping" stepKey="checkShippingHeader"/> + + </test> +</tests> From c1b21cbbfe555205a71d0f33b35ff2131c2d7389 Mon Sep 17 00:00:00 2001 From: "shashikant.kumar" <shashikant.kumar@BLR1-LMC-N71379.local> Date: Mon, 14 Nov 2022 17:19:05 +0530 Subject: [PATCH 120/985] modified element discountAmountError in AdminCartPriceRulesFormSection --- .../Test/Mftf/Section/AdminCartPriceRulesFormSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml index facd9ef4f863d..8305adbe46d61 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml @@ -84,7 +84,7 @@ <element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/> <element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/> <element name="discountAmount" type="input" selector="input[name='discount_amount']"/> - <element name="discountAmountError" type="text" selector="//label[@class='admin__field-error' and text()='Please enter a number 0 or greater,without comma in this field.']"/> + <element name="negativeDiscountAmountError" type="text" selector="//label[@class='admin__field-error' and text()='Please enter a number 0 or greater,without comma in this field.']"/> <element name="maximumQtyDiscount" type="input" selector="input[name='discount_qty']"/> <element name="discountStep" type="input" selector="input[name='discount_step']"/> <element name="applyToShippingAmount" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='apply_to_shipping']/../label"/> From c1c6ef8471f2ea688b31a11a691979c5d611ed40 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Mon, 14 Nov 2022 17:36:47 +0530 Subject: [PATCH 121/985] ACQE-4220 --- .../EditOrderWithBundleProductBackendTest.xml | 190 ++++++++++++++++++ .../AdminOrderDetailsMainActionsSection.xml | 1 + .../AdminOrderFormConfigureProductSection.xml | 2 + .../Mftf/Section/AdminOrderTotalSection.xml | 1 + 4 files changed, 194 insertions(+) create mode 100644 app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml new file mode 100644 index 0000000000000..a08649537e145 --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="EditOrderWithBundleProductBackendTest"> + <annotations> + <features value="Bundle"/> + <stories value="Edit order with bundle product (backend)"/> + <title value="Edit order with bundle product (backend)"/> + <description value="Edit order with bundle product (backend)"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4601"/> + </annotations> + <before> + + <!--Set default flat rate shipping method settings--> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <!-- Create Customer Account --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <!-- Create Customer Account --> + <createData entity="Simple_US_Customer" stepKey="createCustomer2"/> + <!-- simple product1--> + <createData entity="SimpleProduct" stepKey="SimpleProduct1"> + <field key="price">10.00</field> + </createData> + + <!-- simple product2 --> + <createData entity="SimpleProduct" stepKey="SimpleProduct2"> + <field key="price">15.00</field> + </createData> + + <!-- simple product3--> + <createData entity="SimpleProduct" stepKey="SimpleProduct3"> + <field key="price">20.00</field> + </createData> + + <!-- simple product3--> + <createData entity="SimpleProduct" stepKey="SimpleProduct4"> + <field key="price">25.00</field> + </createData> + + <createData entity="ApiBundleProduct" stepKey="createBundleProduct"/> + + <createData entity="CheckboxOption" stepKey="checkboxBundleOption1"> + <requiredEntity createDataKey="createBundleProduct"/> + </createData> + + <createData entity="DropDownBundleOption" stepKey="dropDownBundleOption2"> + <requiredEntity createDataKey="createBundleProduct"/> + </createData> + + <createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct1"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="checkboxBundleOption1"/> + <requiredEntity createDataKey="SimpleProduct1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct12"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="checkboxBundleOption1"/> + <requiredEntity createDataKey="SimpleProduct2"/> + </createData> + + <createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct21"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="dropDownBundleOption2"/> + <requiredEntity createDataKey="SimpleProduct3"/> + </createData> + <createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct22"> + <requiredEntity createDataKey="createBundleProduct"/> + <requiredEntity createDataKey="dropDownBundleOption2"/> + <requiredEntity createDataKey="SimpleProduct4"/> + </createData> + + + <!-- Login as admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <!--Remove default flat rate shipping method settings--> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <deleteData createDataKey="createCustomer2" stepKey="deleteCustomer2"/> + + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct1" stepKey="DeleteSimpleProduct1"/> + + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct2" stepKey="DeleteSimpleProduct2"/> + + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct3" stepKey="DeleteSimpleProduct3"/> + + <!-- Delete the simple product --> + <deleteData createDataKey="SimpleProduct4" stepKey="DeleteSimpleProduct4"/> + + <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> + + <!-- Log out --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!--Get bundle product option.--> + <amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="openBundleProductEditPage"/> + + <!--Create new customer order.--> + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> + <argument name="customer" value="$createCustomer$"/> + </actionGroup> + <!--Add bundle product to order.--> + <actionGroup ref="AdminFilterProductInCreateOrderActionGroup" stepKey="filterBundleProduct"> + <argument name="productSKU" value="$createBundleProduct.sku$"/> + </actionGroup> + + <click selector="{{AdminOrderFormConfigureProductSection.selectOption}}" stepKey="clickTodropdown"/> + + <click selector="{{AdminOrderFormConfigureProductSection.selectProductOption('2')}}" stepKey="clickToSelectOption"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductFromCheckbox('1')}}" stepKey="clickToCheckboxOption"/> + <fillField userInput="1" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty"/> + + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> + + <!--Select FlatRate shipping method--> + <actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> + + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> + <wait time="2" stepKey="waitForPageLoad1"/> + <!--Create new customer order.--> + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer2"> + <argument name="customer" value="$createCustomer2$"/> + </actionGroup> + <!--Add bundle product to order.--> + <actionGroup ref="AdminFilterProductInCreateOrderActionGroup" stepKey="filterBundleProduct1"> + <argument name="productSKU" value="$createBundleProduct.sku$"/> + </actionGroup> + <click selector="{{AdminOrderFormConfigureProductSection.selectOption}}" stepKey="clickTodropdown1"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductOption('2')}}" stepKey="clickToSelectOption1"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductFromCheckbox('1')}}" stepKey="clickToCheckboxOption1"/> + <fillField userInput="1" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty1"/> + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover1"/> + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton1"/> + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts1"/> + <!--Select FlatRate shipping method--> + <actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod1"/> + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder1"/> + <wait time="2" stepKey="waitForPageLoad2" /> + <click selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="clickEditButton"/> + <click selector="{{AdminOrderDetailsMainActionsSection.ok}}" stepKey="clickOk"/> + <click selector="{{AdminOrderFormItemsSection.configure}}" stepKey="clickConfigure"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectOption}}" stepKey="clickTodropdown2"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductOption('3')}}" stepKey="clickToSelectOption2"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductFromCheckbox('1')}}" stepKey="deselectProduct3"/> + <click selector="{{AdminOrderFormConfigureProductSection.selectProductFromCheckbox('2')}}" stepKey="clickToCheckboxOption2"/> + <fillField userInput="1" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty2"/> + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover2"/> + <click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantity"/> + <grabTextFrom selector="{{AdminOrderFormItemsOrderedSection.itemsSKU('1')}}" stepKey="grabSKU"/> + + <!-- Check that product total is correct --> + <assertStringContainsString stepKey="AssertSKU"> + <actualResult type="const">$grabSKU</actualResult> + <expectedResult type="string">SKU:</expectedResult> + </assertStringContainsString> + + <assertStringContainsString stepKey="AssertBundleProduct"> + <actualResult type="const">$grabSKU</actualResult> + <expectedResult type="const">$$createBundleProduct.sku$$</expectedResult> + </assertStringContainsString> + + <assertStringContainsString stepKey="AssertProduct2"> + <actualResult type="const">$grabSKU</actualResult> + <expectedResult type="const">$$SimpleProduct2.sku$$</expectedResult> + </assertStringContainsString> + + <assertStringContainsString stepKey="AssertProduct4"> + <actualResult type="const">$grabSKU</actualResult> + <expectedResult type="const">$$SimpleProduct4.sku$$</expectedResult> + </assertStringContainsString> + + <see userInput="$40.00" selector="{{AdminOrderTotalSection.subTotal1}}" stepKey="checkSubTotal"/> + </test> +</tests> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml index 9ce111663720d..94441c5e7030e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderDetailsMainActionsSection.xml @@ -26,5 +26,6 @@ <element name="shipBtn" type="button" selector="//button[@title='Ship']"/> <element name="shipmentsTab" type="button" selector="#sales_order_view_tabs_order_shipments"/> <element name="authorize" type="button" selector="#order_authorize"/> + <element name="ok" type="button" selector=".//*[@data-role='action']"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml index 2e9b8b18d0586..ab9911bce876f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormConfigureProductSection.xml @@ -20,5 +20,7 @@ <element name="downloadableInformation" type="block" selector="._show #catalog_product_composite_configure_fields_downloadable"/> <element name="checkLinkDownloadableProduct" type="checkbox" selector="//label[contains(text(),'{{link}}')]/preceding-sibling::input" parameterized="true"/> <element name="selectOption" type="select" selector="//form[@id='product_composite_configure_form']//select"/> + <element name="selectProductOption" type="select" selector="(.//*[@class='control admin__field-control']/select)[3]//option[{{var}}]" parameterized="true"/> + <element name="selectProductFromCheckbox" type="select" selector="(.//*[@class='nested last']//div/input)[{{var}}]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml index 58fe442cdee6c..aa3e367505d8e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderTotalSection.xml @@ -19,5 +19,6 @@ <element name="fpt" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[normalize-space(.)='FPT']/following-sibling::td//span[@class='price']"/> <element name="taxRule1" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[normalize-space(.)='Canada-GST-5% (5%)']/following-sibling::td//span[@class='price']"/> <element name="taxRule2" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[normalize-space(.)='Canada-GST-PST-5% (5%)']/following-sibling::td//span[@class='price']"/> + <element name="subTotal1" type="text" selector=".//*[@class='col-subtotal col-price']"/> </section> </sections> From 533a9a36d85152f7df9694c2363ce3150acb4dfb Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 14 Nov 2022 12:35:49 -0600 Subject: [PATCH 122/985] ACPT-826 --- .../Api/AsyncConfigPublisherInterface.php | 12 +++++++++- .../Api/Data/AsyncConfigMessageInterface.php | 9 +++++++ .../Model/AsyncConfigPublisher.php | 10 +++++++- .../Magento/AsyncConfig/Model/Consumer.php | 12 ++++++++++ .../Model/Entity/AsyncConfigMessage.php | 8 +++++++ app/code/Magento/AsyncConfig/README.md | 24 +++++++++++++++++++ app/code/Magento/AsyncConfig/registration.php | 1 + .../Adminhtml/System/Config/Save.php | 11 +++++---- 8 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 app/code/Magento/AsyncConfig/README.md diff --git a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php index 7172e5b98eba9..2807284887296 100644 --- a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php +++ b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php @@ -1,9 +1,19 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\AsyncConfig\Api; interface AsyncConfigPublisherInterface { - + /** + * Save Configuration Data + * + * @param $configData + * @return void + */ public function saveConfigData($configData); } diff --git a/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php b/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php index 3f73a722d8070..dc3c624a6a438 100644 --- a/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php +++ b/app/code/Magento/AsyncConfig/Api/Data/AsyncConfigMessageInterface.php @@ -1,15 +1,24 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\AsyncConfig\Api\Data; interface AsyncConfigMessageInterface { /** + * Get Configuration data + * * @return string */ public function getConfigData(); /** + * Set Configuration data + * * @param string $data * @return void */ diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 4007d229b5121..9c59d1939f2a9 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -1,4 +1,9 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\AsyncConfig\Model; @@ -23,8 +28,8 @@ class AsyncConfigPublisher implements \Magento\AsyncConfig\Api\AsyncConfigPublis */ private $serializer; - /** + * * @param AsyncConfigMessageInterfaceFactory $asyncConfigFactory * @param PublisherInterface $publisher * @param Json $json @@ -39,6 +44,9 @@ public function __construct( $this->serializer = $json; } + /** + * @inheritDoc + */ public function saveConfigData($configData) { $asyncConfig = $this->asyncConfigFactory->create(); diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php index c1cb02c666053..f239fa67a5d99 100644 --- a/app/code/Magento/AsyncConfig/Model/Consumer.php +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -1,4 +1,9 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\AsyncConfig\Model; @@ -19,6 +24,11 @@ class Consumer */ private $serializer; + /** + * + * @param \Magento\Config\Model\Config\Factory $configFactory + * @param Json $json + */ public function __construct( \Magento\Config\Model\Config\Factory $configFactory, Json $json @@ -27,6 +37,8 @@ public function __construct( $this->serializer = $json; } /** + * Process Consumer + * * @param AsyncConfigMessageInterface $asyncConfigMessage * @return void * @throws \Exception diff --git a/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php b/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php index e014591603393..5088aa9f0d092 100644 --- a/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php +++ b/app/code/Magento/AsyncConfig/Model/Entity/AsyncConfigMessage.php @@ -1,4 +1,9 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\AsyncConfig\Model\Entity; @@ -6,6 +11,9 @@ class AsyncConfigMessage implements AsyncConfigMessageInterface { + /** + * @var string + */ private $data; /** diff --git a/app/code/Magento/AsyncConfig/README.md b/app/code/Magento/AsyncConfig/README.md new file mode 100644 index 0000000000000..cc8bc7d3fb31f --- /dev/null +++ b/app/code/Magento/AsyncConfig/README.md @@ -0,0 +1,24 @@ +# AsyncConfig + +The _AsyncConfig_ module enables admin config save asynchronously, which saves configuration in a queue, and processes it in a first-in-first-out basis. + +AsyncConfig values: + +- `0` — (_Default value_) Disable the AsyncConfig module and use the standard synchronous configuration save. +- `1` — Enable the AsyncConfig module for asynchronous config save. + +To enable AsyncConfig, set the `config/async` variable in the `env.php` file. For example: + +```php +<?php + 'config' => [ + 'async' => 1 + ] +``` + +Alternatively, you can set the variable using the command-line interface: + +```bash +bin/magento setup:config:set --config-async 1 +``` + diff --git a/app/code/Magento/AsyncConfig/registration.php b/app/code/Magento/AsyncConfig/registration.php index 3759211336006..fd94ddf4662f4 100644 --- a/app/code/Magento/AsyncConfig/registration.php +++ b/app/code/Magento/AsyncConfig/registration.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); use Magento\Framework\Component\ComponentRegistrar; diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 6d36621c62117..d384b3f1332d6 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -10,6 +10,7 @@ use Magento\Config\Controller\Adminhtml\System\AbstractConfig; use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Exception\LocalizedException; /** * System Configuration Save Controller @@ -234,11 +235,11 @@ public function execute() $website = $this->getRequest()->getParam('website'); $store = $this->getRequest()->getParam('store'); $configData = [ - 'section' => $section, - 'website' => $website, - 'store' => $store, - 'groups' => $this->_getGroupsForSave(), - ]; + 'section' => $section, + 'website' => $website, + 'store' => $store, + 'groups' => $this->_getGroupsForSave(), + ]; $configData = $this->filterNodes($configData); $groups = $this->getRequest()->getParam('groups'); From 5984c109a06b35be03f785cc4baac6dacebd47f8 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 14 Nov 2022 13:56:37 -0600 Subject: [PATCH 123/985] ACPT-826 --- .../Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php | 4 ++-- app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 2 +- app/code/Magento/AsyncConfig/composer.json | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php index 2807284887296..eccc5d09e72db 100644 --- a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php +++ b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php @@ -12,8 +12,8 @@ interface AsyncConfigPublisherInterface /** * Save Configuration Data * - * @param $configData + * @param array $configData * @return void */ - public function saveConfigData($configData); + public function saveConfigData(array $configData); } diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 9c59d1939f2a9..97c17f4dd8644 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -47,7 +47,7 @@ public function __construct( /** * @inheritDoc */ - public function saveConfigData($configData) + public function saveConfigData(array $configData) { $asyncConfig = $this->asyncConfigFactory->create(); $asyncConfig->setConfigData($this->serializer->serialize($configData)); diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 3e433e07de4d5..9dd0875895251 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -7,7 +7,9 @@ "require": { "php": "~7.4.0||~8.1.0", "magento/framework": "*", - "magento/framework-message-queue": "*", + "magento/framework-message-queue": "*" + }, + "suggest": { "magento/module-config": "*" }, "type": "magento2-module", From 93802bebaedfd1d3376ca190a9e5b2b413b0688b Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 14 Nov 2022 15:17:43 -0600 Subject: [PATCH 124/985] ACPT-826 --- app/code/Magento/AsyncConfig/composer.json | 4 +--- .../Controller/Adminhtml/System/Config/Save.php | 15 +++++++++------ app/code/Magento/Config/composer.json | 4 +++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 9dd0875895251..3e433e07de4d5 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -7,9 +7,7 @@ "require": { "php": "~7.4.0||~8.1.0", "magento/framework": "*", - "magento/framework-message-queue": "*" - }, - "suggest": { + "magento/framework-message-queue": "*", "magento/module-config": "*" }, "type": "magento2-module", diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index d384b3f1332d6..a60aa97e10b65 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -10,6 +10,7 @@ use Magento\Config\Controller\Adminhtml\System\AbstractConfig; use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; /** @@ -56,8 +57,8 @@ class Save extends AbstractConfig implements HttpPostActionInterface * @param \Magento\Config\Model\Config\Factory $configFactory * @param \Magento\Framework\Cache\FrontendInterface $cache * @param \Magento\Framework\Stdlib\StringUtils $string - * @param DeploymentConfig $deploymentConfig - * @param AsyncConfigPublisherInterface $asyncConfigPublisher + * @param DeploymentConfig|null $deploymentConfig + * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher */ public function __construct( \Magento\Backend\App\Action\Context $context, @@ -66,15 +67,17 @@ public function __construct( \Magento\Config\Model\Config\Factory $configFactory, \Magento\Framework\Cache\FrontendInterface $cache, \Magento\Framework\Stdlib\StringUtils $string, - DeploymentConfig $deploymentConfig, - AsyncConfigPublisherInterface $asyncConfigPublisher + DeploymentConfig $deploymentConfig = null, + AsyncConfigPublisherInterface $asyncConfigPublisher = null ) { parent::__construct($context, $configStructure, $sectionChecker); $this->_configFactory = $configFactory; $this->_cache = $cache; $this->string = $string; - $this->deploymentConfig = $deploymentConfig; - $this->asyncConfigPublisher = $asyncConfigPublisher; + $this->deploymentConfig = $deploymentConfig + ?? ObjectManager::getInstance()->get(DeploymentConfig::class); + $this->asyncConfigPublisher = $asyncConfigPublisher + ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); } /** diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 13e20ba7198a4..37ec7a79b23bb 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -13,7 +13,9 @@ "magento/module-directory": "*", "magento/module-email": "*", "magento/module-media-storage": "*", - "magento/module-store": "*", + "magento/module-store": "*" + }, + "suggest": { "magento/module-async-config": "*" }, "type": "magento2-module", From 161d083774c97a1af16be3d263a63eb9e2244f1a Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Tue, 15 Nov 2022 14:08:59 +0530 Subject: [PATCH 125/985] ACQE-4220 --- .../Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml index a08649537e145..9f9154365ac17 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml @@ -164,6 +164,7 @@ <click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantity"/> <grabTextFrom selector="{{AdminOrderFormItemsOrderedSection.itemsSKU('1')}}" stepKey="grabSKU"/> + <waitForPageLoad stepKey="waitForPageload"/> <!-- Check that product total is correct --> <assertStringContainsString stepKey="AssertSKU"> <actualResult type="const">$grabSKU</actualResult> From caff03926bd1d5d7d521c577081db5b0543cf6f2 Mon Sep 17 00:00:00 2001 From: Shashikant521993 <81364908+Shashikant521993@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:42:11 +0530 Subject: [PATCH 126/985] negativeDiscountAmountError element xath change --- .../Test/Mftf/Section/AdminCartPriceRulesFormSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml index 8305adbe46d61..80169374fd8d4 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml @@ -84,7 +84,7 @@ <element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/> <element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/> <element name="discountAmount" type="input" selector="input[name='discount_amount']"/> - <element name="negativeDiscountAmountError" type="text" selector="//label[@class='admin__field-error' and text()='Please enter a number 0 or greater,without comma in this field.']"/> + <element name="negativeDiscountAmountError" type="text" selector="//label[@class='admin__field-error' and text()='Please enter a number 0 or greater, without comma in this field.']"/> <element name="maximumQtyDiscount" type="input" selector="input[name='discount_qty']"/> <element name="discountStep" type="input" selector="input[name='discount_step']"/> <element name="applyToShippingAmount" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='apply_to_shipping']/../label"/> From 62aefbba67f76884996ccf486757661fc68a107d Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Tue, 15 Nov 2022 16:48:52 +0530 Subject: [PATCH 127/985] ACQE-4220 --- .../Mftf/Test/EditOrderWithBundleProductBackendTest.xml | 6 +++--- .../Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml index 9f9154365ac17..8859f9d2a3c86 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EditOrderWithBundleProductBackendTest.xml @@ -163,8 +163,8 @@ <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover2"/> <click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantity"/> <grabTextFrom selector="{{AdminOrderFormItemsOrderedSection.itemsSKU('1')}}" stepKey="grabSKU"/> + <grabTextFrom selector="{{AdminOrderFormItemsSection.productName}}" stepKey="grabProductName"/> - <waitForPageLoad stepKey="waitForPageload"/> <!-- Check that product total is correct --> <assertStringContainsString stepKey="AssertSKU"> <actualResult type="const">$grabSKU</actualResult> @@ -172,8 +172,8 @@ </assertStringContainsString> <assertStringContainsString stepKey="AssertBundleProduct"> - <actualResult type="const">$grabSKU</actualResult> - <expectedResult type="const">$$createBundleProduct.sku$$</expectedResult> + <actualResult type="const">$grabProductName</actualResult> + <expectedResult type="string">$$createBundleProduct.name$$</expectedResult> </assertStringContainsString> <assertStringContainsString stepKey="AssertProduct2"> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml index bd94e985fe3cf..0497bdbeb26fb 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsSection.xml @@ -38,5 +38,6 @@ <element name="removeCoupon" type="button" selector=".added-coupon-code .action-remove"/> <element name="totalRecords" type="text" selector="#sales_order_create_search_grid-total-count"/> <element name="numberOfPages" type="text" selector="div.admin__data-grid-pager-wrap div.admin__data-grid-pager > label"/> + <element name="productName" type="button" selector="(.//*[@class='col-product'])[2]/span"/> </section> </sections> From 22835723b49c74d4cd306622323c31de191d3bd6 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 15 Nov 2022 17:00:40 +0200 Subject: [PATCH 128/985] ACP2E-1353: allow image/x-icon favicon --- app/code/Magento/MediaStorage/Model/File/Validator/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 6b022e18a7960..5bd8e75dd7e2a 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -27,7 +27,7 @@ class Image extends AbstractValidator 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'bmp' => 'image/bmp', - 'ico' => 'image/vnd.microsoft.icon', + 'ico' => ['image/vnd.microsoft.icon', 'image/x-icon'] ]; /** From 49da545748306b192a3acddb5eae5817a9c8384a Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Tue, 15 Nov 2022 13:55:14 -0600 Subject: [PATCH 129/985] ACPT-826 --- .../Magento/AsyncConfig/Model/Consumer.php | 28 ++++++++++++++++--- .../Adminhtml/System/Config/Save.php | 5 ++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php index f239fa67a5d99..ad5c55f04bdd5 100644 --- a/app/code/Magento/AsyncConfig/Model/Consumer.php +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -8,6 +8,10 @@ namespace Magento\AsyncConfig\Model; use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface; +use Magento\Config\Controller\Adminhtml\System\Config\Save; +use Magento\Config\Model\Config\Factory; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Config\ScopeInterface; use Magento\Framework\Serialize\Serializer\Json; class Consumer @@ -15,7 +19,7 @@ class Consumer /** * Backend Config Model Factory * - * @var \Magento\Config\Model\Config\Factory + * @var Factory */ private $configFactory; @@ -24,17 +28,32 @@ class Consumer */ private $serializer; + /** + * @var ScopeInterface + */ + private $scope; + + /** + * @var Save + */ + private $save; + /** * - * @param \Magento\Config\Model\Config\Factory $configFactory + * @param Factory $configFactory * @param Json $json + * @param ScopeInterface $scope */ public function __construct( - \Magento\Config\Model\Config\Factory $configFactory, - Json $json + Factory $configFactory, + Json $json, + ScopeInterface $scope ) { $this->configFactory = $configFactory; $this->serializer = $json; + $this->scope = $scope; + $this->scope->setCurrentScope('adminhtml'); + $this->save = ObjectManager::getInstance()->get(Save::class); } /** * Process Consumer @@ -47,6 +66,7 @@ public function process(AsyncConfigMessageInterface $asyncConfigMessage): void { $configData = $asyncConfigMessage->getConfigData(); $data = $this->serializer->unserialize($configData); + $data = $this->save->filterNodes($data); /** @var \Magento\Config\Model\Config $configModel */ $configModel = $this->configFactory->create(['data' => $data]); $configModel->save(); diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index a60aa97e10b65..88a77226fee03 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -243,8 +243,6 @@ public function execute() 'store' => $store, 'groups' => $this->_getGroupsForSave(), ]; - $configData = $this->filterNodes($configData); - $groups = $this->getRequest()->getParam('groups'); if (isset($groups['country']['fields'])) { @@ -259,6 +257,7 @@ public function execute() } } if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { + $configData = $this->filterNodes($configData); /** @var \Magento\Config\Model\Config $configModel */ $configModel = $this->_configFactory->create(['data' => $configData]); $configModel->save(); @@ -359,7 +358,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf * @param array $configData * @return array */ - private function filterNodes(array $configData): array + public function filterNodes(array $configData): array { if (!empty($configData['groups'])) { $systemXmlPathsFromKeys = array_keys($this->_configStructure->getFieldPaths()); From 27ebc6b7be338de0c6c17b0d03b57ad1ab59f5c4 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Tue, 15 Nov 2022 14:24:28 -0600 Subject: [PATCH 130/985] ACPT-826 --- app/code/Magento/Config/composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 37ec7a79b23bb..13e20ba7198a4 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -13,9 +13,7 @@ "magento/module-directory": "*", "magento/module-email": "*", "magento/module-media-storage": "*", - "magento/module-store": "*" - }, - "suggest": { + "magento/module-store": "*", "magento/module-async-config": "*" }, "type": "magento2-module", From afa8dc56f68d6b785202ee51330702b536844360 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Wed, 16 Nov 2022 12:04:41 +0530 Subject: [PATCH 131/985] ACQE-3878 --- .../Catalog/Test/Mftf/Section/AdminProductImagesSection.xml | 2 ++ .../Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml index 0de3e6de1dee1..d7096243101ff 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml @@ -22,6 +22,7 @@ <element name="productImagesToggleState" type="button" selector="[data-index='gallery'] > [data-state-collapsible='{{status}}']" parameterized="true"/> <element name="nthProductImage" type="button" selector="#media_gallery_content > div:nth-child({{var}}) img.product-image" parameterized="true"/> <element name="nthRemoveImageBtn" type="button" selector="#media_gallery_content > div:nth-child({{var}}) button.action-remove" parameterized="true"/> + <element name="thrumbnailimage" type="text" selector="//*[@class='thumbnail-wrapper']//img[contains(@src, '{{url}}')]" parameterized="true"/> <element name="altText" type="textarea" selector="textarea[data-role='image-description']"/> @@ -35,5 +36,6 @@ <element name="isSmallSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Small']"/> <element name="isThumbnailSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Thumbnail']"/> <element name="isSwatchSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Swatch']"/> + <element name="hideFromProductPage" type="checkbox" selector=".//*[@id='hide-from-product-page']"/> </section> </sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml index 3482a45b6fa91..9bb999d643add 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml @@ -48,5 +48,6 @@ <element name="productCountLabel" type="text" selector="//*[@id='minicart-content-wrapper']/div[2]/div[1]/span[2]"/> <element name="productCartName" type="text" selector="//tbody[@class='cart item']//strong[@class='product-item-name']//a[contains(text(),'{{var}}')]" parameterized="true"/> <element name="minicartclose" type="button" selector="//button[@id='btn-minicart-close']"/> + <element name="image" type="text" selector="//*[@class='product-image-container']//img[contains(@src, '{{var1}}')]" parameterized="true"/> </section> </sections> From 3603cc2733ee96dcaf3321ee388aaed68b6c2c68 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 16 Nov 2022 16:22:40 +0200 Subject: [PATCH 132/985] ACP2E-1358, replaced insertOnDuplicateKey with corresponding insert / update queries for attributes --- .../Eav/Model/Entity/AbstractEntity.php | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 08823bacce4d4..ba1be876130dc 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1351,6 +1351,7 @@ protected function _collectSaveData($newObject) ]; } } elseif (!$this->_isAttributeValueEmpty($attribute, $v)) { + //one of the attributes (159) ends up here, though it already exists in the table $insert[$attrId] = is_array($v) ? array_shift($v) : $v;//@TODO: MAGETWO-44182 } } @@ -1590,7 +1591,30 @@ protected function _processAttributeValues() { $connection = $this->getConnection(); foreach ($this->_attributeValuesToSave as $table => $data) { - $connection->insertOnDuplicate($table, $data, array_keys($data[0])); + $insert = []; + foreach ($data as $attributeData) { + $select = $connection->select()->from($table, 'value_id')->where("entity_id = :entity_id AND attribute_id = :attribute_id"); + $result = $connection->fetchOne($select, [ + 'attribute_id' => $attributeData['attribute_id'], + 'entity_id' => $attributeData['entity_id'] + ]); + if ($result) { + $updateWhere = []; + $updateWhere[] = sprintf('%s=%d', $connection->quoteIdentifier('entity_id'), $attributeData['entity_id']); + $updateWhere[] = sprintf('%s=%d', $connection->quoteIdentifier('attribute_id'), $attributeData['attribute_id']); + $connection->update($table, ['value' => $attributeData['value']], $updateWhere); + } else { + $insert[] = [ + 'attribute_id' => $attributeData['attribute_id'], + 'entity_id' => $attributeData['entity_id'], + 'value' => $attributeData['value'] + ]; + } + } + + if (!empty($insert)) { + $connection->insertArray($table, array_keys($insert[0]), $insert); + } } foreach ($this->_attributeValuesToDelete as $table => $valueIds) { From 30ee4ce76f5a6003248cf99bd292dafcbc4e936a Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 16 Nov 2022 16:26:21 +0200 Subject: [PATCH 133/985] ACP2E-1353: allow image/x-icon favicon --- .../Model/File/Validator/Image.php | 7 +- .../Unit/Model/File/Validator/ImageTest.php | 91 ++++++++++++++++++ .../_files/favicon-vnd-microsoft.ico} | Bin .../File/Validator/_files/favicon-x-icon.ico | Bin 0 -> 318 bytes .../File/Validator/_files/not-valid-file.ico | 0 5 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php rename app/code/Magento/{Theme/view/adminhtml/web/favicon.ico => MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico} (100%) create mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico create mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 5bd8e75dd7e2a..f35c4b11949ab 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -27,7 +27,7 @@ class Image extends AbstractValidator 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'bmp' => 'image/bmp', - 'ico' => ['image/vnd.microsoft.icon', 'image/x-icon'] + 'ico' => [ 'image/vnd.microsoft.icon', 'image/x-icon'] ]; /** @@ -68,12 +68,13 @@ public function __construct( public function isValid($filePath): bool { $fileMimeType = $this->fileMime->getMimeType($filePath); - $isValid = true; + $isValid = false; - if (in_array($fileMimeType, $this->imageMimeTypes)) { + if (stripos(serialize($this->imageMimeTypes), $fileMimeType) !== false) { try { $image = $this->imageFactory->create($filePath); $image->open(); + $isValid = true; } catch (\Exception $e) { $isValid = false; } diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php new file mode 100644 index 0000000000000..13a4d03bbc986 --- /dev/null +++ b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php @@ -0,0 +1,91 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\MediaStorage\Test\Unit\Model\File\Validator; + +use Magento\Framework\File\Mime; +use Magento\Framework\Filesystem\Driver\File; +use Magento\Framework\Image as FrameworkImage; +use Magento\Framework\Image\Factory; +use Magento\MediaStorage\Model\File\Validator\Image; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** Unit tests for \Magento\MediaStorage\Model\File\Validator\Image class */ +class ImageTest extends TestCase +{ + /** + * @var Mime|MockObject + */ + private $fileMimeMock; + + /** + * @var Factory|MockObject + */ + private $imageFactoryMock; + + /** + * @var FrameworkImage|MockObject + */ + private $imageMock; + + /** + * @var File|MockObject + */ + private $fileMock; + + /** + * @var Image + */ + private $image; + + protected function setUp(): void + { + $this->fileMimeMock = $this->createMock(Mime::class); + $this->imageFactoryMock = $this->createMock(Factory::class); + $this->fileMock = $this->createMock(File::class); + $this->imageMock = $this->createMock(FrameworkImage::class); + + $this->image = new Image( + $this->fileMimeMock, + $this->imageFactoryMock, + $this->fileMock + ); + } + + /** + * @dataProvider dataProviderForIsValid + */ + public function testIsValid($filePath, $mimeType, $result): void + { + $this->fileMimeMock->expects($this->once()) + ->method('getMimeType') + ->with($filePath) + ->willReturn($mimeType); + if ($result) { + $this->imageMock->expects($this->once()) + ->method('open') + ->willReturn(null); + $this->imageFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($this->imageMock); + } + $this->assertEquals($result, $this->image->isValid($filePath)); + } + + /** + * @return array[] + */ + public function dataProviderForIsValid() + { + return [ + 'x-icon' => [dirname(__FILE__) . '/_files/favicon-x-icon.ico', 'image/x-icon', true], + 'vnd-microsoft-icon' => [dirname(__FILE__) . '/_files/favicon-vnd-microsoft.ico', 'image/vnd.microsoft.icon', true], + 'not-valid-ico' => [dirname(__FILE__) . '/_files/not-valid-file.ico', 'text/plain', false] + ]; + } +} diff --git a/app/code/Magento/Theme/view/adminhtml/web/favicon.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/web/favicon.ico rename to app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a66eb60d9870fcc13831ca322c3730f0dfc0aa4c GIT binary patch literal 318 zcmbV`O$tIW41~X;pbNpS-0IR}X7@Z+4p8t49z=+fmkNRl!6`G7Ow%7|TD^A?*9NC_ zF_Vkf*h;}x{gySC*eon3)wsLN2n0#YB4!g6<Sy)QLY1(<5Pac~KIHf3h)@43w|VdT To%++`2)-$r{3mysJ=fV6#*<wB literal 0 HcmV?d00001 diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico new file mode 100644 index 0000000000000..e69de29bb2d1d From f9aad4315bfd0ce0e7feda9eb458e14e4ad86f2c Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 16 Nov 2022 16:26:22 +0200 Subject: [PATCH 134/985] ACP2E-1358, removed comments --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index ba1be876130dc..07e896e3baf9a 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1351,7 +1351,6 @@ protected function _collectSaveData($newObject) ]; } } elseif (!$this->_isAttributeValueEmpty($attribute, $v)) { - //one of the attributes (159) ends up here, though it already exists in the table $insert[$attrId] = is_array($v) ? array_shift($v) : $v;//@TODO: MAGETWO-44182 } } From 4349ed52566710b17633bbd558cbf6226a5098b4 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 16 Nov 2022 16:29:54 +0200 Subject: [PATCH 135/985] ACP2E-1353: allow image/x-icon favicon --- .../Theme/view/adminhtml/web/favicon.ico | Bin 0 -> 34494 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/code/Magento/Theme/view/adminhtml/web/favicon.ico diff --git a/app/code/Magento/Theme/view/adminhtml/web/favicon.ico b/app/code/Magento/Theme/view/adminhtml/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d467f2bcbaed42b9b9d8cf71604b18b94e825799 GIT binary patch literal 34494 zcmeI54~SJ&9><S=)|nM?h7cJ-e8cF5NQ6kput+n6ge*&hgh+@C&xnvkLLwr<nXPCg z!eWW2wiStpkO)~KEJCK8u#ixRh&IH1X{boZeJ1j-VeWpu_r3GxygT>LyYIc3dDFgI zUw`MGKfizHcmCWz?~XBx%<oKZuYvZP$Cnzj(-_m&S3W=Vdt*+L*WX`0f1i2}tTblR zrpoyrjJdwnnBn2_`G)(Ad3~EP8{k1zIF|DvnT~aPiv!>T@cO#F-l}>VQ-3KqG_cpZ z1@$Yq4&9%`gYv~HhpsHQ@%(jp?;X-7%IC$amGYpT%Zu`@;OpA<MXz$cCe(gC=i<51 z@<2|YXNLBw|3kHX#m;$df2&FPt!lpl-`oUY|DUhuC;vzJuSA^L7+6dCtxEkq>i-?w zQ90ib(_TE!0Y<>ggM4Dk+XXFvTKReJVe&4N^MhFUko17%Li%3Xeo-zD+MXdjY|BL{ z?_QTLK12Qu)f?DbRQw+TN5Q1>z*X=V@irrdEicON1V?~vqjsf%eDP&?YDm|0(8lU~ zob+9BjiyG8DGh;~G5`68F>k&ZjemY(%qvA>CMJyWddl_HR`U!~mDvO|e>HocYd?4o z$al<itvTSOxO@({^U`I`^UPJT{ZWr}`hGinegf*ND11#FxvHT9p09=Y!moHSls8f@ zbJ}T69JcjIyZm3}d@+!}+?cQOCw?DPxovMLdCS2;;`FAdlkf81=j0!wp7qy=lm8L< z^5-5<?Hl+Wbm}+D-^$(Y$ej)TfBKE`f7-FDk^Z&*kMqxy9sa@CsK-A~JL4j1eBGwp zjdP8!y8W+yp#C=S4G8o9n7o>~jq`f=pJX1XuCWyvOPMF{bo#yDrY(i{eZZaj;`}4~ zG}pffX3SNVpQY5%y5r7AQT}0V4)&z(+N^q7M@B$(u5$RUz|I#abJv|j-KaZ=oKsM% zLxp;$$=fR4P|eZIkDlhqntIHWvZLSX5Jf46hqoK*`qJ`Id&#ormTKQ~UlhN%JnAn8 zW8fyRe8N=wqDR3D|HbhQ=hJpAcn`R|OPs$1TDgzdir?fL?W@*@^@uz7ulUA)9`N6k z(C3@$gICO%!ApraOZnMPE}1X=OXhR`c{4t>#CThK%%m9#`1pT?BfK>L`@t}1#Xbx+ zH3xg!e(XI8m}|V{HHEWyf;`2K*5zPd4duG9_ycqYXgFTdRE9TmQE?Y205_(l)A`~! zWt%}7yG-TqWAEktJ63M3K0%CU5|C0Ex!NC2+c}-S#@r%#;j(X2SSA+3uiLE<me2lN z>(@)nqpP?Mx`*^<z}2BfK4mrhT;6V)dYVIbf(xPiu>BW9<%6_IlK%kZCx}yB7DXPE z6E|Mf4!06zt&s2IEA<t7GjFxaUup6uLDdGgyjAiY{vWygEAp$dRnIM-1^Fjj{vG*2 z|F@I>Z@c|75B=|T<WGB`<Nwyozna%7NSlAc@z+Z`?Qv}TwDsrcbngXYTkDT)E1F5Z zc(K-Y)9wIk$Is9>`QK2cdta`2tu2}4v!}R$oXBf5cyY~D9CHPr+uhXv3;B`jJp8n# zXR%*(bsaSVZ=SX^cF_I~a2SO5NNN7B>Wc2Cu<egoG(evAs{6oYQ03*MqvVfJUU2G! z+r5h~`jhmat?lb`34FewY%q!s`=gcMMask1##Wab?ESR&pAj46t*7mW(3*V==ashJ zMfB(TxR~0X_`4ro$Ed4)rj_kdT_ZmtUO;_(2*m0PuNRP==^6=s^5rn?bdBxGE~oX3 zDqsAHGR5i4^0FV^$CiO8U)P%lZ`qhnkP{{QG;y2hzCfBj$WQaL^iaGjj+dqJYqT8R z>+$IaP&dwQ5|=O1A1%ADkfa~7-Ek&eVxQ+E@llyS<@^5RknejvzCXUCjL)C<f1Q~4 z@1==}FDJ4dznq<z_|>2I-1nD^k4`Nq<Vsy$Pa!wCWNe5{eVKm&S*4usPmTJzPoayV z5ilF~DPWs;;JelI9oIy`cwU@Xxs3|Zw;R2mf_lJ?!7oVP+eT_es)CLWF^0}NdRzTP zHLi|=>V4lxCi9SqPP*6dDRA|TOf&!K{^qmvQRJRvF4f1^tI_2RbctKfB5kPHc>((H zT<Yt}LiQSPy`oE!o+)MC5tr{=rO|t1^STG|c5<$CcIBk&AB^MOnnP3KYgYAVpA@_g z;_9w+g8sMASMz6ee3I7qj=RqqsXz65!!om+(_Z_l{pj*@R6EMz;-}^wr)^99he6a> zh|^!!37XUHu{`RfwAlu}1A)A#c9hM9{=8ok%x!OIu8Y#c%|oZVz`v~Cmb!IpnzA|3 z-|7I>Tz3Fe<I?J4DP`g7$$9rbI)!8Iu+=wABkH!J{;!4gw&xxFgT8L%{1c8Hop=0C zz~P6vo_}m#bo{@t{2#opYv(9S7f}3MwK}`BqknZ>P1?WNG3(N-<G15~0*`oWWdH2? z-KIPKFZ*+$tY4k@Z_oH&S-IbC$Cahuy6c2Z$Bf@=<nOU{TuS~vV0pT<CF9r1LdGz5 zoN;8O>R-90eU&z`_ZTRf6a8fevba~_JqEoB()9nBIvcG0ag;i((qH$%>$+!5y<Y5i zJW40ZwotY`sw^sx`Y!`FZfrVh{OC7Ab9T=doi_tLFR=QCX=eQ$UIl!(E6QKZ<{_gG z90Bh0x3KOyZ$^L1PyX55tj=l=pKkCBxB)ExB$}kZ#>}-k`N&W5S6`!c&~^v?dA?40 zvPt()?@p3OxyImOXym;t^25H7-{imUB))DLbvGg7WCX7;Z+o8kSqHo~0L^ulM+y!6 zxWm;moJQx>@OulS#kiG~**6g~w<GVn40gz`dURVoI9H4x0J?{1bxWeM?<i<EHmkx( zz=!pzxF2MZFF(uQ4}tGNlD=-4=7xJ+`K?OBcNJ@Y+Vd1wms=V1p0&9-Y(F|}1fOQm z&9$i}U0EB);Fak;ny^ldoFntkAWLkxx=*6}yR=`^i0oFiL4MY;DH~3M$al3`rB_xy zmANtPS@uupy$7`I`yA*NwKi!SKL_SK#<TW=t&gsDZ*Yuszs+wo<z*q?4_+YB%Sw8Y zNG~h}FBEl^saX`zDPu;JU!{vG=UwAL{=u%oLCPmZhxqNfXwH~|XjgmCDd{o#w;#*& z%9S$ZH7(_1eMuDS3!-{u3+mw!qu=41QT-H*--6}H!VhCzg+-!;MPpr}o-sMmNn?gY ztI*3|Iu~crQm#ySNsDt`$PI%rFdy$}AvX3P?zHx=0WW}IFl+Ds#VRpR1=z|yI@t4E zglf*#9P$p(+S|7CU$gGQwx!@f@HL3qCtoFBb7|yzA<fF4&-U1~k@sDWL({LF^4<@; zm%5v}sqa0{r%h?H(O+Y{54;L=pTyl`rKj`!emd`IZdh=BKxd8deL&Zz>9)q#xy}CR z2!7D}FKI4si*oeT82<{OdsDW%e!C2>G0@g?1Nv<SS+4C|8`IKUmw0ctMJLB7f$f7J z&5mZukHv^?i|mZ{D^5-TUHjDQliz~<to^}n<G1ts=4IGE!2I?)Yo6|jrTJlA?MJ`< zq(GxQE&g?%YXsC>FLJKE(H8umc{9leiT2aB<@YS$$!`gZeat=DtKV$W{!=OKpJ>wl z!^D>EUu^+R?;GH;96SongP>nh^iS*mIj|o+%VX&cbY7pNZ(JGe7K8i2XMpiK9g}fw zluy0(uzy-#&8<&@-Xy)<GUA-y5_<2_CUVc})(xlI(0;|N`tKX&TJHO#j|u8T+D-n# ziT~;T56`8KhWjjhZtaYt;ri}5ZQ3pV!}dSn>Km1gv)krJwXt~}`#b$_<0OX8&H5KV z{yXt+2Wt$C>9^`U64NZm?u`G=_)m$S&iGFlK=`f&*FV#H^@zUc%zp{~S5bt|s&gM@ zH<FrD{#)PwUF_H&?}1MLcj7-~{#fYiUuXQs5C3+&|K+Y-N;kXycly86|FItEtbd*L z@Be)LTgLN)XYqj-<A+Aqf8E1BK9Kh|#tuFTsKfKGS-t*Cod2zEJU>~(GpM)GCHzb` ztNpV340r%6w*2ELb=tyys~`Go1^V5EeHSK+{TJ}z0ov9)E4I9&D0SP)e(8u#E5IIX z`Ifk-$9~0(>{tt;%#6*ev<vTf-1BDlKi7G_yeU?Jm;%`WR?+sMm?}Xwbrdi6fYewI z^P$Zh;A7z08%{TCzxXMZdA7`R(v1BR*0~ku#FgUfaiDj^!uE#GTVcQDDS1y3)ARC9 z8nTxH&5Ngi)hUg((ta!J4Dxq^Wv%GXG#<z?{66Py`u%;@TD?PM^{9u=hW(OT0vdan zzsZ(nuUig(#rn&Dc_@?J);D$7?>!Cgdd8CF=~B%NuYt^Sw`*rO4Zjuic^<0wIb3;l zr7M3&L;X|N`!LiS0D31aZXcH>S9)sgZfb6zJ!71|O_&dUpR2u4n%t=J)9~0KUSYo` zol{@$0O@|V-lu9rw%VKn4}wgxr58Fg#)J28vX1eJ4}!m|^(3-;lk7|@Ll3<JwiBEO zQT|QK)7)?zB>ukI>VeICQ$2Xs?i#Ywct@3&7%Ti1wdG@QIdQ1D0lgaX1K;lq=7u|I zZ_TYz#;E+f2V87~KWl;f{3*Vx%g<H8858sgbA$Ibvb0Z)@_%w(UiNwWX&b~PRO|RQ z@^qch=r}urZ+D4TMspgfUeWnJ;z4smvc1vevhy@}gnsAm6ePcMmLNmF8ESf-ZO92U zBG$T*zZ+ag&@stBS}&8z<H{84ioyOyb#G-m^w7TKS)l%i)43J-xAD1RZc8imZxt`} zS`Usk5zlcx(s<EYs#u$oG2W<8q#tNzJ`4Nca%J5~{Z4SBI?qPCX4f-(s6KxOu-;_9 zA21s>HNunex{|f|Ic%tRZqS^lwQvwLBC;*pV9Q3<c=cz}e)c=c9|3iLGp8+$jZq4_ zm>VLlXY$3LDLV)j)EJL3Gc_AKo$J{kChj6H^F6;*L3LE{%O7fh1b<aVR3B>4G0uk? zbm&7398>yG14l_8B;fFj2`bK@OUBCiJ^C_%f7a{qdan5XE22O8Q~b-{m+?zwI;1oG zy_tnau^=bCCwsh6QNO3?2lVVOWs32f^OXi%nezfC8b0zcil;?$a$&Ay@N&WACJhzG zDxbcP$H&c3NqL^>;eWZki!61+B7N;amCGGdFk%t(M^2OvMU09DAB7Md3sgW#&@FHp KQZAfE`R9K%G=|jx literal 0 HcmV?d00001 From 02809a183c0423e04a7d73bdea0f70e9e4508a10 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 16 Nov 2022 17:24:44 +0200 Subject: [PATCH 136/985] ACP2E-1353: allow image/x-icon favicon --- .../Model/File/Validator/Image.php | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index f35c4b11949ab..88fa1e220f429 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -8,9 +8,12 @@ namespace Magento\MediaStorage\Model\File\Validator; use Laminas\Validator\AbstractValidator; +use Magento\Framework\App\ObjectManager; use Magento\Framework\File\Mime; use Magento\Framework\Filesystem\Driver\File; +use Magento\Framework\Image\Adapter\ConfigInterface; use Magento\Framework\Image\Factory; +use Psr\Log\LoggerInterface; /** * Image validator @@ -45,19 +48,35 @@ class Image extends AbstractValidator */ private $file; + /** + * @var ConfigInterface + */ + private $config; + + /** + * @var LoggerInterface + */ + private $logger; + /** * @param Mime $fileMime * @param Factory $imageFactory * @param File $file + * @param ConfigInterface|null $config + * @param LoggerInterface|null $logger */ public function __construct( Mime $fileMime, Factory $imageFactory, - File $file + File $file, + ConfigInterface $config = null, + LoggerInterface $logger = null ) { $this->fileMime = $fileMime; $this->imageFactory = $imageFactory; $this->file = $file; + $this->config = $config ?? ObjectManager::getInstance()->get(ConfigInterface::class); + $this->logger = $logger ?? ObjectManager::getInstance()->get(LoggerInterface::class); parent::__construct(); } @@ -71,12 +90,20 @@ public function isValid($filePath): bool $isValid = false; if (stripos(serialize($this->imageMimeTypes), $fileMimeType) !== false) { + $defaultAdapter = $this->config->getAdapterAlias(); try { - $image = $this->imageFactory->create($filePath); + $image = $this->imageFactory->create($filePath, $defaultAdapter); + $image->open(); + $isValid = true; + } catch (\InvalidArgumentException $e) { + $adapters = $this->config->getAdapters(); + unset($adapters[$defaultAdapter]); + $image = $this->imageFactory->create($filePath, array_key_first($adapters) ?? null); $image->open(); $isValid = true; } catch (\Exception $e) { $isValid = false; + $this->logger->critical($e, ['exception' => $e]); } } From 689c07ee40f322e79f57ee072b5e1ea23d4aefd2 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 16 Nov 2022 18:19:54 +0200 Subject: [PATCH 137/985] ACP2E-1353: allow image/x-icon favicon --- app/code/Magento/MediaStorage/Model/File/Validator/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 88fa1e220f429..fa2069519c10d 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -89,7 +89,7 @@ public function isValid($filePath): bool $fileMimeType = $this->fileMime->getMimeType($filePath); $isValid = false; - if (stripos(serialize($this->imageMimeTypes), $fileMimeType) !== false) { + if (stripos(json_encode($this->imageMimeTypes), $fileMimeType) !== false) { $defaultAdapter = $this->config->getAdapterAlias(); try { $image = $this->imageFactory->create($filePath, $defaultAdapter); From edcbdab5807a3689b654c2fd02d0c65fe0aad406 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 16 Nov 2022 18:32:29 +0200 Subject: [PATCH 138/985] ACP2E-1353: allow image/x-icon favicon --- app/code/Magento/MediaStorage/Model/File/Validator/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index fa2069519c10d..5b1838f51d846 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -89,7 +89,7 @@ public function isValid($filePath): bool $fileMimeType = $this->fileMime->getMimeType($filePath); $isValid = false; - if (stripos(json_encode($this->imageMimeTypes), $fileMimeType) !== false) { + if (stripos(json_encode($this->imageMimeTypes), json_encode($fileMimeType)) !== false) { $defaultAdapter = $this->config->getAdapterAlias(); try { $image = $this->imageFactory->create($filePath, $defaultAdapter); From 20ecb28c12f4d4cfab3d2841203572746a27db87 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 16 Nov 2022 23:22:21 -0600 Subject: [PATCH 139/985] ACPT-826 --- app/code/Magento/AsyncConfig/README.md | 1 - app/code/Magento/AsyncConfig/etc/di.xml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/AsyncConfig/README.md b/app/code/Magento/AsyncConfig/README.md index cc8bc7d3fb31f..53131297717a2 100644 --- a/app/code/Magento/AsyncConfig/README.md +++ b/app/code/Magento/AsyncConfig/README.md @@ -21,4 +21,3 @@ Alternatively, you can set the variable using the command-line interface: ```bash bin/magento setup:config:set --config-async 1 ``` - diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 82628b5b211a0..577b9400a2ca5 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -10,4 +10,5 @@ type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> + <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> </config> From 603ee21abc38941bdb3fb2ba2cdbbe8d13be09f2 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 17 Nov 2022 01:05:59 -0600 Subject: [PATCH 140/985] ACPT-826 --- app/code/Magento/AsyncConfig/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 3e433e07de4d5..1e20b7eafa35f 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -5,7 +5,7 @@ "sort-packages": true }, "require": { - "php": "~7.4.0||~8.1.0", + "php": "~8.1.0||~8.2.0", "magento/framework": "*", "magento/framework-message-queue": "*", "magento/module-config": "*" From 8d66a78d6421e09644866ddd09be7ce4ac140bc5 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 17 Nov 2022 11:08:44 +0200 Subject: [PATCH 141/985] ACP2E-1345, CR feedback --- .../Model/ResourceModel/SelectionTest.php | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index 9c7cb9c73d4ee..fa9149fee0f25 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -10,13 +10,34 @@ use Codeception\PHPUnit\TestCase; use Magento\Bundle\Model\ResourceModel\Selection as ResourceSelection; use Magento\Bundle\Model\Selection; +use Magento\Framework\App\ResourceConnection; use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\EntityManager\MetadataPool; +use Magento\Framework\Model\ResourceModel\Db\Context; -/** - * Class to test Selection Resource Model - */ class SelectionTest extends TestCase { + /** + * @var Context|Context&\PHPUnit\Framework\MockObject\MockObject|\PHPUnit\Framework\MockObject\MockObject + */ + private Context $context; + + /** + * @var MetadataPool|MetadataPool&\PHPUnit\Framework\MockObject\MockObject|\PHPUnit\Framework\MockObject\MockObject + */ + private MetadataPool $metadataPool; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->context = $this->createMock(Context::class); + $this->metadataPool = $this->createMock(MetadataPool::class); + } + public function testSaveSelectionPrice() { $item = $this->getMockBuilder(Selection::class) @@ -43,27 +64,29 @@ public function testSaveSelectionPrice() $item->expects($this->once())->method('getSelectionPriceValue')->willReturn($values['selection_price_value']); $item->expects($this->once())->method('getParentProductId')->willReturn($values['parent_product_id']); - $selection = $this->getMockBuilder(ResourceSelection::class) - ->disableOriginalConstructor() - ->onlyMethods(['getConnection', 'getTable']) - ->getMock(); - $selection->expects($this->any()) - ->method('getTable') - ->with('catalog_product_bundle_selection_price') - ->willReturn('catalog_product_bundle_selection_price'); - $connection = $this->createMock(AdapterInterface::class); $connection->expects($this->once()) ->method('insertOnDuplicate') ->with( - $selection->getTable('catalog_product_bundle_selection_price'), + 'catalog_product_bundle_selection_price', $this->callback(function ($insertValues) { return $insertValues['selection_price_type'] === 0 && $insertValues['selection_price_value'] === 0; }), ['selection_price_type', 'selection_price_value'] ); - $selection->expects($this->once())->method('getConnection')->willReturn($connection); + $parentResources = $this->createMock(ResourceConnection::class); + $parentResources->expects($this->once())->method('getConnection')->willReturn($connection); + $parentResources->expects($this->once())->method('getTableName') + ->with('catalog_product_bundle_selection_price', 'test_connection_name') + ->willReturn('catalog_product_bundle_selection_price'); + + $selection = new ResourceSelection($this->context, $this->metadataPool, 'test_connection_name'); + $reflect = new \ReflectionClass($selection); + $property = $reflect->getProperty('_resources'); + $property->setAccessible(true); + $property->setValue($selection, $parentResources); + $selection->saveSelectionPrice($item); } } From d89dddf2decf136fab3ceed94378af1897b372e5 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 17 Nov 2022 11:14:36 +0200 Subject: [PATCH 142/985] ACP2E-1345, CR feedback --- .../Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index fa9149fee0f25..1d61c2e90fa8f 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -75,18 +75,15 @@ public function testSaveSelectionPrice() ['selection_price_type', 'selection_price_value'] ); + $parentResources = $this->createMock(ResourceConnection::class); $parentResources->expects($this->once())->method('getConnection')->willReturn($connection); $parentResources->expects($this->once())->method('getTableName') ->with('catalog_product_bundle_selection_price', 'test_connection_name') ->willReturn('catalog_product_bundle_selection_price'); + $this->context->expects($this->once())->method('getResources')->willReturn($parentResources); $selection = new ResourceSelection($this->context, $this->metadataPool, 'test_connection_name'); - $reflect = new \ReflectionClass($selection); - $property = $reflect->getProperty('_resources'); - $property->setAccessible(true); - $property->setValue($selection, $parentResources); - $selection->saveSelectionPrice($item); } } From 9ae5f9c588afd351c745e95da19d256ad6bac13a Mon Sep 17 00:00:00 2001 From: Stanislav Ilnytskyi <stailx1@gmail.com> Date: Thu, 17 Nov 2022 10:37:29 +0100 Subject: [PATCH 143/985] apply suggestion Co-authored-by: Andrii Kasian <akasian@adobe.com> --- .../Catalog/Model/Indexer/Product/Price/AbstractAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index d6a92d560a63f..f9a722501fa14 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -180,7 +180,7 @@ protected function _syncData(array $processIds = []) foreach ($this->dimensionCollectionFactory->create() as $dimensions) { $insertSelect = $this->getConnection()->select()->from( ['ip_tmp' => $this->_defaultIndexerResource->getIdxTable()], - array_keys($this->getConnection()->describeTable('catalog_product_index_price')) + array_keys($this->getConnection()->describeTable(this->tableMaintainer->getMainTableByDimensions($dimensions))) ); foreach ($dimensions as $dimension) { From 55e7b3c994c0586d52e8f003f9fd731f01d02769 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 17 Nov 2022 12:25:05 +0200 Subject: [PATCH 144/985] ACP2E-1353: allow image/x-icon favicon --- .../Model/File/Validator/Image.php | 28 ++++++++++----- .../Unit/Model/File/Validator/ImageTest.php | 9 +++-- .../System/Design/ThemeControllerTest.php | 32 ++++++++++++++---- .../Design/_files/favicon-vnd-microsoft.ico | Bin 0 -> 34494 bytes .../System/Design/_files/favicon-x-icon.ico | Bin 0 -> 318 bytes 5 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-vnd-microsoft.ico create mode 100644 dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-x-icon.ico diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 5b1838f51d846..83a3343765da4 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -87,20 +87,17 @@ public function __construct( public function isValid($filePath): bool { $fileMimeType = $this->fileMime->getMimeType($filePath); - $isValid = false; + $isValid = true; if (stripos(json_encode($this->imageMimeTypes), json_encode($fileMimeType)) !== false) { - $defaultAdapter = $this->config->getAdapterAlias(); try { - $image = $this->imageFactory->create($filePath, $defaultAdapter); + $image = $this->imageFactory->create($filePath); $image->open(); - $isValid = true; } catch (\InvalidArgumentException $e) { - $adapters = $this->config->getAdapters(); - unset($adapters[$defaultAdapter]); - $image = $this->imageFactory->create($filePath, array_key_first($adapters) ?? null); - $image->open(); - $isValid = true; + if (stripos($fileMimeType, 'icon') !== false) { + $image = $this->imageFactory->create($filePath, $this->getNonDefaultAdapter()); + $image->open(); + } } catch (\Exception $e) { $isValid = false; $this->logger->critical($e, ['exception' => $e]); @@ -109,4 +106,17 @@ public function isValid($filePath): bool return $isValid; } + + /** + * Get non default image adapter + * + * @return string|null + */ + private function getNonDefaultAdapter(): ?string + { + $defaultAdapter = $this->config->getAdapterAlias(); + $adapters = $this->config->getAdapters(); + unset($adapters[$defaultAdapter]); + return array_key_first($adapters) ?? null; + } } diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php index 13a4d03bbc986..aa556c2657b83 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php @@ -83,9 +83,12 @@ public function testIsValid($filePath, $mimeType, $result): void public function dataProviderForIsValid() { return [ - 'x-icon' => [dirname(__FILE__) . '/_files/favicon-x-icon.ico', 'image/x-icon', true], - 'vnd-microsoft-icon' => [dirname(__FILE__) . '/_files/favicon-vnd-microsoft.ico', 'image/vnd.microsoft.icon', true], - 'not-valid-ico' => [dirname(__FILE__) . '/_files/not-valid-file.ico', 'text/plain', false] + 'x-icon' => [dirname(__FILE__) . '/_files/favicon-x-icon.ico', + 'image/x-icon', true], + 'vnd-microsoft-icon' => [dirname(__FILE__) . '/_files/favicon-vnd-microsoft.ico', + 'image/vnd.microsoft.icon', true], + 'not-valid-ico' => [dirname(__FILE__) . '/_files/not-valid-file.ico', + 'text/plain', false] ]; } } diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php index 77320b4744356..5eb228ef43eb4 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php @@ -5,7 +5,7 @@ */ namespace Magento\Theme\Controller\Adminhtml\System\Design; -use Magento\Framework\Filesystem; +use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Filesystem\DirectoryList; /** @@ -16,7 +16,7 @@ class ThemeControllerTest extends \Magento\TestFramework\TestCase\AbstractBacken public function testUploadJsAction() { $name = 'simple-js-file.js'; - $this->createUploadFixture($name); + $this->createUploadFixture($name, 'application/x-javascript', 'js_files_uploader'); $theme = $this->_objectManager->create(\Magento\Framework\View\Design\ThemeInterface::class) ->getCollection() ->getFirstItem(); @@ -28,13 +28,31 @@ public function testUploadJsAction() $this->assertStringContainsString($name, $output); } + public function testUploadFaviconAction() + { + $names = ['favicon-x-icon.ico', 'favicon-vnd-microsoft.ico']; + foreach ($names as $name) { + $this->createUploadFixture($name, 'image/vnd.microsoft.icon', 'head_shortcut_icon'); + $theme = $this->_objectManager->create(\Magento\Framework\View\Design\ThemeInterface::class) + ->getCollection() + ->getFirstItem(); + $this->getRequest()->setPostValue('id', $theme->getId()); + $this->dispatch('backend/admin/design_config_fileUploader/save'); + $output = $this->getResponse()->getBody(); + $this->assertStringContainsString('"error":"false"', $output); + $this->assertStringContainsString($name, $output); + } + } + /** * Creates a fixture for testing uploaded file * * @param string $name + * @params string $mimeType * @return void + * @throws FileSystemException */ - private function createUploadFixture($name) + private function createUploadFixture($name, $mimeType, $model) { /** @var \Magento\TestFramework\App\Filesystem $filesystem */ $filesystem = $this->_objectManager->get(\Magento\Framework\Filesystem::class); @@ -44,11 +62,11 @@ private function createUploadFixture($name) $target = $tmpDir->getAbsolutePath("{$subDir}/{$name}"); copy(__DIR__ . "/_files/{$name}", $target); $_FILES = [ - 'js_files_uploader' => [ - 'name' => 'simple-js-file.js', - 'type' => 'application/x-javascript', + $model => [ + 'name' => $name, + 'type' => $mimeType, 'tmp_name' => $target, - 'error' => '0', + 'error' => 'false', 'size' => '28', ], ]; diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-vnd-microsoft.ico b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-vnd-microsoft.ico new file mode 100644 index 0000000000000000000000000000000000000000..d467f2bcbaed42b9b9d8cf71604b18b94e825799 GIT binary patch literal 34494 zcmeI54~SJ&9><S=)|nM?h7cJ-e8cF5NQ6kput+n6ge*&hgh+@C&xnvkLLwr<nXPCg z!eWW2wiStpkO)~KEJCK8u#ixRh&IH1X{boZeJ1j-VeWpu_r3GxygT>LyYIc3dDFgI zUw`MGKfizHcmCWz?~XBx%<oKZuYvZP$Cnzj(-_m&S3W=Vdt*+L*WX`0f1i2}tTblR zrpoyrjJdwnnBn2_`G)(Ad3~EP8{k1zIF|DvnT~aPiv!>T@cO#F-l}>VQ-3KqG_cpZ z1@$Yq4&9%`gYv~HhpsHQ@%(jp?;X-7%IC$amGYpT%Zu`@;OpA<MXz$cCe(gC=i<51 z@<2|YXNLBw|3kHX#m;$df2&FPt!lpl-`oUY|DUhuC;vzJuSA^L7+6dCtxEkq>i-?w zQ90ib(_TE!0Y<>ggM4Dk+XXFvTKReJVe&4N^MhFUko17%Li%3Xeo-zD+MXdjY|BL{ z?_QTLK12Qu)f?DbRQw+TN5Q1>z*X=V@irrdEicON1V?~vqjsf%eDP&?YDm|0(8lU~ zob+9BjiyG8DGh;~G5`68F>k&ZjemY(%qvA>CMJyWddl_HR`U!~mDvO|e>HocYd?4o z$al<itvTSOxO@({^U`I`^UPJT{ZWr}`hGinegf*ND11#FxvHT9p09=Y!moHSls8f@ zbJ}T69JcjIyZm3}d@+!}+?cQOCw?DPxovMLdCS2;;`FAdlkf81=j0!wp7qy=lm8L< z^5-5<?Hl+Wbm}+D-^$(Y$ej)TfBKE`f7-FDk^Z&*kMqxy9sa@CsK-A~JL4j1eBGwp zjdP8!y8W+yp#C=S4G8o9n7o>~jq`f=pJX1XuCWyvOPMF{bo#yDrY(i{eZZaj;`}4~ zG}pffX3SNVpQY5%y5r7AQT}0V4)&z(+N^q7M@B$(u5$RUz|I#abJv|j-KaZ=oKsM% zLxp;$$=fR4P|eZIkDlhqntIHWvZLSX5Jf46hqoK*`qJ`Id&#ormTKQ~UlhN%JnAn8 zW8fyRe8N=wqDR3D|HbhQ=hJpAcn`R|OPs$1TDgzdir?fL?W@*@^@uz7ulUA)9`N6k z(C3@$gICO%!ApraOZnMPE}1X=OXhR`c{4t>#CThK%%m9#`1pT?BfK>L`@t}1#Xbx+ zH3xg!e(XI8m}|V{HHEWyf;`2K*5zPd4duG9_ycqYXgFTdRE9TmQE?Y205_(l)A`~! zWt%}7yG-TqWAEktJ63M3K0%CU5|C0Ex!NC2+c}-S#@r%#;j(X2SSA+3uiLE<me2lN z>(@)nqpP?Mx`*^<z}2BfK4mrhT;6V)dYVIbf(xPiu>BW9<%6_IlK%kZCx}yB7DXPE z6E|Mf4!06zt&s2IEA<t7GjFxaUup6uLDdGgyjAiY{vWygEAp$dRnIM-1^Fjj{vG*2 z|F@I>Z@c|75B=|T<WGB`<Nwyozna%7NSlAc@z+Z`?Qv}TwDsrcbngXYTkDT)E1F5Z zc(K-Y)9wIk$Is9>`QK2cdta`2tu2}4v!}R$oXBf5cyY~D9CHPr+uhXv3;B`jJp8n# zXR%*(bsaSVZ=SX^cF_I~a2SO5NNN7B>Wc2Cu<egoG(evAs{6oYQ03*MqvVfJUU2G! z+r5h~`jhmat?lb`34FewY%q!s`=gcMMask1##Wab?ESR&pAj46t*7mW(3*V==ashJ zMfB(TxR~0X_`4ro$Ed4)rj_kdT_ZmtUO;_(2*m0PuNRP==^6=s^5rn?bdBxGE~oX3 zDqsAHGR5i4^0FV^$CiO8U)P%lZ`qhnkP{{QG;y2hzCfBj$WQaL^iaGjj+dqJYqT8R z>+$IaP&dwQ5|=O1A1%ADkfa~7-Ek&eVxQ+E@llyS<@^5RknejvzCXUCjL)C<f1Q~4 z@1==}FDJ4dznq<z_|>2I-1nD^k4`Nq<Vsy$Pa!wCWNe5{eVKm&S*4usPmTJzPoayV z5ilF~DPWs;;JelI9oIy`cwU@Xxs3|Zw;R2mf_lJ?!7oVP+eT_es)CLWF^0}NdRzTP zHLi|=>V4lxCi9SqPP*6dDRA|TOf&!K{^qmvQRJRvF4f1^tI_2RbctKfB5kPHc>((H zT<Yt}LiQSPy`oE!o+)MC5tr{=rO|t1^STG|c5<$CcIBk&AB^MOnnP3KYgYAVpA@_g z;_9w+g8sMASMz6ee3I7qj=RqqsXz65!!om+(_Z_l{pj*@R6EMz;-}^wr)^99he6a> zh|^!!37XUHu{`RfwAlu}1A)A#c9hM9{=8ok%x!OIu8Y#c%|oZVz`v~Cmb!IpnzA|3 z-|7I>Tz3Fe<I?J4DP`g7$$9rbI)!8Iu+=wABkH!J{;!4gw&xxFgT8L%{1c8Hop=0C zz~P6vo_}m#bo{@t{2#opYv(9S7f}3MwK}`BqknZ>P1?WNG3(N-<G15~0*`oWWdH2? z-KIPKFZ*+$tY4k@Z_oH&S-IbC$Cahuy6c2Z$Bf@=<nOU{TuS~vV0pT<CF9r1LdGz5 zoN;8O>R-90eU&z`_ZTRf6a8fevba~_JqEoB()9nBIvcG0ag;i((qH$%>$+!5y<Y5i zJW40ZwotY`sw^sx`Y!`FZfrVh{OC7Ab9T=doi_tLFR=QCX=eQ$UIl!(E6QKZ<{_gG z90Bh0x3KOyZ$^L1PyX55tj=l=pKkCBxB)ExB$}kZ#>}-k`N&W5S6`!c&~^v?dA?40 zvPt()?@p3OxyImOXym;t^25H7-{imUB))DLbvGg7WCX7;Z+o8kSqHo~0L^ulM+y!6 zxWm;moJQx>@OulS#kiG~**6g~w<GVn40gz`dURVoI9H4x0J?{1bxWeM?<i<EHmkx( zz=!pzxF2MZFF(uQ4}tGNlD=-4=7xJ+`K?OBcNJ@Y+Vd1wms=V1p0&9-Y(F|}1fOQm z&9$i}U0EB);Fak;ny^ldoFntkAWLkxx=*6}yR=`^i0oFiL4MY;DH~3M$al3`rB_xy zmANtPS@uupy$7`I`yA*NwKi!SKL_SK#<TW=t&gsDZ*Yuszs+wo<z*q?4_+YB%Sw8Y zNG~h}FBEl^saX`zDPu;JU!{vG=UwAL{=u%oLCPmZhxqNfXwH~|XjgmCDd{o#w;#*& z%9S$ZH7(_1eMuDS3!-{u3+mw!qu=41QT-H*--6}H!VhCzg+-!;MPpr}o-sMmNn?gY ztI*3|Iu~crQm#ySNsDt`$PI%rFdy$}AvX3P?zHx=0WW}IFl+Ds#VRpR1=z|yI@t4E zglf*#9P$p(+S|7CU$gGQwx!@f@HL3qCtoFBb7|yzA<fF4&-U1~k@sDWL({LF^4<@; zm%5v}sqa0{r%h?H(O+Y{54;L=pTyl`rKj`!emd`IZdh=BKxd8deL&Zz>9)q#xy}CR z2!7D}FKI4si*oeT82<{OdsDW%e!C2>G0@g?1Nv<SS+4C|8`IKUmw0ctMJLB7f$f7J z&5mZukHv^?i|mZ{D^5-TUHjDQliz~<to^}n<G1ts=4IGE!2I?)Yo6|jrTJlA?MJ`< zq(GxQE&g?%YXsC>FLJKE(H8umc{9leiT2aB<@YS$$!`gZeat=DtKV$W{!=OKpJ>wl z!^D>EUu^+R?;GH;96SongP>nh^iS*mIj|o+%VX&cbY7pNZ(JGe7K8i2XMpiK9g}fw zluy0(uzy-#&8<&@-Xy)<GUA-y5_<2_CUVc})(xlI(0;|N`tKX&TJHO#j|u8T+D-n# ziT~;T56`8KhWjjhZtaYt;ri}5ZQ3pV!}dSn>Km1gv)krJwXt~}`#b$_<0OX8&H5KV z{yXt+2Wt$C>9^`U64NZm?u`G=_)m$S&iGFlK=`f&*FV#H^@zUc%zp{~S5bt|s&gM@ zH<FrD{#)PwUF_H&?}1MLcj7-~{#fYiUuXQs5C3+&|K+Y-N;kXycly86|FItEtbd*L z@Be)LTgLN)XYqj-<A+Aqf8E1BK9Kh|#tuFTsKfKGS-t*Cod2zEJU>~(GpM)GCHzb` ztNpV340r%6w*2ELb=tyys~`Go1^V5EeHSK+{TJ}z0ov9)E4I9&D0SP)e(8u#E5IIX z`Ifk-$9~0(>{tt;%#6*ev<vTf-1BDlKi7G_yeU?Jm;%`WR?+sMm?}Xwbrdi6fYewI z^P$Zh;A7z08%{TCzxXMZdA7`R(v1BR*0~ku#FgUfaiDj^!uE#GTVcQDDS1y3)ARC9 z8nTxH&5Ngi)hUg((ta!J4Dxq^Wv%GXG#<z?{66Py`u%;@TD?PM^{9u=hW(OT0vdan zzsZ(nuUig(#rn&Dc_@?J);D$7?>!Cgdd8CF=~B%NuYt^Sw`*rO4Zjuic^<0wIb3;l zr7M3&L;X|N`!LiS0D31aZXcH>S9)sgZfb6zJ!71|O_&dUpR2u4n%t=J)9~0KUSYo` zol{@$0O@|V-lu9rw%VKn4}wgxr58Fg#)J28vX1eJ4}!m|^(3-;lk7|@Ll3<JwiBEO zQT|QK)7)?zB>ukI>VeICQ$2Xs?i#Ywct@3&7%Ti1wdG@QIdQ1D0lgaX1K;lq=7u|I zZ_TYz#;E+f2V87~KWl;f{3*Vx%g<H8858sgbA$Ibvb0Z)@_%w(UiNwWX&b~PRO|RQ z@^qch=r}urZ+D4TMspgfUeWnJ;z4smvc1vevhy@}gnsAm6ePcMmLNmF8ESf-ZO92U zBG$T*zZ+ag&@stBS}&8z<H{84ioyOyb#G-m^w7TKS)l%i)43J-xAD1RZc8imZxt`} zS`Usk5zlcx(s<EYs#u$oG2W<8q#tNzJ`4Nca%J5~{Z4SBI?qPCX4f-(s6KxOu-;_9 zA21s>HNunex{|f|Ic%tRZqS^lwQvwLBC;*pV9Q3<c=cz}e)c=c9|3iLGp8+$jZq4_ zm>VLlXY$3LDLV)j)EJL3Gc_AKo$J{kChj6H^F6;*L3LE{%O7fh1b<aVR3B>4G0uk? zbm&7398>yG14l_8B;fFj2`bK@OUBCiJ^C_%f7a{qdan5XE22O8Q~b-{m+?zwI;1oG zy_tnau^=bCCwsh6QNO3?2lVVOWs32f^OXi%nezfC8b0zcil;?$a$&Ay@N&WACJhzG zDxbcP$H&c3NqL^>;eWZki!61+B7N;amCGGdFk%t(M^2OvMU09DAB7Md3sgW#&@FHp KQZAfE`R9K%G=|jx literal 0 HcmV?d00001 diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-x-icon.ico b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/_files/favicon-x-icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a66eb60d9870fcc13831ca322c3730f0dfc0aa4c GIT binary patch literal 318 zcmbV`O$tIW41~X;pbNpS-0IR}X7@Z+4p8t49z=+fmkNRl!6`G7Ow%7|TD^A?*9NC_ zF_Vkf*h;}x{gySC*eon3)wsLN2n0#YB4!g6<Sy)QLY1(<5Pac~KIHf3h)@43w|VdT To%++`2)-$r{3mysJ=fV6#*<wB literal 0 HcmV?d00001 From 7c349cc83ed8709df74f9111af32d9c7af0f8196 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 17 Nov 2022 12:28:36 +0200 Subject: [PATCH 145/985] ACP2E-1353: allow image/x-icon favicon --- .../Unit/Model/File/Validator/ImageTest.php | 10 +++------- .../Validator/_files/favicon-vnd-microsoft.ico | Bin 34494 -> 0 bytes .../File/Validator/_files/favicon-x-icon.ico | Bin 318 -> 0 bytes .../File/Validator/_files/not-valid-file.ico | 0 4 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico delete mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico delete mode 100644 app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php index aa556c2657b83..b12bcb120ed45 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php @@ -66,14 +66,12 @@ public function testIsValid($filePath, $mimeType, $result): void ->method('getMimeType') ->with($filePath) ->willReturn($mimeType); - if ($result) { - $this->imageMock->expects($this->once()) + $this->imageMock->expects($this->once()) ->method('open') ->willReturn(null); - $this->imageFactoryMock->expects($this->once()) + $this->imageFactoryMock->expects($this->once()) ->method('create') ->willReturn($this->imageMock); - } $this->assertEquals($result, $this->image->isValid($filePath)); } @@ -86,9 +84,7 @@ public function dataProviderForIsValid() 'x-icon' => [dirname(__FILE__) . '/_files/favicon-x-icon.ico', 'image/x-icon', true], 'vnd-microsoft-icon' => [dirname(__FILE__) . '/_files/favicon-vnd-microsoft.ico', - 'image/vnd.microsoft.icon', true], - 'not-valid-ico' => [dirname(__FILE__) . '/_files/not-valid-file.ico', - 'text/plain', false] + 'image/vnd.microsoft.icon', true] ]; } } diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-vnd-microsoft.ico deleted file mode 100644 index d467f2bcbaed42b9b9d8cf71604b18b94e825799..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34494 zcmeI54~SJ&9><S=)|nM?h7cJ-e8cF5NQ6kput+n6ge*&hgh+@C&xnvkLLwr<nXPCg z!eWW2wiStpkO)~KEJCK8u#ixRh&IH1X{boZeJ1j-VeWpu_r3GxygT>LyYIc3dDFgI zUw`MGKfizHcmCWz?~XBx%<oKZuYvZP$Cnzj(-_m&S3W=Vdt*+L*WX`0f1i2}tTblR zrpoyrjJdwnnBn2_`G)(Ad3~EP8{k1zIF|DvnT~aPiv!>T@cO#F-l}>VQ-3KqG_cpZ z1@$Yq4&9%`gYv~HhpsHQ@%(jp?;X-7%IC$amGYpT%Zu`@;OpA<MXz$cCe(gC=i<51 z@<2|YXNLBw|3kHX#m;$df2&FPt!lpl-`oUY|DUhuC;vzJuSA^L7+6dCtxEkq>i-?w zQ90ib(_TE!0Y<>ggM4Dk+XXFvTKReJVe&4N^MhFUko17%Li%3Xeo-zD+MXdjY|BL{ z?_QTLK12Qu)f?DbRQw+TN5Q1>z*X=V@irrdEicON1V?~vqjsf%eDP&?YDm|0(8lU~ zob+9BjiyG8DGh;~G5`68F>k&ZjemY(%qvA>CMJyWddl_HR`U!~mDvO|e>HocYd?4o z$al<itvTSOxO@({^U`I`^UPJT{ZWr}`hGinegf*ND11#FxvHT9p09=Y!moHSls8f@ zbJ}T69JcjIyZm3}d@+!}+?cQOCw?DPxovMLdCS2;;`FAdlkf81=j0!wp7qy=lm8L< z^5-5<?Hl+Wbm}+D-^$(Y$ej)TfBKE`f7-FDk^Z&*kMqxy9sa@CsK-A~JL4j1eBGwp zjdP8!y8W+yp#C=S4G8o9n7o>~jq`f=pJX1XuCWyvOPMF{bo#yDrY(i{eZZaj;`}4~ zG}pffX3SNVpQY5%y5r7AQT}0V4)&z(+N^q7M@B$(u5$RUz|I#abJv|j-KaZ=oKsM% zLxp;$$=fR4P|eZIkDlhqntIHWvZLSX5Jf46hqoK*`qJ`Id&#ormTKQ~UlhN%JnAn8 zW8fyRe8N=wqDR3D|HbhQ=hJpAcn`R|OPs$1TDgzdir?fL?W@*@^@uz7ulUA)9`N6k z(C3@$gICO%!ApraOZnMPE}1X=OXhR`c{4t>#CThK%%m9#`1pT?BfK>L`@t}1#Xbx+ zH3xg!e(XI8m}|V{HHEWyf;`2K*5zPd4duG9_ycqYXgFTdRE9TmQE?Y205_(l)A`~! zWt%}7yG-TqWAEktJ63M3K0%CU5|C0Ex!NC2+c}-S#@r%#;j(X2SSA+3uiLE<me2lN z>(@)nqpP?Mx`*^<z}2BfK4mrhT;6V)dYVIbf(xPiu>BW9<%6_IlK%kZCx}yB7DXPE z6E|Mf4!06zt&s2IEA<t7GjFxaUup6uLDdGgyjAiY{vWygEAp$dRnIM-1^Fjj{vG*2 z|F@I>Z@c|75B=|T<WGB`<Nwyozna%7NSlAc@z+Z`?Qv}TwDsrcbngXYTkDT)E1F5Z zc(K-Y)9wIk$Is9>`QK2cdta`2tu2}4v!}R$oXBf5cyY~D9CHPr+uhXv3;B`jJp8n# zXR%*(bsaSVZ=SX^cF_I~a2SO5NNN7B>Wc2Cu<egoG(evAs{6oYQ03*MqvVfJUU2G! z+r5h~`jhmat?lb`34FewY%q!s`=gcMMask1##Wab?ESR&pAj46t*7mW(3*V==ashJ zMfB(TxR~0X_`4ro$Ed4)rj_kdT_ZmtUO;_(2*m0PuNRP==^6=s^5rn?bdBxGE~oX3 zDqsAHGR5i4^0FV^$CiO8U)P%lZ`qhnkP{{QG;y2hzCfBj$WQaL^iaGjj+dqJYqT8R z>+$IaP&dwQ5|=O1A1%ADkfa~7-Ek&eVxQ+E@llyS<@^5RknejvzCXUCjL)C<f1Q~4 z@1==}FDJ4dznq<z_|>2I-1nD^k4`Nq<Vsy$Pa!wCWNe5{eVKm&S*4usPmTJzPoayV z5ilF~DPWs;;JelI9oIy`cwU@Xxs3|Zw;R2mf_lJ?!7oVP+eT_es)CLWF^0}NdRzTP zHLi|=>V4lxCi9SqPP*6dDRA|TOf&!K{^qmvQRJRvF4f1^tI_2RbctKfB5kPHc>((H zT<Yt}LiQSPy`oE!o+)MC5tr{=rO|t1^STG|c5<$CcIBk&AB^MOnnP3KYgYAVpA@_g z;_9w+g8sMASMz6ee3I7qj=RqqsXz65!!om+(_Z_l{pj*@R6EMz;-}^wr)^99he6a> zh|^!!37XUHu{`RfwAlu}1A)A#c9hM9{=8ok%x!OIu8Y#c%|oZVz`v~Cmb!IpnzA|3 z-|7I>Tz3Fe<I?J4DP`g7$$9rbI)!8Iu+=wABkH!J{;!4gw&xxFgT8L%{1c8Hop=0C zz~P6vo_}m#bo{@t{2#opYv(9S7f}3MwK}`BqknZ>P1?WNG3(N-<G15~0*`oWWdH2? z-KIPKFZ*+$tY4k@Z_oH&S-IbC$Cahuy6c2Z$Bf@=<nOU{TuS~vV0pT<CF9r1LdGz5 zoN;8O>R-90eU&z`_ZTRf6a8fevba~_JqEoB()9nBIvcG0ag;i((qH$%>$+!5y<Y5i zJW40ZwotY`sw^sx`Y!`FZfrVh{OC7Ab9T=doi_tLFR=QCX=eQ$UIl!(E6QKZ<{_gG z90Bh0x3KOyZ$^L1PyX55tj=l=pKkCBxB)ExB$}kZ#>}-k`N&W5S6`!c&~^v?dA?40 zvPt()?@p3OxyImOXym;t^25H7-{imUB))DLbvGg7WCX7;Z+o8kSqHo~0L^ulM+y!6 zxWm;moJQx>@OulS#kiG~**6g~w<GVn40gz`dURVoI9H4x0J?{1bxWeM?<i<EHmkx( zz=!pzxF2MZFF(uQ4}tGNlD=-4=7xJ+`K?OBcNJ@Y+Vd1wms=V1p0&9-Y(F|}1fOQm z&9$i}U0EB);Fak;ny^ldoFntkAWLkxx=*6}yR=`^i0oFiL4MY;DH~3M$al3`rB_xy zmANtPS@uupy$7`I`yA*NwKi!SKL_SK#<TW=t&gsDZ*Yuszs+wo<z*q?4_+YB%Sw8Y zNG~h}FBEl^saX`zDPu;JU!{vG=UwAL{=u%oLCPmZhxqNfXwH~|XjgmCDd{o#w;#*& z%9S$ZH7(_1eMuDS3!-{u3+mw!qu=41QT-H*--6}H!VhCzg+-!;MPpr}o-sMmNn?gY ztI*3|Iu~crQm#ySNsDt`$PI%rFdy$}AvX3P?zHx=0WW}IFl+Ds#VRpR1=z|yI@t4E zglf*#9P$p(+S|7CU$gGQwx!@f@HL3qCtoFBb7|yzA<fF4&-U1~k@sDWL({LF^4<@; zm%5v}sqa0{r%h?H(O+Y{54;L=pTyl`rKj`!emd`IZdh=BKxd8deL&Zz>9)q#xy}CR z2!7D}FKI4si*oeT82<{OdsDW%e!C2>G0@g?1Nv<SS+4C|8`IKUmw0ctMJLB7f$f7J z&5mZukHv^?i|mZ{D^5-TUHjDQliz~<to^}n<G1ts=4IGE!2I?)Yo6|jrTJlA?MJ`< zq(GxQE&g?%YXsC>FLJKE(H8umc{9leiT2aB<@YS$$!`gZeat=DtKV$W{!=OKpJ>wl z!^D>EUu^+R?;GH;96SongP>nh^iS*mIj|o+%VX&cbY7pNZ(JGe7K8i2XMpiK9g}fw zluy0(uzy-#&8<&@-Xy)<GUA-y5_<2_CUVc})(xlI(0;|N`tKX&TJHO#j|u8T+D-n# ziT~;T56`8KhWjjhZtaYt;ri}5ZQ3pV!}dSn>Km1gv)krJwXt~}`#b$_<0OX8&H5KV z{yXt+2Wt$C>9^`U64NZm?u`G=_)m$S&iGFlK=`f&*FV#H^@zUc%zp{~S5bt|s&gM@ zH<FrD{#)PwUF_H&?}1MLcj7-~{#fYiUuXQs5C3+&|K+Y-N;kXycly86|FItEtbd*L z@Be)LTgLN)XYqj-<A+Aqf8E1BK9Kh|#tuFTsKfKGS-t*Cod2zEJU>~(GpM)GCHzb` ztNpV340r%6w*2ELb=tyys~`Go1^V5EeHSK+{TJ}z0ov9)E4I9&D0SP)e(8u#E5IIX z`Ifk-$9~0(>{tt;%#6*ev<vTf-1BDlKi7G_yeU?Jm;%`WR?+sMm?}Xwbrdi6fYewI z^P$Zh;A7z08%{TCzxXMZdA7`R(v1BR*0~ku#FgUfaiDj^!uE#GTVcQDDS1y3)ARC9 z8nTxH&5Ngi)hUg((ta!J4Dxq^Wv%GXG#<z?{66Py`u%;@TD?PM^{9u=hW(OT0vdan zzsZ(nuUig(#rn&Dc_@?J);D$7?>!Cgdd8CF=~B%NuYt^Sw`*rO4Zjuic^<0wIb3;l zr7M3&L;X|N`!LiS0D31aZXcH>S9)sgZfb6zJ!71|O_&dUpR2u4n%t=J)9~0KUSYo` zol{@$0O@|V-lu9rw%VKn4}wgxr58Fg#)J28vX1eJ4}!m|^(3-;lk7|@Ll3<JwiBEO zQT|QK)7)?zB>ukI>VeICQ$2Xs?i#Ywct@3&7%Ti1wdG@QIdQ1D0lgaX1K;lq=7u|I zZ_TYz#;E+f2V87~KWl;f{3*Vx%g<H8858sgbA$Ibvb0Z)@_%w(UiNwWX&b~PRO|RQ z@^qch=r}urZ+D4TMspgfUeWnJ;z4smvc1vevhy@}gnsAm6ePcMmLNmF8ESf-ZO92U zBG$T*zZ+ag&@stBS}&8z<H{84ioyOyb#G-m^w7TKS)l%i)43J-xAD1RZc8imZxt`} zS`Usk5zlcx(s<EYs#u$oG2W<8q#tNzJ`4Nca%J5~{Z4SBI?qPCX4f-(s6KxOu-;_9 zA21s>HNunex{|f|Ic%tRZqS^lwQvwLBC;*pV9Q3<c=cz}e)c=c9|3iLGp8+$jZq4_ zm>VLlXY$3LDLV)j)EJL3Gc_AKo$J{kChj6H^F6;*L3LE{%O7fh1b<aVR3B>4G0uk? zbm&7398>yG14l_8B;fFj2`bK@OUBCiJ^C_%f7a{qdan5XE22O8Q~b-{m+?zwI;1oG zy_tnau^=bCCwsh6QNO3?2lVVOWs32f^OXi%nezfC8b0zcil;?$a$&Ay@N&WACJhzG zDxbcP$H&c3NqL^>;eWZki!61+B7N;amCGGdFk%t(M^2OvMU09DAB7Md3sgW#&@FHp KQZAfE`R9K%G=|jx diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/favicon-x-icon.ico deleted file mode 100644 index a66eb60d9870fcc13831ca322c3730f0dfc0aa4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmbV`O$tIW41~X;pbNpS-0IR}X7@Z+4p8t49z=+fmkNRl!6`G7Ow%7|TD^A?*9NC_ zF_Vkf*h;}x{gySC*eon3)wsLN2n0#YB4!g6<Sy)QLY1(<5Pac~KIHf3h)@43w|VdT To%++`2)-$r{3mysJ=fV6#*<wB diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico b/app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico deleted file mode 100644 index e69de29bb2d1d..0000000000000 From fd7b55b5d72e74e859f9cea253b1ceafdd7d6f1a Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 17 Nov 2022 13:19:26 +0200 Subject: [PATCH 146/985] ACP2E-1345, fixed static --- .../Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index 1d61c2e90fa8f..23a5f980a83a7 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -75,7 +75,6 @@ public function testSaveSelectionPrice() ['selection_price_type', 'selection_price_value'] ); - $parentResources = $this->createMock(ResourceConnection::class); $parentResources->expects($this->once())->method('getConnection')->willReturn($connection); $parentResources->expects($this->once())->method('getTableName') From 0be1c79f94ad2721c1cc166923a834376b5e672d Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 17 Nov 2022 17:49:53 +0200 Subject: [PATCH 147/985] ACP2E-1353: allow image/x-icon favicon --- .../Adminhtml/System/Design/ThemeControllerTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php index 5eb228ef43eb4..738aa67d4be8e 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php @@ -39,8 +39,15 @@ public function testUploadFaviconAction() $this->getRequest()->setPostValue('id', $theme->getId()); $this->dispatch('backend/admin/design_config_fileUploader/save'); $output = $this->getResponse()->getBody(); - $this->assertStringContainsString('"error":"false"', $output); - $this->assertStringContainsString($name, $output); + if (in_array('imagick', get_loaded_extensions())) { + $this->assertStringContainsString('"error":"false"', $output); + $this->assertStringContainsString($name, $output); + } else { + $this->assertStringContainsString( + '"error":"Required PHP extension \'Imagick\' was not loaded."', + $output + ); + } } } From b61c1685ecc9ec3c2cc7a016d0fb540c37cc874a Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Thu, 17 Nov 2022 21:25:30 +0530 Subject: [PATCH 148/985] ACP2E-1338: Google reCaptcha in Incorrect position --- .../Review/view/frontend/layout/catalog_product_view.xml | 1 + app/code/Magento/Review/view/frontend/templates/form.phtml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml index a6b46f8f25a71..5df9ddbb6f57c 100644 --- a/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml @@ -23,6 +23,7 @@ <argument name="sort_order" xsi:type="string">30</argument> </arguments> <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form" ifconfig="catalog/review/active"> + <container name="form.additional.review.info" as="form_additional_review_info"/> <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/> </block> </block> diff --git a/app/code/Magento/Review/view/frontend/templates/form.phtml b/app/code/Magento/Review/view/frontend/templates/form.phtml index 6b00bf681c1e3..7331fddf6b04c 100644 --- a/app/code/Magento/Review/view/frontend/templates/form.phtml +++ b/app/code/Magento/Review/view/frontend/templates/form.phtml @@ -72,6 +72,9 @@ </div> </div> </fieldset> + <fieldset class="fieldset additional_info"> + <?= $block->getChildHtml('form_additional_review_info') ?> + </fieldset> <div class="actions-toolbar review-form-actions"> <div class="primary actions-primary"> <button type="submit" class="action submit primary"><span><?= $block->escapeHtml(__('Submit Review')) ?></span></button> From c91f2c76e3328ecd47bef884e2b2944f6d604237 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 17 Nov 2022 18:34:31 +0200 Subject: [PATCH 149/985] ACP2E-1345, CR --- .../Model/ResourceModel/SelectionTest.php | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index 23a5f980a83a7..89972d709ab2b 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -40,29 +40,12 @@ protected function setUp(): void public function testSaveSelectionPrice() { - $item = $this->getMockBuilder(Selection::class) - ->disableOriginalConstructor() - ->addMethods([ - 'getSelectionId', - 'getWebsiteId', - 'getSelectionPriceType', - 'getSelectionPriceValue', - 'getParentProductId', - 'getDefaultPriceScope']) - ->getMock(); - $values = [ - 'selection_id' => 1, - 'website_id' => 1, - 'selection_price_type' => null, - 'selection_price_value' => null, - 'parent_product_id' => 1, - ]; - $item->expects($this->once())->method('getDefaultPriceScope')->willReturn(false); - $item->expects($this->once())->method('getSelectionId')->willReturn($values['selection_id']); - $item->expects($this->once())->method('getWebsiteId')->willReturn($values['website_id']); - $item->expects($this->once())->method('getSelectionPriceType')->willReturn($values['selection_price_type']); - $item->expects($this->once())->method('getSelectionPriceValue')->willReturn($values['selection_price_value']); - $item->expects($this->once())->method('getParentProductId')->willReturn($values['parent_product_id']); + $item = new Selection( + $this->createMock(\Magento\Framework\Model\Context::class), + $this->createMock(\Magento\Framework\Registry::class), + $this->createMock(\Magento\Catalog\Helper\Data::class), + $this->createMock(\Magento\Bundle\Model\ResourceModel\Selection::class) + ); $connection = $this->createMock(AdapterInterface::class); $connection->expects($this->once()) From 6270ff1eb20346e46930b86ee1eb4e19c62c3381 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 17 Nov 2022 11:17:29 -0600 Subject: [PATCH 150/985] ACPT-826 --- .../Magento/Config/Controller/Adminhtml/System/Config/Save.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 88a77226fee03..be9fa49c7faf8 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -261,14 +261,15 @@ public function execute() /** @var \Magento\Config\Model\Config $configModel */ $configModel = $this->_configFactory->create(['data' => $configData]); $configModel->save(); + $this->messageManager->addSuccess(__('You saved the configuration.')); } else { $this->asyncConfigPublisher->saveConfigData($configData); + $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); } $this->_eventManager->dispatch( 'admin_system_config_save', ['configData' => $configData, 'request' => $this->getRequest()] ); - $this->messageManager->addSuccess(__('You saved the configuration.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { $messages = explode("\n", $e->getMessage()); foreach ($messages as $message) { From 1b1e2a407b4b909515812eefcb3a5036b4d7b73e Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Thu, 17 Nov 2022 14:52:31 -0600 Subject: [PATCH 151/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- app/code/Magento/Paypal/etc/di.xml | 1 + app/code/Magento/Paypal/etc/frontend/di.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index 0bda87ded5d7f..c4dbe01d1938f 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -263,6 +263,7 @@ <arguments> <argument name="disallowedFundingOptions" xsi:type="array"> <item name="CREDIT" xsi:type="string">PayPal Credit</item> + <item name="VENMO" xsi:type="string">Venmo</item> <item name="CARD" xsi:type="string">PayPal Guest Checkout Credit Card Icons</item> <item name="ELV" xsi:type="string">Elektronisches Lastschriftverfahren - German ELV</item> </argument> diff --git a/app/code/Magento/Paypal/etc/frontend/di.xml b/app/code/Magento/Paypal/etc/frontend/di.xml index 4af05ea3fca51..acc25198a19c6 100644 --- a/app/code/Magento/Paypal/etc/frontend/di.xml +++ b/app/code/Magento/Paypal/etc/frontend/di.xml @@ -173,6 +173,7 @@ <arguments> <argument name="disallowedFundingMap" xsi:type="array"> <item name="CREDIT" xsi:type="string">credit</item> + <item name="VENMO" xsi:type="string">venmo</item> <item name="CARD" xsi:type="string">card</item> <item name="ELV" xsi:type="string">sepa</item> </argument> From f78f6a986a2d4f6d3e6fffa9654d48ec6ebdf64c Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 18 Nov 2022 10:21:29 +0200 Subject: [PATCH 152/985] ACP2E-1358, generalized insert/update for all entity types --- .../Eav/Model/Entity/AbstractEntity.php | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 07e896e3baf9a..90ee410ab349b 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1592,22 +1592,12 @@ protected function _processAttributeValues() foreach ($this->_attributeValuesToSave as $table => $data) { $insert = []; foreach ($data as $attributeData) { - $select = $connection->select()->from($table, 'value_id')->where("entity_id = :entity_id AND attribute_id = :attribute_id"); - $result = $connection->fetchOne($select, [ - 'attribute_id' => $attributeData['attribute_id'], - 'entity_id' => $attributeData['entity_id'] - ]); - if ($result) { - $updateWhere = []; - $updateWhere[] = sprintf('%s=%d', $connection->quoteIdentifier('entity_id'), $attributeData['entity_id']); - $updateWhere[] = sprintf('%s=%d', $connection->quoteIdentifier('attribute_id'), $attributeData['attribute_id']); - $connection->update($table, ['value' => $attributeData['value']], $updateWhere); + $whereValues = $attributeData; + unset($whereValues['value']); + if ($valueId = $this->checkExistingAttributeValue($table, $attributeData)) { + $connection->update($table, ['value' => $attributeData['value']], $valueId); } else { - $insert[] = [ - 'attribute_id' => $attributeData['attribute_id'], - 'entity_id' => $attributeData['entity_id'], - 'value' => $attributeData['value'] - ]; + $insert[] = $attributeData; } } @@ -1627,6 +1617,27 @@ protected function _processAttributeValues() return $this; } + /** + * Checks for existing attribute record + * + * @param string $table + * @param array $attributeData + * @return string + */ + protected function checkExistingAttributeValue(string $table, array $attributeData): string + { + $connection = $this->getConnection(); + $where = []; + unset($attributeData['value']); + + foreach ($attributeData as $key => $val) { + $where[] = sprintf('%s = :%s', $key, $key); + } + $select = $connection->select()->from($table, 'value_id')->where(implode(' AND ', $where)); + + return $connection->fetchOne($select, $attributeData); + } + /** * Prepare value for save * From 0bb87349ee3cc57ad6cf878f98687d0a5f6fb6ad Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 18 Nov 2022 15:17:33 +0200 Subject: [PATCH 153/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try --- lib/web/mage/backend/bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/backend/bootstrap.js b/lib/web/mage/backend/bootstrap.js index ca99f5b6ae459..7bd5dac366bad 100644 --- a/lib/web/mage/backend/bootstrap.js +++ b/lib/web/mage/backend/bootstrap.js @@ -62,8 +62,8 @@ define([ if (jqXHR.readyState === 4) { try { + $('body').notification('clear'); jsonObject = JSON.parse(jqXHR.responseText); - if (jsonObject.ajaxExpired && jsonObject.ajaxRedirect) { //eslint-disable-line max-depth window.location.replace(jsonObject.ajaxRedirect); } From 5614386ac6aa85afe0ec63cc535e0f66509fcc24 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 18 Nov 2022 16:59:41 +0200 Subject: [PATCH 154/985] ACP2E-1332: activate customer account and redirect to login --- .../Customer/Controller/Account/Confirm.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Customer/Controller/Account/Confirm.php b/app/code/Magento/Customer/Controller/Account/Confirm.php index 2fc6ed4d422fb..481b9293d263d 100644 --- a/app/code/Magento/Customer/Controller/Account/Confirm.php +++ b/app/code/Magento/Customer/Controller/Account/Confirm.php @@ -16,8 +16,8 @@ use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Controller\ResultFactory; -use Magento\Framework\UrlFactory; use Magento\Framework\Exception\StateException; +use Magento\Framework\UrlFactory; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; @@ -161,15 +161,9 @@ public function execute() } try { - // log in and send greeting email + //activate and send greeting email $customerEmail = $this->customerRepository->getById($customerId)->getEmail(); - $customer = $this->customerAccountManagement->activate($customerEmail, $key); - $this->session->setCustomerDataAsLoggedIn($customer); - if ($this->getCookieManager()->getCookie('mage-cache-sessid')) { - $metadata = $this->getCookieMetadataFactory()->createCookieMetadata(); - $metadata->setPath('/'); - $this->getCookieManager()->deleteCookie('mage-cache-sessid', $metadata); - } + $this->customerAccountManagement->activate($customerEmail, $key); $this->messageManager->addSuccess($this->getSuccessMessage()); $resultRedirect->setUrl($this->getSuccessRedirect()); return $resultRedirect; @@ -197,7 +191,7 @@ protected function getSuccessMessage() 'If you are a registered VAT customer, please click <a href="%1">here</a> to enter your shipping address for proper VAT calculation.', $this->urlModel->getUrl('customer/address/edit') ); - // @codingStandardsIgnoreEnd + // @codingStandardsIgnoreEnd } else { // @codingStandardsIgnoreStart $message = __( From ff699d28d53811eac20de20e54e9f33fe29ad5a6 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 18 Nov 2022 17:14:29 +0200 Subject: [PATCH 155/985] ACP2E-1332: activate customer account and redirect to login --- .../Unit/Controller/Account/ConfirmTest.php | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php index 19db3d8317da1..e0e872d8fd13b 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php @@ -347,38 +347,6 @@ public function testSuccessMessage( ->method('getStore') ->willReturn($this->storeMock); - $cookieMetadataManager = $this->getMockBuilder(PhpCookieManager::class) - ->disableOriginalConstructor() - ->getMock(); - $cookieMetadataManager->expects($this->once()) - ->method('getCookie') - ->with('mage-cache-sessid') - ->willReturn(true); - $cookieMetadataFactory = $this->getMockBuilder(CookieMetadataFactory::class) - ->disableOriginalConstructor() - ->getMock(); - $cookieMetadata = $this->getMockBuilder(CookieMetadata::class) - ->disableOriginalConstructor() - ->getMock(); - $cookieMetadataFactory->expects($this->once()) - ->method('createCookieMetadata') - ->willReturn($cookieMetadata); - $cookieMetadata->expects($this->once()) - ->method('setPath') - ->with('/'); - $cookieMetadataManager->expects($this->once()) - ->method('deleteCookie') - ->with('mage-cache-sessid', $cookieMetadata); - - $refClass = new \ReflectionClass(Confirm::class); - $cookieMetadataManagerProperty = $refClass->getProperty('cookieMetadataManager'); - $cookieMetadataManagerProperty->setAccessible(true); - $cookieMetadataManagerProperty->setValue($this->model, $cookieMetadataManager); - - $cookieMetadataFactoryProperty = $refClass->getProperty('cookieMetadataFactory'); - $cookieMetadataFactoryProperty->setAccessible(true); - $cookieMetadataFactoryProperty->setValue($this->model, $cookieMetadataFactory); - $this->model->execute(); } @@ -506,19 +474,6 @@ public function testSuccessRedirect( ) ->willReturn($isSetFlag); - $cookieMetadataManager = $this->getMockBuilder(PhpCookieManager::class) - ->disableOriginalConstructor() - ->getMock(); - $cookieMetadataManager->expects($this->once()) - ->method('getCookie') - ->with('mage-cache-sessid') - ->willReturn(false); - - $refClass = new \ReflectionClass(Confirm::class); - $refProperty = $refClass->getProperty('cookieMetadataManager'); - $refProperty->setAccessible(true); - $refProperty->setValue($this->model, $cookieMetadataManager); - $this->model->execute(); } From bdfdd01be74ccbf993fb5266f9a713bb440a1441 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 18 Nov 2022 18:37:03 +0200 Subject: [PATCH 156/985] ACP2E-1345, avoid mocking deprecated classes --- .../Model/ResourceModel/SelectionTest.php | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php index 89972d709ab2b..23a5f980a83a7 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/ResourceModel/SelectionTest.php @@ -40,12 +40,29 @@ protected function setUp(): void public function testSaveSelectionPrice() { - $item = new Selection( - $this->createMock(\Magento\Framework\Model\Context::class), - $this->createMock(\Magento\Framework\Registry::class), - $this->createMock(\Magento\Catalog\Helper\Data::class), - $this->createMock(\Magento\Bundle\Model\ResourceModel\Selection::class) - ); + $item = $this->getMockBuilder(Selection::class) + ->disableOriginalConstructor() + ->addMethods([ + 'getSelectionId', + 'getWebsiteId', + 'getSelectionPriceType', + 'getSelectionPriceValue', + 'getParentProductId', + 'getDefaultPriceScope']) + ->getMock(); + $values = [ + 'selection_id' => 1, + 'website_id' => 1, + 'selection_price_type' => null, + 'selection_price_value' => null, + 'parent_product_id' => 1, + ]; + $item->expects($this->once())->method('getDefaultPriceScope')->willReturn(false); + $item->expects($this->once())->method('getSelectionId')->willReturn($values['selection_id']); + $item->expects($this->once())->method('getWebsiteId')->willReturn($values['website_id']); + $item->expects($this->once())->method('getSelectionPriceType')->willReturn($values['selection_price_type']); + $item->expects($this->once())->method('getSelectionPriceValue')->willReturn($values['selection_price_value']); + $item->expects($this->once())->method('getParentProductId')->willReturn($values['parent_product_id']); $connection = $this->createMock(AdapterInterface::class); $connection->expects($this->once()) From cfac1ff2d3ab10f083ff976c7b9f1bafb9d0cd83 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin <dyushkin@adobe.com> Date: Wed, 2 Nov 2022 08:23:58 -0500 Subject: [PATCH 157/985] ACP2E-1229: Issue with updating billing address on Braintree Vault --- .../frontend/web/js/model/payment-service.js | 7 +- .../frontend/js/model/payment-service.test.js | 85 +++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/payment-service.test.js diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/payment-service.js b/app/code/Magento/Checkout/view/frontend/web/js/model/payment-service.js index 36d1d649ecbf6..a0a5cf7e92eee 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/payment-service.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/payment-service.js @@ -50,13 +50,18 @@ define([ } filteredMethods = _.without(methods, freeMethod); - if (filteredMethods.length === 1) { selectPaymentMethod(filteredMethods[0]); } else if (quote.paymentMethod()) { methodIsAvailable = methods.some(function (item) { return item.method === quote.paymentMethod().method; }); + + if (!methodIsAvailable && !_.isEmpty(window.checkoutConfig.vault)) { + methodIsAvailable = Object.keys(window.checkoutConfig.payment.vault) + .findIndex((vaultPayment) => vaultPayment === quote.paymentMethod().method) !== -1; + } + //Unset selected payment method if not available if (!methodIsAvailable) { selectPaymentMethod(null); diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/payment-service.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/payment-service.test.js new file mode 100644 index 0000000000000..bc2b7d3cda6d7 --- /dev/null +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/payment-service.test.js @@ -0,0 +1,85 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +define([ + 'squire', + 'ko' +], function (Squire, ko) { + 'use strict'; + + let injector = new Squire(), + paymentService, + methods = [ + {title: 'Credit Card', method: 'credit_card'}, + {title: 'Stored Cards', method: 'credit_card_vault'} + ], + mocksPaymentMethodCheckmo = { + 'Magento_Checkout/js/model/quote': { + paymentMethod: ko.observable({ + 'method': 'checkmo' + }) + } + }, + mocksPaymentMethodVault = { + 'Magento_Checkout/js/model/quote': { + paymentMethod: ko.observable({ + 'method': 'credit_card_vault_1' + }) + } + }; + + beforeEach(function (done) { + window.checkoutConfig = { + vault: { + credit_card_vault: {} + }, + payment: { + vault: { + credit_card_vault_1: {}, + credit_card_vault_2: {} + } + } + }; + done(); + }); + + afterEach(function () { + try { + injector.remove(); + injector.clean(); + } catch (e) {} + }); + + describe('Magento_Checkout/js/model/payment-service', function () { + beforeEach(function (done) { + injector.mock(mocksPaymentMethodCheckmo); + // eslint-disable-next-line max-nested-callbacks + injector.require(['Magento_Checkout/js/model/payment-service'], function (instance) { + paymentService = instance; + done(); + }); + }); + it('payment method is not enabled', function () { + paymentService.setPaymentMethods(methods); + expect(mocksPaymentMethodCheckmo['Magento_Checkout/js/model/quote'].paymentMethod()).toBeNull(); + }); + }); + + describe('Magento_Checkout/js/model/payment-service', function () { + beforeEach(function (done) { + injector.mock(mocksPaymentMethodVault); + // eslint-disable-next-line max-nested-callbacks + injector.require(['Magento_Checkout/js/model/payment-service'], function (instance) { + paymentService = instance; + done(); + }); + }); + it('payment method is stored credit card', function () { + paymentService.setPaymentMethods(methods); + expect(mocksPaymentMethodVault['Magento_Checkout/js/model/quote'].paymentMethod().method) + .toEqual('credit_card_vault_1'); + }); + }); +}); From d08f710be69b94ca8e60d28327feafd9b0e18630 Mon Sep 17 00:00:00 2001 From: Tu Van <vandinhtuit@gmail.com> Date: Mon, 21 Nov 2022 00:51:55 +0700 Subject: [PATCH 158/985] Fix mage-cache-storage does not reflect to the change from system config value. --- .../view/frontend/web/js/customer-data.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index 1f580cfccd0b3..3c356d5ba7ee6 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -17,9 +17,7 @@ define([ ], function ($, _, ko, sectionConfig, url) { 'use strict'; - var options = { - cookieLifeTime: 86400 //1 day by default - }, + var options = {}, storage, storageInvalidation, invalidateCacheBySessionTimeOut, @@ -33,12 +31,14 @@ define([ options.sectionLoadUrl = url.build('customer/section/load'); function initStorage() { - $.cookieStorage.setConf({ - path: '/', - expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) - }); - storage = $.initNamespaceStorage('mage-cache-storage').localStorage; - storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; + if (options.cookieLifeTime !== 'undefined') { + $.cookieStorage.setConf({ + path: '/', + expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) + }); + storage = $.initNamespaceStorage('mage-cache-storage').localStorage; + storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; + } } // Initialize storage with default parameters to prevent JS errors while component still not initialized From 83f68571acf6c6241c0e88b14539942418a40d92 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 21 Nov 2022 03:31:05 +0530 Subject: [PATCH 159/985] ACPT-826 --- .../Model/AsyncConfigPublisher.php | 25 +++++++++++++++++-- .../Magento/AsyncConfig/Model/Consumer.php | 1 + app/code/Magento/AsyncConfig/etc/di.xml | 13 ++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 97c17f4dd8644..042dd26e0f3b7 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -7,9 +7,10 @@ namespace Magento\AsyncConfig\Model; +use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterfaceFactory; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\MessageQueue\PublisherInterface; use Magento\Framework\Serialize\Serializer\Json; -use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterfaceFactory; class AsyncConfigPublisher implements \Magento\AsyncConfig\Api\AsyncConfigPublisherInterface { @@ -28,20 +29,28 @@ class AsyncConfigPublisher implements \Magento\AsyncConfig\Api\AsyncConfigPublis */ private $serializer; + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + private $varDirectory; + /** * * @param AsyncConfigMessageInterfaceFactory $asyncConfigFactory * @param PublisherInterface $publisher * @param Json $json + * @param \Magento\Framework\Filesystem|null $filesystem */ public function __construct( AsyncConfigMessageInterfaceFactory $asyncConfigFactory, PublisherInterface $publisher, - Json $json + Json $json, + \Magento\Framework\Filesystem $filesystem ) { $this->asyncConfigFactory = $asyncConfigFactory; $this->messagePublisher = $publisher; $this->serializer = $json; + $this->varDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); } /** @@ -50,6 +59,18 @@ public function __construct( public function saveConfigData(array $configData) { $asyncConfig = $this->asyncConfigFactory->create(); + if ($configData['groups']['placeholder']) { + foreach ($configData['groups']['placeholder']['fields'] as &$data) { + if ($data['value']['tmp_name']) { + $newPath = $this->varDirectory->getAbsolutePath(DirectoryList::TMP) . '/' . pathinfo($data['value']['tmp_name'])['filename']; + move_uploaded_file( + $data['value']['tmp_name'], + $newPath + ); + $data['value']['tmp_name'] = $newPath; + } + } + } $asyncConfig->setConfigData($this->serializer->serialize($configData)); $this->messagePublisher->publish('async_config.saveConfig', $asyncConfig); } diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php index ad5c55f04bdd5..ea87076b988e8 100644 --- a/app/code/Magento/AsyncConfig/Model/Consumer.php +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -54,6 +54,7 @@ public function __construct( $this->scope = $scope; $this->scope->setCurrentScope('adminhtml'); $this->save = ObjectManager::getInstance()->get(Save::class); + $this->scope->setCurrentScope('global'); } /** * Process Consumer diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 577b9400a2ca5..097024f927308 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -11,4 +11,17 @@ <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> + <type name="Magento\Framework\File\Uploader"> + <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> + </type> + <type name="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"> + <arguments> + <argument name="imageExtensions" xsi:type="array"> + <item name="jpg" xsi:type="string">jpg</item> + <item name="jpeg" xsi:type="string">jpeg</item> + <item name="gif" xsi:type="string">gif</item> + <item name="png" xsi:type="string">png</item> + </argument> + </arguments> + </type> </config> From b470b0af1ec0bc68cab4c5754f1c81cf3c3566d8 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 21 Nov 2022 09:33:12 +0530 Subject: [PATCH 160/985] ACPT-826 --- .../Model/AsyncConfigPublisher.php | 45 ++++++++++++++----- app/code/Magento/AsyncConfig/composer.json | 3 +- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 042dd26e0f3b7..b2428b443a010 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -9,6 +9,8 @@ use Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterfaceFactory; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Filesystem\Io\File; use Magento\Framework\MessageQueue\PublisherInterface; use Magento\Framework\Serialize\Serializer\Json; @@ -30,40 +32,65 @@ class AsyncConfigPublisher implements \Magento\AsyncConfig\Api\AsyncConfigPublis private $serializer; /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface + * @var \Magento\Framework\Filesystem\DirectoryList */ - private $varDirectory; + private $dir; + + /** + * @var File + */ + private $file; /** * * @param AsyncConfigMessageInterfaceFactory $asyncConfigFactory * @param PublisherInterface $publisher * @param Json $json - * @param \Magento\Framework\Filesystem|null $filesystem + * @param \Magento\Framework\Filesystem\DirectoryList $dir + * @param File $file */ public function __construct( AsyncConfigMessageInterfaceFactory $asyncConfigFactory, PublisherInterface $publisher, Json $json, - \Magento\Framework\Filesystem $filesystem + \Magento\Framework\Filesystem\DirectoryList $dir, + File $file ) { $this->asyncConfigFactory = $asyncConfigFactory; $this->messagePublisher = $publisher; $this->serializer = $json; - $this->varDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + $this->dir = $dir; + $this->file = $file; } /** * @inheritDoc + * @throws FileSystemException */ public function saveConfigData(array $configData) { $asyncConfig = $this->asyncConfigFactory->create(); - if ($configData['groups']['placeholder']) { + $this->savePlaceholderData($configData); + $asyncConfig->setConfigData($this->serializer->serialize($configData)); + $this->messagePublisher->publish('async_config.saveConfig', $asyncConfig); + } + + /** + * + * @param array $configData + * @return void + * @throws FileSystemException + */ + private function savePlaceholderData(array &$configData) + { + if (isset($configData['groups']['placeholder'])) { foreach ($configData['groups']['placeholder']['fields'] as &$data) { if ($data['value']['tmp_name']) { - $newPath = $this->varDirectory->getAbsolutePath(DirectoryList::TMP) . '/' . pathinfo($data['value']['tmp_name'])['filename']; - move_uploaded_file( + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $newPath = + $this->dir->getPath(DirectoryList::TMP) + . '/' . pathinfo($data['value']['tmp_name'])['filename']; + $this->file->mv( $data['value']['tmp_name'], $newPath ); @@ -71,7 +98,5 @@ public function saveConfigData(array $configData) } } } - $asyncConfig->setConfigData($this->serializer->serialize($configData)); - $this->messagePublisher->publish('async_config.saveConfig', $asyncConfig); } } diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 1e20b7eafa35f..451fcce60c57c 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -8,7 +8,8 @@ "php": "~8.1.0||~8.2.0", "magento/framework": "*", "magento/framework-message-queue": "*", - "magento/module-config": "*" + "magento/module-config": "*", + "magento/module-MediaGalleryIntegration": "*" }, "type": "magento2-module", "license": [ From 221b5e95a2860ea627eb7acf716bb85812b3476f Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Mon, 21 Nov 2022 11:55:04 +0530 Subject: [PATCH 161/985] Adding Feedback Changes --- .../Test/Mftf/Test/DisableInventoryBackOrdersTest.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml index 065be98d19180..22222b1d635a5 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml @@ -19,8 +19,6 @@ </annotations> <before> - <!--Enable Flat Rate--> - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <!-- Enable Back Orders--> <magentoCLI command="config:set cataloginventory/item_options/backorders 1" stepKey="EnableBackorders"/> <!--Create Category--> From 9362cb4160abc27818b31f0720b05c84ba0f898e Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Mon, 21 Nov 2022 12:01:13 +0530 Subject: [PATCH 162/985] Disabling Flat Rate in after tag --- .../Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml index 3a00ba0aecada..d8879aba48008 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml @@ -87,6 +87,7 @@ </before> <after> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/> From c499cd91cd92e3a37d70ce610bc9e12d7568f1e6 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 21 Nov 2022 12:03:57 +0530 Subject: [PATCH 163/985] ACPT-826 --- app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 6 +++--- app/code/Magento/AsyncConfig/composer.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index b2428b443a010..065828bf194cf 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -86,10 +86,10 @@ private function savePlaceholderData(array &$configData) if (isset($configData['groups']['placeholder'])) { foreach ($configData['groups']['placeholder']['fields'] as &$data) { if ($data['value']['tmp_name']) { - // phpcs:ignore Magento2.Functions.DiscouragedFunction $newPath = - $this->dir->getPath(DirectoryList::TMP) - . '/' . pathinfo($data['value']['tmp_name'])['filename']; + $this->dir->getPath(DirectoryList::TMP) . '/' . + // phpcs:ignore Magento2.Functions.DiscouragedFunction + pathinfo($data['value']['tmp_name'])['filename']; $this->file->mv( $data['value']['tmp_name'], $newPath diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 451fcce60c57c..3afb3acb68300 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -9,7 +9,7 @@ "magento/framework": "*", "magento/framework-message-queue": "*", "magento/module-config": "*", - "magento/module-MediaGalleryIntegration": "*" + "magento/module-media-gallery-integration": "*" }, "type": "magento2-module", "license": [ From 6965d9687609e1711c4fb01cea65ad228c67150f Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 21 Nov 2022 13:37:15 +0530 Subject: [PATCH 164/985] ACPT-826 --- app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 2 ++ app/code/Magento/AsyncConfig/composer.json | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 065828bf194cf..60449a5c008ea 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -64,6 +64,7 @@ public function __construct( } /** + * * @inheritDoc * @throws FileSystemException */ @@ -76,6 +77,7 @@ public function saveConfigData(array $configData) } /** + * Change Placeholder Data path if exists * * @param array $configData * @return void diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 3afb3acb68300..5f3580d1d6ceb 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -7,7 +7,6 @@ "require": { "php": "~8.1.0||~8.2.0", "magento/framework": "*", - "magento/framework-message-queue": "*", "magento/module-config": "*", "magento/module-media-gallery-integration": "*" }, From 8c277cd87ff24aca7a7af9dc8fec2240d18e61f2 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Mon, 21 Nov 2022 14:37:50 +0530 Subject: [PATCH 165/985] ACQE-4043_1 --- .../Test/Mftf/Section/StorefrontProductReviewsSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml index 3757ba2f5e21d..13ffbc45644d6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductReviewsSection.xml @@ -21,5 +21,6 @@ <!-- The tab transform to an accordion when window resize --> <element name="reviewsSectionToggleState" type="button" selector="//*[@id='tab-label-reviews-title']/ancestor::div[@aria-selected='{{boolean}}'][@aria-expanded='{{boolean}}']" parameterized="true"/> <element name="infoForNotLoggedIn" type="block" selector=".block-content .message.info.notlogged"/> + <element name="startRating" type="text" selector="(.//*[@class='control review-control-vote'])[{{row}}]//label[{{value}}]" parameterized="true"/> </section> </sections> From 5b228475efb2a831f7947a771d0c8b06c362f946 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 21 Nov 2022 14:59:28 +0530 Subject: [PATCH 166/985] ACPT-826 --- .../Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php | 3 +++ app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php index eccc5d09e72db..61ee1ac901615 100644 --- a/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php +++ b/app/code/Magento/AsyncConfig/Api/AsyncConfigPublisherInterface.php @@ -7,6 +7,8 @@ namespace Magento\AsyncConfig\Api; +use Magento\Framework\Exception\FileSystemException; + interface AsyncConfigPublisherInterface { /** @@ -14,6 +16,7 @@ interface AsyncConfigPublisherInterface * * @param array $configData * @return void + * @throws FileSystemException */ public function saveConfigData(array $configData); } diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 60449a5c008ea..348d765cf9f1c 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -64,9 +64,7 @@ public function __construct( } /** - * * @inheritDoc - * @throws FileSystemException */ public function saveConfigData(array $configData) { From 1b493da037fb486756f52cf8894e8a6d12720f31 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 21 Nov 2022 11:52:55 +0200 Subject: [PATCH 167/985] ACP2E-1332: activate customer account and redirect to login --- .../Customer/Controller/Account/Confirm.php | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/app/code/Magento/Customer/Controller/Account/Confirm.php b/app/code/Magento/Customer/Controller/Account/Confirm.php index 481b9293d263d..71c2a86a98a6a 100644 --- a/app/code/Magento/Customer/Controller/Account/Confirm.php +++ b/app/code/Magento/Customer/Controller/Account/Confirm.php @@ -65,16 +65,6 @@ class Confirm extends AbstractAccount implements HttpGetActionInterface */ protected $session; - /** - * @var \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory - */ - private $cookieMetadataFactory; - - /** - * @var \Magento\Framework\Stdlib\Cookie\PhpCookieManager - */ - private $cookieMetadataManager; - /** * @param Context $context * @param Session $customerSession @@ -105,38 +95,6 @@ public function __construct( parent::__construct($context); } - /** - * Retrieve cookie manager - * - * @deprecated 101.0.0 - * @return \Magento\Framework\Stdlib\Cookie\PhpCookieManager - */ - private function getCookieManager() - { - if (!$this->cookieMetadataManager) { - $this->cookieMetadataManager = \Magento\Framework\App\ObjectManager::getInstance()->get( - \Magento\Framework\Stdlib\Cookie\PhpCookieManager::class - ); - } - return $this->cookieMetadataManager; - } - - /** - * Retrieve cookie metadata factory - * - * @deprecated 101.0.0 - * @return \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory - */ - private function getCookieMetadataFactory() - { - if (!$this->cookieMetadataFactory) { - $this->cookieMetadataFactory = \Magento\Framework\App\ObjectManager::getInstance()->get( - \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory::class - ); - } - return $this->cookieMetadataFactory; - } - /** * Confirm customer account by id and confirmation key * From cd7de2145f48c35c49745b4d73c42a1c10f27c39 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 21 Nov 2022 12:24:58 +0200 Subject: [PATCH 168/985] ACP2E-1234, added Page Builder mftf test for updated config setting --- ...nCatalogProductFieldsAutoGenerationSection.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml diff --git a/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml new file mode 100644 index 0000000000000..d800f955d532d --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminCatalogProductFieldsAutoGenerationSection"> + <element name="productFieldsAutoGeneration" type="select" selector="#catalog_fields_masks-link"/> + <element name="CheckIfTabExpand" type="button" selector="#catalog_fields_masks-link:not(.open)"/> + <element name="openedProductFieldsAutoGeneration" type="button" selector="#catalog_fields_masks-link.open"/> + <element name="metaDescriptionInput" type="text" selector="groups[fields_masks][fields][meta_description][value]"/> + </section> +</sections> From 0e78b377249016403081b1bd95c044236822abb1 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 21 Nov 2022 12:44:17 +0200 Subject: [PATCH 169/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try; added mftf --- .../AdminOrderCheckCommentsHistoryTest.xml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml new file mode 100644 index 0000000000000..975a91e7a667b --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminOrderCheckCommentsHistoryTest"> + <annotations> + <features value="Sales"/> + <stories value="Admin order page"/> + <title value="Check Comments History Tab"/> + <description value="Check if order comments history tab is loading"/> + <severity value="MINOR"/> + <testCaseId value="AC-7087"/> + <useCaseId value="ACP2E-1369"/> + <group value="sales"/> + </annotations> + <before> + + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Customer is created --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <!-- Login to Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + </before> + <after> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + <!-- Delete products --> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + + <!-- Delete Category --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- Delete Customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + </after> + + <!-- Create new customer order --> + <comment userInput="Create new customer order" stepKey="createNewCustomerOrderComment"/> + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> + <argument name="customer" value="$$createCustomer$$"/> + </actionGroup> + <!-- Add Simple product to order --> + <comment userInput="Add Simple product to order" stepKey="addSimpleProductToOrderComment"/> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToTheOrder"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <!-- Select FlatRate shipping method --> + <comment userInput="Select FlatRate shipping method" stepKey="selectFlatRateShippingMethodComment"/> + <actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> + <!-- Submit order --> + <comment userInput="Submit order" stepKey="submitOrderComment"/> + <actionGroup ref="AdminOrderClickSubmitOrderActionGroup" stepKey="submitOrder" /> + <!-- Verify order information --> + <comment userInput="Verify order information" stepKey="verifyOrderInformationComment"/> + <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/> + <comment userInput="BIC workaround" stepKey="orderId"/> + <grabTextFrom selector="|Order # (\d+)|" stepKey="orderNumber"/> + + <!--Go to Comments history and switch to Information --> + <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory1"/> + <click selector="{{AdminOrderDetailsOrderViewSection.information}}" stepKey="goToInformation"/> + <see userInput="A technical problem with the server created an error" stepKey="seeTechnicalErrorMessage"/> + + <!--Go to Comments history and don't see the error message --> + <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory2"/> + <waitForPageLoad stepKey="waitForCommentsHistoryPage"/> + <see userInput="Order Placed by Store Administrator" stepKey="seeMessageOrderCreatedByAdmin"/> + <dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessage"/> + + </test> +</tests> From 2eb09dbee39fcc98a1d270cb2ad3b9fd2247f021 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 21 Nov 2022 15:25:18 +0200 Subject: [PATCH 170/985] ACP2E-1358, generalized insert/update for all entity types --- .../Eav/Model/Entity/AbstractEntity.php | 42 +++---------------- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 90ee410ab349b..17162a175b7c8 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1544,7 +1544,11 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - return $this->_saveAttribute($object, $attribute, $value); + $table = $attribute->getBackend()->getTable(); + $connection = $this->getConnection(); + $connection->update($table, ['value' => $this->_prepareValueForSave($value, $attribute)], 'value_id = ' . $valueId); + + return $this; } /** @@ -1590,20 +1594,7 @@ protected function _processAttributeValues() { $connection = $this->getConnection(); foreach ($this->_attributeValuesToSave as $table => $data) { - $insert = []; - foreach ($data as $attributeData) { - $whereValues = $attributeData; - unset($whereValues['value']); - if ($valueId = $this->checkExistingAttributeValue($table, $attributeData)) { - $connection->update($table, ['value' => $attributeData['value']], $valueId); - } else { - $insert[] = $attributeData; - } - } - - if (!empty($insert)) { - $connection->insertArray($table, array_keys($insert[0]), $insert); - } + $connection->insertOnDuplicate($table, $data, array_keys($data[0])); } foreach ($this->_attributeValuesToDelete as $table => $valueIds) { @@ -1617,27 +1608,6 @@ protected function _processAttributeValues() return $this; } - /** - * Checks for existing attribute record - * - * @param string $table - * @param array $attributeData - * @return string - */ - protected function checkExistingAttributeValue(string $table, array $attributeData): string - { - $connection = $this->getConnection(); - $where = []; - unset($attributeData['value']); - - foreach ($attributeData as $key => $val) { - $where[] = sprintf('%s = :%s', $key, $key); - } - $select = $connection->select()->from($table, 'value_id')->where(implode(' AND ', $where)); - - return $connection->fetchOne($select, $attributeData); - } - /** * Prepare value for save * From 26663afe1e79219fa248e54ec3e35cc55dbaca7f Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 21 Nov 2022 16:04:40 +0200 Subject: [PATCH 171/985] ACP2E-1234, added Page Builder mftf test for updated config setting --- .../Section/AdminCatalogProductFieldsAutoGenerationSection.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml index d800f955d532d..aedf461a188c0 100644 --- a/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminCatalogProductFieldsAutoGenerationSection.xml @@ -7,9 +7,6 @@ --> <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCatalogProductFieldsAutoGenerationSection"> - <element name="productFieldsAutoGeneration" type="select" selector="#catalog_fields_masks-link"/> - <element name="CheckIfTabExpand" type="button" selector="#catalog_fields_masks-link:not(.open)"/> - <element name="openedProductFieldsAutoGeneration" type="button" selector="#catalog_fields_masks-link.open"/> <element name="metaDescriptionInput" type="text" selector="groups[fields_masks][fields][meta_description][value]"/> </section> </sections> From 55029c9b8c813c75eb8c47b5ad719a6bc178d168 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 21 Nov 2022 16:17:42 +0200 Subject: [PATCH 172/985] ACP2E-1358, fixed static --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 17162a175b7c8..23ee065a9a479 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1546,7 +1546,10 @@ protected function _updateAttribute($object, $attribute, $valueId, $value) { $table = $attribute->getBackend()->getTable(); $connection = $this->getConnection(); - $connection->update($table, ['value' => $this->_prepareValueForSave($value, $attribute)], 'value_id = ' . $valueId); + $connection->update($table, + ['value' => $this->_prepareValueForSave($value, $attribute)], + 'value_id = ' . $valueId + ); return $this; } From 8e47e09afc15a006a460c7bea9ec487c05b08e65 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 21 Nov 2022 16:46:19 +0200 Subject: [PATCH 173/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try; added mftf --- lib/web/mage/backend/bootstrap.js | 4 ++-- lib/web/mage/backend/notification.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/backend/bootstrap.js b/lib/web/mage/backend/bootstrap.js index 7bd5dac366bad..4b2101a4390b5 100644 --- a/lib/web/mage/backend/bootstrap.js +++ b/lib/web/mage/backend/bootstrap.js @@ -62,7 +62,7 @@ define([ if (jqXHR.readyState === 4) { try { - $('body').notification('clear'); + $('body').notification('clearCallbackError'); jsonObject = JSON.parse(jqXHR.responseText); if (jsonObject.ajaxExpired && jsonObject.ajaxRedirect) { //eslint-disable-line max-depth window.location.replace(jsonObject.ajaxRedirect); @@ -87,7 +87,7 @@ define([ * @param {String} message */ insertMethod: function (message) { - var $wrapper = $('<div></div>').html(message); + var $wrapper = $('<div class="callback"></div>').html(message); $('.page-main-actions').after($wrapper); } diff --git a/lib/web/mage/backend/notification.js b/lib/web/mage/backend/notification.js index db6304b829561..cb44e327800c9 100644 --- a/lib/web/mage/backend/notification.js +++ b/lib/web/mage/backend/notification.js @@ -77,6 +77,13 @@ define([ */ clear: function () { $(this.placeholder).html(''); + }, + + /** + * Remove generic callback error message + */ + clearCallbackError: function () { + $('body').find('.callback .messages .message-error').parent().html(''); } }); From 851f81125486860c2b61e83ba84941bf98219cda Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Mon, 21 Nov 2022 10:10:24 -0600 Subject: [PATCH 174/985] ACP2E-1290: Cart Rule discount issue on shipping price --- app/code/Magento/SalesRule/i18n/en_US.csv | 1 + .../ui_component/sales_rule_form.xml | 3 +++ .../web/js/form/element/apply_to_shipping.js | 19 ++++++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/i18n/en_US.csv b/app/code/Magento/SalesRule/i18n/en_US.csv index 0fc7047c30b49..b00b3a74a6482 100644 --- a/app/code/Magento/SalesRule/i18n/en_US.csv +++ b/app/code/Magento/SalesRule/i18n/en_US.csv @@ -168,3 +168,4 @@ Apply,Apply "Trigger recollect totals for quotes by rule ID %1","Trigger recollect totals for quotes by rule ID %1" "Sorry, something went wrong while triggering recollect totals for affected quotes. Please see log for details.","Sorry, something went wrong while triggering recollect totals for affected quotes. Please see log for details." "When coupon quantity exceeds %1, the coupon code length must be minimum %2", "When coupon quantity exceeds %1, the coupon code length must be minimum %2" +"Discount amount is distributed among subtotal and shipping amount. Cases when multiple discounts applied to shipping amount are not supported. The option is going to be removed in future releases.ly","Discount amount is distributed among subtotal and shipping amount. Cases when multiple discounts applied to shipping amount are not supported. The option is going to be removed in future releases." diff --git a/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml b/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml index 0924cdcfe2206..b8c857dd0cf07 100644 --- a/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml +++ b/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml @@ -472,6 +472,9 @@ <item name="0" xsi:type="string" translate="true">Discount amount is applied to subtotal only</item> <item name="1" xsi:type="string" translate="true">Discount amount is applied to subtotal and shipping amount separately</item> </item> + <item name="noticePerSimpleAction" xsi:type="array"> + <item name="cart_fixed" xsi:type="string" translate="true">Discount amount is distributed among subtotal and shipping amount. Cases when multiple discounts applied to shipping amount are not supported. The option is going to be removed in future releases.</item> + </item> </item> </argument> <settings> diff --git a/app/code/Magento/SalesRule/view/adminhtml/web/js/form/element/apply_to_shipping.js b/app/code/Magento/SalesRule/view/adminhtml/web/js/form/element/apply_to_shipping.js index 6868617c1c449..99f9818c847c6 100644 --- a/app/code/Magento/SalesRule/view/adminhtml/web/js/form/element/apply_to_shipping.js +++ b/app/code/Magento/SalesRule/view/adminhtml/web/js/form/element/apply_to_shipping.js @@ -12,7 +12,9 @@ define([ defaults: { imports: { toggleDisabled: '${ $.parentName }.simple_action:value' - } + }, + noticePerSimpleAction: {}, + selectedSimpleAction: '' }, /** @@ -29,6 +31,21 @@ define([ if (this.disabled()) { this.checked(false); } + this.selectedSimpleAction = action; + this.chooseNotice(); + }, + + /** + * @inheritdoc + */ + chooseNotice: function () { + var checkedNoticeNumber = Number(this.checked()); + + if (checkedNoticeNumber === 1 && this.noticePerSimpleAction.hasOwnProperty(this.selectedSimpleAction)) { + this.notice = this.noticePerSimpleAction[this.selectedSimpleAction]; + } else { + this._super(); + } } }); }); From b615f477c6ad906fe5d518d8c5e9c13ca0c12c1b Mon Sep 17 00:00:00 2001 From: Denis Kopylov <dkopylov@magenius.team> Date: Mon, 21 Nov 2022 20:06:28 +0300 Subject: [PATCH 175/985] Fixed this usage Signed-off-by: Denis Kopylov <dkopylov@magenius.team> --- .../Catalog/Model/Indexer/Product/Price/AbstractAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index f9a722501fa14..219467033ecde 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -180,7 +180,7 @@ protected function _syncData(array $processIds = []) foreach ($this->dimensionCollectionFactory->create() as $dimensions) { $insertSelect = $this->getConnection()->select()->from( ['ip_tmp' => $this->_defaultIndexerResource->getIdxTable()], - array_keys($this->getConnection()->describeTable(this->tableMaintainer->getMainTableByDimensions($dimensions))) + array_keys($this->getConnection()->describeTable($this->tableMaintainer->getMainTableByDimensions($dimensions))) ); foreach ($dimensions as $dimension) { From b61ef7f11e48492f8cadb78ae85666ac354e7a71 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Thu, 17 Nov 2022 11:07:17 -0600 Subject: [PATCH 176/985] ACP2E-1361: Customer is not getting product price drop email for subsequent product price changes --- .../Model/Mailing/AlertProcessor.php | 11 ++++- .../Model/Mailing/AlertProcessorTest.php | 46 +++++++++++++++++-- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php index 83ac4abd896c1..a77ca851ac746 100644 --- a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php +++ b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php @@ -27,6 +27,8 @@ /** * Class for mailing Product Alerts + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AlertProcessor { @@ -139,6 +141,7 @@ public function process(string $alertType, array $customerIds, int $websiteId): * @param int $websiteId * @return array * @throws \Exception + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ private function processAlerts(string $alertType, array $customerIds, int $websiteId): array { @@ -160,6 +163,7 @@ private function processAlerts(string $alertType, array $customerIds, int $websi /** @var Website $website */ $website = $this->storeManager->getWebsite($websiteId); $defaultStoreId = $website->getDefaultStore()->getId(); + $products = []; /** @var Price|Stock $alert */ foreach ($collection as $alert) { @@ -174,7 +178,12 @@ private function processAlerts(string $alertType, array $customerIds, int $websi $customer = $this->customerRepository->getById($alert->getCustomerId()); } - $product = $this->productRepository->getById($alert->getProductId(), false, $defaultStoreId); + if (!isset($products[$alert->getProductId()])) { + $product = $this->productRepository->getById($alert->getProductId(), false, $defaultStoreId, true); + $products[$alert->getProductId()] = $product; + } else { + $product = $products[$alert->getProductId()]; + } switch ($alertType) { case self::ALERT_TYPE_STOCK: diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index bde9bbd9b4d2d..9553e1e7e7803 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -7,6 +7,9 @@ namespace Magento\ProductAlert\Model\Mailing; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\ProductFactory; +use Magento\Catalog\Model\ResourceModel\Product as ProductResourceModel; use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Model\Session; use Magento\Framework\App\Area; @@ -16,6 +19,7 @@ use Magento\Framework\Phrase\Renderer\Translate as PhraseRendererTranslate; use Magento\Framework\Phrase\RendererInterface; use Magento\Framework\Translate; +use Magento\Store\Model\Store; use Magento\Store\Model\StoreRepository; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; @@ -23,11 +27,12 @@ use PHPUnit\Framework\TestCase; /** -* Test for Product Alert observer -* -* @magentoAppIsolation enabled -* @magentoAppArea frontend -*/ + * Test for Product Alert observer + * + * @magentoAppIsolation enabled + * @magentoAppArea frontend + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class AlertProcessorTest extends TestCase { /** @@ -127,6 +132,37 @@ public function testProcessPortuguese() $this->assertStringContainsString(substr($expectedText, 0, 50), $messageContent); } + /** + * @magentoConfigFixture current_store catalog/productalert/allow_price 1 + * @magentoDataFixture Magento/ProductAlert/_files/product_alert.php + */ + public function testCustomerShouldGetEmailForEveryProductPriceDrop(): void + { + $this->processAlerts(); + + $this->assertStringContainsString( + '$10.00', + $this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() + ); + + // Intentional: update product without using ProductRepository + // to prevent changes from being cached on application level + $product = $this->objectManager->get(ProductFactory::class)->create(); + $productRepository = $this->objectManager->get(ProductRepositoryInterface::class); + $productResource = $this->objectManager->get(ProductResourceModel::class); + $product->setStoreId(Store::DEFAULT_STORE_ID); + $productResource->load($product, $productRepository->get('simple')->getId()); + $product->setPrice(5); + $productResource->save($product); + + $this->processAlerts(); + + $this->assertStringContainsString( + '$5.00', + $this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() + ); + } + /** * Process price alerts */ From 3284a9a26cb4ccd91c03d0bdd69051c9016c671d Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 22 Nov 2022 09:49:01 +0200 Subject: [PATCH 177/985] ACP2E-1358, fixed static --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 23ee065a9a479..96313631d787c 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1546,7 +1546,8 @@ protected function _updateAttribute($object, $attribute, $valueId, $value) { $table = $attribute->getBackend()->getTable(); $connection = $this->getConnection(); - $connection->update($table, + $connection->update( + $table, ['value' => $this->_prepareValueForSave($value, $attribute)], 'value_id = ' . $valueId ); From 858a3b038eba7afbb5610a6c90ed927938b3c0db Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Tue, 22 Nov 2022 13:43:42 +0530 Subject: [PATCH 178/985] Enabling Flat Rate because of Broken TestCase --- .../Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml index d8879aba48008..7beebb7b5ad9a 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml @@ -20,6 +20,7 @@ </annotations> <before> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/> + <!-- Enable Flat rate--> <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct01"> From 03ed31e68a9cafaf5b43cf0ce7d5389487f917ec Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 22 Nov 2022 12:49:29 +0200 Subject: [PATCH 179/985] ACP2E-1358, fixed static --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 96313631d787c..cf267e50fe91c 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1019,6 +1019,7 @@ public function load($object, $entityId, $attributes = []) * Loads attributes metadata. * * @deprecated 101.0.0 Use self::loadAttributesForObject instead + * @see \Magento\Eav\Model\Entity\AbstractEntity::loadAttributesForObject * @param array|null $attributes * @return $this * @since 100.1.0 @@ -1933,7 +1934,9 @@ protected function _isAttributeValueEmpty(AbstractAttribute $attribute, $value) * * @return AttributeLoaderInterface * - * @deprecated 100.1.0 + * @deprecated 100.1.0 ObjectManager can be used instead. + * ObjectManager::getInstance()->get(AttributeLoader::class) + * @see \Magento\Framework\App\ObjectManager::get() * @since 100.1.0 */ protected function getAttributeLoader() From c9fb34b777e4b20cf91650695229f4862e342459 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 22 Nov 2022 14:24:16 +0200 Subject: [PATCH 180/985] ACP2E-1367: add missing entities to grid in async mode --- .../Provider/Query/IdListBuilder.php | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php b/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php index 65b11e1129b33..5eb2544358603 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php +++ b/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php @@ -10,6 +10,7 @@ use Magento\Framework\App\ResourceConnection; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\DB\Select; +use Magento\Sales\Model\ResourceModel\Grid; /** * Query builder for retrieving list of updated order ids that was not synced to grid table. @@ -80,23 +81,6 @@ private function getConnection(): AdapterInterface return $this->connection; } - /** - * Returns update time of the last row in the grid. - * - * @param string $gridTableName - * @return string - */ - private function getLastUpdatedAtValue(string $gridTableName): string - { - $select = $this->getConnection()->select() - ->from($this->getConnection()->getTableName($gridTableName), ['updated_at']) - ->order('updated_at DESC') - ->limit(1); - $row = $this->getConnection()->fetchRow($select); - - return $row['updated_at'] ?? '0000-00-00 00:00:00'; - } - /** * Builds select object. * @@ -107,9 +91,15 @@ private function getLastUpdatedAtValue(string $gridTableName): string public function build(string $mainTableName, string $gridTableName): Select { $select = $this->getConnection()->select() - ->from($mainTableName, [$mainTableName . '.entity_id']); - $lastUpdateTime = $this->getLastUpdatedAtValue($gridTableName); - $select->where($mainTableName . '.updated_at >= ?', $lastUpdateTime); + ->from(['main_table' => $mainTableName], ['main_table.entity_id']) + ->joinLeft( + ['grid_table' => $this->resourceConnection->getTableName($gridTableName)], + 'main_table.entity_id = grid_table.entity_id', + [] + ); + + $select->where('grid_table.entity_id IS NULL'); + $select->limit(Grid::BATCH_SIZE); foreach ($this->additionalGridTables as $table) { $select->joinLeft( [$table => $table], From 6e1aa6b28c51d23643c9ffc24670424a4f88492d Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Wed, 23 Nov 2022 11:51:12 +0530 Subject: [PATCH 181/985] Adding Flat rate --- .../Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml index cea6a37f6a57f..08088925d426f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml @@ -20,7 +20,8 @@ </annotations> <before> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/> - + <!-- Enable Flat rate--> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct01"> <requiredEntity createDataKey="createCategory"/> @@ -92,7 +93,7 @@ <comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/> </before> <after> - + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/> From 9432b503ce022fc57ad2de79bbbc5c8edbc5ef65 Mon Sep 17 00:00:00 2001 From: Jhalak Mathur <glo04301@adobe.com> Date: Wed, 23 Nov 2022 14:27:07 +0530 Subject: [PATCH 182/985] Adding Flat rate --- .../Test/Mftf/Test/StorefrontCustomerAccountOrderListTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerAccountOrderListTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerAccountOrderListTest.xml index ba113c739d706..547e0c648f43d 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerAccountOrderListTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCustomerAccountOrderListTest.xml @@ -19,7 +19,7 @@ </annotations> <before> - + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <!--Create Product via API--> <createData entity="SimpleProduct2" stepKey="Product"/> @@ -106,6 +106,7 @@ </before> <after> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> <deleteData createDataKey="Product" stepKey="deleteProduct"/> <deleteData createDataKey="Customer" stepKey="deleteCustomer"/> From 402f9cf13aec0c1f84754d7e88fc1e1c4e55ebb9 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 23 Nov 2022 14:32:14 +0200 Subject: [PATCH 183/985] ACP2E-1353: allow image/x-icon favicon; cr comments --- .../Model/File/Validator/Image.php | 28 +------------------ app/code/Magento/Theme/i18n/en_US.csv | 1 + .../ui_component/design_config_form.xml | 2 +- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 83a3343765da4..5070cd08d2191 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -30,7 +30,7 @@ class Image extends AbstractValidator 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'bmp' => 'image/bmp', - 'ico' => [ 'image/vnd.microsoft.icon', 'image/x-icon'] + 'ico' => ['image/vnd.microsoft.icon', 'image/x-icon'] ]; /** @@ -48,11 +48,6 @@ class Image extends AbstractValidator */ private $file; - /** - * @var ConfigInterface - */ - private $config; - /** * @var LoggerInterface */ @@ -62,20 +57,17 @@ class Image extends AbstractValidator * @param Mime $fileMime * @param Factory $imageFactory * @param File $file - * @param ConfigInterface|null $config * @param LoggerInterface|null $logger */ public function __construct( Mime $fileMime, Factory $imageFactory, File $file, - ConfigInterface $config = null, LoggerInterface $logger = null ) { $this->fileMime = $fileMime; $this->imageFactory = $imageFactory; $this->file = $file; - $this->config = $config ?? ObjectManager::getInstance()->get(ConfigInterface::class); $this->logger = $logger ?? ObjectManager::getInstance()->get(LoggerInterface::class); parent::__construct(); @@ -93,11 +85,6 @@ public function isValid($filePath): bool try { $image = $this->imageFactory->create($filePath); $image->open(); - } catch (\InvalidArgumentException $e) { - if (stripos($fileMimeType, 'icon') !== false) { - $image = $this->imageFactory->create($filePath, $this->getNonDefaultAdapter()); - $image->open(); - } } catch (\Exception $e) { $isValid = false; $this->logger->critical($e, ['exception' => $e]); @@ -106,17 +93,4 @@ public function isValid($filePath): bool return $isValid; } - - /** - * Get non default image adapter - * - * @return string|null - */ - private function getNonDefaultAdapter(): ?string - { - $defaultAdapter = $this->config->getAdapterAlias(); - $adapters = $this->config->getAdapters(); - unset($adapters[$defaultAdapter]); - return array_key_first($adapters) ?? null; - } } diff --git a/app/code/Magento/Theme/i18n/en_US.csv b/app/code/Magento/Theme/i18n/en_US.csv index 0ef598c79259d..ac5d5c4a62cb9 100644 --- a/app/code/Magento/Theme/i18n/en_US.csv +++ b/app/code/Magento/Theme/i18n/en_US.csv @@ -153,6 +153,7 @@ Configuration,Configuration "Other Settings","Other Settings" "HTML Head","HTML Head" "Allowed file types: ico, png, gif, jpg, jpeg, apng. Not all browsers support all these formats!","Allowed file types: ico, png, gif, jpg, jpeg, apng. Not all browsers support all these formats!" +"Not all browsers support all these formats! Note: ICO file type is supported by ImageMagik adapter that can be set from Store / Configuration / Developer / Image Processing Settings.","Not all browsers support all these formats! Note: ICO file type is supported by ImageMagik adapter that can be set from Store / Configuration / Developer / Image Processing Settings." "Favicon Icon","Favicon Icon" "Default Page Title","Default Page Title" "Page Title Prefix","Page Title Prefix" diff --git a/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml index dfe11f3120cd8..a01805bd2e49c 100644 --- a/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml +++ b/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml @@ -56,7 +56,7 @@ </settings> <field name="head_shortcut_icon" formElement="imageUploader"> <settings> - <notice translate="true">Not all browsers support all these formats!</notice> + <notice translate="true">Not all browsers support all these formats! Note: ICO file type is supported by ImageMagik adapter that can be set from Store / Configuration / Developer / Image Processing Settings.</notice> <label translate="true">Favicon Icon</label> <componentType>imageUploader</componentType> </settings> From 7e2e8e4b8766e77e102fed4e14b6d5c91590451f Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 23 Nov 2022 16:43:09 +0200 Subject: [PATCH 184/985] ACP2E-1353: allow image/x-icon favicon; cr comments --- .../System/Design/ThemeControllerTest.php | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php index 738aa67d4be8e..3ba66146fedaf 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php @@ -5,6 +5,7 @@ */ namespace Magento\Theme\Controller\Adminhtml\System\Design; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Filesystem\DirectoryList; @@ -13,6 +14,27 @@ */ class ThemeControllerTest extends \Magento\TestFramework\TestCase\AbstractBackendController { + /** + * @var ScopeConfigInterface|mixed + */ + private $config; + + /** + * @var string + */ + private $imageAdapter; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->config = $this->_objectManager->get(ScopeConfigInterface::class); + $this->imageAdapter = $this->config->getValue('dev/image/default_adapter'); + } + public function testUploadJsAction() { $name = 'simple-js-file.js'; @@ -39,14 +61,14 @@ public function testUploadFaviconAction() $this->getRequest()->setPostValue('id', $theme->getId()); $this->dispatch('backend/admin/design_config_fileUploader/save'); $output = $this->getResponse()->getBody(); - if (in_array('imagick', get_loaded_extensions())) { - $this->assertStringContainsString('"error":"false"', $output); - $this->assertStringContainsString($name, $output); - } else { + if (!in_array('imagick', get_loaded_extensions()) || $this->imageAdapter == 'GD2') { $this->assertStringContainsString( - '"error":"Required PHP extension \'Imagick\' was not loaded."', + '{"error":"File validation failed."', $output ); + } else { + $this->assertStringContainsString('"error":"false"', $output); + $this->assertStringContainsString($name, $output); } } } From e7fa37ad853e8246f90112ca89fbb03bca345423 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 23 Nov 2022 18:39:40 +0200 Subject: [PATCH 185/985] ACP2E-1358, added integration test --- .../ResourceModel/CustomerRepositoryTest.php | 67 ++++++++++++++++--- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php index 809102007f153..f14ba3556eff8 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php @@ -8,26 +8,26 @@ use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\CustomerRepositoryInterface; -use Magento\Customer\Api\Data\CustomerInterfaceFactory; +use Magento\Customer\Api\Data\AddressInterface; use Magento\Customer\Api\Data\AddressInterfaceFactory; -use Magento\Framework\Api\ExtensibleDataObjectConverter; -use Magento\Framework\Api\DataObjectHelper; -use Magento\Framework\Encryption\EncryptorInterface; use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Api\Data\CustomerInterfaceFactory; +use Magento\Customer\Model\Customer; use Magento\Customer\Model\CustomerRegistry; +use Magento\Framework\Api\DataObjectHelper; +use Magento\Framework\Api\ExtensibleDataObjectConverter; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Api\SortOrder; +use Magento\Framework\Api\SortOrderBuilder; use Magento\Framework\Config\CacheInterface; +use Magento\Framework\Encryption\EncryptorInterface; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Validator\Exception as ValidatorException; use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Customer\Api\Data\AddressInterface; -use Magento\Framework\Api\SearchCriteriaBuilder; -use Magento\Framework\Api\FilterBuilder; -use Magento\Framework\Api\SortOrderBuilder; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Customer\Model\Customer; /** * Checks Customer insert, update, search with repository @@ -244,6 +244,53 @@ public function testUpdateCustomer($defaultBilling, $defaultShipping) $this->assertNotContains('password_hash', array_keys($inAfterOnly)); } + /** + * Test update customer custom attributes + * + * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_custom_attribute.php + * @return void + */ + public function testUpdateCustomerAttributesAutoIncrement() + { + $email = 'email@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + $newAttributeValue = 'test1'; + $updateAttributeValue = 'test2'; + + $newCustomerEntity = $this->customerFactory->create() + ->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity->setCustomAttribute('custom_attribute1', $newAttributeValue); + $savedCustomer = $this->customerRepository->save($newCustomerEntity); + + $updatedCustomer = $this->customerFactory->create(); + $this->dataObjectHelper->mergeDataObjects( + CustomerInterface::class, + $updatedCustomer, + $savedCustomer + ); + $updatedCustomer->setCustomAttribute('custom_attribute1', $updateAttributeValue); + $this->customerRepository->save($updatedCustomer); + + $customerAfter = $this->customerRepository->getById($savedCustomer->getId()); + $this->assertSame( + $customerAfter->getCustomAttribute('custom_attribute1')->getValue(), + $updateAttributeValue + ); + + $resource = $this->objectManager->get(\Magento\Framework\App\ResourceConnection::class); + $connection = $resource->getConnection(); + $tableStatus = $connection->showTableStatus('customer_entity_varchar'); + $this->assertSame($tableStatus['Auto_increment'], '2'); + } + /** * Test update customer address * From bd82e9b1c027d001b92111107281779ad8a5a095 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 24 Nov 2022 17:01:22 +0200 Subject: [PATCH 186/985] ACP2E-1367: add missing entities to grid in async mode; added mftf --- .../AdminCreateOrdersAndCheckGridsTest.xml | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml new file mode 100644 index 0000000000000..26a42f8606e6f --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCreateOrdersAndCheckGridsTest"> + <annotations> + <stories value="Create orders and check grids"/> + <title value="Create orders, invoices, shipments and credit memos and check grids"/> + <description value="Create orders, invoices, shipments and credit memos and check async grids"/> + <severity value="AVERAGE"/> + <useCaseId value="ACP2E-1367" /> + <testCaseId value="AC-7106" /> + <group value="sales"/> + </annotations> + <before> + <magentoCLI command="config:set dev/grid/async_indexing 1" stepKey="enableAsyncIndexing"/> + <magentoCLI command="cache:clean config" stepKey="cacheCleanBefore"/> + + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + + <createData entity="ApiCategory" stepKey="createCategory"/> + + <createData entity="defaultSimpleProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <createData entity="GuestCart" stepKey="createGuestCartOne"/> + <createData entity="SimpleCartItem" stepKey="addCartItemOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + <updateData createDataKey="createGuestCartOne" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </updateData> + + <magentoCLI command="cron:run" stepKey="runCronOne"/> + + <createData entity="Invoice" stepKey="invoiceOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <createData entity="GuestCart" stepKey="createGuestCartTwo"/> + <createData entity="SimpleCartItem" stepKey="addCartItemTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + <updateData createDataKey="createGuestCartTwo" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </updateData> + + <createData entity="Shipment" stepKey="shipOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronTwo"/> + + <createData entity="GuestCart" stepKey="createGuestCartThree"/> + <createData entity="SimpleCartItem" stepKey="addCartItemThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + <updateData createDataKey="createGuestCartThree" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </updateData> + + <createData entity="CreditMemo" stepKey="refundOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <createData entity="Invoice" stepKey="invoiceOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <createData entity="Shipment" stepKey="shipOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronThree"/> + + <createData entity="Invoice" stepKey="invoiceOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <createData entity="Shipment" stepKey="shipOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <createData entity="CreditMemo" stepKey="refundOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronFour"/> + + <createData entity="CreditMemo" stepKey="refundOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronFive"/> + + </before> + + <after> + <magentoCLI command="config:set dev/grid/async_indexing 0" stepKey="enableAsyncIndexing"/> + <magentoCLI command="cache:clean config" stepKey="cacheCleanAfter"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> + <waitForPageLoad time="60" stepKey="waitForGrid"/> + <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> + + <grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createGuestCartOne.return$)}}" stepKey="getOrderOneId"/> + <grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createGuestCartTwo.return$)}}" stepKey="getOrderTwoId"/> + <grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createGuestCartThree.return$)}}" stepKey="getOrderThreeId"/> + + <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrderOne"> + <argument name="entityId" value="$createGuestCartOne.return$"/> + </actionGroup> + + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageOne"/> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask1" after="openInvoicesTabOrdersPageOne"/> + <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridOne" /> + <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageOne"/> + <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask2" after="openShipmentsTabOrdersPageOne"/> + <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridOne" /> + <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageOne"/> + <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask3" after="openCreditMemosTabOrdersPageOne"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridOne" /> + + <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrderTwo"> + <argument name="entityId" value="$createGuestCartTwo.return$"/> + </actionGroup> + + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageTwo"/> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask4" after="openInvoicesTabOrdersPageTwo"/> + <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridTwo" /> + <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageTwo"/> + <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask5" after="openShipmentsTabOrdersPageTwo"/> + <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridTwo" /> + <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageTwo"/> + <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask6" after="openCreditMemosTabOrdersPageTwo"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridTwo" /> + + <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrderThree"> + <argument name="entityId" value="$createGuestCartThree.return$"/> + </actionGroup> + + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageThree"/> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask7" after="openInvoicesTabOrdersPageThree"/> + <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridThree" /> + <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageThree"/> + <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask8" after="openShipmentsTabOrdersPageThree"/> + <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridThree" /> + <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageThree"/> + <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask9" after="openCreditMemosTabOrdersPageThree"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridThree" /> + </test> +</tests> From 9fcc6acced0abdd5c3fb0f24c52af0a17726a5a3 Mon Sep 17 00:00:00 2001 From: Luke Rodgers <lr@amp.co> Date: Thu, 24 Nov 2022 15:50:36 +0000 Subject: [PATCH 187/985] Fix simple product update not invalidating configurable --- .../Model/Plugin/ProductIdentitiesExtender.php | 3 ++- .../Test/Unit/Model/Plugin/ProductIdentitiesExtenderTest.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductIdentitiesExtender.php b/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductIdentitiesExtender.php index ef0ada5e7d5cc..75d8b3635d0ee 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductIdentitiesExtender.php +++ b/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductIdentitiesExtender.php @@ -7,6 +7,7 @@ namespace Magento\ConfigurableProduct\Model\Plugin; +use Magento\Catalog\Model\Product\Type as ProductTypes; use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableType; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product; @@ -51,7 +52,7 @@ public function __construct(ConfigurableType $configurableType, ProductRepositor */ public function afterGetIdentities(Product $subject, array $identities): array { - if ($subject->getTypeId() !== ConfigurableType::TYPE_CODE) { + if ($subject->getTypeId() !== ProductTypes::TYPE_SIMPLE) { return $identities; } $parentProductsIdentities = []; diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductIdentitiesExtenderTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductIdentitiesExtenderTest.php index 6e3c4220b7d68..189417f907d60 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductIdentitiesExtenderTest.php +++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductIdentitiesExtenderTest.php @@ -9,6 +9,7 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\Product\Type; use Magento\ConfigurableProduct\Model\Plugin\ProductIdentitiesExtender; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; use PHPUnit\Framework\MockObject\MockObject; @@ -71,7 +72,7 @@ public function testAfterGetIdentities() ->willReturn($productId); $productMock->expects($this->exactly(2)) ->method('getTypeId') - ->willReturn(Configurable::TYPE_CODE); + ->willReturn(Type::TYPE_SIMPLE); $this->configurableTypeMock->expects($this->once()) ->method('getParentIdsByChild') ->with($productId) From 212ed76ccb68cd49dc05bae39f80aad156480b7c Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 24 Nov 2022 19:40:14 +0200 Subject: [PATCH 188/985] ACP2E-1367: add missing entities to grid in async mode; added mftf --- .../Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index 26a42f8606e6f..24112a7599e68 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -19,7 +19,7 @@ </annotations> <before> <magentoCLI command="config:set dev/grid/async_indexing 1" stepKey="enableAsyncIndexing"/> - <magentoCLI command="cache:clean config" stepKey="cacheCleanBefore"/> + <magentoCLI command="cache:clean" stepKey="cacheCleanBefore"/> <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> @@ -114,8 +114,8 @@ </before> <after> - <magentoCLI command="config:set dev/grid/async_indexing 0" stepKey="enableAsyncIndexing"/> - <magentoCLI command="cache:clean config" stepKey="cacheCleanAfter"/> + <magentoCLI command="config:set dev/grid/async_indexing 0" stepKey="disableAsyncIndexing"/> + <magentoCLI command="cache:clean" stepKey="cacheCleanAfter"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> From fb95390ed8dbd75330515934116755dfc9b91f12 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 11:14:05 +0200 Subject: [PATCH 189/985] ACP2E-1367: add missing entities to grid in async mode; added mftf --- .../AdminCreateOrdersAndCheckGridsTest.xml | 171 +++++++++--------- 1 file changed, 84 insertions(+), 87 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index 24112a7599e68..1e4857d9a2ac7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -20,97 +20,10 @@ <before> <magentoCLI command="config:set dev/grid/async_indexing 1" stepKey="enableAsyncIndexing"/> <magentoCLI command="cache:clean" stepKey="cacheCleanBefore"/> - - <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> - <createData entity="ApiCategory" stepKey="createCategory"/> - <createData entity="defaultSimpleProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - - <createData entity="GuestCart" stepKey="createGuestCartOne"/> - <createData entity="SimpleCartItem" stepKey="addCartItemOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - <requiredEntity createDataKey="createSimpleProduct"/> - </createData> - <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - </createData> - <updateData createDataKey="createGuestCartOne" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - </updateData> - - <magentoCLI command="cron:run" stepKey="runCronOne"/> - - <createData entity="Invoice" stepKey="invoiceOrderOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - </createData> - - <createData entity="GuestCart" stepKey="createGuestCartTwo"/> - <createData entity="SimpleCartItem" stepKey="addCartItemTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - <requiredEntity createDataKey="createSimpleProduct"/> - </createData> - <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - </createData> - <updateData createDataKey="createGuestCartTwo" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - </updateData> - - <createData entity="Shipment" stepKey="shipOrderOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - </createData> - - <magentoCLI command="cron:run" stepKey="runCronTwo"/> - - <createData entity="GuestCart" stepKey="createGuestCartThree"/> - <createData entity="SimpleCartItem" stepKey="addCartItemThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - <requiredEntity createDataKey="createSimpleProduct"/> - </createData> - <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - </createData> - <updateData createDataKey="createGuestCartThree" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - </updateData> - - <createData entity="CreditMemo" stepKey="refundOrderOne"> - <requiredEntity createDataKey="createGuestCartOne"/> - </createData> - - <createData entity="Invoice" stepKey="invoiceOrderThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - </createData> - - <createData entity="Shipment" stepKey="shipOrderTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - </createData> - - <magentoCLI command="cron:run" stepKey="runCronThree"/> - - <createData entity="Invoice" stepKey="invoiceOrderTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - </createData> - - <createData entity="Shipment" stepKey="shipOrderThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - </createData> - - <createData entity="CreditMemo" stepKey="refundOrderTwo"> - <requiredEntity createDataKey="createGuestCartTwo"/> - </createData> - - <magentoCLI command="cron:run" stepKey="runCronFour"/> - - <createData entity="CreditMemo" stepKey="refundOrderThree"> - <requiredEntity createDataKey="createGuestCartThree"/> - </createData> - - <magentoCLI command="cron:run" stepKey="runCronFive"/> - </before> <after> @@ -121,6 +34,90 @@ <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> + <createData entity="GuestCart" stepKey="createGuestCartOne"/> + <createData entity="SimpleCartItem" stepKey="addCartItemOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + <updateData createDataKey="createGuestCartOne" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </updateData> + + <magentoCLI command="cron:run" stepKey="runCronOne"/> + + <createData entity="Invoice" stepKey="invoiceOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <createData entity="GuestCart" stepKey="createGuestCartTwo"/> + <createData entity="SimpleCartItem" stepKey="addCartItemTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + <updateData createDataKey="createGuestCartTwo" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </updateData> + + <createData entity="Shipment" stepKey="shipOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronTwo"/> + + <createData entity="GuestCart" stepKey="createGuestCartThree"/> + <createData entity="SimpleCartItem" stepKey="addCartItemThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + <createData entity="GuestAddressInformation" stepKey="addGuestOrderAddressThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + <updateData createDataKey="createGuestCartThree" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformationThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </updateData> + + <createData entity="CreditMemo" stepKey="refundOrderOne"> + <requiredEntity createDataKey="createGuestCartOne"/> + </createData> + + <createData entity="Invoice" stepKey="invoiceOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <createData entity="Shipment" stepKey="shipOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronThree"/> + + <createData entity="Invoice" stepKey="invoiceOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <createData entity="Shipment" stepKey="shipOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <createData entity="CreditMemo" stepKey="refundOrderTwo"> + <requiredEntity createDataKey="createGuestCartTwo"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronFour"/> + + <createData entity="CreditMemo" stepKey="refundOrderThree"> + <requiredEntity createDataKey="createGuestCartThree"/> + </createData> + + <magentoCLI command="cron:run" stepKey="runCronFive"/> + + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> <waitForPageLoad time="60" stepKey="waitForGrid"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> From 914fa88799b05ea5f0468f36ef1043e9e3ba7733 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 25 Nov 2022 15:21:13 +0530 Subject: [PATCH 190/985] Added the scroll to top and a wait for 10 seconds for compare text to appear --- ...orefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml index 80b8cafc20d1b..0f40f723bbddc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml @@ -17,7 +17,7 @@ <useCaseId value="ACP2E-1007"/> <severity value="MAJOR"/> <group value="Catalog"/> - + <skip> <issueId value="ACQE-4083"/> </skip> @@ -76,6 +76,8 @@ <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="addSecondProductToCompare"> <argument name="productVar" value="$$createSecondSimpleProduct$$"/> </actionGroup> + <scrollToTopOfPage stepKey="scrollToTopOfPages"/> + <wait time="10" stepKey="waitForCompareProductsToPopulate"/> <see userInput="Compare Products" selector="{{StorefrontProductCompareMainSection.compareProducts}}" stepKey="assertCompareProductLinkName"/> <!-- Open storefront on second store --> <amOnPage url="{{StorefrontStoreHomePage.url(customStore.code)}}" stepKey="openStorefrontPage"/> From e95110dd19030f93db8d60231ef87b8ac9d53c49 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 25 Nov 2022 15:22:23 +0530 Subject: [PATCH 191/985] Added the scroll to top and a wait for 10 seconds for compare text to appear --- ...orefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml index 0f40f723bbddc..945ebe153a991 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyCompareListVisibilityForMultiWebsiteTest.xml @@ -17,10 +17,6 @@ <useCaseId value="ACP2E-1007"/> <severity value="MAJOR"/> <group value="Catalog"/> - - <skip> - <issueId value="ACQE-4083"/> - </skip> </annotations> <before> <!-- Create simple products --> From bbf7cc57bd98fc6f060afebdbcda47808c4adb63 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 25 Nov 2022 12:33:29 +0200 Subject: [PATCH 192/985] ACP2E-1358, code review feedback --- .../Eav/Model/Entity/AbstractEntity.php | 7 ++- .../ResourceModel/CustomerRepositoryTest.php | 46 +++++++------------ 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index cf267e50fe91c..f66ade9435813 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1550,7 +1550,7 @@ protected function _updateAttribute($object, $attribute, $valueId, $value) $connection->update( $table, ['value' => $this->_prepareValueForSave($value, $attribute)], - 'value_id = ' . $valueId + sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) ); return $this; @@ -1934,9 +1934,8 @@ protected function _isAttributeValueEmpty(AbstractAttribute $attribute, $value) * * @return AttributeLoaderInterface * - * @deprecated 100.1.0 ObjectManager can be used instead. - * ObjectManager::getInstance()->get(AttributeLoader::class) - * @see \Magento\Framework\App\ObjectManager::get() + * @deprecated 100.1.0 + * @see $attributeLoader * @since 100.1.0 */ protected function getAttributeLoader() diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php index f14ba3556eff8..797c7ba2b558f 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php @@ -28,6 +28,10 @@ use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Fixture\Config as ConfigFixture; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; /** * Checks Customer insert, update, search with repository @@ -247,44 +251,28 @@ public function testUpdateCustomer($defaultBilling, $defaultShipping) /** * Test update customer custom attributes * - * @magentoDbIsolation enabled * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_custom_attribute.php * @return void */ + #[ + DataFixture(\Magento\Customer\Test\Fixture\Customer::class, ['email' => 'customer@mail.com']) + ] + public function testUpdateCustomerAttributesAutoIncrement() { - $email = 'email@example.com'; - $storeId = 1; - $firstname = 'Tester'; - $lastname = 'McTest'; - $groupId = 1; - $newAttributeValue = 'test1'; - $updateAttributeValue = 'test2'; + $newAttributeValue = 'value1'; + $updateAttributeValue = 'value2'; + $customer = $this->customerRepository->get('customer@mail.com'); + $customer->setCustomAttribute('custom_attribute1', $newAttributeValue); + $savedCustomer = $this->customerRepository->save($customer); + $savedCustomer->setCustomAttribute('custom_attribute1', $updateAttributeValue); + $this->customerRepository->save($savedCustomer); + $customer = $this->customerRepository->get('customer@mail.com'); - $newCustomerEntity = $this->customerFactory->create() - ->setStoreId($storeId) - ->setEmail($email) - ->setFirstname($firstname) - ->setLastname($lastname) - ->setGroupId($groupId); - $newCustomerEntity->setCustomAttribute('custom_attribute1', $newAttributeValue); - $savedCustomer = $this->customerRepository->save($newCustomerEntity); - - $updatedCustomer = $this->customerFactory->create(); - $this->dataObjectHelper->mergeDataObjects( - CustomerInterface::class, - $updatedCustomer, - $savedCustomer - ); - $updatedCustomer->setCustomAttribute('custom_attribute1', $updateAttributeValue); - $this->customerRepository->save($updatedCustomer); - - $customerAfter = $this->customerRepository->getById($savedCustomer->getId()); $this->assertSame( - $customerAfter->getCustomAttribute('custom_attribute1')->getValue(), + $customer->getCustomAttribute('custom_attribute1')->getValue(), $updateAttributeValue ); - $resource = $this->objectManager->get(\Magento\Framework\App\ResourceConnection::class); $connection = $resource->getConnection(); $tableStatus = $connection->showTableStatus('customer_entity_varchar'); From 2b7ab01599b2593ae62c667cac5e49ae482c9fec Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 12:35:57 +0200 Subject: [PATCH 193/985] ACP2E-1367: add missing entities to grid in async mode; added mftf --- .../AdminCreateOrdersAndCheckGridsTest.xml | 43 +++++++++---------- .../AdminGoToCreditMemoTabActionGroup.xml | 15 +++++++ 2 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminGoToCreditMemoTabActionGroup.xml diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index 1e4857d9a2ac7..ee3c50535d6b1 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -132,40 +132,37 @@ <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageOne"/> <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask1" after="openInvoicesTabOrdersPageOne"/> - <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridOne" /> - <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageOne"/> - <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask2" after="openShipmentsTabOrdersPageOne"/> - <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridOne" /> - <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageOne"/> - <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask3" after="openCreditMemosTabOrdersPageOne"/> - <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridOne" /> + <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedOne"/> + <seeElement selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="seeForInvoicesTabOpenedOne"/> + <actionGroup ref="AdminGoToShipmentTabActionGroup" stepKey="goToShipmentTabOne"/> + <seeElement selector="{{AdminOrderShipmentsTabSection.viewShipment}}" stepKey="seeForShipmentTabOpenedOne"/> + <actionGroup ref="AdminGoToCreditMemoTabActionGroup" stepKey="goToCreditMemoTabOne"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRowCell('1', 'Status')}}" userInput="Refunded" stepKey="seeCreditMemoStatusInGridOne"/> <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrderTwo"> <argument name="entityId" value="$createGuestCartTwo.return$"/> </actionGroup> <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageTwo"/> - <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask4" after="openInvoicesTabOrdersPageTwo"/> - <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridTwo" /> - <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageTwo"/> - <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask5" after="openShipmentsTabOrdersPageTwo"/> - <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridTwo" /> - <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageTwo"/> - <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask6" after="openCreditMemosTabOrdersPageTwo"/> - <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridTwo" /> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask2" after="openInvoicesTabOrdersPageTwo"/> + <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedTwo"/> + <seeElement selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="seeForInvoicesTabOpenedTwo"/> + <actionGroup ref="AdminGoToShipmentTabActionGroup" stepKey="goToShipmentTabTwo"/> + <seeElement selector="{{AdminOrderShipmentsTabSection.viewShipment}}" stepKey="seeForShipmentTabOpenedTwo"/> + <actionGroup ref="AdminGoToCreditMemoTabActionGroup" stepKey="goToCreditMemoTabTwo"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRowCell('1', 'Status')}}" userInput="Refunded" stepKey="seeCreditMemoStatusInGridTwo"/> <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrderThree"> <argument name="entityId" value="$createGuestCartThree.return$"/> </actionGroup> <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageThree"/> - <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask7" after="openInvoicesTabOrdersPageThree"/> - <see selector="{{AdminOrderInvoicesTabSection.gridRow('1')}}" stepKey="seeOrderInvoiceInTabGridThree" /> - <actionGroup ref="AdminOpenShipmentFromOrderPageActionGroup" stepKey="openShipmentsTabOrdersPageThree"/> - <waitForLoadingMaskToDisappear stepKey="waitForShipmentGridLoadingMask8" after="openShipmentsTabOrdersPageThree"/> - <see selector="{{AdminOrderShipmentsTabSection.gridRow('1')}}" stepKey="seeOrderShipmentInTabGridThree" /> - <actionGroup ref="AdminOpenCreditMemoFromOrderPageActionGroup" stepKey="openCreditMemosTabOrdersPageThree"/> - <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoGridLoadingMask9" after="openCreditMemosTabOrdersPageThree"/> - <see selector="{{AdminOrderCreditMemosTabSection.gridRow('1')}}" stepKey="seeOrderCreditMemoInTabGridThree" /> + <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask3" after="openInvoicesTabOrdersPageThree"/> + <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedThree"/> + <seeElement selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="seeForInvoicesTabOpenedThree"/> + <actionGroup ref="AdminGoToShipmentTabActionGroup" stepKey="goToShipmentTabThree"/> + <seeElement selector="{{AdminOrderShipmentsTabSection.viewShipment}}" stepKey="seeForShipmentTabOpenedThree"/> + <actionGroup ref="AdminGoToCreditMemoTabActionGroup" stepKey="goToCreditMemoTabThree"/> + <see selector="{{AdminOrderCreditMemosTabSection.gridRowCell('1', 'Status')}}" userInput="Refunded" stepKey="seeCreditMemoStatusInGridThree"/> </test> </tests> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminGoToCreditMemoTabActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminGoToCreditMemoTabActionGroup.xml new file mode 100644 index 0000000000000..00cf51dbf87b3 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminGoToCreditMemoTabActionGroup.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminGoToCreditMemoTabActionGroup"> + <click selector="{{AdminOrderDetailsOrderViewSection.creditMemos}}" stepKey="clickOrderCreditMemosTab"/> + <waitForLoadingMaskToDisappear stepKey="waitForCreditMemoTabLoad" after="clickOrderCreditMemosTab"/> + </actionGroup> +</actionGroups> From 739926392d5b4e72613df28fb25078487a5693ae Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 13:31:26 +0200 Subject: [PATCH 194/985] ACP2E-1367: add missing entities to grid in async mode; added mftf; fix for order archiving --- .../Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php b/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php index 5eb2544358603..193c161da11fe 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php +++ b/app/code/Magento/Sales/Model/ResourceModel/Provider/Query/IdListBuilder.php @@ -105,7 +105,7 @@ public function build(string $mainTableName, string $gridTableName): Select [$table => $table], sprintf( '%s.%s = %s.%s', - $mainTableName, + 'main_table', 'entity_id', $table, 'entity_id' From d97aefada1f0786cd4bba2b021794ad7b9f0cb69 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 14:29:34 +0200 Subject: [PATCH 195/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try --- lib/web/mage/backend/bootstrap.js | 16 +++++++++++----- lib/web/mage/backend/notification.js | 7 ------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/web/mage/backend/bootstrap.js b/lib/web/mage/backend/bootstrap.js index 4b2101a4390b5..b72815475df75 100644 --- a/lib/web/mage/backend/bootstrap.js +++ b/lib/web/mage/backend/bootstrap.js @@ -62,8 +62,8 @@ define([ if (jqXHR.readyState === 4) { try { - $('body').notification('clearCallbackError'); jsonObject = JSON.parse(jqXHR.responseText); + if (jsonObject.ajaxExpired && jsonObject.ajaxRedirect) { //eslint-disable-line max-depth window.location.replace(jsonObject.ajaxRedirect); } @@ -73,10 +73,15 @@ define([ /** * Error callback. + * + * @param {Object} jqXHR - The jQuery XMLHttpRequest object returned by $.ajax() + * @param {String} textStatus */ - error: function () { - $('body').notification('clear') - .notification('add', { + error: function (jqXHR, textStatus) { + + $('body').notification('clear'); + if (jqXHR.readyState !== 0 && textStatus !== 'abort') { + $('body').notification('add', { error: true, message: $.mage.__( 'A technical problem with the server created an error. ' + @@ -87,11 +92,12 @@ define([ * @param {String} message */ insertMethod: function (message) { - var $wrapper = $('<div class="callback"></div>').html(message); + var $wrapper = $('<div></div>').html(message); $('.page-main-actions').after($wrapper); } }); + } } }); diff --git a/lib/web/mage/backend/notification.js b/lib/web/mage/backend/notification.js index cb44e327800c9..db6304b829561 100644 --- a/lib/web/mage/backend/notification.js +++ b/lib/web/mage/backend/notification.js @@ -77,13 +77,6 @@ define([ */ clear: function () { $(this.placeholder).html(''); - }, - - /** - * Remove generic callback error message - */ - clearCallbackError: function () { - $('body').find('.callback .messages .message-error').parent().html(''); } }); From 18564ed9d2e68079e156f9761aa6366cfa33fc3b Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 14:38:01 +0200 Subject: [PATCH 196/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try; added mftf --- .../Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml index 975a91e7a667b..5aec50679e42a 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml @@ -69,13 +69,13 @@ <!--Go to Comments history and switch to Information --> <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory1"/> <click selector="{{AdminOrderDetailsOrderViewSection.information}}" stepKey="goToInformation"/> - <see userInput="A technical problem with the server created an error" stepKey="seeTechnicalErrorMessage"/> + <dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessageOne"/> <!--Go to Comments history and don't see the error message --> <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory2"/> <waitForPageLoad stepKey="waitForCommentsHistoryPage"/> <see userInput="Order Placed by Store Administrator" stepKey="seeMessageOrderCreatedByAdmin"/> - <dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessage"/> + <dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessageTwo"/> </test> </tests> From 996e3d1be29393763a17cae09b79b3694b16fbd8 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 14:51:26 +0200 Subject: [PATCH 197/985] ACP2E-1367: add missing entities to grid in async mode; added mftf --- .../Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index ee3c50535d6b1..64d996b14ca33 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -115,6 +115,8 @@ </createData> <magentoCLI command="cron:run" stepKey="runCronFive"/> + <magentoCLI command="cron:run" stepKey="runCronSix"/> + <magentoCLI command="cron:run" stepKey="runCronSeven"/> <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> From a1d1acec573a35c642558e570614665031f8788d Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 25 Nov 2022 17:56:36 +0200 Subject: [PATCH 198/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try; fix jasmine test --- .../jasmine/tests/lib/mage/backend/bootstrap.test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js b/dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js index 2e89ea208762a..e094d37402f83 100644 --- a/dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js +++ b/dev/tests/js/jasmine/tests/lib/mage/backend/bootstrap.test.js @@ -22,11 +22,20 @@ define([ describe('"sendPostponeRequest" method', function () { it('should insert "Error" notification if request failed', function () { + var data = { + jqXHR: { + responseText: 'error', + status: '503', + readyState: 4 + }, + textStatus: 'error' + }; + $pageMainActions.appendTo('body'); $('body').notification(); // eslint-disable-next-line jquery-no-event-shorthand - $.ajaxSettings.error(); + $.ajaxSettings.error(data.jqXHR, data.textStatus); expect($('.message-error').length).toBe(1); expect( From 001bf718cdf5fe7f6a31edf5afb4356928579f71 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Fri, 25 Nov 2022 22:11:59 -0600 Subject: [PATCH 199/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- ...ntendExperienceFeaturesPageActionGroup.xml | 28 +++++++ .../AdminSelectDisableFundingActionGroup.xml | 22 +++++ ...AdminUnselectDisableFundingActionGroup.xml | 22 +++++ ...ancedFrontendExperienceFeaturesSection.xml | 14 ++++ .../PayPalAdvancedSettingConfigSection.xml | 1 + ...torefrontPayPalSmartButtonVenmoSection.xml | 13 +++ .../Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 81 +++++++++++++++++++ 7 files changed, 181 insertions(+) create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminSelectDisableFundingActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminUnselectDisableFundingActionGroup.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontPayPalSmartButtonVenmoSection.xml create mode 100644 app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup.xml new file mode 100644 index 0000000000000..4e7a4df7d38f6 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup"> + <annotations> + <description>Clicks on 'Configure' for 'PayPal Express Checkout' on the Admin Configuration page. + Expands the 'Advanced Settings' tab. + Expands the 'Frontend Experience Settings' tab. + Expands the 'Features' tab.</description> + </annotations> + <arguments> + <argument name="countryCode" type="string" defaultValue="us"/> + </arguments> + + <click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/> + <click selector="{{PayPalAdvancedSettingConfigSection.advancedSettingTab(countryCode)}}" stepKey="openAdvancedSettingTab"/> + <click selector="{{PayPalAdvancedSettingConfigSection.frontendExperienceSettingsTab(countryCode)}}" stepKey="openFrontendExperienceSettingsTab"/> + <click selector="{{PayPalAdvancedSettingConfigSection.featuresTab(countryCode)}}" stepKey="openFeaturesTab"/> + <seeElement selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect(countryCode)}}" stepKey="seeDisableFundingOptionsMultiselect"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminSelectDisableFundingActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminSelectDisableFundingActionGroup.xml new file mode 100644 index 0000000000000..03f05edb1f74f --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminSelectDisableFundingActionGroup.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminSelectDisableFundingActionGroup"> + <annotations> + <description>Clicks on specified option in 'Disable Funding Options' list.</description> + </annotations> + <arguments> + <argument name="countryCode" type="string" defaultValue="us"/> + <argument name="option" type="string" defaultValue="Venmo"/> + </arguments> + + <selectOption selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect(countryCode)}}" userInput="{{option}}" stepKey="selectOption"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminUnselectDisableFundingActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminUnselectDisableFundingActionGroup.xml new file mode 100644 index 0000000000000..2bbea0be7e59d --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminUnselectDisableFundingActionGroup.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminUnselectDisableFundingActionGroup"> + <annotations> + <description>Unselects specified option in 'Disable Funding Options' list.</description> + </annotations> + <arguments> + <argument name="countryCode" type="string" defaultValue="us"/> + <argument name="option" type="string" defaultValue="Venmo"/> + </arguments> + + <unselectOption selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect(countryCode)}}" userInput="{{option}}" stepKey="unselectOption"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml new file mode 100644 index 0000000000000..776a222c80b73 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="PayPalAdvancedFrontendExperienceFeaturesSection"> + <element name="disableFundingOptionsMultiselect" type="multiselect" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_express_checkout_frontend_features_disable_funding_options" parameterized="true"/> + <element name="disableFundingOptionsOption" type="multiselect" selector="//*[@value='{{option}}']" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedSettingConfigSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedSettingConfigSection.xml index feb889ec7660f..7fa736ffdb259 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedSettingConfigSection.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedSettingConfigSection.xml @@ -12,5 +12,6 @@ <element name="frontendExperienceSettingsTab" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_express_checkout_frontend-head" parameterized="true"/> <element name="checkoutPageTab" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_express_checkout_frontend_checkout_page_button-head" parameterized="true"/> <element name="displayonshoppingcart" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_visible_on_cart" parameterized="true"/> + <element name="featuresTab" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_express_checkout_frontend_features-head" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontPayPalSmartButtonVenmoSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontPayPalSmartButtonVenmoSection.xml new file mode 100644 index 0000000000000..c0cf2e0fc3535 --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/StorefrontPayPalSmartButtonVenmoSection.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="StorefrontPayPalSmartButtonVenmoSection"> + <element name="venmoButton" type="button" selector="//div[@data-funding-source='venmo']"/> + </section> +</sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml new file mode 100644 index 0000000000000..950663938d0fb --- /dev/null +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminTurnOffVenmoButtonTest"> + <annotations> + <features value="Paypal"/> + <stories value="Button Configuration"/> + <title value="Check that Admin can turn off Venmo button"/> + <description value="Venmo button can be turned off by Admin"/> + <severity value="AVERAGE"/> + <testCaseId value="ACP2E-1303"/> + <group value="paypal"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> + + <!-- Create Product --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + + </before> + <after> + + <!-- Cleanup Paypal configurations --> + + <!-- Delete Product --> + <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> + <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> + + <!-- Log out Admin --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + </after> + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage1"/> + <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey= "openFeaturesPage1"/> + <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey= "selectVenmo"/> + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig1"/> + <magentoCLI command="cache:flush" stepKey="cleanCache1"/> + + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage1"> + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <actionGroup ref="StorefrontSwitchToPayPalButtonIframeActionGroup" stepKey="switchToIframe1"/> + + <dontSeeElement selector="{{StorefrontPayPalSmartButtonVenmoSection.venmoButton}}" stepKey="dontSeeVenmoButton"/> + + + + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage2"/> + <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey= "openFeaturesPage2"/> + <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey= "unselectVenmo"/> + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig2"/> + <magentoCLI command="cache:flush" stepKey="cleanCache2"/> + + + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage2"> + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <actionGroup ref="StorefrontSwitchToPayPalButtonIframeActionGroup" stepKey="switchToIframe2"/> + + <seeElement selector="{{StorefrontPayPalSmartButtonVenmoSection.venmoButton}}" stepKey="seeVenmoButton"/> + + +<!-- <seeOptionIsSelected selector="{{ButtonCustomization.customizeDrpDown}}" userInput="No" stepKey="seeNoIsDefaultValue"/> + <selectOption selector="{{ButtonCustomization.customizeDrpDown}}" userInput="Yes" stepKey="enableButtonCustomization"/> + <pause stepKey="pause"/> + +--> + </test> +</tests> From e8c04307bcc907ad3147cad8e0f0b528bb23e46b Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Mon, 28 Nov 2022 22:03:03 -0600 Subject: [PATCH 200/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- ...ancedFrontendExperienceFeaturesSection.xml | 1 - .../Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 50 ++++--------------- 2 files changed, 10 insertions(+), 41 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml index 776a222c80b73..90f495560c931 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalAdvancedFrontendExperienceFeaturesSection.xml @@ -9,6 +9,5 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="PayPalAdvancedFrontendExperienceFeaturesSection"> <element name="disableFundingOptionsMultiselect" type="multiselect" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced_express_checkout_frontend_features_disable_funding_options" parameterized="true"/> - <element name="disableFundingOptionsOption" type="multiselect" selector="//*[@value='{{option}}']" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index 950663938d0fb..6cb3de08f6ee4 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -11,7 +11,6 @@ <test name="AdminTurnOffVenmoButtonTest"> <annotations> <features value="Paypal"/> - <stories value="Button Configuration"/> <title value="Check that Admin can turn off Venmo button"/> <description value="Venmo button can be turned off by Admin"/> <severity value="AVERAGE"/> @@ -20,62 +19,33 @@ </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> - - <!-- Create Product --> - <createData entity="_defaultCategory" stepKey="createCategory"/> - <createData entity="_defaultProduct" stepKey="createProduct"> - <requiredEntity createDataKey="createCategory"/> - </createData> - - </before> <after> <!-- Cleanup Paypal configurations --> - <!-- Delete Product --> - <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> - <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> - <!-- Log out Admin --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage1"/> <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey= "openFeaturesPage1"/> - <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey= "selectVenmo"/> + <see selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmo"/> + <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey="selectVenmo"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig1"/> + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> <magentoCLI command="cache:flush" stepKey="cleanCache1"/> - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage1"> - <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> - </actionGroup> - - <actionGroup ref="StorefrontSwitchToPayPalButtonIframeActionGroup" stepKey="switchToIframe1"/> - - <dontSeeElement selector="{{StorefrontPayPalSmartButtonVenmoSection.venmoButton}}" stepKey="dontSeeVenmoButton"/> - - <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage2"/> - <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey= "openFeaturesPage2"/> - <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey= "unselectVenmo"/> + <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey="openFeaturesPage2"/> + <see selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmo2"/> + <seeOptionIsSelected selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmoIsSelected"/> + + <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey="unselectVenmo"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig2"/> + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage2"/> <magentoCLI command="cache:flush" stepKey="cleanCache2"/> - - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage2"> - <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> - </actionGroup> - - <actionGroup ref="StorefrontSwitchToPayPalButtonIframeActionGroup" stepKey="switchToIframe2"/> - - <seeElement selector="{{StorefrontPayPalSmartButtonVenmoSection.venmoButton}}" stepKey="seeVenmoButton"/> - - -<!-- <seeOptionIsSelected selector="{{ButtonCustomization.customizeDrpDown}}" userInput="No" stepKey="seeNoIsDefaultValue"/> - <selectOption selector="{{ButtonCustomization.customizeDrpDown}}" userInput="Yes" stepKey="enableButtonCustomization"/> - <pause stepKey="pause"/> - ---> </test> </tests> From 273ffbfa6dbd217e021c7d74f3e0f7f678936b63 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 29 Nov 2022 13:23:21 +0200 Subject: [PATCH 201/985] ACP2E-1388, removed quantity selection filter and skipped price index cleaning --- .../Pricing/Adjustment/DefaultSelectionPriceListProvider.php | 3 ++- .../Catalog/Model/Indexer/Product/Price/AbstractAction.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php index d09215bff7b00..76f6542089a7b 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php @@ -84,8 +84,9 @@ public function getPriceList(Product $bundleProduct, $searchMin, $useRegularPric [(int)$option->getOptionId()], $bundleProduct ); + $selectionsCollection->setFlag('has_stock_status_filter', true); $selectionsCollection->removeAttributeToSelect(); - $selectionsCollection->addQuantityFilter(); + //$selectionsCollection->addQuantityFilter(); if (!$useRegularPrice) { $selectionsCollection->addAttributeToSelect('special_price'); diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index e69ab504880ef..8477b7401226f 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -411,7 +411,7 @@ function ($type) use ($productsTypes) { $indexer->executeByDimensions($dimensions, \SplFixedArray::fromArray($entityIds, false)); $mainTable = $this->tableMaintainer->getMainTableByDimensions($dimensions); $this->_insertFromTable($temporaryTable, $mainTable); - $this->deleteOutdatedData($entityIds, $temporaryTable, $mainTable); + //$this->deleteOutdatedData($entityIds, $temporaryTable, $mainTable); //here be the problem } } else { // handle 3d-party indexers for backward compatibility @@ -441,6 +441,7 @@ private function deleteOutdatedData(array $entityIds, string $temporaryTable, st 'tmp_table.customer_group_id = main_table.customer_group_id', 'tmp_table.website_id = main_table.website_id', ]; + $select = $this->getConnection()->select() ->from(['main_table' => $mainTable], null) ->joinLeft(['tmp_table' => $temporaryTable], implode(' AND ', $joinCondition), null) From ee62521559a1db60450a2a9ad09820522d9963d6 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 29 Nov 2022 09:28:05 -0600 Subject: [PATCH 202/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- .../Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index 6cb3de08f6ee4..075955fc0f328 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -11,6 +11,7 @@ <test name="AdminTurnOffVenmoButtonTest"> <annotations> <features value="Paypal"/> + <stories value="Payment methods configuration"/> <title value="Check that Admin can turn off Venmo button"/> <description value="Venmo button can be turned off by Admin"/> <severity value="AVERAGE"/> From 192186179f1d544f1de93001c1e298eeaabac101 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Mon, 28 Nov 2022 11:30:07 -0600 Subject: [PATCH 203/985] ACP2E-1391: Can't import exported products with comma in attributes --- .../Model/Import/Product/Type/Configurable.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php index 072b9788d9b76..b03bd3e7fce07 100644 --- a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php @@ -157,6 +157,7 @@ class Configurable extends \Magento\CatalogImportExport\Model\Import\Product\Typ * * @var \Magento\Framework\DB\Adapter\AdapterInterface * @deprecated 100.2.0 + * @see No longer used */ protected $_connection; @@ -563,6 +564,18 @@ protected function _parseVariations($rowData) $fieldAndValuePairs = []; foreach ($fieldAndValuePairsText as $nameAndValue) { + // If field value contains comma. For example: sku=C100-10,2cm,size=10,2cm + // then this results in $fieldAndValuePairsText = ["sku=C100-10", "2cm", "size=10", "2cm"] + // This code block makes sure that the array element that do not contain the equal sign "=" + // will be appended to the preceding element value. + // As a result $fieldAndValuePairs = ["sku" => "C100-10,2cm", "size" => "10,2cm"] + if (strpos($nameAndValue, ImportProduct::PAIR_NAME_VALUE_SEPARATOR) === false + && isset($fieldName) + && isset($fieldAndValuePairs[$fieldName]) + ) { + $fieldAndValuePairs[$fieldName] .= $this->_entityModel->getMultipleValueSeparator() . $nameAndValue; + continue; + } $nameAndValue = explode(ImportProduct::PAIR_NAME_VALUE_SEPARATOR, $nameAndValue, 2); if ($nameAndValue) { $value = isset($nameAndValue[1]) ? trim($nameAndValue[1]) : ''; From bbd575aaa5df70c8cb55a3a5c18ddfc7954fef81 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Tue, 29 Nov 2022 12:12:53 -0600 Subject: [PATCH 204/985] ACP2E-1391: Can't import exported products with comma in attributes --- .../ImportExport/Test/Fixture/CsvFile.php | 121 ++++++++++++++++++ .../Import/Product/Type/ConfigurableTest.php | 60 +++++++++ 2 files changed, 181 insertions(+) create mode 100644 app/code/Magento/ImportExport/Test/Fixture/CsvFile.php diff --git a/app/code/Magento/ImportExport/Test/Fixture/CsvFile.php b/app/code/Magento/ImportExport/Test/Fixture/CsvFile.php new file mode 100644 index 0000000000000..e3688ebd0d5d0 --- /dev/null +++ b/app/code/Magento/ImportExport/Test/Fixture/CsvFile.php @@ -0,0 +1,121 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\ImportExport\Test\Fixture; + +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\DataObject; +use Magento\Framework\DataObjectFactory; +use Magento\Framework\Filesystem; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; + +class CsvFile implements RevertibleDataFixtureInterface +{ + private const DEFAULT_DATA = [ + 'directory' => DirectoryList::TMP, + 'path' => 'import/%uniqid%.csv', + 'rows' => [], + ]; + + /** + * @var Filesystem + */ + private Filesystem $filesystem; + + /** + * @var ProcessorInterface + */ + private ProcessorInterface $dataProcessor; + + /** + * @var DataObjectFactory + */ + private DataObjectFactory $dataObjectFactory; + + /** + * @param Filesystem $filesystem + * @param ProcessorInterface $dataProcessor + * @param DataObjectFactory $dataObjectFactory + */ + public function __construct( + Filesystem $filesystem, + ProcessorInterface $dataProcessor, + DataObjectFactory $dataObjectFactory + ) { + $this->filesystem = $filesystem; + $this->dataProcessor = $dataProcessor; + $this->dataObjectFactory = $dataObjectFactory; + } + + /** + * {@inheritdoc} + * @param array $data Parameters. Same format as CsvFile::DEFAULT_DATA. + * Additional fields: + * - $data['rows']: CSV data to be written into the file in the following format: + * - headers are listed in the first array and the following array + * [ + * ['col1', 'col2'], + * ['row1col1', 'row1col2'], + * ] + * - headers are listed as array keys + * [ + * ['col1' => 'row1col1', 'col2' => 'row1col2'], + * ['col1' => 'row2col1', 'col2' => 'row2col2'], + * [ + * + * @see CsvFile::DEFAULT_DATA + */ + public function apply(array $data = []): ?DataObject + { + $data = $this->dataProcessor->process($this, array_merge(self::DEFAULT_DATA, $data)); + $rows = $data['rows']; + $row = reset($rows); + + if (array_is_list($row)) { + $cols = $row; + $colsCount = count($cols); + foreach ($rows as $row) { + if ($colsCount !== count($row)) { + throw new \InvalidArgumentException('Arrays in "rows" must be the same size'); + } + } + } else { + $cols = array_keys($row); + $lines[] = $cols; + foreach ($rows as $row) { + $line = []; + if (array_diff($cols, array_keys($row))) { + throw new \InvalidArgumentException('Arrays in "rows" must have same keys'); + } + foreach ($cols as $field) { + $line[] = $row[$field]; + } + $lines[] = $line; + } + $rows = $lines; + } + $directory = $this->filesystem->getDirectoryWrite($data['directory']); + $file = $directory->openFile($data['path'], 'w+'); + foreach ($rows as $row) { + $file->writeCsv($row); + } + $file->close(); + $data['absolute_path'] = $directory->getAbsolutePath($data['path']); + + return $this->dataObjectFactory->create(['data' => $data]); + } + + /** + * @inheritDoc + */ + public function revert(DataObject $data): void + { + $directory = $this->filesystem->getDirectoryWrite($data['directory']); + $directory->delete($data['path']); + } +} diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableImportExport/Model/Import/Product/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableImportExport/Model/Import/Product/Type/ConfigurableTest.php index e99779bd9598b..343ecba1ed70b 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableImportExport/Model/Import/Product/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableImportExport/Model/Import/Product/Type/ConfigurableTest.php @@ -8,9 +8,12 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; use Magento\CatalogInventory\Api\Data\StockItemInterface; use Magento\CatalogInventory\Api\StockConfigurationInterface; use Magento\CatalogInventory\Api\StockItemRepositoryInterface; +use Magento\ConfigurableProduct\Test\Fixture\Attribute as AttributeFixture; +use Magento\ConfigurableProduct\Test\Fixture\Product as ConfigurableProductFixture; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\EntityManager\EntityMetadata; use Magento\Framework\EntityManager\MetadataPool; @@ -20,7 +23,10 @@ use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface; use Magento\ImportExport\Model\Import\Adapter as ImportAdapter; use Magento\CatalogInventory\Api\StockItemCriteriaInterfaceFactory; +use Magento\ImportExport\Test\Fixture\CsvFile as CsvFileFixture; use Magento\Store\Model\Store; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -252,6 +258,60 @@ private function getStockItem(int $productId): ?StockItemInterface return reset($stockItems); } + #[ + DataFixture(ProductFixture::class, ['sku' => 'cp1-10,2cm'], as: 'p1'), + DataFixture(ProductFixture::class, ['sku' => 'cp1-15,5cm'], as: 'p2'), + DataFixture( + AttributeFixture::class, + [ + 'attribute_code' => 'size', + 'options' => [['label' => '10,2cm'], ['label' => '15,5cm']], + ], + as: 'attr' + ), + DataFixture( + ConfigurableProductFixture::class, + ['_options' => ['$attr$'], '_links' => ['$p1$', '$p2$']], + 'cp1' + ), + DataFixture( + CsvFileFixture::class, + [ + 'rows' => [ + ['sku', 'configurable_variations'], + ['$cp1.sku$', 'sku=cp1-10,2cm,size=10,2cm|sku=cp1-15,5cm,size=15,5cm'], + ] + ], + 'file' + ) + ] + public function testSpecialCharactersInConfigurableVariations(): void + { + $fixtures = DataFixtureStorageManager::getStorage(); + $attrId = $fixtures->get('attr')->getId(); + $sku = $fixtures->get('cp1')->getSku(); + $p1Id = $fixtures->get('p1')->getId(); + $p2Id = $fixtures->get('p2')->getId(); + $pathToFile = $fixtures->get('file')->getAbsolutePath(); + $errors = $this->doImport($pathToFile, Import::BEHAVIOR_APPEND); + $this->assertEquals( + 0, + $errors->getErrorsCount(), + implode(PHP_EOL, array_map(fn ($error) => $error->getErrorMessage(), $errors->getAllErrors())) + ); + /** @var ProductRepositoryInterface $productRepository */ + $productRepository = $this->objectManager->get(ProductRepositoryInterface::class); + /** @var ProductInterface $product */ + $product = $productRepository->get($sku, forceReload: true); + $options = $product->getExtensionAttributes()->getConfigurableProductOptions(); + $this->assertCount(1, $options); + $this->assertEquals($attrId, reset($options)->getAttributeId()); + $childIds = $product->getExtensionAttributes()->getConfigurableProductLinks(); + $this->assertCount(2, $childIds); + $this->assertContains($p1Id, $childIds); + $this->assertContains($p2Id, $childIds); + } + /** * @param string $file * @param string $behavior From f92c6a10058f1b6839d37e4a07369c2614fa1389 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" <barryvdh@gmail.com> Date: Tue, 29 Nov 2022 20:39:10 +0100 Subject: [PATCH 205/985] Allow more classes --- lib/internal/Magento/Framework/View/Layout/etc/elements.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index 617d886af901c..aa7e5ee273b4e 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -119,7 +119,7 @@ <xs:simpleType name="htmlClassType"> <xs:restriction base="xs:string"> - <xs:pattern value="[a-zA-Z\-][a-zA-Z\d\-_/:.\[\]]*(\s[a-zA-Z][a-zA-Z\d\-_/:.\[\]]*)*"/> + <xs:pattern value="[a-zA-Z\d\-_/:.\[\]\&() ]*"/> </xs:restriction> </xs:simpleType> From f1addc4bed52f493bedc48e86af1330c56854153 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 29 Nov 2022 13:45:02 -0600 Subject: [PATCH 206/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- .../Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 20 +++++----- .../Paypal/Test/Unit/Model/SdkUrlTest.php | 1 + .../Unit/Model/_files/expected_url_config.php | 37 +++++++++++++++++++ 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index 075955fc0f328..7e65d251be66f 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -22,31 +22,29 @@ <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> - - <!-- Cleanup Paypal configurations --> - <!-- Log out Admin --> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> + <!-- Open PayPal Advanced->Frontend Experience->Features configuration --> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage1"/> <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey= "openFeaturesPage1"/> - <see selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmo"/> - <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey="selectVenmo"/> + <!-- Venmo option is present in Disable Funding Options multiselect --> + <see selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmoOption"/> + <!-- Select Venmo option in Disable Funding Options multiselect and save config --> + <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey="selectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig1"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> - <magentoCLI command="cache:flush" stepKey="cleanCache1"/> - + <!-- Open PayPal Advanced->Frontend Experience->Features configuration page again --> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage2"/> <actionGroup ref="AdminOpenPayPalAdvancedFrontendExperienceFeaturesPageActionGroup" stepKey="openFeaturesPage2"/> - <see selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmo2"/> + <!-- Check Venmo option is selected --> <seeOptionIsSelected selector="{{PayPalAdvancedFrontendExperienceFeaturesSection.disableFundingOptionsMultiselect('us')}}" userInput="Venmo" stepKey="seeVenmoIsSelected"/> - - <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey="unselectVenmo"/> + <!-- Unselect Venmo option in Disable Funding Options multiselect and save config --> + <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey="unselectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig2"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage2"/> - <magentoCLI command="cache:flush" stepKey="cleanCache2"/> </test> </tests> diff --git a/app/code/Magento/Paypal/Test/Unit/Model/SdkUrlTest.php b/app/code/Magento/Paypal/Test/Unit/Model/SdkUrlTest.php index 8fc8bc72ed59b..4befeba8ef52f 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/SdkUrlTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/SdkUrlTest.php @@ -144,6 +144,7 @@ private function getDisallowedFundingMap() { return [ "CREDIT" => 'credit', + "VENMO" => 'venmo', "CARD" => 'card', "ELV" => 'sepa' ]; diff --git a/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_url_config.php b/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_url_config.php index 1fb71dbc5ac32..6fa178395ae86 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_url_config.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_url_config.php @@ -214,4 +214,41 @@ function generateExpectedPaypalSdkUrl(array $params) : String ) ] ], + 'venmo_disabled' => [ + 'en_US', + 'Authorization', + 'CREDIT,VENMO,ELV,CARD', + false, + true, + [ + 'sdkUrl' => generateExpectedPaypalSdkUrl( + [ + 'client-id' => 'sb', + 'locale' => 'en_US', + 'currency' => 'USD', + 'enable-funding' => implode(',', ['venmo', 'paylater']), + 'commit' => 'false', + 'intent' => 'authorize', + 'merchant-id' => 'merchant', + 'disable-funding' => implode( + ',', + [ + 'credit', + 'venmo', + 'sepa', + 'card', + 'bancontact', + 'eps', + 'giropay', + 'ideal', + 'mybank', + 'p24', + 'sofort' + ] + ), + 'components' => implode(',', ['messages', 'buttons']), + ] + ) + ] + ], ]; From 2975ad307bbc72d9d74c6fe594aad6a33299e8d7 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Wed, 30 Nov 2022 06:07:07 -0600 Subject: [PATCH 207/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- .../Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index 7e65d251be66f..b528cec26f52a 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -35,6 +35,7 @@ <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey="selectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig1"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> + <magentoCLI command="cache:flush" stepKey="cleanCache1"/> <!-- Open PayPal Advanced->Frontend Experience->Features configuration page again --> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage2"/> @@ -45,6 +46,7 @@ <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey="unselectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig2"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage2"/> + <magentoCLI command="cache:flush" stepKey="cleanCache1"/> </test> </tests> From 8d8fd6dcb3deb41c2b8638cd4a0bf71744b4d469 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Wed, 30 Nov 2022 09:12:26 -0600 Subject: [PATCH 208/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- .../Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index b528cec26f52a..03177f37e4652 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -35,7 +35,7 @@ <actionGroup ref="AdminSelectDisableFundingActionGroup" stepKey="selectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig1"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> - <magentoCLI command="cache:flush" stepKey="cleanCache1"/> + <magentoCLI command="cache:clean config" stepKey="cleanCacheAfterOptionSelected"/> <!-- Open PayPal Advanced->Frontend Experience->Features configuration page again --> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage2"/> @@ -46,7 +46,7 @@ <actionGroup ref="AdminUnselectDisableFundingActionGroup" stepKey="unselectVenmoOption"/> <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig2"/> <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage2"/> - <magentoCLI command="cache:flush" stepKey="cleanCache1"/> + <magentoCLI command="cache:clean config" stepKey="cleanCacheAfterOptionUnselected"/> </test> </tests> From ff43641c2928e7d7fde08356cdfc3a610dc802f9 Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Wed, 30 Nov 2022 09:19:39 -0600 Subject: [PATCH 209/985] ACP2E-1417: [GraphQL] Customer cannot proceed with purchase when items in cart get out of stock - fix --- .../Model/Resolver/Product/Price/Provider.php | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Product/Price/Provider.php b/app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Product/Price/Provider.php index f112fb8913507..c42a020a2fb6f 100644 --- a/app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Product/Price/Provider.php +++ b/app/code/Magento/ConfigurableProductGraphQl/Model/Resolver/Product/Price/Provider.php @@ -13,6 +13,7 @@ use Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderInterface; use Magento\ConfigurableProduct\Pricing\Price\ConfigurableOptionsProviderInterface; use Magento\Framework\Pricing\Amount\AmountInterface; +use Magento\Framework\Pricing\Amount\BaseFactory; use Magento\Framework\Pricing\SaleableInterface; /** @@ -25,6 +26,11 @@ class Provider implements ProviderInterface */ private $optionsProvider; + /** + * @var BaseFactory + */ + private $amountFactory; + /** * @var array */ @@ -43,11 +49,14 @@ class Provider implements ProviderInterface /** * @param ConfigurableOptionsProviderInterface $optionsProvider + * @param BaseFactory $amountFactory */ public function __construct( - ConfigurableOptionsProviderInterface $optionsProvider + ConfigurableOptionsProviderInterface $optionsProvider, + BaseFactory $amountFactory ) { $this->optionsProvider = $optionsProvider; + $this->amountFactory = $amountFactory; } /** @@ -101,7 +110,7 @@ private function getMinimalPrice(SaleableInterface $product, string $code): Amou { if (!isset($this->minimalPrice[$code][$product->getId()])) { $minimumAmount = null; - foreach ($this->filterDisabledProducts($this->optionsProvider->getProducts($product)) as $variant) { + foreach ($this->optionsProvider->getProducts($product) as $variant) { $variantAmount = $variant->getPriceInfo()->getPrice($code)->getAmount(); if (!$minimumAmount || ($variantAmount->getValue() < $minimumAmount->getValue())) { $minimumAmount = $variantAmount; @@ -110,7 +119,7 @@ private function getMinimalPrice(SaleableInterface $product, string $code): Amou } } - return $this->minimalPrice[$code][$product->getId()]; + return $this->minimalPrice[$code][$product->getId()] ?? $this->amountFactory->create(['amount' => null]); } /** @@ -133,19 +142,6 @@ private function getMaximalPrice(SaleableInterface $product, string $code): Amou } } - return $this->maximalPrice[$code][$product->getId()]; - } - - /** - * Filter out disabled products - * - * @param array $products - * @return array - */ - private function filterDisabledProducts(array $products): array - { - return array_filter($products, function ($product) { - return (int)$product->getStatus() === ProductStatus::STATUS_ENABLED; - }); + return $this->maximalPrice[$code][$product->getId()] ?? $this->amountFactory->create(['amount' => null]); } } From c7061cdbb88e6ffee59d0903836cc560a1ff2910 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Wed, 30 Nov 2022 12:05:54 -0600 Subject: [PATCH 210/985] ACP2E-1303: Pay later payments showing on the storefront even disabled --- .../Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml index 03177f37e4652..4e4f94bb73452 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminTurnOffVenmoButtonTest.xml @@ -15,7 +15,8 @@ <title value="Check that Admin can turn off Venmo button"/> <description value="Venmo button can be turned off by Admin"/> <severity value="AVERAGE"/> - <testCaseId value="ACP2E-1303"/> + <testCaseId value="AC-7121"/> + <useCaseId value="ACP2E-1303"/> <group value="paypal"/> </annotations> <before> From 117674e29c56ae225099e4aa8fb614fbec1a9686 Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Wed, 30 Nov 2022 10:47:33 -0800 Subject: [PATCH 211/985] ACP2E-1311: Magento forms can be submitted before the Google Recaptcha appears in the form --- .../frontend/layout/contact_index_index.xml | 3 + .../view/frontend/templates/form.phtml | 6 +- .../StorefrontCustomerSignInFormSection.xml | 2 +- ...orefrontCustomerSignInPopupFormSection.xml | 2 +- .../ViewModel/CreateAccountButton.php | 26 ------ .../ViewModel/ForgotPasswordButton.php | 26 ------ .../Customer/ViewModel/LoginButton.php | 26 ------ .../layout/customer_account_create.xml | 2 +- .../frontend/layout/customer_account_edit.xml | 3 + .../customer_account_forgotpassword.xml | 2 +- .../layout/customer_account_login.xml | 2 +- .../view/frontend/templates/form/edit.phtml | 7 +- .../templates/form/forgotpassword.phtml | 4 +- .../view/frontend/templates/form/login.phtml | 8 +- .../frontend/templates/form/register.phtml | 6 +- .../view/frontend/layout/default.xml | 6 +- .../view/frontend/templates/subscribe.phtml | 5 +- .../frontend/layout/catalog_product_view.xml | 3 + .../layout/checkout_cart_configure.xml | 1 + .../layout/wishlist_index_configure.xml | 1 + .../Review/view/frontend/templates/form.phtml | 7 +- .../layout/sendfriend_product_send.xml | 3 + .../view/frontend/templates/send.phtml | 19 +++-- .../Magento/Contact/Block/ContactFormTest.php | 4 +- .../Magento/Customer/Block/Form/EditTest.php | 85 +++++++++++++++++++ .../Magento/Customer/Block/Form/LoginTest.php | 4 +- .../Customer/Block/Form/RegisterTest.php | 16 ++-- .../Magento/Review/Block/FormTest.php | 4 + .../Magento/SendFriend/Block/SendTest.php | 4 +- .../View/Element/ButtonLockInterface.php | 28 ++++++ .../View/Element/ButtonLockManager.php | 42 +++++++++ 31 files changed, 242 insertions(+), 115 deletions(-) delete mode 100644 app/code/Magento/Customer/ViewModel/CreateAccountButton.php delete mode 100644 app/code/Magento/Customer/ViewModel/ForgotPasswordButton.php delete mode 100644 app/code/Magento/Customer/ViewModel/LoginButton.php create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Block/Form/EditTest.php create mode 100644 lib/internal/Magento/Framework/View/Element/ButtonLockInterface.php create mode 100644 lib/internal/Magento/Framework/View/Element/ButtonLockManager.php diff --git a/app/code/Magento/Contact/view/frontend/layout/contact_index_index.xml b/app/code/Magento/Contact/view/frontend/layout/contact_index_index.xml index 078c1a4ff5621..9fb4fea6c7730 100644 --- a/app/code/Magento/Contact/view/frontend/layout/contact_index_index.xml +++ b/app/code/Magento/Contact/view/frontend/layout/contact_index_index.xml @@ -12,6 +12,9 @@ <body> <referenceContainer name="content"> <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"> + <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> + </arguments> <container name="form.additional.info" label="Form Additional Info"/> </block> </referenceContainer> diff --git a/app/code/Magento/Contact/view/frontend/templates/form.phtml b/app/code/Magento/Contact/view/frontend/templates/form.phtml index 99e61e8249daf..54bb9e78287c1 100644 --- a/app/code/Magento/Contact/view/frontend/templates/form.phtml +++ b/app/code/Magento/Contact/view/frontend/templates/form.phtml @@ -80,7 +80,11 @@ $viewModel = $block->getViewModel(); <div class="actions-toolbar"> <div class="primary"> <input type="hidden" name="hideit" id="hideit" value="" /> - <button type="submit" title="<?= $block->escapeHtmlAttr(__('Submit')) ?>" class="action submit primary"> + <button type="submit" title="<?= $block->escapeHtmlAttr(__('Submit')) ?>" class="action submit primary" + id="send2" + <?php if ($block->getButtonLockManager()->isDisabled('contact_us_form_submit')): ?> + disabled="disabled" + <?php endif; ?>> <span><?= $block->escapeHtml(__('Submit')) ?></span> </button> </div> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml index 5497ed9950a61..926b552d0803b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInFormSection.xml @@ -11,7 +11,7 @@ <element name="emailField" type="input" selector="#email"/> <element name="passwordField" type="input" selector="#pass"/> <element name="showPasswordCheckbox" type="input" selector="#show-password"/> - <element name="signInAccountButton" type="button" selector="#send2" timeout="30"/> + <element name="signInAccountButton" type="button" selector="(//button[@id='send2'][contains(@class, 'login')])[1]" timeout="30"/> <element name="forgotPasswordLink" type="button" selector=".action.remind" timeout="10"/> <element name="customerLoginBlock" type="text" selector=".login-container .block.block-customer-login"/> <element name="signInAccountLink" type="button" selector="//header[@class='page-header']//li/a[contains(.,'Sign In')]"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml index 9806bb036813e..f6587a757ff3e 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection/StorefrontCustomerSignInPopupFormSection.xml @@ -11,7 +11,7 @@ <element name="errorMessage" type="input" selector="[data-ui-id='checkout-cart-validationmessages-message-error']"/> <element name="email" type="input" selector="#customer-email"/> <element name="password" type="input" selector="#pass"/> - <element name="signIn" type="button" selector="#send2" timeout="30"/> + <element name="signIn" type="button" selector="(//button[@id='send2'][contains(@class, 'login')])[1]" timeout="30"/> <element name="forgotYourPassword" type="button" selector="//a[@class='action']//span[contains(text(),'Forgot Your Password?')]" timeout="30"/> <element name="createAnAccount" type="button" selector="//div[contains(@class,'actions-toolbar')]//a[contains(.,'Create an Account')]" timeout="30"/> </section> diff --git a/app/code/Magento/Customer/ViewModel/CreateAccountButton.php b/app/code/Magento/Customer/ViewModel/CreateAccountButton.php deleted file mode 100644 index 8fa8718fe37e1..0000000000000 --- a/app/code/Magento/Customer/ViewModel/CreateAccountButton.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Customer\ViewModel; - -use Magento\Framework\View\Element\Block\ArgumentInterface; - -/** - * Custom Create Account button view model - */ -class CreateAccountButton implements ArgumentInterface -{ - /** - * If Create Account button should be disabled - * - * @return bool - */ - public function disabled(): bool - { - return false; - } -} diff --git a/app/code/Magento/Customer/ViewModel/ForgotPasswordButton.php b/app/code/Magento/Customer/ViewModel/ForgotPasswordButton.php deleted file mode 100644 index 4a68227dd27b4..0000000000000 --- a/app/code/Magento/Customer/ViewModel/ForgotPasswordButton.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Customer\ViewModel; - -use Magento\Framework\View\Element\Block\ArgumentInterface; - -/** - * Forgot password button view model - */ -class ForgotPasswordButton implements ArgumentInterface -{ - /** - * If Forgot password button should be disabled - * - * @return bool - */ - public function disabled(): bool - { - return false; - } -} diff --git a/app/code/Magento/Customer/ViewModel/LoginButton.php b/app/code/Magento/Customer/ViewModel/LoginButton.php deleted file mode 100644 index 75349043e8ba8..0000000000000 --- a/app/code/Magento/Customer/ViewModel/LoginButton.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Customer\ViewModel; - -use Magento\Framework\View\Element\Block\ArgumentInterface; - -/** - * Custom Login button view model - */ -class LoginButton implements ArgumentInterface -{ - /** - * If Login button should be disabled - * - * @return bool - */ - public function disabled(): bool - { - return false; - } -} diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml index c75086e8ea491..0afe06becc532 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml @@ -18,7 +18,7 @@ <arguments> <argument name="attribute_data" xsi:type="object">Magento\Customer\Block\DataProviders\AddressAttributeData</argument> <argument name="region_provider" xsi:type="object">Magento\Customer\ViewModel\Address\RegionProvider</argument> - <argument name="create_account_button_view_model" xsi:type="object">Magento\Customer\ViewModel\CreateAccountButton</argument> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> </arguments> <container name="form.additional.info" as="form_additional_info"/> <container name="customer.form.register.fields.before" as="form_fields_before" label="Form Fields Before" htmlTag="div" htmlClass="customer-form-before"/> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_edit.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_edit.xml index e89aa5ab624d9..3dd38d61aee03 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_edit.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_edit.xml @@ -21,6 +21,9 @@ </referenceBlock> <referenceContainer name="content"> <block class="Magento\Customer\Block\Form\Edit" name="customer_edit" template="Magento_Customer::form/edit.phtml" cacheable="false"> + <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> + </arguments> <container name="form.additional.info" as="form_additional_info"/> </block> </referenceContainer> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml index 7c8a6991e5a84..7fcf612de0c0f 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml @@ -18,7 +18,7 @@ <referenceContainer name="content"> <block class="Magento\Customer\Block\Account\Forgotpassword" name="forgotPassword" template="Magento_Customer::form/forgotpassword.phtml"> <arguments> - <argument name="forgot_password_button_view_model" xsi:type="object">Magento\Customer\ViewModel\ForgotPasswordButton</argument> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> </arguments> <container name="form.additional.info" as="form_additional_info"/> </block> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml index 8fb51eeb66508..90cd080cf2f64 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml @@ -16,7 +16,7 @@ <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="Magento_Customer::form/login.phtml"> <container name="form.additional.info" as="form_additional_info"/> <arguments> - <argument name="login_button_view_model" xsi:type="object">Magento\Customer\ViewModel\LoginButton</argument> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> </arguments> </block> <block class="Magento\Customer\Block\Form\Login\Info" name="customer.new" template="Magento_Customer::newcustomer.phtml"/> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml index 6734e9ad30a47..342f1ea23cdfe 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -115,8 +115,11 @@ use Magento\Customer\Block\Widget\Name; <div class="actions-toolbar"> <div class="primary"> - <button type="submit" class="action save primary" title="<?= $block->escapeHtmlAttr(__('Save')) ?>"> - <span><?= $block->escapeHtml(__('Save')) ?></span> + <button type="submit" class="action save primary" title="<?= $block->escapeHtmlAttr(__('Save')) ?>" + <?php if ($block->getButtonLockManager()->isDisabled('customer_edit_form_submit')): ?> + disabled="disabled" + <?php endif; ?>> + <span><?= $block->escapeHtml(__('Save')) ?></span> </button> </div> <div class="secondary"> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml index 2c6615828394b..1455fdbbd9f1e 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml @@ -9,8 +9,6 @@ // phpcs:disable Generic.Files.LineLength.TooLong /** @var \Magento\Customer\Block\Account\Forgotpassword $block */ -/** @var \Magento\Customer\ViewModel\ForgotPasswordButton $forgotPasswordButtonViewModel */ -$forgotPasswordButtonViewModel = $block->getData('forgot_password_button_view_model'); ?> <form class="form password forget" action="<?= $block->escapeUrl($block->getUrl('*/*/forgotpasswordpost')) ?>" @@ -29,7 +27,7 @@ $forgotPasswordButtonViewModel = $block->getData('forgot_password_button_view_mo </fieldset> <div class="actions-toolbar"> <div class="primary"> - <button type="submit" class="action submit primary" id="send2" <?php if ($forgotPasswordButtonViewModel->disabled()): ?> disabled="disabled" <?php endif; ?>><span><?= $block->escapeHtml(__('Reset My Password')) ?></span></button> + <button type="submit" class="action submit primary" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_forgot_password_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $block->escapeHtml(__('Reset My Password')) ?></span></button> </div> <div class="secondary"> <a class="action back" href="<?= $block->escapeUrl($block->getLoginUrl()) ?>"><span><?= $block->escapeHtml(__('Go back')) ?></span></a> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml index 0cc3dd5973b25..15500f4241ff4 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml @@ -7,8 +7,6 @@ // phpcs:disable Generic.Files.LineLength.TooLong /** @var \Magento\Customer\Block\Form\Login $block */ -/** @var \Magento\Customer\ViewModel\LoginButton $loginButtonViewModel */ -$loginButtonViewModel = $block->getData('login_button_view_model'); ?> <div class="block block-customer-login"> <div class="block-title"> @@ -49,7 +47,11 @@ $loginButtonViewModel = $block->getData('login_button_view_model'); </div> <?= $block->getChildHtml('form_additional_info') ?> <div class="actions-toolbar"> - <div class="primary"><button type="submit" class="action login primary" name="send" id="send2" <?php if ($loginButtonViewModel->disabled()): ?> disabled="disabled" <?php endif; ?>><span><?= $block->escapeHtml(__('Sign In')) ?></span></button></div> + <div class="primary"> + <button type="submit" class="action login primary" name="send" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_login_form_submit')): ?> disabled="disabled" <?php endif; ?>> + <span><?= $block->escapeHtml(__('Sign In')) ?></span> + </button> + </div> <div class="secondary"><a class="action remind" href="<?= $block->escapeUrl($block->getForgotPasswordUrl()) ?>"><span><?= $block->escapeHtml(__('Forgot Your Password?')) ?></span></a></div> </div> </fieldset> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml index 900be3d20bf22..58af2f1bf594d 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml @@ -17,8 +17,6 @@ $directoryHelper = $block->getData('directoryHelper'); /** @var \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider */ $regionProvider = $block->getRegionProvider(); $formData = $block->getFormData(); -/** @var \Magento\Customer\ViewModel\CreateAccountButton $createAccountButtonViewModel */ -$createAccountButtonViewModel = $block->getData('create_account_button_view_model'); ?> <?php $displayAll = $block->getConfig('general/region/display_all'); ?> <?= $block->getChildHtml('form_fields_before') ?> @@ -296,7 +294,9 @@ $createAccountButtonViewModel = $block->getData('create_account_button_view_mode class="action submit primary" title="<?= $escaper->escapeHtmlAttr(__('Create an Account')) ?>" id="send2" - <?php if ($createAccountButtonViewModel->disabled()): ?> disabled="disabled" <?php endif; ?>> + <?php if ($block->getButtonLockManager()->isDisabled('customer_create_form_submit')): ?> + disabled="disabled" + <?php endif; ?>> <span><?= $escaper->escapeHtml(__('Create an Account')) ?></span> </button> </div> diff --git a/app/code/Magento/Newsletter/view/frontend/layout/default.xml b/app/code/Magento/Newsletter/view/frontend/layout/default.xml index 32a08359333c9..6a2835862096a 100644 --- a/app/code/Magento/Newsletter/view/frontend/layout/default.xml +++ b/app/code/Magento/Newsletter/view/frontend/layout/default.xml @@ -11,7 +11,11 @@ <block class="Magento\Framework\View\Element\Js\Components" name="newsletter_head_components" template="Magento_Newsletter::js/components.phtml" ifconfig="newsletter/general/active"/> </referenceBlock> <referenceContainer name="footer"> - <block class="Magento\Newsletter\Block\Subscribe" name="form.subscribe" as="subscribe" before="-" template="Magento_Newsletter::subscribe.phtml" ifconfig="newsletter/general/active"/> + <block class="Magento\Newsletter\Block\Subscribe" name="form.subscribe" as="subscribe" before="-" template="Magento_Newsletter::subscribe.phtml" ifconfig="newsletter/general/active"> + <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> + </arguments> + </block> </referenceContainer> </body> </page> diff --git a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml index 768c97ef316f7..554cc4e16bd6f 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml @@ -33,7 +33,10 @@ <button class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit" - aria-label="Subscribe"> + aria-label="Subscribe" + <?php if ($block->getButtonLockManager()->isDisabled('newsletter_form_submit')): ?> + disabled="disabled" + <?php endif; ?>> <span><?= $block->escapeHtml(__('Subscribe')) ?></span> </button> </div> diff --git a/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml index a6b46f8f25a71..b714bac3a7ab3 100644 --- a/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Review/view/frontend/layout/catalog_product_view.xml @@ -23,6 +23,9 @@ <argument name="sort_order" xsi:type="string">30</argument> </arguments> <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form" ifconfig="catalog/review/active"> + <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> + </arguments> <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/> </block> </block> diff --git a/app/code/Magento/Review/view/frontend/layout/checkout_cart_configure.xml b/app/code/Magento/Review/view/frontend/layout/checkout_cart_configure.xml index 8a853cdd2e409..815d7ee1f3ad7 100644 --- a/app/code/Magento/Review/view/frontend/layout/checkout_cart_configure.xml +++ b/app/code/Magento/Review/view/frontend/layout/checkout_cart_configure.xml @@ -11,6 +11,7 @@ <referenceBlock name="reviews.tab"> <block class="Magento\Review\Block\Form\Configure" name="product.review.form" as="review_form" ifconfig="catalog/review/active"> <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> <argument name="jsLayout" xsi:type="array"> <item name="components" xsi:type="array"> <item name="review-form" xsi:type="array"> diff --git a/app/code/Magento/Review/view/frontend/layout/wishlist_index_configure.xml b/app/code/Magento/Review/view/frontend/layout/wishlist_index_configure.xml index 8a853cdd2e409..815d7ee1f3ad7 100644 --- a/app/code/Magento/Review/view/frontend/layout/wishlist_index_configure.xml +++ b/app/code/Magento/Review/view/frontend/layout/wishlist_index_configure.xml @@ -11,6 +11,7 @@ <referenceBlock name="reviews.tab"> <block class="Magento\Review\Block\Form\Configure" name="product.review.form" as="review_form" ifconfig="catalog/review/active"> <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> <argument name="jsLayout" xsi:type="array"> <item name="components" xsi:type="array"> <item name="review-form" xsi:type="array"> diff --git a/app/code/Magento/Review/view/frontend/templates/form.phtml b/app/code/Magento/Review/view/frontend/templates/form.phtml index 6b00bf681c1e3..1a01bfd387cde 100644 --- a/app/code/Magento/Review/view/frontend/templates/form.phtml +++ b/app/code/Magento/Review/view/frontend/templates/form.phtml @@ -74,7 +74,12 @@ </fieldset> <div class="actions-toolbar review-form-actions"> <div class="primary actions-primary"> - <button type="submit" class="action submit primary"><span><?= $block->escapeHtml(__('Submit Review')) ?></span></button> + <button type="submit" class="action submit primary" + <?php if ($block->getButtonLockManager()->isDisabled('review_form_submit')): ?> + disabled="disabled" + <?php endif; ?>> + <span><?= $block->escapeHtml(__('Submit Review')) ?></span> + </button> </div> </div> </form> diff --git a/app/code/Magento/SendFriend/view/frontend/layout/sendfriend_product_send.xml b/app/code/Magento/SendFriend/view/frontend/layout/sendfriend_product_send.xml index 4d6f3d8c628b2..0f76607a4ab78 100644 --- a/app/code/Magento/SendFriend/view/frontend/layout/sendfriend_product_send.xml +++ b/app/code/Magento/SendFriend/view/frontend/layout/sendfriend_product_send.xml @@ -14,6 +14,9 @@ </referenceBlock> <referenceContainer name="content"> <block class="Magento\SendFriend\Block\Send" name="sendfriend.send" cacheable="false" template="Magento_SendFriend::send.phtml"> + <arguments> + <argument name="button_lock_manager" xsi:type="object">Magento\Framework\View\Element\ButtonLockManager</argument> + </arguments> <container name="form.additional.info" as="form_additional_info"/> </block> </referenceContainer> diff --git a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml index bcfc243a43642..2e3058cae8962 100644 --- a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml +++ b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml @@ -40,7 +40,8 @@ <span><?= $block->escapeHtml(__('Email')) ?></span> </label> <div class="control"> - <input name="recipients[email][<%- data._index_ %>]" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" + <input name="recipients[email][<%- data._index_ %>]" + title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="recipients-email<%- data._index_ %>" type="email" class="input-text" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}"/> @@ -71,7 +72,8 @@ <label for="sender-name" class="label"><span><?= $block->escapeHtml(__('Name')) ?></span></label> <div class="control"> <input name="sender[name]" value="<?= $block->escapeHtmlAttr($block->getUserName()) ?>" - title="<?= $block->escapeHtmlAttr(__('Name')) ?>" id="sender-name" type="text" class="input-text" + title="<?= $block->escapeHtmlAttr(__('Name')) ?>" + id="sender-name" type="text" class="input-text" data-validate="{required:true}"/> </div> </div> @@ -88,7 +90,9 @@ </div> <div class="field text required"> - <label for="sender-message" class="label"><span><?= $block->escapeHtml(__('Message')) ?></span></label> + <label for="sender-message" class="label"> + <span><?= $block->escapeHtml(__('Message')) ?></span> + </label> <div class="control"> <textarea name="sender[message]" class="input-text" id="sender-message" cols="3" rows="3" data-validate="{required:true}"><?= $block->escapeHtml($block->getMessage()) ?></textarea> @@ -103,7 +107,8 @@ <div id="recipients-options"></div> <?php if ($block->getMaxRecipients()): ?> <div id="max-recipient-message" class="message notice limit" role="alert"> - <span><?= $block->escapeHtml(__('Maximum %1 email addresses allowed.', $block->getMaxRecipients())) ?> + <span> + <?= $block->escapeHtml(__('Maximum %1 email addresses allowed.', $block->getMaxRecipients())) ?> </span> </div> <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#max-recipient-message') ?> @@ -122,7 +127,11 @@ <div class="actions-toolbar"> <div class="primary"> <button type="submit" - class="action submit primary"<?php if (!$block->canSend()): ?> disabled="disabled"<?php endif ?>> + class="action submit primary" + <?php if (!$block->canSend() || + $block->getButtonLockManager()->isDisabled('sendfriend_form_submit')): ?> + disabled="disabled" + <?php endif ?>> <span><?= $block->escapeHtml(__('Send Email')) ?></span></button> </div> <div class="secondary"> diff --git a/dev/tests/integration/testsuite/Magento/Contact/Block/ContactFormTest.php b/dev/tests/integration/testsuite/Magento/Contact/Block/ContactFormTest.php index 05f05311f624a..310c88deb924d 100644 --- a/dev/tests/integration/testsuite/Magento/Contact/Block/ContactFormTest.php +++ b/dev/tests/integration/testsuite/Magento/Contact/Block/ContactFormTest.php @@ -9,6 +9,7 @@ use Magento\Contact\ViewModel\UserDataProvider; use Magento\Framework\View\Element\Block\ArgumentInterface; +use Magento\Framework\View\Element\ButtonLockManager; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -35,7 +36,8 @@ protected function setUp(): void { parent::setUp(); Bootstrap::getInstance()->loadArea('frontend'); - $this->block = Bootstrap::getObjectManager()->create(ContactForm::class); + $this->block = Bootstrap::getObjectManager()->create(ContactForm::class) + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); } /** diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/EditTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/EditTest.php new file mode 100644 index 0000000000000..0b416d03694b3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/EditTest.php @@ -0,0 +1,85 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Block\Form; + +use Magento\Customer\Model\Session; +use Magento\Framework\View\LayoutInterface; +use Magento\Framework\View\Element\ButtonLockManager; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/customer.php + */ +class EditTest extends TestCase +{ + private const SAVE_BUTTON_XPATH = '//*[@id="form-validate"]//*[@type="submit"]'; + + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var LayoutInterface + */ + private $layout; + + /** + * @var Edit + */ + private $block; + + /** @var Session */ + private $customerSession; + + /** + * @inheirtDoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->objectManager = Bootstrap::getObjectManager(); + $this->layout = $this->objectManager->get(LayoutInterface::class); + $this->customerSession = $this->objectManager->get(Session::class); + $this->block = $this->layout->createBlock(Edit::class); + $this->block->setTemplate('Magento_Customer::form/edit.phtml'); + } + + /** + * @return void + */ + public function testCustomerEditButton(): void + { + $code = 'customer_edit'; + $buttonLock = $this->getMockBuilder(\Magento\ReCaptchaUi\Model\ButtonLock::class) + ->disableOriginalConstructor() + ->disableAutoload() + ->setMethods(['isDisabled', 'getCode']) + ->getMock(); + $buttonLock->expects($this->atLeastOnce())->method('getCode')->willReturn($code); + $buttonLock->expects($this->atLeastOnce())->method('isDisabled')->willReturn(false); + $buttonLockManager = $this->objectManager->create( + ButtonLockManager::class, + ['buttonLockPool' => ['customer_edit_form_submit' => $buttonLock]] + ); + $this->block->setButtonLockManager($buttonLockManager); + + $this->customerSession->loginById(1); + $result = $this->block->toHtml(); + $this->assertFalse($buttonLockManager->isDisabled($code)); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::SAVE_BUTTON_XPATH, $result), + 'Customer Edit Button wasn\'t found in the page' + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php index 613d1c7f1b9ad..54126e11b9939 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php @@ -9,10 +9,10 @@ use Magento\Framework\ObjectManagerInterface; use Magento\Framework\View\LayoutInterface; +use Magento\Framework\View\Element\ButtonLockManager; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Xpath; use PHPUnit\Framework\TestCase; -use Magento\Customer\ViewModel\LoginButton; /** * Class checks login form view @@ -49,7 +49,7 @@ protected function setUp(): void $this->layout = $this->objectManager->get(LayoutInterface::class); $this->block = $this->layout->createBlock(Login::class); $this->block->setTemplate('Magento_Customer::form/login.phtml'); - $this->block->setLoginButtonViewModel($this->objectManager->get(LoginButton::class)); + $this->block->setButtonLockManager($this->objectManager->get(ButtonLockManager::class)); parent::setUp(); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php index bc82c333d5d60..f336d68603002 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php @@ -8,8 +8,8 @@ use Magento\Customer\Block\DataProviders\AddressAttributeData; use Magento\Customer\ViewModel\Address\RegionProvider; use Magento\Framework\View\Element\Template; +use Magento\Framework\View\Element\ButtonLockManager; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Customer\ViewModel\CreateAccountButton; /** * Test class for \Magento\Customer\Block\Form\Register @@ -29,7 +29,7 @@ public function testCompanyDefault(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -47,7 +47,7 @@ public function testTelephoneDefault(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -65,7 +65,7 @@ public function testFaxDefault(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -90,7 +90,7 @@ public function testCompanyDisabled(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -115,7 +115,7 @@ public function testTelephoneDisabled(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -140,7 +140,7 @@ public function testFaxEnabled(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); @@ -156,7 +156,7 @@ public function testCityWithStoreLabel(): void $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') ->setShowAddressFields(true) - ->setCreateAccountButtonViewModel(Bootstrap::getObjectManager()->create(CreateAccountButton::class)); + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php index 340fbafa91196..39977b26d8c47 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php @@ -10,6 +10,7 @@ use Magento\Framework\App\Config\Value; use Magento\Framework\App\ReinitableConfig; use Magento\Framework\App\State; +use Magento\Framework\View\Element\ButtonLockManager; use Magento\TestFramework\ObjectManager; class FormTest extends \PHPUnit\Framework\TestCase @@ -55,6 +56,9 @@ public function testGetCorrectFlag( /** @var \Magento\Review\Block\Form $form */ $form = $this->objectManager->create(\Magento\Review\Block\Form::class); + $form->setButtonLockManager( + $this->objectManager->create(ButtonLockManager::class, ['buttonLockPool' => []]) + ); $result = $form->getAllowWriteReviewFlag(); $this->assertEquals($result, $expectedResult); } diff --git a/dev/tests/integration/testsuite/Magento/SendFriend/Block/SendTest.php b/dev/tests/integration/testsuite/Magento/SendFriend/Block/SendTest.php index e651c24a246ad..f8ca0b85843e7 100644 --- a/dev/tests/integration/testsuite/Magento/SendFriend/Block/SendTest.php +++ b/dev/tests/integration/testsuite/Magento/SendFriend/Block/SendTest.php @@ -10,6 +10,7 @@ use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Model\Session; use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Element\ButtonLockManager; use Magento\Framework\View\LayoutInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Xpath; @@ -58,7 +59,8 @@ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); $this->layout = $this->objectManager->get(LayoutInterface::class); - $this->block = $this->layout->createBlock(Send::class); + $this->block = $this->layout->createBlock(Send::class) + ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); $this->session = $this->objectManager->get(Session::class); $this->accountManagement = $this->objectManager->get(AccountManagementInterface::class); } diff --git a/lib/internal/Magento/Framework/View/Element/ButtonLockInterface.php b/lib/internal/Magento/Framework/View/Element/ButtonLockInterface.php new file mode 100644 index 0000000000000..e65ce3f245a84 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Element/ButtonLockInterface.php @@ -0,0 +1,28 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\View\Element; + +use Magento\Framework\Exception\InputException; + +interface ButtonLockInterface +{ + /** + * Get button code + * + * @return string + */ + public function getCode(): string; + + /** + * If the button should be temporary disabled + * + * @return bool + * @throws InputException + */ + public function isDisabled(): bool; +} diff --git a/lib/internal/Magento/Framework/View/Element/ButtonLockManager.php b/lib/internal/Magento/Framework/View/Element/ButtonLockManager.php new file mode 100644 index 0000000000000..63976deb5b1a4 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Element/ButtonLockManager.php @@ -0,0 +1,42 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\View\Element; + +use Magento\Framework\View\Element\Block\ArgumentInterface; + +class ButtonLockManager implements ArgumentInterface +{ + /** + * @var ButtonLockInterface[] + */ + private array $buttonLockPool; + + /** + * @param array $buttonLockPool + */ + public function __construct(array $buttonLockPool = []) + { + $this->buttonLockPool = $buttonLockPool; + } + + /** + * Returns true if the button has to be disabled. + * + * @param string $buttonCode + * @return bool + * @throws \Magento\Framework\Exception\InputException + */ + public function isDisabled(string $buttonCode): bool + { + $result = array_filter($this->buttonLockPool, function ($item) use ($buttonCode) { + return $item->getCode() === $buttonCode && $item->isDisabled(); + }); + + return !empty($result); + } +} From 51a59f33e59d11bac60cff60670b4933807cda73 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 1 Dec 2022 13:03:38 +0530 Subject: [PATCH 212/985] AC-2623 --- ...nCheckingDateAfterChangeFrenchCanadaInterfaceLocaleTest.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeFrenchCanadaInterfaceLocaleTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeFrenchCanadaInterfaceLocaleTest.xml index e6ed8f0240bfe..8d8eb8ae0478d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeFrenchCanadaInterfaceLocaleTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeFrenchCanadaInterfaceLocaleTest.xml @@ -19,9 +19,6 @@ <group value="backend"/> <group value="ui"/> <group value="sales"/> - <skip> - <issueId value="AC-5916">Skipped</issueId> - </skip> </annotations> <before> <!--Deploy static content with French(Canada) locale--> From e053fabf7864d15552d24af6cd650d32475b0070 Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Thu, 1 Dec 2022 14:40:47 +0530 Subject: [PATCH 213/985] Fixed static tests --- .../Magento/Catalog/Model/ResourceModel/Category/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 8f73fc66c0d2a..54697f81f2fa7 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -155,7 +155,7 @@ public function addIdFilter($categoryIds) $condition = $categoryIds; } elseif (is_string($categoryIds)) { $ids = explode(',', $categoryIds); - if (empty($ids)) { + if (count($ids) == 0 ) { $condition = $categoryIds; } else { $condition = ['in' => $ids]; From 1d9ef75fad02e22d4a4286c960bf61500bc0c6b2 Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Thu, 1 Dec 2022 16:17:35 +0530 Subject: [PATCH 214/985] Fixed static tests --- .../Magento/Catalog/Model/ResourceModel/Category/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 54697f81f2fa7..6178688dfc81d 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -155,7 +155,7 @@ public function addIdFilter($categoryIds) $condition = $categoryIds; } elseif (is_string($categoryIds)) { $ids = explode(',', $categoryIds); - if (count($ids) == 0 ) { + if (count($ids) == 0) { $condition = $categoryIds; } else { $condition = ['in' => $ids]; From 56e44be1a16de6a656a97daf83e9ef0d9e3f04ed Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 1 Dec 2022 15:31:22 -0600 Subject: [PATCH 215/985] ACP2E-1216: Large area customizable option not able to render for print invoice PDF --- .../Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php | 2 +- .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php | 5 +++-- .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php | 2 +- app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index bde9633212084..ec56abd5e44ad 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -209,7 +209,7 @@ public function draw() $lines[][] = ['text' => $text, 'feed' => $leftBound + 5]; } - $drawItems[] = ['lines' => $lines, 'height' => 15]; + $drawItems[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index c4cdb0aaf92c7..5d3b563561efb 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -239,9 +239,10 @@ private function drawCustomOptions(array $draw): array if ($option['value']) { $text = []; $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']); + $printValue = str_replace(PHP_EOL, ', ', $printValue); $values = explode(', ', $printValue); foreach ($values as $value) { - foreach ($this->string->split($value, 30, true, true) as $subValue) { + foreach ($this->string->split($value, 50, true, true) as $subValue) { $text[] = $subValue; } } @@ -249,7 +250,7 @@ private function drawCustomOptions(array $draw): array $lines[][] = ['text' => $text, 'feed' => 40]; } - $draw[] = ['lines' => $lines, 'height' => 15]; + $draw[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index 232fdf6a4fda1..d1f2d60f0ad6b 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -185,7 +185,7 @@ public function draw() $lines[][] = ['text' => $text, 'feed' => 65]; } - $drawItems[] = ['lines' => $lines, 'height' => 15]; + $drawItems[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; } } diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php index 9b68fc2b67752..81616520c077a 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -1108,8 +1108,9 @@ private function correctText($column, $height, $font, $page) :int $lineSpacing = !empty($column['height']) ? $column['height'] : $height; $fontSize = empty($column['font_size']) ? 10 : $column['font_size']; foreach ($column['text'] as $part) { - if ($this->y - $lineSpacing < 15) { + if ($this->y - $top < 15) { $page = $this->newPage($this->pageSettings); + $top = 0; } $feed = $column['feed']; From 26f90bc93797e3f66730d01c370d29dab4244348 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Fri, 2 Dec 2022 14:41:48 +0530 Subject: [PATCH 216/985] Fixed static test failures --- .../Magento/Catalog/Model/ResourceModel/Category/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 8f73fc66c0d2a..6178688dfc81d 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -155,7 +155,7 @@ public function addIdFilter($categoryIds) $condition = $categoryIds; } elseif (is_string($categoryIds)) { $ids = explode(',', $categoryIds); - if (empty($ids)) { + if (count($ids) == 0) { $condition = $categoryIds; } else { $condition = ['in' => $ids]; From 6da701759e6f8109e2f5e5e3b19f81d73caa9979 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" <barryvdh@gmail.com> Date: Fri, 2 Dec 2022 14:11:40 +0100 Subject: [PATCH 217/985] Update elements.xsd --- lib/internal/Magento/Framework/View/Layout/etc/elements.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index aa7e5ee273b4e..eaddeed95c7a3 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -119,7 +119,7 @@ <xs:simpleType name="htmlClassType"> <xs:restriction base="xs:string"> - <xs:pattern value="[a-zA-Z\d\-_/:.\[\]\&() ]*"/> + <xs:pattern value="[a-zA-Z\d\-_/:.\[\]\&@() ]*"/> </xs:restriction> </xs:simpleType> From b3aa13f492a5fd825998da06c9251cc09cb0acd5 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Fri, 2 Dec 2022 12:43:46 -0600 Subject: [PATCH 218/985] ACP2E-1216: Large area customizable option not able to render for print invoice PDF --- .../Model/Sales/Order/Pdf/Items/Creditmemo.php | 3 ++- .../Bundle/Model/Sales/Order/Pdf/Items/Shipment.php | 5 +++-- .../Pdf/Items/Creditmemo/DefaultCreditmemo.php | 13 +++++++++++-- .../Order/Pdf/Items/Invoice/DefaultInvoice.php | 10 ++++++++-- .../Order/Pdf/Items/Shipment/DefaultShipment.php | 10 ++++++++-- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index ec56abd5e44ad..78ee1e0485620 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -199,9 +199,10 @@ public function draw() if ($option['value']) { $text = []; $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']); + $printValue = str_replace(PHP_EOL, ', ', $printValue); $values = explode(', ', $printValue); foreach ($values as $value) { - foreach ($this->string->split($value, 30, true, true) as $subValue) { + foreach ($this->string->split($value, 50, true, true) as $subValue) { $text[] = $subValue; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index d1f2d60f0ad6b..e36e9a77a6de0 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -169,12 +169,13 @@ public function draw() true ), 'font' => 'italic', - 'feed' => 60, + 'feed' => 110, ]; if ($option['value']) { $text = []; $printValue = $option['print_value'] ?? $this->filterManager->stripTags($option['value']); + $printValue = str_replace(PHP_EOL, ', ', $printValue); $values = explode(', ', $printValue); foreach ($values as $value) { foreach ($this->string->split($value, 50, true, true) as $subValue) { @@ -182,7 +183,7 @@ public function draw() } } - $lines[][] = ['text' => $text, 'feed' => 65]; + $lines[][] = ['text' => $text, 'feed' => 115]; } $drawItems[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php index 48934e24a3795..e9027744896b6 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php @@ -140,11 +140,20 @@ public function draw() ) ? $option['print_value'] : $this->filterManager->stripTags( $option['value'] ); - $lines[][] = ['text' => $this->string->split($printValue, 30, true, true), 'feed' => 40]; + + $values = explode(PHP_EOL, $printValue); + $text = []; + foreach ($values as $value) { + foreach ($this->string->split($value, 50, true, true) as $subValue) { + $text[] = $subValue; + } + } + + $lines[][] = ['text' => $text, 'feed' => 40]; } } - $lineBlock = ['lines' => $lines, 'height' => 20]; + $lineBlock = ['lines' => $lines, 'height' => 20, 'shift' => 5]; $page = $pdf->drawLineBlocks($page, [$lineBlock], ['table_header' => true]); $this->setPage($page); diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php index 6ddbce49829eb..4560a65bf3c39 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php @@ -151,15 +151,21 @@ public function draw() } else { $printValue = $this->filterManager->stripTags($option['value']); } + $printValue = str_replace(PHP_EOL, ', ', $printValue); $values = explode(', ', $printValue); + $text = []; foreach ($values as $value) { - $lines[][] = ['text' => $this->string->split($value, 30, true, true), 'feed' => 40]; + foreach ($this->string->split($value, 50, true, true) as $subValue) { + $text[] = $subValue; + } } + + $lines[][] = ['text' => $text, 'feed' => 40]; } } } - $lineBlock = ['lines' => $lines, 'height' => 20]; + $lineBlock = ['lines' => $lines, 'height' => 20, 'shift' => 5]; $page = $pdf->drawLineBlocks($page, [$lineBlock], ['table_header' => true]); $this->setPage($page); diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php index a88b508ba0789..6b555c87cc66c 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php @@ -104,15 +104,21 @@ public function draw() ) ? $option['print_value'] : $this->filterManager->stripTags( $option['value'] ); + $printValue = str_replace(PHP_EOL, ', ', $printValue); $values = explode(', ', $printValue); + $text = []; foreach ($values as $value) { - $lines[][] = ['text' => $this->string->split($value, 50, true, true), 'feed' => 115]; + foreach ($this->string->split($value, 50, true, true) as $subValue) { + $text[] = $subValue; + } } + + $lines[][] = ['text' => $text, 'feed' => 115]; } } } - $lineBlock = ['lines' => $lines, 'height' => 20]; + $lineBlock = ['lines' => $lines, 'height' => 20, 'shift' => 5]; $page = $pdf->drawLineBlocks($page, [$lineBlock], ['table_header' => true]); $this->setPage($page); From 7ff26ab0f7cb1689e649561bed5e50a4dc39a9ad Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Sat, 3 Dec 2022 02:18:41 +0530 Subject: [PATCH 219/985] ACPT-826 --- .../Model/AsyncConfigPublisher.php | 42 ++++++++++++------- .../Magento/AsyncConfig/Model/Consumer.php | 18 +++++++- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 348d765cf9f1c..4b1b526baa21d 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -69,7 +69,7 @@ public function __construct( public function saveConfigData(array $configData) { $asyncConfig = $this->asyncConfigFactory->create(); - $this->savePlaceholderData($configData); + $this->saveImages($configData); $asyncConfig->setConfigData($this->serializer->serialize($configData)); $this->messagePublisher->publish('async_config.saveConfig', $asyncConfig); } @@ -81,21 +81,35 @@ public function saveConfigData(array $configData) * @return void * @throws FileSystemException */ - private function savePlaceholderData(array &$configData) + private function saveImages(array &$configData) { if (isset($configData['groups']['placeholder'])) { - foreach ($configData['groups']['placeholder']['fields'] as &$data) { - if ($data['value']['tmp_name']) { - $newPath = - $this->dir->getPath(DirectoryList::TMP) . '/' . - // phpcs:ignore Magento2.Functions.DiscouragedFunction - pathinfo($data['value']['tmp_name'])['filename']; - $this->file->mv( - $data['value']['tmp_name'], - $newPath - ); - $data['value']['tmp_name'] = $newPath; - } + $this->changeImagePath($configData['groups']['placeholder']['fields']); + } elseif (isset($configData['groups']['identity'])) { + $this->changeImagePath($configData['groups']['identity']['fields']); + } + } + + /** + * Change Placeholder Data path if exists + * + * @param array $configData + * @return void + * @throws FileSystemException + */ + private function changeImagePath(array &$fields) + { + foreach ($fields as &$data) { + if (!empty($data['value']['tmp_name'])) { + $newPath = + $this->dir->getPath(DirectoryList::MEDIA) . '/' . + // phpcs:ignore Magento2.Functions.DiscouragedFunction + pathinfo($data['value']['tmp_name'])['filename']; + $this->file->mv( + $data['value']['tmp_name'], + $newPath + ); + $data['value']['tmp_name'] = $newPath; } } } diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php index ea87076b988e8..bd018d29050fd 100644 --- a/app/code/Magento/AsyncConfig/Model/Consumer.php +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -12,7 +12,9 @@ use Magento\Config\Model\Config\Factory; use Magento\Framework\App\ObjectManager; use Magento\Framework\Config\ScopeInterface; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Serialize\Serializer\Json; +use Symfony\Component\Console\Output\ConsoleOutput; class Consumer { @@ -38,6 +40,11 @@ class Consumer */ private $save; + /** + * @var ConsoleOutput + */ + private $output; + /** * * @param Factory $configFactory @@ -47,11 +54,13 @@ class Consumer public function __construct( Factory $configFactory, Json $json, - ScopeInterface $scope + ScopeInterface $scope, + ConsoleOutput $output ) { $this->configFactory = $configFactory; $this->serializer = $json; $this->scope = $scope; + $this->output = $output; $this->scope->setCurrentScope('adminhtml'); $this->save = ObjectManager::getInstance()->get(Save::class); $this->scope->setCurrentScope('global'); @@ -70,6 +79,11 @@ public function process(AsyncConfigMessageInterface $asyncConfigMessage): void $data = $this->save->filterNodes($data); /** @var \Magento\Config\Model\Config $configModel */ $configModel = $this->configFactory->create(['data' => $data]); - $configModel->save(); + try { + $configModel->save(); + } catch (LocalizedException $exception) { + $message = $exception->getMessage(); + $this->output->writeln(' Config couldn\'t be saved: ' . $message); + } } } From eebdcdb6bbc1175994efcbec3adc75b3659e06cc Mon Sep 17 00:00:00 2001 From: yaroslavgoncharuk <goncharu@adobe.com> Date: Fri, 2 Dec 2022 15:30:00 -0600 Subject: [PATCH 220/985] ACPT:826 added MFTF test --- .../Test/Mftf/Test/AsyncConfigurationTest.xml | 68 +++++++++++++++++++ .../Section/CatalogSection/CatalogSection.xml | 2 + 2 files changed, 70 insertions(+) create mode 100644 app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml diff --git a/app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml b/app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml new file mode 100644 index 0000000000000..c19e102e5d5e8 --- /dev/null +++ b/app/code/Magento/AsyncConfig/Test/Mftf/Test/AsyncConfigurationTest.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AsyncConfigurationTest"> + <annotations> + <features value="Config"/> + <stories value="Add AsyncConfig Feature"/> + <title value="Admin user should be able to save configuration asynchronously"/> + <description value="Configuration changes saved in async mode will be applied by the consumer"/> + <severity value="MAJOR"/> + <testCaseId value="ACPT-885"/> + <group value="configuration"/> + </annotations> + <before> + <!--Enable Async Configuration--> + <magentoCLI stepKey="EnableAsyncConfig" command="setup:config:set --no-interaction --config-async 1"/> + <magentoCLI stepKey="ClearConfigCache" command="cache:flush"/> + <!--Login to Admin--> + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + </before> + <after> + <magentoCLI stepKey="DisableAsyncConfig" command="setup:config:set --no-interaction --config-async 0"/> + <magentoCLI stepKey="setBackDefaultConfigValue" command="config:set catalog/frontend/grid_per_page 12" /> + <magentoCLI stepKey="ClearConfigCache" command="cache:clean"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + </after> + + <!--Go to Configuration Page--> + <amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPage" /> + <waitForPageLoad stepKey="waitForPageLoad"/> + <conditionalClick selector="{{CatalogSection.storefront}}" dependentSelector="{{CatalogSection.CheckIfTabExpand}}" visible="true" stepKey="expandStorefrontTab"/> + <scrollTo selector="{{CatalogSection.storefront}}" stepKey="scrollToOption" /> + + <!--Check Default Value of the Option--> + <seeInField userInput="12" selector="{{CatalogSection.productsPerPageOnGridDefaultValue}}" stepKey="SeeDefaultValue"/> + + <!--Change Default Value of the Option--> + <uncheckOption selector="{{CatalogSection.productsPerPageOnGridDefaultValueUseConfigCheckbox}}" stepKey="uncheckUseSystemValue"/> + <fillField selector="{{CatalogSection.productsPerPageOnGridDefaultValue}}" userInput="24" stepKey="fillProductQuantity"/> + + <!--Save Configuration--> + <click selector="{{AdminConfigSection.saveButton}}" stepKey="clickSaveConfig"/> + <waitForPageLoad stepKey="waitForSaving"/> + <waitForPageLoad time="30" stepKey="waitForConfigPageLoad"/> + + <!--Check that Configuration Remains the Same and Custom Success Message is Shown--> + <seeInField userInput="12" selector="{{CatalogSection.productsPerPageOnGridDefaultValue}}" stepKey="SeeInsertedValue"/> + <see selector="{{CatalogSection.successMessage}}" userInput="Configuration changes will be applied by consumer soon." stepKey="seeCustomSuccessMessage"/> + + <!--Trigger the Consumer--> + <magentoCLI stepKey="EnableAsyncConfig" command="queue:consumers:start saveConfigProcessor --max-messages=1"/> + + <!--Open Configuration Page Again--> + <amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPageAgain" /> + <waitForPageLoad stepKey="waitForPageLoadAgain"/> + <conditionalClick selector="{{CatalogSection.storefront}}" dependentSelector="{{CatalogSection.CheckIfTabExpand}}" visible="true" stepKey="expandStorefrontTabAgain"/> + + <!--Check that the Config Change Has Been Applied by the Consumer--> + <scrollTo selector="{{CatalogSection.storefront}}" stepKey="scrollToOptionAgain" /> + <seeInField userInput="24" selector="{{CatalogSection.productsPerPageOnGridDefaultValue}}" stepKey="SeeUpdatedValue"/> + </test> +</tests> diff --git a/app/code/Magento/Config/Test/Mftf/Section/CatalogSection/CatalogSection.xml b/app/code/Magento/Config/Test/Mftf/Section/CatalogSection/CatalogSection.xml index 72675414576cf..f5172e080bbed 100644 --- a/app/code/Magento/Config/Test/Mftf/Section/CatalogSection/CatalogSection.xml +++ b/app/code/Magento/Config/Test/Mftf/Section/CatalogSection/CatalogSection.xml @@ -25,5 +25,7 @@ <element name="GenerateUrlRewrites" type="select" selector="#catalog_seo_generate_category_product_rewrites"/> <element name="successMessage" type="text" selector="#messages"/> <element name="productsPerPageOnGridAllowedValues" type="input" selector="//input[@id='catalog_frontend_grid_per_page_values']"/> + <element name="productsPerPageOnGridDefaultValue" type="input" selector="//input[@id='catalog_frontend_grid_per_page']"/> + <element name="productsPerPageOnGridDefaultValueUseConfigCheckbox" type="checkbox" selector="//input[@id='catalog_frontend_grid_per_page_inherit']"/> </section> </sections> From b65b37e3cf2b0afe280eb9286f7df5b9c9814df0 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Sun, 4 Dec 2022 19:20:18 -0600 Subject: [PATCH 221/985] ACP2E-1264: Bundle options missed in Graphql response when display out of stock products = Yes --- .../Model/Resolver/Links/Collection.php | 56 +++++++------------ .../etc/graphql/di.xml | 12 ++++ .../Model/Cart/GetCartProducts.php | 29 ++++------ .../Magento/Sales/Model/Reorder/Reorder.php | 1 + 4 files changed, 44 insertions(+), 54 deletions(-) create mode 100644 app/code/Magento/CatalogInventoryGraphQl/etc/graphql/di.xml diff --git a/app/code/Magento/BundleGraphQl/Model/Resolver/Links/Collection.php b/app/code/Magento/BundleGraphQl/Model/Resolver/Links/Collection.php index 3d479692f719a..660e65dc36f64 100644 --- a/app/code/Magento/BundleGraphQl/Model/Resolver/Links/Collection.php +++ b/app/code/Magento/BundleGraphQl/Model/Resolver/Links/Collection.php @@ -15,7 +15,6 @@ use Magento\Framework\Exception\RuntimeException; use Magento\Framework\GraphQl\Query\EnumLookup; use Magento\Framework\GraphQl\Query\Uid; -use Magento\Catalog\Api\ProductRepositoryInterface; use Zend_Db_Select_Exception; /** @@ -51,29 +50,20 @@ class Collection /** @var Uid */ private $uidEncoder; - /** - * @var ProductRepositoryInterface - */ - private $productRepository; - /** * @param CollectionFactory $linkCollectionFactory * @param EnumLookup $enumLookup * @param Uid|null $uidEncoder - * @param ProductRepositoryInterface|null $productRepository */ public function __construct( CollectionFactory $linkCollectionFactory, EnumLookup $enumLookup, - Uid $uidEncoder = null, - ?ProductRepositoryInterface $productRepository = null + Uid $uidEncoder = null ) { $this->linkCollectionFactory = $linkCollectionFactory; $this->enumLookup = $enumLookup; $this->uidEncoder = $uidEncoder ?: ObjectManager::getInstance() ->get(Uid::class); - $this->productRepository = $productRepository ?: ObjectManager::getInstance() - ->get(ProductRepositoryInterface::class); } /** @@ -117,7 +107,6 @@ public function getLinksForOptionId(int $optionId) : array * Fetch link data and return in array format. Keys for links will be their option Ids. * * @return array - * @throws NoSuchEntityException * @throws RuntimeException * @throws Zend_Db_Select_Exception * @SuppressWarnings(PHPMD.CyclomaticComplexity) @@ -143,33 +132,26 @@ private function fetch() : array /** @var Selection $link */ foreach ($linkCollection as $link) { - $productDetails = []; $data = $link->getData(); - if (isset($data['product_id'])) { - $productDetails = $this->productRepository->getById($data['product_id']); - } - - if ($productDetails && $productDetails->getIsSalable()) { - $formattedLink = [ - 'price' => $link->getSelectionPriceValue(), - 'position' => $link->getPosition(), - 'id' => $link->getSelectionId(), - 'uid' => $this->uidEncoder->encode((string)$link->getSelectionId()), - 'qty' => (float)$link->getSelectionQty(), - 'quantity' => (float)$link->getSelectionQty(), - 'is_default' => (bool)$link->getIsDefault(), - 'price_type' => $this->enumLookup->getEnumValueFromField( - 'PriceTypeEnum', - (string)$link->getSelectionPriceType() - ) ?: 'DYNAMIC', - 'can_change_quantity' => $link->getSelectionCanChangeQty(), - ]; - $data = array_replace($data, $formattedLink); - if (!isset($this->links[$link->getOptionId()])) { - $this->links[$link->getOptionId()] = []; - } - $this->links[$link->getOptionId()][] = $data; + $formattedLink = [ + 'price' => $link->getSelectionPriceValue(), + 'position' => $link->getPosition(), + 'id' => $link->getSelectionId(), + 'uid' => $this->uidEncoder->encode((string)$link->getSelectionId()), + 'qty' => (float)$link->getSelectionQty(), + 'quantity' => (float)$link->getSelectionQty(), + 'is_default' => (bool)$link->getIsDefault(), + 'price_type' => $this->enumLookup->getEnumValueFromField( + 'PriceTypeEnum', + (string)$link->getSelectionPriceType() + ) ?: 'DYNAMIC', + 'can_change_quantity' => $link->getSelectionCanChangeQty(), + ]; + $data = array_replace($data, $formattedLink); + if (!isset($this->links[$link->getOptionId()])) { + $this->links[$link->getOptionId()] = []; } + $this->links[$link->getOptionId()][] = $data; } return $this->links; diff --git a/app/code/Magento/CatalogInventoryGraphQl/etc/graphql/di.xml b/app/code/Magento/CatalogInventoryGraphQl/etc/graphql/di.xml new file mode 100644 index 0000000000000..8459c75f15c82 --- /dev/null +++ b/app/code/Magento/CatalogInventoryGraphQl/etc/graphql/di.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Catalog\Model\ResourceModel\Product\Collection"> + <plugin name="add_stock_information" type="Magento\CatalogInventory\Model\AddStockStatusToCollection" /> + </type> +</config> diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartProducts.php b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartProducts.php index 82cbd8cbfde2d..645e4eb35c548 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartProducts.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartProducts.php @@ -7,8 +7,8 @@ namespace Magento\QuoteGraphQl\Model\Cart; -use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory; use Magento\Quote\Model\Quote; /** @@ -17,25 +17,17 @@ class GetCartProducts { /** - * @var ProductRepositoryInterface + * @var ProductCollectionFactory */ - private $productRepository; + private $productCollectionFactory; /** - * @var SearchCriteriaBuilder - */ - private $searchCriteriaBuilder; - - /** - * @param ProductRepositoryInterface $productRepository - * @param SearchCriteriaBuilder $searchCriteriaBuilder + * @param ProductCollectionFactory $productCollectionFactory */ public function __construct( - ProductRepositoryInterface $productRepository, - SearchCriteriaBuilder $searchCriteriaBuilder + ProductCollectionFactory $productCollectionFactory ) { - $this->productRepository = $productRepository; - $this->searchCriteriaBuilder = $searchCriteriaBuilder; + $this->productCollectionFactory = $productCollectionFactory; } /** @@ -57,8 +49,11 @@ function ($item) { $cartItems ); - $searchCriteria = $this->searchCriteriaBuilder->addFilter('entity_id', $cartItemIds, 'in')->create(); - $products = $this->productRepository->getList($searchCriteria)->getItems(); + $productCollection = $this->productCollectionFactory->create() + ->addAttributeToSelect('*') + ->addIdFilter($cartItemIds) + ->setFlag('has_stock_status_filter', true); + $products = $productCollection->getItems(); return $products; } diff --git a/app/code/Magento/Sales/Model/Reorder/Reorder.php b/app/code/Magento/Sales/Model/Reorder/Reorder.php index 83e7c9ada993a..fcc11cf9f57a4 100644 --- a/app/code/Magento/Sales/Model/Reorder/Reorder.php +++ b/app/code/Magento/Sales/Model/Reorder/Reorder.php @@ -231,6 +231,7 @@ private function getOrderProducts(string $storeId, array $orderItemProductIds): { /** @var Collection $collection */ $collection = $this->productCollectionFactory->create(); + $collection->setFlag('has_stock_status_filter', true); $collection->setStore($storeId) ->addIdFilter($orderItemProductIds) ->addStoreFilter() From 194ac13875d4b54d6afb55ea998b2438e7c02109 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 5 Dec 2022 16:12:55 +0200 Subject: [PATCH 222/985] ACP2E-1388, skipping price removal if product is out of stock, but part of a dynamic price bundle --- .../DefaultSelectionPriceListProvider.php | 1 - .../Indexer/Product/Price/AbstractAction.php | 2 +- .../Model/Indexer/ProductPriceIndexFilter.php | 25 ++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php index 76f6542089a7b..c4850dcdf899f 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php @@ -86,7 +86,6 @@ public function getPriceList(Product $bundleProduct, $searchMin, $useRegularPric ); $selectionsCollection->setFlag('has_stock_status_filter', true); $selectionsCollection->removeAttributeToSelect(); - //$selectionsCollection->addQuantityFilter(); if (!$useRegularPrice) { $selectionsCollection->addAttributeToSelect('special_price'); diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index 8477b7401226f..63e3b373d7b1a 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -411,7 +411,7 @@ function ($type) use ($productsTypes) { $indexer->executeByDimensions($dimensions, \SplFixedArray::fromArray($entityIds, false)); $mainTable = $this->tableMaintainer->getMainTableByDimensions($dimensions); $this->_insertFromTable($temporaryTable, $mainTable); - //$this->deleteOutdatedData($entityIds, $temporaryTable, $mainTable); //here be the problem + $this->deleteOutdatedData($entityIds, $temporaryTable, $mainTable); } } else { // handle 3d-party indexers for backward compatibility diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php index 2b37c9099a0e6..9b5dfd0ef47f0 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php @@ -121,7 +121,9 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = foreach ($batchSelectIterator as $select) { $productIds = null; foreach ($connection->query($select)->fetchAll() as $row) { - $productIds[] = (int) $row['product_id']; + if ($row['product_id'] && $this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $row['product_id'])) { + $productIds[] = (int) $row['product_id']; + } } if ($productIds !== null) { $where = [$priceTable->getEntityField() .' IN (?)' => $productIds]; @@ -129,4 +131,25 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = } } } + + /** + * Check if the product is used within a dynamic price bundle configuration + * + * @param string $priceTableName + * @param int $productId + * @return bool + */ + private function isWithinDynamicPriceBundle(string $priceTableName, int $productId): bool + { + $connection = $this->resourceConnection->getConnection($this->connectionName); + $select = $connection->select(); + $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); + $select->joinInner(['entity' => 'catalog_product_entity'], implode(' AND ', ['selection.parent_product_id = entity.entity_id']), null); + $select->joinInner(['price' => $priceTableName], implode(' AND ', ['price.entity_id = selection.product_id']), null); + $select->where('selection.product_id = ?', $productId); + $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); + $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); + + return intval($connection->fetchOne($select)) != 0; + } } From 2035467bffce8ee0756560fbcbc39c32af5bc645 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 5 Dec 2022 19:00:10 +0200 Subject: [PATCH 223/985] ACP2E-1388, fixed static and unit --- .../Model/Indexer/ProductPriceIndexFilter.php | 14 ++++++++++---- .../Model/Indexer/ProductPriceIndexFilterTest.php | 9 +++------ app/code/Magento/CatalogInventory/composer.json | 3 ++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php index 9b5dfd0ef47f0..9f28be52e31df 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php @@ -121,7 +121,9 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = foreach ($batchSelectIterator as $select) { $productIds = null; foreach ($connection->query($select)->fetchAll() as $row) { - if ($row['product_id'] && $this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $row['product_id'])) { + if ($row['product_id'] && + $this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $row['product_id']) + ) { $productIds[] = (int) $row['product_id']; } } @@ -144,12 +146,16 @@ private function isWithinDynamicPriceBundle(string $priceTableName, int $product $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); - $select->joinInner(['entity' => 'catalog_product_entity'], implode(' AND ', ['selection.parent_product_id = entity.entity_id']), null); - $select->joinInner(['price' => $priceTableName], implode(' AND ', ['price.entity_id = selection.product_id']), null); + $select->joinInner(['entity' => 'catalog_product_entity'], + implode(' AND ', ['selection.parent_product_id = entity.entity_id']), null + ); + $select->joinInner(['price' => $priceTableName], + implode(' AND ', ['price.entity_id = selection.product_id']), null + ); $select->where('selection.product_id = ?', $productId); $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); - return intval($connection->fetchOne($select)) != 0; + return (int) $connection->fetchOne($select) != 0; } } diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php index a100ebef3af77..81da4f88c7e95 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php @@ -78,13 +78,10 @@ public function testModifyPrice(): void $entityIds = [1, 2, 3]; $indexTableStructure = $this->createMock(IndexTableStructure::class); $connectionMock = $this->getMockForAbstractClass(AdapterInterface::class); - $this->resourceConnection->expects($this->once())->method('getConnection')->willReturn($connectionMock); + $this->resourceConnection->expects($this->exactly(6))->method('getConnection')->willReturn($connectionMock); $selectMock = $this->createMock(Select::class); - $connectionMock->expects($this->once())->method('select')->willReturn($selectMock); - $selectMock - ->method('where') - ->withConsecutive([], [], ['stock_item.product_id IN (?)', $entityIds]) - ->willReturnOnConsecutiveCalls(null, null, $selectMock); + $connectionMock->expects($this->exactly(6))->method('select')->willReturn($selectMock); + $this->generator->expects($this->once()) ->method('generate') ->willReturnCallback( diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index 7ea00923ac715..2b49b4b1609d5 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -13,7 +13,8 @@ "magento/module-eav": "*", "magento/module-quote": "*", "magento/module-store": "*", - "magento/module-ui": "*" + "magento/module-ui": "*", + "magento/module-bundle": "*" }, "type": "magento2-module", "license": [ From 856ed903626596530e02f3eacc78c1b8c72dd1f0 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Mon, 5 Dec 2022 12:53:32 -0600 Subject: [PATCH 224/985] ACP2E-1216: Large area customizable option not able to render for print invoice PDF --- .../Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php | 6 +++--- .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php | 4 ++-- .../Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php | 6 +++--- app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index 78ee1e0485620..517f49ab9af2e 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -101,7 +101,7 @@ public function draw() } if (!isset($drawItems[$optionId])) { - $drawItems[$optionId] = ['lines' => [], 'height' => 15]; + $drawItems[$optionId] = ['lines' => [], 'height' => 20]; } // draw selection attributes @@ -112,7 +112,7 @@ public function draw() 'feed' => $x, ]; - $drawItems[$optionId] = ['lines' => [$line], 'height' => 15]; + $drawItems[$optionId] = ['lines' => [$line], 'height' => 20]; $line = []; $prevOptionId = $attributes['option_id']; @@ -210,7 +210,7 @@ public function draw() $lines[][] = ['text' => $text, 'feed' => $leftBound + 5]; } - $drawItems[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; + $drawItems[] = ['lines' => $lines, 'height' => 20, 'shift' => 5]; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index 5d3b563561efb..640c59cdb198a 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -105,7 +105,7 @@ private function drawChildrenItems(): array } if (!isset($drawItems[$optionId])) { - $drawItems[$optionId] = ['lines' => [], 'height' => 15]; + $drawItems[$optionId] = ['lines' => [], 'height' => 20]; } if ($childItem->getOrderItem()->getParentItem() && $prevOptionId != $attributes['option_id']) { @@ -250,7 +250,7 @@ private function drawCustomOptions(array $draw): array $lines[][] = ['text' => $text, 'feed' => 40]; } - $draw[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; + $draw[] = ['lines' => $lines, 'height' => 20, 'shift' => 5]; } } diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index e36e9a77a6de0..4054f74cccb13 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -99,7 +99,7 @@ public function draw() } if (!isset($drawItems[$optionId])) { - $drawItems[$optionId] = ['lines' => [], 'height' => 15]; + $drawItems[$optionId] = ['lines' => [], 'height' => 20]; } if ($childItem->getParentItem() && $prevOptionId != $attributes['option_id']) { @@ -109,7 +109,7 @@ public function draw() 'feed' => 100, ]; - $drawItems[$optionId] = ['lines' => [$line], 'height' => 15]; + $drawItems[$optionId] = ['lines' => [$line], 'height' => 20]; $line = []; @@ -186,7 +186,7 @@ public function draw() $lines[][] = ['text' => $text, 'feed' => 115]; } - $drawItems[] = ['lines' => $lines, 'height' => 15, 'shift' => 5]; + $drawItems[] = ['lines' => $lines, 'height' => 20, 'shift' => 5]; } } diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php index cc67601f0ec51..ce84dae87f696 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php @@ -87,7 +87,7 @@ protected function _drawHeader(\Zend_Pdf_Page $page) $page->setFillColor(new \Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92)); $page->setLineColor(new \Zend_Pdf_Color_GrayScale(0.5)); $page->setLineWidth(0.5); - $page->drawRectangle(25, $this->y, 570, $this->y - 30); + $page->drawRectangle(25, $this->y, 570, $this->y - 15); $this->y -= 10; $page->setFillColor(new \Zend_Pdf_Color_Rgb(0, 0, 0)); From f8ddccf7b9bf457a9574c4fa53f4736682377bca Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" <barryvdh@gmail.com> Date: Mon, 5 Dec 2022 20:03:04 +0100 Subject: [PATCH 225/985] Update elements.xsd --- lib/internal/Magento/Framework/View/Layout/etc/elements.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index eaddeed95c7a3..fd674063efca7 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -119,7 +119,7 @@ <xs:simpleType name="htmlClassType"> <xs:restriction base="xs:string"> - <xs:pattern value="[a-zA-Z\d\-_/:.\[\]\&@() ]*"/> + <xs:pattern value="[a-zA-Z\d\-_/:.\[\]&@() ]*"/> </xs:restriction> </xs:simpleType> From c40c85360c673c87db13b34735c213ff0cb4526a Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Mon, 5 Dec 2022 14:06:01 -0600 Subject: [PATCH 226/985] ACP2E-1216: Large area customizable option not able to render for print invoice PDF --- .../Model/Sales/Order/Pdf/Items/InvoiceTestProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/InvoiceTestProvider.php b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/InvoiceTestProvider.php index 24aeffc1e33c7..f957e72c1484b 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/InvoiceTestProvider.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Sales/Order/Pdf/Items/InvoiceTestProvider.php @@ -24,7 +24,7 @@ public function getData(): array 'display_both' => [ 'expected' => [ 1 => [ - 'height' => 15, + 'height' => 20, 'lines' => [ [ [ @@ -176,7 +176,7 @@ public function getData(): array 'including_tax' => [ 'expected' => [ 1 => [ - 'height' => 15, + 'height' => 20, 'lines' => [ [ [ @@ -251,7 +251,7 @@ public function getData(): array 'excluding_tax' => [ 'expected' => [ 1 => [ - 'height' => 15, + 'height' => 20, 'lines' => [ [ [ From 92c858ee5b9dcc37656c446c7269195ec4c631f1 Mon Sep 17 00:00:00 2001 From: yaroslavgoncharuk <goncharu@adobe.com> Date: Mon, 5 Dec 2022 17:29:46 -0600 Subject: [PATCH 227/985] ACPT:826 fixed static tests failures --- app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 2 +- app/code/Magento/AsyncConfig/Model/Consumer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 4b1b526baa21d..6b077f8e0e613 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -93,7 +93,7 @@ private function saveImages(array &$configData) /** * Change Placeholder Data path if exists * - * @param array $configData + * @param array $fields * @return void * @throws FileSystemException */ diff --git a/app/code/Magento/AsyncConfig/Model/Consumer.php b/app/code/Magento/AsyncConfig/Model/Consumer.php index bd018d29050fd..a4eead74a7c5e 100644 --- a/app/code/Magento/AsyncConfig/Model/Consumer.php +++ b/app/code/Magento/AsyncConfig/Model/Consumer.php @@ -46,10 +46,10 @@ class Consumer private $output; /** - * * @param Factory $configFactory * @param Json $json * @param ScopeInterface $scope + * @param ConsoleOutput $output */ public function __construct( Factory $configFactory, From de13e218f52ee63dfab4533f27a7d093825b7162 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Tue, 6 Dec 2022 14:29:45 +0530 Subject: [PATCH 228/985] Fixed Integration test --- .../Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php index 5963b74150851..d6a70caad1586 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php @@ -21,7 +21,6 @@ * * @magentoAppArea adminhtml * @magentoDbIsolation enabled - * @magentoAppIsolation enabled */ class TreeTest extends TestCase { From e234229a2fbadbb884c205fb0833637d43fc77af Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 6 Dec 2022 11:33:24 +0200 Subject: [PATCH 229/985] ACP2E-1388, fixed static and added unit --- .../Model/Indexer/ProductPriceIndexFilter.php | 14 ++++++---- .../Indexer/ProductPriceIndexFilterTest.php | 27 +++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php index 9f28be52e31df..c215659194392 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php @@ -135,7 +135,7 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = } /** - * Check if the product is used within a dynamic price bundle configuration + * Check if the product is part of a dynamic price bundle configuration * * @param string $priceTableName * @param int $productId @@ -146,11 +146,15 @@ private function isWithinDynamicPriceBundle(string $priceTableName, int $product $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); - $select->joinInner(['entity' => 'catalog_product_entity'], - implode(' AND ', ['selection.parent_product_id = entity.entity_id']), null + $select->joinInner( + ['entity' => 'catalog_product_entity'], + implode(' AND ', ['selection.parent_product_id = entity.entity_id']), + null ); - $select->joinInner(['price' => $priceTableName], - implode(' AND ', ['price.entity_id = selection.product_id']), null + $select->joinInner( + ['price' => $priceTableName], + implode(' AND ', ['price.entity_id = selection.product_id']), + null ); $select->where('selection.product_id = ?', $productId); $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php index 81da4f88c7e95..a00fd08f9e507 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php @@ -96,6 +96,33 @@ public function testModifyPrice(): void $this->productPriceIndexFilter->modifyPrice($indexTableStructure, $entityIds); } + public function testModifyPriceDynamicPriceBundle(): void + { + $indexTableStructure = $this->createMock(IndexTableStructure::class); + $indexTableStructure->expects($this->any())->method('getTableName') + ->willReturn('price_table'); + $this->stockConfiguration->expects($this->once())->method('isShowOutOfStock')->willReturn(false); + $connectionMock = $this->getMockForAbstractClass(AdapterInterface::class); + $this->resourceConnection->expects($this->exactly(2))->method('getConnection')->willReturn($connectionMock); + + $selectMock = $this->createMock(Select::class); + $connectionMock->expects($this->exactly(2))->method('select')->willReturn($selectMock); + $this->generator->expects($this->once()) + ->method('generate') + ->willReturnCallback( + $this->getBatchIteratorCallback($selectMock, 1) + ); + $fetchStmtMock = $this->createPartialMock(\Zend_Db_Statement_Pdo::class, ['fetchAll']); + $fetchStmtMock->expects($this->any()) + ->method('fetchAll') + ->willReturn([['product_id' => 1]]); + $connectionMock->expects($this->any())->method('query')->willReturn($fetchStmtMock); + $connectionMock->expects($this->once())->method('fetchOne')->willReturn(1); + $connectionMock->expects($this->once())->method('delete')->with('price_table', [' IN (?)' => [1]]); + + $this->productPriceIndexFilter->modifyPrice($indexTableStructure); + } + /** * Returns batches. * From f3448f9e56018eea4301353f978909d388c99afd Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 6 Dec 2022 16:23:03 +0200 Subject: [PATCH 230/985] ACP2E-1369: clear previous error message if ajax request completed on subsequent try --- lib/web/mage/backend/bootstrap.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/web/mage/backend/bootstrap.js b/lib/web/mage/backend/bootstrap.js index b72815475df75..3edc896b1e9e5 100644 --- a/lib/web/mage/backend/bootstrap.js +++ b/lib/web/mage/backend/bootstrap.js @@ -78,7 +78,6 @@ define([ * @param {String} textStatus */ error: function (jqXHR, textStatus) { - $('body').notification('clear'); if (jqXHR.readyState !== 0 && textStatus !== 'abort') { $('body').notification('add', { From 286c748d12b18c0d6eeccfccca2de0d947cdb291 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 6 Dec 2022 17:44:10 +0200 Subject: [PATCH 231/985] ACP2E-1353: allow image/x-icon favicon; cr comments --- .../MediaStorage/Model/File/Validator/Image.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php index 5070cd08d2191..e79e68a82c856 100644 --- a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php +++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php @@ -8,12 +8,9 @@ namespace Magento\MediaStorage\Model\File\Validator; use Laminas\Validator\AbstractValidator; -use Magento\Framework\App\ObjectManager; use Magento\Framework\File\Mime; use Magento\Framework\Filesystem\Driver\File; -use Magento\Framework\Image\Adapter\ConfigInterface; use Magento\Framework\Image\Factory; -use Psr\Log\LoggerInterface; /** * Image validator @@ -48,27 +45,19 @@ class Image extends AbstractValidator */ private $file; - /** - * @var LoggerInterface - */ - private $logger; - /** * @param Mime $fileMime * @param Factory $imageFactory * @param File $file - * @param LoggerInterface|null $logger */ public function __construct( Mime $fileMime, Factory $imageFactory, - File $file, - LoggerInterface $logger = null + File $file ) { $this->fileMime = $fileMime; $this->imageFactory = $imageFactory; $this->file = $file; - $this->logger = $logger ?? ObjectManager::getInstance()->get(LoggerInterface::class); parent::__construct(); } @@ -87,7 +76,6 @@ public function isValid($filePath): bool $image->open(); } catch (\Exception $e) { $isValid = false; - $this->logger->critical($e, ['exception' => $e]); } } From 0da22ead8620c79e2794c83f09602356b5138484 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 8 Dec 2022 18:45:36 +0530 Subject: [PATCH 232/985] ACQE-4323 --- ...icklySearchesForProductByAttributeTest.xml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 app/code/Magento/Search/Test/Mftf/Test/StorefrontCustomerQuicklySearchesForProductByAttributeTest.xml diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontCustomerQuicklySearchesForProductByAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontCustomerQuicklySearchesForProductByAttributeTest.xml new file mode 100644 index 0000000000000..9cd8c264e0623 --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontCustomerQuicklySearchesForProductByAttributeTest.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontCustomerQuicklySearchesForProductByAttributeTest"> + <annotations> + <stories value="Search Term"/> + <title value="Customer quickly searches for Product by Attribute"/> + <description value="Customer quickly searches for Product by Attribute"/> + <severity value="AVERAGE"/> + <testCaseId value="AC-6157"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <!--Create new searchable product attribute--> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> + <actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createAttribute"> + <argument name="attribute" value="textProductAttribute"/> + </actionGroup> + <!--Assign attribute to the Default set--> + <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> + <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/> + <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup"> + <argument name="group" value="Product Details"/> + <argument name="attribute" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> + <!--Create product and fill new attribute field--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <waitForPageLoad stepKey="waitForProductIndexPage"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/> + </before> + + <after> + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid"> + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode"> + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/> + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!--Assert search results on storefront--> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm"> + <argument name="phrase" value="searchable"/> + </actionGroup> + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/> + + + </test> +</tests> From 642fbd2e90c5a66c97b840d15d630a96ef132066 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 8 Dec 2022 09:25:16 -0600 Subject: [PATCH 233/985] ACP2E-1216: Large area customizable option not able to render for print invoice PDF --- .../Unit/Model/Order/Pdf/AbstractTest.php | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/AbstractTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/AbstractTest.php index 7b789dbfe4719..3e8579a5a0237 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/AbstractTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/AbstractTest.php @@ -114,4 +114,96 @@ public function testInsertTotals() $this->assertSame($page, $actual); } + + /** + * Test for the multiline text will be correctly wrapped between multiple pages + * + * @return void + * @throws \ReflectionException + */ + public function testDrawLineBlocks() + { + // Setup constructor dependencies + $paymentData = $this->createMock(Data::class); + $string = $this->createMock(StringUtils::class); + $scopeConfig = $this->getMockForAbstractClass(ScopeConfigInterface::class); + $filesystem = $this->createMock(Filesystem::class); + $pdfConfig = $this->createMock(Config::class); + $pdfTotalFactory = $this->createMock(Factory::class); + $pdfItemsFactory = $this->createMock(ItemsFactory::class); + $localeMock = $this->getMockForAbstractClass(TimezoneInterface::class); + $translate = $this->getMockForAbstractClass(StateInterface::class); + $addressRenderer = $this->createMock(Renderer::class); + + $abstractPdfMock = $this->getMockForAbstractClass( + AbstractPdf::class, + [ + $paymentData, + $string, + $scopeConfig, + $filesystem, + $pdfConfig, + $pdfTotalFactory, + $pdfItemsFactory, + $localeMock, + $translate, + $addressRenderer + ], + '', + true, + false, + true, + ['_setFontRegular', '_getPdf'] + ); + + $page = $this->createMock(\Zend_Pdf_Page::class); + $zendFont = $this->createMock(\Zend_Pdf_Font::class); + $zendPdf = $this->createMock(\Zend_Pdf::class); + + // Make sure that the newPage will be called 3 times to correctly break 200 lines into pages + $zendPdf->expects($this->exactly(3))->method('newPage')->willReturn($page); + + $abstractPdfMock->expects($this->once())->method('_setFontRegular')->willReturn($zendFont); + $abstractPdfMock->expects($this->any())->method('_getPdf')->willReturn($zendPdf); + + $reflectionMethod = new \ReflectionMethod(AbstractPdf::class, 'drawLineBlocks'); + + $drawBlockLineData = $this->generateMultilineDrawBlock(200); + $pageSettings = [ + 'table_header' => true + ]; + + $reflectionMethod->invoke($abstractPdfMock, $page, $drawBlockLineData, $pageSettings); + } + + /** + * Generate the array for multiline block + * + * @param int $numberOfLines + * @return array[] + */ + private function generateMultilineDrawBlock(int $numberOfLines): array + { + $lines = []; + for ($x = 0; $x < $numberOfLines; $x++) { + $lines [] = $x; + } + + $block = [ + [ + 'lines' => + [ + [ + [ + 'text' => $lines, + 'feed' => 40 + ] + ] + ], + 'shift' => 5 + ] + ]; + + return $block; + } } From 9fb9ed7c1545fefbee5f6ad70fc8869f82be56e1 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Thu, 8 Dec 2022 15:11:08 -0600 Subject: [PATCH 234/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- .../Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php index 5a92b6ab4e79c..3ce42cf41ee08 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -60,7 +60,7 @@ protected function _prepareCollection() $filter = $this->getParam($this->getVarNameFilter(), []); if ($filter) { $filter = base64_decode($filter); - parse_str(urldecode($filter), $data); + parse_str(($filter), $data); } if (!empty($data)) { From c929f34cb9f2fcda03e4fc90a0c57183c63a03bb Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Fri, 9 Dec 2022 00:40:43 -0600 Subject: [PATCH 235/985] ACP2E-1215: Customer has no any vault token save, but vault payment method appears in admin checkout --- .../Unit/Plugin/PaymentMethodProcessTest.php | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 app/code/Magento/Vault/Test/Unit/Plugin/PaymentMethodProcessTest.php diff --git a/app/code/Magento/Vault/Test/Unit/Plugin/PaymentMethodProcessTest.php b/app/code/Magento/Vault/Test/Unit/Plugin/PaymentMethodProcessTest.php new file mode 100644 index 0000000000000..aa1cc3e02cf10 --- /dev/null +++ b/app/code/Magento/Vault/Test/Unit/Plugin/PaymentMethodProcessTest.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Vault\Test\Unit\Plugin; + +use Magento\Payment\Api\Data\PaymentMethodInterface; +use Magento\Payment\Block\Form\Container; +use Magento\Vault\Model\VaultPaymentInterface; +use Magento\Vault\Plugin\PaymentMethodProcess; +use Magento\Vault\Model\Ui\Adminhtml\TokensConfigProvider; +use Magento\Vault\Model\Ui\TokenUiComponentInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class PaymentMethodProcessTest extends TestCase +{ + /** + * @const string + */ + public const PAYMENT_METHOD_CHECKMO = 'checkmo'; + + /** + * @const string + */ + public const PAYMENT_METHOD_PAYFLOWPRO_CC_VAULT = 'payflowpro_cc_vault'; + + /** + * @var TokensConfigProvider|MockObject + */ + private TokensConfigProvider $tokensConfigProviderMock; + + /** + * @var PaymentMethodProcess + */ + private $subject; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->tokensConfigProviderMock = $this->getMockBuilder(TokensConfigProvider::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->subject = new PaymentMethodProcess($this->tokensConfigProviderMock); + } + + /** + * Test retrieve available payment methods + * + * @param TokenUiComponentInterface|null $tokenInterface + * @param int $availableMethodsCount + * @dataProvider afterGetMethodsDataProvider + */ + public function testAfterGetMethods($tokenInterface, $availableMethodsCount) + { + $checkmoPaymentMethod = $this->getMockBuilder(PaymentMethodInterface::class) + ->disableOriginalConstructor() + ->setMethods(['getCode']) + ->getMockForAbstractClass(); + $checkmoPaymentMethod->expects($this->any())->method('getCode') + ->willReturn(self::PAYMENT_METHOD_CHECKMO); + + $payflowCCVaultTPaymentMethod = $this->getMockBuilder(VaultPaymentInterface::class) + ->disableOriginalConstructor() + ->setMethods(['getCode']) + ->getMockForAbstractClass(); + $payflowCCVaultTPaymentMethod->expects($this->any())->method('getCode') + ->willReturn(self::PAYMENT_METHOD_PAYFLOWPRO_CC_VAULT); + $methods = [$checkmoPaymentMethod, $payflowCCVaultTPaymentMethod]; + $containerMock = $this->getMockBuilder(Container::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->tokensConfigProviderMock->method('getTokensComponents') + ->with(self::PAYMENT_METHOD_PAYFLOWPRO_CC_VAULT) + ->willReturn($tokenInterface); + + $result = $this->subject->afterGetMethods($containerMock, $methods); + $this->assertEquals($availableMethodsCount, count($result)); + } + + /** + * Data Provider + */ + public function afterGetMethodsDataProvider() + { + $tokenUiComponentInterface = $this->getMockBuilder(TokenUiComponentInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + return [ + [null, 1], + [$tokenUiComponentInterface, 2], + ]; + } +} From 8618bd6783b1241c3e6aebb177c394d858bc92d8 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 09:55:05 +0200 Subject: [PATCH 236/985] ACP2E-1388, refactor solution using an interceptor --- app/code/Magento/Bundle/etc/di.xml | 3 ++ .../Model/Indexer/ProductPriceIndexFilter.php | 33 +------------------ .../Magento/CatalogInventory/composer.json | 3 +- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/app/code/Magento/Bundle/etc/di.xml b/app/code/Magento/Bundle/etc/di.xml index c5c4a491234ed..920844964f707 100644 --- a/app/code/Magento/Bundle/etc/di.xml +++ b/app/code/Magento/Bundle/etc/di.xml @@ -96,6 +96,9 @@ <type name="Magento\Sales\Model\Order\Item"> <plugin name="bundle" type="Magento\Bundle\Model\Sales\Order\Plugin\Item" sortOrder="100" /> </type> + <type name="Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter"> + <plugin name="price_modifier" type="Magento\Bundle\Model\Plugin\ProductPriceIndexModifier" sortOrder="100" /> + </type> <type name="Magento\Framework\EntityManager\Operation\ExtensionPool"> <arguments> <argument name="extensionActions" xsi:type="array"> diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php index c215659194392..ee81e667f1e98 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php @@ -121,9 +121,7 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = foreach ($batchSelectIterator as $select) { $productIds = null; foreach ($connection->query($select)->fetchAll() as $row) { - if ($row['product_id'] && - $this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $row['product_id']) - ) { + if ($row['product_id']) { $productIds[] = (int) $row['product_id']; } } @@ -133,33 +131,4 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = } } } - - /** - * Check if the product is part of a dynamic price bundle configuration - * - * @param string $priceTableName - * @param int $productId - * @return bool - */ - private function isWithinDynamicPriceBundle(string $priceTableName, int $productId): bool - { - $connection = $this->resourceConnection->getConnection($this->connectionName); - $select = $connection->select(); - $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); - $select->joinInner( - ['entity' => 'catalog_product_entity'], - implode(' AND ', ['selection.parent_product_id = entity.entity_id']), - null - ); - $select->joinInner( - ['price' => $priceTableName], - implode(' AND ', ['price.entity_id = selection.product_id']), - null - ); - $select->where('selection.product_id = ?', $productId); - $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); - $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); - - return (int) $connection->fetchOne($select) != 0; - } } diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index 2b49b4b1609d5..7ea00923ac715 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -13,8 +13,7 @@ "magento/module-eav": "*", "magento/module-quote": "*", "magento/module-store": "*", - "magento/module-ui": "*", - "magento/module-bundle": "*" + "magento/module-ui": "*" }, "type": "magento2-module", "license": [ From e388c426fec0df17c9d93b409427080f4f95d2ed Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 10:10:48 +0200 Subject: [PATCH 237/985] ACP2E-1388, refactor solution using an interceptor --- .../Plugin/ProductPriceIndexModifier.php | 77 +++++++++++++++++++ .../Model/Indexer/ProductPriceIndexFilter.php | 4 +- 2 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php new file mode 100644 index 0000000000000..95848a4fce603 --- /dev/null +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -0,0 +1,77 @@ +<?php + +namespace Magento\Bundle\Model\Plugin; + +use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; +use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; +use Magento\Framework\App\ResourceConnection; + +class ProductPriceIndexModifier +{ + /** + * @var ResourceConnection + */ + private ResourceConnection $resourceConnection; + + /** + * @var string|null + */ + private ?string $connectionName; + + public function __construct(ResourceConnection $resourceConnection, string $connectionName = 'indexer') + { + $this->resourceConnection = $resourceConnection; + $this->connectionName = $connectionName; + } + + + /** + * Skip entity price index that are part of a dynamic price bundle + * + * @param ProductPriceIndexFilter $subject + * @param callable $proceed + * @param IndexTableStructure $priceTable + * @param array $entityIds + */ + public function aroundModifyPrice(ProductPriceIndexFilter $subject, callable $proceed, IndexTableStructure $priceTable, array $entityIds = []) + { + if (empty($entityIds)) { + $proceed($priceTable, []); + } + + foreach ($entityIds as $id) { + if (!$this->isWithinDynamicPriceBundle($priceTable->getTableName(), $id)) { + $proceed($priceTable, [$id]); + } + } + } + + /** + * Check if the product is part of a dynamic price bundle configuration + * + * @param string $priceTableName + * @param int $productId + * @return bool + */ + private function isWithinDynamicPriceBundle(string $priceTableName, int $productId): bool + { + $connection = $this->resourceConnection->getConnection($this->connectionName); + $select = $connection->select(); + $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); + $select->joinInner( + ['entity' => 'catalog_product_entity'], + implode(' AND ', ['selection.parent_product_id = entity.row_id']), + null + ); + $select->joinInner( + ['price' => $priceTableName], + implode(' AND ', ['price.entity_id = selection.product_id']), + null + ); + $select->where('selection.product_id = ?', $productId); + $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); + $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); + + return (int) $connection->fetchOne($select) != 0; + } +} diff --git a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php index ee81e667f1e98..2b37c9099a0e6 100644 --- a/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php +++ b/app/code/Magento/CatalogInventory/Model/Indexer/ProductPriceIndexFilter.php @@ -121,9 +121,7 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds = foreach ($batchSelectIterator as $select) { $productIds = null; foreach ($connection->query($select)->fetchAll() as $row) { - if ($row['product_id']) { - $productIds[] = (int) $row['product_id']; - } + $productIds[] = (int) $row['product_id']; } if ($productIds !== null) { $where = [$priceTable->getEntityField() .' IN (?)' => $productIds]; From 70789e091f181ba6d9f8276ecb0bdc8cbb790f2c Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 10:18:22 +0200 Subject: [PATCH 238/985] ACP2E-1388, reverted unit test from previous solution --- .../Indexer/ProductPriceIndexFilterTest.php | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php index a00fd08f9e507..a100ebef3af77 100644 --- a/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php +++ b/app/code/Magento/CatalogInventory/Test/Unit/Model/Indexer/ProductPriceIndexFilterTest.php @@ -78,10 +78,13 @@ public function testModifyPrice(): void $entityIds = [1, 2, 3]; $indexTableStructure = $this->createMock(IndexTableStructure::class); $connectionMock = $this->getMockForAbstractClass(AdapterInterface::class); - $this->resourceConnection->expects($this->exactly(6))->method('getConnection')->willReturn($connectionMock); + $this->resourceConnection->expects($this->once())->method('getConnection')->willReturn($connectionMock); $selectMock = $this->createMock(Select::class); - $connectionMock->expects($this->exactly(6))->method('select')->willReturn($selectMock); - + $connectionMock->expects($this->once())->method('select')->willReturn($selectMock); + $selectMock + ->method('where') + ->withConsecutive([], [], ['stock_item.product_id IN (?)', $entityIds]) + ->willReturnOnConsecutiveCalls(null, null, $selectMock); $this->generator->expects($this->once()) ->method('generate') ->willReturnCallback( @@ -96,33 +99,6 @@ public function testModifyPrice(): void $this->productPriceIndexFilter->modifyPrice($indexTableStructure, $entityIds); } - public function testModifyPriceDynamicPriceBundle(): void - { - $indexTableStructure = $this->createMock(IndexTableStructure::class); - $indexTableStructure->expects($this->any())->method('getTableName') - ->willReturn('price_table'); - $this->stockConfiguration->expects($this->once())->method('isShowOutOfStock')->willReturn(false); - $connectionMock = $this->getMockForAbstractClass(AdapterInterface::class); - $this->resourceConnection->expects($this->exactly(2))->method('getConnection')->willReturn($connectionMock); - - $selectMock = $this->createMock(Select::class); - $connectionMock->expects($this->exactly(2))->method('select')->willReturn($selectMock); - $this->generator->expects($this->once()) - ->method('generate') - ->willReturnCallback( - $this->getBatchIteratorCallback($selectMock, 1) - ); - $fetchStmtMock = $this->createPartialMock(\Zend_Db_Statement_Pdo::class, ['fetchAll']); - $fetchStmtMock->expects($this->any()) - ->method('fetchAll') - ->willReturn([['product_id' => 1]]); - $connectionMock->expects($this->any())->method('query')->willReturn($fetchStmtMock); - $connectionMock->expects($this->once())->method('fetchOne')->willReturn(1); - $connectionMock->expects($this->once())->method('delete')->with('price_table', [' IN (?)' => [1]]); - - $this->productPriceIndexFilter->modifyPrice($indexTableStructure); - } - /** * Returns batches. * From cc4b8a7b0ad546d9a90dc08bac208786a10238c4 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 14:38:35 +0200 Subject: [PATCH 239/985] ACP2E-1388, addressed static --- .../Bundle/Model/Plugin/ProductPriceIndexModifier.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 95848a4fce603..c1f2aecb86b2d 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -1,4 +1,9 @@ <?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\Bundle\Model\Plugin; @@ -32,6 +37,7 @@ public function __construct(ResourceConnection $resourceConnection, string $conn * @param callable $proceed * @param IndexTableStructure $priceTable * @param array $entityIds + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundModifyPrice(ProductPriceIndexFilter $subject, callable $proceed, IndexTableStructure $priceTable, array $entityIds = []) { From 2a6253707bd5d8c134adc94670d2c8b521ee931c Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 17:57:10 +0200 Subject: [PATCH 240/985] ACP2E-1388, addressed static --- .../Model/Plugin/ProductPriceIndexModifier.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index c1f2aecb86b2d..c1cc90642378c 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -11,6 +11,9 @@ use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; use Magento\Framework\App\ResourceConnection; +/** + * Checks if product is part of dynamic price bundle and skips price reindex + */ class ProductPriceIndexModifier { /** @@ -23,6 +26,10 @@ class ProductPriceIndexModifier */ private ?string $connectionName; + /** + * @param ResourceConnection $resourceConnection + * @param string $connectionName + */ public function __construct(ResourceConnection $resourceConnection, string $connectionName = 'indexer') { $this->resourceConnection = $resourceConnection; @@ -39,8 +46,12 @@ public function __construct(ResourceConnection $resourceConnection, string $conn * @param array $entityIds * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function aroundModifyPrice(ProductPriceIndexFilter $subject, callable $proceed, IndexTableStructure $priceTable, array $entityIds = []) - { + public function aroundModifyPrice( + ProductPriceIndexFilter $subject, + callable $proceed, + IndexTableStructure $priceTable, + array $entityIds = [] + ) { if (empty($entityIds)) { $proceed($priceTable, []); } @@ -78,6 +89,6 @@ private function isWithinDynamicPriceBundle(string $priceTableName, int $product $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); - return (int) $connection->fetchOne($select) != 0; + return (int)$connection->fetchOne($select) != 0; } } From 5c2441fe6f9e274cd2cd03b6d3ae0bfaff87fedd Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 9 Dec 2022 18:38:54 +0200 Subject: [PATCH 241/985] ACP2E-1388, addressed static --- .../Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index c1cc90642378c..148035ddaed9f 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -36,7 +36,6 @@ public function __construct(ResourceConnection $resourceConnection, string $conn $this->connectionName = $connectionName; } - /** * Skip entity price index that are part of a dynamic price bundle * From 0e6801e9832b1c60aa2ca7baf81a415aed40a879 Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Mon, 12 Dec 2022 12:57:29 +0530 Subject: [PATCH 242/985] ACQE-4233 : Added assertion to check before deleting the agreement the url of page is edit --- .../AdminTermsConditionsDeleteTermByNameActionGroup.xml | 1 + .../AdminTermsConditionsEditTermByNameActionGroup.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml index 9489fece37008..280de82c83c50 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsDeleteTermByNameActionGroup.xml @@ -9,6 +9,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminTermsConditionsDeleteTermByNameActionGroup"> + <seeInCurrentUrl url="checkout/agreement/edit/id/" stepKey="assertEditPage"/> <click selector="{{AdminEditTermFormSection.delete}}" stepKey="clickDeleteButton"/> <waitForElementVisible selector="{{AdminEditTermFormSection.acceptPopupButton}}" stepKey="waitForElement"/> <click selector="{{AdminEditTermFormSection.acceptPopupButton}}" stepKey="clickDeleteOkButton"/> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml index 8f2e65415ac22..fe40a92948cc5 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/ActionGroup/AdminTermsConditionsEditTermByNameActionGroup.xml @@ -13,7 +13,7 @@ <description>Filters Terms and Conditions grid and opens the first result Edit page</description> </annotations> - <click selector="{{AdminTermGridSection.firstRowConditionId}}" stepKey="clickFirstRow"/> + <doubleClick selector="{{AdminTermGridSection.firstRowConditionId}}" stepKey="clickFirstRow"/> <waitForPageLoad stepKey="waitForEditTermPageLoad"/> </actionGroup> </actionGroups> From 1cb153c100cb1a8faf714fe5d44223435a25715c Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 12 Dec 2022 14:27:22 +0530 Subject: [PATCH 243/985] ACQE-4099 | Flaky Test Fix --- .../AdminProductFormConfigurationsSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml index ddb62ea9601a1..22cb822dbe762 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection/AdminProductFormConfigurationsSection.xml @@ -10,7 +10,7 @@ <section name="AdminProductFormConfigurationsSection"> <element name="sectionHeader" type="text" selector=".admin__collapsible-block-wrapper[data-index='configurable']"/> <element name="createdConfigurationsBlock" type="text" selector="div.admin__field.admin__field-wide"/> - <element name="createConfigurations" type="button" selector="button[data-index='create_configurable_products_button']" timeout="30"/> + <element name="createConfigurations" type="button" selector="button[data-index='create_configurable_products_button']" timeout="40"/> <element name="currentVariationsRows" type="button" selector=".data-row"/> <element name="currentVariationsNameCells" type="textarea" selector=".admin__control-fields[data-index='name_container']"/> <element name="currentVariationsSkuCells" type="textarea" selector=".admin__control-fields[data-index='sku_container']"/> From bd801594f7192e6734de7e7deaf978ea625d89bb Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 12 Dec 2022 14:38:38 +0530 Subject: [PATCH 244/985] ACQE-4283 | Fix Flaky test --- .../Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml index cea6a37f6a57f..efb0ab5c8048d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml @@ -19,6 +19,7 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/> <createData entity="_defaultCategory" stepKey="createCategory"/> @@ -117,6 +118,7 @@ <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="logout"/> </after> From c2caf8e377ca9f1d53f07c9453c65c3dccb34341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cengcom-Echo=E2=80=9D?= <engcom-vendorworker-echo@adobe.com> Date: Mon, 12 Dec 2022 15:13:12 +0530 Subject: [PATCH 245/985] Fix typo which trigger performance bug #35216 : Fixed failing integration test --- .../Catalog/Model/ResourceModel/Category/Collection.php | 3 ++- .../Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 6178688dfc81d..56fb7290b81a6 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -556,7 +556,8 @@ private function getProductsCountFromCategoryTable(Category $item, string $websi */ private function getProductsCountQuery(array $categoryIds, $addVisibilityFilter = true): Select { - $categoryTable = $this->getTable('catalog_category_product_index'); + $connections = $this->_resource->getConnection(); + $categoryTable = $connections->getTableName('catalog_category_product_index'); $select = $this->_conn->select() ->from( ['cat_index' => $categoryTable], diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php index d6a70caad1586..5963b74150851 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Checkboxes/TreeTest.php @@ -21,6 +21,7 @@ * * @magentoAppArea adminhtml * @magentoDbIsolation enabled + * @magentoAppIsolation enabled */ class TreeTest extends TestCase { From 6469498fbf1b41b8c4295ead0c0ff97052c150a7 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:20:36 +0530 Subject: [PATCH 246/985] ACQE-4299 | Flaky Test Fix --- .../Mftf/Test/StorefrontVerifyShoppingCartPersistenceTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceTest.xml index daf25eb0dff22..814ca782e28d2 100644 --- a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceTest.xml @@ -85,6 +85,7 @@ <wait time="15" stepKey="waitSometime3" /> <reloadPage stepKey="refreshSessionCookieByPageRefresh3" /> + <waitForPageLoad stepKey="waitForPageLoadToSeeSuccessMessage"/> <actionGroup ref="StorefrontAssertPersistentCustomerWelcomeMessageActionGroup" stepKey="seeWelcomeForJohnDoeCustomer"> <argument name="customerFullName" value="{{John_Smith_Customer.fullname}}"/> From 8e51695e29999adaa8229044b0a498b37bc25d11 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Mon, 12 Dec 2022 18:06:09 +0530 Subject: [PATCH 247/985] ACQE-4030 added a wait and scrolltoTop page --- ...refrontCustomerCheckProductInWishlistSidebarActionGroup.xml | 3 ++- ...merCheckConfigurableProductInWishlistSidebarActionGroup.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerCheckProductInWishlistSidebarActionGroup.xml b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerCheckProductInWishlistSidebarActionGroup.xml index f7da73bd4baa9..59f9c5416526b 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerCheckProductInWishlistSidebarActionGroup.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerCheckProductInWishlistSidebarActionGroup.xml @@ -15,7 +15,8 @@ <arguments> <argument name="productVar"/> </arguments> - + <wait time="10" stepKey="waitForMessageToPopulate"/> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> <waitForElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistSidebarProductName"/> <waitForText userInput="${{productVar.price}}.00" selector="{{StorefrontCustomerWishlistSidebarSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductPrice"/> <waitForElementVisible selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistSidebarAddToCart"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/ConfigurableProductWishlist/ActionGroup/StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/ConfigurableProductWishlist/ActionGroup/StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup.xml index 604e97bf0a515..e3d74220bf06a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/ConfigurableProductWishlist/ActionGroup/StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/ConfigurableProductWishlist/ActionGroup/StorefrontCustomerCheckConfigurableProductInWishlistSidebarActionGroup.xml @@ -17,7 +17,8 @@ <argument name="productVar"/> <argument name="optionProductVar"/> </arguments> - + <wait time="10" stepKey="waitForMessageToPopulate"/> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> <waitForElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductTitleByName(productVar.name)}}" time="30" stepKey="assertWishlistSidebarProductName"/> <see userInput="${{optionProductVar.price}}.00" selector="{{StorefrontCustomerWishlistSidebarSection.ProductPriceByName(productVar.name)}}" stepKey="AssertWishlistSidebarProductPrice"/> <seeElement selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(productVar.name)}}" stepKey="AssertWishlistSidebarAddToCart"/> From eeac301b69f69ccb38b39c6f33f99fcc02179733 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 12 Dec 2022 19:33:49 +0200 Subject: [PATCH 248/985] ACP2E-1388, added cast --- .../Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 148035ddaed9f..0cac6f8fe54b0 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -56,7 +56,7 @@ public function aroundModifyPrice( } foreach ($entityIds as $id) { - if (!$this->isWithinDynamicPriceBundle($priceTable->getTableName(), $id)) { + if (!$this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $id)) { $proceed($priceTable, [$id]); } } From 1abca0bd06857c4fb02fb9d64587563c890afc36 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Mon, 12 Dec 2022 17:00:56 -0600 Subject: [PATCH 249/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- .../Adminhtml/Shopcart/Abandoned/Grid.php | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php index 3ce42cf41ee08..ff0fb76454849 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -5,6 +5,10 @@ */ namespace Magento\Reports\Block\Adminhtml\Shopcart\Abandoned; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Stdlib\Parameters; +use Magento\Framework\Url\DecoderInterface; + /** * Adminhtml abandoned shopping carts report grid block * @@ -15,6 +19,16 @@ */ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart { + /** + * @var DecoderInterface + */ + private $urlDecoder; + + /** + * @var Parameters + */ + private $parameters; + /** * @var \Magento\Reports\Model\ResourceModel\Quote\CollectionFactory */ @@ -24,16 +38,22 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\Shopcart * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Reports\Model\ResourceModel\Quote\CollectionFactory $quotesFactory + * @param DecoderInterface|null $urlDecoder + * @param Parameters|null $parameters * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, \Magento\Reports\Model\ResourceModel\Quote\CollectionFactory $quotesFactory, + DecoderInterface $urlDecoder = null, + Parameters $parameters = null, array $data = [] ) { $this->_quotesFactory = $quotesFactory; parent::__construct($context, $backendHelper, $data); + $this->urlDecoder = $urlDecoder ?? ObjectManager::getInstance()->get(DecoderInterface::class); + $this->parameters = $parameters ?? ObjectManager::getInstance()->get(Parameters::class); } /** @@ -59,8 +79,13 @@ protected function _prepareCollection() $filter = $this->getParam($this->getVarNameFilter(), []); if ($filter) { - $filter = base64_decode($filter); - parse_str(($filter), $data); + // this is a replacement for base64_decode() + $filter = $this->urlDecoder->decode($filter); + + // this is a replacement for parse_str() + // does not need urldecode() as double decoding will occur and '+' will be lost + $this->parameters->fromString($filter); + $data = $this->parameters->toArray(); } if (!empty($data)) { From c8de3a1043a0bef65cde54b331ee2a5210665a06 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 13 Dec 2022 14:39:48 +0200 Subject: [PATCH 250/985] ACP2E-1388, removed bundle product type check --- .../Bundle/Model/Plugin/ProductPriceIndexModifier.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 0cac6f8fe54b0..2576a81be9fd5 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -74,18 +74,12 @@ private function isWithinDynamicPriceBundle(string $priceTableName, int $product $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); - $select->joinInner( - ['entity' => 'catalog_product_entity'], - implode(' AND ', ['selection.parent_product_id = entity.row_id']), - null - ); $select->joinInner( ['price' => $priceTableName], implode(' AND ', ['price.entity_id = selection.product_id']), null ); $select->where('selection.product_id = ?', $productId); - $select->where('entity.type_id = ?', \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE); $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); return (int)$connection->fetchOne($select) != 0; From 5cab27564b680b1a8fae8e31c6b8a26fb69502f6 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 14 Dec 2022 10:15:44 +0200 Subject: [PATCH 251/985] ACP2E-1388, improved performance and added unit tests --- .../Plugin/ProductPriceIndexModifier.php | 7 +- .../Plugin/ProductPriceIndexModifierTest.php | 109 ++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 2576a81be9fd5..2ea345a501d49 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -55,11 +55,16 @@ public function aroundModifyPrice( $proceed($priceTable, []); } + $filteredEntities = []; foreach ($entityIds as $id) { if (!$this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $id)) { - $proceed($priceTable, [$id]); + $filteredEntities[] = $id; } } + + if (!empty($filteredEntities)) { + $proceed($priceTable, $filteredEntities); + } } /** diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php new file mode 100644 index 0000000000000..e8b97b6a5c81b --- /dev/null +++ b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Bundle\Test\Unit\Model\Plugin; + +use Magento\Bundle\Model\Plugin\ProductPriceIndexModifier; +use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; +use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\DB\Select; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class ProductPriceIndexModifierTest extends TestCase +{ + private const CONNECTION_NAME = 'indexer'; + + /** + * @var ResourceConnection|MockObject + */ + private ResourceConnection $resourceConnection; + + /** + * @var ProductPriceIndexModifier + */ + private ProductPriceIndexModifier $plugin; + + /** + * @var IndexTableStructure|MockObject + */ + private IndexTableStructure $table; + + /** + * @var ProductPriceIndexFilter|MockObject + */ + private ProductPriceIndexFilter $subject; + + protected function setUp(): void + { + $this->table = $this->createMock(IndexTableStructure::class); + $this->subject = $this->createMock(ProductPriceIndexFilter::class); + $this->resourceConnection = $this->createMock(ResourceConnection::class); + $this->plugin = new ProductPriceIndexModifier($this->resourceConnection, self::CONNECTION_NAME); + } + + public function testAroundModifyPriceNoEntities(): void + { + $called = false; + $callable = function () use (&$called) { + $called = true; + }; + + $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table); + $this->assertTrue($called); + } + + public function testAroundModifyPriceFilteredEntities() + { + $priceTableName = 'catalog_product_index_price_temp'; + $entities = [1, 2]; + $this->table->expects($this->exactly(2)) + ->method('getTableName') + ->willReturn($priceTableName); + $select = $this->createMock(Select::class); + $select->expects($this->exactly(2)) + ->method('from') + ->with(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); + $select->expects($this->exactly(2)) + ->method('joinInner') + ->with(['price' => $priceTableName], + implode(' AND ', ['price.entity_id = selection.product_id']), + null); + $select->expects($this->exactly(4)) + ->method('where') + ->withConsecutive( + ['selection.product_id = ?', $entities[0]], + ['price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC], + ['selection.product_id = ?', $entities[1]], + ['price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC] + ); + $connection = $this->createMock(AdapterInterface::class); + $connection->expects($this->exactly(2)) + ->method('select') + ->willReturn($select); + $connection->expects($this->exactly(2)) + ->method('fetchOne') + ->with($select) + ->willReturn(null); + $this->resourceConnection->expects($this->exactly(2)) + ->method('getConnection') + ->with(self::CONNECTION_NAME) + ->willReturn($connection); + + $calledPriceTable = ''; + $calledEntities = []; + $callable = function () use (&$calledPriceTable, &$calledEntities, $priceTableName, $entities) { + $calledPriceTable = $priceTableName; + $calledEntities = $entities; + }; + $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table, [1, 2]); + $this->assertSame($calledPriceTable, $priceTableName); + $this->assertSame($calledEntities, $entities); + } +} From 51e1086414b6e2de08164e418474e0ddd615ebdf Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 14 Dec 2022 11:41:01 +0200 Subject: [PATCH 252/985] ACP2E-1388, fixed static --- .../Unit/Model/Plugin/ProductPriceIndexModifierTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php index e8b97b6a5c81b..852fbc5e8eb78 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php @@ -72,9 +72,11 @@ public function testAroundModifyPriceFilteredEntities() ->with(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); $select->expects($this->exactly(2)) ->method('joinInner') - ->with(['price' => $priceTableName], + ->with( + ['price' => $priceTableName], implode(' AND ', ['price.entity_id = selection.product_id']), - null); + null + ); $select->expects($this->exactly(4)) ->method('where') ->withConsecutive( From 9002f59106e66ffa973c6b33c418af71b8acd2cd Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 14 Dec 2022 16:17:45 +0530 Subject: [PATCH 253/985] Update AdminLoginAsCustomerManualChooseFromOrderPageTest.xml --- .../AdminLoginAsCustomerManualChooseFromOrderPageTest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml index ba8e5cddd47b7..eee65c87ed2a8 100644 --- a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml +++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml @@ -20,6 +20,8 @@ <group value="login_as_customer"/> </annotations> <before> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createCustomer"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct"> @@ -47,6 +49,8 @@ <magentoCron groups="index" stepKey="reindex"/> </before> <after> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStore"> <argument name="storeGroupName" value="customStoreGroup.name"/> </actionGroup> From 617c3ac16a1d441b96028b629ac7f428899535ca Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 14 Dec 2022 16:26:08 +0530 Subject: [PATCH 254/985] Update StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml --- ...ApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml index a616a7ab172f1..9b11b3a264fdb 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml @@ -20,6 +20,8 @@ <group value="catalog"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="_defaultProduct" stepKey="createProduct1"> <requiredEntity createDataKey="createCategory"/> @@ -47,6 +49,8 @@ <magentoCron groups="index" stepKey="fixInvalidatedIndicesBeforeTest"/> </before> <after> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <!-- Delete products and category --> <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> From 5397957795524ce75e65a2d1c92c2143fc0ba67b Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 14 Dec 2022 21:18:27 +0530 Subject: [PATCH 255/985] Update StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml --- ...ApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml index 9b11b3a264fdb..a616a7ab172f1 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontApplyCatalogRuleForSimpleProductsWithCustomOptionsTest.xml @@ -20,8 +20,6 @@ <group value="catalog"/> </annotations> <before> - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> - <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="_defaultProduct" stepKey="createProduct1"> <requiredEntity createDataKey="createCategory"/> @@ -49,8 +47,6 @@ <magentoCron groups="index" stepKey="fixInvalidatedIndicesBeforeTest"/> </before> <after> - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> - <!-- Delete products and category --> <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> From 49cd9798c988a211828c8cc73f6b4ca9fd9a153a Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 14 Dec 2022 21:19:35 +0530 Subject: [PATCH 256/985] Update AdminLoginAsCustomerManualChooseFromOrderPageTest.xml --- .../AdminLoginAsCustomerManualChooseFromOrderPageTest.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml index eee65c87ed2a8..ba8e5cddd47b7 100644 --- a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml +++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerManualChooseFromOrderPageTest.xml @@ -20,8 +20,6 @@ <group value="login_as_customer"/> </annotations> <before> - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> - <createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createCustomer"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct"> @@ -49,8 +47,6 @@ <magentoCron groups="index" stepKey="reindex"/> </before> <after> - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> - <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStore"> <argument name="storeGroupName" value="customStoreGroup.name"/> </actionGroup> From 4586a23344482cfec664d412cfc711e1c5c23d2c Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Wed, 14 Dec 2022 11:27:03 -0800 Subject: [PATCH 257/985] ACP2E-1415: Error when creating a schedule change for product --- .../Checkout/Model/GuestShippingInformationManagement.php | 4 ++-- .../Unit/Model/GuestShippingInformationManagementTest.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php b/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php index b1194a25ab548..e7d0cb98e2809 100644 --- a/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/GuestShippingInformationManagement.php @@ -31,7 +31,7 @@ public function __construct( } /** - * {@inheritDoc} + * @inheritDoc */ public function saveAddressInformation( $cartId, @@ -40,7 +40,7 @@ public function saveAddressInformation( /** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */ $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->shippingInformationManagement->saveAddressInformation( - $quoteIdMask->getQuoteId(), + (int) $quoteIdMask->getQuoteId(), $addressInformation ); } diff --git a/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php b/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php index 7fe8eced6eda1..a3bb07600d5c2 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php @@ -57,7 +57,7 @@ protected function setUp(): void public function testSaveAddressInformation() { $cartId = 'masked_id'; - $quoteId = 100; + $quoteId = '100'; $addressInformationMock = $this->getMockForAbstractClass(ShippingInformationInterface::class); $quoteIdMaskMock = $this->getMockBuilder(QuoteIdMask::class) @@ -73,7 +73,9 @@ public function testSaveAddressInformation() $paymentInformationMock = $this->getMockForAbstractClass(PaymentDetailsInterface::class); $this->shippingInformationManagementMock->expects($this->once()) ->method('saveAddressInformation') - ->with($quoteId, $addressInformationMock) + ->with( + self::callback(fn($actualQuoteId): bool => (int) $quoteId === $actualQuoteId), $addressInformationMock + ) ->willReturn($paymentInformationMock); $this->model->saveAddressInformation($cartId, $addressInformationMock); From 81c39f5a64a6d3e6da28a9ee3535599b0bd8c59c Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Wed, 14 Dec 2022 13:31:47 -0600 Subject: [PATCH 258/985] ACP2E-1381: Different behaviors on snake_case formatting --- .../Framework/Api/DataObjectHelperTest.php | 59 +++++++++++++++++++ .../Framework/Api/Fixture/DataObject.php | 34 +++++++++++ .../Api/Fixture/DataObjectInterface.php | 35 +++++++++++ .../Api/SimpleDataObjectConverterTest.php | 53 +++++++++++++++++ .../Framework/Api/DataObjectHelper.php | 4 +- .../Api/SimpleDataObjectConverter.php | 2 +- 6 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Api/DataObjectHelperTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/DataObjectHelperTest.php b/dev/tests/integration/testsuite/Magento/Framework/Api/DataObjectHelperTest.php new file mode 100644 index 0000000000000..e6e5883293569 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/DataObjectHelperTest.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Api; + +use Magento\Framework\Api\Fixture\DataObjectInterface; +use Magento\Framework\Api\Fixture\DataObjectFactory; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +class DataObjectHelperTest extends TestCase +{ + /** + * @var DataObjectHelper + */ + private $dataObjectHelper; + + /** + * @var DataObjectFactory + */ + private $dataObjectFactory; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->dataObjectHelper = Bootstrap::getObjectManager()->get(DataObjectHelper::class); + $this->dataObjectFactory = Bootstrap::getObjectManager()->get(DataObjectFactory::class); + } + + /** + * Test object is populated with data from array. + * + * @return void + */ + public function testPopulateWithArray(): void + { + $inputArray = [ + 'first_a_second' => '1', + 'first_at_second' => '1', + 'first_a_t_m_second' => '1', + 'random_attribute' => 'random' + ]; + $expectedData = [ + 'first_a_second' => '1', + 'first_at_second' => '1', + 'first_a_t_m_second' => '1', + ]; + $object = $this->dataObjectFactory->create(); + $this->dataObjectHelper->populateWithArray($object, $inputArray, DataObjectInterface::class); + $this->assertEquals($expectedData, $object->getData()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php new file mode 100644 index 0000000000000..2f3b9b75c9a0f --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php @@ -0,0 +1,34 @@ +<?php + +declare(strict_types=1); + +namespace Magento\Framework\Api\Fixture; + +use Magento\Framework\Model\AbstractExtensibleModel; + +class DataObject extends AbstractExtensibleModel implements DataObjectInterface +{ + /** + * @inheritDoc + */ + public function setFirstASecond(string $value): void + { + $this->setData('first_a_second', $value); + } + + /** + * @inheritDoc + */ + public function setFirstAtSecond(string $value): void + { + $this->setData('first_at_second', $value); + } + + /** + * @inheritDoc + */ + public function setFirstATMSecond(string$value): void + { + $this->setData('first_a_t_m_second', $value); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php new file mode 100644 index 0000000000000..5750cb5e64869 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace Magento\Framework\Api\Fixture; + +interface DataObjectInterface +{ + /** + * Set A + * + * @param string $value + * + * @return void + */ + public function setFirstASecond(string $value): void; + + /** + * Set At + * + * @param string $value + * + * @return void + */ + public function setFirstAtSecond(string $value): void; + + /** + * Set ATM + * + * @param string $value + * + * @return void + */ + public function setFirstATMSecond(string $value): void; +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php b/dev/tests/integration/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php new file mode 100644 index 0000000000000..0e9064005e850 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php @@ -0,0 +1,53 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Api; + +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +class SimpleDataObjectConverterTest extends TestCase +{ + /** + * @var SimpleDataObjectConverter + */ + private $simpleDataObjectConverter; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->simpleDataObjectConverter = Bootstrap::getObjectManager()->get(SimpleDataObjectConverter::class); + } + + /** + * Test snake case to camel case conversion and vice versa. + * + * @return void + */ + public function testCaseConversion(): void + { + $snakeCaseToCamelCase = [ + 'first_a_second' => 'firstASecond', + 'first_at_second' => 'firstAtSecond', + 'first_a_t_m_second' => 'firstATMSecond', + ]; + + foreach ($snakeCaseToCamelCase as $snakeCase => $camelCase) { + $this->assertEquals( + $camelCase, + $this->simpleDataObjectConverter->snakeCaseToCamelCase($snakeCase) + ); + $this->assertEquals( + $snakeCase, + $this->simpleDataObjectConverter->camelCaseToSnakeCase($camelCase) + ); + } + } +} diff --git a/lib/internal/Magento/Framework/Api/DataObjectHelper.php b/lib/internal/Magento/Framework/Api/DataObjectHelper.php index 6d3fbcaca9db5..27c1e46e3815d 100644 --- a/lib/internal/Magento/Framework/Api/DataObjectHelper.php +++ b/lib/internal/Magento/Framework/Api/DataObjectHelper.php @@ -305,8 +305,8 @@ private function getSetters(object $dataObject): array // (2) remove set_ in start of name // (3) add name without is_ prefix preg_replace( - ['/(^|,)(?!set)[^,]*/S','/(.)([A-Z])/S', '/(^|,)set_/iS', '/(^|,)is_([^,]+)/is'], - ['', '$1_$2', '$1', '$1$2,is_$2'], + ['/(^|,)(?!set)[^,]*/S','/([A-Z])/S', '/(^|,)set_/iS', '/(^|,)is_([^,]+)/is'], + ['', '_$1', '$1', '$1$2,is_$2'], implode(',', $dataObjectMethods) ) ) diff --git a/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php b/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php index 5c95f83cb4a02..e2384a1c56088 100644 --- a/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php +++ b/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php @@ -172,6 +172,6 @@ public static function snakeCaseToCamelCase($input) */ public static function camelCaseToSnakeCase($name) { - return $name !== null ? strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name)) : ''; + return $name !== null ? strtolower(ltrim(preg_replace('/([A-Z])/m', "_$1", $name), '_')) : ''; } } From cc40088e5090583341b44b495287353b3735922e Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Wed, 14 Dec 2022 14:13:42 -0600 Subject: [PATCH 259/985] ACP2E-1381: Different behaviors on snake_case formatting --- .../testsuite/Magento/Framework/Api/Fixture/DataObject.php | 5 ++++- .../Magento/Framework/Api/Fixture/DataObjectInterface.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php index 2f3b9b75c9a0f..4ab973e33c1c1 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObject.php @@ -1,5 +1,8 @@ <?php - +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ declare(strict_types=1); namespace Magento\Framework\Api\Fixture; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php index 5750cb5e64869..14756bf193c8b 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Fixture/DataObjectInterface.php @@ -1,5 +1,8 @@ <?php - +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ declare(strict_types=1); namespace Magento\Framework\Api\Fixture; From 13b4dd55d2a9424d9f0860a2d27829a5d7bbc751 Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Wed, 14 Dec 2022 12:30:18 -0800 Subject: [PATCH 260/985] ACP2E-1415: Error when creating a schedule change for product --- .../Test/Unit/Model/GuestShippingInformationManagementTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php b/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php index a3bb07600d5c2..c12cbdec2828c 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/GuestShippingInformationManagementTest.php @@ -74,7 +74,8 @@ public function testSaveAddressInformation() $this->shippingInformationManagementMock->expects($this->once()) ->method('saveAddressInformation') ->with( - self::callback(fn($actualQuoteId): bool => (int) $quoteId === $actualQuoteId), $addressInformationMock + self::callback(fn($actualQuoteId): bool => (int) $quoteId === $actualQuoteId), + $addressInformationMock ) ->willReturn($paymentInformationMock); From 9f6a435b4b2d494d252d954188c55ecf2bb0292a Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 15 Dec 2022 15:20:34 +0530 Subject: [PATCH 261/985] Update StorefrontOrderPagerDisplayedTest.xml --- .../Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml index efb0ab5c8048d..cea6a37f6a57f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml @@ -19,7 +19,6 @@ <group value="mtf_migrated"/> </annotations> <before> - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LoginAsAdmin"/> <createData entity="_defaultCategory" stepKey="createCategory"/> @@ -118,7 +117,6 @@ <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="logout"/> </after> From f6c0ae7521804a811aa70e40f1acd8d1b2e4134c Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 15 Dec 2022 10:32:35 -0600 Subject: [PATCH 262/985] ACP2E-1401: catalog_product_price index getting stuck --- .../Action/RowDefaultPriceIndexerTest.php | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php new file mode 100644 index 0000000000000..1d2c412783ce3 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php @@ -0,0 +1,196 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Model\Indexer\Product\Price\Action; + +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Search\Request\Dimension; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Directory\Model\CurrencyFactory; +use Magento\Catalog\Model\Product\Type; +use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\Factory; +use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice; +use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\TierPrice; +use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory; +use Magento\Catalog\Model\Indexer\Product\Price\TableMaintainer; +use Magento\Catalog\Model\Indexer\Product\Price\Action\Row; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\Stdlib\DateTime\TimezoneInterface; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\DB\Select; +use Magento\Framework\Indexer\MultiDimensionProvider; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\MockObject; + +class RowDefaultPriceIndexerTest extends TestCase +{ + /** + * @var Row + */ + private $actionRow; + + /** + * @var ScopeConfigInterface|MockObject + */ + private $config; + + /** + * @var StoreManagerInterface|MockObject + */ + private $storeManager; + + /** + * @var CurrencyFactory|MockObject + */ + private $currencyFactory; + + /** + * @var TimezoneInterface|MockObject + */ + private $localeDate; + + /** + * @var DateTime|MockObject + */ + private $dateTime; + + /** + * @var Type|MockObject + */ + private $catalogProductType; + + /** + * @var Factory|MockObject + */ + private $indexerPriceFactory; + + /** + * @var DefaultPrice|MockObject + */ + private $defaultIndexerResource; + + /** + * @var TierPrice|MockObject + */ + private $tierPriceIndexResource; + + /** + * @var DimensionCollectionFactory|MockObject + */ + private $dimensionCollectionFactory; + + /** + * @var TableMaintainer|MockObject + */ + private $tableMaintainer; + + protected function setUp(): void + { + $this->config = $this->createMock(ScopeConfigInterface::class); + $this->storeManager = $this->createMock(StoreManagerInterface::class); + $this->currencyFactory = $this->createMock(CurrencyFactory::class); + $this->localeDate = $this->createMock(TimezoneInterface::class); + $this->dateTime = $this->createMock(DateTime::class); + $this->catalogProductType = $this->createMock(Type::class); + $this->indexerPriceFactory = $this->createMock(Factory::class); + $this->defaultIndexerResource = $this->createMock(DefaultPrice::class); + $this->tierPriceIndexResource = $this->createMock(TierPrice::class); + $this->dimensionCollectionFactory = $this->createMock(DimensionCollectionFactory::class); + $this->tableMaintainer = $this->createMock(TableMaintainer::class); + + $this->actionRow = new Row( + $this->config, + $this->storeManager, + $this->currencyFactory, + $this->localeDate, + $this->dateTime, + $this->catalogProductType, + $this->indexerPriceFactory, + $this->defaultIndexerResource, + $this->tierPriceIndexResource, + $this->dimensionCollectionFactory, + $this->tableMaintainer + ); + } + + /** + * Test that the price indexer will be able to perform the indexation with DefaultPrice indexer + * + * @return void + * @throws InputException + * @throws LocalizedException + */ + public function testRowDefaultPriceIndexer() + { + $select = $this->createMock(Select::class); + $select->method('from')->willReturnSelf(); + $select->method('joinLeft')->willReturnSelf(); + $select->method('where')->willReturnSelf(); + $select->method('join')->willReturnSelf(); + + $adapter = $this->createMock(AdapterInterface::class); + $adapter->method('select')->willReturn($select); + $adapter->method('describeTable')->willReturn([]); + + $adapter->expects($this->exactly(1)) + ->method('describeTable'); + + $this->tableMaintainer->expects($this->exactly(3))->method('getMainTableByDimensions'); + + $this->defaultIndexerResource->method('getConnection')->willReturn($adapter); + $adapter->method('fetchAll')->with($select)->willReturn([]); + + $adapter->expects($this->any()) + ->method('fetchPairs') + ->with($select) + ->willReturn( + [1 => 'simple'], + [] + ); + + $multiDimensionProvider = $this->createMock(MultiDimensionProvider::class); + $this->dimensionCollectionFactory->expects($this->exactly(2)) + ->method('create') + ->willReturn($multiDimensionProvider); + $dimension = $this->createMock(Dimension::class); + $dimension->method('getName')->willReturn('default'); + $dimension->method('getValue')->willReturn('0'); + $iterator = new \ArrayIterator([[$dimension]]); + $multiDimensionProvider->expects($this->exactly(2)) + ->method('getIterator') + ->willReturn($iterator); + $this->catalogProductType->expects($this->once()) + ->method('getTypesByPriority') + ->willReturn( + [ + 'simple' => ['price_indexer' => '\Price\Indexer'] + ] + ); + $this->indexerPriceFactory->expects($this->exactly(1)) + ->method('create') + ->with('\Price\Indexer', ['fullReindexAction' => false]) + ->willReturn($this->defaultIndexerResource); + $this->defaultIndexerResource->expects($this->exactly(1)) + ->method('reindexEntity'); + $this->defaultIndexerResource->expects($this->any())->method('setTypeId')->willReturnSelf(); + $this->defaultIndexerResource->expects($this->any())->method('setIsComposite'); + $select->expects($this->exactly(1)) + ->method('deleteFromSelect') + ->with('index_price') + ->willReturn(''); + $adapter->expects($this->exactly(2)) + ->method('getIndexList') + ->willReturn(['entity_id'=>['COLUMNS_LIST'=>['test']]]); + $adapter->expects($this->exactly(2)) + ->method('getPrimaryKeyName') + ->willReturn('entity_id'); + + $this->actionRow->execute(1); + } +} From 0ac7768e02308173ce6f73226ead38d9053c70b0 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 15 Dec 2022 12:55:37 -0600 Subject: [PATCH 263/985] ACP2E-1401: catalog_product_price index getting stuck --- .../Product/Price/Action/RowDefaultPriceIndexerTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php index 1d2c412783ce3..f77df110ba9ad 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Price/Action/RowDefaultPriceIndexerTest.php @@ -28,6 +28,9 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\MockObject\MockObject; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class RowDefaultPriceIndexerTest extends TestCase { /** From e2303abdfee5c70e9c2fc35c1e0a4ef883353320 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Thu, 15 Dec 2022 17:28:08 -0600 Subject: [PATCH 264/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- ...sAbandonedCartsSearchEmailWithPlusTest.xml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml new file mode 100644 index 0000000000000..87da9c23924ac --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminReportsAbandonedCartsSearchEmailWithPlusTest"> + <annotations> + <features value="Reports"/> + <stories value="Search in Grid"/> + <title value="Admin Reports Abandoned Carts Search Email With Plus"/> + <description value="Admin should be able to search for email that contains plus > Abandoned Carts"/> + <severity value="AVERAGE"/> + <testCaseId value="ACP2E-1435"/> + <group value="reports"/> + </annotations> + <before> + <!-- Create Category and Product --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createProduct" /> + + <!-- Create Customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"> + <field key="email">John+Doe@example.com</field> + </createData> + + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <!-- Delete created Product, Category and Customer --> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Login as a Customer on Storefront --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomerToStorefront"> + <argument name="Customer" value="$createCustomer$"/> + </actionGroup> + + <!-- Open product and add product to cart--> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory"> + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> + <argument name="product" value="$createProduct$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Open Abandoned carts report in Admin --> + <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/> + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAbandonedCartsPage"> + <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuReportsMarketingAbandonedCarts.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle"> + <argument name="title" value="{{AdminMenuReportsMarketingAbandonedCarts.pageTitle}}"/> + </actionGroup> + </test> +</tests> From eff28cba70c7f5dcc39feef0c987ccb3e8631809 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Thu, 15 Dec 2022 17:39:31 -0600 Subject: [PATCH 265/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- .../Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php index ff0fb76454849..2fb1ab26ac074 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Shopcart/Abandoned/Grid.php @@ -83,7 +83,6 @@ protected function _prepareCollection() $filter = $this->urlDecoder->decode($filter); // this is a replacement for parse_str() - // does not need urldecode() as double decoding will occur and '+' will be lost $this->parameters->fromString($filter); $data = $this->parameters->toArray(); } From cf3e947890c6663cca0fdebf762d68ea7228e681 Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Thu, 15 Dec 2022 23:47:27 -0600 Subject: [PATCH 266/985] ACP2E-1417: [GraphQL] Customer cannot proceed with purchase when items in cart get out of stock - add test --- .../QuoteConfigurableProductInCartTest.php | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/QuoteConfigurableProductInCartTest.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/QuoteConfigurableProductInCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/QuoteConfigurableProductInCartTest.php new file mode 100644 index 0000000000000..a4a0cb4f80981 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/QuoteConfigurableProductInCartTest.php @@ -0,0 +1,153 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Quote; + +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\ConfigurableProduct\Test\Fixture\AddProductToCart as AddConfigurableProductToCartFixture; +use Magento\ConfigurableProduct\Test\Fixture\Attribute as AttributeFixture; +use Magento\ConfigurableProduct\Test\Fixture\Product as ConfigurableProductFixture; +use Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface; +use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Configurable product in cart testcases + */ +class QuoteConfigurableProductInCartTest extends GraphQlAbstract +{ + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @var QuoteIdToMaskedQuoteIdInterface + */ + private $quoteIdToMaskedQuoteIdInterface; + + /** + * @var \Magento\Catalog\Model\ProductRepository + */ + private $productRepository; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $objectManager = Bootstrap::getObjectManager(); + $this->fixtures = $objectManager->get(DataFixtureStorageManager::class)->getStorage(); + $this->quoteIdToMaskedQuoteIdInterface = $objectManager->get(QuoteIdToMaskedQuoteIdInterface::class); + $this->productRepository = $objectManager->get(\Magento\Catalog\Model\ProductRepository::class); + } + + #[ + DataFixture(ProductFixture::class, as: 'p1'), + DataFixture(ProductFixture::class, as: 'p2'), + DataFixture(AttributeFixture::class, as: 'attr'), + DataFixture( + ConfigurableProductFixture::class, + ['_options' => ['$attr$'], '_links' => ['$p1$', '$p2$']], + 'cp1' + ), + DataFixture(GuestCartFixture::class, as: 'cart'), + DataFixture( + AddConfigurableProductToCartFixture::class, + ['cart_id' => '$cart.id$', 'product_id' => '$cp1.id$', 'child_product_id' => '$p1.id$', 'qty' => 1], + ), + ] + public function testConfigurableProductInCartAfterGoesOutOfStock() + { + $product1 = $this->fixtures->get('p1'); + $product1 = $this->productRepository->get($product1->getSku(), true); + $stockItem = $product1->getExtensionAttributes()->getStockItem(); + $stockItem->setQty(0); + $stockItem->setIsInStock(false); + $this->productRepository->save($product1); + + $product2 = $this->fixtures->get('p2'); + $product2 = $this->productRepository->get($product2->getSku(), true); + $stockItem = $product2->getExtensionAttributes()->getStockItem(); + $stockItem->setQty(0); + $stockItem->setIsInStock(false); + $this->productRepository->save($product2); + $cart = $this->fixtures->get('cart'); + $maskedQuoteId = $this->quoteIdToMaskedQuoteIdInterface->execute((int)$cart->getId()); + + $query = <<<'QUERY' +query GetCartDetails($cartId: String!) { + cart(cart_id: $cartId) { + id + items { + uid + product { + uid + name + sku + stock_status + price_range { + minimum_price { + final_price { + currency + value + } + regular_price { + currency + value + } + } + maximum_price { + final_price { + currency + value + } + regular_price { + currency + value + } + } + } + } + prices { + price { + currency + value + } + } + } + } +} +QUERY; + + $variables = [ + 'cartId' => $maskedQuoteId + ]; + + $response = $this->graphQlQuery($query, $variables); + $this->assertEquals($maskedQuoteId, $response['cart']['id'], 'Assert that correct quote is queried'); + $this->assertEquals( + 'OUT_OF_STOCK', + $response['cart']['items'][0]['product']['stock_status'], + 'Assert product is out of stock' + ); + $this->assertEquals( + 0, + $response['cart']['items'][0]['product']['price_range']['minimum_price']['final_price']['value'], + 'Assert that minimum price equals to 0' + ); + $this->assertEquals( + 0, + $response['cart']['items'][0]['product']['price_range']['maximum_price']['final_price']['value'], + 'Assert that maximum price equals to 0' + ); + } +} From a78069d8c821e76ad6bb94ee92cd3fd97013b5ab Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Fri, 16 Dec 2022 00:03:12 -0600 Subject: [PATCH 267/985] ACP2E-1195: Coupon code curl /Api rest call not returning all fields - fix - add test --- .../Controller/Adminhtml/Promo/Quote/Save.php | 21 +++++- .../SalesRule/Model/ResourceModel/Coupon.php | 33 +++++++++ .../Magento/SalesRule/Model/CouponTest.php | 67 +++++++++++++++++++ 3 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/SalesRule/Model/CouponTest.php diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php index e407142e6893a..a0d3977ba83da 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php @@ -93,7 +93,6 @@ public function execute() } $session = $this->_objectManager->get(\Magento\Backend\Model\Session::class); - $validateResult = $model->validateData(new \Magento\Framework\DataObject($data)); if ($validateResult !== true) { foreach ($validateResult as $errorMessage) { @@ -120,13 +119,14 @@ public function execute() $data['actions'] = $data['rule']['actions']; } unset($data['rule']); + + $data = $this->updateCouponData($data); $model->loadPost($data); $useAutoGeneration = (int)( !empty($data['use_auto_generation']) && $data['use_auto_generation'] !== 'false' ); $model->setUseAutoGeneration($useAutoGeneration); - $session->setPageData($model->getData()); $model->save(); @@ -177,4 +177,21 @@ private function checkRuleExists(\Magento\SalesRule\Model\Rule $model): bool } return true; } + + /** + * Update data related to Coupon + * + * @param array $data + * @return array + */ + private function updateCouponData(array $data): array + { + if (isset($data['uses_per_coupon']) && $data['uses_per_coupon'] === '') { + $data['uses_per_coupon'] = 0; + } + if (isset($data['uses_per_customer']) && $data['uses_per_customer'] === '') { + $data['uses_per_customer'] = 0; + } + return $data; + } } diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Coupon.php b/app/code/Magento/SalesRule/Model/ResourceModel/Coupon.php index 42498448cd13f..c22deb659b375 100644 --- a/app/code/Magento/SalesRule/Model/ResourceModel/Coupon.php +++ b/app/code/Magento/SalesRule/Model/ResourceModel/Coupon.php @@ -6,6 +6,9 @@ namespace Magento\SalesRule\Model\ResourceModel; use Magento\Framework\Model\AbstractModel; +use Magento\Framework\Model\ResourceModel\Db\Context; +use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\Stdlib\DateTime\DateTime as Date; /** * SalesRule Resource Coupon @@ -15,6 +18,33 @@ class Coupon extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb implements \Magento\SalesRule\Model\Spi\CouponResourceInterface { + /** + * @var Date + */ + private $date; + + /** + * @var DateTime + */ + private $dateTime; + + /** + * @param Context $context + * @param Date $date + * @param DateTime $dateTime + * @param string|null $connectionName + */ + public function __construct( + Context $context, + Date $date, + DateTime $dateTime, + $connectionName = null + ) { + parent::__construct($context, $connectionName); + $this->date = $date; + $this->dateTime = $dateTime; + } + /** * Constructor adds unique fields * @@ -37,6 +67,9 @@ public function _beforeSave(AbstractModel $object) // maintain single primary coupon per rule $object->setIsPrimary($object->getIsPrimary() ? 1 : null); + $object->setUsageLimit($object->getUsageLimit() ?? 0); + $object->setUsagePerCustomer($object->getUsagePerCustomer() ?? 0); + $object->setCreatedAt($object->getCreatedAt() ?? $this->dateTime->formatDate($this->date->gmtTimestamp())); return parent::_beforeSave($object); } diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/CouponTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/CouponTest.php new file mode 100644 index 0000000000000..2a9d1c4b6af93 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/CouponTest.php @@ -0,0 +1,67 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\SalesRule\Model; + +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\SalesRule\Api\CouponRepositoryInterface; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + */ +class CouponTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var CouponRepositoryInterface + */ + private $couponRepository; + + /** + * @var RuleFactory + */ + private $ruleFactory; + + public function setUp(): void + { + parent::setUp(); + /** @var CouponRepositoryInterface couponRepository */ + $this->couponRepository = Bootstrap::getObjectManager()->create(CouponRepositoryInterface::class); + /** @var RuleFactory ruleFactory */ + $this->ruleFactory = Bootstrap::getObjectManager()->create(RuleFactory::class); + } + + /** + * Check that non-autogenerated coupon contains necessary fields received from sales rule + */ + public function testNonAutogeneratedCouponBelongingToRule() + { + $couponCode = '_coupon__code_'; + $rule = $this->ruleFactory->create(); + $rule->setCouponType(2) + ->setUseAutoGeneration(0) + ->setCouponCode($couponCode) + ->setUsesPerCustomer(null) + ->setUsesPerCoupon(null) + ->save(); + + /** @var SearchCriteriaBuilder $criteriaBuilder */ + $criteriaBuilder = Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class); + $couponSearchResult = $this->couponRepository->getList( + $criteriaBuilder->addFilter('code', $couponCode, 'like')->create() + ); + $coupons = $couponSearchResult->getItems(); + $coupon = array_pop($coupons); + + $this->assertEquals(0, $coupon->getUsagePerCustomer()); + $this->assertEquals(0, $coupon->getUsageLimit()); + $this->assertEquals(0, $coupon->getTimesUsed()); + $this->assertEquals(0, $coupon->getType()); + $this->assertNotEmpty($coupon->getCreatedAt()); + } +} From 49a2bc902a264067a7d5a36d71f24f25c433213b Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:48:39 +0530 Subject: [PATCH 268/985] ACQE-4296 fix_cookie_timezone_test --- .../Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml index 7661b1222fb57..f197151f77330 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml @@ -38,8 +38,12 @@ </actionGroup> <see userInput="Welcome, $$createCustomer.firstname$$ $$createCustomer.lastname$$!" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="checkWelcomeMessage"/> + <!--Grab timezone offset--> + <executeJS function="return new Date().getTimezoneOffset();" stepKey="getTimezoneOffset"/> <!--Verify default expiry date for cookies--> - <actionGroup ref="StorefrontVerifyCustomerDefaultCookieExpiryDateActionGroup" stepKey="VerifyCookiesExpiryDate"/> + <actionGroup ref="StorefrontVerifyCustomerDefaultCookieExpiryDateActionGroup" stepKey="VerifyCookiesExpiryDate"> + <argument name="timezoneOffset" value="{$getTimezoneOffset}"/> + </actionGroup> <!--Logout customer before in case of it logged in from previous test--> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> @@ -77,7 +81,7 @@ <actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButtonFirstAttempt"/> <!--Grab current timezone offset after 30 days--> - <executeJS function="return (30*24*60);" stepKey="getTimezoneOffsetAfterReset"/> + <executeJS function="return {$getTimezoneOffset} + (30*24*60);" stepKey="getTimezoneOffsetAfterReset"/> <actionGroup ref="StorefrontVerifyCustomerDefaultCookieExpiryDateActionGroup" stepKey="VerifyCookiesExpiryDateAfterReset"> <argument name="timezoneOffset" value="{$getTimezoneOffsetAfterReset}"/> </actionGroup> From df0b6ca699a5acf9fe66ec3dc55b9568dbfe5b53 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 16 Dec 2022 15:52:19 +0200 Subject: [PATCH 269/985] ACP2E-1413, added redirect after toolbar parameter saving --- .../Catalog/Controller/Category/View.php | 17 +++++- .../Model/Product/ProductList/Toolbar.php | 11 ++++ .../Unit/Controller/Category/ViewTest.php | 58 ++++++++++++++++++- 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index 196eb313bc62d..30581a03a7086 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -13,6 +13,7 @@ use Magento\Catalog\Model\Design; use Magento\Catalog\Model\Layer\Resolver; use Magento\Catalog\Model\Product\ProductList\ToolbarMemorizer; +use Magento\Catalog\Model\Product\ProductList\Toolbar; use Magento\Catalog\Model\Session; use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator; use Magento\Framework\App\Action\Action; @@ -22,7 +23,6 @@ use Magento\Framework\App\ActionInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\Result\ForwardFactory; -use Magento\Framework\Controller\ResultInterface; use Magento\Framework\DataObject; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; @@ -182,7 +182,10 @@ protected function _initCategory() } $this->_catalogSession->setLastVisitedCategoryId($category->getId()); $this->_coreRegistry->register('current_category', $category); - $this->toolbarMemorizer->memorizeParams(); + if ($this->isToolbarAction()) { + $this->toolbarMemorizer->memorizeParams(); + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); + } try { $this->_eventManager->dispatch( 'catalog_controller_category_init_after', @@ -294,4 +297,14 @@ private function applyLayoutUpdates( $page->addPageLayoutHandles($settings->getPageLayoutHandles()); } } + + /** + * @return bool + */ + private function isToolbarAction(): bool + { + $params = $this->getRequest()->getParams(); + + return empty(array_intersect(Toolbar::TOOLBAR_PARAM_LIST, array_keys($params))) === false; + } } diff --git a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php index af0772251e235..884d79327effc 100644 --- a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php @@ -38,6 +38,17 @@ class Toolbar */ const LIMIT_PARAM_NAME = 'product_list_limit'; + /** + * Toolbar parameter list + */ + const TOOLBAR_PARAM_LIST = [ + self::PAGE_PARM_NAME, + self::ORDER_PARAM_NAME, + self::DIRECTION_PARAM_NAME, + self::MODE_PARAM_NAME, + self::LIMIT_PARAM_NAME + ]; + /** * Request * diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php index bca7ab30700a9..48f5b54da6e02 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php @@ -12,9 +12,12 @@ use Magento\Catalog\Controller\Category\View; use Magento\Catalog\Helper\Category; use Magento\Catalog\Model\Design; +use Magento\Catalog\Model\Product\ProductList\Toolbar; +use Magento\Catalog\Model\Product\ProductList\ToolbarMemorizer; use Magento\Framework\App\Action\Action; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\ResponseInterface; +use Magento\Framework\App\Response\RedirectInterface; use Magento\Framework\App\ViewInterface; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\DataObject; @@ -127,13 +130,21 @@ class ViewTest extends TestCase */ protected $pageConfig; + /** + * @var ToolbarMemorizer|MockObject + */ + protected ToolbarMemorizer $toolbarMemorizer; + /** * @inheritDoc */ protected function setUp(): void { $this->request = $this->getMockForAbstractClass(RequestInterface::class); - $this->response = $this->getMockForAbstractClass(ResponseInterface::class); + $this->response = $this->getMockBuilder(ResponseInterface::class) + ->addMethods(['setRedirect', 'isRedirect']) + ->onlyMethods(['sendResponse']) + ->getMock(); $this->categoryHelper = $this->createMock(Category::class); $this->objectManager = $this->getMockForAbstractClass(ObjectManagerInterface::class); @@ -180,6 +191,8 @@ protected function setUp(): void $this->context->expects($this->any())->method('getView')->willReturn($this->view); $this->context->expects($this->any())->method('getResultFactory') ->willReturn($this->resultFactory); + $this->context->expects($this->once())->method('getRedirect') + ->willReturn($this->createMock(RedirectInterface::class)); $this->category = $this->createMock(\Magento\Catalog\Model\Category::class); $this->categoryRepository = $this->getMockForAbstractClass(CategoryRepositoryInterface::class); @@ -198,6 +211,8 @@ protected function setUp(): void ->method('create') ->willReturn($this->page); + $this->toolbarMemorizer = $this->createMock(ToolbarMemorizer::class); + $this->action = (new ObjectManager($this))->getObject( View::class, [ @@ -206,9 +221,45 @@ protected function setUp(): void 'categoryRepository' => $this->categoryRepository, 'storeManager' => $this->storeManager, 'resultPageFactory' => $resultPageFactory, - 'categoryHelper' => $this->categoryHelper + 'categoryHelper' => $this->categoryHelper, + 'toolbarMemorizer' => $this->toolbarMemorizer + ] + ); + } + + public function testRedirectOnToolbarAction() + { + $categoryId = 123; + $this->request->expects($this->any()) + ->method('getParams') + ->willReturn([Toolbar::LIMIT_PARAM_NAME => 12]); + $this->request->expects($this->any())->method('getParam')->willReturnMap( + [ + [Action::PARAM_NAME_URL_ENCODED], + ['id', false, $categoryId] ] ); + $this->categoryRepository->expects($this->any())->method('get')->with($categoryId) + ->willReturn($this->category); + $this->categoryHelper->expects($this->once())->method('canShow')->with($this->category)->willReturn(true); + $this->toolbarMemorizer->expects($this->once())->method('memorizeParams'); + $this->response->expects($this->once())->method('setRedirect'); + $settings = $this->getMockBuilder(DataObject::class) + ->addMethods(['getPageLayout', 'getLayoutUpdates']) + ->disableOriginalConstructor() + ->getMock(); + $this->category + ->method('hasChildren') + ->willReturnOnConsecutiveCalls(true); + $this->category->expects($this->any()) + ->method('getDisplayMode') + ->willReturn('products'); + + $settings->expects($this->atLeastOnce())->method('getPageLayout')->willReturn('page_layout'); + $settings->expects($this->once())->method('getLayoutUpdates')->willReturn(['update1', 'update2']); + $this->catalogDesign->expects($this->any())->method('getDesignSettings')->willReturn($settings); + + $this->action->execute(); } /** @@ -230,6 +281,9 @@ public function testApplyCustomLayoutUpdate(array $expectedData): void ['id', false, $categoryId] ] ); + $this->request->expects($this->any()) + ->method('getParams') + ->willReturn([]); $this->categoryRepository->expects($this->any())->method('get')->with($categoryId) ->willReturn($this->category); From b6dbbea12edb6bbae7c89fc24197765640635bf2 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 16 Dec 2022 18:25:39 +0200 Subject: [PATCH 270/985] ACP2E-1413, addressed semantic version checker --- app/code/Magento/Catalog/Controller/Category/View.php | 10 +++++++++- .../Catalog/Model/Product/ProductList/Toolbar.php | 11 ----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index 30581a03a7086..bb4bbcebe1d09 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -299,12 +299,20 @@ private function applyLayoutUpdates( } /** + * Checks for toolbar actions + * * @return bool */ private function isToolbarAction(): bool { $params = $this->getRequest()->getParams(); - return empty(array_intersect(Toolbar::TOOLBAR_PARAM_LIST, array_keys($params))) === false; + return empty(array_intersect([ + Toolbar::PAGE_PARM_NAME, + Toolbar::ORDER_PARAM_NAME, + Toolbar::DIRECTION_PARAM_NAME, + Toolbar::MODE_PARAM_NAME, + Toolbar::LIMIT_PARAM_NAME + ], array_keys($params))) === false; } } diff --git a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php index 884d79327effc..af0772251e235 100644 --- a/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Model/Product/ProductList/Toolbar.php @@ -38,17 +38,6 @@ class Toolbar */ const LIMIT_PARAM_NAME = 'product_list_limit'; - /** - * Toolbar parameter list - */ - const TOOLBAR_PARAM_LIST = [ - self::PAGE_PARM_NAME, - self::ORDER_PARAM_NAME, - self::DIRECTION_PARAM_NAME, - self::MODE_PARAM_NAME, - self::LIMIT_PARAM_NAME - ]; - /** * Request * From 2a9fc1ad7a9987994120abf3a694e640be710938 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Fri, 16 Dec 2022 15:49:46 -0600 Subject: [PATCH 271/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- ...donedCartsReportFilterEmailActionGroup.xml | 21 +++++++++++++++++++ .../Test/Mftf/Page/AbandonedCartsPage.xml | 13 ++++++++++++ .../Section/AbandonedCartsGridSection.xml | 14 +++++++++++++ .../AbandonedCartsReportMainSection.xml | 17 +++++++++++++++ ...sAbandonedCartsSearchEmailWithPlusTest.xml | 11 +++++++++- 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAbandonedCartsReportFilterEmailActionGroup.xml create mode 100644 app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml create mode 100644 app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml create mode 100644 app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml diff --git a/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAbandonedCartsReportFilterEmailActionGroup.xml b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAbandonedCartsReportFilterEmailActionGroup.xml new file mode 100644 index 0000000000000..851463da9a559 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAbandonedCartsReportFilterEmailActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAbandonedCartsReportFilterEmailActionGroup"> + <annotations> + <description>Filter in "Abandoned Carts" report by email.</description> + </annotations> + <arguments> + <argument name="email" type="string" defaultValue="{{Simple_US_Customer.email}}"/> + </arguments> + + <fillField selector="{{AbandonedCartsReportMainSection.email}}" userInput="{{email}}" stepKey="fillEmailFilterField" /> + <click selector="{{AbandonedCartsReportMainSection.searchButton}}" stepKey="clickSearch"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml b/app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml new file mode 100644 index 0000000000000..c8a24f9ac5887 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> + <page name="AbandonedCartsPage" url="reports/report_product/sold/" area="admin" module="Reports"> + <section name="AbandonedCartsReportMainSection"/> + <section name="AbandonedCartsGridSection"/> + </page> +</pages> diff --git a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml new file mode 100644 index 0000000000000..782f546c75afc --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AbandonedCartsGridSection"> + <element name="email" type="input" selector="//tr[@class='data-grid-filters']/td[@data-column='email']"/> + </section> +</sections> diff --git a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml new file mode 100644 index 0000000000000..5d62f4f205ae2 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AbandonedCartsReportMainSection"> + <element name="customer" type="input" selector="#gridAbandoned_filter_customer_name"/> + <element name="email" type="input" selector="#gridAbandoned_filter_email"/> + <element name="searchButton" type="button" selector="//button/span[text()='Search']"/> + <element name="resetButton" type="button" selector="//button/span[text()='Reset Filter']"/> + </section> +</sections> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml index 87da9c23924ac..6fe35d4086267 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml @@ -25,7 +25,7 @@ <!-- Create Customer --> <createData entity="Simple_US_Customer" stepKey="createCustomer"> - <field key="email">John+Doe@example.com</field> + <field key="email">John+@example.com</field> </createData> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> @@ -61,5 +61,14 @@ <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle"> <argument name="title" value="{{AdminMenuReportsMarketingAbandonedCarts.pageTitle}}"/> </actionGroup> + + <!-- Search for email containing '+' sign --> + <actionGroup ref="AdminAbandonedCartsReportFilterEmailActionGroup" stepKey="searchForEmailWithPlus"> + <argument name="email" value="John+"/> + </actionGroup> + + <!-- Check record is present --> + + </test> </tests> From 4518a9bd94c11e6541dbd034d07e39c281152af0 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Fri, 16 Dec 2022 21:13:03 -0600 Subject: [PATCH 272/985] ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign --- ...cordsInAbandonedCartsReportActionGroup.xml | 24 +++++++++++ ....xml => AdminAbandonedCartsReportPage.xml} | 2 +- .../Section/AbandonedCartsGridSection.xml | 2 +- .../AbandonedCartsReportMainSection.xml | 1 + ...sAbandonedCartsSearchEmailWithPlusTest.xml | 41 ++++++++++++++++--- 5 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup.xml rename app/code/Magento/Reports/Test/Mftf/Page/{AbandonedCartsPage.xml => AdminAbandonedCartsReportPage.xml} (77%) diff --git a/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup.xml b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup.xml new file mode 100644 index 0000000000000..8da8e84bda197 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup"> + <annotations> + <description>Validates that the Number of Records listed on the Abandoned Carts Report grid page is present and correct.</description> + </annotations> + <arguments> + <argument name="number" type="string" defaultValue="1"/> + </arguments> + <grabTextFrom selector="{{AbandonedCartsReportMainSection.recordsFound}}" stepKey="grabAbandonedCartsAmount"/> + <assertEquals message="Wrong records were found, should be only 1" stepKey="checkNumberOfRecords"> + <expectedResult type="string">{{number}}</expectedResult> + <actualResult type="variable">grabAbandonedCartsAmount</actualResult> + </assertEquals> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml b/app/code/Magento/Reports/Test/Mftf/Page/AdminAbandonedCartsReportPage.xml similarity index 77% rename from app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml rename to app/code/Magento/Reports/Test/Mftf/Page/AdminAbandonedCartsReportPage.xml index c8a24f9ac5887..b03942efc3763 100644 --- a/app/code/Magento/Reports/Test/Mftf/Page/AbandonedCartsPage.xml +++ b/app/code/Magento/Reports/Test/Mftf/Page/AdminAbandonedCartsReportPage.xml @@ -6,7 +6,7 @@ */ --> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> - <page name="AbandonedCartsPage" url="reports/report_product/sold/" area="admin" module="Reports"> + <page name="AdminAbandonedCartsReportPage" url="reports/report_shopcart/abandoned/" area="admin" module="Reports"> <section name="AbandonedCartsReportMainSection"/> <section name="AbandonedCartsGridSection"/> </page> diff --git a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml index 782f546c75afc..4ddbef1150ac7 100644 --- a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml +++ b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsGridSection.xml @@ -9,6 +9,6 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AbandonedCartsGridSection"> - <element name="email" type="input" selector="//tr[@class='data-grid-filters']/td[@data-column='email']"/> + <element name="email" type="input" selector="//tr/td[contains(@class, 'col-email')][contains(text(), '{{email1}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml index 5d62f4f205ae2..873988e34e0c4 100644 --- a/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml +++ b/app/code/Magento/Reports/Test/Mftf/Section/AbandonedCartsReportMainSection.xml @@ -13,5 +13,6 @@ <element name="email" type="input" selector="#gridAbandoned_filter_email"/> <element name="searchButton" type="button" selector="//button/span[text()='Search']"/> <element name="resetButton" type="button" selector="//button/span[text()='Reset Filter']"/> + <element name="recordsFound" type="text" selector="#gridAbandoned-total-count"/> </section> </sections> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml index 6fe35d4086267..b544e8fd2daab 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml @@ -15,7 +15,8 @@ <title value="Admin Reports Abandoned Carts Search Email With Plus"/> <description value="Admin should be able to search for email that contains plus > Abandoned Carts"/> <severity value="AVERAGE"/> - <testCaseId value="ACP2E-1435"/> + <testCaseId value="AC-7465"/> + <useCaseId value="ACP2E-1435"/> <group value="reports"/> </annotations> <before> @@ -23,18 +24,28 @@ <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="_defaultProduct" stepKey="createProduct" /> - <!-- Create Customer --> + <!-- Create Customers --> <createData entity="Simple_US_Customer" stepKey="createCustomer"> - <field key="email">John+@example.com</field> + <field key="email">John+Doe@example.com</field> + </createData> + <createData entity="Simple_US_Customer" stepKey="createCustomer2"> + <field key="email">JohnDoe@example.com</field> </createData> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> + <after> - <!-- Delete created Product, Category and Customer --> + <!-- Delete created Product, Category and Customers --> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <deleteData createDataKey="createCustomer2" stepKey="deleteCustomer2"/> + + <!-- Reset filter on Abandoned Carts Report page --> + <amOnPage url="{{AdminAbandonedCartsReportPage.url}}" stepKey="amOnAbandonedCartsReportPage"/> + <click selector="{{AbandonedCartsReportMainSection.resetButton}}" stepKey="clickResetButton"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> @@ -43,7 +54,7 @@ <argument name="Customer" value="$createCustomer$"/> </actionGroup> - <!-- Open product and add product to cart--> + <!-- Open product and add product to cart of the first customer --> <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory"> <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> </actionGroup> @@ -52,6 +63,23 @@ <argument name="productCount" value="1"/> </actionGroup> + <!-- Logout from customer account --> + <actionGroup ref="CustomerLogoutStorefrontByMenuItemsActionGroup" stepKey="logoutFirstCustomer"/> + + <!-- Login as a second Customer on Storefront --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomerToStorefront2"> + <argument name="Customer" value="$createCustomer2$"/> + </actionGroup> + + <!-- Open product and add product to cart of the first customer --> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory2"> + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart2"> + <argument name="product" value="$createProduct$"/> + <argument name="productCount" value="1"/> + </actionGroup> + <!-- Open Abandoned carts report in Admin --> <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAbandonedCartsPage"> @@ -68,7 +96,10 @@ </actionGroup> <!-- Check record is present --> + <seeElement selector="{{AbandonedCartsGridSection.email('John+')}}" stepKey="seeCartInGrid"/> + <!-- Check that only one record is present --> + <actionGroup ref="AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup" stepKey="checkOnlyOneRecordIsFound"/> </test> </tests> From 34f9f725a7b85ca60f8450e4a309c8c3f1e2a11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cengcom-Echo=E2=80=9D?= <engcom-vendorworker-echo@adobe.com> Date: Mon, 19 Dec 2022 18:11:53 +0530 Subject: [PATCH 273/985] Fixed failing integration test --- .../Magento/Cron/Observer/ProcessCronQueueObserverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php index c15426adb1a9a..237f2c95606a8 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php @@ -110,7 +110,7 @@ public function groupFiltersDataProvider(): array return [ 'no flags runs all groups' => [ - ['consumers', 'index', 'default'] // groups to run + ['index', 'consumers', 'default'] // groups to run ], '--group=default should run' => [ ['default'], // groups to run From 48c0326b52f341cb5b41987552ff3f4a0d7c2e03 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 19 Dec 2022 15:15:10 +0200 Subject: [PATCH 274/985] ACP2E-1413, set response redirect --- app/code/Magento/Catalog/Controller/Category/View.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index bb4bbcebe1d09..a12ae421b444c 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -23,6 +23,7 @@ use Magento\Framework\App\ActionInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\Result\ForwardFactory; +use Magento\Framework\Controller\ResultFactory; use Magento\Framework\DataObject; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; @@ -182,10 +183,7 @@ protected function _initCategory() } $this->_catalogSession->setLastVisitedCategoryId($category->getId()); $this->_coreRegistry->register('current_category', $category); - if ($this->isToolbarAction()) { - $this->toolbarMemorizer->memorizeParams(); - $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); - } + $this->toolbarMemorizer->memorizeParams(); try { $this->_eventManager->dispatch( 'catalog_controller_category_init_after', @@ -212,6 +210,7 @@ public function execute() //phpcs:ignore Magento2.Legacy.ObsoleteResponse return $this->resultRedirectFactory->create()->setUrl($this->_redirect->getRedirectUrl()); } + $category = $this->_initCategory(); if ($category) { $this->layerResolver->create(Resolver::CATALOG_LAYER_CATEGORY); @@ -250,6 +249,9 @@ public function execute() ->addBodyClass('categorypath-' . $this->categoryUrlPathGenerator->getUrlPath($category)) ->addBodyClass('category-' . $category->getUrlKey()); + if ($this->isToolbarAction()) { + $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); + } return $page; } elseif (!$this->getResponse()->isRedirect()) { $result = $this->resultForwardFactory->create()->forward('noroute'); From e99d0f28394fab78f848f31d7c4974b364af603d Mon Sep 17 00:00:00 2001 From: Dmytro Shevtsov <shevtsov@adobe.com> Date: Mon, 19 Dec 2022 15:52:44 -0600 Subject: [PATCH 275/985] Update devdocs links --- README.md | 22 +++++----- app/code/Magento/AdminAdobeIms/README.md | 2 +- .../new_admin_adobe_ims_admin_created.html | 2 +- app/code/Magento/AdminNotification/README.md | 10 ++--- app/code/Magento/AdobeIms/README.md | 8 ++-- app/code/Magento/AdobeImsApi/README.md | 6 +-- .../AdvancedPricingImportExport/README.md | 4 +- app/code/Magento/AdvancedSearch/README.md | 10 ++--- app/code/Magento/Amqp/README.md | 4 +- app/code/Magento/Analytics/README.md | 6 +-- .../Magento/AsynchronousOperations/README.md | 10 ++--- app/code/Magento/Authorization/README.md | 6 +-- app/code/Magento/Backend/README.md | 18 ++++---- app/code/Magento/Backup/README.md | 8 ++-- app/code/Magento/Catalog/README.md | 2 +- .../Magento/Catalog/etc/adminhtml/system.xml | 2 +- app/code/Magento/CatalogAnalytics/README.md | 2 +- .../Api/Data/StockCollectionInterface.php | 4 +- .../Api/Data/StockInterface.php | 4 +- .../Api/Data/StockItemCollectionInterface.php | 4 +- .../Api/Data/StockItemInterface.php | 4 +- .../Data/StockStatusCollectionInterface.php | 4 +- .../Api/Data/StockStatusInterface.php | 4 +- .../Api/RegisterProductSaleInterface.php | 4 +- .../Api/RevertProductSaleInterface.php | 4 +- .../Api/StockConfigurationInterface.php | 4 +- .../Api/StockCriteriaInterface.php | 4 +- .../Api/StockIndexInterface.php | 4 +- .../Api/StockItemCriteriaInterface.php | 4 +- .../Api/StockItemRepositoryInterface.php | 4 +- .../Api/StockManagementInterface.php | 4 +- .../Api/StockRegistryInterface.php | 4 +- .../Api/StockRepositoryInterface.php | 4 +- .../Api/StockStateInterface.php | 4 +- .../Api/StockStatusCriteriaInterface.php | 4 +- .../Api/StockStatusRepositoryInterface.php | 4 +- .../Block/Adminhtml/Form/Field/Minsaleqty.php | 4 +- .../Block/Adminhtml/Form/Field/Stock.php | 4 +- .../CatalogInventory/Block/Qtyincrements.php | 4 +- .../Block/Stockqty/DefaultStockqty.php | 4 +- .../Magento/CatalogInventory/Helper/Stock.php | 4 +- .../Model/Adminhtml/Stock/Item.php | 4 +- .../Model/Quote/Item/QuantityValidator.php | 4 +- .../Indexer/Stock/DefaultStock.php | 4 +- .../Indexer/Stock/QueryProcessorInterface.php | 4 +- .../Indexer/Stock/StockInterface.php | 4 +- .../ResourceModel/Indexer/StockFactory.php | 4 +- .../Model/ResourceModel/Stock/Status.php | 4 +- .../Model/Source/Backorders.php | 4 +- .../CatalogInventory/Model/Source/Stock.php | 4 +- .../Spi/StockRegistryProviderInterface.php | 4 +- .../Model/Spi/StockStateProviderInterface.php | 4 +- app/code/Magento/CatalogUrlRewrite/README.md | 6 +-- .../Magento/ConfigurableProduct/README.md | 8 ++-- app/code/Magento/Csp/README.md | 6 +-- .../Api/CustomerRepositoryInterface.php | 2 +- .../Customer/Api/GroupRepositoryInterface.php | 2 +- .../ResourceModel/CustomerRepository.php | 2 +- app/code/Magento/Customer/README.md | 16 +++---- app/code/Magento/CustomerAnalytics/README.md | 6 +-- .../CustomerDownloadableGraphQl/README.md | 4 +- app/code/Magento/CustomerGraphQl/README.md | 6 +-- .../Magento/CustomerImportExport/README.md | 4 +- app/code/Magento/Deploy/Model/Filesystem.php | 16 +++---- app/code/Magento/Developer/README.md | 6 +-- .../Api/AttributeSetRepositoryInterface.php | 2 +- app/code/Magento/EavGraphQl/README.md | 6 +-- app/code/Magento/Elasticsearch/README.md | 12 +++--- app/code/Magento/Elasticsearch7/README.md | 12 +++--- app/code/Magento/Email/README.md | 16 +++---- app/code/Magento/EncryptionKey/README.md | 6 +-- app/code/Magento/Fedex/README.md | 10 ++--- app/code/Magento/GiftMessage/README.md | 10 ++--- app/code/Magento/GiftMessageGraphQl/README.md | 2 +- app/code/Magento/GoogleAdwords/README.md | 4 +- app/code/Magento/GoogleAnalytics/README.md | 6 +-- app/code/Magento/GoogleGtag/README.md | 6 +-- app/code/Magento/GoogleOptimizer/README.md | 4 +- app/code/Magento/GraphQl/README.md | 6 +-- app/code/Magento/GraphQlCache/README.md | 8 ++-- .../Magento/GroupedCatalogInventory/README.md | 6 +-- .../Magento/GroupedImportExport/README.md | 6 +-- app/code/Magento/GroupedProduct/README.md | 8 ++-- .../Magento/GroupedProductGraphQl/README.md | 2 +- app/code/Magento/ImportExport/README.md | 10 ++--- .../Magento/Indexer/Model/Message/Invalid.php | 2 +- app/code/Magento/Indexer/README.md | 16 +++---- app/code/Magento/InstantPurchase/README.md | 10 ++--- app/code/Magento/Integration/README.md | 10 ++--- app/code/Magento/LayeredNavigation/README.md | 4 +- app/code/Magento/LoginAsCustomer/README.md | 2 +- .../LoginAsCustomerAssistance/README.md | 2 +- .../Magento/LoginAsCustomerGraphQl/README.md | 2 +- app/code/Magento/LoginAsCustomerLog/README.md | 4 +- app/code/Magento/Marketplace/README.md | 4 +- app/code/Magento/MediaContent/README.md | 6 +-- app/code/Magento/MediaContentApi/README.md | 6 +-- .../Magento/MediaContentCatalog/README.md | 6 +-- app/code/Magento/MediaContentCms/README.md | 6 +-- .../MediaContentSynchronization/README.md | 6 +-- .../MediaContentSynchronizationApi/README.md | 6 +-- .../README.md | 6 +-- .../MediaContentSynchronizationCms/README.md | 6 +-- app/code/Magento/MediaGallery/README.md | 8 ++-- app/code/Magento/MediaGalleryApi/README.md | 8 ++-- .../Magento/MediaGalleryCatalog/README.md | 8 ++-- .../MediaGalleryCatalogIntegration/README.md | 2 +- .../Magento/MediaGalleryCatalogUi/README.md | 10 ++--- app/code/Magento/MediaGalleryCmsUi/README.md | 8 ++-- .../Magento/MediaGalleryIntegration/README.md | 6 +-- .../Magento/MediaGalleryMetadata/README.md | 6 +-- .../Magento/MediaGalleryMetadataApi/README.md | 6 +-- .../Magento/MediaGalleryRenditions/README.md | 10 ++--- .../MediaGalleryRenditionsApi/README.md | 4 +- .../MediaGallerySynchronization/README.md | 10 ++--- .../MediaGallerySynchronizationApi/README.md | 6 +-- .../README.md | 6 +-- app/code/Magento/MediaGalleryUi/README.md | 10 ++--- app/code/Magento/MediaGalleryUiApi/README.md | 4 +- app/code/Magento/MediaStorage/README.md | 10 ++--- app/code/Magento/Msrp/README.md | 12 +++--- .../Magento/MsrpConfigurableProduct/README.md | 10 ++--- app/code/Magento/MsrpGroupedProduct/README.md | 10 ++--- app/code/Magento/Multishipping/README.md | 14 +++---- app/code/Magento/MysqlMq/README.md | 2 +- app/code/Magento/NewRelicReporting/README.md | 8 ++-- app/code/Magento/Newsletter/README.md | 10 ++--- app/code/Magento/NewsletterGraphQl/README.md | 6 +-- app/code/Magento/OfflinePayments/README.md | 10 ++--- app/code/Magento/OfflineShipping/README.md | 10 ++--- .../Payment/Model/Method/AbstractMethod.php | 2 +- app/code/Magento/Persistent/README.md | 10 ++--- app/code/Magento/ProductAlert/README.md | 8 ++-- app/code/Magento/ProductVideo/README.md | 12 +++--- .../Quote/Api/CartRepositoryInterface.php | 2 +- .../GuestPaymentMethodManagementInterface.php | 2 +- .../Api/PaymentMethodManagementInterface.php | 2 +- app/code/Magento/Quote/README.md | 6 +-- app/code/Magento/QuoteAnalytics/README.md | 8 ++-- app/code/Magento/QuoteBundleOptions/README.md | 6 +-- .../QuoteConfigurableOptions/README.md | 6 +-- .../Magento/QuoteDownloadableLinks/README.md | 6 +-- app/code/Magento/QuoteGraphQl/README.md | 42 +++++++++---------- .../Magento/RelatedProductGraphQl/README.md | 6 +-- .../Magento/ReleaseNotification/README.md | 6 +-- app/code/Magento/ReviewAnalytics/README.md | 2 +- .../Api/CreditmemoRepositoryInterface.php | 2 +- .../Sales/Api/InvoiceRepositoryInterface.php | 2 +- .../Api/OrderItemRepositoryInterface.php | 2 +- .../Sales/Api/OrderRepositoryInterface.php | 2 +- .../Sales/Api/ShipmentRepositoryInterface.php | 2 +- .../Api/TransactionRepositoryInterface.php | 2 +- app/code/Magento/SalesAnalytics/README.md | 2 +- .../Api/CouponRepositoryInterface.php | 2 +- .../SalesRule/Api/RuleRepositoryInterface.php | 2 +- app/code/Magento/SampleData/README.md | 2 +- .../SendFriend/etc/adminhtml/system.xml | 2 +- app/code/Magento/SendFriend/i18n/en_US.csv | 2 +- .../Tax/Api/TaxClassRepositoryInterface.php | 2 +- .../Tax/Api/TaxRateRepositoryInterface.php | 2 +- .../Tax/Api/TaxRuleRepositoryInterface.php | 2 +- app/code/Magento/WebapiAsync/README.md | 8 ++-- app/code/Magento/WebapiSecurity/README.md | 2 +- app/code/Magento/Weee/README.md | 12 +++--- app/code/Magento/WeeeGraphQl/README.md | 6 +-- app/code/Magento/Widget/README.md | 8 ++-- app/code/Magento/Wishlist/README.md | 14 +++---- app/code/Magento/WishlistAnalytics/README.md | 4 +- app/code/Magento/WishlistGraphQl/README.md | 14 +++---- .../parent/web/css/source/_extend-child.less | 2 +- .../Framework/View/Element/AbstractBlock.php | 2 +- phpserver/README.md | 4 +- setup/performance-toolkit/README.md | 2 +- setup/view/magento/setup/index.phtml | 2 +- 174 files changed, 521 insertions(+), 521 deletions(-) diff --git a/README.md b/README.md index 46c9fc128c00d..55af19302871e 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad ## Get started -- [Quick start install](https://devdocs.magento.com/guides/v2.4/install-gde/composer.html) -- [System requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html) -- [Prerequisites](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/prereq-overview.html) -- [More installation options](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html) +- [Quick start install](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html) +- [System requirements](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html) +- [Prerequisites](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/overview.html) +- [More installation options](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/overview.html) ## Get help @@ -28,8 +28,8 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://devdocs.magento.com/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas. -- [Contribute to the code](https://devdocs.magento.com/contributor-guide/contributing.html) -- [Report an issue](https://devdocs.magento.com/contributor-guide/contributing.html#report) +- [Contribute to the code](https://developer.adobe.com/commerce/contributor/guides/code-contributions/) +- [Report an issue](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#report) - [Improve the developer documentation](https://github.com/magento/devdocs) - [Improve the end-user documentation](https://github.com/magento/merchdocs) - [Shape the future of Magento Open Source](https://developer.adobe.com/open/magento) @@ -38,8 +38,8 @@ Our [Community](https://opensource.magento.com/) is large and diverse, and our p We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production. -- [Learn more about the Maintainer role](https://devdocs.magento.com/contributor-guide/maintainers.html) -- [Maintainer's Handbook](https://devdocs.magento.com/contributor-guide/maintainer-handbook.html) +- [Learn more about the Maintainer role](https://developer.adobe.com/commerce/contributor/guides/maintainers/) +- [Maintainer's Handbook](https://developer.adobe.com/commerce/contributor/guides/maintainers/handbook/) [![](https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png)](https://magento.com/magento-contributors#maintainers) @@ -53,11 +53,11 @@ Adobe highly appreciates contributions that help us to improve the code, clarify We use labels in the GitHub issues and pull requests to help the participants retrieve additional information such as progress, component assignments, or release lines. -- [Labels applied by the Community Engineering team](https://devdocs.magento.com/contributor-guide/contributing.html#labels) +- [Labels applied by the Community Engineering team](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#labels) ## Security -[Security](https://devdocs.magento.com/guides/v2.4/architecture/security_intro.html) is one of the highest priorities at Adobe. To learn more about reporting security concerns, visit the [Adobe Bug Bounty Program](https://hackerone.com/adobe). +[Security](https://developer.adobe.com/commerce/php/architecture/basics/security/) is one of the highest priorities at Adobe. To learn more about reporting security concerns, visit the [Adobe Bug Bounty Program](https://hackerone.com/adobe). Stay up-to-date on the latest security news and patches by signing up for [Security Alert Notifications](https://magento.com/security/sign-up). @@ -71,7 +71,7 @@ Subject to Licensee's/Customer's payment of fees and compliance with the terms a ## Communications -We are dedicated to our Community and encourage your contributions and welcome feedback through [events](https://www.adobe.io/open/magento/calendar), our [DevBlog](https://community.magento.com/t5/Magento-DevBlog/bg-p/devblog), Twitter and YouTube channels, and [other Community resources](https://devdocs.magento.com/community/resources.html). +We are dedicated to our Community and encourage your contributions and welcome feedback through [events](https://www.adobe.io/open/magento/calendar), our [DevBlog](https://community.magento.com/t5/Magento-DevBlog/bg-p/devblog), Twitter and YouTube channels, and [other Community resources](https://developer.adobe.com/commerce/contributor/community/). To connect with people from the Community and Adobe engineering, [join us in Slack](https://magentocommeng.slack.com). We have a channel for every project. To join a particular channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com), or [sign up](https://opensource.magento.com/slack). diff --git a/app/code/Magento/AdminAdobeIms/README.md b/app/code/Magento/AdminAdobeIms/README.md index 461ac95d7aec8..ad5d9d4241aa8 100644 --- a/app/code/Magento/AdminAdobeIms/README.md +++ b/app/code/Magento/AdminAdobeIms/README.md @@ -1,7 +1,7 @@ # Magento_Admin_Adobe_Ims module The Magento_Admin_Adobe_Ims module contains integration with Adobe IMS for backend authentication. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). # CLI command usage: ## bin/magento admin:adobe-ims:enable diff --git a/app/code/Magento/AdminAdobeIms/view/adminhtml/email/new_admin_adobe_ims_admin_created.html b/app/code/Magento/AdminAdobeIms/view/adminhtml/email/new_admin_adobe_ims_admin_created.html index 9e24887140f12..8bba3594c90c3 100644 --- a/app/code/Magento/AdminAdobeIms/view/adminhtml/email/new_admin_adobe_ims_admin_created.html +++ b/app/code/Magento/AdminAdobeIms/view/adminhtml/email/new_admin_adobe_ims_admin_created.html @@ -62,7 +62,7 @@ </tr> <tr> <td class="email-text"> - <a class="email-information-link" href="https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html" target="_blank"> + <a class="email-information-link" href="https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html" target="_blank"> {{trans "Release notes"}} </a> </td> diff --git a/app/code/Magento/AdminNotification/README.md b/app/code/Magento/AdminNotification/README.md index 2967aa9ac60b4..d94604f1b7143 100644 --- a/app/code/Magento/AdminNotification/README.md +++ b/app/code/Magento/AdminNotification/README.md @@ -11,13 +11,13 @@ The Magento_AdminNotification module creates the following tables in the databas Before disabling or uninstalling this module, note that the Magento_Indexer module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AdminNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdminNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdminNotification module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdminNotification module. ### Events @@ -32,10 +32,10 @@ This module introduces the following layouts and layout handles in the `view/adm - `adminhtml_notification_index` - `adminhtml_notification_block` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components You can extend admin notifications using the `view/adminhtml/ui_component/notification_area.xml` configuration file. -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/AdobeIms/README.md b/app/code/Magento/AdobeIms/README.md index 19d1ac19c6d0a..bad930023638d 100644 --- a/app/code/Magento/AdobeIms/README.md +++ b/app/code/Magento/AdobeIms/README.md @@ -10,14 +10,14 @@ The Magento_AdobeIms module creates the following tables in the database: Before disabling or uninstalling this module, note that the `Magento_AdobeStockImageAdminUi` module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AdobeIms module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdobeIms module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdobeIms module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdobeIms module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/AdobeImsApi/README.md b/app/code/Magento/AdobeImsApi/README.md index 49442a872f7df..77cb3690bf903 100644 --- a/app/code/Magento/AdobeImsApi/README.md +++ b/app/code/Magento/AdobeImsApi/README.md @@ -4,10 +4,10 @@ The Magento_AdobeImsApi module serves as application program interface (API) res ## Extensibility -Extension developers can interact with the Magento_AdobeImsApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdobeImsApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdobeImsApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdobeImsApi module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/AdvancedPricingImportExport/README.md b/app/code/Magento/AdvancedPricingImportExport/README.md index b389eabb341ad..2160b55ddad4c 100644 --- a/app/code/Magento/AdvancedPricingImportExport/README.md +++ b/app/code/Magento/AdvancedPricingImportExport/README.md @@ -4,6 +4,6 @@ The Magento_AdvancedPricingImportExport module handles the import and export of ## Extensibility -Extension developers can interact with the Magento_AdvancedPricingImportExport module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdvancedPricingImportExport module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedPricingImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdvancedPricingImportExport module. diff --git a/app/code/Magento/AdvancedSearch/README.md b/app/code/Magento/AdvancedSearch/README.md index 49cafc827d7cb..bfb217b97cb9e 100644 --- a/app/code/Magento/AdvancedSearch/README.md +++ b/app/code/Magento/AdvancedSearch/README.md @@ -9,13 +9,13 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_Elasticsearch - Magento_Elasticsearch7 -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedSearch module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdvancedSearch module. ### Events @@ -23,7 +23,7 @@ This module observes the following event: - `catalogsearch_query_save_after` in the `Magento\AdvancedSearch\Model\Recommendations\SaveSearchQueryRelationsObserver` file. -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -37,4 +37,4 @@ The module interacts with the following layout handles in the `view/frontend/lay - `catalogsearch_result_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/Amqp/README.md b/app/code/Magento/Amqp/README.md index 6a47a072390a8..e39dde060d435 100644 --- a/app/code/Magento/Amqp/README.md +++ b/app/code/Magento/Amqp/README.md @@ -4,6 +4,6 @@ Magento_Amqp module provides functionality to publish/consume messages with the ## Extensibility -Extension developers can interact with the Magento_Amqp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Amqp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Amqp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Amqp module. diff --git a/app/code/Magento/Analytics/README.md b/app/code/Magento/Analytics/README.md index a7f7d87b650ea..cc1f6a71d77ff 100644 --- a/app/code/Magento/Analytics/README.md +++ b/app/code/Magento/Analytics/README.md @@ -1,6 +1,6 @@ # Magento_Analytics module -The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://business.adobe.com/products/magento/business-intelligence.html) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html) functionality. +The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://business.adobe.com/products/magento/business-intelligence.html) to use [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/) functionality. The module implements the following functionality: @@ -26,8 +26,8 @@ Before disabling or uninstalling this module, note that the following modules de ## Structure -Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`. -[Report XML](https://devdocs.magento.com/guides/v2.4/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting. +Beyond the [usual module file structure](https://developer.adobe.com/commerce/php/architecture/modules/overview/) the module contains a directory `ReportXml`. +[Report XML](https://developer.adobe.com/commerce/php/development/advanced-reporting/report-xml/) is a markup language used to build reports for Advanced Reporting. The language declares SQL queries using XML declaration. ## Subscription Process diff --git a/app/code/Magento/AsynchronousOperations/README.md b/app/code/Magento/AsynchronousOperations/README.md index cc826d66211c6..6984b7a3e03b5 100644 --- a/app/code/Magento/AsynchronousOperations/README.md +++ b/app/code/Magento/AsynchronousOperations/README.md @@ -14,13 +14,13 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_WebapiAsync -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AsynchronousOperations module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AsynchronousOperations module. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts and layout handles in the `view/adm - `bulk_bulk_details_modal` - `bulk_index_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -45,4 +45,4 @@ You can extend Magento_AsynchronousOperations module using the following configu - `retriable_operation_listing` - `retriable_operation_modal_listing` -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/Authorization/README.md b/app/code/Magento/Authorization/README.md index 916903ffff36b..bb5389dee62f5 100644 --- a/app/code/Magento/Authorization/README.md +++ b/app/code/Magento/Authorization/README.md @@ -11,10 +11,10 @@ The Magento_Authorization module creates the following tables in the database us Before disabling or uninstalling this module, note that the Magento_GraphQl module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Authorization module. diff --git a/app/code/Magento/Backend/README.md b/app/code/Magento/Backend/README.md index 10d5b7baec9a9..74cf5a4fdd766 100644 --- a/app/code/Magento/Backend/README.md +++ b/app/code/Magento/Backend/README.md @@ -21,21 +21,21 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_User - Magento_Webapi -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure -Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `Service/V1`. +Beyond the [usual module file structure](https://developer.adobe.com/commerce/php/architecture/modules/overview/) the module contains a directory `Service/V1`. `Service/V1` - contains logic to provide a list of modules installed in Magento. -For information about typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Backend module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Backend module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Backend module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Backend module. ### Events @@ -62,7 +62,7 @@ The module dispatches the following events: - `user_name` is username extracted from the credential storage object (`null | \Magento\Backend\Model\Auth\Credential\StorageInterface`) - `exception` any exception generated (`\Magento\Framework\Exception\LocalizedException | \Magento\Framework\Exception\Plugin\AuthenticationException`) -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -94,7 +94,7 @@ This module introduces the following layouts and layout handles in the `view/adm - `overlay_popup` - `popup` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -103,8 +103,8 @@ You can extend Magento_Backend module using the following configuration files: - `view/adminhtml/ui_component/design_config_form.xml` - `view/adminhtml/ui_component/design_config_listing.xml` -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Backup/README.md b/app/code/Magento/Backup/README.md index 4d5f0941dd459..5a2445bfa7eab 100644 --- a/app/code/Magento/Backup/README.md +++ b/app/code/Magento/Backup/README.md @@ -8,9 +8,9 @@ For more information about this module, see [Magento Backups](https://docs.magen ## Extensibility -Extension developers can interact with the Magento_Backup module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Backup module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Backup module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Backup module. ### Layouts @@ -21,8 +21,8 @@ This module introduces the following layouts and layout handles in the `view/adm `backup_index_grid` `backup_index_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Catalog/README.md b/app/code/Magento/Catalog/README.md index 5b84d1d2e7ec7..0e43661ba8cae 100644 --- a/app/code/Magento/Catalog/README.md +++ b/app/code/Magento/Catalog/README.md @@ -9,7 +9,7 @@ Catalog module provides API filtering that allows to limit product selection wit ## Structure [Learn about a typical file structure for a Magento 2 module] - (https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html). + (https://developer.adobe.com/commerce/php/development/build/component-file-structure/). ## Observer This module observes the following events: diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index a1b2202309d62..b90d59997b87a 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -218,7 +218,7 @@ <field id="catalog_media_url_format" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1"> <label>Catalog media URL format</label> <source_model>Magento\Catalog\Model\Config\Source\Web\CatalogMediaUrlFormat</source_model> - <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> + <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> </field> </group> </section> diff --git a/app/code/Magento/CatalogAnalytics/README.md b/app/code/Magento/CatalogAnalytics/README.md index bfea74e7ddd88..7b6ee7e9ae009 100644 --- a/app/code/Magento/CatalogAnalytics/README.md +++ b/app/code/Magento/CatalogAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_CatalogAnalytics module -The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php index 4b9383b9eb106..aa5af91b75fbe 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php @@ -17,8 +17,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php index e0375471acf19..508b9377cc098 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php index d280df7e9fe1e..f6a73f30741ed 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php @@ -17,8 +17,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php index 4b42c6498c942..da38af7ad4ae3 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php index c3649496f2be8..d2bb8f6456376 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php index 10123c9c5a103..56c931edccdef 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php index e530b0d83c9c4..a4773db7d20b8 100644 --- a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php +++ b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php @@ -14,8 +14,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.3.0 */ interface RegisterProductSaleInterface diff --git a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php index 5d5f22580b1e4..ad543c5e3e5d8 100644 --- a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php +++ b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php @@ -11,8 +11,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.3.0 */ interface RevertProductSaleInterface diff --git a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php index 4436f3b220c2c..54ffab34e8c23 100644 --- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockConfigurationInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php index 5c3c82701339a..245cebc6e4a7b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php index e3288d355f742..c9fef8f0f6115 100644 --- a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockIndexInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php index 19c5f597d4b36..9ff9497c705da 100644 --- a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php index 41b96b0d5ccd0..d81a933fb042b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php index a3fca303236b4..ec0906ca5471d 100644 --- a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockManagementInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php index 07bf2746338d9..3021dca1e391f 100644 --- a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRegistryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php index f38d4a2ca91b3..0492ba1cb5480 100644 --- a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php index ad7291281ed3e..1b09a1a39b869 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStateInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php index cd26a575b676e..a558d834be034 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php index b120b93c9193e..6f609cf18fb1b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php index e7918e32f78a2..5008836c2997b 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php @@ -14,8 +14,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Minsaleqty extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray { diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php index 79aa47b33ea10..407c338c0ae4e 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php @@ -16,8 +16,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Stock extends \Magento\Framework\Data\Form\Element\Select { diff --git a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php index 909ec9346ebf0..6bbfdfff3017e 100644 --- a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php +++ b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php @@ -16,8 +16,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Qtyincrements extends Template implements IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php index cb7d68c92ef6f..e743ac6cda21f 100644 --- a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php +++ b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class DefaultStockqty extends AbstractStockqty implements \Magento\Framework\DataObject\IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Helper/Stock.php b/app/code/Magento/CatalogInventory/Helper/Stock.php index e79d2098be68a..cc47f912ddd5b 100644 --- a/app/code/Magento/CatalogInventory/Helper/Stock.php +++ b/app/code/Magento/CatalogInventory/Helper/Stock.php @@ -20,8 +20,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.0.2 */ class Stock diff --git a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php index c2715241fbe1d..53630dcbbc968 100644 --- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php @@ -22,8 +22,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Item extends \Magento\CatalogInventory\Model\Stock\Item implements IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php index 59c4722c3aadb..ac4690d46be88 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -27,8 +27,8 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class QuantityValidator { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php index fceb079b1abe2..7236278df024c 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php @@ -33,8 +33,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class DefaultStock extends AbstractIndexer implements StockInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php index 4a78babd03201..db31c47b84700 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php @@ -13,8 +13,8 @@ * @since 100.1.0 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface QueryProcessorInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php index e111a5267da77..ed762bdf3fa19 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php index f109643bc09c5..b1c35950304aa 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php @@ -14,8 +14,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class StockFactory { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php index adf62b75b2adb..bb38c03f58545 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php @@ -24,8 +24,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.0.2 */ class Status extends AbstractDb diff --git a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php index 59d359433c268..dbbde539d573c 100644 --- a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php +++ b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Backorders implements \Magento\Framework\Option\ArrayInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Source/Stock.php b/app/code/Magento/CatalogInventory/Model/Source/Stock.php index bc9b8471ccd8b..84997907c4f2e 100644 --- a/app/code/Magento/CatalogInventory/Model/Source/Stock.php +++ b/app/code/Magento/CatalogInventory/Model/Source/Stock.php @@ -19,8 +19,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Stock extends AbstractSource { diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php index bbba3498ab03f..e1abb020b9ace 100644 --- a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php +++ b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php @@ -9,8 +9,8 @@ * Interface StockRegistryProviderInterface * * @deprecated 100.3.2 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRegistryProviderInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php index 2cc69513f31b7..156520e4aa8e7 100644 --- a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php +++ b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php @@ -11,8 +11,8 @@ * Interface StockStateProviderInterface * * @deprecated 100.3.2 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStateProviderInterface { diff --git a/app/code/Magento/CatalogUrlRewrite/README.md b/app/code/Magento/CatalogUrlRewrite/README.md index c0e605da6d2c1..a03229147129c 100644 --- a/app/code/Magento/CatalogUrlRewrite/README.md +++ b/app/code/Magento/CatalogUrlRewrite/README.md @@ -4,8 +4,8 @@ This module generate url rewrite fields for catalog and product. ## Extensibility -Extension developers can interact with the Magento_CatalogUrlRewrite module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CatalogUrlRewrite module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CatalogUrlRewrite module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CatalogUrlRewrite module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. \ No newline at end of file +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/README.md b/app/code/Magento/ConfigurableProduct/README.md index b0cc21d1bc77e..1a693b0db94eb 100644 --- a/app/code/Magento/ConfigurableProduct/README.md +++ b/app/code/Magento/ConfigurableProduct/README.md @@ -10,13 +10,13 @@ For example, store owner sells t-shirts in two colors and three sizes. `ConfigurableProduct/` - the directory that declares ConfigurableProduct metadata used by the module. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_ConfigurableProduct module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ConfigurableProduct module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ConfigurableProduct module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ConfigurableProduct module. ## Additional information @@ -24,7 +24,7 @@ Extension developers can interact with the Magento_ConfigurableProduct module. F Modify the value of the `gallery_switch_strategy` variable in the theme view.xml file to configure how gallery images should be updated when a user switches between product configurations. -Learn how to [configure variables](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#view_xml_vars) in the view.xml file. +Learn how to [configure variables](https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#view_xml_vars) in the view.xml file. There are two available values for the `gallery_switch_strategy` variable: diff --git a/app/code/Magento/Csp/README.md b/app/code/Magento/Csp/README.md index 5a7305ca073f0..0cd2cbb907054 100644 --- a/app/code/Magento/Csp/README.md +++ b/app/code/Magento/Csp/README.md @@ -4,8 +4,8 @@ provides a way for extension and theme developers to configure CSP headers for t ## Extensibility -Extension developers can interact with the Magento_Csp module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Csp module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Csp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Csp module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php index ca9bf4dc7afd6..12a2f3f4ff2ac 100644 --- a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php @@ -51,7 +51,7 @@ public function getById($customerId); * Retrieve customers which match a specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CustomerRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php index f6ba387e913b2..3a62580b000b3 100644 --- a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php @@ -42,7 +42,7 @@ public function getById($id); * be filtered by tax class. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#GroupRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php index 292f41e241e0d..1be4f684e9b9d 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php @@ -407,7 +407,7 @@ public function getById($customerId) * Retrieve customers which match a specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CustomerRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/README.md b/app/code/Magento/Customer/README.md index f5667078a379b..0760482d171d8 100644 --- a/app/code/Magento/Customer/README.md +++ b/app/code/Magento/Customer/README.md @@ -50,15 +50,15 @@ The Magento_Customer module creates the following tables in the database: - `customer_visitor` - `customer_log` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Customer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Customer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Customer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Customer module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -160,7 +160,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `customer_address_index` - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs @@ -343,8 +343,8 @@ More information can get at articles: - [Customer Configurations](https://docs.magento.com/user-guide/configuration/customers/customer-configuration.html) - [Customer Attributes](https://docs.magento.com/user-guide/stores/attributes-customer.html) - [Customer Address Attributes](https://docs.magento.com/user-guide/stores/attributes-customer-address.html) -- [EAV And Extension Attributes](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/attributes.html) -- [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html) +- [EAV And Extension Attributes](https://developer.adobe.com/commerce/php/development/components/attributes/) +- [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html) ### Console commands @@ -363,4 +363,4 @@ Cron group configuration can be set at `etc/crontab.xml`: This module introduces the following indexers: - `customer_grid` - customer grid indexer -[Learn how to manage the indexers](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-index.html). +[Learn how to manage the indexers](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/manage-indexers.html). diff --git a/app/code/Magento/CustomerAnalytics/README.md b/app/code/Magento/CustomerAnalytics/README.md index 37ac79472bb2f..b9cc560cea7e0 100644 --- a/app/code/Magento/CustomerAnalytics/README.md +++ b/app/code/Magento/CustomerAnalytics/README.md @@ -9,10 +9,10 @@ Before installing this module, note that the Magento_CustomerAnalytics is depend - `Magento_Customer` - `Magento_Analytics` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional data More information can get at articles: -- [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/overview.html) -- [Data collection for advanced reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/data-collection.html) +- [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/) +- [Data collection for advanced reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/data-collection/) diff --git a/app/code/Magento/CustomerDownloadableGraphQl/README.md b/app/code/Magento/CustomerDownloadableGraphQl/README.md index dba15882434d0..b4ae77451c07d 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/README.md +++ b/app/code/Magento/CustomerDownloadableGraphQl/README.md @@ -9,7 +9,7 @@ Before installing this module, note that the Magento_CustomerDownloadableGraphQl - `Magento_GraphQl` - `Magento_DownloadableGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -25,4 +25,4 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent - `customerDownloadableProducts` query - retrieve the list of purchased downloadable products for the logged-in customer -[Learn more about customerDownloadableProducts query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer-downloadable-products.html). +[Learn more about customerDownloadableProducts query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/downloadable-products/). diff --git a/app/code/Magento/CustomerGraphQl/README.md b/app/code/Magento/CustomerGraphQl/README.md index f632f52b3584b..fd9955b3ca9c5 100644 --- a/app/code/Magento/CustomerGraphQl/README.md +++ b/app/code/Magento/CustomerGraphQl/README.md @@ -13,7 +13,7 @@ Before disabling or uninstalling this module, note that the following modules de - `Magento_WishlistGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -30,5 +30,5 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent - `customer` query - returns information about the logged-in customer, store credit history and customer’s wishlist - `isEmailAvailable` query - checks whether the specified email has already been used to create a customer account. A value of true indicates the email address is available, and the customer can use the email address to create an account -[Learn more about customer query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer.html). -[Learn more about isEmailAvailable query](https://devdocs.magento.com/guides/v2.4/graphql/queries/is-email-available.html). +[Learn more about customer query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/customer/). +[Learn more about isEmailAvailable query](https://developer.adobe.com/commerce/webapi/graphql/usage/is-email-available.html). diff --git a/app/code/Magento/CustomerImportExport/README.md b/app/code/Magento/CustomerImportExport/README.md index 2e7a915d1b5ac..a3bd8e8e75ace 100644 --- a/app/code/Magento/CustomerImportExport/README.md +++ b/app/code/Magento/CustomerImportExport/README.md @@ -4,7 +4,7 @@ This module handles the import and export of the customers data and related addr ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -19,7 +19,7 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `customer_import_export_index_exportxml` - `customer_index_grid_block` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/Deploy/Model/Filesystem.php b/app/code/Magento/Deploy/Model/Filesystem.php index 59a2f0f7cfe9d..f72630c954e8d 100644 --- a/app/code/Magento/Deploy/Model/Filesystem.php +++ b/app/code/Magento/Deploy/Model/Filesystem.php @@ -29,8 +29,8 @@ class Filesystem * Access permissions to the files are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html */ const PERMISSIONS_FILE = 0640; @@ -41,8 +41,8 @@ class Filesystem * Access permissions to the directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html */ const PERMISSIONS_DIR = 0750; @@ -305,8 +305,8 @@ public function cleanupFilesystem($directoryCodeList) * Access permissions to the files and directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files and directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html * @throws \Magento\Framework\Exception\FileSystemException */ protected function changePermissions($directoryCodeList, $dirPermissions, $filePermissions) @@ -331,8 +331,8 @@ protected function changePermissions($directoryCodeList, $dirPermissions, $fileP * Access permissions to the files and directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files and directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html * @throws \Magento\Framework\Exception\FileSystemException */ public function lockStaticResources() diff --git a/app/code/Magento/Developer/README.md b/app/code/Magento/Developer/README.md index f0ccdb7217ec7..d5a6a2cee9d46 100644 --- a/app/code/Magento/Developer/README.md +++ b/app/code/Magento/Developer/README.md @@ -4,8 +4,8 @@ The Magento_Developer module provides functionality to make it easier to develop ## Extensibility -Extension developers can interact with the Magento_Developer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Developer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Developer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Developer module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. \ No newline at end of file +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. \ No newline at end of file diff --git a/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php b/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php index be4b5a3fa0fe5..224fde25460c1 100644 --- a/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php +++ b/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php @@ -17,7 +17,7 @@ interface AttributeSetRepositoryInterface * Retrieve list of Attribute Sets * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#AttributeSetRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/EavGraphQl/README.md b/app/code/Magento/EavGraphQl/README.md index ba1dc948c8087..6bf418c798dec 100644 --- a/app/code/Magento/EavGraphQl/README.md +++ b/app/code/Magento/EavGraphQl/README.md @@ -4,12 +4,12 @@ Magento_EavGraphQl module extends Magento_GraphQl and Magento_Eav modules to pro ## Installation details -For information about enabling or disabling a module in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information You can get more information at articles: - [GraphQl In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql). -- [customAttributeMetadata query](https://devdocs.magento.com/guides/v2.4/graphql/queries/custom-attribute-metadata.html). -- [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html) +- [customAttributeMetadata query](https://developer.adobe.com/commerce/webapi/graphql/schema/store/queries/custom-attribute-metadata/). +- [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html) diff --git a/app/code/Magento/Elasticsearch/README.md b/app/code/Magento/Elasticsearch/README.md index 6c2322cc5d9d9..835cd4ab37f19 100644 --- a/app/code/Magento/Elasticsearch/README.md +++ b/app/code/Magento/Elasticsearch/README.md @@ -10,7 +10,7 @@ The module implements Magento_Search library interfaces. The Magento_Elasticsearch module is one of the base Magento 2 modules. You cannot disable or uninstall this module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -18,15 +18,15 @@ For information about a module installation in Magento 2, see [Enable or disable `SearchAdapter/` - the directory that contains solutions for adapting ElasticSearch query searching. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about ElasticSearch are at articles: - [Configuring Catalog Search](https://docs.magento.com/user-guide/catalog/search-configuration.html). -- [Installation Guide/Elasticsearch](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/elasticsearch.html). -- [Configure and maintain Elasticsearch](https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-overview.html). -- Magento Commerce Cloud - [set up Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html). +- [Installation Guide/Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/search-engine/overview.html). +- [Configure and maintain Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/search/overview-search.html). +- Magento Commerce Cloud - [set up Elasticsearch service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/elasticsearch.html). diff --git a/app/code/Magento/Elasticsearch7/README.md b/app/code/Magento/Elasticsearch7/README.md index c484694e7d267..d520f5efc3b91 100644 --- a/app/code/Magento/Elasticsearch7/README.md +++ b/app/code/Magento/Elasticsearch7/README.md @@ -8,21 +8,21 @@ The module implements Magento_Search library interfaces. The Magento_Elasticsearch7 module is one of the base Magento 2 modules. Disable or uninstall this module is not recommends. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `SearchAdapter/` - the directory that contains solutions for adapting ElasticSearch query searching. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about ElasticSearch are at articles: - [Configuring Catalog Search](https://docs.magento.com/user-guide/catalog/search-configuration.html). -- [Installation Guide/Elasticsearch](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/elasticsearch.html). -- [Configure and maintain Elasticsearch](https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-overview.html). -- Magento Commerce Cloud - [set up Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html). +- [Installation Guide/Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/search-engine/overview.html). +- [Configure and maintain Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/search/overview-search.html). +- Magento Commerce Cloud - [set up Elasticsearch service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/elasticsearch.html). diff --git a/app/code/Magento/Email/README.md b/app/code/Magento/Email/README.md index d2c6a4e6901c2..3844f0a1e3db8 100644 --- a/app/code/Magento/Email/README.md +++ b/app/code/Magento/Email/README.md @@ -8,33 +8,33 @@ This module adds the page to create/edit email template at the admin side and po The Magento_Email module is one of the base Magento 2 modules. You cannot disable or uninstall this module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Email module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Email module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Email module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Email module. ### Layouts The module introduces layout handles in the `view/adminhtml/layout` directory. -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components You can extend product and category updates using the configuration files located in the `view/adminhtml/ui_component` directory. -For information about a UI component in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about email templates are at articles: - [Marketing/Email](https://docs.magento.com/user-guide/marketing/email-templates.html) - [Email templates list](https://docs.magento.com/user-guide/marketing/email-template-list.html) -- [Customize email templates](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-email.html) -- [Migrating custom email templates](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-email-migration.html#nested-arrays) +- [Customize email templates](https://developer.adobe.com/commerce/frontend-core/guide/templates/email/) +- [Migrating custom email templates](https://developer.adobe.com/commerce/frontend-core/guide/templates/email-migration/#nested-arrays) diff --git a/app/code/Magento/EncryptionKey/README.md b/app/code/Magento/EncryptionKey/README.md index ee28c66b80c4c..07838cceeb3f2 100644 --- a/app/code/Magento/EncryptionKey/README.md +++ b/app/code/Magento/EncryptionKey/README.md @@ -4,9 +4,9 @@ The Magento_EncryptionKey module provides an advanced encryption model to protec ## Extensibility -Extension developers can interact with the Magento_EncryptionKey module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_EncryptionKey module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_EncryptionKey module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_EncryptionKey module. ### Layouts @@ -16,6 +16,6 @@ This module introduces the following layouts and layout handles in the `view/adm ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). Some more information you can get at [Encryption Key](https://docs.magento.com/user-guide/system/encryption-key.html) article. diff --git a/app/code/Magento/Fedex/README.md b/app/code/Magento/Fedex/README.md index 641ed68a46609..b872b53bf879e 100644 --- a/app/code/Magento/Fedex/README.md +++ b/app/code/Magento/Fedex/README.md @@ -4,15 +4,15 @@ This module implements the integration with the FedEx shipping carrier. ## Installation details -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Fedex module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Fedex module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Fedex module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Fedex module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -25,4 +25,4 @@ This module introduces the following layouts in the `view/frontend/layout` direc You can get more information about delivery method in magento at the articles: - [FedEx Configuration Settings](https://docs.magento.com/user-guide/shipping/fedex.html) - [Delivery Methods Configuration](https://docs.magento.com/user-guide/configuration/sales/delivery-methods.html) -- [Add custom shipping carrier](https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout-add-custom-carrier.html) +- [Add custom shipping carrier](https://developer.adobe.com/commerce/php/tutorials/frontend/custom-checkout/add-shipping-carrier/) diff --git a/app/code/Magento/GiftMessage/README.md b/app/code/Magento/GiftMessage/README.md index 127b61e3c2c54..6c807143384af 100644 --- a/app/code/Magento/GiftMessage/README.md +++ b/app/code/Magento/GiftMessage/README.md @@ -23,15 +23,15 @@ This module modifies the following tables in the database: - `sales_order` - adds column `gift_message_id` - `sales_order_item` - adds columns `gift_message_id` and `gift_message_available` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GiftMessage module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GiftMessage module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GiftMessage module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GiftMessage module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -56,7 +56,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `checkout_cart_index` - `checkout_cart_item_renderers` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs diff --git a/app/code/Magento/GiftMessageGraphQl/README.md b/app/code/Magento/GiftMessageGraphQl/README.md index 1b38bbc5ff57e..401f718b791df 100644 --- a/app/code/Magento/GiftMessageGraphQl/README.md +++ b/app/code/Magento/GiftMessageGraphQl/README.md @@ -6,7 +6,7 @@ This module provides information about gift messages for carts, cart items, orde Before installing this module, note that the Magento_GiftMessageGraphQl is dependent on the Magento_GiftMessage module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/GoogleAdwords/README.md b/app/code/Magento/GoogleAdwords/README.md index eb28c1af96b93..8dd6ab7b2d32b 100644 --- a/app/code/Magento/GoogleAdwords/README.md +++ b/app/code/Magento/GoogleAdwords/README.md @@ -6,7 +6,7 @@ This module implements the integration with the Google AdWords service. Before installing this module, note that the Magento_GoogleAdwords is dependent on the Magento_Checkout module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -19,7 +19,7 @@ Extension developers can interact with the Magento_GoogleAdwords module. For mor This module introduces the following layouts in the `view/frontend/layout` directory: - `checkout_onepage_success` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleAnalytics/README.md b/app/code/Magento/GoogleAnalytics/README.md index bfc5bcc6eb391..3a26674cdb614 100644 --- a/app/code/Magento/GoogleAnalytics/README.md +++ b/app/code/Magento/GoogleAnalytics/README.md @@ -8,7 +8,7 @@ Before installing this module, note that the Magento_GoogleAnalytics is dependen Before disabling or uninstalling this module, note that the Magento_GoogleOptimizer module depends on this module -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -16,14 +16,14 @@ Extension developers can interact with the Magento_GoogleAnalytics module. For m [The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAnalytics module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts This module introduces the following layouts in the `view/frontend/layout` directory: - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleGtag/README.md b/app/code/Magento/GoogleGtag/README.md index 612297081a26e..32ec59055f76b 100644 --- a/app/code/Magento/GoogleGtag/README.md +++ b/app/code/Magento/GoogleGtag/README.md @@ -8,7 +8,7 @@ Before installing this module, note that the Magento_GoogleGtag is dependent on Before disabling or uninstalling this module, note that the Magento_GoogleOptimizer module depends on this module -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -16,7 +16,7 @@ Extension developers can interact with the Magento_GoogleGtag module. For more i [The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleGtag module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -24,7 +24,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `default` - `checkout_onepage_success` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleOptimizer/README.md b/app/code/Magento/GoogleOptimizer/README.md index 83202eacdcd83..dd2011e73e2d8 100644 --- a/app/code/Magento/GoogleOptimizer/README.md +++ b/app/code/Magento/GoogleOptimizer/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GoogleOptimizer is dependen - `Magento_Cms` - `Magento_Ui` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `catalog_product_view` - `cms_page_view` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/GraphQl/README.md b/app/code/Magento/GraphQl/README.md index ff330ce383755..de575fae59b5f 100644 --- a/app/code/Magento/GraphQl/README.md +++ b/app/code/Magento/GraphQl/README.md @@ -25,13 +25,13 @@ The following modules depend on this module: - `Magento_ReviewGraphQl` - `Magento_StoreGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GraphQl module. ## Additional information diff --git a/app/code/Magento/GraphQlCache/README.md b/app/code/Magento/GraphQlCache/README.md index ab0581127acec..32555f1423666 100644 --- a/app/code/Magento/GraphQlCache/README.md +++ b/app/code/Magento/GraphQlCache/README.md @@ -10,15 +10,15 @@ Before installing this module, note that the Magento_GraphQlCache module is depe - `Magento_PageCache` - `Magento_GraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GraphQlCache module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GraphQlCache module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GraphQlCache module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GraphQlCache module. ## Additional information - [Learn more about GraphQl In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql). -- [Learn more about GraphQl Caching In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql/caching.html). +- [Learn more about GraphQl Caching In Magento 2](https://developer.adobe.com/commerce/webapi/graphql/usage/caching/). diff --git a/app/code/Magento/GroupedCatalogInventory/README.md b/app/code/Magento/GroupedCatalogInventory/README.md index 5091aedd14f54..3930fcffa6e05 100644 --- a/app/code/Magento/GroupedCatalogInventory/README.md +++ b/app/code/Magento/GroupedCatalogInventory/README.md @@ -9,10 +9,10 @@ Before installing this module, note that the Magento_GroupedCatalogInventory mod - `Magento_Catalog` - `Magento_GroupedProduct` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GroupedCatalogInventory module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedCatalogInventory module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedCatalogInventory module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedCatalogInventory module. diff --git a/app/code/Magento/GroupedImportExport/README.md b/app/code/Magento/GroupedImportExport/README.md index 28b66412d97ca..b092f88f421bd 100644 --- a/app/code/Magento/GroupedImportExport/README.md +++ b/app/code/Magento/GroupedImportExport/README.md @@ -5,13 +5,13 @@ This module is designed to extend existing functionality of Magento_CatalogImpor ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GroupedImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedImportExport module. ## Additional information diff --git a/app/code/Magento/GroupedProduct/README.md b/app/code/Magento/GroupedProduct/README.md index b2b3fffce0180..27bfb69ae32c5 100644 --- a/app/code/Magento/GroupedProduct/README.md +++ b/app/code/Magento/GroupedProduct/README.md @@ -21,7 +21,7 @@ Before disabling or uninstalling this module, note that the following modules de - `Magento_GroupedProductGraphQl` - `Magento_MsrpGroupedProduct` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -31,9 +31,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_GroupedProduct module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedProduct module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedProduct module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedProduct module. ### Layouts @@ -68,7 +68,7 @@ This module introduces the following layouts in the `view/frontend/layout`, `vie - `view/base/layout`: - `catalog_product_prices` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/GroupedProductGraphQl/README.md b/app/code/Magento/GroupedProductGraphQl/README.md index f3aa6be9ed4f1..c6fc44ab4e2c6 100644 --- a/app/code/Magento/GroupedProductGraphQl/README.md +++ b/app/code/Magento/GroupedProductGraphQl/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GroupedProductGraphQl is de - `Magento_GraphQl` - `Magento_CatalogGraphQlr` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/ImportExport/README.md b/app/code/Magento/ImportExport/README.md index 9a130aee1102e..e68898e55610f 100644 --- a/app/code/Magento/ImportExport/README.md +++ b/app/code/Magento/ImportExport/README.md @@ -11,7 +11,7 @@ The Magento_ImportExport module creates the following tables in the database: All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -21,9 +21,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_ImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ImportExport module. ### Layouts @@ -67,7 +67,7 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( - `exportProcessor` - consumer to run export process -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). #### Create custom import entity @@ -80,6 +80,6 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( 2. Create an export model You can get more information about import/export processes in magento at the articles: -- [Create custom import entity](https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/custom-import-entity.html) +- [Create custom import entity](https://developer.adobe.com/commerce/php/tutorials/backend/create-custom-import-entity/) - [Import](https://docs.magento.com/user-guide/system/data-import.html) - [Export](https://docs.magento.com/user-guide/system/data-export.html) diff --git a/app/code/Magento/Indexer/Model/Message/Invalid.php b/app/code/Magento/Indexer/Model/Message/Invalid.php index 086d06a88fa85..d7146f75577b3 100644 --- a/app/code/Magento/Indexer/Model/Message/Invalid.php +++ b/app/code/Magento/Indexer/Model/Message/Invalid.php @@ -75,7 +75,7 @@ public function getText() return __( 'One or more <a href="%1">indexers are invalid</a>. Make sure your <a href="%2" target="_blank">Magento cron job</a> is running.', $url, - 'https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#create-or-remove-the-magento-crontab' + 'https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html#create-or-remove-the-magento-crontab' ); //@codingStandardsIgnoreEnd } diff --git a/app/code/Magento/Indexer/README.md b/app/code/Magento/Indexer/README.md index 2cba0b43be0d3..831387376e085 100644 --- a/app/code/Magento/Indexer/README.md +++ b/app/code/Magento/Indexer/README.md @@ -22,7 +22,7 @@ The Magento_Indexer module creates the following tables in the database: - `indexer_state` - `mview_state` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -32,9 +32,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_Indexer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Indexer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Indexer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Indexer module. ### Events @@ -53,7 +53,7 @@ The module dispatches the following events: - `clean_cache_by_tags` event in the `\Magento\Indexer\Model\Processor\CleanCache::afterReindexAllInvalid` method. Parameters: - `object` is a `context` object (`Magento\Framework\Indexer\CacheContext` class) -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -61,7 +61,7 @@ This module introduces the following layout handles in the `view/adminhtml/layou - `indexer_indexer_list` - `indexer_indexer_list_grid` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information @@ -94,8 +94,8 @@ Cron group configuration can be set at `etc/crontab.xml`: [Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). More information can get at articles: -- [Learn more about indexing](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing.html) +- [Learn more about indexing](https://developer.adobe.com/commerce/php/development/components/indexing/) - [Learn more about Indexer optimization](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexer-batch.html) -- [Learn more how to add custom indexer](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing-custom.html) -- [Learn how to manage indexers](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-index.html) +- [Learn more how to add custom indexer](https://developer.adobe.com/commerce/php/development/components/indexing/custom-indexer/) +- [Learn how to manage indexers](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/manage-indexers.html) - [Learn more about Index Management](https://docs.magento.com/user-guide/system/index-management.html) diff --git a/app/code/Magento/InstantPurchase/README.md b/app/code/Magento/InstantPurchase/README.md index 66b14b0c72c8b..639e50b214d05 100644 --- a/app/code/Magento/InstantPurchase/README.md +++ b/app/code/Magento/InstantPurchase/README.md @@ -4,7 +4,7 @@ This module allows the Customer to place the order in seconds without going thro ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -14,9 +14,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_InstantPurchase module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_InstantPurchase module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_InstantPurchase module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_InstantPurchase module. ### Public APIs @@ -59,7 +59,7 @@ All payments created for instant purchase also have `'instant-purchase' => true` ### Payment method integration -Instant purchase support may be implemented for any payment method with [vault support](https://devdocs.magento.com/guides/v2.4/payments-integrations/vault/vault-intro.html). +Instant purchase support may be implemented for any payment method with [vault support](https://developer.adobe.com/commerce/php/development/payments-integrations/vault/). Basic implementation provided in `Magento\InstantPurchase\PaymentMethodIntegration` should be enough in most cases. It is not enabled by default to avoid issues on production sites and authors of vault payment method should verify correct work for instant purchase manually. To enable basic implementation just add single option to configuration of payemnt method in `config.xml`: @@ -96,7 +96,7 @@ Basic implementation is a good start point but it's recommended to provide own i The `Magento_InstantPurchase` module does not introduce backward incompatible changes. -You can track [backward incompatible changes in patch releases](https://devdocs.magento.com/guides/v2.4/release-notes/backward-incompatible-changes/reference.html). +You can track [backward incompatible changes in patch releases](https://developer.adobe.com/commerce/php/development/backward-incompatible-changes/highlights/reference.html). *** diff --git a/app/code/Magento/Integration/README.md b/app/code/Magento/Integration/README.md index 5f5e6b990d1d6..fce2423034f00 100644 --- a/app/code/Magento/Integration/README.md +++ b/app/code/Magento/Integration/README.md @@ -21,13 +21,13 @@ The Magento_Integration module creates the following tables in the database: - `integration` - `oauth_token_request_log` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Integration module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Integration module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Integration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Integration module. ### Events @@ -51,7 +51,7 @@ This module introduces the following layout handles in the `view/adminhtml/layou - `adminhtml_integration_tokensdialog` - `adminhtml_integration_tokensexchange` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs @@ -102,4 +102,4 @@ Cron group configuration can be set at `etc/crontab.xml`: More information can get at articles: - [Learn more about an Integration](https://docs.magento.com/user-guide/system/integrations.html) -- [Lear how to create an Integration](https://devdocs.magento.com/guides/v2.4/get-started/create-integration.html) +- [Lear how to create an Integration](https://developer.adobe.com/commerce/webapi/get-started/create-integration/) diff --git a/app/code/Magento/LayeredNavigation/README.md b/app/code/Magento/LayeredNavigation/README.md index 77f96ef0c5645..aac70b71ec28c 100644 --- a/app/code/Magento/LayeredNavigation/README.md +++ b/app/code/Magento/LayeredNavigation/README.md @@ -6,7 +6,7 @@ This module can be removed from Magento installation without impact on the appli ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -21,7 +21,7 @@ This module introduces the following layout handles in the `view/frontend/layout - `catalog_category_view_type_layered_without_children` - `catalogsearch_result_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/LoginAsCustomer/README.md b/app/code/Magento/LoginAsCustomer/README.md index bdc57c3bd41cc..4efe9cca3c55a 100644 --- a/app/code/Magento/LoginAsCustomer/README.md +++ b/app/code/Magento/LoginAsCustomer/README.md @@ -6,7 +6,7 @@ This module is responsible for ability to login into customer account using the The Magento_LoginAsCustomer module creates the `login_as_customer` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerAssistance/README.md b/app/code/Magento/LoginAsCustomerAssistance/README.md index 8575763f075b8..2fc609f459654 100644 --- a/app/code/Magento/LoginAsCustomerAssistance/README.md +++ b/app/code/Magento/LoginAsCustomerAssistance/README.md @@ -6,7 +6,7 @@ This module provides possibility to enable/disable LoginAsCustomer functionality The Magento_LoginAsCustomerAssistance module creates the `login_as_customer_assistance_allowed` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerGraphQl/README.md b/app/code/Magento/LoginAsCustomerGraphQl/README.md index 9e8c7ba71b6c5..8a42feab75bc2 100755 --- a/app/code/Magento/LoginAsCustomerGraphQl/README.md +++ b/app/code/Magento/LoginAsCustomerGraphQl/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GroupedProductGraphQl is de - Magento_Store - Magento_CatalogGraphQlr -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerLog/README.md b/app/code/Magento/LoginAsCustomerLog/README.md index 88d843df2ae0a..31a80010c7076 100644 --- a/app/code/Magento/LoginAsCustomerLog/README.md +++ b/app/code/Magento/LoginAsCustomerLog/README.md @@ -6,14 +6,14 @@ This module provides log for Login as Customer functionality The Magento_LoginAsCustomerLog module creates the `magento_login_as_customer_log` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ### Layouts This module introduces the following layouts in the `view/adminhtml/layout` directory: - `loginascustomer_log_log_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/Marketplace/README.md b/app/code/Magento/Marketplace/README.md index c942a830c1dd3..f4fd482be72ca 100644 --- a/app/code/Magento/Marketplace/README.md +++ b/app/code/Magento/Marketplace/README.md @@ -4,7 +4,7 @@ This module allows to display partners of Magento in the backend. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -18,4 +18,4 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `marketplace_index_index` - `marketplace_partners_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/MediaContent/README.md b/app/code/Magento/MediaContent/README.md index 579d7b95fffd3..b439491adcf4f 100644 --- a/app/code/Magento/MediaContent/README.md +++ b/app/code/Magento/MediaContent/README.md @@ -4,10 +4,10 @@ The Magento_MediaContent module provides implementations for managing relations ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentApi/README.md b/app/code/Magento/MediaContentApi/README.md index 4571bb956e7ac..b07a2f0893d4d 100644 --- a/app/code/Magento/MediaContentApi/README.md +++ b/app/code/Magento/MediaContentApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentApi module provides interfaces for managing relations be ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentCatalog/README.md b/app/code/Magento/MediaContentCatalog/README.md index 0fb59f6bb9bc0..f77b3392d6c8e 100644 --- a/app/code/Magento/MediaContentCatalog/README.md +++ b/app/code/Magento/MediaContentCatalog/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCatalog provides the implementation of MediaContent func ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentCms/README.md b/app/code/Magento/MediaContentCms/README.md index 2ea462cb70e3a..cad831f180169 100644 --- a/app/code/Magento/MediaContentCms/README.md +++ b/app/code/Magento/MediaContentCms/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCms provides the implementation of MediaContent function ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronization/README.md b/app/code/Magento/MediaContentSynchronization/README.md index 3fb2c28f063b8..7a553def8aa7b 100644 --- a/app/code/Magento/MediaContentSynchronization/README.md +++ b/app/code/Magento/MediaContentSynchronization/README.md @@ -5,10 +5,10 @@ media asset information. ## Extensibility -Extension developers can interact with the Magento_MediaContentSynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContentSynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContentSynchronization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContentSynchronization module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationApi/README.md b/app/code/Magento/MediaContentSynchronizationApi/README.md index b074271149e28..419274a7ecab7 100644 --- a/app/code/Magento/MediaContentSynchronizationApi/README.md +++ b/app/code/Magento/MediaContentSynchronizationApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentSynchronizationApi module is responsible for the media g ## Extensibility -Extension developers can interact with the Magento_MediaContentSynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContentSynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContentSynchronizationApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContentSynchronizationApi module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationCatalog/README.md b/app/code/Magento/MediaContentSynchronizationCatalog/README.md index 9f985aa0afa62..fb130449e210e 100644 --- a/app/code/Magento/MediaContentSynchronizationCatalog/README.md +++ b/app/code/Magento/MediaContentSynchronizationCatalog/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCatalog provides the implementation of MediaContentSyncr ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationCms/README.md b/app/code/Magento/MediaContentSynchronizationCms/README.md index 5873102dfaa7e..afd77836ee2e7 100644 --- a/app/code/Magento/MediaContentSynchronizationCms/README.md +++ b/app/code/Magento/MediaContentSynchronizationCms/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCms provides the implementation of MediaContentSyncroniz ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallery/README.md b/app/code/Magento/MediaGallery/README.md index 74d4cf753cb4d..96e19a9e9d239 100644 --- a/app/code/Magento/MediaGallery/README.md +++ b/app/code/Magento/MediaGallery/README.md @@ -10,16 +10,16 @@ The Magento_MediaGallery module creates the following tables in the database: - `media_gallery_keyword` - `media_gallery_asset_keyword` -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallery module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallery module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallery module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallery module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaGalleryApi/README.md b/app/code/Magento/MediaGalleryApi/README.md index 3bb56ee256d0e..b8c41432fc525 100644 --- a/app/code/Magento/MediaGalleryApi/README.md +++ b/app/code/Magento/MediaGalleryApi/README.md @@ -4,13 +4,13 @@ The Magento_MediaGalleryApi module serves as application program interface (API) ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryApi module. ### Public APIs @@ -57,4 +57,4 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCatalog/README.md b/app/code/Magento/MediaGalleryCatalog/README.md index 668c56baf3ea5..b65c70eb5a4e2 100644 --- a/app/code/Magento/MediaGalleryCatalog/README.md +++ b/app/code/Magento/MediaGalleryCatalog/README.md @@ -4,14 +4,14 @@ The Magento_MediaGalleryCatalog module is responsible for for catalog gallery pr ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCatalog module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCatalog module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalog module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalog module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/README.md b/app/code/Magento/MediaGalleryCatalogIntegration/README.md index 8b5362affc0e2..236b0c49d553f 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/README.md +++ b/app/code/Magento/MediaGalleryCatalogIntegration/README.md @@ -4,7 +4,7 @@ This module extends catalog image uploader functionality. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/MediaGalleryCatalogUi/README.md b/app/code/Magento/MediaGalleryCatalogUi/README.md index b26ddf4c8697b..3d822d0ed14e7 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/README.md +++ b/app/code/Magento/MediaGalleryCatalogUi/README.md @@ -4,20 +4,20 @@ The Magento_MediaGalleryCatalogUi module that implement category grid for media ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCatalogUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCatalogUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalogUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalogUi module. ### Layouts This module introduces the following layouts in the `view/adminhtml/layout` directory: - `media_gallery_catalog_category_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -34,4 +34,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCmsUi/README.md b/app/code/Magento/MediaGalleryCmsUi/README.md index 1152af3c595a9..197a6a4bc4149 100644 --- a/app/code/Magento/MediaGalleryCmsUi/README.md +++ b/app/code/Magento/MediaGalleryCmsUi/README.md @@ -4,13 +4,13 @@ The Magento_MediaGalleryCmsUi module provides Magento_Cms related UI elements to ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCmsUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCmsUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCmsUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCmsUi module. ### UI components @@ -24,4 +24,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryIntegration/README.md b/app/code/Magento/MediaGalleryIntegration/README.md index 676a4eee1cfef..754abc5fbc543 100644 --- a/app/code/Magento/MediaGalleryIntegration/README.md +++ b/app/code/Magento/MediaGalleryIntegration/README.md @@ -5,12 +5,12 @@ The purpose of this module is to keep the integration of enhanced media gallery ## Installation details Before installing this module, note that the Magento_MediaGalleryIntegration is dependent on the Magento_Ui module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryIntegration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryIntegration module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryMetadata/README.md b/app/code/Magento/MediaGalleryMetadata/README.md index ad1dfbf886610..15dd729d2bdd0 100644 --- a/app/code/Magento/MediaGalleryMetadata/README.md +++ b/app/code/Magento/MediaGalleryMetadata/README.md @@ -4,10 +4,10 @@ The purpose of this module is to provide an ability to extract the metadata from ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryMetadata module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryMetadata module. diff --git a/app/code/Magento/MediaGalleryMetadataApi/README.md b/app/code/Magento/MediaGalleryMetadataApi/README.md index 1dc0837ebdad8..09ca6117efa8c 100644 --- a/app/code/Magento/MediaGalleryMetadataApi/README.md +++ b/app/code/Magento/MediaGalleryMetadataApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaGalleryMetadataApi module is responsible for the media gallery ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryMetadataApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryMetadataApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryMetadataApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryMetadataApi module. diff --git a/app/code/Magento/MediaGalleryRenditions/README.md b/app/code/Magento/MediaGalleryRenditions/README.md index 990eff5780c2f..51cdd9ed02611 100644 --- a/app/code/Magento/MediaGalleryRenditions/README.md +++ b/app/code/Magento/MediaGalleryRenditions/README.md @@ -4,20 +4,20 @@ The Magento_MediaGalleryRenditions module implements height and width fields for ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryRenditions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryRenditions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryRenditions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryRenditions module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). #### Message Queue Consumer - `media.gallery.renditions.update` - update renditions for given paths, if empty array is provided - all renditions are updated -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). diff --git a/app/code/Magento/MediaGalleryRenditionsApi/README.md b/app/code/Magento/MediaGalleryRenditionsApi/README.md index 9c2753aa464ce..9c40af6bd5dbe 100644 --- a/app/code/Magento/MediaGalleryRenditionsApi/README.md +++ b/app/code/Magento/MediaGalleryRenditionsApi/README.md @@ -4,8 +4,8 @@ The Magento_MediaGalleryRenditionsApi module is responsible for the API implemen ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronization/README.md b/app/code/Magento/MediaGallerySynchronization/README.md index 5937e55b76f69..8c3e631f5eb98 100644 --- a/app/code/Magento/MediaGallerySynchronization/README.md +++ b/app/code/Magento/MediaGallerySynchronization/README.md @@ -5,13 +5,13 @@ media asset information. ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronization module. ## Additional information @@ -23,6 +23,6 @@ Extension developers can interact with the Magento_MediaGallerySynchronization m - `media.gallery.synchronization` - run media files synchronization -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronizationApi/README.md b/app/code/Magento/MediaGallerySynchronizationApi/README.md index afeb2b90ec8ea..0106cb50f9a0a 100644 --- a/app/code/Magento/MediaGallerySynchronizationApi/README.md +++ b/app/code/Magento/MediaGallerySynchronizationApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaGallerySynchronizationApi module is responsible for the media g ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronizationApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronizationApi module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronizationMetadata/README.md b/app/code/Magento/MediaGallerySynchronizationMetadata/README.md index 42d3f0cb53e55..6e1fbd199e651 100644 --- a/app/code/Magento/MediaGallerySynchronizationMetadata/README.md +++ b/app/code/Magento/MediaGallerySynchronizationMetadata/README.md @@ -4,10 +4,10 @@ The purpose of this module is to include assets metadata to media gallery synchr ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronizationMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronizationMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronizationMetadata module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronizationMetadata module. diff --git a/app/code/Magento/MediaGalleryUi/README.md b/app/code/Magento/MediaGalleryUi/README.md index 1a6fc0f4b235c..ce8068f87271c 100644 --- a/app/code/Magento/MediaGalleryUi/README.md +++ b/app/code/Magento/MediaGalleryUi/README.md @@ -6,13 +6,13 @@ The Magento_MediaGalleryUi module is responsible for the media gallery user inte Before installing this module, note that the Magento_MediaGalleryUi is dependent on the Magento_Cms module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryUi module. ### Layouts @@ -20,7 +20,7 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `media_gallery_index_index` - `media_gallery_media_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -40,6 +40,6 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaGalleryUiApi/README.md b/app/code/Magento/MediaGalleryUiApi/README.md index 12e63b5a00959..f4b0d1a1d6dce 100644 --- a/app/code/Magento/MediaGalleryUiApi/README.md +++ b/app/code/Magento/MediaGalleryUiApi/README.md @@ -4,11 +4,11 @@ The Magento_MediaGalleryUiApi module is responsible for the media gallery user i ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaStorage/README.md b/app/code/Magento/MediaStorage/README.md index 9a74cf4ce8425..433d66d2bf459 100644 --- a/app/code/Magento/MediaStorage/README.md +++ b/app/code/Magento/MediaStorage/README.md @@ -9,7 +9,7 @@ Before installing this module, note that the Magento_MediaStorage is dependent o - `Magento_Catalog` - `Magento_Theme` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -19,9 +19,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_MediaStorage module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaStorage module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaStorage module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaStorage module. ## Additional information @@ -33,8 +33,8 @@ Extension developers can interact with the Magento_MediaStorage module. For more - `media.storage.catalog.image.resize` - creates resized product images -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). More information can get at articles: - [Learn how to configure Media Storage Database](https://docs.magento.com/user-guide/system/media-storage-database.html). -- [Learn how to Resize catalog images](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#resize-catalog-images) +- [Learn how to Resize catalog images](https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images) diff --git a/app/code/Magento/Msrp/README.md b/app/code/Magento/Msrp/README.md index 025b215d285a8..deef2e0dcef5e 100644 --- a/app/code/Magento/Msrp/README.md +++ b/app/code/Magento/Msrp/README.md @@ -19,7 +19,7 @@ because they use models and blocks from Magento_Msrp module: - `\Magento\Msrp\Model\Product\Attribute\Source\Type\Price` - `\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type\Price` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing\` - directory contains interfaces and implementation for msrp pricing calculations @@ -31,7 +31,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Pricing\Renderer\` - contains price renderers implementations. For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -50,11 +50,11 @@ For information about a typical file structure of a module in Magento 2, </arguments> </type> ``` - More information about [type configuration](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-file.html). + More information about [type configuration](https://developer.adobe.com/commerce/php/development/build/dependency-injection-file/). - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Events @@ -70,7 +70,7 @@ This module observes the following event: `etc/webapi_soap` - `sales_quote_collect_totals_after` in the `Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver` file. -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts diff --git a/app/code/Magento/MsrpConfigurableProduct/README.md b/app/code/Magento/MsrpConfigurableProduct/README.md index f3f24170c9445..4cf5ab625e8f5 100644 --- a/app/code/Magento/MsrpConfigurableProduct/README.md +++ b/app/code/Magento/MsrpConfigurableProduct/README.md @@ -5,7 +5,7 @@ Provides implementation of msrp price calculation for Configurable Product. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html) +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html) ## Structure @@ -13,13 +13,13 @@ For information about a module installation in Magento 2, see [Enable or disable for Grouped Product (`Magento\MsrpGroupedProduct\Pricing\MsrpPriceCalculator` class). For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Layouts @@ -31,4 +31,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MsrpGroupedProduct/README.md b/app/code/Magento/MsrpGroupedProduct/README.md index 800bf0eedd743..ab7cefc4e0c47 100644 --- a/app/code/Magento/MsrpGroupedProduct/README.md +++ b/app/code/Magento/MsrpGroupedProduct/README.md @@ -5,7 +5,7 @@ Provides implementation of msrp price calculation for Grouped Product. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html) +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html) ## Structure @@ -13,13 +13,13 @@ For information about a module installation in Magento 2, see [Enable or disable for Configurable Product (`Magento\MsrpConfigurableProduct\Pricing\MsrpPriceCalculator` class). For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Layouts @@ -36,4 +36,4 @@ For information about a UI component in Magento 2, see [Overview of UI component Module adds attribute `msrp` to select for the `Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection` in `Magento\MsrpGroupedProduct\Plugin\Model\Product\Type\Grouped` plugin. -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Multishipping/README.md b/app/code/Magento/Multishipping/README.md index 12bda8ae5f21d..7cb91516d4ace 100644 --- a/app/code/Magento/Multishipping/README.md +++ b/app/code/Magento/Multishipping/README.md @@ -5,12 +5,12 @@ using different carriers. The module provides alternative to standard checkout f ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -29,12 +29,12 @@ For example: ``` Yo can check this configuration and find more examples in the `etc/frontend/di.xml` file. -More information about [type configuration](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-file.html). +More information about [type configuration](https://developer.adobe.com/commerce/php/development/build/dependency-injection-file/). -Extension developers can interact with the Magento_Multishipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Multishipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Events @@ -109,7 +109,7 @@ Module introduces the following resources: - `Magento_Multishipping::config_multishipping` - Multishipping Settings Section -More information about [Access Control List rule](https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/create-access-control-list-rule.html). +More information about [Access Control List rule](https://developer.adobe.com/commerce/php/tutorials/backend/create-access-control-list-rule/). ### Page Types @@ -133,7 +133,7 @@ Module introduces the new pages: - `checkout_cart_multishipping_shipping` - Multishipping Checkout Shipping Information Step - `checkout_cart_multishipping_success` - Multishipping Checkout Success -More information about [layout types](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-types.html). +More information about [layout types](https://developer.adobe.com/commerce/frontend-core/guide/layouts/types/). For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). diff --git a/app/code/Magento/MysqlMq/README.md b/app/code/Magento/MysqlMq/README.md index 5f41956aee4c4..a59958837bc58 100644 --- a/app/code/Magento/MysqlMq/README.md +++ b/app/code/Magento/MysqlMq/README.md @@ -15,7 +15,7 @@ Module creates the following tables: - `queue_message_status` - Relation table to keep associations between queues and messages -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/NewRelicReporting/README.md b/app/code/Magento/NewRelicReporting/README.md index 90aca4eb85293..5f0090521c503 100644 --- a/app/code/Magento/NewRelicReporting/README.md +++ b/app/code/Magento/NewRelicReporting/README.md @@ -19,13 +19,13 @@ This module creates the following tables in the database: - `reporting_users` - `reporting_system_updates` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_NewRelicReporting module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_NewRelicReporting module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_NewRelicReporting module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_NewRelicReporting module. ## Additional information @@ -36,7 +36,7 @@ Extension developers can interact with the Magento_NewRelicReporting module. For The Magento_NewRelicReporting provides console commands: - `bin/magento newrelic:create:deploy-marker <message> <change_log> [<user>]` - check the deploy queue for entries and create an appropriate deploy marker -[Learn more about command's parameters](https://devdocs.magento.com/guides/v2.4/reference/cli/magento.html#newreliccreatedeploy-marker). +[Learn more about command's parameters](https://experienceleague.adobe.com/docs/commerce-operations/reference/magento-open-source.html#newreliccreatedeploy-marker). ### Cron options diff --git a/app/code/Magento/Newsletter/README.md b/app/code/Magento/Newsletter/README.md index 053640751b716..e4499e60c252f 100644 --- a/app/code/Magento/Newsletter/README.md +++ b/app/code/Magento/Newsletter/README.md @@ -21,15 +21,15 @@ This module creates the following tables in the database: - `newsletter_queue_store_link` - `newsletter_problem` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Newsletter module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Newsletter module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Newsletter module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Newsletter module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -60,7 +60,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `newsletter_manage_index` - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/NewsletterGraphQl/README.md b/app/code/Magento/NewsletterGraphQl/README.md index e897c4838284c..c8e0121e47a03 100644 --- a/app/code/Magento/NewsletterGraphQl/README.md +++ b/app/code/Magento/NewsletterGraphQl/README.md @@ -6,10 +6,10 @@ This module allows a shopper to subscribe to a newsletter using GraphQL. Before installing this module, note that the Magento_NewsletterGraphQl is dependent on the Magento_Newsletter module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_NewsletterGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_NewsletterGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_NewsletterGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_NewsletterGraphQl module. diff --git a/app/code/Magento/OfflinePayments/README.md b/app/code/Magento/OfflinePayments/README.md index 9aec95f6e02fc..1e9c3fb5426fb 100644 --- a/app/code/Magento/OfflinePayments/README.md +++ b/app/code/Magento/OfflinePayments/README.md @@ -13,15 +13,15 @@ Before installing this module, note that the Magento_OfflinePayments is dependen - `Magento_Store` - `Magento_Catalog` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_OfflinePayments module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_OfflinePayments module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_OfflinePayments module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_OfflinePayments module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -29,7 +29,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `checkout_index_index` - `multishipping_checkout_billing` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/OfflineShipping/README.md b/app/code/Magento/OfflineShipping/README.md index 08213d608536f..303524947bd7b 100644 --- a/app/code/Magento/OfflineShipping/README.md +++ b/app/code/Magento/OfflineShipping/README.md @@ -25,15 +25,15 @@ This module modifies the following tables in the database: - `quote_item` - adds column `free_shipping` - `quote_address_item` - adds column `free_shipping` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_OfflineShipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_OfflineShipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_OfflineShipping module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_OfflineShipping module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -41,7 +41,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `checkout_cart_index` - `checkout_index_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 44f008db574aa..5996844ebec54 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -25,7 +25,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @deprecated 100.0.6 * @see \Magento\Payment\Model\Method\Adapter - * @see https://devdocs.magento.com/guides/v2.4/payments-integrations/payment-gateway/payment-gateway-intro.html + * @see https://developer.adobe.com/commerce/php/development/payments-integrations/payment-gateway/ * @since 100.0.2 */ abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements diff --git a/app/code/Magento/Persistent/README.md b/app/code/Magento/Persistent/README.md index d3f015bf29d53..0ffec3a4c8cd7 100644 --- a/app/code/Magento/Persistent/README.md +++ b/app/code/Magento/Persistent/README.md @@ -19,15 +19,15 @@ This module modifies the following tables in the database: All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Persistent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Persistent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Persistent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Persistent module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -45,7 +45,7 @@ For information about an event in Magento 2, see [Events and observers](http://d ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/ProductAlert/README.md b/app/code/Magento/ProductAlert/README.md index 27a747d6ed4c6..5e6c1682024e0 100644 --- a/app/code/Magento/ProductAlert/README.md +++ b/app/code/Magento/ProductAlert/README.md @@ -16,13 +16,13 @@ All database schema changes made by this module are rolled back when the module The Magento_ProductAlert module contains the recurring script. Script's modifications don't need to be manually reverted upon uninstallation. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ProductAlert module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ProductAlert module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ProductAlert module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ProductAlert module. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `catalog_product_view` - `productalert_unsubscribe_email` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/ProductVideo/README.md b/app/code/Magento/ProductVideo/README.md index 76a8036e9c3c7..9f737596575a5 100644 --- a/app/code/Magento/ProductVideo/README.md +++ b/app/code/Magento/ProductVideo/README.md @@ -12,15 +12,15 @@ The Magento_ProductVideo module creates the `catalog_product_entity_media_galler All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ProductVideo module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ProductVideo module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ProductVideo module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ProductVideo module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `view/frontend/layout` - `catalog_product_view` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -43,4 +43,4 @@ For information about a UI component in Magento 2, see [Overview of UI component More information can get at articles: - [Learn how to add Product Video](https://docs.magento.com/user-guide/catalog/product-video.html) -- [Learn how to configure Product Video](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/product-video.html) +- [Learn how to configure Product Video](https://developer.adobe.com/commerce/frontend-core/guide/themes/product-video/) diff --git a/app/code/Magento/Quote/Api/CartRepositoryInterface.php b/app/code/Magento/Quote/Api/CartRepositoryInterface.php index ee122d1b02ffd..dc0ce80f74ddf 100644 --- a/app/code/Magento/Quote/Api/CartRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartRepositoryInterface.php @@ -25,7 +25,7 @@ public function get($cartId); * Enables administrative users to list carts that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CartRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php index f1ee8bd83fe93..0486366975920 100644 --- a/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php @@ -37,7 +37,7 @@ public function get($cartId); * List available payment methods for a specified shopping cart. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#GuestPaymentMethodManagementInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param string $cartId The cart ID. diff --git a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php index b00a6617beaeb..e992fab92554b 100644 --- a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php @@ -37,7 +37,7 @@ public function get($cartId); * Lists available payment methods for a specified shopping cart. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#PaymentMethodManagementInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param int $cartId The cart ID. diff --git a/app/code/Magento/Quote/README.md b/app/code/Magento/Quote/README.md index a40884aa98e0d..5b3b466402311 100644 --- a/app/code/Magento/Quote/README.md +++ b/app/code/Magento/Quote/README.md @@ -16,13 +16,13 @@ The Magento_Quote module creates the following table in the database: - `quote_shipping_rate` - `quote_id_mask` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Quote module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Quote module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Quote module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Quote module. ### Events diff --git a/app/code/Magento/QuoteAnalytics/README.md b/app/code/Magento/QuoteAnalytics/README.md index d25faa5bd3228..c7abc18ffccbe 100644 --- a/app/code/Magento/QuoteAnalytics/README.md +++ b/app/code/Magento/QuoteAnalytics/README.md @@ -1,6 +1,6 @@ # Magento_QuoteAnalytics module -This module configures data definitions for a data collection related to the Quote module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +This module configures data definitions for a data collection related to the Quote module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). ## Installation @@ -10,10 +10,10 @@ Before installing this module, note that the Magento_QuoteAnalytics is dependent This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional data More information can get at articles: -- [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/overview.html) -- [Data collection for advanced reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/data-collection.html) +- [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/) +- [Data collection for advanced reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/data-collection/) diff --git a/app/code/Magento/QuoteBundleOptions/README.md b/app/code/Magento/QuoteBundleOptions/README.md index 8e9864a46142e..f4df89c6a8ab1 100644 --- a/app/code/Magento/QuoteBundleOptions/README.md +++ b/app/code/Magento/QuoteBundleOptions/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for bundle products. This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteBundleOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteBundleOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteBundleOptions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteBundleOptions module. diff --git a/app/code/Magento/QuoteConfigurableOptions/README.md b/app/code/Magento/QuoteConfigurableOptions/README.md index 8360f10a355a2..31d75f1cd8978 100644 --- a/app/code/Magento/QuoteConfigurableOptions/README.md +++ b/app/code/Magento/QuoteConfigurableOptions/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for configurable pro This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteConfigurableOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteConfigurableOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteConfigurableOptions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteConfigurableOptions module. diff --git a/app/code/Magento/QuoteDownloadableLinks/README.md b/app/code/Magento/QuoteDownloadableLinks/README.md index 83c74e5f52bf8..56184244bfbc8 100644 --- a/app/code/Magento/QuoteDownloadableLinks/README.md +++ b/app/code/Magento/QuoteDownloadableLinks/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for links of downloa This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. diff --git a/app/code/Magento/QuoteGraphQl/README.md b/app/code/Magento/QuoteGraphQl/README.md index d5cc67234308a..396f886fc04be 100644 --- a/app/code/Magento/QuoteGraphQl/README.md +++ b/app/code/Magento/QuoteGraphQl/README.md @@ -10,13 +10,13 @@ Before installing this module, note that the Magento_QuoteGraphQl is dependent o This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. ## Additional information @@ -25,58 +25,58 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent ### GraphQl Query - `cart` query - retrieve information about a particular cart. -[Learn more about cart query](https://devdocs.magento.com/guides/v2.4/graphql/queries/cart.html). +[Learn more about cart query](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/queries/cart/). - `customerCart` query - returns the active cart for the logged-in customer. If the cart does not exist, the query creates one. -[Learn more about customerCart query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer-cart.html). +[Learn more about customerCart query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/cart/). ### GraphQl Mutation - `createEmptyCart` mutation - creates an empty shopping cart for a guest or logged in customer. -[Learn more about createEmptyCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/create-empty-cart.html). +[Learn more about createEmptyCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/create-empty-cart/). - `addSimpleProductsToCart` mutation - allows you to add any number of simple and group products to the cart at the same time. - [Learn more about addSimpleProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-simple-products.html). + [Learn more about addSimpleProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-simple-products/). - `addVirtualProductsToCart` mutation - allows you to add multiple virtual products to the cart at the same time, but you cannot add other product types with this mutation. - [Learn more about addVirtualProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-virtual-products.html). + [Learn more about addVirtualProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-virtual-products/). - `applyCouponToCart` mutation - applies a pre-defined coupon code to the specified cart. - [Learn more about applyCouponToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/apply-coupon.html). + [Learn more about applyCouponToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/apply-coupon/). - `removeCouponFromCart` mutation - removes a previously-applied coupon from the cart. - [Learn more about removeCouponFromCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-coupon.html). + [Learn more about removeCouponFromCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-coupon.html). - `updateCartItems` mutation - allows you to modify items in the specified cart. - [Learn more about updateCartItems mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-cart-items.html). + [Learn more about updateCartItems mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/update-cart-items.html). - `removeItemFromCart` mutation - deletes the entire quantity of a specified item from the cart. - [Learn more about removeItemFromCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-item.html). + [Learn more about removeItemFromCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-item.html). - `setShippingAddressesOnCart` mutation - sets one or more shipping addresses on a specific cart. - [Learn more about setShippingAddressesOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-shipping-address.html). + [Learn more about setShippingAddressesOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-shipping-address.html). - `setBillingAddressOnCart` mutation - sets the billing address for a specific cart. - [Learn more about setBillingAddressOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-billing-address.html). + [Learn more about setBillingAddressOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-billing-address.html). - `setShippingMethodsOnCart` mutation - sets one or more delivery methods on a cart. - [Learn more about setShippingMethodsOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-shipping-method.html). + [Learn more about setShippingMethodsOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-shipping-method.html). - `setPaymentMethodOnCart` mutation - defines which payment method to apply to the cart. - [Learn more about setPaymentMethodOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-payment-method.html). + [Learn more about setPaymentMethodOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-payment-method.html). - `setGuestEmailOnCart` mutation - assigns email to the guest cart. - [Learn more about setGuestEmailOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-guest-email.html). + [Learn more about setGuestEmailOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-guest-email.html). - `setPaymentMethodAndPlaceOrder` mutation - sets the cart payment method and converts the cart into an order. **This mutation has been deprecated**. Use the `setPaymentMethodOnCart` and `placeOrder` mutations instead. - [Learn more about setPaymentMethodAndPlaceOrder mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-payment-place-order.html). + [Learn more about setPaymentMethodAndPlaceOrder mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-payment-place-order.html). - `mergeCarts` mutation - transfers the contents of a guest cart into the cart of a logged-in customer. - [Learn more about mergeCarts mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/merge-carts.html). + [Learn more about mergeCarts mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/merge-carts.html). - `placeOrder` mutation - converts the cart into an order and returns an order ID. - [Learn more about placeOrder mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/place-order.html). + [Learn more about placeOrder mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/place-order.html). - `addProductsToCart` mutation - adds any type of product to the shopping cart. - [Learn more about addProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-products-to-cart.html). + [Learn more about addProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-products/). \ No newline at end of file diff --git a/app/code/Magento/RelatedProductGraphQl/README.md b/app/code/Magento/RelatedProductGraphQl/README.md index 62cd55df85594..7aa93403a6949 100644 --- a/app/code/Magento/RelatedProductGraphQl/README.md +++ b/app/code/Magento/RelatedProductGraphQl/README.md @@ -6,13 +6,13 @@ This module provides endpoints for getting Cross Sell / Related/ Up Sell produc This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. ## Additional information diff --git a/app/code/Magento/ReleaseNotification/README.md b/app/code/Magento/ReleaseNotification/README.md index 46d56107f2aa5..0cd2107e64432 100644 --- a/app/code/Magento/ReleaseNotification/README.md +++ b/app/code/Magento/ReleaseNotification/README.md @@ -8,13 +8,13 @@ The Magento_ReleaseNotification module creates the `release_notification_viewer_ All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ReleaseNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ReleaseNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ReleaseNotification module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ReleaseNotification module. ### UI components diff --git a/app/code/Magento/ReviewAnalytics/README.md b/app/code/Magento/ReviewAnalytics/README.md index 5eb1f100c572c..505dace8d2147 100644 --- a/app/code/Magento/ReviewAnalytics/README.md +++ b/app/code/Magento/ReviewAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_ReviewAnalytics module -The Magento_ReviewAnalytics module configures data definitions for a data collection related to the Review module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_ReviewAnalytics module configures data definitions for a data collection related to the Review module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php index 3c61384d8b84f..c0963ba1e3452 100644 --- a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php @@ -20,7 +20,7 @@ interface CreditmemoRepositoryInterface * Lists credit memos that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CreditmemoRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php index 161b8405f11e4..67a5c11f07cc7 100644 --- a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php @@ -18,7 +18,7 @@ interface InvoiceRepositoryInterface * Lists invoices that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#InvoiceRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php index 3449d0054b7e4..981f793f35306 100644 --- a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php @@ -20,7 +20,7 @@ interface OrderItemRepositoryInterface * Lists order items that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#OrderItemRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php index 0c3b6ab5cb02b..6190f06c10ed4 100644 --- a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php @@ -20,7 +20,7 @@ interface OrderRepositoryInterface * Lists orders that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#OrderRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php index 3b3c8221596a1..4761df08a73d5 100644 --- a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php @@ -19,7 +19,7 @@ interface ShipmentRepositoryInterface * Lists shipments that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#ShipmentRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php index e55b5d60d1f6c..d3042af0074d9 100644 --- a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php @@ -18,7 +18,7 @@ interface TransactionRepositoryInterface * Lists transactions that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TransactionRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/SalesAnalytics/README.md b/app/code/Magento/SalesAnalytics/README.md index 4fc110af0bae8..44a129fe47c37 100644 --- a/app/code/Magento/SalesAnalytics/README.md +++ b/app/code/Magento/SalesAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_SalesAnalytics module -The Magento_SalesAnalytics module configures data definitions for a data collection related to the Sales module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_SalesAnalytics module configures data definitions for a data collection related to the Sales module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php b/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php index 1a631886f1a9b..b15c93743bb91 100644 --- a/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php +++ b/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php @@ -38,7 +38,7 @@ public function getById($couponId); * Retrieve a coupon using the specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CouponRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php b/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php index 963edf5483e43..39a92bb9efdfb 100644 --- a/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php +++ b/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php @@ -38,7 +38,7 @@ public function getById($ruleId); * Retrieve sales rules that match te specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#RuleRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/SampleData/README.md b/app/code/Magento/SampleData/README.md index e0666ba73fe24..3e66c2cc1c7b0 100644 --- a/app/code/Magento/SampleData/README.md +++ b/app/code/Magento/SampleData/README.md @@ -74,4 +74,4 @@ The deleted sample data entities will be restored. Those entities, which were ch ## Documentation -You can find the more detailed description of sample data manipulation procedures at <https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-sample-data.html>. +You can find the more detailed description of sample data manipulation procedures at <https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/sample-data/overview.html>. diff --git a/app/code/Magento/SendFriend/etc/adminhtml/system.xml b/app/code/Magento/SendFriend/etc/adminhtml/system.xml index 0092fe4ab2918..8102301feeb4c 100644 --- a/app/code/Magento/SendFriend/etc/adminhtml/system.xml +++ b/app/code/Magento/SendFriend/etc/adminhtml/system.xml @@ -16,7 +16,7 @@ <field id="enabled" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Enabled</label> <comment> - <![CDATA[We strongly recommend to enable a <a href="https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> + <![CDATA[We strongly recommend to enable a <a href="https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> </comment> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> diff --git a/app/code/Magento/SendFriend/i18n/en_US.csv b/app/code/Magento/SendFriend/i18n/en_US.csv index 96a0665df4d39..d8e4b1772e7ef 100644 --- a/app/code/Magento/SendFriend/i18n/en_US.csv +++ b/app/code/Magento/SendFriend/i18n/en_US.csv @@ -45,4 +45,4 @@ Enabled,Enabled "Max Recipients","Max Recipients" "Max Products Sent in 1 Hour","Max Products Sent in 1 Hour" "Limit Sending By","Limit Sending By" -"We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." +"We strongly recommend to enable a <a href=""https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to enable a <a href=""https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." diff --git a/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php index f841f9c047b82..fcb610fcb58eb 100644 --- a/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php @@ -27,7 +27,7 @@ public function get($taxClassId); * Retrieve tax classes which match a specific criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxClassRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php index c0f5ccd95ba98..2624946e904e9 100644 --- a/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php @@ -47,7 +47,7 @@ public function deleteById($rateId); * Search TaxRates * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxRateRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php index 5e045d94de45e..0590ac6afa5bb 100644 --- a/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php @@ -55,7 +55,7 @@ public function deleteById($ruleId); * Search TaxRules * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxRuleRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/WebapiAsync/README.md b/app/code/Magento/WebapiAsync/README.md index 96f82d8b6e493..6b06075171f36 100644 --- a/app/code/Magento/WebapiAsync/README.md +++ b/app/code/Magento/WebapiAsync/README.md @@ -13,16 +13,16 @@ Before installing this module, note that the Magento_WebapiAsync is dependent on - Magento_User - Magento_Webapi -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Code/` - the directory that contains Remote service reader configuration files. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_WebapiAsync module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WebapiAsync module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WebapiAsync module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WebapiAsync module. diff --git a/app/code/Magento/WebapiSecurity/README.md b/app/code/Magento/WebapiSecurity/README.md index a355112536a00..e0232d4f92156 100644 --- a/app/code/Magento/WebapiSecurity/README.md +++ b/app/code/Magento/WebapiSecurity/README.md @@ -12,4 +12,4 @@ Before installing this module, note that the Magento_WebapiSecurity is dependent - `Magento_Webapi` -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). diff --git a/app/code/Magento/Weee/README.md b/app/code/Magento/Weee/README.md index 475914a969c41..b3d59174a8337 100644 --- a/app/code/Magento/Weee/README.md +++ b/app/code/Magento/Weee/README.md @@ -26,19 +26,19 @@ Before installing this module, note that the Magento_Weee is dependent on the fo - Magento_Store - Magento_Tax -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing/` - directory that contain tax adjustment. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Weee module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Weee module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Weee module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Weee module. ### Layouts @@ -84,7 +84,7 @@ This module introduces the following layouts and layout handles in the directori - `sales_order_printinvoice` - `sales_order_view` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -96,4 +96,4 @@ You can extend a customer form and widgets using the configuration files located - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/WeeeGraphQl/README.md b/app/code/Magento/WeeeGraphQl/README.md index b1f44619785c4..6d15feb605f3f 100644 --- a/app/code/Magento/WeeeGraphQl/README.md +++ b/app/code/Magento/WeeeGraphQl/README.md @@ -13,10 +13,10 @@ Before installing this module, note that the Magento_WeeeGraphQl is dependent on - `Magento_Tax` - `Magento_Weee` -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_WeeeGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WeeeGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WeeeGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WeeeGraphQl module. diff --git a/app/code/Magento/Widget/README.md b/app/code/Magento/Widget/README.md index 0d51c6732ec58..ee4594e1cef2b 100644 --- a/app/code/Magento/Widget/README.md +++ b/app/code/Magento/Widget/README.md @@ -16,13 +16,13 @@ Before disabling or uninstalling this module, note the following dependencies: - Magento_CurrencySymbol - Magento_Newsletter -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Widget module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Widget module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Widget module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Widget module. ### Layouts @@ -38,4 +38,4 @@ This module introduces the following layouts and layout handles in the directori - `default` - `print` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/Wishlist/README.md b/app/code/Magento/Wishlist/README.md index fef81ccacf000..a0ec7d70d9955 100644 --- a/app/code/Magento/Wishlist/README.md +++ b/app/code/Magento/Wishlist/README.md @@ -16,19 +16,19 @@ Before disabling or uninstalling this module, note the following dependencies: - Magento_WishlistAnalytics -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing/` - the directory that contain solutions for configurable and downloadable product price. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Wishlist module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Wishlist module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Wishlist module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Wishlist module. ### Events @@ -56,7 +56,7 @@ The module dispatches the following events: - `product` is a product object (`\Magento\Catalog\Api\Data\ProductInterface` class). - `item` is an item object (`\Magento\Wishlist\Model\Item` class). -For information about the event, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about the event, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -86,7 +86,7 @@ This module introduces the following layouts and layout handles in the directori - `wishlist_index_share` - `wishlist_shared_index.xml` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -97,4 +97,4 @@ You can extend a customer form and widgets using the configuration files located - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/WishlistAnalytics/README.md b/app/code/Magento/WishlistAnalytics/README.md index c932397e0803a..03ebb835913d6 100644 --- a/app/code/Magento/WishlistAnalytics/README.md +++ b/app/code/Magento/WishlistAnalytics/README.md @@ -1,6 +1,6 @@ # Magento_WishlistAnalytics module -The Magento_WishlistAnalytics module configures data definitions for a data collection related to the Wishlist module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_WishlistAnalytics module configures data definitions for a data collection related to the Wishlist module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). ## Installation details @@ -9,4 +9,4 @@ Before installing this module, note that the Magento_WishlistAnalytics is depend - Magento_Analytics - Magento_Wishlist -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). diff --git a/app/code/Magento/WishlistGraphQl/README.md b/app/code/Magento/WishlistGraphQl/README.md index 23135e2a52bfe..f212218990a9b 100644 --- a/app/code/Magento/WishlistGraphQl/README.md +++ b/app/code/Magento/WishlistGraphQl/README.md @@ -19,13 +19,13 @@ Before installing this module, note that the Magento_WishlistGraphQl is dependen - Magento_Sales - Magento_Store -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_WishlistGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WishlistGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WishlistGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WishlistGraphQl module. ## Additional information @@ -33,10 +33,10 @@ For more information about the Magento_WishlistGraphQl queries and mutations see ### Queries -- [`wishlist`](https://devdocs.magento.com/guides/v2.4/graphql/queries/wishlist.html) +- [`wishlist`](https://developer.adobe.com/commerce/webapi/graphql/usage/wishlist.html) ### Mutations -- [`addProductsToWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-products-to-wishlist.html) -- [`removeProductsFromWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-products-from-wishlist.html) -- [`updateProductsInWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-products-in-wishlist.html) +- [`addProductsToWishlist`](https://developer.adobe.com/commerce/webapi/graphql/schema/wishlist/mutations/add-products/) +- [`removeProductsFromWishlist`](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-products-from-wishlist.html) +- [`updateProductsInWishlist`](https://developer.adobe.com/commerce/webapi/graphql/mutations/update-products-in-wishlist.html) diff --git a/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less b/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less index 174d31d641fef..508eb6113fa2c 100644 --- a/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less +++ b/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less @@ -1,2 +1,2 @@ // This is overridden in B2B theme -// https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-guide/css_quick_guide_approach.html +// https://developer.adobe.com/commerce/frontend-core/guide/css/quickstart/customize-styles/ diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index a9b61d376c011..7c02dc0675206 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -148,7 +148,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl * The property is used to define content-scope of block. Can be private or public. * If it isn't defined then application considers it as false. * - * @see https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/private-content.html + * @see https://developer.adobe.com/commerce/php/development/cache/page/private-content/ * @var bool * @deprecated * @since 103.0.1 diff --git a/phpserver/README.md b/phpserver/README.md index 385a09b7f8802..51235b458b7b4 100644 --- a/phpserver/README.md +++ b/phpserver/README.md @@ -14,7 +14,7 @@ Without a router script, that is not possible via the php built-in server. ## How to install Magento -Please read how to install Magento using the [command line](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html). An example follows: +Please read how to install Magento using the [command line](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/advanced.html). An example follows: ```php php bin/magento setup:install --base-url=http://127.0.0.1:8082 \ @@ -27,7 +27,7 @@ php bin/magento setup:install --base-url=http://127.0.0.1:8082 \ Note: By default, Magento creates a random Admin URI for you. Make sure to write this value down because it's how you access the Magento Admin later. For example: `http://127.0.0.1:8082/index.php/admin_1vpn01`. -For more information about the installation process using the CLI, you can consult the dedicated documentation that can found in [the developer documentation](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands.html). +For more information about the installation process using the CLI, you can consult the dedicated documentation that can found in [the developer documentation](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html). ### How to run Magento diff --git a/setup/performance-toolkit/README.md b/setup/performance-toolkit/README.md index 5daace537614a..bdbd9177891f2 100644 --- a/setup/performance-toolkit/README.md +++ b/setup/performance-toolkit/README.md @@ -1,3 +1,3 @@ # Performance Toolkit -For information about the available profiles and generating fixtures generation, read [Generate data for performance testing](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-perf-data.html). +For information about the available profiles and generating fixtures generation, read [Generate data for performance testing](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/generate-data.html). diff --git a/setup/view/magento/setup/index.phtml b/setup/view/magento/setup/index.phtml index 9c8b147b2c214..2c8948f4a931d 100644 --- a/setup/view/magento/setup/index.phtml +++ b/setup/view/magento/setup/index.phtml @@ -49,7 +49,7 @@ Welcome to Magento Admin, your online store headquarters. <br> Please review <a href="javascript:showSection('license')">Terms & Agreement</a> - and read <a href="https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html" target="_blank">Getting Started</a> + and read <a href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/advanced.html" target="_blank">Getting Started</a> to learn how to install Magento using the command line. </p> </section> From 0a2e5d964dcebc4ce020a666fcf0814c07d1d0aa Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 20 Dec 2022 16:34:20 +0200 Subject: [PATCH 276/985] ACP2E-1413, set response redirect --- app/code/Magento/Catalog/Controller/Category/View.php | 2 +- .../Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index a12ae421b444c..c6097b5e66c76 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -249,7 +249,7 @@ public function execute() ->addBodyClass('categorypath-' . $this->categoryUrlPathGenerator->getUrlPath($category)) ->addBodyClass('category-' . $category->getUrlKey()); - if ($this->isToolbarAction()) { + if ($this->isToolbarAction() && $this->toolbarMemorizer->isMemorizingAllowed()) { $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } return $page; diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php index 48f5b54da6e02..27d36c19e861a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Category/ViewTest.php @@ -243,6 +243,7 @@ public function testRedirectOnToolbarAction() ->willReturn($this->category); $this->categoryHelper->expects($this->once())->method('canShow')->with($this->category)->willReturn(true); $this->toolbarMemorizer->expects($this->once())->method('memorizeParams'); + $this->toolbarMemorizer->expects($this->once())->method('isMemorizingAllowed')->willReturn(true); $this->response->expects($this->once())->method('setRedirect'); $settings = $this->getMockBuilder(DataObject::class) ->addMethods(['getPageLayout', 'getLayoutUpdates']) From 73abcf1a65f7ff5706dab16013430170109be6ab Mon Sep 17 00:00:00 2001 From: Dmytro Shevtsov <shevtsov@adobe.com> Date: Tue, 20 Dec 2022 09:51:38 -0600 Subject: [PATCH 277/985] Update docs links --- .github/CONTRIBUTING.md | 2 +- app/code/Magento/AdminAnalytics/i18n/en_US.csv | 2 +- .../adminhtml/ui_component/admin_usage_notification.xml | 2 +- app/code/Magento/Catalog/etc/adminhtml/system.xml | 2 +- app/code/Magento/Customer/README.md | 8 ++++---- app/code/Magento/CustomerDownloadableGraphQl/README.md | 4 ++-- app/code/Magento/CustomerGraphQl/README.md | 4 ++-- app/code/Magento/CustomerImportExport/README.md | 4 ++-- app/code/Magento/Elasticsearch/etc/adminhtml/system.xml | 2 +- app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml | 2 +- app/code/Magento/GiftMessage/README.md | 4 ++-- app/code/Magento/GiftMessageGraphQl/README.md | 4 ++-- app/code/Magento/GoogleAdwords/README.md | 4 ++-- app/code/Magento/GoogleAnalytics/README.md | 4 ++-- app/code/Magento/GoogleGtag/README.md | 4 ++-- app/code/Magento/GoogleOptimizer/README.md | 6 +++--- app/code/Magento/GroupedProduct/README.md | 6 +++--- app/code/Magento/GroupedProductGraphQl/README.md | 4 ++-- app/code/Magento/ImportExport/README.md | 8 ++++---- app/code/Magento/Indexer/README.md | 4 ++-- app/code/Magento/InstantPurchase/README.md | 4 ++-- app/code/Magento/Integration/README.md | 6 +++--- app/code/Magento/LayeredNavigation/README.md | 8 ++++---- app/code/Magento/LoginAsCustomerAdminUi/README.md | 2 +- app/code/Magento/LoginAsCustomerApi/README.md | 2 +- app/code/Magento/LoginAsCustomerLog/README.md | 4 ++-- app/code/Magento/Marketplace/README.md | 4 ++-- app/code/Magento/MediaGalleryApi/README.md | 2 +- app/code/Magento/MediaGalleryCatalogIntegration/README.md | 2 +- app/code/Magento/MediaGalleryCatalogUi/README.md | 2 +- app/code/Magento/MediaGalleryCmsUi/README.md | 2 +- app/code/Magento/MediaGalleryUi/README.md | 2 +- app/code/Magento/MediaStorage/README.md | 2 +- app/code/Magento/MsrpConfigurableProduct/README.md | 4 ++-- app/code/Magento/MsrpGroupedProduct/README.md | 4 ++-- app/code/Magento/Multishipping/README.md | 4 ++-- app/code/Magento/MysqlMq/README.md | 2 +- app/code/Magento/NewRelicReporting/README.md | 2 +- app/code/Magento/Newsletter/README.md | 4 ++-- app/code/Magento/OfflineShipping/README.md | 2 +- app/code/Magento/OpenSearch/etc/adminhtml/system.xml | 2 +- app/code/Magento/Persistent/README.md | 4 ++-- app/code/Magento/ProductAlert/README.md | 2 +- app/code/Magento/ProductVideo/README.md | 2 +- app/code/Magento/Quote/README.md | 4 ++-- app/code/Magento/ReleaseNotification/README.md | 2 +- nginx.conf.sample | 2 +- 47 files changed, 81 insertions(+), 81 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 61e14fd02b22b..615222321bca0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the 1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution. 2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing. 3. Create and test your work. -4. Follow the [Forks And Pull Requests Instructions](https://devdocs.magento.com/contributor-guide/contributing.html#forks-and-pull-requests) to fork the Magento 2 repository and send us a pull request. +4. Follow the [Forks And Pull Requests Instructions](https://developer.adobe.com/commerce/contributor/guides/code-contributions/) to fork the Magento 2 repository and send us a pull request. 5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed. ## Code of Conduct diff --git a/app/code/Magento/AdminAnalytics/i18n/en_US.csv b/app/code/Magento/AdminAnalytics/i18n/en_US.csv index fa17e425e13dd..90a0c5890f04d 100644 --- a/app/code/Magento/AdminAnalytics/i18n/en_US.csv +++ b/app/code/Magento/AdminAnalytics/i18n/en_US.csv @@ -1,3 +1,3 @@ "Allow Adobe to collect usage data to improve user experience and offer in-product guidance", "Allow Adobe to collect usage data to improve user experience and offer in-product guidance" -"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>" +"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html"">merchant documentation</a>.</p>" diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml b/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml index b8196c8ae090e..dfac97747cb3e 100644 --- a/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml +++ b/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml @@ -82,7 +82,7 @@ <item name="config" xsi:type="array"> <item name="label" xsi:type="string"/> <item name="additionalClasses" xsi:type="string">release-notification-text</item> - <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage">merchant documentation</a>.</p>]]></item> + <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html">merchant documentation</a>.</p>]]></item> </item> </argument> </container> diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index b90d59997b87a..792ea1d13ec26 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -218,7 +218,7 @@ <field id="catalog_media_url_format" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1"> <label>Catalog media URL format</label> <source_model>Magento\Catalog\Model\Config\Source\Web\CatalogMediaUrlFormat</source_model> - <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> + <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://experienceleague.adobe.com/docs/commerce-admin/config/general/web.html">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> </field> </group> </section> diff --git a/app/code/Magento/Customer/README.md b/app/code/Magento/Customer/README.md index 0760482d171d8..4b2b1a4d6211d 100644 --- a/app/code/Magento/Customer/README.md +++ b/app/code/Magento/Customer/README.md @@ -129,7 +129,7 @@ The module dispatches the following events: - `visitor_activity_save` event in the `\Magento\Customer\Model\Visitor::saveByRequest` method. Parameters: - `visitor` is a `$this` object (`\Magento\Customer\Model\Visitor` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -320,7 +320,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - `\Magento\Customer\Model\Customer\Source\GroupSourceLoggedInOnlyInterface` - get customer group attribute source -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ### UI components @@ -335,7 +335,7 @@ You can extend customer and customer address updates using the configuration fil - `view/base/ui_component`: - `customer_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information @@ -356,7 +356,7 @@ Magento_Customer provides console commands: Cron group configuration can be set at `etc/crontab.xml`: - `visitor_clean` - clean visitor's outdated records -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). ### Indexers diff --git a/app/code/Magento/CustomerDownloadableGraphQl/README.md b/app/code/Magento/CustomerDownloadableGraphQl/README.md index b4ae77451c07d..2a3729b36007e 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/README.md +++ b/app/code/Magento/CustomerDownloadableGraphQl/README.md @@ -13,9 +13,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CatalogGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CatalogGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerDownloadableGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerDownloadableGraphQl module. ## Additional information diff --git a/app/code/Magento/CustomerGraphQl/README.md b/app/code/Magento/CustomerGraphQl/README.md index fd9955b3ca9c5..ae374c045bae0 100644 --- a/app/code/Magento/CustomerGraphQl/README.md +++ b/app/code/Magento/CustomerGraphQl/README.md @@ -17,9 +17,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CustomerGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CustomerGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerGraphQl module. ## Additional information diff --git a/app/code/Magento/CustomerImportExport/README.md b/app/code/Magento/CustomerImportExport/README.md index a3bd8e8e75ace..16c4189acfe63 100644 --- a/app/code/Magento/CustomerImportExport/README.md +++ b/app/code/Magento/CustomerImportExport/README.md @@ -8,9 +8,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CustomerImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CustomerImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerImportExport module. ### Layouts diff --git a/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml index d6e896144cec4..0991506b31476 100644 --- a/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml +++ b/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml @@ -68,7 +68,7 @@ <depends> <field id="engine">elasticsearch5</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml index 6b5d3cf368867..a8f4ecccdea9c 100644 --- a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml +++ b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml @@ -84,7 +84,7 @@ <depends> <field id="engine">elasticsearch7</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/GiftMessage/README.md b/app/code/Magento/GiftMessage/README.md index 6c807143384af..b63c37cc64c7d 100644 --- a/app/code/Magento/GiftMessage/README.md +++ b/app/code/Magento/GiftMessage/README.md @@ -42,7 +42,7 @@ The module dispatches the following events: - `gift_options_prepare` event in the `\Magento\GiftMessage\Block\Message\Inline::isMessagesOrderAvailable` method. Parameters: - `entity` is an entity object -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layout @@ -97,7 +97,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - get the gift message for a specified item in a specified order - set the gift message for a specified item in a specified order -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/GiftMessageGraphQl/README.md b/app/code/Magento/GiftMessageGraphQl/README.md index 401f718b791df..5eb270c12fdb1 100644 --- a/app/code/Magento/GiftMessageGraphQl/README.md +++ b/app/code/Magento/GiftMessageGraphQl/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GiftMessageGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GiftMessageGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GiftMessageGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GiftMessageGraphQl module. ## Additional information diff --git a/app/code/Magento/GoogleAdwords/README.md b/app/code/Magento/GoogleAdwords/README.md index 8dd6ab7b2d32b..2e2b275787f32 100644 --- a/app/code/Magento/GoogleAdwords/README.md +++ b/app/code/Magento/GoogleAdwords/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleAdwords module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleAdwords module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAdwords module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleAdwords module. ### Layouts diff --git a/app/code/Magento/GoogleAnalytics/README.md b/app/code/Magento/GoogleAnalytics/README.md index 3a26674cdb614..d4abd290bd665 100644 --- a/app/code/Magento/GoogleAnalytics/README.md +++ b/app/code/Magento/GoogleAnalytics/README.md @@ -12,9 +12,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleAnalytics module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleAnalytics module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAnalytics module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleAnalytics module. A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/GoogleGtag/README.md b/app/code/Magento/GoogleGtag/README.md index 32ec59055f76b..4d1a49ada70c7 100644 --- a/app/code/Magento/GoogleGtag/README.md +++ b/app/code/Magento/GoogleGtag/README.md @@ -12,9 +12,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleGtag module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleGtag module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleGtag module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleGtag module. A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/GoogleOptimizer/README.md b/app/code/Magento/GoogleOptimizer/README.md index dd2011e73e2d8..5e493d69cf13b 100644 --- a/app/code/Magento/GoogleOptimizer/README.md +++ b/app/code/Magento/GoogleOptimizer/README.md @@ -15,9 +15,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleOptimizer module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleOptimizer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleOptimizer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleOptimizer module. ### Layouts @@ -39,7 +39,7 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `cms_page_form` - `new_category_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/GroupedProduct/README.md b/app/code/Magento/GroupedProduct/README.md index 27bfb69ae32c5..2f141b463b19e 100644 --- a/app/code/Magento/GroupedProduct/README.md +++ b/app/code/Magento/GroupedProduct/README.md @@ -27,7 +27,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Pricing/` - the directory that contains solutions for grouped product price. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -79,14 +79,14 @@ This module extends widgets ui components the configuration files located in the - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs - `\Magento\GroupedProduct\Api\Data\GroupedOptionsInterface` - represents `product item id with qty` of a grouped product -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/GroupedProductGraphQl/README.md b/app/code/Magento/GroupedProductGraphQl/README.md index c6fc44ab4e2c6..07ac1f2cecf98 100644 --- a/app/code/Magento/GroupedProductGraphQl/README.md +++ b/app/code/Magento/GroupedProductGraphQl/README.md @@ -15,9 +15,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GroupedProductGraphQll module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedProductGraphQll module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedProductGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedProductGraphQl module. ## Additional information diff --git a/app/code/Magento/ImportExport/README.md b/app/code/Magento/ImportExport/README.md index e68898e55610f..ef1a9acbcce0f 100644 --- a/app/code/Magento/ImportExport/README.md +++ b/app/code/Magento/ImportExport/README.md @@ -17,7 +17,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Files/` - the directory that contains sample import files. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -38,7 +38,7 @@ This module introduces the following layout handles in the `view/frontend/layout - `adminhtml_import_start` - `adminhtml_import_validate` -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -46,7 +46,7 @@ You can extend an export updates using the configuration files located in the `v - `export_grid` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs @@ -59,7 +59,7 @@ For information about a UI component in Magento 2, see [Overview of UI component - `\Magento\ImportExport\Api\ExportManagementInterface` - Executing actual export and returns export data -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Indexer/README.md b/app/code/Magento/Indexer/README.md index 831387376e085..ed9ee7ec9723f 100644 --- a/app/code/Magento/Indexer/README.md +++ b/app/code/Magento/Indexer/README.md @@ -28,7 +28,7 @@ For information about a module installation in Magento 2, see [Enable or disable `App/` - the directory that contains launch application entry point. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -91,7 +91,7 @@ Cron group configuration can be set at `etc/crontab.xml`: - `indexer_update_all_views` - update indexer views - `indexer_clean_all_changelogs` - clean indexer view changelogs -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). More information can get at articles: - [Learn more about indexing](https://developer.adobe.com/commerce/php/development/components/indexing/) diff --git a/app/code/Magento/InstantPurchase/README.md b/app/code/Magento/InstantPurchase/README.md index 639e50b214d05..a4dfa6500e19a 100644 --- a/app/code/Magento/InstantPurchase/README.md +++ b/app/code/Magento/InstantPurchase/README.md @@ -10,7 +10,7 @@ For information about a module installation in Magento 2, see [Enable or disable `PaymentMethodsIntegration` - directory contains interfaces and basic implementation of integration vault payment method to the instant purchase. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -47,7 +47,7 @@ Extension developers can interact with the Magento_InstantPurchase module. For m - `\Magento\InstantPurchase\PaymentMethodIntegration\PaymentTokenFormatterInterface` - provides mechanism to create string presentation of token for payment method -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Integration/README.md b/app/code/Magento/Integration/README.md index fce2423034f00..0e17dc80c1355 100644 --- a/app/code/Magento/Integration/README.md +++ b/app/code/Magento/Integration/README.md @@ -37,7 +37,7 @@ The module dispatches the following events: - `customer_login` event in the `\Magento\Integration\Model\CustomerTokenService::createCustomerAccessToken` method. Parameters: - `customer` is an object (`\Magento\Customer\Api\Data\CustomerInterface` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -88,7 +88,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - delete the consumer data associated with the integration including its token and nonce - remove token associated with provided consumer -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information @@ -98,7 +98,7 @@ Cron group configuration can be set at `etc/crontab.xml`: - `outdated_authentication_failures_cleanup` - clearing log of outdated token request authentication failures - `expired_tokens_cleanups` - delete expired customer and admin tokens -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). More information can get at articles: - [Learn more about an Integration](https://docs.magento.com/user-guide/system/integrations.html) diff --git a/app/code/Magento/LayeredNavigation/README.md b/app/code/Magento/LayeredNavigation/README.md index aac70b71ec28c..b27fa3d5360ed 100644 --- a/app/code/Magento/LayeredNavigation/README.md +++ b/app/code/Magento/LayeredNavigation/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_LayeredNavigation module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_LayeredNavigation module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LayeredNavigation module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_LayeredNavigation module. ### Layouts @@ -30,14 +30,14 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `product_attributes_grid` - `product_attributes_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs - `\Magento\LayeredNavigation\Block\Navigation\FilterRendererInterface` - render filter -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerAdminUi/README.md b/app/code/Magento/LoginAsCustomerAdminUi/README.md index 4ae940d51a242..3d447a730140e 100644 --- a/app/code/Magento/LoginAsCustomerAdminUi/README.md +++ b/app/code/Magento/LoginAsCustomerAdminUi/README.md @@ -2,7 +2,7 @@ This module provides UI for Admin Panel for Login As Customer functionality. -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LoginAsCustomerAdminUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_LoginAsCustomerAdminUi module. ## Additional information diff --git a/app/code/Magento/LoginAsCustomerApi/README.md b/app/code/Magento/LoginAsCustomerApi/README.md index af329b244418b..4f2bf5d82495a 100644 --- a/app/code/Magento/LoginAsCustomerApi/README.md +++ b/app/code/Magento/LoginAsCustomerApi/README.md @@ -48,7 +48,7 @@ This module provides API for ability to login into customer account for an admin - `\Magento\LoginAsCustomerApi\Api\SetLoggedAsCustomerCustomerIdInterface`: - set id of customer admin is logged as -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerLog/README.md b/app/code/Magento/LoginAsCustomerLog/README.md index 31a80010c7076..6b867473e6b5f 100644 --- a/app/code/Magento/LoginAsCustomerLog/README.md +++ b/app/code/Magento/LoginAsCustomerLog/README.md @@ -21,7 +21,7 @@ You can extend log listing updates using the configuration files located in the - `view/adminhtml/ui_component`: - `login_as_customer_log_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs @@ -37,7 +37,7 @@ For information about a UI component in Magento 2, see [Overview of UI component - `\Magento\LoginAsCustomerLog\Api\SaveLogsInterface`: - save login as custom logs entities -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Marketplace/README.md b/app/code/Magento/Marketplace/README.md index f4fd482be72ca..732d6d77543ae 100644 --- a/app/code/Magento/Marketplace/README.md +++ b/app/code/Magento/Marketplace/README.md @@ -8,9 +8,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_Marketplace module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Marketplace module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Marketplace module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Marketplace module. ### Layouts diff --git a/app/code/Magento/MediaGalleryApi/README.md b/app/code/Magento/MediaGalleryApi/README.md index b8c41432fc525..8db7d800a9a78 100644 --- a/app/code/Magento/MediaGalleryApi/README.md +++ b/app/code/Magento/MediaGalleryApi/README.md @@ -53,7 +53,7 @@ Extension developers can interact with the Magento_MediaGalleryApi module. For m - `\Magento\MediaGalleryApi\Api\SearchAssetsInterface`: - search media gallery assets -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2./extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/README.md b/app/code/Magento/MediaGalleryCatalogIntegration/README.md index 236b0c49d553f..ae9184420c018 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/README.md +++ b/app/code/Magento/MediaGalleryCatalogIntegration/README.md @@ -8,4 +8,4 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalogIntegration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalogIntegration module. diff --git a/app/code/Magento/MediaGalleryCatalogUi/README.md b/app/code/Magento/MediaGalleryCatalogUi/README.md index 3d822d0ed14e7..f53cc0f8f328c 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/README.md +++ b/app/code/Magento/MediaGalleryCatalogUi/README.md @@ -30,7 +30,7 @@ This module extends ui components: - `media_gallery_listing` - `standalone_media_gallery_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaGalleryCmsUi/README.md b/app/code/Magento/MediaGalleryCmsUi/README.md index 197a6a4bc4149..a7e8446de77cf 100644 --- a/app/code/Magento/MediaGalleryCmsUi/README.md +++ b/app/code/Magento/MediaGalleryCmsUi/README.md @@ -20,7 +20,7 @@ This module extends ui components: - `media_gallery_listing` - `standalone_media_gallery_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaGalleryUi/README.md b/app/code/Magento/MediaGalleryUi/README.md index ce8068f87271c..584f242ccd425 100644 --- a/app/code/Magento/MediaGalleryUi/README.md +++ b/app/code/Magento/MediaGalleryUi/README.md @@ -36,7 +36,7 @@ This module extends ui components: - `cms_page_listing` - `product_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaStorage/README.md b/app/code/Magento/MediaStorage/README.md index 433d66d2bf459..f77ddac816cb4 100644 --- a/app/code/Magento/MediaStorage/README.md +++ b/app/code/Magento/MediaStorage/README.md @@ -15,7 +15,7 @@ For information about a module installation in Magento 2, see [Enable or disable `App/` - the directory that contains launch application entry point. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility diff --git a/app/code/Magento/MsrpConfigurableProduct/README.md b/app/code/Magento/MsrpConfigurableProduct/README.md index 4cf5ab625e8f5..7afb0d834693c 100644 --- a/app/code/Magento/MsrpConfigurableProduct/README.md +++ b/app/code/Magento/MsrpConfigurableProduct/README.md @@ -23,11 +23,11 @@ For information about a typical file structure of a module in Magento 2, ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MsrpGroupedProduct/README.md b/app/code/Magento/MsrpGroupedProduct/README.md index ab7cefc4e0c47..1c2a5c15a146d 100644 --- a/app/code/Magento/MsrpGroupedProduct/README.md +++ b/app/code/Magento/MsrpGroupedProduct/README.md @@ -23,11 +23,11 @@ For information about a typical file structure of a module in Magento 2, ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/Multishipping/README.md b/app/code/Magento/Multishipping/README.md index 7cb91516d4ace..436357afa0436 100644 --- a/app/code/Magento/Multishipping/README.md +++ b/app/code/Magento/Multishipping/README.md @@ -69,7 +69,7 @@ The module dispatches the following events: class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::createOrders()` method. Parameters: - `orders` is order object array `\Magento\Sales\Model\Order` that was created. -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -136,4 +136,4 @@ Module introduces the new pages: More information about [layout types](https://developer.adobe.com/commerce/frontend-core/guide/layouts/types/). -For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.3.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MysqlMq/README.md b/app/code/Magento/MysqlMq/README.md index a59958837bc58..be9c23dda9bda 100644 --- a/app/code/Magento/MysqlMq/README.md +++ b/app/code/Magento/MysqlMq/README.md @@ -19,7 +19,7 @@ For information about a module installation in Magento 2, see [Enable or disable ## Additional information -For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.3.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). ### cron options diff --git a/app/code/Magento/NewRelicReporting/README.md b/app/code/Magento/NewRelicReporting/README.md index 5f0090521c503..97bceff86da3e 100644 --- a/app/code/Magento/NewRelicReporting/README.md +++ b/app/code/Magento/NewRelicReporting/README.md @@ -43,4 +43,4 @@ The Magento_NewRelicReporting provides console commands: Cron group configuration can be set at `etc/crontab.xml`: - `magento_newrelicreporting_cron` - runs collecting all new relic reports -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/Newsletter/README.md b/app/code/Magento/Newsletter/README.md index e4499e60c252f..b9aac71e222b2 100644 --- a/app/code/Magento/Newsletter/README.md +++ b/app/code/Magento/Newsletter/README.md @@ -67,7 +67,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] This module extends customer form ui component the configuration file located in the `view/base/ui_component` directory: - `customer_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information @@ -78,5 +78,5 @@ For information about a UI component in Magento 2, see [Overview of UI component Cron group configuration can be set at `etc/crontab.xml`: - `newsletter_send_all` - schedules newsletter sending -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/OfflineShipping/README.md b/app/code/Magento/OfflineShipping/README.md index 303524947bd7b..c45767d3190da 100644 --- a/app/code/Magento/OfflineShipping/README.md +++ b/app/code/Magento/OfflineShipping/README.md @@ -49,7 +49,7 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `sales_rule_form` - `salesrulestaging_update_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/OpenSearch/etc/adminhtml/system.xml b/app/code/Magento/OpenSearch/etc/adminhtml/system.xml index 56d9eff92fd3e..45409dee70587 100644 --- a/app/code/Magento/OpenSearch/etc/adminhtml/system.xml +++ b/app/code/Magento/OpenSearch/etc/adminhtml/system.xml @@ -83,7 +83,7 @@ <depends> <field id="engine">opensearch</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/Persistent/README.md b/app/code/Magento/Persistent/README.md index 0ffec3a4c8cd7..05279586d4dc9 100644 --- a/app/code/Magento/Persistent/README.md +++ b/app/code/Magento/Persistent/README.md @@ -41,7 +41,7 @@ The module dispatches the following events: - `persistent_session_expired` event in the `\Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver::execute` method -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -58,4 +58,4 @@ More information can get at articles: Cron group configuration can be set at `etc/crontab.xml`: - `persistent_clear_expired` - clear expired persistent sessions -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/ProductAlert/README.md b/app/code/Magento/ProductAlert/README.md index 5e6c1682024e0..76ee9f8066cd5 100644 --- a/app/code/Magento/ProductAlert/README.md +++ b/app/code/Magento/ProductAlert/README.md @@ -43,5 +43,5 @@ More information can get at articles: Cron group configuration can be set at `etc/crontab.xml`: - `catalog_product_alert` - send product alerts to customers -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/ProductVideo/README.md b/app/code/Magento/ProductVideo/README.md index 9f737596575a5..a36a1f777c655 100644 --- a/app/code/Magento/ProductVideo/README.md +++ b/app/code/Magento/ProductVideo/README.md @@ -37,7 +37,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] This module extends following ui components located in the `view/adminhtml/ui_component` directory: - `product_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/Quote/README.md b/app/code/Magento/Quote/README.md index 5b3b466402311..4c3cf42359f0c 100644 --- a/app/code/Magento/Quote/README.md +++ b/app/code/Magento/Quote/README.md @@ -108,7 +108,7 @@ The module dispatches the following events: - `sales_quote_item_collection_products_after_load` event in the `\Magento\Quote\Model\QuoteManagement::_assignProducts` method. Parameters: - `collection` is a product collection object (`\Magento\Catalog\Model\ResourceModel\Product\Collection` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Public APIs @@ -293,5 +293,5 @@ For information about an event in Magento 2, see [Events and observers](http://d - `\Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface` - converts quote ID to the masked quote ID -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). diff --git a/app/code/Magento/ReleaseNotification/README.md b/app/code/Magento/ReleaseNotification/README.md index 0cd2107e64432..060aeb24f473a 100644 --- a/app/code/Magento/ReleaseNotification/README.md +++ b/app/code/Magento/ReleaseNotification/README.md @@ -21,7 +21,7 @@ Extension developers can interact with the Magento_ReleaseNotification module. F You can extend release notification updates using the configuration files located in the `view/adminhtml/ui_component` directory: - `release_notification` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/nginx.conf.sample b/nginx.conf.sample index 1dda4ae249e17..cc1d52e1d9284 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -140,7 +140,7 @@ location /media/ { ## The following section allows to offload image resizing from Magento instance to the Nginx. ## Catalog image URL format should be set accordingly. -## See https://docs.magento.com/user-guide/configuration/general/web.html#url-options +## See https://experienceleague.adobe.com/docs/commerce-admin/config/general/web.html # location ~* ^/media/catalog/.* { # # # Replace placeholders and uncomment the line below to serve product images from public S3 From 6f9ee86dad322480e0d651cfad8f421093f677bf Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Mon, 19 Dec 2022 15:12:12 -0600 Subject: [PATCH 278/985] ACP2E-1451: Non-default configurations added as env variables break config import --- .../Magento/Config/App/Config/Type/System.php | 55 ++++++++++++++----- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Config/App/Config/Type/System.php b/app/code/Magento/Config/App/Config/Type/System.php index 522ed73fa37d2..3b2c85b5d71d3 100644 --- a/app/code/Magento/Config/App/Config/Type/System.php +++ b/app/code/Magento/Config/App/Config/Type/System.php @@ -36,12 +36,12 @@ class System implements ConfigTypeInterface /** * Config cache tag. */ - const CACHE_TAG = 'config_scopes'; + public const CACHE_TAG = 'config_scopes'; /** * System config type. */ - const CONFIG_TYPE = 'system'; + public const CONFIG_TYPE = 'system'; /** * @var string @@ -173,8 +173,7 @@ public function __construct( public function get($path = '') { if ($path === '') { - $this->data = array_replace_recursive($this->loadAllData(), $this->data); - + $this->data = $this->loadAllData(); return $this->data; } @@ -193,8 +192,7 @@ private function getWithParts($path) if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) { if (!isset($this->data[$pathParts[0]])) { - $data = $this->readData(); - $this->data = array_replace_recursive($data, $this->data); + $this->readData(); } return $this->data[$pathParts[0]]; @@ -204,7 +202,8 @@ private function getWithParts($path) if ($scopeType === ScopeInterface::SCOPE_DEFAULT) { if (!isset($this->data[$scopeType])) { - $this->data = array_replace_recursive($this->loadDefaultScopeData($scopeType), $this->data); + $scopeData = $this->loadDefaultScopeData() ?? []; + $this->setDataByScopeType($scopeType, $scopeData); } return $this->getDataByPathParts($this->data[$scopeType], $pathParts); @@ -213,11 +212,8 @@ private function getWithParts($path) $scopeId = array_shift($pathParts); if (!isset($this->data[$scopeType][$scopeId])) { - $scopeData = $this->loadScopeData($scopeType, $scopeId); - - if (!isset($this->data[$scopeType][$scopeId])) { - $this->data = array_replace_recursive($scopeData, $this->data); - } + $scopeData = $this->loadScopeData($scopeType, $scopeId) ?? []; + $this->setDataByScopeId($scopeType, $scopeId, $scopeData); } return isset($this->data[$scopeType][$scopeId]) @@ -256,16 +252,16 @@ private function loadAllData() /** * Load configuration data for default scope. * - * @param string $scopeType * @return array */ - private function loadDefaultScopeData($scopeType) + private function loadDefaultScopeData() { if (!$this->cacheState->isEnabled(Config::TYPE_IDENTIFIER)) { return $this->readData(); } - $loadAction = function () use ($scopeType) { + $loadAction = function () { + $scopeType = ScopeInterface::SCOPE_DEFAULT; $cachedData = $this->cache->load($this->configType . '_' . $scopeType); $scopeData = false; if ($cachedData !== false) { @@ -325,6 +321,35 @@ private function loadScopeData($scopeType, $scopeId) ); } + /** + * Sets data according to scope type. + * + * @param string|null $scopeType + * @param array $scopeData + * @return void + */ + private function setDataByScopeType(?string $scopeType, array $scopeData): void + { + if (!isset($this->data[$scopeType]) && isset($scopeData[$scopeType])) { + $this->data[$scopeType] = $scopeData[$scopeType]; + } + } + + /** + * Sets data according to scope type and id. + * + * @param string|null $scopeType + * @param string|null $scopeId + * @param array $scopeData + * @return void + */ + private function setDataByScopeId(?string $scopeType, ?string $scopeId, array $scopeData): void + { + if (!isset($this->data[$scopeType][$scopeId]) && isset($scopeData[$scopeType][$scopeId])) { + $this->data[$scopeType][$scopeId] = $scopeData[$scopeType][$scopeId]; + } + } + /** * Cache configuration data. * From de77a505cb5a3eeaeb8df8ddbc6710bfba7b46c8 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 20 Dec 2022 18:23:09 +0200 Subject: [PATCH 279/985] ACP2E-1413, fixed static --- app/code/Magento/Catalog/Controller/Category/View.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index c6097b5e66c76..bdc1901e3d577 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -249,7 +249,7 @@ public function execute() ->addBodyClass('categorypath-' . $this->categoryUrlPathGenerator->getUrlPath($category)) ->addBodyClass('category-' . $category->getUrlKey()); - if ($this->isToolbarAction() && $this->toolbarMemorizer->isMemorizingAllowed()) { + if ($this->shouldRedirectOnToolbarAction()) { $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl()); } return $page; @@ -305,11 +305,11 @@ private function applyLayoutUpdates( * * @return bool */ - private function isToolbarAction(): bool + private function shouldRedirectOnToolbarAction(): bool { $params = $this->getRequest()->getParams(); - return empty(array_intersect([ + return $this->toolbarMemorizer->isMemorizingAllowed() && empty(array_intersect([ Toolbar::PAGE_PARM_NAME, Toolbar::ORDER_PARAM_NAME, Toolbar::DIRECTION_PARAM_NAME, From 5c026b592610345291f0845417ddcf5ff1112f42 Mon Sep 17 00:00:00 2001 From: Dmytro Shevtsov <shevtsov@adobe.com> Date: Mon, 19 Dec 2022 15:52:44 -0600 Subject: [PATCH 280/985] Update devdocs links --- README.md | 22 +++++----- app/code/Magento/AdminNotification/README.md | 10 ++--- .../AdvancedPricingImportExport/README.md | 4 +- app/code/Magento/AdvancedSearch/README.md | 10 ++--- app/code/Magento/Amqp/README.md | 4 +- app/code/Magento/Analytics/README.md | 6 +-- .../Magento/AsynchronousOperations/README.md | 10 ++--- app/code/Magento/Authorization/README.md | 6 +-- app/code/Magento/Backend/README.md | 18 ++++---- app/code/Magento/Backup/README.md | 8 ++-- app/code/Magento/Catalog/README.md | 2 +- .../Magento/Catalog/etc/adminhtml/system.xml | 2 +- app/code/Magento/CatalogAnalytics/README.md | 2 +- .../Api/Data/StockCollectionInterface.php | 4 +- .../Api/Data/StockInterface.php | 4 +- .../Api/Data/StockItemCollectionInterface.php | 4 +- .../Api/Data/StockItemInterface.php | 4 +- .../Data/StockStatusCollectionInterface.php | 4 +- .../Api/Data/StockStatusInterface.php | 4 +- .../Api/RegisterProductSaleInterface.php | 4 +- .../Api/RevertProductSaleInterface.php | 4 +- .../Api/StockConfigurationInterface.php | 4 +- .../Api/StockCriteriaInterface.php | 4 +- .../Api/StockIndexInterface.php | 4 +- .../Api/StockItemCriteriaInterface.php | 4 +- .../Api/StockItemRepositoryInterface.php | 4 +- .../Api/StockManagementInterface.php | 4 +- .../Api/StockRegistryInterface.php | 4 +- .../Api/StockRepositoryInterface.php | 4 +- .../Api/StockStateInterface.php | 4 +- .../Api/StockStatusCriteriaInterface.php | 4 +- .../Api/StockStatusRepositoryInterface.php | 4 +- .../Block/Adminhtml/Form/Field/Minsaleqty.php | 4 +- .../Block/Adminhtml/Form/Field/Stock.php | 4 +- .../CatalogInventory/Block/Qtyincrements.php | 4 +- .../Block/Stockqty/DefaultStockqty.php | 4 +- .../Magento/CatalogInventory/Helper/Stock.php | 4 +- .../Model/Adminhtml/Stock/Item.php | 4 +- .../Model/Quote/Item/QuantityValidator.php | 4 +- .../Indexer/Stock/DefaultStock.php | 4 +- .../Indexer/Stock/QueryProcessorInterface.php | 4 +- .../Indexer/Stock/StockInterface.php | 4 +- .../ResourceModel/Indexer/StockFactory.php | 4 +- .../Model/ResourceModel/Stock/Status.php | 4 +- .../Model/Source/Backorders.php | 4 +- .../CatalogInventory/Model/Source/Stock.php | 4 +- .../Spi/StockRegistryProviderInterface.php | 4 +- .../Model/Spi/StockStateProviderInterface.php | 4 +- app/code/Magento/CatalogUrlRewrite/README.md | 6 +-- .../Magento/ConfigurableProduct/README.md | 8 ++-- app/code/Magento/Csp/README.md | 6 +-- .../Api/CustomerRepositoryInterface.php | 2 +- .../Customer/Api/GroupRepositoryInterface.php | 2 +- .../ResourceModel/CustomerRepository.php | 2 +- app/code/Magento/Customer/README.md | 16 +++---- app/code/Magento/CustomerAnalytics/README.md | 6 +-- .../CustomerDownloadableGraphQl/README.md | 4 +- app/code/Magento/CustomerGraphQl/README.md | 6 +-- .../Magento/CustomerImportExport/README.md | 4 +- app/code/Magento/Deploy/Model/Filesystem.php | 16 +++---- app/code/Magento/Developer/README.md | 6 +-- .../Api/AttributeSetRepositoryInterface.php | 2 +- app/code/Magento/EavGraphQl/README.md | 6 +-- app/code/Magento/Elasticsearch/README.md | 12 +++--- app/code/Magento/Elasticsearch7/README.md | 12 +++--- app/code/Magento/Email/README.md | 16 +++---- app/code/Magento/EncryptionKey/README.md | 6 +-- app/code/Magento/Fedex/README.md | 10 ++--- app/code/Magento/GiftMessage/README.md | 10 ++--- app/code/Magento/GiftMessageGraphQl/README.md | 2 +- app/code/Magento/GoogleAdwords/README.md | 4 +- app/code/Magento/GoogleAnalytics/README.md | 6 +-- app/code/Magento/GoogleGtag/README.md | 6 +-- app/code/Magento/GoogleOptimizer/README.md | 4 +- app/code/Magento/GraphQl/README.md | 6 +-- app/code/Magento/GraphQlCache/README.md | 8 ++-- .../Magento/GroupedCatalogInventory/README.md | 6 +-- .../Magento/GroupedImportExport/README.md | 6 +-- app/code/Magento/GroupedProduct/README.md | 8 ++-- .../Magento/GroupedProductGraphQl/README.md | 2 +- app/code/Magento/ImportExport/README.md | 10 ++--- .../Magento/Indexer/Model/Message/Invalid.php | 2 +- app/code/Magento/Indexer/README.md | 16 +++---- app/code/Magento/InstantPurchase/README.md | 10 ++--- app/code/Magento/Integration/README.md | 10 ++--- app/code/Magento/LayeredNavigation/README.md | 4 +- app/code/Magento/LoginAsCustomer/README.md | 2 +- .../LoginAsCustomerAssistance/README.md | 2 +- .../Magento/LoginAsCustomerGraphQl/README.md | 2 +- app/code/Magento/LoginAsCustomerLog/README.md | 4 +- app/code/Magento/Marketplace/README.md | 4 +- app/code/Magento/MediaContent/README.md | 6 +-- app/code/Magento/MediaContentApi/README.md | 6 +-- .../Magento/MediaContentCatalog/README.md | 6 +-- app/code/Magento/MediaContentCms/README.md | 6 +-- .../MediaContentSynchronization/README.md | 6 +-- .../MediaContentSynchronizationApi/README.md | 6 +-- .../README.md | 6 +-- .../MediaContentSynchronizationCms/README.md | 6 +-- app/code/Magento/MediaGallery/README.md | 8 ++-- app/code/Magento/MediaGalleryApi/README.md | 8 ++-- .../Magento/MediaGalleryCatalog/README.md | 8 ++-- .../MediaGalleryCatalogIntegration/README.md | 2 +- .../Magento/MediaGalleryCatalogUi/README.md | 10 ++--- app/code/Magento/MediaGalleryCmsUi/README.md | 8 ++-- .../Magento/MediaGalleryIntegration/README.md | 6 +-- .../Magento/MediaGalleryMetadata/README.md | 6 +-- .../Magento/MediaGalleryMetadataApi/README.md | 6 +-- .../Magento/MediaGalleryRenditions/README.md | 10 ++--- .../MediaGalleryRenditionsApi/README.md | 4 +- .../MediaGallerySynchronization/README.md | 10 ++--- .../MediaGallerySynchronizationApi/README.md | 6 +-- .../README.md | 6 +-- app/code/Magento/MediaGalleryUi/README.md | 10 ++--- app/code/Magento/MediaGalleryUiApi/README.md | 4 +- app/code/Magento/MediaStorage/README.md | 10 ++--- app/code/Magento/Msrp/README.md | 12 +++--- .../Magento/MsrpConfigurableProduct/README.md | 10 ++--- app/code/Magento/MsrpGroupedProduct/README.md | 10 ++--- app/code/Magento/Multishipping/README.md | 14 +++---- app/code/Magento/MysqlMq/README.md | 2 +- app/code/Magento/NewRelicReporting/README.md | 8 ++-- app/code/Magento/Newsletter/README.md | 10 ++--- app/code/Magento/NewsletterGraphQl/README.md | 6 +-- app/code/Magento/OfflinePayments/README.md | 10 ++--- app/code/Magento/OfflineShipping/README.md | 10 ++--- .../Payment/Model/Method/AbstractMethod.php | 2 +- app/code/Magento/Persistent/README.md | 10 ++--- app/code/Magento/ProductAlert/README.md | 8 ++-- app/code/Magento/ProductVideo/README.md | 12 +++--- .../Quote/Api/CartRepositoryInterface.php | 2 +- .../GuestPaymentMethodManagementInterface.php | 2 +- .../Api/PaymentMethodManagementInterface.php | 2 +- app/code/Magento/Quote/README.md | 6 +-- app/code/Magento/QuoteAnalytics/README.md | 8 ++-- app/code/Magento/QuoteBundleOptions/README.md | 6 +-- .../QuoteConfigurableOptions/README.md | 6 +-- .../Magento/QuoteDownloadableLinks/README.md | 6 +-- app/code/Magento/QuoteGraphQl/README.md | 42 +++++++++---------- .../Magento/RelatedProductGraphQl/README.md | 6 +-- .../Magento/ReleaseNotification/README.md | 6 +-- app/code/Magento/ReviewAnalytics/README.md | 2 +- .../Api/CreditmemoRepositoryInterface.php | 2 +- .../Sales/Api/InvoiceRepositoryInterface.php | 2 +- .../Api/OrderItemRepositoryInterface.php | 2 +- .../Sales/Api/OrderRepositoryInterface.php | 2 +- .../Sales/Api/ShipmentRepositoryInterface.php | 2 +- .../Api/TransactionRepositoryInterface.php | 2 +- app/code/Magento/SalesAnalytics/README.md | 2 +- .../Api/CouponRepositoryInterface.php | 2 +- .../SalesRule/Api/RuleRepositoryInterface.php | 2 +- app/code/Magento/SampleData/README.md | 2 +- .../SendFriend/etc/adminhtml/system.xml | 2 +- app/code/Magento/SendFriend/i18n/en_US.csv | 2 +- .../Tax/Api/TaxClassRepositoryInterface.php | 2 +- .../Tax/Api/TaxRateRepositoryInterface.php | 2 +- .../Tax/Api/TaxRuleRepositoryInterface.php | 2 +- app/code/Magento/WebapiAsync/README.md | 8 ++-- app/code/Magento/WebapiSecurity/README.md | 2 +- app/code/Magento/Weee/README.md | 12 +++--- app/code/Magento/WeeeGraphQl/README.md | 6 +-- app/code/Magento/Widget/README.md | 8 ++-- app/code/Magento/Wishlist/README.md | 14 +++---- app/code/Magento/WishlistAnalytics/README.md | 4 +- app/code/Magento/WishlistGraphQl/README.md | 14 +++---- .../parent/web/css/source/_extend-child.less | 2 +- .../Framework/View/Element/AbstractBlock.php | 2 +- phpserver/README.md | 4 +- setup/performance-toolkit/README.md | 2 +- setup/view/magento/setup/index.phtml | 2 +- 170 files changed, 512 insertions(+), 512 deletions(-) diff --git a/README.md b/README.md index 46c9fc128c00d..55af19302871e 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad ## Get started -- [Quick start install](https://devdocs.magento.com/guides/v2.4/install-gde/composer.html) -- [System requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html) -- [Prerequisites](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/prereq-overview.html) -- [More installation options](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html) +- [Quick start install](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html) +- [System requirements](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html) +- [Prerequisites](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/overview.html) +- [More installation options](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/overview.html) ## Get help @@ -28,8 +28,8 @@ However, for those who need a full-featured eCommerce solution, we recommend [Ad Our [Community](https://opensource.magento.com/) is large and diverse, and our project is enormous. As a contributor, you have countless opportunities to impact product development and delivery by introducing new features or improving existing ones, enhancing test coverage, updating documentation for [developers](https://devdocs.magento.com/) and [end-users](https://docs.magento.com/user-guide/), catching and fixing code bugs, suggesting points for optimization, and sharing your great ideas. -- [Contribute to the code](https://devdocs.magento.com/contributor-guide/contributing.html) -- [Report an issue](https://devdocs.magento.com/contributor-guide/contributing.html#report) +- [Contribute to the code](https://developer.adobe.com/commerce/contributor/guides/code-contributions/) +- [Report an issue](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#report) - [Improve the developer documentation](https://github.com/magento/devdocs) - [Improve the end-user documentation](https://github.com/magento/merchdocs) - [Shape the future of Magento Open Source](https://developer.adobe.com/open/magento) @@ -38,8 +38,8 @@ Our [Community](https://opensource.magento.com/) is large and diverse, and our p We encourage experts from the Community to help us with GitHub routines such as accepting, merging, or rejecting pull requests and reviewing issues. Adobe has granted the Community Maintainers permission to accept, merge, and reject pull requests, as well as review issues. Thanks to invaluable input from the Community Maintainers team, we can significantly improve contribution quality and accelerate the time to deliver your updates to production. -- [Learn more about the Maintainer role](https://devdocs.magento.com/contributor-guide/maintainers.html) -- [Maintainer's Handbook](https://devdocs.magento.com/contributor-guide/maintainer-handbook.html) +- [Learn more about the Maintainer role](https://developer.adobe.com/commerce/contributor/guides/maintainers/) +- [Maintainer's Handbook](https://developer.adobe.com/commerce/contributor/guides/maintainers/handbook/) [![](https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png)](https://magento.com/magento-contributors#maintainers) @@ -53,11 +53,11 @@ Adobe highly appreciates contributions that help us to improve the code, clarify We use labels in the GitHub issues and pull requests to help the participants retrieve additional information such as progress, component assignments, or release lines. -- [Labels applied by the Community Engineering team](https://devdocs.magento.com/contributor-guide/contributing.html#labels) +- [Labels applied by the Community Engineering team](https://developer.adobe.com/commerce/contributor/guides/code-contributions/#labels) ## Security -[Security](https://devdocs.magento.com/guides/v2.4/architecture/security_intro.html) is one of the highest priorities at Adobe. To learn more about reporting security concerns, visit the [Adobe Bug Bounty Program](https://hackerone.com/adobe). +[Security](https://developer.adobe.com/commerce/php/architecture/basics/security/) is one of the highest priorities at Adobe. To learn more about reporting security concerns, visit the [Adobe Bug Bounty Program](https://hackerone.com/adobe). Stay up-to-date on the latest security news and patches by signing up for [Security Alert Notifications](https://magento.com/security/sign-up). @@ -71,7 +71,7 @@ Subject to Licensee's/Customer's payment of fees and compliance with the terms a ## Communications -We are dedicated to our Community and encourage your contributions and welcome feedback through [events](https://www.adobe.io/open/magento/calendar), our [DevBlog](https://community.magento.com/t5/Magento-DevBlog/bg-p/devblog), Twitter and YouTube channels, and [other Community resources](https://devdocs.magento.com/community/resources.html). +We are dedicated to our Community and encourage your contributions and welcome feedback through [events](https://www.adobe.io/open/magento/calendar), our [DevBlog](https://community.magento.com/t5/Magento-DevBlog/bg-p/devblog), Twitter and YouTube channels, and [other Community resources](https://developer.adobe.com/commerce/contributor/community/). To connect with people from the Community and Adobe engineering, [join us in Slack](https://magentocommeng.slack.com). We have a channel for every project. To join a particular channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com), or [sign up](https://opensource.magento.com/slack). diff --git a/app/code/Magento/AdminNotification/README.md b/app/code/Magento/AdminNotification/README.md index 2967aa9ac60b4..d94604f1b7143 100644 --- a/app/code/Magento/AdminNotification/README.md +++ b/app/code/Magento/AdminNotification/README.md @@ -11,13 +11,13 @@ The Magento_AdminNotification module creates the following tables in the databas Before disabling or uninstalling this module, note that the Magento_Indexer module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AdminNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdminNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdminNotification module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdminNotification module. ### Events @@ -32,10 +32,10 @@ This module introduces the following layouts and layout handles in the `view/adm - `adminhtml_notification_index` - `adminhtml_notification_block` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components You can extend admin notifications using the `view/adminhtml/ui_component/notification_area.xml` configuration file. -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/AdvancedPricingImportExport/README.md b/app/code/Magento/AdvancedPricingImportExport/README.md index b389eabb341ad..2160b55ddad4c 100644 --- a/app/code/Magento/AdvancedPricingImportExport/README.md +++ b/app/code/Magento/AdvancedPricingImportExport/README.md @@ -4,6 +4,6 @@ The Magento_AdvancedPricingImportExport module handles the import and export of ## Extensibility -Extension developers can interact with the Magento_AdvancedPricingImportExport module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdvancedPricingImportExport module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedPricingImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdvancedPricingImportExport module. diff --git a/app/code/Magento/AdvancedSearch/README.md b/app/code/Magento/AdvancedSearch/README.md index 49cafc827d7cb..bfb217b97cb9e 100644 --- a/app/code/Magento/AdvancedSearch/README.md +++ b/app/code/Magento/AdvancedSearch/README.md @@ -9,13 +9,13 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_Elasticsearch - Magento_Elasticsearch7 -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedSearch module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AdvancedSearch module. ### Events @@ -23,7 +23,7 @@ This module observes the following event: - `catalogsearch_query_save_after` in the `Magento\AdvancedSearch\Model\Recommendations\SaveSearchQueryRelationsObserver` file. -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -37,4 +37,4 @@ The module interacts with the following layout handles in the `view/frontend/lay - `catalogsearch_result_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/Amqp/README.md b/app/code/Magento/Amqp/README.md index 6a47a072390a8..e39dde060d435 100644 --- a/app/code/Magento/Amqp/README.md +++ b/app/code/Magento/Amqp/README.md @@ -4,6 +4,6 @@ Magento_Amqp module provides functionality to publish/consume messages with the ## Extensibility -Extension developers can interact with the Magento_Amqp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Amqp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Amqp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Amqp module. diff --git a/app/code/Magento/Analytics/README.md b/app/code/Magento/Analytics/README.md index a7f7d87b650ea..cc1f6a71d77ff 100644 --- a/app/code/Magento/Analytics/README.md +++ b/app/code/Magento/Analytics/README.md @@ -1,6 +1,6 @@ # Magento_Analytics module -The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://business.adobe.com/products/magento/business-intelligence.html) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html) functionality. +The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://business.adobe.com/products/magento/business-intelligence.html) to use [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/) functionality. The module implements the following functionality: @@ -26,8 +26,8 @@ Before disabling or uninstalling this module, note that the following modules de ## Structure -Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `ReportXml`. -[Report XML](https://devdocs.magento.com/guides/v2.4/advanced-reporting/report-xml.html) is a markup language used to build reports for Advanced Reporting. +Beyond the [usual module file structure](https://developer.adobe.com/commerce/php/architecture/modules/overview/) the module contains a directory `ReportXml`. +[Report XML](https://developer.adobe.com/commerce/php/development/advanced-reporting/report-xml/) is a markup language used to build reports for Advanced Reporting. The language declares SQL queries using XML declaration. ## Subscription Process diff --git a/app/code/Magento/AsynchronousOperations/README.md b/app/code/Magento/AsynchronousOperations/README.md index cc826d66211c6..6984b7a3e03b5 100644 --- a/app/code/Magento/AsynchronousOperations/README.md +++ b/app/code/Magento/AsynchronousOperations/README.md @@ -14,13 +14,13 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_WebapiAsync -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AsynchronousOperations module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_AsynchronousOperations module. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts and layout handles in the `view/adm - `bulk_bulk_details_modal` - `bulk_index_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -45,4 +45,4 @@ You can extend Magento_AsynchronousOperations module using the following configu - `retriable_operation_listing` - `retriable_operation_modal_listing` -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/Authorization/README.md b/app/code/Magento/Authorization/README.md index 916903ffff36b..bb5389dee62f5 100644 --- a/app/code/Magento/Authorization/README.md +++ b/app/code/Magento/Authorization/README.md @@ -11,10 +11,10 @@ The Magento_Authorization module creates the following tables in the database us Before disabling or uninstalling this module, note that the Magento_GraphQl module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Authorization module. diff --git a/app/code/Magento/Backend/README.md b/app/code/Magento/Backend/README.md index 10d5b7baec9a9..74cf5a4fdd766 100644 --- a/app/code/Magento/Backend/README.md +++ b/app/code/Magento/Backend/README.md @@ -21,21 +21,21 @@ Before disabling or uninstalling this module, note that the following modules de - Magento_User - Magento_Webapi -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure -Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.4/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `Service/V1`. +Beyond the [usual module file structure](https://developer.adobe.com/commerce/php/architecture/modules/overview/) the module contains a directory `Service/V1`. `Service/V1` - contains logic to provide a list of modules installed in Magento. -For information about typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Backend module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Backend module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Backend module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Backend module. ### Events @@ -62,7 +62,7 @@ The module dispatches the following events: - `user_name` is username extracted from the credential storage object (`null | \Magento\Backend\Model\Auth\Credential\StorageInterface`) - `exception` any exception generated (`\Magento\Framework\Exception\LocalizedException | \Magento\Framework\Exception\Plugin\AuthenticationException`) -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -94,7 +94,7 @@ This module introduces the following layouts and layout handles in the `view/adm - `overlay_popup` - `popup` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -103,8 +103,8 @@ You can extend Magento_Backend module using the following configuration files: - `view/adminhtml/ui_component/design_config_form.xml` - `view/adminhtml/ui_component/design_config_listing.xml` -For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about UI components in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Backup/README.md b/app/code/Magento/Backup/README.md index 4d5f0941dd459..5a2445bfa7eab 100644 --- a/app/code/Magento/Backup/README.md +++ b/app/code/Magento/Backup/README.md @@ -8,9 +8,9 @@ For more information about this module, see [Magento Backups](https://docs.magen ## Extensibility -Extension developers can interact with the Magento_Backup module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Backup module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Backup module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Backup module. ### Layouts @@ -21,8 +21,8 @@ This module introduces the following layouts and layout handles in the `view/adm `backup_index_grid` `backup_index_index` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Catalog/README.md b/app/code/Magento/Catalog/README.md index 5b84d1d2e7ec7..0e43661ba8cae 100644 --- a/app/code/Magento/Catalog/README.md +++ b/app/code/Magento/Catalog/README.md @@ -9,7 +9,7 @@ Catalog module provides API filtering that allows to limit product selection wit ## Structure [Learn about a typical file structure for a Magento 2 module] - (https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html). + (https://developer.adobe.com/commerce/php/development/build/component-file-structure/). ## Observer This module observes the following events: diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index a1b2202309d62..b90d59997b87a 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -218,7 +218,7 @@ <field id="catalog_media_url_format" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1"> <label>Catalog media URL format</label> <source_model>Magento\Catalog\Model\Config\Source\Web\CatalogMediaUrlFormat</source_model> - <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> + <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> </field> </group> </section> diff --git a/app/code/Magento/CatalogAnalytics/README.md b/app/code/Magento/CatalogAnalytics/README.md index bfea74e7ddd88..7b6ee7e9ae009 100644 --- a/app/code/Magento/CatalogAnalytics/README.md +++ b/app/code/Magento/CatalogAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_CatalogAnalytics module -The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_CatalogAnalytics module configures data definitions for a data collection related to the Catalog module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php index 4b9383b9eb106..aa5af91b75fbe 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php @@ -17,8 +17,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php index e0375471acf19..508b9377cc098 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php index d280df7e9fe1e..f6a73f30741ed 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php @@ -17,8 +17,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php index 4b42c6498c942..da38af7ad4ae3 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php index c3649496f2be8..d2bb8f6456376 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusCollectionInterface extends SearchResultsInterface { diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php index 10123c9c5a103..56c931edccdef 100644 --- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php +++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusInterface extends ExtensibleDataInterface { diff --git a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php index e530b0d83c9c4..a4773db7d20b8 100644 --- a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php +++ b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php @@ -14,8 +14,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.3.0 */ interface RegisterProductSaleInterface diff --git a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php index 5d5f22580b1e4..ad543c5e3e5d8 100644 --- a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php +++ b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php @@ -11,8 +11,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.3.0 */ interface RevertProductSaleInterface diff --git a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php index 4436f3b220c2c..54ffab34e8c23 100644 --- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockConfigurationInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php index 5c3c82701339a..245cebc6e4a7b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php index e3288d355f742..c9fef8f0f6115 100644 --- a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockIndexInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php index 19c5f597d4b36..9ff9497c705da 100644 --- a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php index 41b96b0d5ccd0..d81a933fb042b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockItemRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php index a3fca303236b4..ec0906ca5471d 100644 --- a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockManagementInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php index 07bf2746338d9..3021dca1e391f 100644 --- a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRegistryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php index f38d4a2ca91b3..0492ba1cb5480 100644 --- a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php index ad7291281ed3e..1b09a1a39b869 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStateInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php index cd26a575b676e..a558d834be034 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusCriteriaInterface extends \Magento\Framework\Api\CriteriaInterface { diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php index b120b93c9193e..6f609cf18fb1b 100644 --- a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php +++ b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStatusRepositoryInterface { diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php index e7918e32f78a2..5008836c2997b 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php @@ -14,8 +14,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Minsaleqty extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray { diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php index 79aa47b33ea10..407c338c0ae4e 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php @@ -16,8 +16,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Stock extends \Magento\Framework\Data\Form\Element\Select { diff --git a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php index 909ec9346ebf0..6bbfdfff3017e 100644 --- a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php +++ b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php @@ -16,8 +16,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Qtyincrements extends Template implements IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php index cb7d68c92ef6f..e743ac6cda21f 100644 --- a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php +++ b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php @@ -13,8 +13,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class DefaultStockqty extends AbstractStockqty implements \Magento\Framework\DataObject\IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Helper/Stock.php b/app/code/Magento/CatalogInventory/Helper/Stock.php index e79d2098be68a..cc47f912ddd5b 100644 --- a/app/code/Magento/CatalogInventory/Helper/Stock.php +++ b/app/code/Magento/CatalogInventory/Helper/Stock.php @@ -20,8 +20,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.0.2 */ class Stock diff --git a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php index c2715241fbe1d..53630dcbbc968 100644 --- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php @@ -22,8 +22,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Item extends \Magento\CatalogInventory\Model\Stock\Item implements IdentityInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php index 59c4722c3aadb..ac4690d46be88 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php @@ -27,8 +27,8 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class QuantityValidator { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php index fceb079b1abe2..7236278df024c 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php @@ -33,8 +33,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class DefaultStock extends AbstractIndexer implements StockInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php index 4a78babd03201..db31c47b84700 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php @@ -13,8 +13,8 @@ * @since 100.1.0 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface QueryProcessorInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php index e111a5267da77..ed762bdf3fa19 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockInterface { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php index f109643bc09c5..b1c35950304aa 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php @@ -14,8 +14,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class StockFactory { diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php index adf62b75b2adb..bb38c03f58545 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php @@ -24,8 +24,8 @@ * @api * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html * @since 100.0.2 */ class Status extends AbstractDb diff --git a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php index 59d359433c268..dbbde539d573c 100644 --- a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php +++ b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php @@ -11,8 +11,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Backorders implements \Magento\Framework\Option\ArrayInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Source/Stock.php b/app/code/Magento/CatalogInventory/Model/Source/Stock.php index bc9b8471ccd8b..84997907c4f2e 100644 --- a/app/code/Magento/CatalogInventory/Model/Source/Stock.php +++ b/app/code/Magento/CatalogInventory/Model/Source/Stock.php @@ -19,8 +19,8 @@ * @since 100.0.2 * * @deprecated 100.3.0 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ class Stock extends AbstractSource { diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php index bbba3498ab03f..e1abb020b9ace 100644 --- a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php +++ b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php @@ -9,8 +9,8 @@ * Interface StockRegistryProviderInterface * * @deprecated 100.3.2 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockRegistryProviderInterface { diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php index 2cc69513f31b7..156520e4aa8e7 100644 --- a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php +++ b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php @@ -11,8 +11,8 @@ * Interface StockStateProviderInterface * * @deprecated 100.3.2 Replaced with Multi Source Inventory - * @link https://devdocs.magento.com/guides/v2.4/inventory/index.html - * @link https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html + * @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html */ interface StockStateProviderInterface { diff --git a/app/code/Magento/CatalogUrlRewrite/README.md b/app/code/Magento/CatalogUrlRewrite/README.md index c0e605da6d2c1..a03229147129c 100644 --- a/app/code/Magento/CatalogUrlRewrite/README.md +++ b/app/code/Magento/CatalogUrlRewrite/README.md @@ -4,8 +4,8 @@ This module generate url rewrite fields for catalog and product. ## Extensibility -Extension developers can interact with the Magento_CatalogUrlRewrite module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CatalogUrlRewrite module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CatalogUrlRewrite module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CatalogUrlRewrite module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. \ No newline at end of file +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. \ No newline at end of file diff --git a/app/code/Magento/ConfigurableProduct/README.md b/app/code/Magento/ConfigurableProduct/README.md index b0cc21d1bc77e..1a693b0db94eb 100644 --- a/app/code/Magento/ConfigurableProduct/README.md +++ b/app/code/Magento/ConfigurableProduct/README.md @@ -10,13 +10,13 @@ For example, store owner sells t-shirts in two colors and three sizes. `ConfigurableProduct/` - the directory that declares ConfigurableProduct metadata used by the module. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_ConfigurableProduct module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ConfigurableProduct module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ConfigurableProduct module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ConfigurableProduct module. ## Additional information @@ -24,7 +24,7 @@ Extension developers can interact with the Magento_ConfigurableProduct module. F Modify the value of the `gallery_switch_strategy` variable in the theme view.xml file to configure how gallery images should be updated when a user switches between product configurations. -Learn how to [configure variables](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#view_xml_vars) in the view.xml file. +Learn how to [configure variables](https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#view_xml_vars) in the view.xml file. There are two available values for the `gallery_switch_strategy` variable: diff --git a/app/code/Magento/Csp/README.md b/app/code/Magento/Csp/README.md index 5a7305ca073f0..0cd2cbb907054 100644 --- a/app/code/Magento/Csp/README.md +++ b/app/code/Magento/Csp/README.md @@ -4,8 +4,8 @@ provides a way for extension and theme developers to configure CSP headers for t ## Extensibility -Extension developers can interact with the Magento_Csp module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Csp module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Csp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Csp module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php index ca9bf4dc7afd6..12a2f3f4ff2ac 100644 --- a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php @@ -51,7 +51,7 @@ public function getById($customerId); * Retrieve customers which match a specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CustomerRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php index f6ba387e913b2..3a62580b000b3 100644 --- a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php @@ -42,7 +42,7 @@ public function getById($id); * be filtered by tax class. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#GroupRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#GroupRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php index 292f41e241e0d..1be4f684e9b9d 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php @@ -407,7 +407,7 @@ public function getById($customerId) * Retrieve customers which match a specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CustomerRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Customer/README.md b/app/code/Magento/Customer/README.md index f5667078a379b..0760482d171d8 100644 --- a/app/code/Magento/Customer/README.md +++ b/app/code/Magento/Customer/README.md @@ -50,15 +50,15 @@ The Magento_Customer module creates the following tables in the database: - `customer_visitor` - `customer_log` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Customer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Customer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Customer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Customer module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -160,7 +160,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `customer_address_index` - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs @@ -343,8 +343,8 @@ More information can get at articles: - [Customer Configurations](https://docs.magento.com/user-guide/configuration/customers/customer-configuration.html) - [Customer Attributes](https://docs.magento.com/user-guide/stores/attributes-customer.html) - [Customer Address Attributes](https://docs.magento.com/user-guide/stores/attributes-customer-address.html) -- [EAV And Extension Attributes](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/attributes.html) -- [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html) +- [EAV And Extension Attributes](https://developer.adobe.com/commerce/php/development/components/attributes/) +- [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html) ### Console commands @@ -363,4 +363,4 @@ Cron group configuration can be set at `etc/crontab.xml`: This module introduces the following indexers: - `customer_grid` - customer grid indexer -[Learn how to manage the indexers](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-index.html). +[Learn how to manage the indexers](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/manage-indexers.html). diff --git a/app/code/Magento/CustomerAnalytics/README.md b/app/code/Magento/CustomerAnalytics/README.md index 37ac79472bb2f..b9cc560cea7e0 100644 --- a/app/code/Magento/CustomerAnalytics/README.md +++ b/app/code/Magento/CustomerAnalytics/README.md @@ -9,10 +9,10 @@ Before installing this module, note that the Magento_CustomerAnalytics is depend - `Magento_Customer` - `Magento_Analytics` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional data More information can get at articles: -- [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/overview.html) -- [Data collection for advanced reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/data-collection.html) +- [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/) +- [Data collection for advanced reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/data-collection/) diff --git a/app/code/Magento/CustomerDownloadableGraphQl/README.md b/app/code/Magento/CustomerDownloadableGraphQl/README.md index dba15882434d0..b4ae77451c07d 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/README.md +++ b/app/code/Magento/CustomerDownloadableGraphQl/README.md @@ -9,7 +9,7 @@ Before installing this module, note that the Magento_CustomerDownloadableGraphQl - `Magento_GraphQl` - `Magento_DownloadableGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -25,4 +25,4 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent - `customerDownloadableProducts` query - retrieve the list of purchased downloadable products for the logged-in customer -[Learn more about customerDownloadableProducts query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer-downloadable-products.html). +[Learn more about customerDownloadableProducts query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/downloadable-products/). diff --git a/app/code/Magento/CustomerGraphQl/README.md b/app/code/Magento/CustomerGraphQl/README.md index f632f52b3584b..fd9955b3ca9c5 100644 --- a/app/code/Magento/CustomerGraphQl/README.md +++ b/app/code/Magento/CustomerGraphQl/README.md @@ -13,7 +13,7 @@ Before disabling or uninstalling this module, note that the following modules de - `Magento_WishlistGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -30,5 +30,5 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent - `customer` query - returns information about the logged-in customer, store credit history and customer’s wishlist - `isEmailAvailable` query - checks whether the specified email has already been used to create a customer account. A value of true indicates the email address is available, and the customer can use the email address to create an account -[Learn more about customer query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer.html). -[Learn more about isEmailAvailable query](https://devdocs.magento.com/guides/v2.4/graphql/queries/is-email-available.html). +[Learn more about customer query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/customer/). +[Learn more about isEmailAvailable query](https://developer.adobe.com/commerce/webapi/graphql/usage/is-email-available.html). diff --git a/app/code/Magento/CustomerImportExport/README.md b/app/code/Magento/CustomerImportExport/README.md index 2e7a915d1b5ac..a3bd8e8e75ace 100644 --- a/app/code/Magento/CustomerImportExport/README.md +++ b/app/code/Magento/CustomerImportExport/README.md @@ -4,7 +4,7 @@ This module handles the import and export of the customers data and related addr ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -19,7 +19,7 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `customer_import_export_index_exportxml` - `customer_index_grid_block` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/Deploy/Model/Filesystem.php b/app/code/Magento/Deploy/Model/Filesystem.php index 59a2f0f7cfe9d..f72630c954e8d 100644 --- a/app/code/Magento/Deploy/Model/Filesystem.php +++ b/app/code/Magento/Deploy/Model/Filesystem.php @@ -29,8 +29,8 @@ class Filesystem * Access permissions to the files are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html */ const PERMISSIONS_FILE = 0640; @@ -41,8 +41,8 @@ class Filesystem * Access permissions to the directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html */ const PERMISSIONS_DIR = 0750; @@ -305,8 +305,8 @@ public function cleanupFilesystem($directoryCodeList) * Access permissions to the files and directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files and directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html * @throws \Magento\Framework\Exception\FileSystemException */ protected function changePermissions($directoryCodeList, $dirPermissions, $filePermissions) @@ -331,8 +331,8 @@ protected function changePermissions($directoryCodeList, $dirPermissions, $fileP * Access permissions to the files and directories are set during deploy Magento 2, directly after * uploading code of Magento. Also it is possible to specify the value * of inverse mask for setting access permissions to files and directories generated by Magento. - * @link https://devdocs.magento.com/guides/v2.4/install-gde/install/post-install-umask.html - * @link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/set-umask.html + * @link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/file-system/configure-permissions.html * @throws \Magento\Framework\Exception\FileSystemException */ public function lockStaticResources() diff --git a/app/code/Magento/Developer/README.md b/app/code/Magento/Developer/README.md index f0ccdb7217ec7..d5a6a2cee9d46 100644 --- a/app/code/Magento/Developer/README.md +++ b/app/code/Magento/Developer/README.md @@ -4,8 +4,8 @@ The Magento_Developer module provides functionality to make it easier to develop ## Extensibility -Extension developers can interact with the Magento_Developer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Developer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Developer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Developer module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. \ No newline at end of file +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. \ No newline at end of file diff --git a/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php b/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php index be4b5a3fa0fe5..224fde25460c1 100644 --- a/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php +++ b/app/code/Magento/Eav/Api/AttributeSetRepositoryInterface.php @@ -17,7 +17,7 @@ interface AttributeSetRepositoryInterface * Retrieve list of Attribute Sets * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#AttributeSetRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/EavGraphQl/README.md b/app/code/Magento/EavGraphQl/README.md index ba1dc948c8087..6bf418c798dec 100644 --- a/app/code/Magento/EavGraphQl/README.md +++ b/app/code/Magento/EavGraphQl/README.md @@ -4,12 +4,12 @@ Magento_EavGraphQl module extends Magento_GraphQl and Magento_Eav modules to pro ## Installation details -For information about enabling or disabling a module in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information You can get more information at articles: - [GraphQl In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql). -- [customAttributeMetadata query](https://devdocs.magento.com/guides/v2.4/graphql/queries/custom-attribute-metadata.html). -- [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html) +- [customAttributeMetadata query](https://developer.adobe.com/commerce/webapi/graphql/schema/store/queries/custom-attribute-metadata/). +- [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html) diff --git a/app/code/Magento/Elasticsearch/README.md b/app/code/Magento/Elasticsearch/README.md index 6c2322cc5d9d9..835cd4ab37f19 100644 --- a/app/code/Magento/Elasticsearch/README.md +++ b/app/code/Magento/Elasticsearch/README.md @@ -10,7 +10,7 @@ The module implements Magento_Search library interfaces. The Magento_Elasticsearch module is one of the base Magento 2 modules. You cannot disable or uninstall this module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -18,15 +18,15 @@ For information about a module installation in Magento 2, see [Enable or disable `SearchAdapter/` - the directory that contains solutions for adapting ElasticSearch query searching. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about ElasticSearch are at articles: - [Configuring Catalog Search](https://docs.magento.com/user-guide/catalog/search-configuration.html). -- [Installation Guide/Elasticsearch](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/elasticsearch.html). -- [Configure and maintain Elasticsearch](https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-overview.html). -- Magento Commerce Cloud - [set up Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html). +- [Installation Guide/Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/search-engine/overview.html). +- [Configure and maintain Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/search/overview-search.html). +- Magento Commerce Cloud - [set up Elasticsearch service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/elasticsearch.html). diff --git a/app/code/Magento/Elasticsearch7/README.md b/app/code/Magento/Elasticsearch7/README.md index c484694e7d267..d520f5efc3b91 100644 --- a/app/code/Magento/Elasticsearch7/README.md +++ b/app/code/Magento/Elasticsearch7/README.md @@ -8,21 +8,21 @@ The module implements Magento_Search library interfaces. The Magento_Elasticsearch7 module is one of the base Magento 2 modules. Disable or uninstall this module is not recommends. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `SearchAdapter/` - the directory that contains solutions for adapting ElasticSearch query searching. -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about ElasticSearch are at articles: - [Configuring Catalog Search](https://docs.magento.com/user-guide/catalog/search-configuration.html). -- [Installation Guide/Elasticsearch](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/elasticsearch.html). -- [Configure and maintain Elasticsearch](https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-overview.html). -- Magento Commerce Cloud - [set up Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html). +- [Installation Guide/Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/search-engine/overview.html). +- [Configure and maintain Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/search/overview-search.html). +- Magento Commerce Cloud - [set up Elasticsearch service](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/service/elasticsearch.html). diff --git a/app/code/Magento/Email/README.md b/app/code/Magento/Email/README.md index d2c6a4e6901c2..3844f0a1e3db8 100644 --- a/app/code/Magento/Email/README.md +++ b/app/code/Magento/Email/README.md @@ -8,33 +8,33 @@ This module adds the page to create/edit email template at the admin side and po The Magento_Email module is one of the base Magento 2 modules. You cannot disable or uninstall this module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Email module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Email module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Email module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Email module. ### Layouts The module introduces layout handles in the `view/adminhtml/layout` directory. -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components You can extend product and category updates using the configuration files located in the `view/adminhtml/ui_component` directory. -For information about a UI component in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). More information about email templates are at articles: - [Marketing/Email](https://docs.magento.com/user-guide/marketing/email-templates.html) - [Email templates list](https://docs.magento.com/user-guide/marketing/email-template-list.html) -- [Customize email templates](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-email.html) -- [Migrating custom email templates](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-email-migration.html#nested-arrays) +- [Customize email templates](https://developer.adobe.com/commerce/frontend-core/guide/templates/email/) +- [Migrating custom email templates](https://developer.adobe.com/commerce/frontend-core/guide/templates/email-migration/#nested-arrays) diff --git a/app/code/Magento/EncryptionKey/README.md b/app/code/Magento/EncryptionKey/README.md index ee28c66b80c4c..07838cceeb3f2 100644 --- a/app/code/Magento/EncryptionKey/README.md +++ b/app/code/Magento/EncryptionKey/README.md @@ -4,9 +4,9 @@ The Magento_EncryptionKey module provides an advanced encryption model to protec ## Extensibility -Extension developers can interact with the Magento_EncryptionKey module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_EncryptionKey module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_EncryptionKey module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_EncryptionKey module. ### Layouts @@ -16,6 +16,6 @@ This module introduces the following layouts and layout handles in the `view/adm ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). Some more information you can get at [Encryption Key](https://docs.magento.com/user-guide/system/encryption-key.html) article. diff --git a/app/code/Magento/Fedex/README.md b/app/code/Magento/Fedex/README.md index 641ed68a46609..b872b53bf879e 100644 --- a/app/code/Magento/Fedex/README.md +++ b/app/code/Magento/Fedex/README.md @@ -4,15 +4,15 @@ This module implements the integration with the FedEx shipping carrier. ## Installation details -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Fedex module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Fedex module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Fedex module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Fedex module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -25,4 +25,4 @@ This module introduces the following layouts in the `view/frontend/layout` direc You can get more information about delivery method in magento at the articles: - [FedEx Configuration Settings](https://docs.magento.com/user-guide/shipping/fedex.html) - [Delivery Methods Configuration](https://docs.magento.com/user-guide/configuration/sales/delivery-methods.html) -- [Add custom shipping carrier](https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout-add-custom-carrier.html) +- [Add custom shipping carrier](https://developer.adobe.com/commerce/php/tutorials/frontend/custom-checkout/add-shipping-carrier/) diff --git a/app/code/Magento/GiftMessage/README.md b/app/code/Magento/GiftMessage/README.md index 127b61e3c2c54..6c807143384af 100644 --- a/app/code/Magento/GiftMessage/README.md +++ b/app/code/Magento/GiftMessage/README.md @@ -23,15 +23,15 @@ This module modifies the following tables in the database: - `sales_order` - adds column `gift_message_id` - `sales_order_item` - adds columns `gift_message_id` and `gift_message_available` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GiftMessage module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GiftMessage module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GiftMessage module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GiftMessage module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -56,7 +56,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `checkout_cart_index` - `checkout_cart_item_renderers` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs diff --git a/app/code/Magento/GiftMessageGraphQl/README.md b/app/code/Magento/GiftMessageGraphQl/README.md index 1b38bbc5ff57e..401f718b791df 100644 --- a/app/code/Magento/GiftMessageGraphQl/README.md +++ b/app/code/Magento/GiftMessageGraphQl/README.md @@ -6,7 +6,7 @@ This module provides information about gift messages for carts, cart items, orde Before installing this module, note that the Magento_GiftMessageGraphQl is dependent on the Magento_GiftMessage module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/GoogleAdwords/README.md b/app/code/Magento/GoogleAdwords/README.md index eb28c1af96b93..8dd6ab7b2d32b 100644 --- a/app/code/Magento/GoogleAdwords/README.md +++ b/app/code/Magento/GoogleAdwords/README.md @@ -6,7 +6,7 @@ This module implements the integration with the Google AdWords service. Before installing this module, note that the Magento_GoogleAdwords is dependent on the Magento_Checkout module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -19,7 +19,7 @@ Extension developers can interact with the Magento_GoogleAdwords module. For mor This module introduces the following layouts in the `view/frontend/layout` directory: - `checkout_onepage_success` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleAnalytics/README.md b/app/code/Magento/GoogleAnalytics/README.md index bfc5bcc6eb391..3a26674cdb614 100644 --- a/app/code/Magento/GoogleAnalytics/README.md +++ b/app/code/Magento/GoogleAnalytics/README.md @@ -8,7 +8,7 @@ Before installing this module, note that the Magento_GoogleAnalytics is dependen Before disabling or uninstalling this module, note that the Magento_GoogleOptimizer module depends on this module -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -16,14 +16,14 @@ Extension developers can interact with the Magento_GoogleAnalytics module. For m [The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAnalytics module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts This module introduces the following layouts in the `view/frontend/layout` directory: - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleGtag/README.md b/app/code/Magento/GoogleGtag/README.md index 612297081a26e..32ec59055f76b 100644 --- a/app/code/Magento/GoogleGtag/README.md +++ b/app/code/Magento/GoogleGtag/README.md @@ -8,7 +8,7 @@ Before installing this module, note that the Magento_GoogleGtag is dependent on Before disabling or uninstalling this module, note that the Magento_GoogleOptimizer module depends on this module -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -16,7 +16,7 @@ Extension developers can interact with the Magento_GoogleGtag module. For more i [The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleGtag module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -24,7 +24,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `default` - `checkout_onepage_success` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/GoogleOptimizer/README.md b/app/code/Magento/GoogleOptimizer/README.md index 83202eacdcd83..dd2011e73e2d8 100644 --- a/app/code/Magento/GoogleOptimizer/README.md +++ b/app/code/Magento/GoogleOptimizer/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GoogleOptimizer is dependen - `Magento_Cms` - `Magento_Ui` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `catalog_product_view` - `cms_page_view` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/GraphQl/README.md b/app/code/Magento/GraphQl/README.md index ff330ce383755..de575fae59b5f 100644 --- a/app/code/Magento/GraphQl/README.md +++ b/app/code/Magento/GraphQl/README.md @@ -25,13 +25,13 @@ The following modules depend on this module: - `Magento_ReviewGraphQl` - `Magento_StoreGraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GraphQl module. ## Additional information diff --git a/app/code/Magento/GraphQlCache/README.md b/app/code/Magento/GraphQlCache/README.md index ab0581127acec..32555f1423666 100644 --- a/app/code/Magento/GraphQlCache/README.md +++ b/app/code/Magento/GraphQlCache/README.md @@ -10,15 +10,15 @@ Before installing this module, note that the Magento_GraphQlCache module is depe - `Magento_PageCache` - `Magento_GraphQl` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GraphQlCache module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GraphQlCache module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GraphQlCache module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GraphQlCache module. ## Additional information - [Learn more about GraphQl In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql). -- [Learn more about GraphQl Caching In Magento 2](https://devdocs.magento.com/guides/v2.4/graphql/caching.html). +- [Learn more about GraphQl Caching In Magento 2](https://developer.adobe.com/commerce/webapi/graphql/usage/caching/). diff --git a/app/code/Magento/GroupedCatalogInventory/README.md b/app/code/Magento/GroupedCatalogInventory/README.md index 5091aedd14f54..3930fcffa6e05 100644 --- a/app/code/Magento/GroupedCatalogInventory/README.md +++ b/app/code/Magento/GroupedCatalogInventory/README.md @@ -9,10 +9,10 @@ Before installing this module, note that the Magento_GroupedCatalogInventory mod - `Magento_Catalog` - `Magento_GroupedProduct` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GroupedCatalogInventory module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedCatalogInventory module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedCatalogInventory module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedCatalogInventory module. diff --git a/app/code/Magento/GroupedImportExport/README.md b/app/code/Magento/GroupedImportExport/README.md index 28b66412d97ca..b092f88f421bd 100644 --- a/app/code/Magento/GroupedImportExport/README.md +++ b/app/code/Magento/GroupedImportExport/README.md @@ -5,13 +5,13 @@ This module is designed to extend existing functionality of Magento_CatalogImpor ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_GroupedImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedImportExport module. ## Additional information diff --git a/app/code/Magento/GroupedProduct/README.md b/app/code/Magento/GroupedProduct/README.md index b2b3fffce0180..27bfb69ae32c5 100644 --- a/app/code/Magento/GroupedProduct/README.md +++ b/app/code/Magento/GroupedProduct/README.md @@ -21,7 +21,7 @@ Before disabling or uninstalling this module, note that the following modules de - `Magento_GroupedProductGraphQl` - `Magento_MsrpGroupedProduct` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -31,9 +31,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_GroupedProduct module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedProduct module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedProduct module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedProduct module. ### Layouts @@ -68,7 +68,7 @@ This module introduces the following layouts in the `view/frontend/layout`, `vie - `view/base/layout`: - `catalog_product_prices` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/GroupedProductGraphQl/README.md b/app/code/Magento/GroupedProductGraphQl/README.md index f3aa6be9ed4f1..c6fc44ab4e2c6 100644 --- a/app/code/Magento/GroupedProductGraphQl/README.md +++ b/app/code/Magento/GroupedProductGraphQl/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GroupedProductGraphQl is de - `Magento_GraphQl` - `Magento_CatalogGraphQlr` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/ImportExport/README.md b/app/code/Magento/ImportExport/README.md index 9a130aee1102e..e68898e55610f 100644 --- a/app/code/Magento/ImportExport/README.md +++ b/app/code/Magento/ImportExport/README.md @@ -11,7 +11,7 @@ The Magento_ImportExport module creates the following tables in the database: All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -21,9 +21,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_ImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ImportExport module. ### Layouts @@ -67,7 +67,7 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( - `exportProcessor` - consumer to run export process -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). #### Create custom import entity @@ -80,6 +80,6 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( 2. Create an export model You can get more information about import/export processes in magento at the articles: -- [Create custom import entity](https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/custom-import-entity.html) +- [Create custom import entity](https://developer.adobe.com/commerce/php/tutorials/backend/create-custom-import-entity/) - [Import](https://docs.magento.com/user-guide/system/data-import.html) - [Export](https://docs.magento.com/user-guide/system/data-export.html) diff --git a/app/code/Magento/Indexer/Model/Message/Invalid.php b/app/code/Magento/Indexer/Model/Message/Invalid.php index 086d06a88fa85..d7146f75577b3 100644 --- a/app/code/Magento/Indexer/Model/Message/Invalid.php +++ b/app/code/Magento/Indexer/Model/Message/Invalid.php @@ -75,7 +75,7 @@ public function getText() return __( 'One or more <a href="%1">indexers are invalid</a>. Make sure your <a href="%2" target="_blank">Magento cron job</a> is running.', $url, - 'https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#create-or-remove-the-magento-crontab' + 'https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html#create-or-remove-the-magento-crontab' ); //@codingStandardsIgnoreEnd } diff --git a/app/code/Magento/Indexer/README.md b/app/code/Magento/Indexer/README.md index 2cba0b43be0d3..831387376e085 100644 --- a/app/code/Magento/Indexer/README.md +++ b/app/code/Magento/Indexer/README.md @@ -22,7 +22,7 @@ The Magento_Indexer module creates the following tables in the database: - `indexer_state` - `mview_state` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -32,9 +32,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_Indexer module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Indexer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Indexer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Indexer module. ### Events @@ -53,7 +53,7 @@ The module dispatches the following events: - `clean_cache_by_tags` event in the `\Magento\Indexer\Model\Processor\CleanCache::afterReindexAllInvalid` method. Parameters: - `object` is a `context` object (`Magento\Framework\Indexer\CacheContext` class) -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -61,7 +61,7 @@ This module introduces the following layout handles in the `view/adminhtml/layou - `indexer_indexer_list` - `indexer_indexer_list_grid` -For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about layouts in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information @@ -94,8 +94,8 @@ Cron group configuration can be set at `etc/crontab.xml`: [Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). More information can get at articles: -- [Learn more about indexing](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing.html) +- [Learn more about indexing](https://developer.adobe.com/commerce/php/development/components/indexing/) - [Learn more about Indexer optimization](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexer-batch.html) -- [Learn more how to add custom indexer](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing-custom.html) -- [Learn how to manage indexers](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-index.html) +- [Learn more how to add custom indexer](https://developer.adobe.com/commerce/php/development/components/indexing/custom-indexer/) +- [Learn how to manage indexers](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/manage-indexers.html) - [Learn more about Index Management](https://docs.magento.com/user-guide/system/index-management.html) diff --git a/app/code/Magento/InstantPurchase/README.md b/app/code/Magento/InstantPurchase/README.md index 66b14b0c72c8b..639e50b214d05 100644 --- a/app/code/Magento/InstantPurchase/README.md +++ b/app/code/Magento/InstantPurchase/README.md @@ -4,7 +4,7 @@ This module allows the Customer to place the order in seconds without going thro ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -14,9 +14,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_InstantPurchase module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_InstantPurchase module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_InstantPurchase module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_InstantPurchase module. ### Public APIs @@ -59,7 +59,7 @@ All payments created for instant purchase also have `'instant-purchase' => true` ### Payment method integration -Instant purchase support may be implemented for any payment method with [vault support](https://devdocs.magento.com/guides/v2.4/payments-integrations/vault/vault-intro.html). +Instant purchase support may be implemented for any payment method with [vault support](https://developer.adobe.com/commerce/php/development/payments-integrations/vault/). Basic implementation provided in `Magento\InstantPurchase\PaymentMethodIntegration` should be enough in most cases. It is not enabled by default to avoid issues on production sites and authors of vault payment method should verify correct work for instant purchase manually. To enable basic implementation just add single option to configuration of payemnt method in `config.xml`: @@ -96,7 +96,7 @@ Basic implementation is a good start point but it's recommended to provide own i The `Magento_InstantPurchase` module does not introduce backward incompatible changes. -You can track [backward incompatible changes in patch releases](https://devdocs.magento.com/guides/v2.4/release-notes/backward-incompatible-changes/reference.html). +You can track [backward incompatible changes in patch releases](https://developer.adobe.com/commerce/php/development/backward-incompatible-changes/highlights/reference.html). *** diff --git a/app/code/Magento/Integration/README.md b/app/code/Magento/Integration/README.md index 5f5e6b990d1d6..fce2423034f00 100644 --- a/app/code/Magento/Integration/README.md +++ b/app/code/Magento/Integration/README.md @@ -21,13 +21,13 @@ The Magento_Integration module creates the following tables in the database: - `integration` - `oauth_token_request_log` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Integration module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Integration module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Integration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Integration module. ### Events @@ -51,7 +51,7 @@ This module introduces the following layout handles in the `view/adminhtml/layou - `adminhtml_integration_tokensdialog` - `adminhtml_integration_tokensexchange` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### Public APIs @@ -102,4 +102,4 @@ Cron group configuration can be set at `etc/crontab.xml`: More information can get at articles: - [Learn more about an Integration](https://docs.magento.com/user-guide/system/integrations.html) -- [Lear how to create an Integration](https://devdocs.magento.com/guides/v2.4/get-started/create-integration.html) +- [Lear how to create an Integration](https://developer.adobe.com/commerce/webapi/get-started/create-integration/) diff --git a/app/code/Magento/LayeredNavigation/README.md b/app/code/Magento/LayeredNavigation/README.md index 77f96ef0c5645..aac70b71ec28c 100644 --- a/app/code/Magento/LayeredNavigation/README.md +++ b/app/code/Magento/LayeredNavigation/README.md @@ -6,7 +6,7 @@ This module can be removed from Magento installation without impact on the appli ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -21,7 +21,7 @@ This module introduces the following layout handles in the `view/frontend/layout - `catalog_category_view_type_layered_without_children` - `catalogsearch_result_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/LoginAsCustomer/README.md b/app/code/Magento/LoginAsCustomer/README.md index bdc57c3bd41cc..4efe9cca3c55a 100644 --- a/app/code/Magento/LoginAsCustomer/README.md +++ b/app/code/Magento/LoginAsCustomer/README.md @@ -6,7 +6,7 @@ This module is responsible for ability to login into customer account using the The Magento_LoginAsCustomer module creates the `login_as_customer` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerAssistance/README.md b/app/code/Magento/LoginAsCustomerAssistance/README.md index 8575763f075b8..2fc609f459654 100644 --- a/app/code/Magento/LoginAsCustomerAssistance/README.md +++ b/app/code/Magento/LoginAsCustomerAssistance/README.md @@ -6,7 +6,7 @@ This module provides possibility to enable/disable LoginAsCustomer functionality The Magento_LoginAsCustomerAssistance module creates the `login_as_customer_assistance_allowed` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerGraphQl/README.md b/app/code/Magento/LoginAsCustomerGraphQl/README.md index 9e8c7ba71b6c5..8a42feab75bc2 100755 --- a/app/code/Magento/LoginAsCustomerGraphQl/README.md +++ b/app/code/Magento/LoginAsCustomerGraphQl/README.md @@ -11,7 +11,7 @@ Before installing this module, note that the Magento_GroupedProductGraphQl is de - Magento_Store - Magento_CatalogGraphQlr -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerLog/README.md b/app/code/Magento/LoginAsCustomerLog/README.md index 88d843df2ae0a..31a80010c7076 100644 --- a/app/code/Magento/LoginAsCustomerLog/README.md +++ b/app/code/Magento/LoginAsCustomerLog/README.md @@ -6,14 +6,14 @@ This module provides log for Login as Customer functionality The Magento_LoginAsCustomerLog module creates the `magento_login_as_customer_log` table in the database. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ### Layouts This module introduces the following layouts in the `view/adminhtml/layout` directory: - `loginascustomer_log_log_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/Marketplace/README.md b/app/code/Magento/Marketplace/README.md index c942a830c1dd3..f4fd482be72ca 100644 --- a/app/code/Magento/Marketplace/README.md +++ b/app/code/Magento/Marketplace/README.md @@ -4,7 +4,7 @@ This module allows to display partners of Magento in the backend. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility @@ -18,4 +18,4 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `marketplace_index_index` - `marketplace_partners_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/MediaContent/README.md b/app/code/Magento/MediaContent/README.md index 579d7b95fffd3..b439491adcf4f 100644 --- a/app/code/Magento/MediaContent/README.md +++ b/app/code/Magento/MediaContent/README.md @@ -4,10 +4,10 @@ The Magento_MediaContent module provides implementations for managing relations ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentApi/README.md b/app/code/Magento/MediaContentApi/README.md index 4571bb956e7ac..b07a2f0893d4d 100644 --- a/app/code/Magento/MediaContentApi/README.md +++ b/app/code/Magento/MediaContentApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentApi module provides interfaces for managing relations be ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentCatalog/README.md b/app/code/Magento/MediaContentCatalog/README.md index 0fb59f6bb9bc0..f77b3392d6c8e 100644 --- a/app/code/Magento/MediaContentCatalog/README.md +++ b/app/code/Magento/MediaContentCatalog/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCatalog provides the implementation of MediaContent func ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentCms/README.md b/app/code/Magento/MediaContentCms/README.md index 2ea462cb70e3a..cad831f180169 100644 --- a/app/code/Magento/MediaContentCms/README.md +++ b/app/code/Magento/MediaContentCms/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCms provides the implementation of MediaContent function ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronization/README.md b/app/code/Magento/MediaContentSynchronization/README.md index 3fb2c28f063b8..7a553def8aa7b 100644 --- a/app/code/Magento/MediaContentSynchronization/README.md +++ b/app/code/Magento/MediaContentSynchronization/README.md @@ -5,10 +5,10 @@ media asset information. ## Extensibility -Extension developers can interact with the Magento_MediaContentSynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContentSynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContentSynchronization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContentSynchronization module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationApi/README.md b/app/code/Magento/MediaContentSynchronizationApi/README.md index b074271149e28..419274a7ecab7 100644 --- a/app/code/Magento/MediaContentSynchronizationApi/README.md +++ b/app/code/Magento/MediaContentSynchronizationApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentSynchronizationApi module is responsible for the media g ## Extensibility -Extension developers can interact with the Magento_MediaContentSynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContentSynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContentSynchronizationApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContentSynchronizationApi module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationCatalog/README.md b/app/code/Magento/MediaContentSynchronizationCatalog/README.md index 9f985aa0afa62..fb130449e210e 100644 --- a/app/code/Magento/MediaContentSynchronizationCatalog/README.md +++ b/app/code/Magento/MediaContentSynchronizationCatalog/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCatalog provides the implementation of MediaContentSyncr ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaContentSynchronizationCms/README.md b/app/code/Magento/MediaContentSynchronizationCms/README.md index 5873102dfaa7e..afd77836ee2e7 100644 --- a/app/code/Magento/MediaContentSynchronizationCms/README.md +++ b/app/code/Magento/MediaContentSynchronizationCms/README.md @@ -4,10 +4,10 @@ The Magento_MediaContentCms provides the implementation of MediaContentSyncroniz ## Extensibility -Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaContent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaContent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaContent module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallery/README.md b/app/code/Magento/MediaGallery/README.md index 74d4cf753cb4d..96e19a9e9d239 100644 --- a/app/code/Magento/MediaGallery/README.md +++ b/app/code/Magento/MediaGallery/README.md @@ -10,16 +10,16 @@ The Magento_MediaGallery module creates the following tables in the database: - `media_gallery_keyword` - `media_gallery_asset_keyword` -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallery module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallery module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallery module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallery module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaGalleryApi/README.md b/app/code/Magento/MediaGalleryApi/README.md index 3bb56ee256d0e..b8c41432fc525 100644 --- a/app/code/Magento/MediaGalleryApi/README.md +++ b/app/code/Magento/MediaGalleryApi/README.md @@ -4,13 +4,13 @@ The Magento_MediaGalleryApi module serves as application program interface (API) ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryApi module. ### Public APIs @@ -57,4 +57,4 @@ For information about a public API in Magento 2, see [Public interfaces & APIs]( ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCatalog/README.md b/app/code/Magento/MediaGalleryCatalog/README.md index 668c56baf3ea5..b65c70eb5a4e2 100644 --- a/app/code/Magento/MediaGalleryCatalog/README.md +++ b/app/code/Magento/MediaGalleryCatalog/README.md @@ -4,14 +4,14 @@ The Magento_MediaGalleryCatalog module is responsible for for catalog gallery pr ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCatalog module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCatalog module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalog module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalog module. ## Additional information -For information about significant changes in patch releases, see [Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/README.md b/app/code/Magento/MediaGalleryCatalogIntegration/README.md index 8b5362affc0e2..236b0c49d553f 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/README.md +++ b/app/code/Magento/MediaGalleryCatalogIntegration/README.md @@ -4,7 +4,7 @@ This module extends catalog image uploader functionality. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility diff --git a/app/code/Magento/MediaGalleryCatalogUi/README.md b/app/code/Magento/MediaGalleryCatalogUi/README.md index b26ddf4c8697b..3d822d0ed14e7 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/README.md +++ b/app/code/Magento/MediaGalleryCatalogUi/README.md @@ -4,20 +4,20 @@ The Magento_MediaGalleryCatalogUi module that implement category grid for media ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCatalogUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCatalogUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalogUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalogUi module. ### Layouts This module introduces the following layouts in the `view/adminhtml/layout` directory: - `media_gallery_catalog_category_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -34,4 +34,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryCmsUi/README.md b/app/code/Magento/MediaGalleryCmsUi/README.md index 1152af3c595a9..197a6a4bc4149 100644 --- a/app/code/Magento/MediaGalleryCmsUi/README.md +++ b/app/code/Magento/MediaGalleryCmsUi/README.md @@ -4,13 +4,13 @@ The Magento_MediaGalleryCmsUi module provides Magento_Cms related UI elements to ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryCmsUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryCmsUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCmsUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCmsUi module. ### UI components @@ -24,4 +24,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryIntegration/README.md b/app/code/Magento/MediaGalleryIntegration/README.md index 676a4eee1cfef..754abc5fbc543 100644 --- a/app/code/Magento/MediaGalleryIntegration/README.md +++ b/app/code/Magento/MediaGalleryIntegration/README.md @@ -5,12 +5,12 @@ The purpose of this module is to keep the integration of enhanced media gallery ## Installation details Before installing this module, note that the Magento_MediaGalleryIntegration is dependent on the Magento_Ui module. -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryIntegration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryIntegration module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGalleryMetadata/README.md b/app/code/Magento/MediaGalleryMetadata/README.md index ad1dfbf886610..15dd729d2bdd0 100644 --- a/app/code/Magento/MediaGalleryMetadata/README.md +++ b/app/code/Magento/MediaGalleryMetadata/README.md @@ -4,10 +4,10 @@ The purpose of this module is to provide an ability to extract the metadata from ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryMetadata module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryMetadata module. diff --git a/app/code/Magento/MediaGalleryMetadataApi/README.md b/app/code/Magento/MediaGalleryMetadataApi/README.md index 1dc0837ebdad8..09ca6117efa8c 100644 --- a/app/code/Magento/MediaGalleryMetadataApi/README.md +++ b/app/code/Magento/MediaGalleryMetadataApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaGalleryMetadataApi module is responsible for the media gallery ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryMetadataApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryMetadataApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryMetadataApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryMetadataApi module. diff --git a/app/code/Magento/MediaGalleryRenditions/README.md b/app/code/Magento/MediaGalleryRenditions/README.md index 990eff5780c2f..51cdd9ed02611 100644 --- a/app/code/Magento/MediaGalleryRenditions/README.md +++ b/app/code/Magento/MediaGalleryRenditions/README.md @@ -4,20 +4,20 @@ The Magento_MediaGalleryRenditions module implements height and width fields for ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryRenditions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryRenditions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryRenditions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryRenditions module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). #### Message Queue Consumer - `media.gallery.renditions.update` - update renditions for given paths, if empty array is provided - all renditions are updated -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). diff --git a/app/code/Magento/MediaGalleryRenditionsApi/README.md b/app/code/Magento/MediaGalleryRenditionsApi/README.md index 9c2753aa464ce..9c40af6bd5dbe 100644 --- a/app/code/Magento/MediaGalleryRenditionsApi/README.md +++ b/app/code/Magento/MediaGalleryRenditionsApi/README.md @@ -4,8 +4,8 @@ The Magento_MediaGalleryRenditionsApi module is responsible for the API implemen ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronization/README.md b/app/code/Magento/MediaGallerySynchronization/README.md index 5937e55b76f69..8c3e631f5eb98 100644 --- a/app/code/Magento/MediaGallerySynchronization/README.md +++ b/app/code/Magento/MediaGallerySynchronization/README.md @@ -5,13 +5,13 @@ media asset information. ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronization module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronization module. ## Additional information @@ -23,6 +23,6 @@ Extension developers can interact with the Magento_MediaGallerySynchronization m - `media.gallery.synchronization` - run media files synchronization -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronizationApi/README.md b/app/code/Magento/MediaGallerySynchronizationApi/README.md index afeb2b90ec8ea..0106cb50f9a0a 100644 --- a/app/code/Magento/MediaGallerySynchronizationApi/README.md +++ b/app/code/Magento/MediaGallerySynchronizationApi/README.md @@ -4,10 +4,10 @@ The Magento_MediaGallerySynchronizationApi module is responsible for the media g ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronizationApi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronizationApi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronizationApi module. ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MediaGallerySynchronizationMetadata/README.md b/app/code/Magento/MediaGallerySynchronizationMetadata/README.md index 42d3f0cb53e55..6e1fbd199e651 100644 --- a/app/code/Magento/MediaGallerySynchronizationMetadata/README.md +++ b/app/code/Magento/MediaGallerySynchronizationMetadata/README.md @@ -4,10 +4,10 @@ The purpose of this module is to include assets metadata to media gallery synchr ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGallerySynchronizationMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGallerySynchronizationMetadata module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGallerySynchronizationMetadata module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGallerySynchronizationMetadata module. diff --git a/app/code/Magento/MediaGalleryUi/README.md b/app/code/Magento/MediaGalleryUi/README.md index 1a6fc0f4b235c..ce8068f87271c 100644 --- a/app/code/Magento/MediaGalleryUi/README.md +++ b/app/code/Magento/MediaGalleryUi/README.md @@ -6,13 +6,13 @@ The Magento_MediaGalleryUi module is responsible for the media gallery user inte Before installing this module, note that the Magento_MediaGalleryUi is dependent on the Magento_Cms module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_MediaGalleryUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaGalleryUi module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryUi module. ### Layouts @@ -20,7 +20,7 @@ This module introduces the following layouts in the `view/adminhtml/layout` dire - `media_gallery_index_index` - `media_gallery_media_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -40,6 +40,6 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaGalleryUiApi/README.md b/app/code/Magento/MediaGalleryUiApi/README.md index 12e63b5a00959..f4b0d1a1d6dce 100644 --- a/app/code/Magento/MediaGalleryUiApi/README.md +++ b/app/code/Magento/MediaGalleryUiApi/README.md @@ -4,11 +4,11 @@ The Magento_MediaGalleryUiApi module is responsible for the media gallery user i ## Installation details -For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). [Learn more about New Media Gallery](https://docs.magento.com/user-guide/cms/media-gallery.html). diff --git a/app/code/Magento/MediaStorage/README.md b/app/code/Magento/MediaStorage/README.md index 9a74cf4ce8425..433d66d2bf459 100644 --- a/app/code/Magento/MediaStorage/README.md +++ b/app/code/Magento/MediaStorage/README.md @@ -9,7 +9,7 @@ Before installing this module, note that the Magento_MediaStorage is dependent o - `Magento_Catalog` - `Magento_Theme` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure @@ -19,9 +19,9 @@ For information about a typical file structure of a module in Magento 2, see [Mo ## Extensibility -Extension developers can interact with the Magento_MediaStorage module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_MediaStorage module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaStorage module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaStorage module. ## Additional information @@ -33,8 +33,8 @@ Extension developers can interact with the Magento_MediaStorage module. For more - `media.storage.catalog.image.resize` - creates resized product images -[Learn how to manage Message Queues](https://devdocs.magento.com/guides/v2.4/config-guide/mq/manage-message-queues.html). +[Learn how to manage Message Queues](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/message-queues/manage-message-queues.html). More information can get at articles: - [Learn how to configure Media Storage Database](https://docs.magento.com/user-guide/system/media-storage-database.html). -- [Learn how to Resize catalog images](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#resize-catalog-images) +- [Learn how to Resize catalog images](https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images) diff --git a/app/code/Magento/Msrp/README.md b/app/code/Magento/Msrp/README.md index 025b215d285a8..deef2e0dcef5e 100644 --- a/app/code/Magento/Msrp/README.md +++ b/app/code/Magento/Msrp/README.md @@ -19,7 +19,7 @@ because they use models and blocks from Magento_Msrp module: - `\Magento\Msrp\Model\Product\Attribute\Source\Type\Price` - `\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type\Price` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing\` - directory contains interfaces and implementation for msrp pricing calculations @@ -31,7 +31,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Pricing\Renderer\` - contains price renderers implementations. For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -50,11 +50,11 @@ For information about a typical file structure of a module in Magento 2, </arguments> </type> ``` - More information about [type configuration](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-file.html). + More information about [type configuration](https://developer.adobe.com/commerce/php/development/build/dependency-injection-file/). - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Events @@ -70,7 +70,7 @@ This module observes the following event: `etc/webapi_soap` - `sales_quote_collect_totals_after` in the `Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver` file. -For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts diff --git a/app/code/Magento/MsrpConfigurableProduct/README.md b/app/code/Magento/MsrpConfigurableProduct/README.md index f3f24170c9445..4cf5ab625e8f5 100644 --- a/app/code/Magento/MsrpConfigurableProduct/README.md +++ b/app/code/Magento/MsrpConfigurableProduct/README.md @@ -5,7 +5,7 @@ Provides implementation of msrp price calculation for Configurable Product. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html) +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html) ## Structure @@ -13,13 +13,13 @@ For information about a module installation in Magento 2, see [Enable or disable for Grouped Product (`Magento\MsrpGroupedProduct\Pricing\MsrpPriceCalculator` class). For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Layouts @@ -31,4 +31,4 @@ For information about a UI component in Magento 2, see [Overview of UI component ## Additional information -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MsrpGroupedProduct/README.md b/app/code/Magento/MsrpGroupedProduct/README.md index 800bf0eedd743..ab7cefc4e0c47 100644 --- a/app/code/Magento/MsrpGroupedProduct/README.md +++ b/app/code/Magento/MsrpGroupedProduct/README.md @@ -5,7 +5,7 @@ Provides implementation of msrp price calculation for Grouped Product. ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html) +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html) ## Structure @@ -13,13 +13,13 @@ For information about a module installation in Magento 2, see [Enable or disable for Configurable Product (`Magento\MsrpConfigurableProduct\Pricing\MsrpPriceCalculator` class). For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility - Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). + Extension developers can interact with the Magento_Msrp module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Layouts @@ -36,4 +36,4 @@ For information about a UI component in Magento 2, see [Overview of UI component Module adds attribute `msrp` to select for the `Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection` in `Magento\MsrpGroupedProduct\Plugin\Model\Product\Type\Grouped` plugin. -For information about significant changes in patch releases, see [2.4.x Release information](https://devdocs.magento.com/guides/v2.4/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.4.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/Multishipping/README.md b/app/code/Magento/Multishipping/README.md index 12bda8ae5f21d..7cb91516d4ace 100644 --- a/app/code/Magento/Multishipping/README.md +++ b/app/code/Magento/Multishipping/README.md @@ -5,12 +5,12 @@ using different carriers. The module provides alternative to standard checkout f ## Installation -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure For information about a typical file structure of a module in Magento 2, - see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). + see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -29,12 +29,12 @@ For example: ``` Yo can check this configuration and find more examples in the `etc/frontend/di.xml` file. -More information about [type configuration](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-file.html). +More information about [type configuration](https://developer.adobe.com/commerce/php/development/build/dependency-injection-file/). -Extension developers can interact with the Magento_Multishipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Multishipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Msrp module. ### Events @@ -109,7 +109,7 @@ Module introduces the following resources: - `Magento_Multishipping::config_multishipping` - Multishipping Settings Section -More information about [Access Control List rule](https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/create-access-control-list-rule.html). +More information about [Access Control List rule](https://developer.adobe.com/commerce/php/tutorials/backend/create-access-control-list-rule/). ### Page Types @@ -133,7 +133,7 @@ Module introduces the new pages: - `checkout_cart_multishipping_shipping` - Multishipping Checkout Shipping Information Step - `checkout_cart_multishipping_success` - Multishipping Checkout Success -More information about [layout types](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-types.html). +More information about [layout types](https://developer.adobe.com/commerce/frontend-core/guide/layouts/types/). For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). diff --git a/app/code/Magento/MysqlMq/README.md b/app/code/Magento/MysqlMq/README.md index 5f41956aee4c4..a59958837bc58 100644 --- a/app/code/Magento/MysqlMq/README.md +++ b/app/code/Magento/MysqlMq/README.md @@ -15,7 +15,7 @@ Module creates the following tables: - `queue_message_status` - Relation table to keep associations between queues and messages -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional information diff --git a/app/code/Magento/NewRelicReporting/README.md b/app/code/Magento/NewRelicReporting/README.md index 90aca4eb85293..5f0090521c503 100644 --- a/app/code/Magento/NewRelicReporting/README.md +++ b/app/code/Magento/NewRelicReporting/README.md @@ -19,13 +19,13 @@ This module creates the following tables in the database: - `reporting_users` - `reporting_system_updates` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_NewRelicReporting module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_NewRelicReporting module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_NewRelicReporting module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_NewRelicReporting module. ## Additional information @@ -36,7 +36,7 @@ Extension developers can interact with the Magento_NewRelicReporting module. For The Magento_NewRelicReporting provides console commands: - `bin/magento newrelic:create:deploy-marker <message> <change_log> [<user>]` - check the deploy queue for entries and create an appropriate deploy marker -[Learn more about command's parameters](https://devdocs.magento.com/guides/v2.4/reference/cli/magento.html#newreliccreatedeploy-marker). +[Learn more about command's parameters](https://experienceleague.adobe.com/docs/commerce-operations/reference/magento-open-source.html#newreliccreatedeploy-marker). ### Cron options diff --git a/app/code/Magento/Newsletter/README.md b/app/code/Magento/Newsletter/README.md index 053640751b716..e4499e60c252f 100644 --- a/app/code/Magento/Newsletter/README.md +++ b/app/code/Magento/Newsletter/README.md @@ -21,15 +21,15 @@ This module creates the following tables in the database: - `newsletter_queue_store_link` - `newsletter_problem` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Newsletter module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Newsletter module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Newsletter module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Newsletter module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -60,7 +60,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `newsletter_manage_index` - `default` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/NewsletterGraphQl/README.md b/app/code/Magento/NewsletterGraphQl/README.md index e897c4838284c..c8e0121e47a03 100644 --- a/app/code/Magento/NewsletterGraphQl/README.md +++ b/app/code/Magento/NewsletterGraphQl/README.md @@ -6,10 +6,10 @@ This module allows a shopper to subscribe to a newsletter using GraphQL. Before installing this module, note that the Magento_NewsletterGraphQl is dependent on the Magento_Newsletter module. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_NewsletterGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_NewsletterGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_NewsletterGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_NewsletterGraphQl module. diff --git a/app/code/Magento/OfflinePayments/README.md b/app/code/Magento/OfflinePayments/README.md index 9aec95f6e02fc..1e9c3fb5426fb 100644 --- a/app/code/Magento/OfflinePayments/README.md +++ b/app/code/Magento/OfflinePayments/README.md @@ -13,15 +13,15 @@ Before installing this module, note that the Magento_OfflinePayments is dependen - `Magento_Store` - `Magento_Catalog` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_OfflinePayments module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_OfflinePayments module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_OfflinePayments module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_OfflinePayments module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -29,7 +29,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `checkout_index_index` - `multishipping_checkout_billing` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/OfflineShipping/README.md b/app/code/Magento/OfflineShipping/README.md index 08213d608536f..303524947bd7b 100644 --- a/app/code/Magento/OfflineShipping/README.md +++ b/app/code/Magento/OfflineShipping/README.md @@ -25,15 +25,15 @@ This module modifies the following tables in the database: - `quote_item` - adds column `free_shipping` - `quote_address_item` - adds column `free_shipping` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_OfflineShipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_OfflineShipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_OfflineShipping module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_OfflineShipping module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -41,7 +41,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `checkout_cart_index` - `checkout_index_index` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 44f008db574aa..5996844ebec54 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -25,7 +25,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @deprecated 100.0.6 * @see \Magento\Payment\Model\Method\Adapter - * @see https://devdocs.magento.com/guides/v2.4/payments-integrations/payment-gateway/payment-gateway-intro.html + * @see https://developer.adobe.com/commerce/php/development/payments-integrations/payment-gateway/ * @since 100.0.2 */ abstract class AbstractMethod extends \Magento\Framework\Model\AbstractExtensibleModel implements diff --git a/app/code/Magento/Persistent/README.md b/app/code/Magento/Persistent/README.md index d3f015bf29d53..0ffec3a4c8cd7 100644 --- a/app/code/Magento/Persistent/README.md +++ b/app/code/Magento/Persistent/README.md @@ -19,15 +19,15 @@ This module modifies the following tables in the database: All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Persistent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Persistent module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Persistent module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Persistent module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Events @@ -45,7 +45,7 @@ For information about an event in Magento 2, see [Events and observers](http://d ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/ProductAlert/README.md b/app/code/Magento/ProductAlert/README.md index 27a747d6ed4c6..5e6c1682024e0 100644 --- a/app/code/Magento/ProductAlert/README.md +++ b/app/code/Magento/ProductAlert/README.md @@ -16,13 +16,13 @@ All database schema changes made by this module are rolled back when the module The Magento_ProductAlert module contains the recurring script. Script's modifications don't need to be manually reverted upon uninstallation. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ProductAlert module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ProductAlert module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ProductAlert module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ProductAlert module. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` direc - `catalog_product_view` - `productalert_unsubscribe_email` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ## Additional information diff --git a/app/code/Magento/ProductVideo/README.md b/app/code/Magento/ProductVideo/README.md index 76a8036e9c3c7..9f737596575a5 100644 --- a/app/code/Magento/ProductVideo/README.md +++ b/app/code/Magento/ProductVideo/README.md @@ -12,15 +12,15 @@ The Magento_ProductVideo module creates the `catalog_product_entity_media_galler All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ProductVideo module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ProductVideo module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ProductVideo module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ProductVideo module. -A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it. +A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. ### Layouts @@ -30,7 +30,7 @@ This module introduces the following layouts in the `view/frontend/layout` and ` - `view/frontend/layout` - `catalog_product_view` -For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -43,4 +43,4 @@ For information about a UI component in Magento 2, see [Overview of UI component More information can get at articles: - [Learn how to add Product Video](https://docs.magento.com/user-guide/catalog/product-video.html) -- [Learn how to configure Product Video](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/product-video.html) +- [Learn how to configure Product Video](https://developer.adobe.com/commerce/frontend-core/guide/themes/product-video/) diff --git a/app/code/Magento/Quote/Api/CartRepositoryInterface.php b/app/code/Magento/Quote/Api/CartRepositoryInterface.php index ee122d1b02ffd..dc0ce80f74ddf 100644 --- a/app/code/Magento/Quote/Api/CartRepositoryInterface.php +++ b/app/code/Magento/Quote/Api/CartRepositoryInterface.php @@ -25,7 +25,7 @@ public function get($cartId); * Enables administrative users to list carts that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CartRepositoryInterface to determine + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CartRepositoryInterface to determine * which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php index f1ee8bd83fe93..0486366975920 100644 --- a/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/GuestPaymentMethodManagementInterface.php @@ -37,7 +37,7 @@ public function get($cartId); * List available payment methods for a specified shopping cart. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#GuestPaymentMethodManagementInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#GuestPaymentMethodManagementInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param string $cartId The cart ID. diff --git a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php index b00a6617beaeb..e992fab92554b 100644 --- a/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php +++ b/app/code/Magento/Quote/Api/PaymentMethodManagementInterface.php @@ -37,7 +37,7 @@ public function get($cartId); * Lists available payment methods for a specified shopping cart. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#PaymentMethodManagementInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#PaymentMethodManagementInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param int $cartId The cart ID. diff --git a/app/code/Magento/Quote/README.md b/app/code/Magento/Quote/README.md index a40884aa98e0d..5b3b466402311 100644 --- a/app/code/Magento/Quote/README.md +++ b/app/code/Magento/Quote/README.md @@ -16,13 +16,13 @@ The Magento_Quote module creates the following table in the database: - `quote_shipping_rate` - `quote_id_mask` -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Quote module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Quote module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Quote module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Quote module. ### Events diff --git a/app/code/Magento/QuoteAnalytics/README.md b/app/code/Magento/QuoteAnalytics/README.md index d25faa5bd3228..c7abc18ffccbe 100644 --- a/app/code/Magento/QuoteAnalytics/README.md +++ b/app/code/Magento/QuoteAnalytics/README.md @@ -1,6 +1,6 @@ # Magento_QuoteAnalytics module -This module configures data definitions for a data collection related to the Quote module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +This module configures data definitions for a data collection related to the Quote module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). ## Installation @@ -10,10 +10,10 @@ Before installing this module, note that the Magento_QuoteAnalytics is dependent This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Additional data More information can get at articles: -- [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/overview.html) -- [Data collection for advanced reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/data-collection.html) +- [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/) +- [Data collection for advanced reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/data-collection/) diff --git a/app/code/Magento/QuoteBundleOptions/README.md b/app/code/Magento/QuoteBundleOptions/README.md index 8e9864a46142e..f4df89c6a8ab1 100644 --- a/app/code/Magento/QuoteBundleOptions/README.md +++ b/app/code/Magento/QuoteBundleOptions/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for bundle products. This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteBundleOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteBundleOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteBundleOptions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteBundleOptions module. diff --git a/app/code/Magento/QuoteConfigurableOptions/README.md b/app/code/Magento/QuoteConfigurableOptions/README.md index 8360f10a355a2..31d75f1cd8978 100644 --- a/app/code/Magento/QuoteConfigurableOptions/README.md +++ b/app/code/Magento/QuoteConfigurableOptions/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for configurable pro This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteConfigurableOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteConfigurableOptions module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteConfigurableOptions module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteConfigurableOptions module. diff --git a/app/code/Magento/QuoteDownloadableLinks/README.md b/app/code/Magento/QuoteDownloadableLinks/README.md index 83c74e5f52bf8..56184244bfbc8 100644 --- a/app/code/Magento/QuoteDownloadableLinks/README.md +++ b/app/code/Magento/QuoteDownloadableLinks/README.md @@ -6,10 +6,10 @@ This module provides data provider for creating buy request for links of downloa This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. diff --git a/app/code/Magento/QuoteGraphQl/README.md b/app/code/Magento/QuoteGraphQl/README.md index d5cc67234308a..396f886fc04be 100644 --- a/app/code/Magento/QuoteGraphQl/README.md +++ b/app/code/Magento/QuoteGraphQl/README.md @@ -10,13 +10,13 @@ Before installing this module, note that the Magento_QuoteGraphQl is dependent o This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. ## Additional information @@ -25,58 +25,58 @@ You can get more information about [GraphQl In Magento 2](https://devdocs.magent ### GraphQl Query - `cart` query - retrieve information about a particular cart. -[Learn more about cart query](https://devdocs.magento.com/guides/v2.4/graphql/queries/cart.html). +[Learn more about cart query](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/queries/cart/). - `customerCart` query - returns the active cart for the logged-in customer. If the cart does not exist, the query creates one. -[Learn more about customerCart query](https://devdocs.magento.com/guides/v2.4/graphql/queries/customer-cart.html). +[Learn more about customerCart query](https://developer.adobe.com/commerce/webapi/graphql/schema/customer/queries/cart/). ### GraphQl Mutation - `createEmptyCart` mutation - creates an empty shopping cart for a guest or logged in customer. -[Learn more about createEmptyCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/create-empty-cart.html). +[Learn more about createEmptyCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/create-empty-cart/). - `addSimpleProductsToCart` mutation - allows you to add any number of simple and group products to the cart at the same time. - [Learn more about addSimpleProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-simple-products.html). + [Learn more about addSimpleProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-simple-products/). - `addVirtualProductsToCart` mutation - allows you to add multiple virtual products to the cart at the same time, but you cannot add other product types with this mutation. - [Learn more about addVirtualProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-virtual-products.html). + [Learn more about addVirtualProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-virtual-products/). - `applyCouponToCart` mutation - applies a pre-defined coupon code to the specified cart. - [Learn more about applyCouponToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/apply-coupon.html). + [Learn more about applyCouponToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/apply-coupon/). - `removeCouponFromCart` mutation - removes a previously-applied coupon from the cart. - [Learn more about removeCouponFromCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-coupon.html). + [Learn more about removeCouponFromCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-coupon.html). - `updateCartItems` mutation - allows you to modify items in the specified cart. - [Learn more about updateCartItems mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-cart-items.html). + [Learn more about updateCartItems mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/update-cart-items.html). - `removeItemFromCart` mutation - deletes the entire quantity of a specified item from the cart. - [Learn more about removeItemFromCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-item.html). + [Learn more about removeItemFromCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-item.html). - `setShippingAddressesOnCart` mutation - sets one or more shipping addresses on a specific cart. - [Learn more about setShippingAddressesOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-shipping-address.html). + [Learn more about setShippingAddressesOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-shipping-address.html). - `setBillingAddressOnCart` mutation - sets the billing address for a specific cart. - [Learn more about setBillingAddressOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-billing-address.html). + [Learn more about setBillingAddressOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-billing-address.html). - `setShippingMethodsOnCart` mutation - sets one or more delivery methods on a cart. - [Learn more about setShippingMethodsOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-shipping-method.html). + [Learn more about setShippingMethodsOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-shipping-method.html). - `setPaymentMethodOnCart` mutation - defines which payment method to apply to the cart. - [Learn more about setPaymentMethodOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-payment-method.html). + [Learn more about setPaymentMethodOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-payment-method.html). - `setGuestEmailOnCart` mutation - assigns email to the guest cart. - [Learn more about setGuestEmailOnCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-guest-email.html). + [Learn more about setGuestEmailOnCart mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-guest-email.html). - `setPaymentMethodAndPlaceOrder` mutation - sets the cart payment method and converts the cart into an order. **This mutation has been deprecated**. Use the `setPaymentMethodOnCart` and `placeOrder` mutations instead. - [Learn more about setPaymentMethodAndPlaceOrder mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/set-payment-place-order.html). + [Learn more about setPaymentMethodAndPlaceOrder mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/set-payment-place-order.html). - `mergeCarts` mutation - transfers the contents of a guest cart into the cart of a logged-in customer. - [Learn more about mergeCarts mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/merge-carts.html). + [Learn more about mergeCarts mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/merge-carts.html). - `placeOrder` mutation - converts the cart into an order and returns an order ID. - [Learn more about placeOrder mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/place-order.html). + [Learn more about placeOrder mutation](https://developer.adobe.com/commerce/webapi/graphql/mutations/place-order.html). - `addProductsToCart` mutation - adds any type of product to the shopping cart. - [Learn more about addProductsToCart mutation](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-products-to-cart.html). + [Learn more about addProductsToCart mutation](https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-products/). \ No newline at end of file diff --git a/app/code/Magento/RelatedProductGraphQl/README.md b/app/code/Magento/RelatedProductGraphQl/README.md index 62cd55df85594..7aa93403a6949 100644 --- a/app/code/Magento/RelatedProductGraphQl/README.md +++ b/app/code/Magento/RelatedProductGraphQl/README.md @@ -6,13 +6,13 @@ This module provides endpoints for getting Cross Sell / Related/ Up Sell produc This module does not introduce any database schema modifications or new data. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_QuoteDownloadableLinks module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_QuoteDownloadableLinks module. ## Additional information diff --git a/app/code/Magento/ReleaseNotification/README.md b/app/code/Magento/ReleaseNotification/README.md index 46d56107f2aa5..0cd2107e64432 100644 --- a/app/code/Magento/ReleaseNotification/README.md +++ b/app/code/Magento/ReleaseNotification/README.md @@ -8,13 +8,13 @@ The Magento_ReleaseNotification module creates the `release_notification_viewer_ All database schema changes made by this module are rolled back when the module gets disabled and setup:upgrade command is run. -For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_ReleaseNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_ReleaseNotification module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_ReleaseNotification module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_ReleaseNotification module. ### UI components diff --git a/app/code/Magento/ReviewAnalytics/README.md b/app/code/Magento/ReviewAnalytics/README.md index 5eb1f100c572c..505dace8d2147 100644 --- a/app/code/Magento/ReviewAnalytics/README.md +++ b/app/code/Magento/ReviewAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_ReviewAnalytics module -The Magento_ReviewAnalytics module configures data definitions for a data collection related to the Review module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_ReviewAnalytics module configures data definitions for a data collection related to the Review module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php index 3c61384d8b84f..c0963ba1e3452 100644 --- a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php @@ -20,7 +20,7 @@ interface CreditmemoRepositoryInterface * Lists credit memos that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CreditmemoRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CreditmemoRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php index 161b8405f11e4..67a5c11f07cc7 100644 --- a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php @@ -18,7 +18,7 @@ interface InvoiceRepositoryInterface * Lists invoices that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#InvoiceRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#InvoiceRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php index 3449d0054b7e4..981f793f35306 100644 --- a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php @@ -20,7 +20,7 @@ interface OrderItemRepositoryInterface * Lists order items that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#OrderItemRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#OrderItemRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php index 0c3b6ab5cb02b..6190f06c10ed4 100644 --- a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php @@ -20,7 +20,7 @@ interface OrderRepositoryInterface * Lists orders that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#OrderRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#OrderRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php index 3b3c8221596a1..4761df08a73d5 100644 --- a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php @@ -19,7 +19,7 @@ interface ShipmentRepositoryInterface * Lists shipments that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#ShipmentRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#ShipmentRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php index e55b5d60d1f6c..d3042af0074d9 100644 --- a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php @@ -18,7 +18,7 @@ interface TransactionRepositoryInterface * Lists transactions that match specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TransactionRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TransactionRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria The search criteria. diff --git a/app/code/Magento/SalesAnalytics/README.md b/app/code/Magento/SalesAnalytics/README.md index 4fc110af0bae8..44a129fe47c37 100644 --- a/app/code/Magento/SalesAnalytics/README.md +++ b/app/code/Magento/SalesAnalytics/README.md @@ -1,3 +1,3 @@ # Magento_SalesAnalytics module -The Magento_SalesAnalytics module configures data definitions for a data collection related to the Sales module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_SalesAnalytics module configures data definitions for a data collection related to the Sales module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). diff --git a/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php b/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php index 1a631886f1a9b..b15c93743bb91 100644 --- a/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php +++ b/app/code/Magento/SalesRule/Api/CouponRepositoryInterface.php @@ -38,7 +38,7 @@ public function getById($couponId); * Retrieve a coupon using the specified search criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#CouponRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#CouponRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php b/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php index 963edf5483e43..39a92bb9efdfb 100644 --- a/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php +++ b/app/code/Magento/SalesRule/Api/RuleRepositoryInterface.php @@ -38,7 +38,7 @@ public function getById($ruleId); * Retrieve sales rules that match te specified criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#RuleRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#RuleRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/SampleData/README.md b/app/code/Magento/SampleData/README.md index e0666ba73fe24..3e66c2cc1c7b0 100644 --- a/app/code/Magento/SampleData/README.md +++ b/app/code/Magento/SampleData/README.md @@ -74,4 +74,4 @@ The deleted sample data entities will be restored. Those entities, which were ch ## Documentation -You can find the more detailed description of sample data manipulation procedures at <https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-sample-data.html>. +You can find the more detailed description of sample data manipulation procedures at <https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/next-steps/sample-data/overview.html>. diff --git a/app/code/Magento/SendFriend/etc/adminhtml/system.xml b/app/code/Magento/SendFriend/etc/adminhtml/system.xml index 0092fe4ab2918..8102301feeb4c 100644 --- a/app/code/Magento/SendFriend/etc/adminhtml/system.xml +++ b/app/code/Magento/SendFriend/etc/adminhtml/system.xml @@ -16,7 +16,7 @@ <field id="enabled" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Enabled</label> <comment> - <![CDATA[We strongly recommend to enable a <a href="https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> + <![CDATA[We strongly recommend to enable a <a href="https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]> </comment> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> diff --git a/app/code/Magento/SendFriend/i18n/en_US.csv b/app/code/Magento/SendFriend/i18n/en_US.csv index 96a0665df4d39..d8e4b1772e7ef 100644 --- a/app/code/Magento/SendFriend/i18n/en_US.csv +++ b/app/code/Magento/SendFriend/i18n/en_US.csv @@ -45,4 +45,4 @@ Enabled,Enabled "Max Recipients","Max Recipients" "Max Products Sent in 1 Hour","Max Products Sent in 1 Hour" "Limit Sending By","Limit Sending By" -"We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.4/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." +"We strongly recommend to enable a <a href=""https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to enable a <a href=""https://experienceleague.adobe.com/docs/commerce-admin/systems/security/captcha/security-google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur." diff --git a/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php index f841f9c047b82..fcb610fcb58eb 100644 --- a/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxClassRepositoryInterface.php @@ -27,7 +27,7 @@ public function get($taxClassId); * Retrieve tax classes which match a specific criteria. * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxClassRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxClassRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php index c0f5ccd95ba98..2624946e904e9 100644 --- a/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxRateRepositoryInterface.php @@ -47,7 +47,7 @@ public function deleteById($rateId); * Search TaxRates * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRateRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxRateRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php b/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php index 5e045d94de45e..0590ac6afa5bb 100644 --- a/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php +++ b/app/code/Magento/Tax/Api/TaxRuleRepositoryInterface.php @@ -55,7 +55,7 @@ public function deleteById($ruleId); * Search TaxRules * * This call returns an array of objects, but detailed information about each object’s attributes might not be - * included. See https://devdocs.magento.com/codelinks/attributes.html#TaxRuleRepositoryInterface to + * included. See https://developer.adobe.com/commerce/webapi/rest/attributes#TaxRuleRepositoryInterface to * determine which call to use to get detailed information about all attributes for an object. * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria diff --git a/app/code/Magento/WebapiAsync/README.md b/app/code/Magento/WebapiAsync/README.md index 96f82d8b6e493..6b06075171f36 100644 --- a/app/code/Magento/WebapiAsync/README.md +++ b/app/code/Magento/WebapiAsync/README.md @@ -13,16 +13,16 @@ Before installing this module, note that the Magento_WebapiAsync is dependent on - Magento_User - Magento_Webapi -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Code/` - the directory that contains Remote service reader configuration files. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_WebapiAsync module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WebapiAsync module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WebapiAsync module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WebapiAsync module. diff --git a/app/code/Magento/WebapiSecurity/README.md b/app/code/Magento/WebapiSecurity/README.md index a355112536a00..e0232d4f92156 100644 --- a/app/code/Magento/WebapiSecurity/README.md +++ b/app/code/Magento/WebapiSecurity/README.md @@ -12,4 +12,4 @@ Before installing this module, note that the Magento_WebapiSecurity is dependent - `Magento_Webapi` -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). diff --git a/app/code/Magento/Weee/README.md b/app/code/Magento/Weee/README.md index 475914a969c41..b3d59174a8337 100644 --- a/app/code/Magento/Weee/README.md +++ b/app/code/Magento/Weee/README.md @@ -26,19 +26,19 @@ Before installing this module, note that the Magento_Weee is dependent on the fo - Magento_Store - Magento_Tax -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing/` - directory that contain tax adjustment. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Weee module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Weee module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Weee module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Weee module. ### Layouts @@ -84,7 +84,7 @@ This module introduces the following layouts and layout handles in the directori - `sales_order_printinvoice` - `sales_order_view` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -96,4 +96,4 @@ You can extend a customer form and widgets using the configuration files located - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/WeeeGraphQl/README.md b/app/code/Magento/WeeeGraphQl/README.md index b1f44619785c4..6d15feb605f3f 100644 --- a/app/code/Magento/WeeeGraphQl/README.md +++ b/app/code/Magento/WeeeGraphQl/README.md @@ -13,10 +13,10 @@ Before installing this module, note that the Magento_WeeeGraphQl is dependent on - `Magento_Tax` - `Magento_Weee` -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_WeeeGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WeeeGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WeeeGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WeeeGraphQl module. diff --git a/app/code/Magento/Widget/README.md b/app/code/Magento/Widget/README.md index 0d51c6732ec58..ee4594e1cef2b 100644 --- a/app/code/Magento/Widget/README.md +++ b/app/code/Magento/Widget/README.md @@ -16,13 +16,13 @@ Before disabling or uninstalling this module, note the following dependencies: - Magento_CurrencySymbol - Magento_Newsletter -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_Widget module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Widget module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Widget module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Widget module. ### Layouts @@ -38,4 +38,4 @@ This module introduces the following layouts and layout handles in the directori - `default` - `print` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). diff --git a/app/code/Magento/Wishlist/README.md b/app/code/Magento/Wishlist/README.md index fef81ccacf000..a0ec7d70d9955 100644 --- a/app/code/Magento/Wishlist/README.md +++ b/app/code/Magento/Wishlist/README.md @@ -16,19 +16,19 @@ Before disabling or uninstalling this module, note the following dependencies: - Magento_WishlistAnalytics -Refer to [how to enable or disable modules in Magento 2](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +Refer to [how to enable or disable modules in Magento 2](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Structure `Pricing/` - the directory that contain solutions for configurable and downloadable product price. -For information about a typical file structure of a module, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility -Extension developers can interact with the Magento_Wishlist module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Wishlist module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Wishlist module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Wishlist module. ### Events @@ -56,7 +56,7 @@ The module dispatches the following events: - `product` is a product object (`\Magento\Catalog\Api\Data\ProductInterface` class). - `item` is an item object (`\Magento\Wishlist\Model\Item` class). -For information about the event, see [Events and observers](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about the event, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -86,7 +86,7 @@ This module introduces the following layouts and layout handles in the directori - `wishlist_index_share` - `wishlist_shared_index.xml` -For more information about a layout, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -97,4 +97,4 @@ You can extend a customer form and widgets using the configuration files located - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component, see [Overview of UI components](https://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). diff --git a/app/code/Magento/WishlistAnalytics/README.md b/app/code/Magento/WishlistAnalytics/README.md index c932397e0803a..03ebb835913d6 100644 --- a/app/code/Magento/WishlistAnalytics/README.md +++ b/app/code/Magento/WishlistAnalytics/README.md @@ -1,6 +1,6 @@ # Magento_WishlistAnalytics module -The Magento_WishlistAnalytics module configures data definitions for a data collection related to the Wishlist module entities to be used in [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html). +The Magento_WishlistAnalytics module configures data definitions for a data collection related to the Wishlist module entities to be used in [Advanced Reporting](https://developer.adobe.com/commerce/php/development/advanced-reporting/modules/). ## Installation details @@ -9,4 +9,4 @@ Before installing this module, note that the Magento_WishlistAnalytics is depend - Magento_Analytics - Magento_Wishlist -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). diff --git a/app/code/Magento/WishlistGraphQl/README.md b/app/code/Magento/WishlistGraphQl/README.md index 23135e2a52bfe..f212218990a9b 100644 --- a/app/code/Magento/WishlistGraphQl/README.md +++ b/app/code/Magento/WishlistGraphQl/README.md @@ -19,13 +19,13 @@ Before installing this module, note that the Magento_WishlistGraphQl is dependen - Magento_Sales - Magento_Store -For information about enabling or disabling a module, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). +For information about enabling or disabling a module, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). ## Extensibility -Extension developers can interact with the Magento_WishlistGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_WishlistGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WishlistGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_WishlistGraphQl module. ## Additional information @@ -33,10 +33,10 @@ For more information about the Magento_WishlistGraphQl queries and mutations see ### Queries -- [`wishlist`](https://devdocs.magento.com/guides/v2.4/graphql/queries/wishlist.html) +- [`wishlist`](https://developer.adobe.com/commerce/webapi/graphql/usage/wishlist.html) ### Mutations -- [`addProductsToWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/add-products-to-wishlist.html) -- [`removeProductsFromWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/remove-products-from-wishlist.html) -- [`updateProductsInWishlist`](https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-products-in-wishlist.html) +- [`addProductsToWishlist`](https://developer.adobe.com/commerce/webapi/graphql/schema/wishlist/mutations/add-products/) +- [`removeProductsFromWishlist`](https://developer.adobe.com/commerce/webapi/graphql/mutations/remove-products-from-wishlist.html) +- [`updateProductsInWishlist`](https://developer.adobe.com/commerce/webapi/graphql/mutations/update-products-in-wishlist.html) diff --git a/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less b/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less index 174d31d641fef..508eb6113fa2c 100644 --- a/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less +++ b/dev/tests/integration/testsuite/Magento/Deploy/_files/Vendor/parent/web/css/source/_extend-child.less @@ -1,2 +1,2 @@ // This is overridden in B2B theme -// https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-guide/css_quick_guide_approach.html +// https://developer.adobe.com/commerce/frontend-core/guide/css/quickstart/customize-styles/ diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index a9b61d376c011..7c02dc0675206 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -148,7 +148,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl * The property is used to define content-scope of block. Can be private or public. * If it isn't defined then application considers it as false. * - * @see https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/private-content.html + * @see https://developer.adobe.com/commerce/php/development/cache/page/private-content/ * @var bool * @deprecated * @since 103.0.1 diff --git a/phpserver/README.md b/phpserver/README.md index 385a09b7f8802..51235b458b7b4 100644 --- a/phpserver/README.md +++ b/phpserver/README.md @@ -14,7 +14,7 @@ Without a router script, that is not possible via the php built-in server. ## How to install Magento -Please read how to install Magento using the [command line](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html). An example follows: +Please read how to install Magento using the [command line](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/advanced.html). An example follows: ```php php bin/magento setup:install --base-url=http://127.0.0.1:8082 \ @@ -27,7 +27,7 @@ php bin/magento setup:install --base-url=http://127.0.0.1:8082 \ Note: By default, Magento creates a random Admin URI for you. Make sure to write this value down because it's how you access the Magento Admin later. For example: `http://127.0.0.1:8082/index.php/admin_1vpn01`. -For more information about the installation process using the CLI, you can consult the dedicated documentation that can found in [the developer documentation](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands.html). +For more information about the installation process using the CLI, you can consult the dedicated documentation that can found in [the developer documentation](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html). ### How to run Magento diff --git a/setup/performance-toolkit/README.md b/setup/performance-toolkit/README.md index 5daace537614a..bdbd9177891f2 100644 --- a/setup/performance-toolkit/README.md +++ b/setup/performance-toolkit/README.md @@ -1,3 +1,3 @@ # Performance Toolkit -For information about the available profiles and generating fixtures generation, read [Generate data for performance testing](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-perf-data.html). +For information about the available profiles and generating fixtures generation, read [Generate data for performance testing](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/generate-data.html). diff --git a/setup/view/magento/setup/index.phtml b/setup/view/magento/setup/index.phtml index 9c8b147b2c214..2c8948f4a931d 100644 --- a/setup/view/magento/setup/index.phtml +++ b/setup/view/magento/setup/index.phtml @@ -49,7 +49,7 @@ Welcome to Magento Admin, your online store headquarters. <br> Please review <a href="javascript:showSection('license')">Terms & Agreement</a> - and read <a href="https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html" target="_blank">Getting Started</a> + and read <a href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/advanced.html" target="_blank">Getting Started</a> to learn how to install Magento using the command line. </p> </section> From 5113b7280c006206bd0b58cc218f4721a88c9e99 Mon Sep 17 00:00:00 2001 From: Dmytro Shevtsov <shevtsov@adobe.com> Date: Tue, 20 Dec 2022 09:51:38 -0600 Subject: [PATCH 281/985] Update docs links --- .github/CONTRIBUTING.md | 2 +- app/code/Magento/AdminAnalytics/i18n/en_US.csv | 2 +- .../adminhtml/ui_component/admin_usage_notification.xml | 2 +- app/code/Magento/Catalog/etc/adminhtml/system.xml | 2 +- app/code/Magento/Customer/README.md | 8 ++++---- app/code/Magento/CustomerDownloadableGraphQl/README.md | 4 ++-- app/code/Magento/CustomerGraphQl/README.md | 4 ++-- app/code/Magento/CustomerImportExport/README.md | 4 ++-- app/code/Magento/Elasticsearch/etc/adminhtml/system.xml | 2 +- app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml | 2 +- app/code/Magento/GiftMessage/README.md | 4 ++-- app/code/Magento/GiftMessageGraphQl/README.md | 4 ++-- app/code/Magento/GoogleAdwords/README.md | 4 ++-- app/code/Magento/GoogleAnalytics/README.md | 4 ++-- app/code/Magento/GoogleGtag/README.md | 4 ++-- app/code/Magento/GoogleOptimizer/README.md | 6 +++--- app/code/Magento/GroupedProduct/README.md | 6 +++--- app/code/Magento/GroupedProductGraphQl/README.md | 4 ++-- app/code/Magento/ImportExport/README.md | 8 ++++---- app/code/Magento/Indexer/README.md | 4 ++-- app/code/Magento/InstantPurchase/README.md | 4 ++-- app/code/Magento/Integration/README.md | 6 +++--- app/code/Magento/LayeredNavigation/README.md | 8 ++++---- app/code/Magento/LoginAsCustomerAdminUi/README.md | 2 +- app/code/Magento/LoginAsCustomerApi/README.md | 2 +- app/code/Magento/LoginAsCustomerLog/README.md | 4 ++-- app/code/Magento/Marketplace/README.md | 4 ++-- app/code/Magento/MediaGalleryApi/README.md | 2 +- app/code/Magento/MediaGalleryCatalogIntegration/README.md | 2 +- app/code/Magento/MediaGalleryCatalogUi/README.md | 2 +- app/code/Magento/MediaGalleryCmsUi/README.md | 2 +- app/code/Magento/MediaGalleryUi/README.md | 2 +- app/code/Magento/MediaStorage/README.md | 2 +- app/code/Magento/MsrpConfigurableProduct/README.md | 4 ++-- app/code/Magento/MsrpGroupedProduct/README.md | 4 ++-- app/code/Magento/Multishipping/README.md | 4 ++-- app/code/Magento/MysqlMq/README.md | 2 +- app/code/Magento/NewRelicReporting/README.md | 2 +- app/code/Magento/Newsletter/README.md | 4 ++-- app/code/Magento/OfflineShipping/README.md | 2 +- app/code/Magento/OpenSearch/etc/adminhtml/system.xml | 2 +- app/code/Magento/Persistent/README.md | 4 ++-- app/code/Magento/ProductAlert/README.md | 2 +- app/code/Magento/ProductVideo/README.md | 2 +- app/code/Magento/Quote/README.md | 4 ++-- app/code/Magento/ReleaseNotification/README.md | 2 +- nginx.conf.sample | 2 +- 47 files changed, 81 insertions(+), 81 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 61e14fd02b22b..615222321bca0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the 1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution. 2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing. 3. Create and test your work. -4. Follow the [Forks And Pull Requests Instructions](https://devdocs.magento.com/contributor-guide/contributing.html#forks-and-pull-requests) to fork the Magento 2 repository and send us a pull request. +4. Follow the [Forks And Pull Requests Instructions](https://developer.adobe.com/commerce/contributor/guides/code-contributions/) to fork the Magento 2 repository and send us a pull request. 5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed. ## Code of Conduct diff --git a/app/code/Magento/AdminAnalytics/i18n/en_US.csv b/app/code/Magento/AdminAnalytics/i18n/en_US.csv index fa17e425e13dd..90a0c5890f04d 100644 --- a/app/code/Magento/AdminAnalytics/i18n/en_US.csv +++ b/app/code/Magento/AdminAnalytics/i18n/en_US.csv @@ -1,3 +1,3 @@ "Allow Adobe to collect usage data to improve user experience and offer in-product guidance", "Allow Adobe to collect usage data to improve user experience and offer in-product guidance" -"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage"">merchant documentation</a>.</p>" +"<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html"">merchant documentation</a>.</p>", "<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class=""modal-list""> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href=""https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html"">merchant documentation</a>.</p>" diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml b/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml index b8196c8ae090e..dfac97747cb3e 100644 --- a/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml +++ b/app/code/Magento/AdminAnalytics/view/adminhtml/ui_component/admin_usage_notification.xml @@ -82,7 +82,7 @@ <item name="config" xsi:type="array"> <item name="label" xsi:type="string"/> <item name="additionalClasses" xsi:type="string">release-notification-text</item> - <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://docs.magento.com/user-guide/configuration/advanced/admin.html#admin-usage">merchant documentation</a>.</p>]]></item> + <item name="text" xsi:type="string" translate="true"><![CDATA[<p>By clicking on <b>Allow</b>, you agree that we may collect anonymous usage data from you to:</p> <ol class="modal-list"> <li>Help us improve the Magento Admin user experience</li> <li>Provide interactive in-product guidance, such as technical support and tips to improve utilization of the product from within the Admin UI. This may include notifications of new features, product support/guidance, onboarding information, tooltips, and more.</li> </ol> <p>All usage data that we collect for this purpose cannot be used to individually identify you and is used only to improve the Magento Admin UI and related products and services.</p> <p>You can learn more and opt-out at any time by following the instructions in <a href="https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/admin.html">merchant documentation</a>.</p>]]></item> </item> </argument> </container> diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index b90d59997b87a..792ea1d13ec26 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -218,7 +218,7 @@ <field id="catalog_media_url_format" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1"> <label>Catalog media URL format</label> <source_model>Magento\Catalog\Model\Config\Source\Web\CatalogMediaUrlFormat</source_model> - <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://docs.magento.com/user-guide/configuration/general/web.html#url-options">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> + <comment><![CDATA[Images should be optimized based on query parameters by your CDN or web server. Use the legacy mode for backward compatibility. <a href="https://experienceleague.adobe.com/docs/commerce-admin/config/general/web.html">Learn more</a> about catalog URL formats.<br/><br/><strong style="color:red">Warning!</strong> If you switch back to legacy mode, you must <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/configure/#resize-catalog-images">use the CLI to regenerate images</a>.]]></comment> </field> </group> </section> diff --git a/app/code/Magento/Customer/README.md b/app/code/Magento/Customer/README.md index 0760482d171d8..4b2b1a4d6211d 100644 --- a/app/code/Magento/Customer/README.md +++ b/app/code/Magento/Customer/README.md @@ -129,7 +129,7 @@ The module dispatches the following events: - `visitor_activity_save` event in the `\Magento\Customer\Model\Visitor::saveByRequest` method. Parameters: - `visitor` is a `$this` object (`\Magento\Customer\Model\Visitor` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -320,7 +320,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - `\Magento\Customer\Model\Customer\Source\GroupSourceLoggedInOnlyInterface` - get customer group attribute source -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ### UI components @@ -335,7 +335,7 @@ You can extend customer and customer address updates using the configuration fil - `view/base/ui_component`: - `customer_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information @@ -356,7 +356,7 @@ Magento_Customer provides console commands: Cron group configuration can be set at `etc/crontab.xml`: - `visitor_clean` - clean visitor's outdated records -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). ### Indexers diff --git a/app/code/Magento/CustomerDownloadableGraphQl/README.md b/app/code/Magento/CustomerDownloadableGraphQl/README.md index b4ae77451c07d..2a3729b36007e 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/README.md +++ b/app/code/Magento/CustomerDownloadableGraphQl/README.md @@ -13,9 +13,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CatalogGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CatalogGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerDownloadableGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerDownloadableGraphQl module. ## Additional information diff --git a/app/code/Magento/CustomerGraphQl/README.md b/app/code/Magento/CustomerGraphQl/README.md index fd9955b3ca9c5..ae374c045bae0 100644 --- a/app/code/Magento/CustomerGraphQl/README.md +++ b/app/code/Magento/CustomerGraphQl/README.md @@ -17,9 +17,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CustomerGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CustomerGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerGraphQl module. ## Additional information diff --git a/app/code/Magento/CustomerImportExport/README.md b/app/code/Magento/CustomerImportExport/README.md index a3bd8e8e75ace..16c4189acfe63 100644 --- a/app/code/Magento/CustomerImportExport/README.md +++ b/app/code/Magento/CustomerImportExport/README.md @@ -8,9 +8,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_CustomerImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_CustomerImportExport module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CustomerImportExport module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_CustomerImportExport module. ### Layouts diff --git a/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml index d6e896144cec4..0991506b31476 100644 --- a/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml +++ b/app/code/Magento/Elasticsearch/etc/adminhtml/system.xml @@ -68,7 +68,7 @@ <depends> <field id="engine">elasticsearch5</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml index 6b5d3cf368867..a8f4ecccdea9c 100644 --- a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml +++ b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml @@ -84,7 +84,7 @@ <depends> <field id="engine">elasticsearch7</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/GiftMessage/README.md b/app/code/Magento/GiftMessage/README.md index 6c807143384af..b63c37cc64c7d 100644 --- a/app/code/Magento/GiftMessage/README.md +++ b/app/code/Magento/GiftMessage/README.md @@ -42,7 +42,7 @@ The module dispatches the following events: - `gift_options_prepare` event in the `\Magento\GiftMessage\Block\Message\Inline::isMessagesOrderAvailable` method. Parameters: - `entity` is an entity object -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layout @@ -97,7 +97,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - get the gift message for a specified item in a specified order - set the gift message for a specified item in a specified order -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/GiftMessageGraphQl/README.md b/app/code/Magento/GiftMessageGraphQl/README.md index 401f718b791df..5eb270c12fdb1 100644 --- a/app/code/Magento/GiftMessageGraphQl/README.md +++ b/app/code/Magento/GiftMessageGraphQl/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GiftMessageGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GiftMessageGraphQl module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GiftMessageGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GiftMessageGraphQl module. ## Additional information diff --git a/app/code/Magento/GoogleAdwords/README.md b/app/code/Magento/GoogleAdwords/README.md index 8dd6ab7b2d32b..2e2b275787f32 100644 --- a/app/code/Magento/GoogleAdwords/README.md +++ b/app/code/Magento/GoogleAdwords/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleAdwords module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleAdwords module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAdwords module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleAdwords module. ### Layouts diff --git a/app/code/Magento/GoogleAnalytics/README.md b/app/code/Magento/GoogleAnalytics/README.md index 3a26674cdb614..d4abd290bd665 100644 --- a/app/code/Magento/GoogleAnalytics/README.md +++ b/app/code/Magento/GoogleAnalytics/README.md @@ -12,9 +12,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleAnalytics module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleAnalytics module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleAnalytics module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleAnalytics module. A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/GoogleGtag/README.md b/app/code/Magento/GoogleGtag/README.md index 32ec59055f76b..4d1a49ada70c7 100644 --- a/app/code/Magento/GoogleGtag/README.md +++ b/app/code/Magento/GoogleGtag/README.md @@ -12,9 +12,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleGtag module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleGtag module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleGtag module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleGtag module. A lot of functionality in the module is on JavaScript, use [mixins](https://developer.adobe.com/commerce/frontend-core/javascript/mixins/) to extend it. diff --git a/app/code/Magento/GoogleOptimizer/README.md b/app/code/Magento/GoogleOptimizer/README.md index dd2011e73e2d8..5e493d69cf13b 100644 --- a/app/code/Magento/GoogleOptimizer/README.md +++ b/app/code/Magento/GoogleOptimizer/README.md @@ -15,9 +15,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GoogleOptimizer module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GoogleOptimizer module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GoogleOptimizer module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GoogleOptimizer module. ### Layouts @@ -39,7 +39,7 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `cms_page_form` - `new_category_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/GroupedProduct/README.md b/app/code/Magento/GroupedProduct/README.md index 27bfb69ae32c5..2f141b463b19e 100644 --- a/app/code/Magento/GroupedProduct/README.md +++ b/app/code/Magento/GroupedProduct/README.md @@ -27,7 +27,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Pricing/` - the directory that contains solutions for grouped product price. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -79,14 +79,14 @@ This module extends widgets ui components the configuration files located in the - `widget_recently_compared` - `widget_recently_viewed` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs - `\Magento\GroupedProduct\Api\Data\GroupedOptionsInterface` - represents `product item id with qty` of a grouped product -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/GroupedProductGraphQl/README.md b/app/code/Magento/GroupedProductGraphQl/README.md index c6fc44ab4e2c6..07ac1f2cecf98 100644 --- a/app/code/Magento/GroupedProductGraphQl/README.md +++ b/app/code/Magento/GroupedProductGraphQl/README.md @@ -15,9 +15,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_GroupedProductGraphQll module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_GroupedProductGraphQll module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_GroupedProductGraphQl module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_GroupedProductGraphQl module. ## Additional information diff --git a/app/code/Magento/ImportExport/README.md b/app/code/Magento/ImportExport/README.md index e68898e55610f..ef1a9acbcce0f 100644 --- a/app/code/Magento/ImportExport/README.md +++ b/app/code/Magento/ImportExport/README.md @@ -17,7 +17,7 @@ For information about a module installation in Magento 2, see [Enable or disable `Files/` - the directory that contains sample import files. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -38,7 +38,7 @@ This module introduces the following layout handles in the `view/frontend/layout - `adminhtml_import_start` - `adminhtml_import_validate` -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components @@ -46,7 +46,7 @@ You can extend an export updates using the configuration files located in the `v - `export_grid` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs @@ -59,7 +59,7 @@ For information about a UI component in Magento 2, see [Overview of UI component - `\Magento\ImportExport\Api\ExportManagementInterface` - Executing actual export and returns export data -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Indexer/README.md b/app/code/Magento/Indexer/README.md index 831387376e085..ed9ee7ec9723f 100644 --- a/app/code/Magento/Indexer/README.md +++ b/app/code/Magento/Indexer/README.md @@ -28,7 +28,7 @@ For information about a module installation in Magento 2, see [Enable or disable `App/` - the directory that contains launch application entry point. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -91,7 +91,7 @@ Cron group configuration can be set at `etc/crontab.xml`: - `indexer_update_all_views` - update indexer views - `indexer_clean_all_changelogs` - clean indexer view changelogs -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). More information can get at articles: - [Learn more about indexing](https://developer.adobe.com/commerce/php/development/components/indexing/) diff --git a/app/code/Magento/InstantPurchase/README.md b/app/code/Magento/InstantPurchase/README.md index 639e50b214d05..a4dfa6500e19a 100644 --- a/app/code/Magento/InstantPurchase/README.md +++ b/app/code/Magento/InstantPurchase/README.md @@ -10,7 +10,7 @@ For information about a module installation in Magento 2, see [Enable or disable `PaymentMethodsIntegration` - directory contains interfaces and basic implementation of integration vault payment method to the instant purchase. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility @@ -47,7 +47,7 @@ Extension developers can interact with the Magento_InstantPurchase module. For m - `\Magento\InstantPurchase\PaymentMethodIntegration\PaymentTokenFormatterInterface` - provides mechanism to create string presentation of token for payment method -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Integration/README.md b/app/code/Magento/Integration/README.md index fce2423034f00..0e17dc80c1355 100644 --- a/app/code/Magento/Integration/README.md +++ b/app/code/Magento/Integration/README.md @@ -37,7 +37,7 @@ The module dispatches the following events: - `customer_login` event in the `\Magento\Integration\Model\CustomerTokenService::createCustomerAccessToken` method. Parameters: - `customer` is an object (`\Magento\Customer\Api\Data\CustomerInterface` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -88,7 +88,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] - delete the consumer data associated with the integration including its token and nonce - remove token associated with provided consumer -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information @@ -98,7 +98,7 @@ Cron group configuration can be set at `etc/crontab.xml`: - `outdated_authentication_failures_cleanup` - clearing log of outdated token request authentication failures - `expired_tokens_cleanups` - delete expired customer and admin tokens -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). More information can get at articles: - [Learn more about an Integration](https://docs.magento.com/user-guide/system/integrations.html) diff --git a/app/code/Magento/LayeredNavigation/README.md b/app/code/Magento/LayeredNavigation/README.md index aac70b71ec28c..b27fa3d5360ed 100644 --- a/app/code/Magento/LayeredNavigation/README.md +++ b/app/code/Magento/LayeredNavigation/README.md @@ -10,9 +10,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_LayeredNavigation module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_LayeredNavigation module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LayeredNavigation module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_LayeredNavigation module. ### Layouts @@ -30,14 +30,14 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `product_attributes_grid` - `product_attributes_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs - `\Magento\LayeredNavigation\Block\Navigation\FilterRendererInterface` - render filter -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerAdminUi/README.md b/app/code/Magento/LoginAsCustomerAdminUi/README.md index 4ae940d51a242..3d447a730140e 100644 --- a/app/code/Magento/LoginAsCustomerAdminUi/README.md +++ b/app/code/Magento/LoginAsCustomerAdminUi/README.md @@ -2,7 +2,7 @@ This module provides UI for Admin Panel for Login As Customer functionality. -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_LoginAsCustomerAdminUi module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_LoginAsCustomerAdminUi module. ## Additional information diff --git a/app/code/Magento/LoginAsCustomerApi/README.md b/app/code/Magento/LoginAsCustomerApi/README.md index af329b244418b..4f2bf5d82495a 100644 --- a/app/code/Magento/LoginAsCustomerApi/README.md +++ b/app/code/Magento/LoginAsCustomerApi/README.md @@ -48,7 +48,7 @@ This module provides API for ability to login into customer account for an admin - `\Magento\LoginAsCustomerApi\Api\SetLoggedAsCustomerCustomerIdInterface`: - set id of customer admin is logged as -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/LoginAsCustomerLog/README.md b/app/code/Magento/LoginAsCustomerLog/README.md index 31a80010c7076..6b867473e6b5f 100644 --- a/app/code/Magento/LoginAsCustomerLog/README.md +++ b/app/code/Magento/LoginAsCustomerLog/README.md @@ -21,7 +21,7 @@ You can extend log listing updates using the configuration files located in the - `view/adminhtml/ui_component`: - `login_as_customer_log_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ### Public APIs @@ -37,7 +37,7 @@ For information about a UI component in Magento 2, see [Overview of UI component - `\Magento\LoginAsCustomerLog\Api\SaveLogsInterface`: - save login as custom logs entities -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/Marketplace/README.md b/app/code/Magento/Marketplace/README.md index f4fd482be72ca..732d6d77543ae 100644 --- a/app/code/Magento/Marketplace/README.md +++ b/app/code/Magento/Marketplace/README.md @@ -8,9 +8,9 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -Extension developers can interact with the Magento_Marketplace module. For more information about the Magento extension mechanism, see [Magento plugins](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). +Extension developers can interact with the Magento_Marketplace module. For more information about the Magento extension mechanism, see [Magento plugins](https://developer.adobe.com/commerce/php/development/components/plugins/). -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Marketplace module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_Marketplace module. ### Layouts diff --git a/app/code/Magento/MediaGalleryApi/README.md b/app/code/Magento/MediaGalleryApi/README.md index b8c41432fc525..8db7d800a9a78 100644 --- a/app/code/Magento/MediaGalleryApi/README.md +++ b/app/code/Magento/MediaGalleryApi/README.md @@ -53,7 +53,7 @@ Extension developers can interact with the Magento_MediaGalleryApi module. For m - `\Magento\MediaGalleryApi\Api\SearchAssetsInterface`: - search media gallery assets -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2./extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). ## Additional information diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/README.md b/app/code/Magento/MediaGalleryCatalogIntegration/README.md index 236b0c49d553f..ae9184420c018 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/README.md +++ b/app/code/Magento/MediaGalleryCatalogIntegration/README.md @@ -8,4 +8,4 @@ For information about a module installation in Magento 2, see [Enable or disable ## Extensibility -[The Magento dependency injection mechanism](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_MediaGalleryCatalogIntegration module. +[The Magento dependency injection mechanism](https://developer.adobe.com/commerce/php/development/components/dependency-injection/) enables you to override the functionality of the Magento_MediaGalleryCatalogIntegration module. diff --git a/app/code/Magento/MediaGalleryCatalogUi/README.md b/app/code/Magento/MediaGalleryCatalogUi/README.md index 3d822d0ed14e7..f53cc0f8f328c 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/README.md +++ b/app/code/Magento/MediaGalleryCatalogUi/README.md @@ -30,7 +30,7 @@ This module extends ui components: - `media_gallery_listing` - `standalone_media_gallery_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaGalleryCmsUi/README.md b/app/code/Magento/MediaGalleryCmsUi/README.md index 197a6a4bc4149..a7e8446de77cf 100644 --- a/app/code/Magento/MediaGalleryCmsUi/README.md +++ b/app/code/Magento/MediaGalleryCmsUi/README.md @@ -20,7 +20,7 @@ This module extends ui components: - `media_gallery_listing` - `standalone_media_gallery_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaGalleryUi/README.md b/app/code/Magento/MediaGalleryUi/README.md index ce8068f87271c..584f242ccd425 100644 --- a/app/code/Magento/MediaGalleryUi/README.md +++ b/app/code/Magento/MediaGalleryUi/README.md @@ -36,7 +36,7 @@ This module extends ui components: - `cms_page_listing` - `product_listing` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MediaStorage/README.md b/app/code/Magento/MediaStorage/README.md index 433d66d2bf459..f77ddac816cb4 100644 --- a/app/code/Magento/MediaStorage/README.md +++ b/app/code/Magento/MediaStorage/README.md @@ -15,7 +15,7 @@ For information about a module installation in Magento 2, see [Enable or disable `App/` - the directory that contains launch application entry point. -For information about a typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). +For information about a typical file structure of a module in Magento 2, see [Module file structure](https://developer.adobe.com/commerce/php/development/build/component-file-structure/#module-file-structure). ## Extensibility diff --git a/app/code/Magento/MsrpConfigurableProduct/README.md b/app/code/Magento/MsrpConfigurableProduct/README.md index 4cf5ab625e8f5..7afb0d834693c 100644 --- a/app/code/Magento/MsrpConfigurableProduct/README.md +++ b/app/code/Magento/MsrpConfigurableProduct/README.md @@ -23,11 +23,11 @@ For information about a typical file structure of a module in Magento 2, ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/MsrpGroupedProduct/README.md b/app/code/Magento/MsrpGroupedProduct/README.md index ab7cefc4e0c47..1c2a5c15a146d 100644 --- a/app/code/Magento/MsrpGroupedProduct/README.md +++ b/app/code/Magento/MsrpGroupedProduct/README.md @@ -23,11 +23,11 @@ For information about a typical file structure of a module in Magento 2, ### Layouts -For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). +For more information about a layout in Magento 2, see the [Layout documentation](https://developer.adobe.com/commerce/frontend-core/guide/layouts/). ### UI components -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/Multishipping/README.md b/app/code/Magento/Multishipping/README.md index 7cb91516d4ace..436357afa0436 100644 --- a/app/code/Magento/Multishipping/README.md +++ b/app/code/Magento/Multishipping/README.md @@ -69,7 +69,7 @@ The module dispatches the following events: class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::createOrders()` method. Parameters: - `orders` is order object array `\Magento\Sales\Model\Order` that was created. -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -136,4 +136,4 @@ Module introduces the new pages: More information about [layout types](https://developer.adobe.com/commerce/frontend-core/guide/layouts/types/). -For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.3.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). diff --git a/app/code/Magento/MysqlMq/README.md b/app/code/Magento/MysqlMq/README.md index a59958837bc58..be9c23dda9bda 100644 --- a/app/code/Magento/MysqlMq/README.md +++ b/app/code/Magento/MysqlMq/README.md @@ -19,7 +19,7 @@ For information about a module installation in Magento 2, see [Enable or disable ## Additional information -For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). +For information about significant changes in patch releases, see [2.3.x Release information](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html). ### cron options diff --git a/app/code/Magento/NewRelicReporting/README.md b/app/code/Magento/NewRelicReporting/README.md index 5f0090521c503..97bceff86da3e 100644 --- a/app/code/Magento/NewRelicReporting/README.md +++ b/app/code/Magento/NewRelicReporting/README.md @@ -43,4 +43,4 @@ The Magento_NewRelicReporting provides console commands: Cron group configuration can be set at `etc/crontab.xml`: - `magento_newrelicreporting_cron` - runs collecting all new relic reports -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/Newsletter/README.md b/app/code/Magento/Newsletter/README.md index e4499e60c252f..b9aac71e222b2 100644 --- a/app/code/Magento/Newsletter/README.md +++ b/app/code/Magento/Newsletter/README.md @@ -67,7 +67,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] This module extends customer form ui component the configuration file located in the `view/base/ui_component` directory: - `customer_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information @@ -78,5 +78,5 @@ For information about a UI component in Magento 2, see [Overview of UI component Cron group configuration can be set at `etc/crontab.xml`: - `newsletter_send_all` - schedules newsletter sending -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/OfflineShipping/README.md b/app/code/Magento/OfflineShipping/README.md index 303524947bd7b..c45767d3190da 100644 --- a/app/code/Magento/OfflineShipping/README.md +++ b/app/code/Magento/OfflineShipping/README.md @@ -49,7 +49,7 @@ This module extends following ui components located in the `view/adminhtml/ui_co - `sales_rule_form` - `salesrulestaging_update_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/OpenSearch/etc/adminhtml/system.xml b/app/code/Magento/OpenSearch/etc/adminhtml/system.xml index 56d9eff92fd3e..45409dee70587 100644 --- a/app/code/Magento/OpenSearch/etc/adminhtml/system.xml +++ b/app/code/Magento/OpenSearch/etc/adminhtml/system.xml @@ -83,7 +83,7 @@ <depends> <field id="engine">opensearch</field> </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> + <comment><![CDATA[<a href="https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html">Learn more</a> about valid syntax.]]></comment> <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> </field> </group> diff --git a/app/code/Magento/Persistent/README.md b/app/code/Magento/Persistent/README.md index 0ffec3a4c8cd7..05279586d4dc9 100644 --- a/app/code/Magento/Persistent/README.md +++ b/app/code/Magento/Persistent/README.md @@ -41,7 +41,7 @@ The module dispatches the following events: - `persistent_session_expired` event in the `\Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver::execute` method -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Layouts @@ -58,4 +58,4 @@ More information can get at articles: Cron group configuration can be set at `etc/crontab.xml`: - `persistent_clear_expired` - clear expired persistent sessions -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/ProductAlert/README.md b/app/code/Magento/ProductAlert/README.md index 5e6c1682024e0..76ee9f8066cd5 100644 --- a/app/code/Magento/ProductAlert/README.md +++ b/app/code/Magento/ProductAlert/README.md @@ -43,5 +43,5 @@ More information can get at articles: Cron group configuration can be set at `etc/crontab.xml`: - `catalog_product_alert` - send product alerts to customers -[Learn how to configure and run cron in Magento.](http://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html). +[Learn how to configure and run cron in Magento.](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/cli/configure-cron-jobs.html). diff --git a/app/code/Magento/ProductVideo/README.md b/app/code/Magento/ProductVideo/README.md index 9f737596575a5..a36a1f777c655 100644 --- a/app/code/Magento/ProductVideo/README.md +++ b/app/code/Magento/ProductVideo/README.md @@ -37,7 +37,7 @@ For more information about a layout in Magento 2, see the [Layout documentation] This module extends following ui components located in the `view/adminhtml/ui_component` directory: - `product_form` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/app/code/Magento/Quote/README.md b/app/code/Magento/Quote/README.md index 5b3b466402311..4c3cf42359f0c 100644 --- a/app/code/Magento/Quote/README.md +++ b/app/code/Magento/Quote/README.md @@ -108,7 +108,7 @@ The module dispatches the following events: - `sales_quote_item_collection_products_after_load` event in the `\Magento\Quote\Model\QuoteManagement::_assignProducts` method. Parameters: - `collection` is a product collection object (`\Magento\Catalog\Model\ResourceModel\Product\Collection` class) -For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events). +For information about an event in Magento 2, see [Events and observers](https://developer.adobe.com/commerce/php/development/components/events-and-observers/#events). ### Public APIs @@ -293,5 +293,5 @@ For information about an event in Magento 2, see [Events and observers](http://d - `\Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface` - converts quote ID to the masked quote ID -For information about a public API in Magento 2, see [Public interfaces & APIs](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html). +For information about a public API in Magento 2, see [Public interfaces & APIs](https://developer.adobe.com/commerce/php/development/components/api-concepts/). diff --git a/app/code/Magento/ReleaseNotification/README.md b/app/code/Magento/ReleaseNotification/README.md index 0cd2107e64432..060aeb24f473a 100644 --- a/app/code/Magento/ReleaseNotification/README.md +++ b/app/code/Magento/ReleaseNotification/README.md @@ -21,7 +21,7 @@ Extension developers can interact with the Magento_ReleaseNotification module. F You can extend release notification updates using the configuration files located in the `view/adminhtml/ui_component` directory: - `release_notification` -For information about a UI component in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.4/ui_comp_guide/bk-ui_comps.html). +For information about a UI component in Magento 2, see [Overview of UI components](https://developer.adobe.com/commerce/frontend-core/ui-components/). ## Additional information diff --git a/nginx.conf.sample b/nginx.conf.sample index 1dda4ae249e17..cc1d52e1d9284 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -140,7 +140,7 @@ location /media/ { ## The following section allows to offload image resizing from Magento instance to the Nginx. ## Catalog image URL format should be set accordingly. -## See https://docs.magento.com/user-guide/configuration/general/web.html#url-options +## See https://experienceleague.adobe.com/docs/commerce-admin/config/general/web.html # location ~* ^/media/catalog/.* { # # # Replace placeholders and uncomment the line below to serve product images from public S3 From a16f9ad41cb657ef0d6fd5cb17ab39f2e1806407 Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Tue, 20 Dec 2022 16:30:56 -0600 Subject: [PATCH 282/985] ACP2E-1451: Non-default configurations added as env variables break config import --- .../Config/App/Config/Type/SystemTest.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Config/App/Config/Type/SystemTest.php b/dev/tests/integration/testsuite/Magento/Config/App/Config/Type/SystemTest.php index 14c66b67dcff6..b65b2942b6f7b 100644 --- a/dev/tests/integration/testsuite/Magento/Config/App/Config/Type/SystemTest.php +++ b/dev/tests/integration/testsuite/Magento/Config/App/Config/Type/SystemTest.php @@ -47,4 +47,25 @@ public function testGetValueDefaultScope() $this->system->get('stores/default/web/test/test_value_1') ); } + + /** + * Tests that configurations added as env variables don't cause the error 'Recursion detected' + * after cleaning the cache. + * + * @return void + */ + public function testEnvGetValueStoreScope() + { + $this->system->clean(); + $_ENV['CONFIG__STORES__DEFAULT__ABC__QRS__XYZ'] = 'test_env_value'; + + $this->assertEquals( + 'value1.db.default.test', + $this->system->get('default/web/test/test_value_1') + ); + $this->assertEquals( + 'test_env_value', + $this->system->get('stores/default/abc/qrs/xyz') + ); + } } From 840c98141840e558e9441d40b2053cf5b985cae8 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 21 Dec 2022 10:57:53 +0530 Subject: [PATCH 283/985] ACQE-4352 : Skipped two test cases due to flakiness . Will be worked seperately --- ...gAndBillingAddressWithRestrictedCountriesForPaymentTest.xml | 2 ++ .../Mftf/Test/AdminCheckProductQtyAfterOrderCancellingTest.xml | 2 ++ ...aceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest.xml | 2 ++ .../Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 3 +++ .../Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml | 3 +++ 5 files changed, 12 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithDifferentShippingAndBillingAddressWithRestrictedCountriesForPaymentTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithDifferentShippingAndBillingAddressWithRestrictedCountriesForPaymentTest.xml index ad4dbd0ab8047..39912510b0c41 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithDifferentShippingAndBillingAddressWithRestrictedCountriesForPaymentTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithDifferentShippingAndBillingAddressWithRestrictedCountriesForPaymentTest.xml @@ -21,6 +21,8 @@ </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <magentoCLI command="config:set {{BankTransferEnableConfigData.path}} {{BankTransferEnableConfigData.value}}" stepKey="enableBankTransfer"/> <magentoCLI command="config:set payment/checkmo/allowspecific 1" stepKey="allowSpecificValue"/> <magentoCLI command="config:set payment/checkmo/specificcountry GB" stepKey="allowBankTransferOnlyForGB"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckProductQtyAfterOrderCancellingTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckProductQtyAfterOrderCancellingTest.xml index 9dcfbd8d750c0..2f3e7b0837e67 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckProductQtyAfterOrderCancellingTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckProductQtyAfterOrderCancellingTest.xml @@ -23,6 +23,8 @@ </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <createData entity="ApiCategory" stepKey="createCategory"/> <createData entity="defaultSimpleProduct" stepKey="createConfigProduct"> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminPlaceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminPlaceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest.xml index 7217f452e83f5..28ddac690a5e5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminPlaceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminPlaceOrderWhenCountryAllowedOnlyOnCurrentWebsiteScopeTest.xml @@ -17,6 +17,8 @@ <group value="customer"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <magentoCLI command="config:set --scope={{SetAllowedCountryUsConfig.scope}} --scope-code={{SetAllowedCountryUsConfig.scope_code}} {{SetAllowedCountryUsConfig.path}} {{SetAllowedCountryUsConfig.value}}" stepKey="setAllowedCountryUs"/> <magentoCLI command="config:set {{SetAllowedCountryUsConfig.path}} ''" stepKey="unselectAllCountriesFromAllowedCounties"/> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index 368a5c8db7d3c..6e7fe4e259d7a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -18,6 +18,9 @@ <severity value="CRITICAL"/> <testCaseId value="MC-25681"/> <group value="SearchEngine"/> + <skip> + <issueId value="ACQE-4352"/> + </skip> </annotations> <before> <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml index 7661b1222fb57..8905ef18da54a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontRetainLocalCacheStorageTest.xml @@ -17,6 +17,9 @@ <severity value="AVERAGE"/> <testCaseId value="AC-3635"/> <group value="customer"/> + <skip> + <issueId value="ACQE-4352"/> + </skip> </annotations> <before> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> From 677daa8a203cfeb646d2686529e0519dded6d5a9 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Wed, 21 Dec 2022 13:11:35 +0530 Subject: [PATCH 284/985] AC-4385 test automated --- ...eleteProductAttributeByCodeActionGroup.xml | 29 ++++ ...reateProductConfigurationsPanelSection.xml | 1 + ...roductBasedOnVisualSwatchAttributeTest.xml | 146 ++++++++++++++++++ .../Mftf/Section/AdminManageSwatchSection.xml | 3 + 4 files changed, 179 insertions(+) create mode 100644 app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml create mode 100644 app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/SpecialPriceForConfigurableProductBasedOnVisualSwatchAttributeTest.xml diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml new file mode 100644 index 0000000000000..1b2c0d0065e9f --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="DeleteProductAttributeByCodeActionGroup"> + <annotations> + <description>Delete a Product Attribute from the Product Attribute creation/edit page by code.</description> + </annotations> + <arguments> + <argument name="attribute_code" type="string"/> + </arguments> + <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/> + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/> + <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{attribute_code}}" stepKey="setAttributeCode"/> + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/> + <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <waitForPageLoad stepKey="waitForViewAdminProductAttributeLoad" time="30"/> + <click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="deleteAttribute"/> + <click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickOnConfirmOk"/> + <waitForPageLoad stepKey="waitForViewProductAttributePageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml index 3c5581d496b9b..a0de07cd5c5ad 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminCreateProductConfigurationsPanelSection.xml @@ -61,5 +61,6 @@ <element name="attributeColorCheckbox" type="select" selector="//div[contains(text(),'color') and @class='data-grid-cell-content']/../preceding-sibling::td/label/input"/> <element name="attributeRowByAttributeCode" type="block" selector="//td[count(../../..//th[./*[.='Attribute Code']]/preceding-sibling::th) + 1][./*[.='{{attribute_code}}']]/../td//input[@data-action='select-row']" parameterized="true"/> <element name="qtyForColorAttribute" type="text" selector="//span[text()='{{var1}}']/../..//input[@type='text']" parameterized="true"/> + <element name="configProductName" type="text" selector="//table[@class='data-grid data-grid-configurable']//tbody//tr[{{row}}]//td[2]//span" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/SpecialPriceForConfigurableProductBasedOnVisualSwatchAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/SpecialPriceForConfigurableProductBasedOnVisualSwatchAttributeTest.xml new file mode 100644 index 0000000000000..678c6f99a9f2a --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/SpecialPriceForConfigurableProductBasedOnVisualSwatchAttributeTest.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="SpecialPriceForConfigurableProductBasedOnVisualSwatchAttributeTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Special price for configurable product based on visual swatch attribute"/> + <title value="Special price for configurable product based on visual swatch attribute"/> + <description value="Special price for configurable product based on visual swatch attribute"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4385"/> + <group value="catalog"/> + <group value="configurableProduct"/> + <group value="swatch"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteConfigurableProductsWithAllVariations"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <!-- Delete attribute --> + + <actionGroup ref="DeleteProductAttributeByCodeActionGroup" stepKey="deleteProductAttributeByCode"> + <argument name="attribute_code" value="{{ProductAttributeFrontendLabel.label}}"/> + </actionGroup> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + </after> + + <!-- Step1 Create Visual Swatch attribute --> + <actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="goToNewProductAttributePage"/> + <fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillDefaultLabel"/> + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="swatch_text" stepKey="selectInputType"/> + <click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch0"/> + <fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('0')}}" userInput="red" stepKey="fillSwatch0"/> + <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('0')}}" userInput="CodeRed" stepKey="fillDescription0"/> + <click selector="{{AdminManageSwatchSection.addSwatchText}}" stepKey="clickAddSwatch1"/> + <fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('1')}}" userInput="green" stepKey="fillSwatch1"/> + <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('1')}}" userInput="CodeGreen" stepKey="fillDescription1"/> + <click selector="{{AttributePropertiesSection.AdvancedProperties}}" stepKey="expandAdvancedProperties"/> + <selectOption selector="{{AttributePropertiesSection.Scope}}" userInput="1" stepKey="selectGlobalScope"/> + <!-- Save and verify --> + <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSave"/> + <seeInField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeDefaultLabel"/> + <seeInField selector="{{AdminManageSwatchSection.nthSwatchText('1')}}" userInput="red" stepKey="seeSwatch0"/> + <seeInField selector="{{AdminManageSwatchSection.nthSwatchAdminDescription('1')}}" userInput="CodeRed" stepKey="seeDescription0"/> + <seeInField selector="{{AdminManageSwatchSection.nthSwatchText('2')}}" userInput="green" stepKey="seeSwatch1"/> + <seeInField selector="{{AdminManageSwatchSection.nthSwatchAdminDescription('2')}}" userInput="CodeGreen" stepKey="seeDescription1"/> + + <!-- Step 2 Create a configurable product to verify the storefront with --> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductGridPage"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateConfigurableProduct"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> + <fillField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/> + <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm"> + <argument name="product" value="BaseConfigurableProduct"/> + </actionGroup> + + <!-- Create configurations based off the Text Swatch we created earlier --> + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/> + <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickFilters"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillFilterAttributeCodeField"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/> + <click selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton1"/> + <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/> + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> + <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="1" stepKey="enterAttributeQuantity"/> + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton3"/> + <grabTextFrom selector="{{AdminCreateProductConfigurationsPanel.configProductName('1')}}" stepKey="grabRedConfigProdName"/> + <grabTextFrom selector="{{AdminCreateProductConfigurationsPanel.configProductName('2')}}" stepKey="grabGreenConfigProdName"/> + + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton4"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton2"/> + <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/> + + <!-- Step 3 Set the special price here for red product --> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfPresent"/> + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> + <fillField selector="{{AdminProductGridFilterSection.keywordSearch}}" userInput="{$grabRedConfigProdName}" stepKey="fillKeywordSearchField"/> + <click selector="{{AdminProductGridFilterSection.keywordSearchButton}}" stepKey="clickKeywordSearch"/> + <waitForPageLoad stepKey="waitForProductSearch"/> + <click selector="{{AdminProductGridSection.selectRowBasedOnName({$grabRedConfigProdName})}}" stepKey="selectProductToEditForSpecialPrice"/> + <waitForPageLoad stepKey="waitForProductEditPageToLoad"/> + <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPriceTopTheProduct"> + <argument name="price" value="10"/> + </actionGroup> + <click selector="{{AdminProductFormAdvancedPricingSection.save}}" stepKey="clickSaveProduct"/> + <waitForPageLoad time='30' stepKey="waitForChildConfigProductToBeSaved"/> + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSaveSuccessMessagePostSpecialPrice"/> + + <!-- Step 4 Go to the product page and see text swatch options --> + <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnProductPage"/> + <waitForPageLoad stepKey="waitForProductPage"/> + <see selector="{{StorefrontProductInfoMainSection.swatchAttributeOptions}}" userInput="red" stepKey="seeRed"/> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOptionText('1')}}" userInput="data-option-label" stepKey="grabRedLabel"/> + <assertEquals stepKey="assertRedLabel"> + <expectedResult type="string">CodeRed</expectedResult> + <actualResult type="string">{$grabRedLabel}</actualResult> + </assertEquals> + <see selector="{{StorefrontProductInfoMainSection.swatchAttributeOptions}}" userInput="green" stepKey="seeGreen"/> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOptionText('2')}}" userInput="data-option-label" stepKey="grabGreenLabel"/> + <assertEquals stepKey="assertGreenLabel"> + <expectedResult type="string">CodeGreen</expectedResult> + <actualResult type="string">{$grabGreenLabel}</actualResult> + </assertEquals> + + <!-- Step 5 Open Configurable product with special price --> + <click selector="{{StorefrontProductInfoMainSection.visualSwatchOptionText('red')}}" stepKey="clickRedProduct"/> + <grabTextFrom selector="{{StorefrontProductInfoMainSection.specialPriceAmount}}" stepKey="specialPriceAmount"/> + <assertEquals stepKey="assertSpecialPriceTextOnProductPage"> + <expectedResult type="string">$10.00</expectedResult> + <actualResult type="variable">specialPriceAmount</actualResult> + </assertEquals> + <seeElement selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" stepKey="verifyRegulaPriceTag"/> + <!-- Verify customer see product old price on the storefront page for red product --> + <grabTextFrom selector="{{StorefrontProductInfoMainSection.oldPriceAmount}}" stepKey="oldPriceAmount"/> + <assertEquals stepKey="assertOldPriceTextOnProductPage"> + <expectedResult type="string">$123.00</expectedResult> + <actualResult type="variable">oldPriceAmount</actualResult> + </assertEquals> + + <!-- Step 6 Open green Configurable product without special price --> + <click selector="{{StorefrontProductInfoMainSection.visualSwatchOptionText('green')}}" stepKey="clickGreenProduct"/> + <see userInput="$123.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> + <dontSeeElement selector="{{StorefrontProductInfoMainSection.oldPriceTag}}" stepKey="verifyRegularPriceTagIsNotPresent"/> + <dontSeeElement selector="{{StorefrontProductInfoMainSection.specialPriceAmount}}" stepKey="verifySpecialPriceIsNotPresent"/> + </test> +</tests> diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index 449f917463fc8..ce50dd0132101 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -10,6 +10,9 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminManageSwatchSection"> <element name="adminInputByIndex" type="input" selector="optionvisual[value][option_{{var}}][0]" parameterized="true"/> + <element name="adminInputSwatchValues" type="input" selector="optionvisual[value][option_{{row_val}}][{{col_val}}]" parameterized="true"/> + <element name="adminInputSwatchValuesStore" type="input" selector="//td[@class='swatch-col-option_{{row}}'][{{col}}]//input" parameterized="true"/> + <element name="swatchOptionWindow" type="button" selector="//div[@id='swatch_window_option_option_{{row}}']" timeout="30" parameterized="true"/> <element name="addSwatch" type="button" selector="#add_new_swatch_visual_option_button" timeout="30"/> <element name="nthSwatch" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_window" parameterized="true"/> <element name="addSwatchText" type="button" selector="#add_new_swatch_text_option_button"/> From c4d6e8502637d36b646daef1cb244bb75cacb628 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 21 Dec 2022 11:34:23 +0200 Subject: [PATCH 285/985] ACP2E-1413, fixed mftf test --- .../StorefrontRememberCategoryPaginationTest.xml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml index 107000a337991..4334a0aae4608 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml @@ -32,17 +32,9 @@ <createData entity="RememberPaginationCatalogStorefrontConfig" stepKey="setRememberPaginationCatalogStorefrontConfig"/> </before> - <actionGroup ref="GoToStorefrontCategoryPageByParametersActionGroup" stepKey="GoToStorefrontCategory1Page"> - <argument name="category" value="$$defaultCategory1.custom_attributes[url_key]$$"/> - <argument name="mode" value="grid"/> - <argument name="numOfProductsPerPage" value="12"/> - </actionGroup> - - <actionGroup ref="VerifyCategoryPageParametersActionGroup" stepKey="verifyCategory1PageParameters"> - <argument name="category" value="$$defaultCategory1$$"/> - <argument name="mode" value="grid"/> - <argument name="numOfProductsPerPage" value="12"/> - </actionGroup> + <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory1.custom_attributes[url_key]$$)}}" stepKey="GoToStorefrontCategory1Page"/> + <selectOption selector="{{StorefrontCategoryBottomToolbarSection.perPage}}" userInput="24" stepKey="selectPerPageCategory1" /> + <waitForPageLoad stepKey="waitForCategory1PageToLoad"/> <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory2.custom_attributes[url_key]$$)}}" stepKey="navigateToCategory2Page"/> <waitForPageLoad stepKey="waitForCategory2PageToLoad"/> @@ -50,7 +42,7 @@ <actionGroup ref="VerifyCategoryPageParametersActionGroup" stepKey="verifyCategory2PageParameters"> <argument name="category" value="$$defaultCategory2$$"/> <argument name="mode" value="grid"/> - <argument name="numOfProductsPerPage" value="12"/> + <argument name="numOfProductsPerPage" value="24"/> </actionGroup> <after> From 7569793bf3b4571d7610e4e4d819e3c29a175f13 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:14:09 +0530 Subject: [PATCH 286/985] Update StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml --- ...ontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index d83550a82a87c..db73299d015d9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -20,6 +20,8 @@ </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <!-- Enable Free Shipping Method and set Minimum Order Amount to 100--> <magentoCLI command="config:set {{AdminFreeshippingActiveConfigData.path}} {{AdminFreeshippingActiveConfigData.enabled}}" stepKey="enableFreeShippingMethod" /> <magentoCLI command="config:set {{AdminFreeshippingMinimumOrderAmountConfigData.path}} {{AdminFreeshippingMinimumOrderAmountConfigData.hundred}}" stepKey="setFreeShippingMethodMinimumOrderAmountToBe100" /> From 120ef288263828541c5413dff0eaba4aedef3831 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 21 Dec 2022 12:30:47 +0200 Subject: [PATCH 287/985] ACP2E-1388, address CR feedback --- .../Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 2ea345a501d49..35b1958ca75af 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -22,9 +22,9 @@ class ProductPriceIndexModifier private ResourceConnection $resourceConnection; /** - * @var string|null + * @var string */ - private ?string $connectionName; + private string $connectionName; /** * @param ResourceConnection $resourceConnection From 1d18a2b92ece47e0d150ec59b257640233e3b979 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 21 Dec 2022 17:03:35 +0200 Subject: [PATCH 288/985] ACP2E-1413, fixed mftf test --- .../Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml index 4334a0aae4608..9e01caa0f1d32 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml @@ -35,6 +35,7 @@ <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory1.custom_attributes[url_key]$$)}}" stepKey="GoToStorefrontCategory1Page"/> <selectOption selector="{{StorefrontCategoryBottomToolbarSection.perPage}}" userInput="24" stepKey="selectPerPageCategory1" /> <waitForPageLoad stepKey="waitForCategory1PageToLoad"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="verifyCategory1PageParameters"/> <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory2.custom_attributes[url_key]$$)}}" stepKey="navigateToCategory2Page"/> <waitForPageLoad stepKey="waitForCategory2PageToLoad"/> From bbcb564040f1096eee5e907280e897a6b9184499 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Tue, 20 Dec 2022 14:35:57 -0600 Subject: [PATCH 289/985] ACP2E-1476: [Magento Cloud] - Cannot export customer from customer grid admin --- .../Component/DataProvider/DocumentTest.php | 23 ++++-- .../Ui/Component/DataProvider/Document.php | 12 +++- .../Magento/Ui/Model/Export/ConvertToCsv.php | 12 ++-- .../Unit/Model/Export/ConvertToCsvTest.php | 55 +++++++++----- .../UiComponent/DataProvider/Document.php | 33 +++++++-- .../UiComponent/DataProvider/SearchResult.php | 19 ++++- .../UiComponent/DataProvider/DocumentTest.php | 72 +++++++++++++++++++ .../DataProvider/SearchResultTest.php | 52 ++++++++++++++ 8 files changed, 242 insertions(+), 36 deletions(-) create mode 100644 lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/DocumentTest.php create mode 100644 lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/SearchResultTest.php diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php index 08fd76afb76d3..7136ebf9b5ef7 100644 --- a/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php +++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/DataProvider/DocumentTest.php @@ -157,18 +157,33 @@ public function testGetGroupAttribute() $this->storeManager->expects(static::never()) ->method('getWebsites'); - $group = $this->getMockForAbstractClass(GroupInterface::class); + $group1 = $this->getMockForAbstractClass(GroupInterface::class); + $group2 = $this->getMockForAbstractClass(GroupInterface::class); - $this->groupRepository->expects(static::once()) + $this->groupRepository->expects(static::exactly(2)) ->method('getById') - ->willReturn($group); + ->willReturnMap([[1, $group1], [2, $group2]]); - $group->expects(static::once()) + $group1->expects(static::once()) ->method('getCode') ->willReturn('General'); + $group2->expects(static::once()) + ->method('getCode') + ->willReturn('Wholesale'); + + $attribute = $this->document->getCustomAttribute('group_id'); + static::assertEquals('General', $attribute->getValue()); + + // Check that the group code is resolved from cache + $this->document->setData('group_id', 1); $attribute = $this->document->getCustomAttribute('group_id'); static::assertEquals('General', $attribute->getValue()); + + // Check that the group code is resolved from repository if missing in the cache + $this->document->setData('group_id', 2); + $attribute = $this->document->getCustomAttribute('group_id'); + static::assertEquals('Wholesale', $attribute->getValue()); } /** diff --git a/app/code/Magento/Customer/Ui/Component/DataProvider/Document.php b/app/code/Magento/Customer/Ui/Component/DataProvider/Document.php index e802505caf9d1..9ad800ae14fc3 100644 --- a/app/code/Magento/Customer/Ui/Component/DataProvider/Document.php +++ b/app/code/Magento/Customer/Ui/Component/DataProvider/Document.php @@ -55,6 +55,11 @@ class Document extends \Magento\Framework\View\Element\UiComponent\DataProvider\ */ private static $accountLockAttributeCode = 'lock_expires'; + /** + * @var array + */ + private static $customerGroupCodeById = []; + /** * @var CustomerMetadataInterface */ @@ -164,8 +169,11 @@ private function setCustomerGroupValue() { $value = $this->getData(self::$groupAttributeCode); try { - $group = $this->groupRepository->getById($value); - $this->setCustomAttribute(self::$groupAttributeCode, $group->getCode()); + if (!isset(static::$customerGroupCodeById[$value])) { + static::$customerGroupCodeById[$value] = $this->groupRepository->getById($value)->getCode(); + } + $this->setCustomAttribute(self::$groupAttributeCode, static::$customerGroupCodeById[$value]); + } catch (NoSuchEntityException $e) { $this->setCustomAttribute(self::$groupAttributeCode, 'N/A'); } diff --git a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php index 44aacd0cfa44c..f745a85895a3f 100644 --- a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php +++ b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php @@ -11,9 +11,6 @@ use Magento\Framework\Filesystem; use Magento\Ui\Component\MassAction\Filter; -/** - * Class ConvertToCsv - */ class ConvertToCsv { /** @@ -85,14 +82,17 @@ public function getCsvFile() ->setCurrentPage($i) ->setPageSize($this->pageSize); $totalCount = (int) $dataProvider->getSearchResult()->getTotalCount(); - while ($totalCount > 0) { - $items = $dataProvider->getSearchResult()->getItems(); + $totalPagesCount = (int) ceil($totalCount / $this->pageSize); + while ($i <= $totalPagesCount) { + // setTotalCount to prevent total count from being calculated in loop + $searchResult = $dataProvider->getSearchResult(); + $searchResult->setTotalCount($totalCount); + $items = $searchResult->getItems(); foreach ($items as $item) { $this->metadataProvider->convertDate($item, $component->getName()); $stream->writeCsv($this->metadataProvider->getRowData($item, $fields, $options)); } $searchCriteria->setCurrentPage(++$i); - $totalCount = $totalCount - $this->pageSize; } $stream->unlock(); $stream->close(); diff --git a/app/code/Magento/Ui/Test/Unit/Model/Export/ConvertToCsvTest.php b/app/code/Magento/Ui/Test/Unit/Model/Export/ConvertToCsvTest.php index 5fd69cd6850d8..5544ebf518ac5 100644 --- a/app/code/Magento/Ui/Test/Unit/Model/Export/ConvertToCsvTest.php +++ b/app/code/Magento/Ui/Test/Unit/Model/Export/ConvertToCsvTest.php @@ -107,10 +107,13 @@ public function testGetCsvFile() $componentName = 'component_name'; $data = ['data_value']; - $document = $this->getMockBuilder(DocumentInterface::class) + $document1 = $this->getMockBuilder(DocumentInterface::class) ->getMockForAbstractClass(); - $this->mockComponent($componentName, [$document]); + $document2 = $this->getMockBuilder(DocumentInterface::class) + ->getMockForAbstractClass(); + + $this->mockComponent($componentName, [$document1], [$document2]); $this->mockFilter(); $this->mockDirectory(); @@ -139,13 +142,13 @@ public function testGetCsvFile() ->method('getFields') ->with($this->component) ->willReturn([]); - $this->metadataProvider->expects($this->once()) + $this->metadataProvider->expects($this->exactly(2)) ->method('getRowData') - ->with($document, [], []) + ->withConsecutive([$document1, [], []], [$document2, [], []]) ->willReturn($data); - $this->metadataProvider->expects($this->once()) + $this->metadataProvider->expects($this->exactly(2)) ->method('convertDate') - ->with($document, $componentName); + ->withConsecutive([$document1, $componentName], [$document2, $componentName]); $result = $this->model->getCsvFile(); $this->assertIsArray($result); @@ -186,9 +189,10 @@ protected function mockStream($expected) /** * @param string $componentName - * @param array $items + * @param array $page1Items + * @param array $page2Items */ - protected function mockComponent($componentName, $items) + private function mockComponent(string $componentName, array $page1Items, array $page2Items): void { $context = $this->getMockBuilder(ContextInterface::class) ->setMethods(['getDataProvider']) @@ -200,7 +204,15 @@ protected function mockComponent($componentName, $items) ->setMethods(['getSearchResult']) ->getMockForAbstractClass(); - $searchResult = $this->getMockBuilder(SearchResultInterface::class) + $searchResult0 = $this->getMockBuilder(SearchResultInterface::class) + ->setMethods(['getItems']) + ->getMockForAbstractClass(); + + $searchResult1 = $this->getMockBuilder(SearchResultInterface::class) + ->setMethods(['getItems']) + ->getMockForAbstractClass(); + + $searchResult2 = $this->getMockBuilder(SearchResultInterface::class) ->setMethods(['getItems']) ->getMockForAbstractClass(); @@ -218,24 +230,35 @@ protected function mockComponent($componentName, $items) ->method('getDataProvider') ->willReturn($dataProvider); - $dataProvider->expects($this->exactly(2)) + $dataProvider->expects($this->exactly(3)) ->method('getSearchResult') - ->willReturn($searchResult); + ->willReturnOnConsecutiveCalls($searchResult0, $searchResult1, $searchResult2); $dataProvider->expects($this->once()) ->method('getSearchCriteria') ->willReturn($searchCriteria); - $searchResult->expects($this->once()) + $searchResult1->expects($this->once()) + ->method('setTotalCount'); + + $searchResult2->expects($this->once()) + ->method('setTotalCount'); + + $searchResult1->expects($this->once()) + ->method('getItems') + ->willReturn($page1Items); + + $searchResult2->expects($this->once()) ->method('getItems') - ->willReturn($items); + ->willReturn($page2Items); - $searchResult->expects($this->once()) + $searchResult0->expects($this->once()) ->method('getTotalCount') - ->willReturn(1); + ->willReturn(201); - $searchCriteria->expects($this->any()) + $searchCriteria->expects($this->exactly(3)) ->method('setCurrentPage') + ->withConsecutive([1], [2], [3]) ->willReturnSelf(); $searchCriteria->expects($this->once()) diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/Document.php b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/Document.php index b9585b561c0f3..a67262261c6c8 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/Document.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/Document.php @@ -5,9 +5,11 @@ */ namespace Magento\Framework\View\Element\UiComponent\DataProvider; +use Magento\Framework\Api\AttributeInterface; use Magento\Framework\Api\Search\DocumentInterface; use Magento\Framework\DataObject; use Magento\Framework\Api\AttributeValueFactory; +use Magento\Framework\Profiler; /** * The document data provider @@ -24,6 +26,11 @@ class Document extends DataObject implements DocumentInterface */ protected $attributeValueFactory; + /** + * @var \Magento\Framework\Api\AttributeValue + */ + private $attributeValuePrototype; + /** * @param AttributeValueFactory $attributeValueFactory */ @@ -62,12 +69,11 @@ public function setId($id) * Get an attribute value. * * @param string $attributeCode - * @return \Magento\Framework\Api\AttributeInterface|null + * @return AttributeInterface|null */ public function getCustomAttribute($attributeCode) { - /** @var \Magento\Framework\Api\AttributeInterface $attributeValue */ - $attributeValue = $this->attributeValueFactory->create(); + $attributeValue = $this->getNewEmptyAttributeValue(); $attributeValue->setAttributeCode($attributeCode); $attributeValue->setValue($this->getData($attributeCode)); return $attributeValue; @@ -89,13 +95,13 @@ public function setCustomAttribute($attributeCode, $attributeValue) /** * Retrieve custom attributes values. * - * @return \Magento\Framework\Api\AttributeInterface[]|null + * @return AttributeInterface[]|null */ public function getCustomAttributes() { $output = []; foreach ($this->getData() as $key => $value) { - $attribute = $this->attributeValueFactory->create(); + $attribute = $this->getNewEmptyAttributeValue(); $output[] = $attribute->setAttributeCode($key)->setValue($value); } return $output; @@ -104,13 +110,13 @@ public function getCustomAttributes() /** * Set array of custom attributes * - * @param \Magento\Framework\Api\AttributeInterface[] $attributes + * @param AttributeInterface[] $attributes * @return $this * @throws \LogicException */ public function setCustomAttributes(array $attributes) { - /** @var \Magento\Framework\Api\AttributeInterface $attribute */ + /** @var AttributeInterface $attribute */ foreach ($attributes as $attribute) { $this->setData( $attribute->getAttributeCode(), @@ -119,4 +125,17 @@ public function setCustomAttributes(array $attributes) } return $this; } + + /** + * Returns new instance of attribute value + * + * @return AttributeInterface + */ + private function getNewEmptyAttributeValue(): AttributeInterface + { + if ($this->attributeValuePrototype === null) { + $this->attributeValuePrototype = $this->attributeValueFactory->create(); + } + return clone $this->attributeValuePrototype; + } } diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php index 623d33a78ee9d..e14b180f5d187 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php @@ -17,8 +17,8 @@ use Magento\Framework\App\ObjectManager; /** - * Class SearchResult * Generic Search Result + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @api */ @@ -97,7 +97,10 @@ public function __construct( } /** + * Returns resource connection + * * @deprecated 101.0.0 + * @see Dependencies MUST be explicitly declared in the constructor * @return ResourceConnection */ private function getResourceConnection() @@ -109,6 +112,8 @@ private function getResourceConnection() } /** + * Returns search aggregations + * * @return \Magento\Framework\Api\Search\AggregationInterface */ public function getAggregations() @@ -130,6 +135,8 @@ public function getResource() } /** + * Set search aggregations + * * @param \Magento\Framework\Api\Search\AggregationInterface $aggregations * @return void */ @@ -139,6 +146,8 @@ public function setAggregations($aggregations) } /** + * Returns the search criteria or NULL if not defined + * * @return \Magento\Framework\Api\Search\SearchCriteriaInterface|null */ public function getSearchCriteria() @@ -147,6 +156,8 @@ public function getSearchCriteria() } /** + * Set the search criteria. + * * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) @@ -158,6 +169,8 @@ public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface } /** + * Returns total items count + * * @return int */ public function getTotalCount() @@ -169,12 +182,15 @@ public function getTotalCount() } /** + * Set total items count + * * @param int $totalCount * @return $this */ public function setTotalCount($totalCount) { $this->totalCount = $totalCount; + $this->_totalRecords = $totalCount; return $this; } @@ -191,6 +207,7 @@ public function setItems(array $items = null) $this->addItem($item); } unset($this->totalCount); + unset($this->_totalRecords); } return $this; } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/DocumentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/DocumentTest.php new file mode 100644 index 0000000000000..b73cd0aa59d13 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/DocumentTest.php @@ -0,0 +1,72 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\View\Test\Unit\Element\UiComponent\DataProvider; + +use Magento\Framework\Api\AttributeValue; +use Magento\Framework\Api\AttributeValueFactory; +use Magento\Framework\View\Element\UiComponent\DataProvider\Document; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class DocumentTest extends TestCase +{ + /** + * @var AttributeValueFactory|MockObject + */ + private $attributeValueFactory; + + /** + * @var Document + */ + private $model; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->attributeValueFactory = $this->createMock(AttributeValueFactory::class); + $this->model = new Document($this->attributeValueFactory); + } + + public function testGetCustomAttribute(): void + { + $this->attributeValueFactory->expects($this->once()) + ->method('create') + ->willReturnCallback( + function () { + return new AttributeValue(); + } + ); + $this->model->setData('attr1', 'val1'); + $this->model->setData('attr2', 'val2'); + $attr1 = $this->model->getCustomAttribute('attr1'); + $attr2 = $this->model->getCustomAttribute('attr2'); + $this->assertNotSame($attr1, $attr2); + $this->assertEquals('val1', $attr1->getValue()); + $this->assertEquals('val2', $attr2->getValue()); + } + + public function testGetCustomAttributes(): void + { + $this->attributeValueFactory->expects($this->once()) + ->method('create') + ->willReturnCallback( + function () { + return new AttributeValue(); + } + ); + $this->model->setData('attr1', 'val1'); + $this->model->setData('attr2', 'val2'); + $attributes = $this->model->getCustomAttributes(); + $this->assertCount(2, $attributes); + $this->assertNotSame($attributes[0], $attributes[1]); + $this->assertEquals('val1', $attributes[0]->getValue()); + $this->assertEquals('val2', $attributes[1]->getValue()); + } +} diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/SearchResultTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/SearchResultTest.php new file mode 100644 index 0000000000000..796d8776941d5 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/UiComponent/DataProvider/SearchResultTest.php @@ -0,0 +1,52 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\View\Test\Unit\Element\UiComponent\DataProvider; + +use Magento\Framework\View\Element\UiComponent\DataProvider\Document; +use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult; +use PHPUnit\Framework\TestCase; + +class SearchResultTest extends TestCase +{ + /** + * @var SearchResult + */ + private $model; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->model = $this->getMockBuilder(SearchResult::class) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + } + + public function testSetTotalCount(): void + { + $this->model->setTotalCount(2); + self::assertEquals(2, $this->model->getTotalCount()); + self::assertEquals(2, $this->model->getSize()); + } + + public function testSetItems(): void + { + $totalCount = new \ReflectionProperty($this->model, 'totalCount'); + $totalRecords = new \ReflectionProperty($this->model, '_totalRecords'); + $totalCount->setAccessible(true); + $totalRecords->setAccessible(true); + $this->model->setTotalCount(2); + self::assertTrue($totalCount->isInitialized($this->model)); + self::assertTrue($totalRecords->isInitialized($this->model)); + $this->model->setItems([$this->createMock(Document::class)]); + self::assertFalse($totalCount->isInitialized($this->model)); + self::assertFalse($totalRecords->isInitialized($this->model)); + } +} From 7d00027c162a865a887c4e7884371b190fda4fdf Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 22 Dec 2022 07:50:55 +0530 Subject: [PATCH 290/985] ACQE-4352 : Created ticket for commonly happening flaky test --- .../Test/Mftf/Test/AdminMassUpdateProductQtyIncrementsTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductQtyIncrementsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductQtyIncrementsTest.xml index 12ec57c0ef1a6..a7679e7082b50 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductQtyIncrementsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductQtyIncrementsTest.xml @@ -20,6 +20,9 @@ <group value="catalog"/> <group value="CatalogInventory"/> <group value="product_attributes"/> + <skip> + <issueId value="ACQE-4352"/> + </skip> </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> From 29fe0c2b81cce39d19a2f45d4e61cbc28431799a Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 22 Dec 2022 07:51:27 +0530 Subject: [PATCH 291/985] Update StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml --- ...ntNotApplicableShippingMethodInReviewAndPaymentStepTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index db73299d015d9..6f83edc51fcfa 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -17,6 +17,9 @@ <testCaseId value="MC-22625"/> <useCaseId value="MC-21926"/> <group value="checkout"/> + <skip> + <issueId value="ACQE-4352"/> + </skip> </annotations> <before> From 104c72a24066fdf630c6fa4075c14bba54055815 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 22 Dec 2022 11:26:16 +0530 Subject: [PATCH 292/985] Update AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml --- .../Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml index db789d3512acf..9ee44edaa0dec 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml @@ -18,6 +18,8 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <!--Set Display out of stock product--> <magentoCLI stepKey="setDisplayOutOfStockProduct" command="config:set cataloginventory/options/show_out_of_stock 1" /> <!-- Login as admin --> From 851ef08a21d04c16bb1bf4cc725ef83fd689dba3 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 22 Dec 2022 13:41:43 +0530 Subject: [PATCH 293/985] Update DisableInventoryBackOrdersTest.xml --- .../Test/Mftf/Test/DisableInventoryBackOrdersTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml index 22222b1d635a5..beea664659dc3 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/DisableInventoryBackOrdersTest.xml @@ -19,6 +19,7 @@ </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <!-- Enable Back Orders--> <magentoCLI command="config:set cataloginventory/item_options/backorders 1" stepKey="EnableBackorders"/> <!--Create Category--> From 871f15eb68ae78b2c63892268d1e319a8eb901ba Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 22 Dec 2022 14:25:33 +0530 Subject: [PATCH 294/985] Update StorefrontGuestCheckoutAddNewAddressTest.xml --- .../StorefrontGuestCheckoutAddNewAddressTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutAddNewAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutAddNewAddressTest.xml index cf21af3daed17..afe95f085821d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutAddNewAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutAddNewAddressTest.xml @@ -19,6 +19,8 @@ <group value="checkout"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="ApiSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> From efc74cd2616607defb736ad50779a995a2a81bae Mon Sep 17 00:00:00 2001 From: Alexander Menk <a.menk@imi.de> Date: Thu, 22 Dec 2022 10:35:05 +0100 Subject: [PATCH 295/985] fix: #14495 Allow custom varchar attributes for customer grid * As described in the issue, it does not make sense to use the backend-type for the UI-component data type, because those do not exist necessarily * Changed it to frontend_input --- app/code/Magento/Customer/Ui/Component/Listing/Columns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Ui/Component/Listing/Columns.php b/app/code/Magento/Customer/Ui/Component/Listing/Columns.php index 79602c031f2ec..5202ef1f479f7 100644 --- a/app/code/Magento/Customer/Ui/Component/Listing/Columns.php +++ b/app/code/Magento/Customer/Ui/Component/Listing/Columns.php @@ -171,7 +171,7 @@ public function updateColumn(array $attributeData, $newAttributeCode) $component->getData('config'), [ 'name' => $newAttributeCode, - 'dataType' => $attributeData[AttributeMetadata::BACKEND_TYPE], + 'dataType' => $attributeData[AttributeMetadata::FRONTEND_INPUT], 'visible' => (bool)$attributeData[AttributeMetadata::IS_VISIBLE_IN_GRID] ] ); From f6070cb63bbadbee5a4f85e7de6f3af340405f71 Mon Sep 17 00:00:00 2001 From: Shradha Jain <shradhajain@BLR1-LHP-N81143.local> Date: Thu, 22 Dec 2022 21:47:02 +0530 Subject: [PATCH 296/985] AC-6762:: Random Integration B2B failures --- .../MessageQueue/PublisherConsumerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php index fe3f57ab9cd85..e81908087ee49 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php @@ -204,9 +204,9 @@ public function waitForAsynchronousResult(callable $condition, $params) { $i = 0; do { - sleep(1); + sleep(3); $assertion = call_user_func_array($condition, $params); - } while (!$assertion && ($i++ < 180)); + } while (!$assertion && ($i++ < 10)); if (!$assertion) { throw new PreconditionFailedException("No asynchronous messages were processed."); From 8dc47cbdbdd15ef13d1adbd57f124a2a1b2be3ca Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 22 Dec 2022 21:50:22 +0530 Subject: [PATCH 297/985] Resolve the pr comments --- .../Magento/Framework/DB/Adapter/SqlVersionProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/DB/Adapter/SqlVersionProvider.php b/lib/internal/Magento/Framework/DB/Adapter/SqlVersionProvider.php index a208f2cbf80c6..2fd4883af5eb5 100644 --- a/lib/internal/Magento/Framework/DB/Adapter/SqlVersionProvider.php +++ b/lib/internal/Magento/Framework/DB/Adapter/SqlVersionProvider.php @@ -129,7 +129,7 @@ private function fetchSqlVersion(string $resource): string * @return bool * @throws ConnectionException */ - public function isMysqlGte8029() + public function isMysqlGte8029(): bool { $sqlVersion = $this->getSqlVersion(); $isMariaDB = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_VERSION); From fd12ab09ee6c6550ec2af60403f32b98c995aeb1 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Thu, 22 Dec 2022 10:44:29 -0600 Subject: [PATCH 298/985] AC-7525: Provide backward compatible solution to resolve AC-7521 --- app/code/Magento/Theme/Block/Html/Header.php | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index e93a5a8b925a3..62c851c647a14 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -6,7 +6,11 @@ namespace Magento\Theme\Block\Html; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Escaper; +use Magento\Framework\View\Element\Template; +use Magento\Framework\View\Element\Template\Context; +use Magento\Store\Model\ScopeInterface; /** * Html page header block @@ -14,7 +18,7 @@ * @api * @since 100.0.2 */ -class Header extends \Magento\Framework\View\Element\Template +class Header extends Template { /** * @var Escaper @@ -22,19 +26,17 @@ class Header extends \Magento\Framework\View\Element\Template private $escaper; /** - * Constructor - * - * @param \Magento\Framework\View\Element\Template\Context $context - * @param Magento\Framework\Escaper $escaper + * @param Context $context * @param array $data + * @param Escaper|null $escaper */ public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\Escaper $escaper, - array $data = [] + Context $context, + array $data = [], + Escaper $escaper = null ) { - $this->escaper = $escaper; parent::__construct($context, $data); + $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);; } /** @@ -54,7 +56,7 @@ public function getWelcome() if (empty($this->_data['welcome'])) { $this->_data['welcome'] = $this->_scopeConfig->getValue( 'design/header/welcome', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ScopeInterface::SCOPE_STORE ); } $this->_data['welcome'] = $this->escaper->escapeQuote($this->_data['welcome'], true); From 1eb77e43483ac2cee9143ee37f68b5a686b1ca82 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Thu, 22 Dec 2022 11:36:05 -0600 Subject: [PATCH 299/985] AC-7525: Provide backward compatible solution to resolve AC-7521 --- app/code/Magento/Theme/Block/Html/Header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index 62c851c647a14..9f155268fe38e 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -36,7 +36,7 @@ public function __construct( Escaper $escaper = null ) { parent::__construct($context, $data); - $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);; + $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class); } /** From 41b9526034a44587aa22ac2e6b9d87cf02d0ce5d Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 23 Dec 2022 10:10:03 +0530 Subject: [PATCH 300/985] removed additional wait for page load --- .../Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml index 1b2c0d0065e9f..38865284a101f 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/DeleteProductAttributeByCodeActionGroup.xml @@ -20,7 +20,6 @@ <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{attribute_code}}" stepKey="setAttributeCode"/> <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/> <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/> - <waitForPageLoad stepKey="waitForPageLoad2"/> <waitForPageLoad stepKey="waitForViewAdminProductAttributeLoad" time="30"/> <click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="deleteAttribute"/> <click selector="{{ModalConfirmationSection.OkButton}}" stepKey="clickOnConfirmOk"/> From 6653ce51671ef0cb7a8a1f2a64b1216972e114f2 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 30 Nov 2022 20:00:20 +0530 Subject: [PATCH 301/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Sales/Controller/Adminhtml/Order/AddComment.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php index 3dcd30edd4f04..31dbc3c058ecb 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php @@ -6,6 +6,7 @@ namespace Magento\Sales\Controller\Adminhtml\Order; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Email\Sender\OrderCommentSender; /** @@ -44,7 +45,9 @@ public function execute() ); } - $order->setStatus($data['status']); + $orderStatus = ($order->getDataByKey('status') == Order::STATE_PROCESSING) ? $data['status'] + : $order->getDataByKey('status'); + $order->setStatus($orderStatus); $notify = $data['is_customer_notified'] ?? false; $visible = $data['is_visible_on_front'] ?? false; @@ -53,7 +56,7 @@ public function execute() } $comment = trim(strip_tags($data['comment'])); - $history = $order->addStatusHistoryComment($comment, $data['status']); + $history = $order->addStatusHistoryComment($comment, $orderStatus); $history->setIsVisibleOnFront($visible); $history->setIsCustomerNotified($notify); $history->save(); From 9e8cfa98ae64b5993aed7cad1466a4651d84ed58 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 30 Nov 2022 21:34:48 +0530 Subject: [PATCH 302/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Controller/Adminhtml/Order/AddComment.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php index 31dbc3c058ecb..935d9b4b5cfe0 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php @@ -45,8 +45,7 @@ public function execute() ); } - $orderStatus = ($order->getDataByKey('status') == Order::STATE_PROCESSING) ? $data['status'] - : $order->getDataByKey('status'); + $orderStatus = $this->adjustOrderStatus($order->getDataByKey('status'), $data['status']); $order->setStatus($orderStatus); $notify = $data['is_customer_notified'] ?? false; $visible = $data['is_visible_on_front'] ?? false; @@ -82,4 +81,17 @@ public function execute() } return $this->resultRedirectFactory->create()->setPath('sales/*/'); } + + /** + * adjust order status to set + * + * @param string $orderStatus + * @param string $historyStatus + * @return string + */ + private function adjustOrderStatus(string $orderStatus, string $historyStatus): string + { + return ($orderStatus == Order::STATE_PROCESSING) ? $historyStatus + : $orderStatus; + } } From dfe7083af02addfd3b61edc2083f6168eace14ec Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 30 Nov 2022 22:31:00 +0530 Subject: [PATCH 303/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Magento/Sales/Controller/Adminhtml/Order/AddComment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php index 935d9b4b5cfe0..1f476d7c7c9eb 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php @@ -83,7 +83,7 @@ public function execute() } /** - * adjust order status to set + * Adjust order status to set * * @param string $orderStatus * @param string $historyStatus From 964e4a2d2b0955c63777cd5885cf3cbe80daea9d Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 00:02:07 +0530 Subject: [PATCH 304/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Adminhtml/Order/AddCommentTest.php | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php index 2260b15616e5e..7eeb7a0fa1816 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php @@ -108,15 +108,21 @@ protected function setUp(): void /** * @param array $historyData + * @param string $orderStatus * @param bool $userHasResource * @param bool $expectedNotify * * @dataProvider executeWillNotifyCustomerDataProvider */ - public function testExecuteWillNotifyCustomer(array $historyData, bool $userHasResource, bool $expectedNotify) - { + public function testExecuteWillNotifyCustomer( + array $historyData, + string $orderStatus, + bool $userHasResource, + bool $expectedNotify + ) { $orderId = 30; $this->requestMock->expects($this->once())->method('getParam')->with('order_id')->willReturn($orderId); + $this->orderMock->expects($this->atLeastOnce())->method('getDataByKey')->with('status')->willReturn($orderStatus); $this->orderRepositoryMock->expects($this->once()) ->method('get') ->willReturn($this->orderMock); @@ -129,7 +135,6 @@ public function testExecuteWillNotifyCustomer(array $historyData, bool $userHasR $this->objectManagerMock->expects($this->once())->method('create')->willReturn( $this->createMock(OrderCommentSender::class) ); - $this->addCommentController->execute(); } @@ -143,8 +148,9 @@ public function executeWillNotifyCustomerDataProvider() 'postData' => [ 'comment' => 'Great Product!', 'is_customer_notified' => true, - 'status' => 'Processing' + 'status' => 'processing' ], + 'orderStatus' =>'processing', 'userHasResource' => true, 'expectedNotify' => true ], @@ -152,16 +158,18 @@ public function executeWillNotifyCustomerDataProvider() 'postData' => [ 'comment' => 'Great Product!', 'is_customer_notified' => false, - 'status' => 'Processing' + 'status' => 'processing' ], + 'orderStatus' =>'processing', 'userHasResource' => true, 'expectedNotify' => false ], 'User Has Access - Notify Unset' => [ 'postData' => [ 'comment' => 'Great Product!', - 'status' => 'Processing' + 'status' => 'processing' ], + 'orderStatus' =>'processing', 'userHasResource' => true, 'expectedNotify' => false ], @@ -169,8 +177,9 @@ public function executeWillNotifyCustomerDataProvider() 'postData' => [ 'comment' => 'Great Product!', 'is_customer_notified' => true, - 'status' => 'Processing' + 'status' => 'fraud' ], + 'orderStatus' =>'processing', 'userHasResource' => false, 'expectedNotify' => false ], @@ -178,16 +187,18 @@ public function executeWillNotifyCustomerDataProvider() 'postData' => [ 'comment' => 'Great Product!', 'is_customer_notified' => false, - 'status' => 'Processing' + 'status' => 'processing' ], + 'orderStatus' =>'complete', 'userHasResource' => false, 'expectedNotify' => false ], 'User No Access - Notify Unset' => [ 'postData' => [ 'comment' => 'Great Product!', - 'status' => 'Processing' + 'status' => 'processing' ], + 'orderStatus' =>'complete', 'userHasResource' => false, 'expectedNotify' => false ], From 4ed3a0133ecff17b0697f48da012929bac1abc37 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 01:02:24 +0530 Subject: [PATCH 305/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php index 7eeb7a0fa1816..0fd66d8c33536 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php @@ -122,7 +122,8 @@ public function testExecuteWillNotifyCustomer( ) { $orderId = 30; $this->requestMock->expects($this->once())->method('getParam')->with('order_id')->willReturn($orderId); - $this->orderMock->expects($this->atLeastOnce())->method('getDataByKey')->with('status')->willReturn($orderStatus); + $this->orderMock->expects($this->atLeastOnce())->method('getDataByKey') + ->with('status')->willReturn($orderStatus); $this->orderRepositoryMock->expects($this->once()) ->method('get') ->willReturn($this->orderMock); From e793571b4e8080f90f4313d0f78021af64eb455e Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 5 Dec 2022 19:18:20 +0530 Subject: [PATCH 306/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Sales/Controller/Adminhtml/Order/AddComment.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php index 1f476d7c7c9eb..ebac08bd1bc81 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php @@ -45,7 +45,7 @@ public function execute() ); } - $orderStatus = $this->adjustOrderStatus($order->getDataByKey('status'), $data['status']); + $orderStatus = $this->getOrderStatus($order->getDataByKey('status'), $data['status']); $order->setStatus($orderStatus); $notify = $data['is_customer_notified'] ?? false; $visible = $data['is_visible_on_front'] ?? false; @@ -83,15 +83,15 @@ public function execute() } /** - * Adjust order status to set + * Get order status to set * * @param string $orderStatus * @param string $historyStatus * @return string */ - private function adjustOrderStatus(string $orderStatus, string $historyStatus): string + private function getOrderStatus(string $orderStatus, string $historyStatus): string { - return ($orderStatus == Order::STATE_PROCESSING) ? $historyStatus + return ($orderStatus === Order::STATE_PROCESSING) ? $historyStatus : $orderStatus; } } From 62b2ddd5460e770f93eb97a24e4f7b18e2090245 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 8 Dec 2022 15:58:28 +0530 Subject: [PATCH 307/985] ACP2E-1421: The customers are able to save incorrect order statuses on the order page. --- .../Magento/Sales/Controller/Adminhtml/Order/AddComment.php | 2 +- .../Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php index ebac08bd1bc81..acfb654dca110 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php @@ -91,7 +91,7 @@ public function execute() */ private function getOrderStatus(string $orderStatus, string $historyStatus): string { - return ($orderStatus === Order::STATE_PROCESSING) ? $historyStatus + return ($orderStatus === Order::STATE_PROCESSING || $orderStatus === Order::STATUS_FRAUD) ? $historyStatus : $orderStatus; } } diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php index 0fd66d8c33536..9cb127365c055 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/AddCommentTest.php @@ -170,7 +170,7 @@ public function executeWillNotifyCustomerDataProvider() 'comment' => 'Great Product!', 'status' => 'processing' ], - 'orderStatus' =>'processing', + 'orderStatus' =>'fraud', 'userHasResource' => true, 'expectedNotify' => false ], From d83018e59cf783e94155b2f59e5d89a6066640b3 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 7 Nov 2022 02:59:41 +0530 Subject: [PATCH 308/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- app/code/Magento/Payment/Helper/Data.php | 4 ++- .../Payment/Test/Unit/Helper/DataTest.php | 32 +++++++++++++++++-- .../Magento/Store/Model/App/Emulation.php | 10 ++++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 6909b755bba9f..064d59a3a0e97 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -220,7 +220,9 @@ public function getInfoBlock(InfoInterface $info, LayoutInterface $layout = null */ public function getInfoBlockHtml(InfoInterface $info, $storeId) { - $this->_appEmulation->startEnvironmentEmulation($storeId, Area::AREA_FRONTEND, true); + if ($this->_appEmulation->getInitialEnvironmentInfo() === null) { + $this->_appEmulation->startEnvironmentEmulation($storeId, Area::AREA_FRONTEND, true); + } try { // Retrieve specified view block from appropriate design package (depends on emulated store) diff --git a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php index fa245875e7648..1397bfd22c85d 100644 --- a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php @@ -9,6 +9,7 @@ use Magento\Framework\App\Area; use Magento\Framework\App\Helper\Context; +use Magento\Framework\DataObject; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\TestFramework\Unit\Matcher\MethodInvokedAtIndex; use Magento\Framework\View\Element\BlockInterface; @@ -243,9 +244,12 @@ public function testGetInfoBlock(): void } /** + * @param DataObject|null $initialEnvironmentInfo + * * @return void + * @dataProvider getInitialEnvironmentInfoProvider */ - public function testGetInfoBlockHtml(): void + public function testGetInfoBlockHtml(DataObject $initialEnvironmentInfo = null): void { list($storeId, $blockHtml, $secureMode, $blockType) = [1, 'HTML MARKUP', true, 'method_block_type']; @@ -260,8 +264,19 @@ public function testGetInfoBlockHtml(): void ->getMockForAbstractClass(); $this->appEmulation->expects($this->once()) - ->method('startEnvironmentEmulation') - ->with($storeId, Area::AREA_FRONTEND, true); + ->method('getInitialEnvironmentInfo') + ->willReturn($initialEnvironmentInfo); + + if ($initialEnvironmentInfo !== null) { + $this->appEmulation->expects($this->never()) + ->method('startEnvironmentEmulation') + ->with($storeId, Area::AREA_FRONTEND, true); + } else { + $this->appEmulation->expects($this->once()) + ->method('startEnvironmentEmulation') + ->with($storeId, Area::AREA_FRONTEND, true); + } + $infoMock->expects($this->once())->method('getMethodInstance')->willReturn($methodMock); $methodMock->expects($this->once())->method('getInfoBlockType')->willReturn($blockType); $this->layoutMock->expects($this->once())->method('createBlock') @@ -284,6 +299,17 @@ public function testGetInfoBlockHtml(): void $this->assertEquals($blockHtml, $this->helper->getInfoBlockHtml($infoMock, $storeId)); } + /** + * @return array + */ + public function getInitialEnvironmentInfoProvider(): array + { + return [ + [new DataObject()], + [null] + ]; + } + /** * @return array */ diff --git a/app/code/Magento/Store/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php index d4635b46f02ba..2d51dea4f8721 100644 --- a/app/code/Magento/Store/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -246,4 +246,14 @@ protected function _restoreInitialLocale( return $this; } + + /** + * Get initialEnvironmentInfo + * + * @return \Magento\Framework\DataObject|null + */ + public function getInitialEnvironmentInfo() + { + return $this->initialEnvironmentInfo?:null; + } } From 08fc0a31973b5fccb9f38ffd22edc69799f67961 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 7 Nov 2022 12:34:20 +0530 Subject: [PATCH 309/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- app/code/Magento/Payment/Helper/Data.php | 5 +++-- .../Store/Api/Data/EmulationInterface.php | 22 +++++++++++++++++++ .../Magento/Store/Model/App/Emulation.php | 3 ++- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 app/code/Magento/Store/Api/Data/EmulationInterface.php diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 064d59a3a0e97..9ad55eb3c1ba5 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -38,7 +38,7 @@ */ class Data extends AbstractHelper { - const XML_PATH_PAYMENT_METHODS = 'payment'; + public const XML_PATH_PAYMENT_METHODS = 'payment'; /** * @var Config @@ -46,10 +46,11 @@ class Data extends AbstractHelper protected $_paymentConfig; /** - * Layout + * Layout object * * @deprecated * @var LayoutInterface + * @see we don't use this variable anymore */ protected $_layout; diff --git a/app/code/Magento/Store/Api/Data/EmulationInterface.php b/app/code/Magento/Store/Api/Data/EmulationInterface.php new file mode 100644 index 0000000000000..ed6b36e8c4be0 --- /dev/null +++ b/app/code/Magento/Store/Api/Data/EmulationInterface.php @@ -0,0 +1,22 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Store\Api\Data; + +/** + * Emulation Interface + * + * @api + */ +interface EmulationInterface +{ + /** + * Get initialEnvironmentInfo + * + * @return \Magento\Framework\DataObject|null + */ + public function getInitialEnvironmentInfo(); +} diff --git a/app/code/Magento/Store/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php index 2d51dea4f8721..455efcb675773 100644 --- a/app/code/Magento/Store/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -10,12 +10,13 @@ namespace Magento\Store\Model\App; use Magento\Framework\Translate\Inline\ConfigInterface; +use Magento\Store\Api\Data\EmulationInterface; /** * @api * @since 100.0.2 */ -class Emulation extends \Magento\Framework\DataObject +class Emulation extends \Magento\Framework\DataObject implements EmulationInterface { /** * @var \Magento\Store\Model\StoreManagerInterface From 1a60853e70681d5d9f3e4caec994a3640654438b Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 7 Nov 2022 18:42:09 +0530 Subject: [PATCH 310/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- app/code/Magento/Payment/Helper/Data.php | 9 ++--- .../Payment/Test/Unit/Helper/DataTest.php | 32 ++---------------- .../Store/Api/Data/EmulationInterface.php | 22 ------------- .../Magento/Store/Model/App/Emulation.php | 14 +------- .../Test/Unit/Model/App/EmulationTest.php | 33 ++++++++++++++++++- 5 files changed, 39 insertions(+), 71 deletions(-) delete mode 100644 app/code/Magento/Store/Api/Data/EmulationInterface.php diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 9ad55eb3c1ba5..6909b755bba9f 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -38,7 +38,7 @@ */ class Data extends AbstractHelper { - public const XML_PATH_PAYMENT_METHODS = 'payment'; + const XML_PATH_PAYMENT_METHODS = 'payment'; /** * @var Config @@ -46,11 +46,10 @@ class Data extends AbstractHelper protected $_paymentConfig; /** - * Layout object + * Layout * * @deprecated * @var LayoutInterface - * @see we don't use this variable anymore */ protected $_layout; @@ -221,9 +220,7 @@ public function getInfoBlock(InfoInterface $info, LayoutInterface $layout = null */ public function getInfoBlockHtml(InfoInterface $info, $storeId) { - if ($this->_appEmulation->getInitialEnvironmentInfo() === null) { - $this->_appEmulation->startEnvironmentEmulation($storeId, Area::AREA_FRONTEND, true); - } + $this->_appEmulation->startEnvironmentEmulation($storeId, Area::AREA_FRONTEND, true); try { // Retrieve specified view block from appropriate design package (depends on emulated store) diff --git a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php index 1397bfd22c85d..fa245875e7648 100644 --- a/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php +++ b/app/code/Magento/Payment/Test/Unit/Helper/DataTest.php @@ -9,7 +9,6 @@ use Magento\Framework\App\Area; use Magento\Framework\App\Helper\Context; -use Magento\Framework\DataObject; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\TestFramework\Unit\Matcher\MethodInvokedAtIndex; use Magento\Framework\View\Element\BlockInterface; @@ -244,12 +243,9 @@ public function testGetInfoBlock(): void } /** - * @param DataObject|null $initialEnvironmentInfo - * * @return void - * @dataProvider getInitialEnvironmentInfoProvider */ - public function testGetInfoBlockHtml(DataObject $initialEnvironmentInfo = null): void + public function testGetInfoBlockHtml(): void { list($storeId, $blockHtml, $secureMode, $blockType) = [1, 'HTML MARKUP', true, 'method_block_type']; @@ -264,19 +260,8 @@ public function testGetInfoBlockHtml(DataObject $initialEnvironmentInfo = null): ->getMockForAbstractClass(); $this->appEmulation->expects($this->once()) - ->method('getInitialEnvironmentInfo') - ->willReturn($initialEnvironmentInfo); - - if ($initialEnvironmentInfo !== null) { - $this->appEmulation->expects($this->never()) - ->method('startEnvironmentEmulation') - ->with($storeId, Area::AREA_FRONTEND, true); - } else { - $this->appEmulation->expects($this->once()) - ->method('startEnvironmentEmulation') - ->with($storeId, Area::AREA_FRONTEND, true); - } - + ->method('startEnvironmentEmulation') + ->with($storeId, Area::AREA_FRONTEND, true); $infoMock->expects($this->once())->method('getMethodInstance')->willReturn($methodMock); $methodMock->expects($this->once())->method('getInfoBlockType')->willReturn($blockType); $this->layoutMock->expects($this->once())->method('createBlock') @@ -299,17 +284,6 @@ public function testGetInfoBlockHtml(DataObject $initialEnvironmentInfo = null): $this->assertEquals($blockHtml, $this->helper->getInfoBlockHtml($infoMock, $storeId)); } - /** - * @return array - */ - public function getInitialEnvironmentInfoProvider(): array - { - return [ - [new DataObject()], - [null] - ]; - } - /** * @return array */ diff --git a/app/code/Magento/Store/Api/Data/EmulationInterface.php b/app/code/Magento/Store/Api/Data/EmulationInterface.php deleted file mode 100644 index ed6b36e8c4be0..0000000000000 --- a/app/code/Magento/Store/Api/Data/EmulationInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Store\Api\Data; - -/** - * Emulation Interface - * - * @api - */ -interface EmulationInterface -{ - /** - * Get initialEnvironmentInfo - * - * @return \Magento\Framework\DataObject|null - */ - public function getInitialEnvironmentInfo(); -} diff --git a/app/code/Magento/Store/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php index 455efcb675773..354da15d4228a 100644 --- a/app/code/Magento/Store/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -10,13 +10,12 @@ namespace Magento\Store\Model\App; use Magento\Framework\Translate\Inline\ConfigInterface; -use Magento\Store\Api\Data\EmulationInterface; /** * @api * @since 100.0.2 */ -class Emulation extends \Magento\Framework\DataObject implements EmulationInterface +class Emulation extends \Magento\Framework\DataObject { /** * @var \Magento\Store\Model\StoreManagerInterface @@ -124,7 +123,6 @@ public function startEnvironmentEmulation( ) { // Only allow a single level of emulation if ($this->initialEnvironmentInfo !== null) { - $this->logger->error(__('Environment emulation nesting is not allowed.')); return; } @@ -247,14 +245,4 @@ protected function _restoreInitialLocale( return $this; } - - /** - * Get initialEnvironmentInfo - * - * @return \Magento\Framework\DataObject|null - */ - public function getInitialEnvironmentInfo() - { - return $this->initialEnvironmentInfo?:null; - } } diff --git a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php index 43be65bf9005c..7c78da6f35299 100644 --- a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php @@ -10,6 +10,7 @@ use Magento\Framework\App\Area; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\DataObject; use Magento\Framework\Locale\ResolverInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\Translate\Inline\ConfigInterface; @@ -136,7 +137,13 @@ protected function setUp(): void ); } - public function testStartDefaults() + /** + * @param DataObject|null $initialEnvironmentInfo + * + * @return void + * @dataProvider initialEnvironmentInfoProvider + */ + public function testStartDefaults(DataObject $initialEnvironmentInfo = null): void { // Test data $inlineTranslate = false; @@ -148,6 +155,11 @@ public function testStartDefaults() $newLocale = 'new locale code'; $newArea = Area::AREA_FRONTEND; + $reflection = new \ReflectionClass(get_class($this->model)); + $reflectionProperty = $reflection->getProperty('initialEnvironmentInfo'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->model, $initialEnvironmentInfo); + // Stubs $this->inlineTranslationMock->expects($this->any())->method('isEnabled')->willReturn($inlineTranslate); $this->viewDesignMock->expects($this->any())->method('getArea')->willReturn($initArea); @@ -176,8 +188,27 @@ public function testStartDefaults() Area::AREA_FRONTEND ); $this->assertNull($result); + + $initialEnvironmentData = $reflectionProperty->getValue($this->model); + if ($initialEnvironmentInfo === null) { + $this->assertIsArray($initialEnvironmentData->getInitialDesign()); + } else { + $this->assertNull($initialEnvironmentData->getInitialDesign()); + } + } + + /** + * @return array + */ + public function initialEnvironmentInfoProvider(): array + { + return [ + [new DataObject()], + [null] + ]; } + public function testStop() { // Test data From b9b3bedbf13e752938c4151f72843e169a061896 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 7 Nov 2022 19:37:51 +0530 Subject: [PATCH 311/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Magento/Store/Test/Unit/Model/App/EmulationTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php index 7c78da6f35299..f5b3a7bca9d11 100644 --- a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php @@ -1,10 +1,9 @@ -<?php declare(strict_types=1); +<?php /** - * Tests Magento\Store\Model\App\Emulation - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Store\Test\Unit\Model\App; @@ -208,7 +207,6 @@ public function initialEnvironmentInfoProvider(): array ]; } - public function testStop() { // Test data From f1538d3d453e9de884d78eb91c1177562d0e6a25 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 11 Nov 2022 13:11:19 +0530 Subject: [PATCH 312/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/CreditmemoSender.php | 3 +- .../Order/Email/Sender/InvoiceSender.php | 3 +- .../Order/Email/Sender/ShipmentSender.php | 3 +- .../Magento/Store/Model/App/Emulation.php | 1 + .../Test/Unit/Model/App/EmulationTest.php | 37 ++----------------- 5 files changed, 11 insertions(+), 36 deletions(-) diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php index 19dc627725138..22d5bc2b7a562 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php @@ -118,6 +118,7 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false) if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) { $order = $creditmemo->getOrder(); + $paymentHTML = $this->getPaymentHtml($order); $this->appEmulation->startEnvironmentEmulation($order->getStoreId(), Area::AREA_FRONTEND, true); $transport = [ 'order' => $order, @@ -126,7 +127,7 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false) 'creditmemo_id' => $creditmemo->getId(), 'comment' => $creditmemo->getCustomerNoteNotify() ? $creditmemo->getCustomerNote() : '', 'billing' => $order->getBillingAddress(), - 'payment_html' => $this->getPaymentHtml($order), + 'payment_html' => $paymentHTML, 'store' => $order->getStore(), 'formattedShippingAddress' => $this->getFormattedShippingAddress($order), 'formattedBillingAddress' => $this->getFormattedBillingAddress($order), diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php index 1ca2efef4d8f5..585da4d965840 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php @@ -126,6 +126,7 @@ public function send(Invoice $invoice, $forceSyncMode = false) $order->setBaseTaxAmount((float) $invoice->getBaseTaxAmount()); $order->setBaseShippingAmount((float) $invoice->getBaseShippingAmount()); } + $paymentHTML = $this->getPaymentHtml($order); $this->appEmulation->startEnvironmentEmulation($order->getStoreId(), Area::AREA_FRONTEND, true); $transport = [ 'order' => $order, @@ -134,7 +135,7 @@ public function send(Invoice $invoice, $forceSyncMode = false) 'invoice_id' => $invoice->getId(), 'comment' => $invoice->getCustomerNoteNotify() ? $invoice->getCustomerNote() : '', 'billing' => $order->getBillingAddress(), - 'payment_html' => $this->getPaymentHtml($order), + 'payment_html' => $paymentHTML, 'store' => $order->getStore(), 'formattedShippingAddress' => $this->getFormattedShippingAddress($order), 'formattedBillingAddress' => $this->getFormattedBillingAddress($order), diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php index ba6d65a40c653..78aaf1a696e9a 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php @@ -120,6 +120,7 @@ public function send(Shipment $shipment, $forceSyncMode = false) if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) { $order = $shipment->getOrder(); $this->identityContainer->setStore($order->getStore()); + $paymentHTML = $this->getPaymentHtml($order); $this->appEmulation->startEnvironmentEmulation($order->getStoreId(), Area::AREA_FRONTEND, true); $transport = [ 'order' => $order, @@ -128,7 +129,7 @@ public function send(Shipment $shipment, $forceSyncMode = false) 'shipment_id' => $shipment->getId(), 'comment' => $shipment->getCustomerNoteNotify() ? $shipment->getCustomerNote() : '', 'billing' => $order->getBillingAddress(), - 'payment_html' => $this->getPaymentHtml($order), + 'payment_html' => $paymentHTML, 'store' => $order->getStore(), 'formattedShippingAddress' => $this->getFormattedShippingAddress($order), 'formattedBillingAddress' => $this->getFormattedBillingAddress($order), diff --git a/app/code/Magento/Store/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php index 354da15d4228a..d4635b46f02ba 100644 --- a/app/code/Magento/Store/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -123,6 +123,7 @@ public function startEnvironmentEmulation( ) { // Only allow a single level of emulation if ($this->initialEnvironmentInfo !== null) { + $this->logger->error(__('Environment emulation nesting is not allowed.')); return; } diff --git a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php index f5b3a7bca9d11..43be65bf9005c 100644 --- a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php @@ -1,15 +1,15 @@ -<?php +<?php declare(strict_types=1); /** + * Tests Magento\Store\Model\App\Emulation + * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -declare(strict_types=1); namespace Magento\Store\Test\Unit\Model\App; use Magento\Framework\App\Area; use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Framework\DataObject; use Magento\Framework\Locale\ResolverInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\Translate\Inline\ConfigInterface; @@ -136,13 +136,7 @@ protected function setUp(): void ); } - /** - * @param DataObject|null $initialEnvironmentInfo - * - * @return void - * @dataProvider initialEnvironmentInfoProvider - */ - public function testStartDefaults(DataObject $initialEnvironmentInfo = null): void + public function testStartDefaults() { // Test data $inlineTranslate = false; @@ -154,11 +148,6 @@ public function testStartDefaults(DataObject $initialEnvironmentInfo = null): vo $newLocale = 'new locale code'; $newArea = Area::AREA_FRONTEND; - $reflection = new \ReflectionClass(get_class($this->model)); - $reflectionProperty = $reflection->getProperty('initialEnvironmentInfo'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->model, $initialEnvironmentInfo); - // Stubs $this->inlineTranslationMock->expects($this->any())->method('isEnabled')->willReturn($inlineTranslate); $this->viewDesignMock->expects($this->any())->method('getArea')->willReturn($initArea); @@ -187,24 +176,6 @@ public function testStartDefaults(DataObject $initialEnvironmentInfo = null): vo Area::AREA_FRONTEND ); $this->assertNull($result); - - $initialEnvironmentData = $reflectionProperty->getValue($this->model); - if ($initialEnvironmentInfo === null) { - $this->assertIsArray($initialEnvironmentData->getInitialDesign()); - } else { - $this->assertNull($initialEnvironmentData->getInitialDesign()); - } - } - - /** - * @return array - */ - public function initialEnvironmentInfoProvider(): array - { - return [ - [new DataObject()], - [null] - ]; } public function testStop() From b89d88fc10145c3a92276b3f1b9e486a8e0cbb75 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 16 Nov 2022 18:48:19 +0530 Subject: [PATCH 313/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- app/code/Magento/Test/Model/Source/ProgramSource.php | 0 .../Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php | 4 ++++ .../Sales/Model/Order/Email/Sender/InvoiceSenderTest.php | 5 +++++ .../Sales/Model/Order/Email/Sender/ShipmentSenderTest.php | 4 ++++ 4 files changed, 13 insertions(+) create mode 100644 app/code/Magento/Test/Model/Source/ProgramSource.php diff --git a/app/code/Magento/Test/Model/Source/ProgramSource.php b/app/code/Magento/Test/Model/Source/ProgramSource.php new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 0850781f44370..09ac3b8dfae76 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -33,6 +33,7 @@ class CreditmemoSenderTest extends TestCase protected function setUp(): void { $this->customerRepository = Bootstrap::getObjectManager()->get(CustomerRepositoryInterface::class); + $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -50,6 +51,9 @@ public function testSend() $this->assertEmpty($creditmemo->getEmailSent()); + $this->_logger->expects($this->never())->method('error') + ->with('Environment emulation nesting is not allowed.'); + $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); $result = $creditmemoSender->send($creditmemo, true); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index 68a087c63651d..2b70b7a736f65 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -66,6 +66,7 @@ protected function setUp(): void $this->orderFactory = $this->objectManager->get(OrderInterfaceFactory::class); $this->invoiceFactory = $this->objectManager->get(InvoiceInterfaceFactory::class); $this->invoiceIdentity = $this->objectManager->get(InvoiceIdentity::class); + $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -84,6 +85,10 @@ public function testSend(): void $invoice->setBaseShippingAmount(5); $this->assertEmpty($invoice->getEmailSent()); + + $this->_logger->expects($this->never())->method('error') + ->with('Environment emulation nesting is not allowed.'); + $result = $this->invoiceSender->send($invoice, true); $this->assertTrue($result); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index dd032819c7376..a435036c50cfa 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -38,6 +38,7 @@ protected function setUp(): void parent::setUp(); $this->customerRepository = Bootstrap::getObjectManager() ->get(CustomerRepositoryInterface::class); + $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -54,6 +55,9 @@ public function testSend() $this->assertEmpty($shipment->getEmailSent()); + $this->_logger->expects($this->never())->method('error') + ->with('Environment emulation nesting is not allowed.'); + $orderSender = Bootstrap::getObjectManager() ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); From a7f53c29c3297bed23de98b519f9be85bbf7ef5b Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 16 Nov 2022 19:01:39 +0530 Subject: [PATCH 314/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- app/code/Magento/Test/Model/Source/ProgramSource.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/code/Magento/Test/Model/Source/ProgramSource.php diff --git a/app/code/Magento/Test/Model/Source/ProgramSource.php b/app/code/Magento/Test/Model/Source/ProgramSource.php deleted file mode 100644 index e69de29bb2d1d..0000000000000 From ed31a9a09f14fc1084054ea1ba05fcac10260a95 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 16 Nov 2022 19:49:36 +0530 Subject: [PATCH 315/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Email/Sender/CreditmemoSenderTest.php | 20 ++++++++++++++-- .../Order/Email/Sender/InvoiceSenderTest.php | 24 +++++++++++++++---- .../Order/Email/Sender/ShipmentSenderTest.php | 20 ++++++++++++---- 3 files changed, 53 insertions(+), 11 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 09ac3b8dfae76..0325131b2dc98 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -51,10 +51,26 @@ public function testSend() $this->assertEmpty($creditmemo->getEmailSent()); - $this->_logger->expects($this->never())->method('error') + $this->logger->expects($this->never())->method('error') ->with('Environment emulation nesting is not allowed.'); - $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); + //$creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); + $logger->expects($this->never())->method('error') + ->with('Environment emulation nesting is not allowed.'); + + $appEmulation = Bootstrap::getObjectManager()->create( + \Magento\Store\Model\App\Emulation::class, + [ + 'logger' => $logger, + ] + ); + $creditmemoSender = Bootstrap::getObjectManager()->create( + CreditmemoSender::class, + [ + 'appEmulation' => $appEmulation, + ] + ); $result = $creditmemoSender->send($creditmemo, true); $this->assertTrue($result); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index 2b70b7a736f65..82bc6b47db4f1 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -60,13 +60,30 @@ protected function setUp(): void { parent::setUp(); $this->objectManager = Bootstrap::getObjectManager(); + $this->customerRepository = $this->objectManager->get(CustomerRepositoryInterface::class); - $this->invoiceSender = $this->objectManager->get(InvoiceSender::class); + + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); + $logger->expects($this->never())->method('error') + ->with('Environment emulation nesting is not allowed.'); + + $appEmulation = $this->objectManager->create( + \Magento\Store\Model\App\Emulation::class, + [ + 'logger' => $logger, + ] + ); + $this->invoiceSender = $this->objectManager->create( + InvoiceSender::class, + [ + 'appEmulation' => $appEmulation, + ] + ); + $this->transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class); $this->orderFactory = $this->objectManager->get(OrderInterfaceFactory::class); $this->invoiceFactory = $this->objectManager->get(InvoiceInterfaceFactory::class); $this->invoiceIdentity = $this->objectManager->get(InvoiceIdentity::class); - $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -86,9 +103,6 @@ public function testSend(): void $this->assertEmpty($invoice->getEmailSent()); - $this->_logger->expects($this->never())->method('error') - ->with('Environment emulation nesting is not allowed.'); - $result = $this->invoiceSender->send($invoice, true); $this->assertTrue($result); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index a435036c50cfa..04e6b2ad4449e 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -38,7 +38,6 @@ protected function setUp(): void parent::setUp(); $this->customerRepository = Bootstrap::getObjectManager() ->get(CustomerRepositoryInterface::class); - $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -55,11 +54,24 @@ public function testSend() $this->assertEmpty($shipment->getEmailSent()); - $this->_logger->expects($this->never())->method('error') +// $orderSender = Bootstrap::getObjectManager() +// ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); + $logger->expects($this->never())->method('error') ->with('Environment emulation nesting is not allowed.'); - $orderSender = Bootstrap::getObjectManager() - ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); + $appEmulation = Bootstrap::getObjectManager()->create( + \Magento\Store\Model\App\Emulation::class, + [ + 'logger' => $logger, + ] + ); + $orderSender = Bootstrap::getObjectManager()->create( + \Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class, + [ + 'appEmulation' => $appEmulation, + ] + ); $result = $orderSender->send($shipment, true); $this->assertTrue($result); From e240f08dfdb0cc4059714ad3f502cac884d9fb32 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 16 Nov 2022 19:53:39 +0530 Subject: [PATCH 316/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php | 5 ----- .../Sales/Model/Order/Email/Sender/ShipmentSenderTest.php | 2 -- 2 files changed, 7 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 0325131b2dc98..255ffd2694a73 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -33,7 +33,6 @@ class CreditmemoSenderTest extends TestCase protected function setUp(): void { $this->customerRepository = Bootstrap::getObjectManager()->get(CustomerRepositoryInterface::class); - $this->logger = $this->createMock(\Psr\Log\LoggerInterface::class); } /** @@ -51,10 +50,6 @@ public function testSend() $this->assertEmpty($creditmemo->getEmailSent()); - $this->logger->expects($this->never())->method('error') - ->with('Environment emulation nesting is not allowed.'); - - //$creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); $logger = $this->createMock(\Psr\Log\LoggerInterface::class); $logger->expects($this->never())->method('error') ->with('Environment emulation nesting is not allowed.'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 04e6b2ad4449e..cdfeda79553b0 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -54,8 +54,6 @@ public function testSend() $this->assertEmpty($shipment->getEmailSent()); -// $orderSender = Bootstrap::getObjectManager() -// ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $logger = $this->createMock(\Psr\Log\LoggerInterface::class); $logger->expects($this->never())->method('error') ->with('Environment emulation nesting is not allowed.'); From 2069fe56fc898a77a2bc10c5aad93c6f57c70bd8 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 18 Nov 2022 21:22:18 +0530 Subject: [PATCH 317/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Email/Sender/CreditmemoSenderTest.php | 32 ++++++++-------- .../Order/Email/Sender/InvoiceSenderTest.php | 38 +++++++++---------- .../Order/Email/Sender/ShipmentSenderTest.php | 31 ++++++++------- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 255ffd2694a73..289d6da828b9f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -15,6 +15,7 @@ use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; +use Magento\TestFramework\ErrorLog\Logger; class CreditmemoSenderTest extends TestCase { @@ -27,12 +28,16 @@ class CreditmemoSenderTest extends TestCase */ private $customerRepository; + /** @var Logger */ + private $logger; + /** * @inheritDoc */ protected function setUp(): void { $this->customerRepository = Bootstrap::getObjectManager()->get(CustomerRepositoryInterface::class); + $this->logger = Bootstrap::getObjectManager()->get(Logger::class); } /** @@ -50,23 +55,10 @@ public function testSend() $this->assertEmpty($creditmemo->getEmailSent()); - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); - $logger->expects($this->never())->method('error') - ->with('Environment emulation nesting is not allowed.'); - - $appEmulation = Bootstrap::getObjectManager()->create( - \Magento\Store\Model\App\Emulation::class, - [ - 'logger' => $logger, - ] - ); - $creditmemoSender = Bootstrap::getObjectManager()->create( - CreditmemoSender::class, - [ - 'appEmulation' => $appEmulation, - ] - ); + $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); + $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertTrue($result); $this->assertNotEmpty($creditmemo->getEmailSent()); @@ -91,7 +83,9 @@ public function testSendWhenCustomerEmailWasModified() $craditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($craditmemoIdentity); + $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $craditmemoIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -113,7 +107,9 @@ public function testSendWhenCustomerEmailWasNotModified() $craditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($craditmemoIdentity); + $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $craditmemoIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -135,7 +131,9 @@ public function testSendWithoutCustomer() $creditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($creditmemoIdentity); + $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::ORDER_EMAIL, $creditmemoIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -162,7 +160,9 @@ public function testSendCreditmemeoEmailFromNonDefaultStore() $creditmemo = Bootstrap::getObjectManager()->create(Creditmemo::class); $creditmemo->setOrder($order); $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); + $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo); + $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); $this->assertTrue($creditmemo->getSendEmail()); } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index 82bc6b47db4f1..ca66cb7ac01e5 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -19,6 +19,7 @@ use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; use PHPUnit\Framework\TestCase; +use Magento\TestFramework\ErrorLog\Logger; /** * Checks the sending of order invoice email to the customer. @@ -53,6 +54,9 @@ class InvoiceSenderTest extends TestCase /** @var InvoiceIdentity */ private $invoiceIdentity; + /** @var Logger */ + private $logger; + /** * @inheritdoc */ @@ -60,30 +64,13 @@ protected function setUp(): void { parent::setUp(); $this->objectManager = Bootstrap::getObjectManager(); - $this->customerRepository = $this->objectManager->get(CustomerRepositoryInterface::class); - - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); - $logger->expects($this->never())->method('error') - ->with('Environment emulation nesting is not allowed.'); - - $appEmulation = $this->objectManager->create( - \Magento\Store\Model\App\Emulation::class, - [ - 'logger' => $logger, - ] - ); - $this->invoiceSender = $this->objectManager->create( - InvoiceSender::class, - [ - 'appEmulation' => $appEmulation, - ] - ); - + $this->invoiceSender = $this->objectManager->get(InvoiceSender::class); $this->transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class); $this->orderFactory = $this->objectManager->get(OrderInterfaceFactory::class); $this->invoiceFactory = $this->objectManager->get(InvoiceInterfaceFactory::class); $this->invoiceIdentity = $this->objectManager->get(InvoiceIdentity::class); + $this->logger = $this->objectManager->get(Logger::class); } /** @@ -102,8 +89,9 @@ public function testSend(): void $invoice->setBaseShippingAmount(5); $this->assertEmpty($invoice->getEmailSent()); - + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertTrue($result); $this->assertNotEmpty($invoice->getEmailSent()); @@ -128,7 +116,9 @@ public function testSendWhenCustomerEmailWasModified(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $this->invoiceIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -148,7 +138,9 @@ public function testSendWhenCustomerEmailWasNotModified(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $this->invoiceIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -168,7 +160,9 @@ public function testSendWithoutCustomer(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::ORDER_EMAIL, $this->invoiceIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -187,7 +181,9 @@ public function testSendWithAsyncSendingEnabled(): void $invoice = $order->getInvoiceCollection() ->addAttributeToFilter(InvoiceInterface::ORDER_ID, $order->getID()) ->getFirstItem(); + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice); + $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); $invoice = $order->getInvoiceCollection()->clear()->getFirstItem(); $this->assertEmpty($invoice->getEmailSent()); @@ -214,7 +210,9 @@ public function testSendInvoiceEmailFromNonDefaultStore() $order->loadByIncrementId('100000004'); $order->setCustomerEmail('customer@example.com'); $invoice = $this->createInvoice($order); + $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice); + $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); $this->assertTrue($invoice->getSendEmail()); } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index cdfeda79553b0..2b1e7bea7e04f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -12,6 +12,7 @@ use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Order\ShipmentFactory; use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\ErrorLog\Logger; /** * @magentoAppArea frontend @@ -30,6 +31,9 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase */ private $customerRepository; + /** @var Logger */ + private $logger; + /** * @inheritDoc */ @@ -38,6 +42,7 @@ protected function setUp(): void parent::setUp(); $this->customerRepository = Bootstrap::getObjectManager() ->get(CustomerRepositoryInterface::class); + $this->logger = Bootstrap::getObjectManager()->get(Logger::class); } /** @@ -54,23 +59,11 @@ public function testSend() $this->assertEmpty($shipment->getEmailSent()); - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); - $logger->expects($this->never())->method('error') - ->with('Environment emulation nesting is not allowed.'); - - $appEmulation = Bootstrap::getObjectManager()->create( - \Magento\Store\Model\App\Emulation::class, - [ - 'logger' => $logger, - ] - ); - $orderSender = Bootstrap::getObjectManager()->create( - \Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class, - [ - 'appEmulation' => $appEmulation, - ] - ); + $orderSender = Bootstrap::getObjectManager() + ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); + $this->logger->clearMessages(); $result = $orderSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertTrue($result); @@ -95,7 +88,9 @@ public function testSendWhenCustomerEmailWasModified() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); + $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -116,7 +111,9 @@ public function testSendWhenCustomerEmailWasNotModified() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); + $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -140,7 +137,9 @@ public function testSendWithoutCustomer() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); + $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); From 8e51d7097b309dd123a8a081616da6f5cb077572 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 18 Nov 2022 23:49:48 +0530 Subject: [PATCH 318/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Magento/TestFramework/Application.php | 2 ++ .../Order/Email/Sender/CreditmemoSenderTest.php | 15 +++++++++++++++ .../Order/Email/Sender/InvoiceSenderTest.php | 15 +++++++++++++++ .../Order/Email/Sender/ShipmentSenderTest.php | 13 ------------- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php index 0c6c546149f7d..2f9330a657658 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Application.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php @@ -373,6 +373,8 @@ private function initLogger() ); $objectManager->removeSharedInstance(LoggerInterface::class, true); $objectManager->addSharedInstance($logger, LoggerInterface::class, true); + $objectManager->removeSharedInstance(TestFramework\ErrorLog\Logger::class, true); + $objectManager->addSharedInstance($logger, TestFramework\ErrorLog\Logger::class, true); return $logger; } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 289d6da828b9f..3a9344cc26fd8 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -38,6 +38,11 @@ protected function setUp(): void { $this->customerRepository = Bootstrap::getObjectManager()->get(CustomerRepositoryInterface::class); $this->logger = Bootstrap::getObjectManager()->get(Logger::class); + + $reflection = new \ReflectionClass(get_class($this->logger)); + $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->logger, 400); } /** @@ -197,4 +202,14 @@ private function createCreditMemoSender(CreditmemoIdentity $creditmemoIdentity): ] ); } + + /** + * @inheritdoc + */ + protected function tearDown(): void + { + $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->logger, -1); + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index ca66cb7ac01e5..96170076d8bb3 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -71,6 +71,11 @@ protected function setUp(): void $this->invoiceFactory = $this->objectManager->get(InvoiceInterfaceFactory::class); $this->invoiceIdentity = $this->objectManager->get(InvoiceIdentity::class); $this->logger = $this->objectManager->get(Logger::class); + + $reflection = new \ReflectionClass(get_class($this->logger)); + $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->logger, 400); } /** @@ -242,4 +247,14 @@ private function getOrder(string $incrementId): OrderInterface { return $this->orderFactory->create()->loadByIncrementId($incrementId); } + + /** + * @inheritdoc + */ + protected function tearDown(): void + { + $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->logger, -1); + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 2b1e7bea7e04f..dd032819c7376 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -12,7 +12,6 @@ use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Order\ShipmentFactory; use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\ErrorLog\Logger; /** * @magentoAppArea frontend @@ -31,9 +30,6 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase */ private $customerRepository; - /** @var Logger */ - private $logger; - /** * @inheritDoc */ @@ -42,7 +38,6 @@ protected function setUp(): void parent::setUp(); $this->customerRepository = Bootstrap::getObjectManager() ->get(CustomerRepositoryInterface::class); - $this->logger = Bootstrap::getObjectManager()->get(Logger::class); } /** @@ -61,9 +56,7 @@ public function testSend() $orderSender = Bootstrap::getObjectManager() ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); - $this->logger->clearMessages(); $result = $orderSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); $this->assertTrue($result); @@ -88,9 +81,7 @@ public function testSendWhenCustomerEmailWasModified() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); - $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -111,9 +102,7 @@ public function testSendWhenCustomerEmailWasNotModified() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); - $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -137,9 +126,7 @@ public function testSendWithoutCustomer() $shipmentSender = $this->createShipmentSender($shipmentIdentity); $this->assertEmpty($shipment->getEmailSent()); - $this->logger->clearMessages(); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); From ae0374790f541adb81d22ce8787370f40028171e Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 19 Nov 2022 04:04:34 +0530 Subject: [PATCH 319/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/CreditmemoSenderTest.php | 11 +++++------ .../Model/Order/Email/Sender/InvoiceSenderTest.php | 12 +++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 3a9344cc26fd8..4fdebb8a5cbe5 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -31,6 +31,8 @@ class CreditmemoSenderTest extends TestCase /** @var Logger */ private $logger; + private $minErrorDefaultValue; + /** * @inheritDoc */ @@ -42,7 +44,9 @@ protected function setUp(): void $reflection = new \ReflectionClass(get_class($this->logger)); $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); $reflectionProperty->setAccessible(true); + $this->minErrorDefaultValue = $reflectionProperty->getValue($this->logger); $reflectionProperty->setValue($this->logger, 400); + $this->logger->clearMessages(); } /** @@ -61,7 +65,6 @@ public function testSend() $this->assertEmpty($creditmemo->getEmailSent()); $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); - $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); $this->assertEmpty($this->logger->getMessages()); @@ -88,7 +91,6 @@ public function testSendWhenCustomerEmailWasModified() $craditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($craditmemoIdentity); - $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); $this->assertEmpty($this->logger->getMessages()); @@ -112,7 +114,6 @@ public function testSendWhenCustomerEmailWasNotModified() $craditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($craditmemoIdentity); - $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); $this->assertEmpty($this->logger->getMessages()); @@ -136,7 +137,6 @@ public function testSendWithoutCustomer() $creditmemoIdentity = $this->createCreditMemoIdentity(); $creditmemoSender = $this->createCreditMemoSender($creditmemoIdentity); - $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo, true); $this->assertEmpty($this->logger->getMessages()); @@ -165,7 +165,6 @@ public function testSendCreditmemeoEmailFromNonDefaultStore() $creditmemo = Bootstrap::getObjectManager()->create(Creditmemo::class); $creditmemo->setOrder($order); $creditmemoSender = Bootstrap::getObjectManager()->create(CreditmemoSender::class); - $this->logger->clearMessages(); $result = $creditmemoSender->send($creditmemo); $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); @@ -210,6 +209,6 @@ protected function tearDown(): void { $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->logger, -1); + $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index 96170076d8bb3..b8759dc165f6c 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -57,6 +57,8 @@ class InvoiceSenderTest extends TestCase /** @var Logger */ private $logger; + private $minErrorDefaultValue; + /** * @inheritdoc */ @@ -75,7 +77,9 @@ protected function setUp(): void $reflection = new \ReflectionClass(get_class($this->logger)); $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); $reflectionProperty->setAccessible(true); + $this->minErrorDefaultValue = $reflectionProperty->getValue($this->logger); $reflectionProperty->setValue($this->logger, 400); + $this->logger->clearMessages(); } /** @@ -94,7 +98,6 @@ public function testSend(): void $invoice->setBaseShippingAmount(5); $this->assertEmpty($invoice->getEmailSent()); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); $this->assertEmpty($this->logger->getMessages()); @@ -121,7 +124,6 @@ public function testSendWhenCustomerEmailWasModified(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); $this->assertEmpty($this->logger->getMessages()); @@ -143,7 +145,6 @@ public function testSendWhenCustomerEmailWasNotModified(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); $this->assertEmpty($this->logger->getMessages()); @@ -165,7 +166,6 @@ public function testSendWithoutCustomer(): void $invoice = $this->createInvoice($order); $this->assertEmpty($invoice->getEmailSent()); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice, true); $this->assertEmpty($this->logger->getMessages()); @@ -186,7 +186,6 @@ public function testSendWithAsyncSendingEnabled(): void $invoice = $order->getInvoiceCollection() ->addAttributeToFilter(InvoiceInterface::ORDER_ID, $order->getID()) ->getFirstItem(); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice); $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); @@ -215,7 +214,6 @@ public function testSendInvoiceEmailFromNonDefaultStore() $order->loadByIncrementId('100000004'); $order->setCustomerEmail('customer@example.com'); $invoice = $this->createInvoice($order); - $this->logger->clearMessages(); $result = $this->invoiceSender->send($invoice); $this->assertEmpty($this->logger->getMessages()); $this->assertFalse($result); @@ -255,6 +253,6 @@ protected function tearDown(): void { $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->logger, -1); + $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); } } From ddb1fb370d1cf9b1867f50015877ee96727abd6d Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 19 Nov 2022 05:02:31 +0530 Subject: [PATCH 320/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php | 1 + .../Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php index 4fdebb8a5cbe5..244306bc5c5af 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php @@ -31,6 +31,7 @@ class CreditmemoSenderTest extends TestCase /** @var Logger */ private $logger; + /** @var int */ private $minErrorDefaultValue; /** diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php index b8759dc165f6c..d087c31c1c267 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php @@ -57,6 +57,7 @@ class InvoiceSenderTest extends TestCase /** @var Logger */ private $logger; + /** @var int */ private $minErrorDefaultValue; /** From 3e7035ae6f64dbbbbc53f2484d829e6949ae898f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 19:54:01 +0530 Subject: [PATCH 321/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Model/Order/Email/Sender/ShipmentSenderTest.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index dd032819c7376..268ebcbdd5ed0 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -12,6 +12,8 @@ use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Order\ShipmentFactory; use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\App\State; +use Magento\TestFramework\ErrorLog\Logger; /** * @magentoAppArea frontend @@ -54,10 +56,17 @@ public function testSend() $this->assertEmpty($shipment->getEmailSent()); - $orderSender = Bootstrap::getObjectManager() + $objectManager = Bootstrap::getObjectManager(); + $logger = $objectManager->get(Logger::class); + $reflection = new \ReflectionClass(get_class($logger)); + $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($logger, 400); + $logger->clearMessages(); + $orderSender = $objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); + $objectManager->get(\Magento\Framework\App\State::class)->setMode(State::MODE_PRODUCTION); $result = $orderSender->send($shipment, true); - $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); From ba4bc005e6a36d03bb1f5e62af7dac7ff5e27286 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 19:58:16 +0530 Subject: [PATCH 322/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Sales/Model/Order/Email/Sender/ShipmentSenderTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 268ebcbdd5ed0..cb12b3f919959 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -67,6 +67,7 @@ public function testSend() ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $objectManager->get(\Magento\Framework\App\State::class)->setMode(State::MODE_PRODUCTION); $result = $orderSender->send($shipment, true); + $this->assertEmpty($logger->getMessages()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); From ac725c0441099f65470db2cfc3844a544be86b83 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 20:18:44 +0530 Subject: [PATCH 323/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 61 +++++++++++++------ 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index cb12b3f919959..4cea1342581ef 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -27,6 +27,15 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase private const OLD_CUSTOMER_EMAIL = 'customer@example.com'; private const ORDER_EMAIL = 'customer@example.com'; + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Logger */ + private $logger; + + /** @var int */ + private $minErrorDefaultValue; + /** * @var CustomerRepository */ @@ -38,7 +47,17 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase protected function setUp(): void { parent::setUp(); - $this->customerRepository = Bootstrap::getObjectManager() + + $this->objectManager = Bootstrap::getObjectManager(); + $this->objectManager->get(\Magento\Framework\App\State::class)->setMode(State::MODE_PRODUCTION); + $this->logger = $this->objectManager->get(Logger::class); + $reflection = new \ReflectionClass(get_class($this->logger)); + $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $this->minErrorDefaultValue = $reflectionProperty->getValue($this->logger); + $reflectionProperty->setValue($this->logger, 400); + $this->logger->clearMessages(); + $this->customerRepository = $this->objectManager ->get(CustomerRepositoryInterface::class); } @@ -47,27 +66,19 @@ protected function setUp(): void */ public function testSend() { - Bootstrap::getObjectManager()->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); - $order = Bootstrap::getObjectManager()->create(\Magento\Sales\Model\Order::class); + $this->objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); - $shipment = Bootstrap::getObjectManager()->get(ShipmentFactory::class)->create($order); + $shipment = $this->objectManager->get(ShipmentFactory::class)->create($order); $this->assertEmpty($shipment->getEmailSent()); - $objectManager = Bootstrap::getObjectManager(); - $logger = $objectManager->get(Logger::class); - $reflection = new \ReflectionClass(get_class($logger)); - $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($logger, 400); - $logger->clearMessages(); - $orderSender = $objectManager + $orderSender = $this->objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); - $objectManager->get(\Magento\Framework\App\State::class)->setMode(State::MODE_PRODUCTION); $result = $orderSender->send($shipment, true); - $this->assertEmpty($logger->getMessages()); + $this->assertEmpty($this->logger->getMessages()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -93,6 +104,7 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -114,6 +126,7 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -138,6 +151,7 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); + $this->assertEmpty($this->logger->getMessages()); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -150,9 +164,8 @@ public function testSendWithoutCustomer() */ public function testPackages() { - $objectManager = Bootstrap::getObjectManager(); - $objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); - $order = $objectManager->create(\Magento\Sales\Model\Order::class); + $this->objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); $items = []; @@ -160,7 +173,7 @@ public function testPackages() $items[$item->getId()] = $item->getQtyOrdered(); } /** @var \Magento\Sales\Model\Order\Shipment $shipment */ - $shipment = $objectManager->get(ShipmentFactory::class)->create($order, $items); + $shipment = $this->objectManager->get(ShipmentFactory::class)->create($order, $items); $packages = [['1'], ['2']]; $shipment->setPackages($packages); $this->assertEquals($packages, $shipment->getPackages()); @@ -172,7 +185,7 @@ public function testPackages() private function createShipment(Order $order): Shipment { - $shipment = Bootstrap::getObjectManager()->create( + $shipment = $this->objectManager->create( Shipment::class ); $shipment->setOrder($order); @@ -206,4 +219,14 @@ private function createShipmentSender(ShipmentIdentity $shipmentIdentity): Shipm ] ); } + + /** + * @inheritdoc + */ + protected function tearDown(): void + { + $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); + } } From e939dc80a518ba0da550694889e327ce72de529d Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 20:35:29 +0530 Subject: [PATCH 324/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Model/Order/Email/Sender/ShipmentSenderTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 4cea1342581ef..5fdb03af0c277 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -36,6 +36,9 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase /** @var int */ private $minErrorDefaultValue; + /** @var string */ + private $defaultMode; + /** * @var CustomerRepository */ @@ -49,7 +52,9 @@ protected function setUp(): void parent::setUp(); $this->objectManager = Bootstrap::getObjectManager(); - $this->objectManager->get(\Magento\Framework\App\State::class)->setMode(State::MODE_PRODUCTION); + $stateObject = $this->objectManager->get(\Magento\Framework\App\State::class); + $this->defaultMode = $stateObject->getMode(); + $stateObject->setMode(State::MODE_DEFAULT); $this->logger = $this->objectManager->get(Logger::class); $reflection = new \ReflectionClass(get_class($this->logger)); $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); @@ -228,5 +233,8 @@ protected function tearDown(): void $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); + + $stateObject = $this->objectManager->get(\Magento\Framework\App\State::class); + $stateObject->setMode($this->defaultMode); } } From 3e536eed66a429aecfa19c46510bf0d5ae9d96cd Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 20:43:31 +0530 Subject: [PATCH 325/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Model/Order/Email/Sender/ShipmentSenderTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 5fdb03af0c277..77a9db5814a6f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -30,6 +30,9 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase /** @var ObjectManagerInterface */ private $objectManager; + /** @var State */ + private $state; + /** @var Logger */ private $logger; @@ -52,9 +55,9 @@ protected function setUp(): void parent::setUp(); $this->objectManager = Bootstrap::getObjectManager(); - $stateObject = $this->objectManager->get(\Magento\Framework\App\State::class); - $this->defaultMode = $stateObject->getMode(); - $stateObject->setMode(State::MODE_DEFAULT); + $this->state = $this->objectManager->get(\Magento\Framework\App\State::class); + $this->defaultMode = $this->state->getMode(); + $this->state->setMode(State::MODE_DEFAULT); $this->logger = $this->objectManager->get(Logger::class); $reflection = new \ReflectionClass(get_class($this->logger)); $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); @@ -234,7 +237,6 @@ protected function tearDown(): void $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); - $stateObject = $this->objectManager->get(\Magento\Framework\App\State::class); - $stateObject->setMode($this->defaultMode); + $this->state->setMode($this->defaultMode); } } From 488157bcdb65d20b1345d3006336cd85c488a132 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 21 Nov 2022 21:57:25 +0530 Subject: [PATCH 326/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Sales/Model/Order/Email/Sender/ShipmentSenderTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 77a9db5814a6f..09286377d4710 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -20,6 +20,7 @@ * * @deprecated since ShipmentSender is deprecated * @see \Magento\Sales\Model\Order\Email\Sender\ShipmentSender + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase { From 397cd2294b7f36db1da62d0587f129c85825d854 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 14:04:09 +0530 Subject: [PATCH 327/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 09286377d4710..018d8155c3d6f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -31,18 +31,12 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase /** @var ObjectManagerInterface */ private $objectManager; - /** @var State */ - private $state; - /** @var Logger */ private $logger; /** @var int */ private $minErrorDefaultValue; - /** @var string */ - private $defaultMode; - /** * @var CustomerRepository */ @@ -56,9 +50,6 @@ protected function setUp(): void parent::setUp(); $this->objectManager = Bootstrap::getObjectManager(); - $this->state = $this->objectManager->get(\Magento\Framework\App\State::class); - $this->defaultMode = $this->state->getMode(); - $this->state->setMode(State::MODE_DEFAULT); $this->logger = $this->objectManager->get(Logger::class); $reflection = new \ReflectionClass(get_class($this->logger)); $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); @@ -75,7 +66,7 @@ protected function setUp(): void */ public function testSend() { - $this->objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $this->objectManager->get(State::class)->setAreaCode('frontend'); $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); @@ -87,7 +78,11 @@ public function testSend() $orderSender = $this->objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); + $this->assertFalse( + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + )); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -113,7 +108,11 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); + $this->assertFalse( + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + )); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -135,7 +134,11 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); + $this->assertFalse( + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + )); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -160,7 +163,11 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertEmpty($this->logger->getMessages()); + $this->assertFalse( + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + )); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -173,7 +180,7 @@ public function testSendWithoutCustomer() */ public function testPackages() { - $this->objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $this->objectManager->get(State::class)->setAreaCode('frontend'); $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); @@ -237,7 +244,5 @@ protected function tearDown(): void $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); - - $this->state->setMode($this->defaultMode); } } From 54cfa977e5f912a82223090c0533754d487f06ff Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 14:53:46 +0530 Subject: [PATCH 328/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 018d8155c3d6f..c227317ebc906 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -78,11 +78,8 @@ public function testSend() $orderSender = $this->objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - )); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message'))); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -108,11 +105,8 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - )); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -134,11 +128,8 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - )); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -163,11 +154,8 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - )); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); From 6919798befe15453da80c6214f61fecd61750911 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 15:40:24 +0530 Subject: [PATCH 329/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Model/Order/Email/Sender/ShipmentSenderTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index c227317ebc906..949cc8f11b7a7 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -78,8 +78,7 @@ public function testSend() $orderSender = $this->objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -105,8 +104,7 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -128,8 +126,7 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -154,8 +151,7 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); From c137072e98b3704739f66c57bd4bf9e88de46265 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 15:42:39 +0530 Subject: [PATCH 330/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 949cc8f11b7a7..5a7da0e3f6bdb 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -78,7 +78,9 @@ public function testSend() $orderSender = $this->objectManager ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse( + array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + ); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -104,7 +106,9 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse( + array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + ); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -126,7 +130,9 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse( + array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + ); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -151,7 +157,9 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse(array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message'))); + $this->assertFalse( + array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + ); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); From 9610d5299e4cf1f66cad7c573f0f027a3c6f5623 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 17:24:03 +0530 Subject: [PATCH 331/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Sales/Model/Order/Email/Sender/ShipmentSenderTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 5a7da0e3f6bdb..5a3dc04b78d6f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -158,7 +158,8 @@ public function testSendWithoutCustomer() $result = $shipmentSender->send($shipment, true); $this->assertFalse( - array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + array_search('Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message')) ); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); From 1b24eadd6590434d153c4316a5b2f1bb486c9165 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 1 Dec 2022 17:28:12 +0530 Subject: [PATCH 332/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index 5a3dc04b78d6f..cbac197f72139 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -79,7 +79,10 @@ public function testSend() ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); $this->assertFalse( - array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + ) ); $this->assertTrue($result); @@ -107,7 +110,10 @@ public function testSendWhenCustomerEmailWasModified() $result = $shipmentSender->send($shipment, true); $this->assertFalse( - array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + ) ); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -131,7 +137,10 @@ public function testSendWhenCustomerEmailWasNotModified() $result = $shipmentSender->send($shipment, true); $this->assertFalse( - array_search('Environment emulation nesting is not allowed.', array_column($this->logger->getMessages(), 'message')) + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + ) ); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); @@ -158,8 +167,10 @@ public function testSendWithoutCustomer() $result = $shipmentSender->send($shipment, true); $this->assertFalse( - array_search('Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message')) + array_search( + 'Environment emulation nesting is not allowed.', + array_column($this->logger->getMessages(), 'message') + ) ); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); From 9394609cc521546535e75a8d2b184dbb921cf33a Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 5 Dec 2022 11:27:13 +0530 Subject: [PATCH 333/985] ACP2E-1341: [On-Premise] Merchant Informed Core Issue Magento 2.4.4 main.ERROR: Environment emulation nesting is not allowed --- .../Order/Email/Sender/ShipmentSenderTest.php | 75 +++---------------- 1 file changed, 11 insertions(+), 64 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php index cbac197f72139..dd032819c7376 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php @@ -12,15 +12,12 @@ use Magento\Sales\Model\Order\Shipment; use Magento\Sales\Model\Order\ShipmentFactory; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Framework\App\State; -use Magento\TestFramework\ErrorLog\Logger; /** * @magentoAppArea frontend * * @deprecated since ShipmentSender is deprecated * @see \Magento\Sales\Model\Order\Email\Sender\ShipmentSender - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase { @@ -28,15 +25,6 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase private const OLD_CUSTOMER_EMAIL = 'customer@example.com'; private const ORDER_EMAIL = 'customer@example.com'; - /** @var ObjectManagerInterface */ - private $objectManager; - - /** @var Logger */ - private $logger; - - /** @var int */ - private $minErrorDefaultValue; - /** * @var CustomerRepository */ @@ -48,16 +36,7 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase protected function setUp(): void { parent::setUp(); - - $this->objectManager = Bootstrap::getObjectManager(); - $this->logger = $this->objectManager->get(Logger::class); - $reflection = new \ReflectionClass(get_class($this->logger)); - $reflectionProperty = $reflection->getProperty('minimumErrorLevel'); - $reflectionProperty->setAccessible(true); - $this->minErrorDefaultValue = $reflectionProperty->getValue($this->logger); - $reflectionProperty->setValue($this->logger, 400); - $this->logger->clearMessages(); - $this->customerRepository = $this->objectManager + $this->customerRepository = Bootstrap::getObjectManager() ->get(CustomerRepositoryInterface::class); } @@ -66,24 +45,19 @@ protected function setUp(): void */ public function testSend() { - $this->objectManager->get(State::class)->setAreaCode('frontend'); - $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); + Bootstrap::getObjectManager()->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $order = Bootstrap::getObjectManager()->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); - $shipment = $this->objectManager->get(ShipmentFactory::class)->create($order); + $shipment = Bootstrap::getObjectManager()->get(ShipmentFactory::class)->create($order); $this->assertEmpty($shipment->getEmailSent()); - $orderSender = $this->objectManager + $orderSender = Bootstrap::getObjectManager() ->create(\Magento\Sales\Model\Order\Email\Sender\ShipmentSender::class); $result = $orderSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - ) - ); + $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -109,12 +83,6 @@ public function testSendWhenCustomerEmailWasModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - ) - ); $this->assertEquals(self::NEW_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -136,12 +104,6 @@ public function testSendWhenCustomerEmailWasNotModified() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - ) - ); $this->assertEquals(self::OLD_CUSTOMER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -166,12 +128,6 @@ public function testSendWithoutCustomer() $this->assertEmpty($shipment->getEmailSent()); $result = $shipmentSender->send($shipment, true); - $this->assertFalse( - array_search( - 'Environment emulation nesting is not allowed.', - array_column($this->logger->getMessages(), 'message') - ) - ); $this->assertEquals(self::ORDER_EMAIL, $shipmentIdentity->getCustomerEmail()); $this->assertTrue($result); $this->assertNotEmpty($shipment->getEmailSent()); @@ -184,8 +140,9 @@ public function testSendWithoutCustomer() */ public function testPackages() { - $this->objectManager->get(State::class)->setAreaCode('frontend'); - $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); + $objectManager = Bootstrap::getObjectManager(); + $objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend'); + $order = $objectManager->create(\Magento\Sales\Model\Order::class); $order->loadByIncrementId('100000001'); $order->setCustomerEmail('customer@example.com'); $items = []; @@ -193,7 +150,7 @@ public function testPackages() $items[$item->getId()] = $item->getQtyOrdered(); } /** @var \Magento\Sales\Model\Order\Shipment $shipment */ - $shipment = $this->objectManager->get(ShipmentFactory::class)->create($order, $items); + $shipment = $objectManager->get(ShipmentFactory::class)->create($order, $items); $packages = [['1'], ['2']]; $shipment->setPackages($packages); $this->assertEquals($packages, $shipment->getPackages()); @@ -205,7 +162,7 @@ public function testPackages() private function createShipment(Order $order): Shipment { - $shipment = $this->objectManager->create( + $shipment = Bootstrap::getObjectManager()->create( Shipment::class ); $shipment->setOrder($order); @@ -239,14 +196,4 @@ private function createShipmentSender(ShipmentIdentity $shipmentIdentity): Shipm ] ); } - - /** - * @inheritdoc - */ - protected function tearDown(): void - { - $reflectionProperty = new \ReflectionProperty(get_class($this->logger), 'minimumErrorLevel'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->logger, $this->minErrorDefaultValue); - } } From 220d951877b62ffc947068a897082eabcfb86843 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 18 Nov 2022 14:15:03 +0530 Subject: [PATCH 334/985] ACP2E-1239: Shifting of the PDP main image - Fixed the issue. --- lib/web/mage/gallery/gallery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/gallery/gallery.js b/lib/web/mage/gallery/gallery.js index d793d3e9c921d..cb950e4180d48 100644 --- a/lib/web/mage/gallery/gallery.js +++ b/lib/web/mage/gallery/gallery.js @@ -132,7 +132,7 @@ define([ data: _.clone(config.data) }; config.options.ratio = config.options.width / config.options.height; - config.options.height = null; + config.options.height = $(element).height(); $.extend(true, this.startConfig, config); From fca90249192103a2f7b76c7e05254feecca308db Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 21 Nov 2022 15:31:01 +0530 Subject: [PATCH 335/985] ACP2E-1239: Shifting of the PDP main image - Fixed the issue. --- .../Catalog/Block/Product/View/GalleryOptions.php | 10 ++++++++++ lib/web/mage/gallery/gallery.js | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php b/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php index 0384c9cd9acce..d2e4745aa79f5 100644 --- a/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php +++ b/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php @@ -105,6 +105,11 @@ public function getOptionsJson() $optionItems['thumbmargin'] = (int)$this->escapeHtml($this->getVar("gallery/thumbmargin")); } + if ($this->getVar("product_image_white_borders")) { + $optionItems['whiteBorders'] = + (int)$this->escapeHtml($this->getVar("product_image_white_borders")); + } + return $this->jsonSerializer->serialize($optionItems); } @@ -151,6 +156,11 @@ public function getFSOptionsJson() (int)$this->escapeHtml($this->getVar("gallery/fullscreen/thumbmargin")); } + if ($this->getVar("product_image_white_borders")) { + $fsOptionItems['whiteBorders'] = + (int)$this->escapeHtml($this->getVar("product_image_white_borders")); + } + return $this->jsonSerializer->serialize($fsOptionItems); } } diff --git a/lib/web/mage/gallery/gallery.js b/lib/web/mage/gallery/gallery.js index cb950e4180d48..64a02f9f4b639 100644 --- a/lib/web/mage/gallery/gallery.js +++ b/lib/web/mage/gallery/gallery.js @@ -115,6 +115,8 @@ define([ config.options.thumbwidth = _toNumber(config.options.thumbwidth); config.options.thumbheight = _toNumber(config.options.thumbheight); + config.options.whiteBorders = _toNumber(config.options.whiteBorders); + config.options.swipe = true; this.config = config; @@ -132,7 +134,10 @@ define([ data: _.clone(config.data) }; config.options.ratio = config.options.width / config.options.height; - config.options.height = $(element).height(); + config.options.height = null; + if (!config.options.whiteBorders) { + config.options.height = $(element).height(); + } $.extend(true, this.startConfig, config); From f05364e4d5547f6c12fb3dc9b800c470d0041630 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 21 Nov 2022 17:50:41 +0530 Subject: [PATCH 336/985] ACP2E-1239: Shifting of the PDP main image - Added the test coverage. --- .../Test/Unit/Block/Product/View/GalleryOptionsTest.php | 6 +++++- dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryOptionsTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryOptionsTest.php index f4258f16bc775..c7036b9f22d69 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryOptionsTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryOptionsTest.php @@ -108,6 +108,7 @@ public function testGetOptionsJson() ['Magento_Catalog', 'gallery/thumbmargin', '5'], ['Magento_Catalog', 'gallery/transition/effect', 'slide'], ['Magento_Catalog', 'gallery/transition/duration', '500'], + ['Magento_Catalog', 'product_image_white_borders', '1'], ]; $imageAttributesMap = [ @@ -144,6 +145,7 @@ public function testGetOptionsJson() $this->assertSame(200, $decodedJson['width']); $this->assertSame(300, $decodedJson['thumbheight']); $this->assertSame(400, $decodedJson['thumbwidth']); + $this->assertSame(1, $decodedJson['whiteBorders']); } public function testGetFSOptionsJson() @@ -159,7 +161,8 @@ public function testGetFSOptionsJson() ['Magento_Catalog', 'gallery/fullscreen/navtype', 'thumbs'], ['Magento_Catalog', 'gallery/fullscreen/thumbmargin', '10'], ['Magento_Catalog', 'gallery/fullscreen/transition/effect', 'dissolve'], - ['Magento_Catalog', 'gallery/fullscreen/transition/duration', '300'] + ['Magento_Catalog', 'gallery/fullscreen/transition/duration', '300'], + ['Magento_Catalog', 'product_image_white_borders', '1'], ]; $this->configView->expects($this->any()) @@ -183,6 +186,7 @@ public function testGetFSOptionsJson() $this->assertSame('thumbs', $decodedJson['navtype']); $this->assertSame('dissolve', $decodedJson['transition']); $this->assertSame(300, $decodedJson['transitionduration']); + $this->assertSame(1, $decodedJson['whiteBorders']); } public function testGetOptionsJsonOptionals() diff --git a/dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js b/dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js index 5db506b00a883..81709c949deee 100644 --- a/dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js +++ b/dev/tests/js/jasmine/tests/lib/mage/gallery/gallery.test.js @@ -33,7 +33,8 @@ define([ thumbwidth: 88, transition: 'slide', transitionduration: 500, - width: 700 + width: 700, + whiteBorders: 0 }, fullscreen: { arrows: true, @@ -99,6 +100,7 @@ define([ expect(gallery.settings.data).toBeDefined(); expect(gallery.settings.api).toBeDefined(); expect(gallery.settings.activeBreakpoint).toEqual({}); + expect(gallery.config.options.height).toEqual(element.height()); $.fn.data = originSpy; }); From 088c0b5d16343602ed031b49fa4110980404df4f Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Thu, 8 Dec 2022 14:41:36 +0530 Subject: [PATCH 337/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the issue. --- .../Model/Mailing/AlertProcessor.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php index 83ac4abd896c1..0faae87b688d3 100644 --- a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php +++ b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php @@ -7,6 +7,7 @@ namespace Magento\ProductAlert\Model\Mailing; +use Magento\Framework\App\Area; use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Helper\Data; @@ -24,6 +25,8 @@ use Magento\Store\Api\Data\WebsiteInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Model\Website; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\View\DesignInterface; /** * Class for mailing Product Alerts @@ -78,6 +81,11 @@ class AlertProcessor */ private $errorEmailSender; + /** + * @var DesignInterface + */ + private $design; + /** * @param EmailFactory $emailFactory * @param PriceCollectionFactory $priceCollectionFactory @@ -88,6 +96,7 @@ class AlertProcessor * @param ProductSalability $productSalability * @param StoreManagerInterface $storeManager * @param ErrorEmailSender $errorEmailSender + * @param DesignInterface|null $design */ public function __construct( EmailFactory $emailFactory, @@ -98,7 +107,8 @@ public function __construct( Data $catalogData, ProductSalability $productSalability, StoreManagerInterface $storeManager, - ErrorEmailSender $errorEmailSender + ErrorEmailSender $errorEmailSender, + DesignInterface $design = null ) { $this->emailFactory = $emailFactory; $this->priceCollectionFactory = $priceCollectionFactory; @@ -109,6 +119,8 @@ public function __construct( $this->productSalability = $productSalability; $this->storeManager = $storeManager; $this->errorEmailSender = $errorEmailSender; + $this->design = $design ?: ObjectManager::getInstance() + ->get(DesignInterface::class); } /** @@ -142,6 +154,12 @@ public function process(string $alertType, array $customerIds, int $websiteId): */ private function processAlerts(string $alertType, array $customerIds, int $websiteId): array { + //Set the current design theme + $this->design->setDesignTheme( + $this->design->getConfigurationDesignTheme(Area::AREA_FRONTEND), + Area::AREA_FRONTEND + ); + /** @var Email $email */ $email = $this->emailFactory->create(); $email->setType($alertType); From 7bb1b21b7162c90f2ca5c7d1a3947a92aa1b5adf Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 9 Dec 2022 10:49:09 +0530 Subject: [PATCH 338/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the static test failure. --- app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php index 0faae87b688d3..294f92bb0d9ce 100644 --- a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php +++ b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php @@ -30,6 +30,8 @@ /** * Class for mailing Product Alerts + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AlertProcessor { From 005a62b4a756071507491ad6b7138d14555f2eea Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 9 Dec 2022 16:16:50 +0530 Subject: [PATCH 339/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the static test failure. --- app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php index 294f92bb0d9ce..4a19a8d52c61b 100644 --- a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php +++ b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php @@ -99,6 +99,7 @@ class AlertProcessor * @param StoreManagerInterface $storeManager * @param ErrorEmailSender $errorEmailSender * @param DesignInterface|null $design + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function __construct( EmailFactory $emailFactory, From c2e677973077266b53677118da8499bbb682f0a9 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 13 Dec 2022 13:15:36 +0530 Subject: [PATCH 340/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Added the test coverage and fixed the static test failure. --- .../Model/Mailing/AlertProcessor.php | 3 +- .../Model/Mailing/AlertProcessorTest.php | 50 ++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php index 4a19a8d52c61b..105fb6ac37287 100644 --- a/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php +++ b/app/code/Magento/ProductAlert/Model/Mailing/AlertProcessor.php @@ -31,7 +31,9 @@ /** * Class for mailing Product Alerts * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ class AlertProcessor { @@ -99,7 +101,6 @@ class AlertProcessor * @param StoreManagerInterface $storeManager * @param ErrorEmailSender $errorEmailSender * @param DesignInterface|null $design - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function __construct( EmailFactory $emailFactory, diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index bde9bbd9b4d2d..3210add284aa9 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -9,13 +9,15 @@ use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Model\Session; -use Magento\Framework\App\Area; use Magento\Framework\Locale\Resolver; +use Magento\Framework\Mail\EmailMessage; use Magento\Framework\Module\Dir\Reader; use Magento\Framework\Phrase; use Magento\Framework\Phrase\Renderer\Translate as PhraseRendererTranslate; use Magento\Framework\Phrase\RendererInterface; use Magento\Framework\Translate; +use Magento\Framework\View\Design\ThemeInterface; +use Magento\Framework\View\DesignInterface; use Magento\Store\Model\StoreRepository; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; @@ -50,6 +52,11 @@ class AlertProcessorTest extends TestCase */ private $transportBuilder; + /** + * @var DesignInterface + */ + private $design; + /** * @inheritDoc */ @@ -64,6 +71,7 @@ protected function setUp(): void $customer = $service->authenticate('customer@example.com', 'password'); $customerSession = $this->objectManager->get(Session::class); $customerSession->setCustomerDataAsLoggedIn($customer); + $this->design = $this->objectManager->get(DesignInterface::class); } /** @@ -139,4 +147,44 @@ private function processAlerts(): void $this->publisher->execute($alertType, [$customerId], $websiteId); $this->alertProcessor->process($alertType, [$customerId], $websiteId); } + + /** + * Validate the current theme + * + * @magentoConfigFixture current_store catalog/productalert/allow_price 1 + * @magentoDataFixture Magento/ProductAlert/_files/product_alert.php + */ + public function testValidateCurrentTheme() + { + $this->design->setDesignTheme( + $this->objectManager->get(ThemeInterface::class) + ); + + $this->processAlerts(); + + $message = $this->transportBuilder->getSentMessage(); + $messageContent = $this->getMessageRawContent($message); + $emailDom = new \DOMDocument(); + $emailDom->loadHTML($messageContent); + + $emailXpath = new \DOMXPath($emailDom); + $greeting = $emailXpath->query('//img[@class="photo image"]'); + $this->assertStringContainsString( + 'thumbnail.jpg', + $greeting->item(0)->getAttribute('src') + ); + $this->assertEquals('Magento/luma', $this->design->getDesignTheme()->getCode()); + } + + /** + * Returns raw content of provided message + * + * @param EmailMessage $message + * @return string + */ + private function getMessageRawContent(EmailMessage $message): string + { + $emailParts = $message->getBody()->getParts(); + return current($emailParts)->getRawContent(); + } } From 6c1d6eac9d1b8a8750701e4a73e9ac51032e9610 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 13 Dec 2022 14:42:27 +0530 Subject: [PATCH 341/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the static test failure and PAT. --- .../ProductAlert/Model/Mailing/AlertProcessorTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index 3210add284aa9..a558d3c0927b4 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -25,10 +25,10 @@ use PHPUnit\Framework\TestCase; /** -* Test for Product Alert observer -* -* @magentoAppIsolation enabled -* @magentoAppArea frontend + * Test for Product Alert observer + * + * @magentoAppIsolation enabled + * @magentoAppArea frontend */ class AlertProcessorTest extends TestCase { From a268cea2df5be0c06960cd68ff5b02fcc36c1b08 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 13 Dec 2022 15:31:01 +0530 Subject: [PATCH 342/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the static test failure. --- .../Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index a558d3c0927b4..1a1da28cf4ed6 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -29,7 +29,7 @@ * * @magentoAppIsolation enabled * @magentoAppArea frontend -*/ + */ class AlertProcessorTest extends TestCase { /** From 195efadcc230e9915644548faf8e2e0d2ba73948 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 13 Dec 2022 17:44:38 +0530 Subject: [PATCH 343/985] ACP2E-1419: [Magento Cloud] - Error image in phtml for back to stock email - Fixed the static test failure. --- .../Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index 1a1da28cf4ed6..25bdf4d0ce47d 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -29,6 +29,7 @@ * * @magentoAppIsolation enabled * @magentoAppArea frontend + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AlertProcessorTest extends TestCase { From 3d17a127ab1cbc9beef3ec4ddc9b413d19f31dda Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 9 Nov 2022 17:01:52 +0530 Subject: [PATCH 344/985] ACP2E-1197: Order grid date filter issue in customer edit section --- .../Order/OrderGridCollectionFilter.php | 30 +++++++++++++++++-- .../Order/OrderGridCollectionFilterTest.php | 6 ++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php index 995bb83351633..cd8a6971233a6 100644 --- a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php +++ b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php @@ -6,6 +6,8 @@ namespace Magento\Sales\Plugin\Model\ResourceModel\Order; +use DateTime; +use DateTimeInterface; use Magento\Framework\DB\Select; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult; @@ -44,11 +46,16 @@ public function aroundAddFieldToFilter( $field, $condition = null ) { - if ($field === 'created_at' || $field === 'order_created_at') { if (is_array($condition)) { foreach ($condition as $key => $value) { - $condition[$key] = $this->timeZone->convertConfigTimeToUtc($value); + if ($value instanceof DateTimeInterface + && $value->getTimezone()->getName() !== $this->timeZone->getConfigTimezone()) { + $value->setTimezone(new \DateTimeZone($this->timeZone->getConfigTimezone())); + } + if ($this->isValidDate($value)) { + $condition[$key] = $this->timeZone->convertConfigTimeToUtc($value); + } } } @@ -61,4 +68,23 @@ public function aroundAddFieldToFilter( return $proceed($field, $condition); } + + /** + * Validate date string + * + * @param string|DateTimeInterface $datetime + * @return bool + */ + private function isValidDate($datetime): bool + { + try { + $dt = is_string($datetime) ? new DateTime($datetime) : $datetime; + if ($dt instanceof DateTimeInterface) { + return true; + } + } catch (\Exception $e) { + return false; + } + return false; + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php index 5c7aa99a2e91a..a7e49dc219306 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php @@ -11,6 +11,7 @@ use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult; use Magento\Sales\Model\ResourceModel\Order\Creditmemo; +use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as OrderCollection; use Magento\Sales\Model\ResourceModel\Order\Invoice; use Magento\Sales\Model\ResourceModel\Order\Shipment; use Magento\TestFramework\Helper\Bootstrap; @@ -130,6 +131,11 @@ public function getCollectionFiltersDataProvider(): array 'mainTable' => 'sales_creditmemo_grid', 'resourceModel' => Creditmemo::class, 'field' => 'order_created_at', + ], + 'customer_orders_grid_collection_for_order_created_at' => [ + 'mainTable' => 'sales_order_grid', + 'resourceModel' => OrderCollection::class, + 'field' => 'created_at', ] ]; } From f136918bd7a871ec525d6b1ed6f8f9c29a72ace3 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 16 Nov 2022 17:26:16 +0530 Subject: [PATCH 345/985] ACP2E-1294 : code optimization --- .../Order/OrderGridCollectionFilter.php | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php index cd8a6971233a6..ed224432b3da7 100644 --- a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php +++ b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php @@ -49,12 +49,8 @@ public function aroundAddFieldToFilter( if ($field === 'created_at' || $field === 'order_created_at') { if (is_array($condition)) { foreach ($condition as $key => $value) { - if ($value instanceof DateTimeInterface - && $value->getTimezone()->getName() !== $this->timeZone->getConfigTimezone()) { - $value->setTimezone(new \DateTimeZone($this->timeZone->getConfigTimezone())); - } - if ($this->isValidDate($value)) { - $condition[$key] = $this->timeZone->convertConfigTimeToUtc($value); + if ($value = $this->isValidDate($value)) { + $condition[$key] = $value->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s'); } } } @@ -72,19 +68,17 @@ public function aroundAddFieldToFilter( /** * Validate date string * - * @param string|DateTimeInterface $datetime - * @return bool + * @param DateTimeInterface|string $datetime + * @return mixed */ - private function isValidDate($datetime): bool + private function isValidDate($datetime): mixed { try { - $dt = is_string($datetime) ? new DateTime($datetime) : $datetime; - if ($dt instanceof DateTimeInterface) { - return true; - } + return $datetime instanceof DateTimeInterface + ? $datetime : (is_string($datetime) ? new DateTime($datetime) : false); + } catch (\Exception $e) { return false; } - return false; } } From aba2ce603411d818719c3ecd9c6b4e20673a364b Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 16 Nov 2022 17:33:15 +0530 Subject: [PATCH 346/985] ACP2E-1197 : Code block changes --- .../Model/ResourceModel/Order/OrderGridCollectionFilter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php index ed224432b3da7..432c5ee19009c 100644 --- a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php +++ b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php @@ -68,10 +68,10 @@ public function aroundAddFieldToFilter( /** * Validate date string * - * @param DateTimeInterface|string $datetime + * @param mixed $datetime * @return mixed */ - private function isValidDate($datetime): mixed + private function isValidDate(mixed $datetime): mixed { try { return $datetime instanceof DateTimeInterface From c7d16379b56d9361d5d9f2d5378edf2c4eb79ae2 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 16 Nov 2022 20:57:00 +0530 Subject: [PATCH 347/985] ACP2E-1294 : Fixed issue on timezone --- .../Model/ResourceModel/Order/OrderGridCollectionFilter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php index 432c5ee19009c..e7dc86128500b 100644 --- a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php +++ b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php @@ -75,8 +75,7 @@ private function isValidDate(mixed $datetime): mixed { try { return $datetime instanceof DateTimeInterface - ? $datetime : (is_string($datetime) ? new DateTime($datetime) : false); - + ? $datetime : (is_string($datetime) ? new DateTime($datetime, new \DateTimeZone($this->timeZone->getConfigTimezone())) : false); } catch (\Exception $e) { return false; } From 3d3924a20f547a9415e81fb1c3725415c5b8c804 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Thu, 17 Nov 2022 16:38:28 +0530 Subject: [PATCH 348/985] ACP2E-1294 : Fixed static test failures --- .../Model/ResourceModel/Order/OrderGridCollectionFilter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php index e7dc86128500b..743bc83588296 100644 --- a/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php +++ b/app/code/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilter.php @@ -75,7 +75,8 @@ private function isValidDate(mixed $datetime): mixed { try { return $datetime instanceof DateTimeInterface - ? $datetime : (is_string($datetime) ? new DateTime($datetime, new \DateTimeZone($this->timeZone->getConfigTimezone())) : false); + ? $datetime : (is_string($datetime) + ? new DateTime($datetime, new \DateTimeZone($this->timeZone->getConfigTimezone())) : false); } catch (\Exception $e) { return false; } From ae7290a4ccfe3c46ea99cf38ae022b307356d20f Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Fri, 18 Nov 2022 12:56:29 +0530 Subject: [PATCH 349/985] ACP2E-1294 : Fixed test case data --- .../ResourceModel/Order/OrderGridCollectionFilterTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php index a7e49dc219306..2479d1e878ff5 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php @@ -7,6 +7,8 @@ namespace Magento\Sales\Plugin\Model\ResourceModel\Order; +use DateTime; +use DateTimeInterface; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult; @@ -74,6 +76,11 @@ protected function setUp(): void public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field): void { $filterDate = "2021-12-13 00:00:00"; + if ($mainTable == 'sales_order_grid') { + $filterDate = new DateTime($filterDate); + $filterDate->setTimezone(new \DateTimeZone($this->timeZone->getConfigTimezone())); + $filterDate->format('Y-m-d H:i:s'); + } $convertedDate = $this->timeZone->convertConfigTimeToUtc($filterDate); $this->searchResult = $this->objectManager->create( From 90ed6e0419d3b6cecbcfa6d210968e937170fc6d Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 22 Nov 2022 15:09:29 +0530 Subject: [PATCH 350/985] ACP2E-1197 : Handling DateTime object for asserting --- .../ResourceModel/Order/OrderGridCollectionFilterTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php index 2479d1e878ff5..38f4c64ba7846 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php @@ -78,10 +78,8 @@ public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field): $filterDate = "2021-12-13 00:00:00"; if ($mainTable == 'sales_order_grid') { $filterDate = new DateTime($filterDate); - $filterDate->setTimezone(new \DateTimeZone($this->timeZone->getConfigTimezone())); - $filterDate->format('Y-m-d H:i:s'); + $filterDate->setTimezone(new \DateTimeZone('UTC')); } - $convertedDate = $this->timeZone->convertConfigTimeToUtc($filterDate); $this->searchResult = $this->objectManager->create( SearchResult::class, @@ -97,6 +95,9 @@ public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field): ['qteq' => $filterDate] ); + $convertedDate = $filterDate instanceof DateTimeInterface + ? $filterDate->format('Y-m-d H:i:s') : $this->timeZone->convertConfigTimeToUtc($filterDate); + $expectedSelect = "SELECT `main_table`.* FROM `{$mainTable}` AS `main_table` " . "WHERE (((`{$field}` = '{$convertedDate}')))"; From 10a0cef3aa30d04363a22c973ac2740423a18ad0 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 23 Nov 2022 21:16:24 +0530 Subject: [PATCH 351/985] ACP2E-1197 : Done changes for different data and fixed static test issues --- .../DataProvider/OrdersCollectionFilters.php | 77 ++++++++++++++++++ .../Order/OrderGridCollectionFilterTest.php | 81 +++++-------------- 2 files changed, 95 insertions(+), 63 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/DataProvider/OrdersCollectionFilters.php diff --git a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/DataProvider/OrdersCollectionFilters.php b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/DataProvider/OrdersCollectionFilters.php new file mode 100644 index 0000000000000..08c5d552844f3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/DataProvider/OrdersCollectionFilters.php @@ -0,0 +1,77 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Sales\Plugin\Model\ResourceModel\Order\DataProvider; + +use DateTime; +use DateTimeZone; +use Exception; +use Magento\Sales\Model\ResourceModel\Order\Creditmemo; +use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as OrderCollection; +use Magento\Sales\Model\ResourceModel\Order\Invoice; +use Magento\Sales\Model\ResourceModel\Order\Shipment; + +class OrdersCollectionFilters +{ + + /** + * Return product attribute data set for update attribute options + * + * @return array + * @throws Exception + */ + public function getCollectionFiltersDataProvider(): array + { + $filterDate = "2021-12-13 00:00:00"; + $customerOrdersFilterDate = new DateTime($filterDate); + $customerOrdersFilterDate->setTimezone(new DateTimeZone('UTC')); + return [ + 'invoice_grid_collection_for_created_at' => [ + 'mainTable' => 'sales_invoice_grid', + 'resourceModel' => Invoice::class, + 'field' => 'created_at', + 'fieldValue' => $filterDate, + ], + 'invoice_grid_collection_for_order_created_at' => [ + 'mainTable' => 'sales_invoice_grid', + 'resourceModel' => Invoice::class, + 'field' => 'order_created_at', + 'fieldValue' => $filterDate, + ], + 'shipment_grid_collection_for_created_at' => [ + 'mainTable' => 'sales_shipment_grid', + 'resourceModel' => Shipment::class, + 'field' => 'created_at', + 'fieldValue' => $filterDate, + ], + 'shipment_grid_collection_for_order_created_at' => [ + 'mainTable' => 'sales_shipment_grid', + 'resourceModel' => Shipment::class, + 'field' => 'order_created_at', + 'fieldValue' => $filterDate, + ], + 'creditmemo_grid_collection_for_created_at' => [ + 'mainTable' => 'sales_creditmemo_grid', + 'resourceModel' => Creditmemo::class, + 'field' => 'created_at', + 'fieldValue' => $filterDate, + ], + 'creditmemo_grid_collection_for_order_created_at' => [ + 'mainTable' => 'sales_creditmemo_grid', + 'resourceModel' => Creditmemo::class, + 'field' => 'order_created_at', + 'fieldValue' => $filterDate, + ], + 'customer_orders_grid_collection_for_order_created_at' => [ + 'mainTable' => 'sales_order_grid', + 'resourceModel' => OrderCollection::class, + 'field' => 'created_at', + 'fieldValue' => $customerOrdersFilterDate, + ], + ]; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php index 38f4c64ba7846..718a5f67bb714 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Plugin/Model/ResourceModel/Order/OrderGridCollectionFilterTest.php @@ -7,15 +7,11 @@ namespace Magento\Sales\Plugin\Model\ResourceModel\Order; -use DateTime; use DateTimeInterface; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult; -use Magento\Sales\Model\ResourceModel\Order\Creditmemo; -use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as OrderCollection; -use Magento\Sales\Model\ResourceModel\Order\Invoice; -use Magento\Sales\Model\ResourceModel\Order\Shipment; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -67,18 +63,27 @@ protected function setUp(): void /** * Verifies that filter condition date is being converted to config timezone before select sql query * - * @dataProvider getCollectionFiltersDataProvider + * @dataProvider \Magento\Sales\Plugin\Model\ResourceModel\Order\DataProvider\OrdersCollectionFilters::getCollectionFiltersDataProvider + * * @param $mainTable * @param $resourceModel * @param $field - * @throws \Magento\Framework\Exception\LocalizedException + * @param $fieldValue + * @throws LocalizedException */ - public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field): void + public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field, $fieldValue): void { - $filterDate = "2021-12-13 00:00:00"; + $expectedSelect = "SELECT `main_table`.* FROM `{$mainTable}` AS `main_table` "; + + $convertedDate = $fieldValue instanceof DateTimeInterface + ? $fieldValue->format('Y-m-d H:i:s') : $this->timeZone->convertConfigTimeToUtc($fieldValue); + if ($mainTable == 'sales_order_grid') { - $filterDate = new DateTime($filterDate); - $filterDate->setTimezone(new \DateTimeZone('UTC')); + $condition = ['from' => $fieldValue , 'locale' => "en_US", 'datetime' => true]; + $selectCondition = "WHERE (`{$field}` >= '{$convertedDate}')"; + } else { + $condition = ['qteq' => $fieldValue]; + $selectCondition = "WHERE (((`{$field}` = '{$convertedDate}')))"; } $this->searchResult = $this->objectManager->create( @@ -92,59 +97,9 @@ public function testAroundAddFieldToFilter($mainTable, $resourceModel, $field): $this->searchResult, $this->proceed, $field, - ['qteq' => $filterDate] + $condition ); - $convertedDate = $filterDate instanceof DateTimeInterface - ? $filterDate->format('Y-m-d H:i:s') : $this->timeZone->convertConfigTimeToUtc($filterDate); - - $expectedSelect = "SELECT `main_table`.* FROM `{$mainTable}` AS `main_table` " . - "WHERE (((`{$field}` = '{$convertedDate}')))"; - - $this->assertEquals($expectedSelect, $result->getSelectSql(true)); - } - - /** - * @return array - */ - public function getCollectionFiltersDataProvider(): array - { - return [ - 'invoice_grid_collection_for_created_at' => [ - 'mainTable' => 'sales_invoice_grid', - 'resourceModel' => Invoice::class, - 'field' => 'created_at', - ], - 'invoice_grid_collection_for_order_created_at' => [ - 'mainTable' => 'sales_invoice_grid', - 'resourceModel' => Invoice::class, - 'field' => 'order_created_at', - ], - 'shipment_grid_collection_for_created_at' => [ - 'mainTable' => 'sales_shipment_grid', - 'resourceModel' => Shipment::class, - 'field' => 'created_at', - ], - 'shipment_grid_collection_for_order_created_at' => [ - 'mainTable' => 'sales_shipment_grid', - 'resourceModel' => Shipment::class, - 'field' => 'order_created_at', - ], - 'creditmemo_grid_collection_for_created_at' => [ - 'mainTable' => 'sales_creditmemo_grid', - 'resourceModel' => Creditmemo::class, - 'field' => 'created_at', - ], - 'creditmemo_grid_collection_for_order_created_at' => [ - 'mainTable' => 'sales_creditmemo_grid', - 'resourceModel' => Creditmemo::class, - 'field' => 'order_created_at', - ], - 'customer_orders_grid_collection_for_order_created_at' => [ - 'mainTable' => 'sales_order_grid', - 'resourceModel' => OrderCollection::class, - 'field' => 'created_at', - ] - ]; + $this->assertEquals($expectedSelect . $selectCondition, $result->getSelectSql(true)); } } From 02bb57112b2860d844d0c9649578bc76358a13ba Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Fri, 23 Dec 2022 13:10:51 +0530 Subject: [PATCH 352/985] ACQE-4345 | Fix flaky test --- .../AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml index 54fe82831ef02..6ac77eb7c2f23 100644 --- a/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminImpossibleDeleteYourOwnAccountActionGroup.xml @@ -12,6 +12,7 @@ <argument name="currentAdminPassword" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </arguments> <fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{currentAdminPassword}}" stepKey="enterThePassword" /> + <waitForElementVisible selector="{{AdminMainActionsSection.delete}}" stepKey="waitForDeleteButton"/> <click selector="{{AdminMainActionsSection.delete}}" stepKey="deleteUser"/> <waitForElementVisible selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForConfirmModal"/> <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/> From 923afd8457ecd02653fdf7021c6ccbeeeae50349 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Thu, 22 Dec 2022 13:51:13 +0530 Subject: [PATCH 353/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop-fixed AdminUpdateUserRoleTest mftf failure --- .../Test/Mftf/Test/AdminUpdateUserRoleTest.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index c041d7714c100..74a81d38d228c 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -18,9 +18,6 @@ <testCaseId value="MC-27895"/> <group value="user"/> <group value="mtf_migrated"/> - <skip> - <issueId value="AC-7467"/> - </skip> </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> @@ -28,10 +25,15 @@ <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> + <!--Create New Role--> - <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> - <argument name="roleName" value="{{roleSales.name}}"/> - </actionGroup> + <amOnPage url="{{AdminEditRolePage.url}}" stepKey="openNewAdminRolePage"/> + <waitForElementVisible selector="{{AdminCreateRoleSection.name}}" stepKey="waitForName"/> + <fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{roleSales.name}}" stepKey="setTheRoleName"/> + <fillField selector="{{AdminCreateRoleSection.password}}" userInput="123123q" stepKey="setPassword"/> + <click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/> + <selectOption selector="{{AdminEditRoleResourcesSection.resourceAccess}}" userInput="Custom" stepKey="chooseResourceAccess"/> + <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> </before> <after> From 1763e97a84d39c51ea3484fed2f70c659a31f796 Mon Sep 17 00:00:00 2001 From: Scott Robinson <scott@dor.ky> Date: Sat, 24 Dec 2022 19:38:41 +0000 Subject: [PATCH 354/985] Correct mime type typo --- .../Catalog/Controller/Adminhtml/Product/Gallery/Upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php index 28786e2429da6..f9bdf3cba0465 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php @@ -33,8 +33,8 @@ class Upload extends \Magento\Backend\App\Action implements HttpPostActionInterf private $allowedMimeTypes = [ 'jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', - 'gif' => 'image/png', - 'png' => 'image/gif' + 'gif' => 'image/gif', + 'png' => 'image/png' ]; /** From 793a9fc3728cf33f37bb6ba11fae146aa8a146ea Mon Sep 17 00:00:00 2001 From: Alexander Menk <a.menk@imi.de> Date: Sun, 25 Dec 2022 12:42:12 +0100 Subject: [PATCH 355/985] fix: #14495 Adapt test to expect frontendInput --- .../Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php index 3be200bdf90be..b922a52478dc8 100644 --- a/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php +++ b/app/code/Magento/Customer/Test/Unit/Ui/Component/Listing/ColumnsTest.php @@ -160,7 +160,7 @@ public function testPrepareWithAddColumn(): void public function testPrepareWithUpdateColumn(): void { $attributeCode = 'billing_attribute_code'; - $backendType = 'backend-type'; + $frontendInput = 'text'; $attributeData = [ 'attribute_code' => 'billing_attribute_code', 'frontend_input' => 'text', @@ -211,7 +211,7 @@ public function testPrepareWithUpdateColumn(): void 'config', [ 'name' => $attributeCode, - 'dataType' => $backendType, + 'dataType' => $frontendInput, 'filter' => [ 'filterType' => 'text', 'conditionType' => 'like', From 2f825d0dca5ad2b981859c7815d6845b1a64edd3 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Sun, 25 Dec 2022 23:47:26 +0530 Subject: [PATCH 356/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop-fixed AdminUpdateUserRoleTest mftf failure --- .../User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index 74a81d38d228c..da18f662abf6f 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -25,15 +25,11 @@ <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - - <!--Create New Role--> - <amOnPage url="{{AdminEditRolePage.url}}" stepKey="openNewAdminRolePage"/> - <waitForElementVisible selector="{{AdminCreateRoleSection.name}}" stepKey="waitForName"/> - <fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{roleSales.name}}" stepKey="setTheRoleName"/> - <fillField selector="{{AdminCreateRoleSection.password}}" userInput="123123q" stepKey="setPassword"/> - <click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/> - <selectOption selector="{{AdminEditRoleResourcesSection.resourceAccess}}" userInput="Custom" stepKey="chooseResourceAccess"/> + <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> + <argument name="roleName" value="{{roleSales.name}}"/> + <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> + </actionGroup> <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> </before> <after> From f59997065e222c93bc1fddb655bf1236729b2d94 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 22 Dec 2022 13:46:03 +0530 Subject: [PATCH 357/985] ACQE:4370:Product can be found by value of 'Searchable' attribute --- ...ElasticSearchAsSearchEngineActionGroup.xml | 28 ++++++ ...eFoundByValueOfSearchableAttributeTest.xml | 98 +++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 app/code/Magento/Config/Test/Mftf/ActionGroup/ChooseElasticSearchAsSearchEngineActionGroup.xml create mode 100644 app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml diff --git a/app/code/Magento/Config/Test/Mftf/ActionGroup/ChooseElasticSearchAsSearchEngineActionGroup.xml b/app/code/Magento/Config/Test/Mftf/ActionGroup/ChooseElasticSearchAsSearchEngineActionGroup.xml new file mode 100644 index 0000000000000..1b5549b7fb0df --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/ActionGroup/ChooseElasticSearchAsSearchEngineActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ChooseElasticSearchAsSearchEngineActionGroup"> + <annotations> + <description>Goes to the 'Configuration' page for 'Catalog'. Sets the 'Search Engine' to 'elasticsearch7'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description> + </annotations> + + <amOnPage url="{{AdminCatalogSearchConfigurationPage.url}}" stepKey="configureSearchEngine"/> + <waitForPageLoad stepKey="waitForConfigPage"/> + <scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCatalogSearchTab"/> + <conditionalClick selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" dependentSelector="{{AdminCatalogSearchConfigurationSection.checkIfCatalogSearchTabExpand}}" visible="true" stepKey="expandCatalogSearchTab"/> + <waitForElementVisible selector="{{AdminCatalogSearchConfigurationSection.searchEngine}}" stepKey="waitForDropdownToBeVisible"/> + <uncheckOption selector="{{AdminCatalogSearchConfigurationSection.searchEngineDefaultSystemValue}}" stepKey="uncheckUseSystemValue"/> + <selectOption selector="{{AdminCatalogSearchConfigurationSection.searchEngine}}" userInput="Elasticsearch 7" stepKey="chooseES5"/> + <!--<scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCatalogSearchTab2"/>--> + <!--<click selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="collapseCatalogSearchTab"/>--> + <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfiguration"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigurationSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml new file mode 100644 index 0000000000000..7b4cf3ece1aae --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml @@ -0,0 +1,98 @@ + +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest"> + <annotations> + <stories value="Elastic Search"/> + <title value="Product can be found by value of 'Searchable' attribute"/> + <description value="Product can be found by value of 'Searchable' attribute"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4086"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="ChooseElasticSearchAsSearchEngineActionGroup" stepKey="chooseElasticSearch"/> + <!--Create new searchable product attribute--> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> + <actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createAttribute"> + <argument name="attribute" value="textProductAttribute"/> + </actionGroup> + <!--Assign attribute to the Default set--> + <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> + <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/> + <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup"> + <argument name="group" value="Product Details"/> + <argument name="attribute" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> + <!--Create product and fill new attribute field--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <waitForPageLoad stepKey="waitForProductIndexPage"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + </before> + <after> + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid"> + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode"> + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/> + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm"> + <argument name="phrase" value="searchable"/> + </actionGroup> + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/> + <!--<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes1"/>--> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> + <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{textProductAttribute.attribute_code}}" stepKey="fillAttrCodeField" /> + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" /> + <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="chooseFirstRow" /> + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontPropertiesTab"/> + <waitForElementVisible selector="{{StorefrontPropertiesSection.PageTitle}}" stepKey="waitTabLoad"/> + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="No" stepKey="setSearchable"/> + <click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/> + <!--<actionGroup ref="AdminCreateNonSearchableProductAttributeActionGroup" stepKey="createAttribute1"> + <argument name="attribute" value="textProductAttribute"/> + </actionGroup>--> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <!--<magentoCLI stepKey="flushCache" command="cache:flush"/>--> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm1"> + <argument name="phrase" value="searchable"/> + </actionGroup> + <dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="dontSeeProductName1"/> + </test> +</tests> From 7765bfb7bb456f2b2f6d9a9e0952f4809388bdad Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Wed, 28 Dec 2022 18:52:35 +0530 Subject: [PATCH 358/985] ACQE-4384: added wait for visible element --- .../AssertStorefrontShoppingCartSummaryItemsActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml index 7633f969fd361..cd6eeb636247d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml @@ -21,7 +21,7 @@ <waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/> <see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="{{subtotal}}" stepKey="assertSubtotal"/> <waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForTotalVisible"/> - <waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" stepKey="waitForTotalAmountVisible"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" wait="20" stepKey="waitForTotalAmountVisible"/> <see selector="{{CheckoutCartSummarySection.total}}" userInput="{{total}}" stepKey="assertTotal"/> <seeElement selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="seeProceedToCheckoutButton"/> </actionGroup> From 676c6cec321023f00788efda439aad1d64179e7d Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 29 Dec 2022 10:52:25 +0530 Subject: [PATCH 359/985] Update ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml --- ...icsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml index 7b4cf3ece1aae..b46bee121044a 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest.xml @@ -1,4 +1,3 @@ - <?xml version="1.0" encoding="UTF-8"?> <!-- /** From 08573afc86c1cff4f1a1c34d74a6aa0691c75a14 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Thu, 29 Dec 2022 14:12:54 +0530 Subject: [PATCH 360/985] ACQE-4384: added wait for visible element --- .../AssertStorefrontShoppingCartSummaryItemsActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml index cd6eeb636247d..dcca26c63f5de 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml @@ -21,7 +21,7 @@ <waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/> <see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="{{subtotal}}" stepKey="assertSubtotal"/> <waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForTotalVisible"/> - <waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" wait="20" stepKey="waitForTotalAmountVisible"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" time="20" stepKey="waitForTotalAmountVisible"/> <see selector="{{CheckoutCartSummarySection.total}}" userInput="{{total}}" stepKey="assertTotal"/> <seeElement selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="seeProceedToCheckoutButton"/> </actionGroup> From 07022893ad4993b8050192bab792c3e83b8df957 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:31:25 +0530 Subject: [PATCH 361/985] ACQE-4344 | Test Fix --- ...dminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml index 7001acdea89b3..abbbe6e6c86f0 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml @@ -47,6 +47,7 @@ <amOnPage url="{{StorefrontCategoryPage.url($createPreReqCategory.custom_attributes[url_key]$)}}" stepKey="navigateToCategoryPage"/> <waitForPageLoad stepKey="wait1"/> + <waitForElementVisible selector="{{StorefrontHeaderSection.ProductWidgetLink}}" stepKey="waitForProductLinkButton"/> <click selector="{{StorefrontHeaderSection.ProductWidgetLink}}" stepKey="clickProductLinkButton"/> <waitForPageLoad stepKey="wait2"/> <actionGroup ref="AssertStorefrontProductDetailPageNameActionGroup" stepKey="assertProductNameText"> From 9b441ef4480f543aea9d6a997fcf77c7cb1fb60c Mon Sep 17 00:00:00 2001 From: akaash <akaash@BLR1-LMC-N71907.local> Date: Thu, 29 Dec 2022 19:01:43 +0530 Subject: [PATCH 362/985] ACQE-4380 | Test Case Automation --- ...EachSkusConfigurableProductActionGroup.xml | 2 +- ...moItValidateTheOrderStatusIsClosedTest.xml | 231 ++++++++++++++++++ 2 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminSetProductQuantityToEachSkusConfigurableProductActionGroup.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminSetProductQuantityToEachSkusConfigurableProductActionGroup.xml index c5050827a94b1..4b0e515a2dbe9 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminSetProductQuantityToEachSkusConfigurableProductActionGroup.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminSetProductQuantityToEachSkusConfigurableProductActionGroup.xml @@ -19,7 +19,7 @@ <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButtonToNavigateToSummaryTab"/> <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButtonToNavigateToGenerateProductsTab"/> <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/> - <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/> + <conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="clickOnConfirmInPopup"/> <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/> </actionGroup> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml new file mode 100644 index 0000000000000..6d13738271781 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest.xml @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="PlaceAnOrderAndCreditMemoItValidateTheOrderStatusIsClosedTest"> + <annotations> + <stories value="Place an order and credit memo it, validate the order status is closed"/> + <title value="Place an order and credit memo it, validate the order status is closed"/> + <description value="Place an order and credit memo it, validate the order status is closed"/> + <severity value="MINOR"/> + <testCaseId value="AC-1577"/> + </annotations> + <before> + <!-- Add downloadable domains --> + <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add example.com static.magento.com"/> + + <!-- Login as an Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <!-- Create Customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <!-- Create Category --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + + <!-- Create Simple Product --> + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Create Configurable Product having color attribute --> + <actionGroup ref="CreateConfigurableProductActionGroupWithDefaultColorAttributeActionGroup" stepKey="createConfigurableProduct"> + <argument name="product" value="_defaultProduct"/> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <!-- Assigning quantities to each SKU's --> + <actionGroup ref="AdminSetProductQuantityToEachSkusConfigurableProductActionGroup" stepKey="saveConfigurableProduct"/> + + <!-- Create Virtual Product --> + <createData entity="VirtualProduct" stepKey="createVirtualProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Create Downloadable product --> + <createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/> + <createData entity="ApiDownloadableLink" stepKey="addFirstDownloadableLink"> + <requiredEntity createDataKey="createDownloadableProduct"/> + </createData> + <createData entity="ApiDownloadableLink" stepKey="addSecondDownloadableLink"> + <requiredEntity createDataKey="createDownloadableProduct"/> + </createData> + </before> + <after> + <!-- Remove downloadable domains --> + <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> + + <!-- Delete Customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/> + + <!-- Delete Simple Product --> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + + <!-- Delete configurable product --> + <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct"> + <argument name="product" value="_defaultProduct"/> + </actionGroup> + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="clearProductsGridFilters" after="deleteProduct"/> + + <!-- Delete Virtual Product --> + <deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProducts"/> + + <!-- Delete created downloadable product --> + <deleteData createDataKey="createDownloadableProduct" stepKey="deleteDownloadableProduct"/> + + <!-- Delete Category --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- Logout User and Admin --> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPage"> + <argument name="productUrlKey" value="$createSimpleProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <!-- Add Simple Product --> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> + <argument name="product" value="$$createSimpleProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckout"/> + <waitForPageLoad stepKey="waitForPaymentSelectionPageLoad"/> + + <actionGroup ref="LoginAsCustomerOnCheckoutPageActionGroup" stepKey="storefrontCustomerLogin"> + <argument name="customer" value="$$createCustomer$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="gotoPaymentStep"/> + + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="customerPlaceOrder"> + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> + </actionGroup> + + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderNumber"/> + <assertNotEmpty stepKey="assertOrderIdIsNotEmpty" after="getOrderNumber"> + <actualResult type="const">$getOrderNumber</actualResult> + </assertNotEmpty> + + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/> + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrderGridById"> + <argument name="orderId" value="$getOrderNumber"/> + </actionGroup> + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/> + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> + + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemoAction"/> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemo"/> + <scrollTo selector="//select[@id='history_status']" stepKey="scrollToAnchor"/> + <seeOptionIsSelected userInput="Closed" selector="//select[@id='history_status']" stepKey="seeOption1"/> + + <!-- Add Virtual Product --> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPageVirtual"> + <argument name="productUrlKey" value="$createVirtualProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddVirtualProductToCart"> + <argument name="product" value="$$createVirtualProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckoutVirtual"/> + <waitForPageLoad stepKey="waitForPaymentSelectionPageLoadVirtual"/> + + <!-- Place Order --> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/> + + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderNumberVirtual"/> + <assertNotEmpty stepKey="assertOrderIdIsNotEmptyVirtual" after="getOrderNumberVirtual"> + <actualResult type="const">$getOrderNumberVirtual</actualResult> + </assertNotEmpty> + + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrdersVirtual"/> + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrderGridByIdVirtual"> + <argument name="orderId" value="$getOrderNumberVirtual"/> + </actionGroup> + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButtonVirtual"/> + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoiceVirtual"/> + + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemoActionVirtual"/> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemoVirtual"/> + <scrollTo selector="//select[@id='history_status']" stepKey="scrollToAnchorVirtual"/> + <seeOptionIsSelected userInput="Closed" selector="//select[@id='history_status']" stepKey="seeOption1Virtual"/> + + <!-- Add Configurable Product --> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPageConfigurable"> + <argument name="productUrlKey" value="$createSimpleProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <!-- Add configurable product to the cart --> + <actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart"> + <argument name="urlKey" value="{{_defaultProduct.urlKey}}" /> + <argument name="productAttribute" value="Color"/> + <argument name="productOption" value="{{colorProductAttribute2.name}}"/> + <argument name="qty" value="1"/> + </actionGroup> + + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMiniCart"/> + <waitForPageLoad stepKey="waitForPaymentSelectionPageLoadConfigurable"/> + + <!-- Place Order --> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrderConfigurable"/> + + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderNumberConfigurable"/> + <assertNotEmpty stepKey="assertOrderIdIsNotEmptyConfigurable" after="getOrderNumberConfigurable"> + <actualResult type="const">$getOrderNumberConfigurable</actualResult> + </assertNotEmpty> + + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrdersConfigurable"/> + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrderGridByIdConfigurable"> + <argument name="orderId" value="$getOrderNumberConfigurable"/> + </actionGroup> + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButtonConfigurable"/> + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoiceConfigurable"/> + + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemoActionConfigurable"/> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemoConfigurable"/> + <scrollTo selector="//select[@id='history_status']" stepKey="scrollToAnchorConfigurable"/> + <seeOptionIsSelected userInput="Closed" selector="//select[@id='history_status']" stepKey="seeOption1Configurable"/> + + <!-- Add Downloadable Product --> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProductPageDownloadable"> + <argument name="productUrlKey" value="$createDownloadableProduct.custom_attributes[url_key]$"/> + </actionGroup> + + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddDownloadableProductToCart"> + <argument name="product" value="$$createDownloadableProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckoutDownloadable"/> + <waitForPageLoad stepKey="waitForPaymentSelectionPageLoadDownloadable"/> + + <!-- Place Order --> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrderDownloadable"/> + + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="getOrderNumberDownloadable"/> + <assertNotEmpty stepKey="assertOrderIdIsNotEmptyDownloadable" after="getOrderNumberDownloadable"> + <actualResult type="const">$getOrderNumberDownloadable</actualResult> + </assertNotEmpty> + + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrdersDownloadable"/> + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrderGridByIdDownloadable"> + <argument name="orderId" value="$getOrderNumberDownloadable"/> + </actionGroup> + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButtonDownloadable"/> + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoiceDownloadable"/> + + <click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemoActionDownloadable"/> + <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemoDownloadable"/> + <scrollTo selector="//select[@id='history_status']" stepKey="scrollToAnchorDownloadable"/> + <seeOptionIsSelected userInput="Closed" selector="//select[@id='history_status']" stepKey="seeOption1Downloadable"/> + + </test> +</tests> From a0a4e21b7bd1fbbd68e1731881eb4eeb451ece99 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Fri, 30 Dec 2022 10:13:00 +0530 Subject: [PATCH 363/985] ACQE-4347 | Test Fix --- .../Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml index b8b8155159d37..e8bb89e0f112d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml @@ -20,6 +20,7 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <!-- Create Simple Product --> <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> <field key="price">560</field> From e241053b87823e2897d2a14461b97bcf4798b0fa Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 30 Dec 2022 14:46:41 +0530 Subject: [PATCH 364/985] ACQE-4367 dependencies --- .../Section/AdminCustomerActivitiesRecentlyViewedSection.xml | 1 + ...AdminClickConfigureForRecentlyViewedProductActionGroup.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesRecentlyViewedSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesRecentlyViewedSection.xml index b3a0151135491..27944a6ae6d3f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesRecentlyViewedSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesRecentlyViewedSection.xml @@ -10,5 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCustomerActivitiesRecentlyViewedSection"> <element name="addToOrderConfigure" type="button" selector="//div[@id='sidebar_data_pviewed']//tr[td[contains(.,'{{productName}}')]]//a[contains(@class, 'icon-configure')]" parameterized="true" timeout="30"/> + <element name="selectStoreView" type="button" selector="//label[@class='admin__field-label' and contains(text(),'Default Store View')]" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickConfigureForRecentlyViewedProductActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickConfigureForRecentlyViewedProductActionGroup.xml index 5bf954e4c8460..a074cfe9d5fc6 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickConfigureForRecentlyViewedProductActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickConfigureForRecentlyViewedProductActionGroup.xml @@ -15,8 +15,8 @@ <arguments> <argument name="productName" type="string"/> </arguments> - + <conditionalClick selector="{{AdminCustomerActivitiesRecentlyViewedSection.selectStoreView}}" dependentSelector="{{AdminCustomerActivitiesRecentlyViewedSection.selectStoreView}}" visible="true" stepKey="selectDefaultStoreView"/> + <waitForPageLoad stepKey="waitForPageToBeLoaded"/> <click selector="{{AdminCustomerActivitiesRecentlyViewedSection.addToOrderConfigure(productName)}}" stepKey="clickConfigureProduct"/> - </actionGroup> </actionGroups> From 7aeb591df03bdb2030f0047582a9f5a67141ae02 Mon Sep 17 00:00:00 2001 From: Vasudev <vasudev.penu.sundaresan@gds.ey.com> Date: Mon, 2 Jan 2023 14:15:47 +0530 Subject: [PATCH 365/985] Fixes - Internal server error on Category graphql query for redirect code field --- .../Products/DataProvider/ExtractDataFromCategoryTree.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php index e32c961ca593c..aa119c59a2ea4 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php @@ -70,6 +70,10 @@ private function sortTree(array &$tree): array } elseif (isset($node['children_count'])) { $node['children_count'] = 0; } + // redirect_code null will not return , so it will be 0 when there is no redirect error. + if (empty($node['redirect_code'])) { + $node['redirect_code'] = 0; + } } return $tree; From f219f59d08b83a476b324bdc99f425f43e7e5a10 Mon Sep 17 00:00:00 2001 From: ashishkumarpundeer <ashish@BLR1-LMC-N73497.local> Date: Mon, 2 Jan 2023 17:28:42 +0530 Subject: [PATCH 366/985] AC-7554:Mini cart does not display proper text for cart with decimal quantity 0.5 --- .../Checkout/view/frontend/web/template/minicart/content.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html b/app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html index d23e220aa9942..ab2e495730a11 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html @@ -38,7 +38,7 @@ <!-- ko if: (getCartParam('summary_count') > 1) --> <span translate="'Items in Cart'"></span> <!--/ko--> - <!-- ko if: (getCartParam('summary_count') === 1) --> + <!-- ko if: (getCartParam('summary_count') <= 1) --> <span translate="'Item in Cart'"></span> <!--/ko--> </div> From e35ff85ce955c64e73ee7201bfb1f2d148470e39 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 2 Jan 2023 17:39:12 +0530 Subject: [PATCH 367/985] AC-7422_v1::Incompatible issues fix for PHP8.2 --- .../Catalog/Product/View/Type/Bundle.php | 4 +- .../Magento/Paypal/Model/PayLaterConfig.php | 26 +- .../Quote/Model/Quote/Address/Rate.php | 15 + app/code/Magento/Sales/Helper/Admin.php | 2 +- composer.json | 16 +- composer.lock | 893 +++++++++--------- lib/internal/Magento/Framework/Escaper.php | 4 +- lib/internal/Magento/Framework/composer.json | 8 +- 8 files changed, 503 insertions(+), 465 deletions(-) diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php index 8f89910558c97..f6265f8f5782c 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php @@ -36,8 +36,6 @@ class Bundle extends AbstractView protected $options; /** - * Catalog product - * * @var \Magento\Catalog\Helper\Product */ protected $catalogProduct; @@ -405,7 +403,7 @@ private function getConfigData(Product $product, array $options) */ private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues) { - $preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? []; + $preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/{$optionId}") ?? []; $selections = $options[$optionId]['selections']; array_walk( $selections, diff --git a/app/code/Magento/Paypal/Model/PayLaterConfig.php b/app/code/Magento/Paypal/Model/PayLaterConfig.php index 438ec0f0235d8..c638e7427971b 100644 --- a/app/code/Magento/Paypal/Model/PayLaterConfig.php +++ b/app/code/Magento/Paypal/Model/PayLaterConfig.php @@ -15,17 +15,17 @@ class PayLaterConfig /** * Configuration key for Styles settings */ - const CONFIG_KEY_STYLE = 'style'; + public const CONFIG_KEY_STYLE = 'style'; /** * Configuration key for Position setting */ - const CONFIG_KEY_POSITION = 'position'; + public const CONFIG_KEY_POSITION = 'position'; /** * Checkout payment step placement */ - const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment'; + public const CHECKOUT_PAYMENT_PLACEMENT = 'checkout_payment'; /** * @var Config @@ -91,11 +91,11 @@ public function getSectionConfig(string $section, string $key) { if (!array_key_exists($section, $this->configData)) { $sectionName = $section === self::CHECKOUT_PAYMENT_PLACEMENT - ? self::CHECKOUT_PAYMENT_PLACEMENT : "${section}page"; + ? self::CHECKOUT_PAYMENT_PLACEMENT : "{$section}page"; $this->configData[$section] = [ - 'display' => (boolean)$this->config->getPayLaterConfigValue("${sectionName}_display"), - 'position' => $this->config->getPayLaterConfigValue("${sectionName}_position"), + 'display' => (boolean)$this->config->getPayLaterConfigValue("{$sectionName}_display"), + 'position' => $this->config->getPayLaterConfigValue("{$sectionName}_position"), 'style' => $this->getConfigStyles($sectionName) ]; } @@ -113,17 +113,17 @@ private function getConfigStyles(string $sectionName): array { $logoType = $logoPosition = $textColor = $textSize = null; $color = $ratio = null; - $styleLayout = $this->config->getPayLaterConfigValue("${sectionName}_stylelayout"); + $styleLayout = $this->config->getPayLaterConfigValue("{$sectionName}_stylelayout"); if ($styleLayout === 'text') { - $logoType = $this->config->getPayLaterConfigValue("${sectionName}_logotype"); + $logoType = $this->config->getPayLaterConfigValue("{$sectionName}_logotype"); if ($logoType === 'primary' || $logoType === 'alternative') { - $logoPosition = $this->config->getPayLaterConfigValue("${sectionName}_logoposition"); + $logoPosition = $this->config->getPayLaterConfigValue("{$sectionName}_logoposition"); } - $textColor = $this->config->getPayLaterConfigValue("${sectionName}_textcolor"); - $textSize = $this->config->getPayLaterConfigValue("${sectionName}_textsize"); + $textColor = $this->config->getPayLaterConfigValue("{$sectionName}_textcolor"); + $textSize = $this->config->getPayLaterConfigValue("{$sectionName}_textsize"); } elseif ($styleLayout === 'flex') { - $color = $this->config->getPayLaterConfigValue("${sectionName}_color"); - $ratio = $this->config->getPayLaterConfigValue("${sectionName}_ratio"); + $color = $this->config->getPayLaterConfigValue("{$sectionName}_color"); + $ratio = $this->config->getPayLaterConfigValue("{$sectionName}_ratio"); } return [ diff --git a/app/code/Magento/Quote/Model/Quote/Address/Rate.php b/app/code/Magento/Quote/Model/Quote/Address/Rate.php index 3f96be4bd25a4..339add647c90c 100644 --- a/app/code/Magento/Quote/Model/Quote/Address/Rate.php +++ b/app/code/Magento/Quote/Model/Quote/Address/Rate.php @@ -43,6 +43,13 @@ class Rate extends AbstractModel protected $_address; /** + * @var carrier_sort_order + */ + public $carrier_sort_order; + + /** + * Check the Quote rate + * * @return void */ protected function _construct() @@ -51,6 +58,8 @@ protected function _construct() } /** + * Set Address id with address before save + * * @return $this */ public function beforeSave() @@ -63,6 +72,8 @@ public function beforeSave() } /** + * Set address + * * @param \Magento\Quote\Model\Quote\Address $address * @return $this */ @@ -73,6 +84,8 @@ public function setAddress(\Magento\Quote\Model\Quote\Address $address) } /** + * Get Method for address + * * @return \Magento\Quote\Model\Quote\Address */ public function getAddress() @@ -81,6 +94,8 @@ public function getAddress() } /** + * Import shipping rate + * * @param \Magento\Quote\Model\Quote\Address\RateResult\AbstractResult $rate * @return $this */ diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index 0e0d8213cb791..df470b3125e0d 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $data = html_entity_decode($data, ENT_QUOTES, 'UTF-8'); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); diff --git a/composer.json b/composer.json index c7e29ce1fa642..026765e182b7b 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,16 @@ "preferred-install": "dist", "sort-packages": true }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/magento/composer" + }, + { + "type": "vcs", + "url": "https://github.com/wikimedia/less.php" + } + ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -65,7 +75,7 @@ "laminas/laminas-validator": "^2.23", "league/flysystem": "^2.4", "league/flysystem-aws-s3-v3": "^2.4", - "magento/composer": "^1.9.0-beta1", + "magento/composer": "dev-develop", "magento/composer-dependency-version-audit-plugin": "^0.1", "magento/magento-composer-installer": ">=0.4.0-beta1", "magento/zend-cache": "^1.16", @@ -73,7 +83,7 @@ "magento/zend-pdf": "^1.16", "monolog/monolog": "^2.7", "opensearch-project/opensearch-php": "^1.0 || ^2.0, <2.0.1", - "pelago/emogrifier": "^6.0.0", + "pelago/emogrifier": "^7", "php-amqplib/php-amqplib": "^3.2", "phpseclib/mcrypt_compat": "^2.0", "phpseclib/phpseclib": "^3.0", @@ -86,7 +96,7 @@ "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "^3.0" + "wikimedia/less.php": "dev-main" }, "require-dev": { "allure-framework/allure-phpunit": "^2", diff --git a/composer.lock b/composer.lock index 729fcb5297ea4..892afec00b8e9 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": "d81efc84c481cdc95ff549b5c58238f2", + "content-hash": "5e52eac89f635a1cd02c3fa0be933cb3", "packages": [ { "name": "aws/aws-crt-php", @@ -329,16 +329,16 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.13.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "afec8e58ec93d2291c127fa19709a048f28641e5" + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/afec8e58ec93d2291c127fa19709a048f28641e5", - "reference": "afec8e58ec93d2291c127fa19709a048f28641e5", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", "shasum": "" }, "require": { @@ -370,9 +370,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.13.0" + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" }, - "time": "2022-04-07T14:57:22+00:00" + "time": "2022-11-09T01:18:39+00:00" }, { "name": "colinmollenhour/php-redis-session-abstract", @@ -1078,16 +1078,16 @@ }, { "name": "ezimuel/ringphp", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/ezimuel/ringphp.git", - "reference": "92b8161404ab1ad84059ebed41d9f757e897ce74" + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/92b8161404ab1ad84059ebed41d9f757e897ce74", - "reference": "92b8161404ab1ad84059ebed41d9f757e897ce74", + "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/7887fc8488013065f72f977dcb281994f5fde9f4", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4", "shasum": "" }, "require": { @@ -1129,9 +1129,9 @@ ], "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", "support": { - "source": "https://github.com/ezimuel/ringphp/tree/1.2.0" + "source": "https://github.com/ezimuel/ringphp/tree/1.2.2" }, - "time": "2021-11-16T11:51:30+00:00" + "time": "2022-12-07T11:28:53+00:00" }, { "name": "ezyang/htmlpurifier", @@ -1186,24 +1186,24 @@ }, { "name": "fgrosse/phpasn1", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296" + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/eef488991d53e58e60c9554b09b1201ca5ba9296", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296", + "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b", + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b", "shasum": "" }, "require": { - "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "~2.0", - "phpunit/phpunit": "^6.3 || ^7.0 || ^8.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "suggest": { "ext-bcmath": "BCmath is the fallback extension for big integer calculations", @@ -1255,10 +1255,10 @@ ], "support": { "issues": "https://github.com/fgrosse/PHPASN1/issues", - "source": "https://github.com/fgrosse/PHPASN1/tree/v2.4.0" + "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0" }, "abandoned": true, - "time": "2021-12-11T12:41:06+00:00" + "time": "2022-12-19T11:08:26+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1655,35 +1655,35 @@ }, { "name": "laminas/laminas-captcha", - "version": "2.12.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-captcha.git", - "reference": "b07e499a7df73795768aa89e0138757a7ddb9195" + "reference": "de816814f52c67b33db614deb6227d46df531bc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-captcha/zipball/b07e499a7df73795768aa89e0138757a7ddb9195", - "reference": "b07e499a7df73795768aa89e0138757a7ddb9195", + "url": "https://api.github.com/repos/laminas/laminas-captcha/zipball/de816814f52c67b33db614deb6227d46df531bc6", + "reference": "de816814f52c67b33db614deb6227d46df531bc6", "shasum": "" }, "require": { - "laminas/laminas-math": "^2.7 || ^3.0", - "laminas/laminas-recaptcha": "^3.0", + "laminas/laminas-recaptcha": "^3.4.0", "laminas/laminas-session": "^2.12", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-text": "^2.8", - "laminas/laminas-validator": "^2.14", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^3.10.1", + "laminas/laminas-text": "^2.9.0", + "laminas/laminas-validator": "^2.19.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-captcha": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.1.4", - "phpunit/phpunit": "^9.4.3", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.6" + "ext-gd": "*", + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^4.29.0" }, "suggest": { "laminas/laminas-i18n-resources": "Translations of captcha messages" @@ -1718,33 +1718,33 @@ "type": "community_bridge" } ], - "time": "2022-04-07T10:41:09+00:00" + "time": "2022-11-15T23:25:43+00:00" }, { "name": "laminas/laminas-code", - "version": "4.5.2", + "version": "4.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad" + "reference": "dd19fe8e07cc3f374308565667eecd4958c22106" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/dd19fe8e07cc3f374308565667eecd4958c22106", + "reference": "dd19fe8e07cc3f374308565667eecd4958c22106", "shasum": "" }, "require": { - "php": ">=7.4, <8.2" + "php": "~8.1.0 || ~8.2.0" }, "require-dev": { - "doctrine/annotations": "^1.13.2", + "doctrine/annotations": "^1.13.3", "ext-phar": "*", "laminas/laminas-coding-standard": "^2.3.0", "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.13.1" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.1.0" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", @@ -1752,9 +1752,6 @@ }, "type": "library", "autoload": { - "files": [ - "polyfill/ReflectionEnumPolyfill.php" - ], "psr-4": { "Laminas\\Code\\": "src/" } @@ -1784,26 +1781,26 @@ "type": "community_bridge" } ], - "time": "2022-06-06T11:26:02+00:00" + "time": "2022-12-08T02:08:23+00:00" }, { "name": "laminas/laminas-config", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-config.git", - "reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd" + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-config/zipball/e43d13dcfc273d4392812eb395ce636f73f34dfd", - "reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd", + "url": "https://api.github.com/repos/laminas/laminas-config/zipball/46baad58d0b12cf98539e04334eff40a1fdfb9a0", + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { @@ -1811,11 +1808,11 @@ "zendframework/zend-config": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.7.2", - "laminas/laminas-i18n": "^2.10.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-filter": "~2.23.0", + "laminas/laminas-i18n": "~2.19.0", + "laminas/laminas-servicemanager": "~3.19.0", + "phpunit/phpunit": "~9.5.25" }, "suggest": { "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", @@ -1852,20 +1849,20 @@ "type": "community_bridge" } ], - "time": "2021-10-01T16:07:46+00:00" + "time": "2022-10-16T14:21:22+00:00" }, { "name": "laminas/laminas-crypt", - "version": "3.8.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-crypt.git", - "reference": "0972bb907fd555c16e2a65309b66720acf2b8699" + "reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/0972bb907fd555c16e2a65309b66720acf2b8699", - "reference": "0972bb907fd555c16e2a65309b66720acf2b8699", + "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/56ab1b195dad5456753601ff2e8e3d3fd9392d1a", + "reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a", "shasum": "" }, "require": { @@ -1873,15 +1870,15 @@ "laminas/laminas-math": "^3.4", "laminas/laminas-servicemanager": "^3.11.2", "laminas/laminas-stdlib": "^3.6", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.1" }, "conflict": { "zendframework/zend-crypt": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpunit/phpunit": "^9.5.11" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.25" }, "suggest": { "ext-openssl": "Required for most features of Laminas\\Crypt" @@ -1916,35 +1913,35 @@ "type": "community_bridge" } ], - "time": "2022-04-12T14:28:29+00:00" + "time": "2022-10-16T15:51:01+00:00" }, { "name": "laminas/laminas-db", - "version": "2.15.0", + "version": "2.16.3", "source": { "type": "git", "url": "https://github.com/laminas/laminas-db.git", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606" + "reference": "dadd9a19d2f9e89aa59205572b928892b91ff1da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-db/zipball/1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606", + "url": "https://api.github.com/repos/laminas/laminas-db/zipball/dadd9a19d2f9e89aa59205572b928892b91ff1da", + "reference": "dadd9a19d2f9e89aa59205572b928892b91ff1da", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.7.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0|| ~8.2.0" }, "conflict": { "zendframework/zend-db": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-hydrator": "^3.2 || ^4.3", - "laminas/laminas-servicemanager": "^3.7.0", - "phpunit/phpunit": "^9.5.19" + "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-eventmanager": "^3.6.0", + "laminas/laminas-hydrator": "^4.7", + "laminas/laminas-servicemanager": "^3.19.0", + "phpunit/phpunit": "^9.5.25" }, "suggest": { "laminas/laminas-eventmanager": "Laminas\\EventManager component", @@ -1987,42 +1984,42 @@ "type": "community_bridge" } ], - "time": "2022-04-11T13:26:20+00:00" + "time": "2022-12-17T16:31:58+00:00" }, { "name": "laminas/laminas-di", - "version": "3.7.0", + "version": "3.11.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-di.git", - "reference": "80c90d68bc15d4e094a609760144ce1d1aad0a79" + "reference": "45c9dfd57370617d2028e597061c4ef2a2ea0118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-di/zipball/80c90d68bc15d4e094a609760144ce1d1aad0a79", - "reference": "80c90d68bc15d4e094a609760144ce1d1aad0a79", + "url": "https://api.github.com/repos/laminas/laminas-di/zipball/45c9dfd57370617d2028e597061c4ef2a2ea0118", + "reference": "45c9dfd57370617d2028e597061c4ef2a2ea0118", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.6", - "php": ">=7.4, <8.2", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.1.1", - "psr/log": "^1.1.4" + "psr/log": "^1.1.4 || ^3.0.0" }, "conflict": { + "laminas/laminas-servicemanager": "<3.13.0", "laminas/laminas-servicemanager-di": "*", - "phpspec/prophecy": "<1.9.0", "zendframework/zend-di": "*" }, "require-dev": { - "container-interop/container-interop": "^1.2.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-servicemanager": "^3.7", - "mikey179/vfsstream": "^1.6.10@alpha", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.5", - "squizlabs/php_codesniffer": "^3.6" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-servicemanager": "^3.12", + "mikey179/vfsstream": "^1.6.11@alpha", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.16.1", + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.10" }, "suggest": { "laminas/laminas-servicemanager": "An IoC container without auto wiring capabilities" @@ -2064,7 +2061,7 @@ "type": "community_bridge" } ], - "time": "2022-05-15T18:19:36+00:00" + "time": "2022-11-25T10:24:48+00:00" }, { "name": "laminas/laminas-escaper", @@ -2130,16 +2127,16 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.6.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308" + "reference": "74c091fb0da37744e7d215ef5bd3564c77f6385e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/3f1afbad86cd34a431fdc069f265cfe6f8fc8308", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/74c091fb0da37744e7d215ef5bd3564c77f6385e", + "reference": "74c091fb0da37744e7d215ef5bd3564c77f6385e", "shasum": "" }, "require": { @@ -2152,11 +2149,11 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-stdlib": "^3.15", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", "psr/container": "^1.1.2 || ^2.0.2", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", @@ -2194,20 +2191,20 @@ "type": "community_bridge" } ], - "time": "2022-10-11T12:46:13+00:00" + "time": "2022-12-10T16:36:52+00:00" }, { "name": "laminas/laminas-feed", - "version": "2.19.0", + "version": "2.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-feed.git", - "reference": "4d0a7a536b48f698914156ca6633104b3aef2f3b" + "reference": "508ebef6e622f2f2ce3dd0559739ffd0dfa3b938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/4d0a7a536b48f698914156ca6633104b3aef2f3b", - "reference": "4d0a7a536b48f698914156ca6633104b3aef2f3b", + "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/508ebef6e622f2f2ce3dd0559739ffd0dfa3b938", + "reference": "508ebef6e622f2f2ce3dd0559739ffd0dfa3b938", "shasum": "" }, "require": { @@ -2227,12 +2224,12 @@ "laminas/laminas-cache-storage-adapter-memory": "^1.1.0 || ^2.1", "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-db": "^2.15", - "laminas/laminas-http": "^2.16", + "laminas/laminas-http": "^2.17.0", "laminas/laminas-validator": "^2.26", "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "psalm/plugin-phpunit": "^0.18.0", "psr/http-message": "^1.0.1", - "vimeo/psalm": "^4.29" + "vimeo/psalm": "^5.1.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component, for optionally caching feeds between requests", @@ -2274,25 +2271,25 @@ "type": "community_bridge" } ], - "time": "2022-10-14T13:40:45+00:00" + "time": "2022-12-03T19:40:30+00:00" }, { "name": "laminas/laminas-file", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-file.git", - "reference": "8eebc51715188032161fbafeae22a618af16bdb3" + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-file/zipball/8eebc51715188032161fbafeae22a618af16bdb3", - "reference": "8eebc51715188032161fbafeae22a618af16bdb3", + "url": "https://api.github.com/repos/laminas/laminas-file/zipball/9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", "shasum": "" }, "require": { - "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^2.7.7 || ^3.15.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-file": "*" @@ -2342,20 +2339,20 @@ "type": "community_bridge" } ], - "time": "2022-02-15T07:34:03+00:00" + "time": "2022-11-21T06:59:25+00:00" }, { "name": "laminas/laminas-filter", - "version": "2.23.0", + "version": "2.30.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731" + "reference": "97e3ce0fa868567aa433ed34d6f57ee703d70d3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/41cff2f850753f0bb3fc75c5ce011fcad6aa1731", - "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/97e3ce0fa868567aa433ed34d6f57ee703d70d3e", + "reference": "97e3ce0fa868567aa433ed34d6f57ee703d70d3e", "shasum": "" }, "require": { @@ -2370,13 +2367,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.8", - "laminas/laminas-uri": "^2.9.1", + "laminas/laminas-crypt": "^3.9", + "laminas/laminas-uri": "^2.10", "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "^0.18.4", "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.3" }, "suggest": { "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", @@ -2420,20 +2417,20 @@ "type": "community_bridge" } ], - "time": "2022-10-11T10:04:14+00:00" + "time": "2022-12-19T17:34:24+00:00" }, { "name": "laminas/laminas-http", - "version": "2.17.0", + "version": "2.18.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-http.git", - "reference": "ac4588d698c93b56bb7c0608d9a7537a3f057239" + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-http/zipball/ac4588d698c93b56bb7c0608d9a7537a3f057239", - "reference": "ac4588d698c93b56bb7c0608d9a7537a3f057239", + "url": "https://api.github.com/repos/laminas/laminas-http/zipball/76de9008f889bc7088f85a41d0d2b06c2b59c53d", + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d", "shasum": "" }, "require": { @@ -2485,20 +2482,20 @@ "type": "community_bridge" } ], - "time": "2022-10-16T15:51:48+00:00" + "time": "2022-11-23T15:45:41+00:00" }, { "name": "laminas/laminas-i18n", - "version": "2.19.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67" + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/ebabca3a6398fc872127bc69a51bda5afc720d67", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/fbd2d0373aaced4769cba2bf3d1425d55f68abb1", + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1", "shasum": "" }, "require": { @@ -2513,18 +2510,18 @@ "zendframework/zend-i18n": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.6", - "laminas/laminas-cache-storage-adapter-memory": "^2.1", + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2.0", "laminas/laminas-cache-storage-deprecated-factory": "^1.0.1", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-config": "^3.7", - "laminas/laminas-eventmanager": "^3.5.0", - "laminas/laminas-filter": "^2.21", - "laminas/laminas-validator": "^2.25", - "laminas/laminas-view": "^2.23", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-eventmanager": "^3.7", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-validator": "^2.28", + "laminas/laminas-view": "^2.25", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-cache": "You should install this package to cache the translations", @@ -2571,32 +2568,32 @@ "type": "community_bridge" } ], - "time": "2022-10-10T15:48:56+00:00" + "time": "2022-12-02T17:15:52+00:00" }, { "name": "laminas/laminas-json", - "version": "3.3.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-json.git", - "reference": "9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f" + "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-json/zipball/9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f", - "reference": "9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f", + "url": "https://api.github.com/repos/laminas/laminas-json/zipball/7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec", + "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-json": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", + "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5.25" }, "suggest": { "laminas/laminas-json-server": "For implementing JSON-RPC servers", @@ -2632,7 +2629,7 @@ "type": "community_bridge" } ], - "time": "2021-09-02T18:02:31+00:00" + "time": "2022-10-17T04:06:45+00:00" }, { "name": "laminas/laminas-loader", @@ -2692,16 +2689,16 @@ }, { "name": "laminas/laminas-mail", - "version": "2.19.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mail.git", - "reference": "edf3832c05165775589af2fc698b5f9984d4c5f1" + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/edf3832c05165775589af2fc698b5f9984d4c5f1", - "reference": "edf3832c05165775589af2fc698b5f9984d4c5f1", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/451b33522a4e7f17e097e45fceea4752c86a2ace", + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace", "shasum": "" }, "require": { @@ -2717,13 +2714,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.8.0", - "laminas/laminas-db": "^2.15.0", - "laminas/laminas-servicemanager": "^3.19", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "laminas/laminas-crypt": "^3.9.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-servicemanager": "^3.20", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.4", "symfony/process": "^6.0.11", - "vimeo/psalm": "^4.29" + "vimeo/psalm": "^5.1" }, "suggest": { "laminas/laminas-crypt": "^3.8 Crammd5 support in SMTP Auth", @@ -2765,32 +2762,32 @@ "type": "community_bridge" } ], - "time": "2022-10-14T13:05:29+00:00" + "time": "2022-12-05T18:42:59+00:00" }, { "name": "laminas/laminas-math", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-math.git", - "reference": "146d8187ab247ae152e811a6704a953d43537381" + "reference": "5770fc632a3614f5526632a8b70f41b65130460e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-math/zipball/146d8187ab247ae152e811a6704a953d43537381", - "reference": "146d8187ab247ae152e811a6704a953d43537381", + "url": "https://api.github.com/repos/laminas/laminas-math/zipball/5770fc632a3614f5526632a8b70f41b65130460e", + "reference": "5770fc632a3614f5526632a8b70f41b65130460e", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-math": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.5.5" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "~9.5.25" }, "suggest": { "ext-bcmath": "If using the bcmath functionality", @@ -2832,7 +2829,7 @@ "type": "community_bridge" } ], - "time": "2021-12-06T02:02:07+00:00" + "time": "2022-10-16T14:22:28+00:00" }, { "name": "laminas/laminas-mime", @@ -2969,16 +2966,16 @@ }, { "name": "laminas/laminas-mvc", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "111e08a9c27274af570260c83abe77204ccf3366" + "reference": "c54eaebe3810feaca834cc38ef0a962c89ff2431" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/111e08a9c27274af570260c83abe77204ccf3366", - "reference": "111e08a9c27274af570260c83abe77204ccf3366", + "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/c54eaebe3810feaca834cc38ef0a962c89ff2431", + "reference": "c54eaebe3810feaca834cc38ef0a962c89ff2431", "shasum": "" }, "require": { @@ -3048,20 +3045,20 @@ "type": "community_bridge" } ], - "time": "2022-10-21T14:19:57+00:00" + "time": "2022-12-05T14:02:56+00:00" }, { "name": "laminas/laminas-oauth", - "version": "2.4.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-oauth.git", - "reference": "8075a5c6b17523cb262ed3a6a3764b3cbf84d781" + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-oauth/zipball/8075a5c6b17523cb262ed3a6a3764b3cbf84d781", - "reference": "8075a5c6b17523cb262ed3a6a3764b3cbf84d781", + "url": "https://api.github.com/repos/laminas/laminas-oauth/zipball/882daa922f3d4f3c1a4282d5c0afeddabefaadb9", + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9", "shasum": "" }, "require": { @@ -3073,7 +3070,7 @@ "laminas/laminas-math": "^3.5", "laminas/laminas-stdlib": "^3.10", "laminas/laminas-uri": "^2.9", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zendoauth": "*" @@ -3110,20 +3107,20 @@ "type": "community_bridge" } ], - "time": "2022-07-22T12:18:05+00:00" + "time": "2022-11-17T10:40:56+00:00" }, { "name": "laminas/laminas-permissions-acl", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-permissions-acl.git", - "reference": "0d88f430953fbcbce382f09090db28905b90d60f" + "reference": "a13454dc3013cdcb388c95c418866e93dc781300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/0d88f430953fbcbce382f09090db28905b90d60f", - "reference": "0d88f430953fbcbce382f09090db28905b90d60f", + "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/a13454dc3013cdcb388c95c418866e93dc781300", + "reference": "a13454dc3013cdcb388c95c418866e93dc781300", "shasum": "" }, "require": { @@ -3136,9 +3133,9 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-servicemanager": "^3.19", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.29" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-servicemanager": "To support Laminas\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage" @@ -3173,37 +3170,38 @@ "type": "community_bridge" } ], - "time": "2022-10-17T04:26:35+00:00" + "time": "2022-12-01T10:29:36+00:00" }, { "name": "laminas/laminas-recaptcha", - "version": "3.4.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-recaptcha.git", - "reference": "f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71" + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-recaptcha/zipball/f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71", - "reference": "f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71", + "url": "https://api.github.com/repos/laminas/laminas-recaptcha/zipball/ead14136a0ded44d1a72f4885df0f3333065d919", + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-http": "^2.15", - "laminas/laminas-json": "^3.3", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zendservice-recaptcha": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-config": "^3.7", "laminas/laminas-validator": "^2.15", - "phpunit/phpunit": "^9.5.4" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-validator": "~2.0, if using ReCaptcha's Mailhide API" @@ -3238,41 +3236,40 @@ "type": "community_bridge" } ], - "time": "2021-11-28T18:10:25+00:00" + "time": "2022-12-05T21:28:54+00:00" }, { "name": "laminas/laminas-router", - "version": "3.5.0", + "version": "3.11.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-router.git", - "reference": "44759e71620030c93d99e40b394fe9fff8f0beda" + "reference": "48b6fccd63b9e04e67781c212bf3bedd75c9ca17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-router/zipball/44759e71620030c93d99e40b394fe9fff8f0beda", - "reference": "44759e71620030c93d99e40b394fe9fff8f0beda", + "url": "https://api.github.com/repos/laminas/laminas-router/zipball/48b6fccd63b9e04e67781c212bf3bedd75c9ca17", + "reference": "48b6fccd63b9e04e67781c212bf3bedd75c9ca17", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "laminas/laminas-http": "^2.15", - "laminas/laminas-servicemanager": "^3.7", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.14.0", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-router": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-i18n": "^2.7.4", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.7" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-i18n": "^2.19.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { - "laminas/laminas-i18n": "^2.7.4, if defining translatable HTTP path segments" + "laminas/laminas-i18n": "^2.15.0 if defining translatable HTTP path segments" }, "type": "library", "extra": { @@ -3310,33 +3307,33 @@ "type": "community_bridge" } ], - "time": "2021-10-13T16:02:43+00:00" + "time": "2022-12-02T17:45:59+00:00" }, { "name": "laminas/laminas-server", - "version": "2.11.1", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-server.git", - "reference": "f45e1a6f614a11af8eff5d2d409f12229101cfc1" + "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-server/zipball/f45e1a6f614a11af8eff5d2d409f12229101cfc1", - "reference": "f45e1a6f614a11af8eff5d2d409f12229101cfc1", + "url": "https://api.github.com/repos/laminas/laminas-server/zipball/11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", + "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", "shasum": "" }, "require": { - "laminas/laminas-code": "^3.5.1 || ^4.0.0", + "laminas/laminas-code": "^4.7.1", "laminas/laminas-stdlib": "^3.3.1", "laminas/laminas-zendframework-bridge": "^1.2.0", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "replace": { "zendframework/zend-server": "^2.8.1" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.4.0", "phpunit/phpunit": "^9.5.5", "psalm/plugin-phpunit": "^0.15.1", "vimeo/psalm": "^4.6.4" @@ -3371,20 +3368,20 @@ "type": "community_bridge" } ], - "time": "2022-02-25T14:41:51+00:00" + "time": "2022-12-09T09:56:49+00:00" }, { "name": "laminas/laminas-servicemanager", - "version": "3.19.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "ed160729bb8721127efdaac799f9a298963345b1" + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", - "reference": "ed160729bb8721127efdaac799f9a298963345b1", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", "shasum": "" }, "require": { @@ -3407,14 +3404,14 @@ "require-dev": { "composer/package-versions-deprecated": "^1.11.99.5", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-container-config-test": "^0.7", + "laminas/laminas-container-config-test": "^0.8", "laminas/laminas-dependency-plugin": "^2.2", "mikey179/vfsstream": "^1.6.11@alpha", "ocramius/proxy-manager": "^2.14.1", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -3461,43 +3458,42 @@ "type": "community_bridge" } ], - "time": "2022-10-10T20:59:22+00:00" + "time": "2022-12-01T17:03:38+00:00" }, { "name": "laminas/laminas-session", - "version": "2.12.1", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-session.git", - "reference": "888c6a344e9a4c9f34ab6e09346640eac9be3fcf" + "reference": "9c845a0361625d5775cad6f043716196201ad41f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-session/zipball/888c6a344e9a4c9f34ab6e09346640eac9be3fcf", - "reference": "888c6a344e9a4c9f34ab6e09346640eac9be3fcf", + "url": "https://api.github.com/repos/laminas/laminas-session/zipball/9c845a0361625d5775cad6f043716196201ad41f", + "reference": "9c845a0361625d5775cad6f043716196201ad41f", "shasum": "" }, "require": { - "laminas/laminas-eventmanager": "^3.4", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-eventmanager": "^3.5", + "laminas/laminas-servicemanager": "^3.15.1", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-session": "*" }, "require-dev": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-cache": "3.0.x-dev", - "laminas/laminas-cache-storage-adapter-memory": "2.0.x-dev", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-db": "^2.13.4", - "laminas/laminas-http": "^2.15", - "laminas/laminas-servicemanager": "^3.7", - "laminas/laminas-validator": "^2.15", - "mongodb/mongodb": "v1.9.x-dev", - "php-mock/php-mock-phpunit": "^1.1.2 || ^2.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.9" + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-db": "^2.15", + "laminas/laminas-http": "^2.17.1", + "laminas/laminas-validator": "^2.28", + "mongodb/mongodb": "~1.13.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component", @@ -3543,20 +3539,20 @@ "type": "community_bridge" } ], - "time": "2022-02-15T16:38:29+00:00" + "time": "2022-12-04T11:15:36+00:00" }, { "name": "laminas/laminas-soap", - "version": "2.10.0", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-soap.git", - "reference": "b1245a09b523485060407f73a0058fb871d2c656" + "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/b1245a09b523485060407f73a0058fb871d2c656", - "reference": "b1245a09b523485060407f73a0058fb871d2c656", + "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/1d3a45071b098062b97ff05b68523fb2fe322f9b", + "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b", "shasum": "" }, "require": { @@ -3565,18 +3561,20 @@ "laminas/laminas-server": "^2.11", "laminas/laminas-stdlib": "^3.6", "laminas/laminas-uri": "^2.9.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "laminas/laminas-code": "<4.4", "zendframework/zend-soap": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", + "laminas/laminas-coding-standard": "~2.4", "laminas/laminas-config": "^3.7", "laminas/laminas-http": "^2.15", "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.5" + "phpunit/phpunit": "^9.5.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.30" }, "suggest": { "ext-curl": "Curl is required when .NET compatibility is required", @@ -3611,20 +3609,20 @@ "type": "community_bridge" } ], - "time": "2021-10-14T14:04:27+00:00" + "time": "2022-11-18T13:09:56+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.15.0", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "shasum": "" }, "require": { @@ -3635,10 +3633,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "autoload": { @@ -3670,33 +3668,35 @@ "type": "community_bridge" } ], - "time": "2022-10-10T19:10:24+00:00" + "time": "2022-12-03T18:48:01+00:00" }, { "name": "laminas/laminas-text", - "version": "2.9.0", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-text.git", - "reference": "8879e75d03e09b0d6787e6680cfa255afd4645a7" + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-text/zipball/8879e75d03e09b0d6787e6680cfa255afd4645a7", - "reference": "8879e75d03e09b0d6787e6680cfa255afd4645a7", + "url": "https://api.github.com/repos/laminas/laminas-text/zipball/40f7acdb284d41553d32db811e704d6e15e415b4", + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4", "shasum": "" }, "require": { - "laminas/laminas-servicemanager": "^3.4", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.19.0", + "laminas/laminas-stdlib": "^3.7.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-text": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.3" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.1" }, "type": "library", "autoload": { @@ -3728,7 +3728,7 @@ "type": "community_bridge" } ], - "time": "2021-09-02T16:50:53+00:00" + "time": "2022-12-11T15:36:27+00:00" }, { "name": "laminas/laminas-uri", @@ -3790,40 +3790,40 @@ }, { "name": "laminas/laminas-validator", - "version": "2.26.0", + "version": "2.29.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc" + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", - "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", "shasum": "" }, "require": { "laminas/laminas-servicemanager": "^3.12.0", "laminas/laminas-stdlib": "^3.13", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/http-message": "^1.0.1" }, "conflict": { "zendframework/zend-validator": "*" }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "laminas/laminas-db": "^2.15.0", - "laminas/laminas-filter": "^2.22", - "laminas/laminas-http": "^2.16.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-http": "^2.18", "laminas/laminas-i18n": "^2.19", - "laminas/laminas-session": "^2.13.0", - "laminas/laminas-uri": "^2.9.1", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "laminas/laminas-session": "^2.15", + "laminas/laminas-uri": "^2.10.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", "psr/http-client": "^1.0.1", "psr/http-factory": "^1.0.1", - "psr/http-message": "^1.0.1", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -3871,68 +3871,63 @@ "type": "community_bridge" } ], - "time": "2022-10-11T12:58:36+00:00" + "time": "2022-12-13T22:53:38+00:00" }, { "name": "laminas/laminas-view", - "version": "2.20.0", + "version": "2.25.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-view.git", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4" + "reference": "77a4b6d78445ae2f30625c5af09a05ad4e4434eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/2cd6973a3e042be3d244260fe93f435668f5c2b4", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4", + "url": "https://api.github.com/repos/laminas/laminas-view/zipball/77a4b6d78445ae2f30625c5af09a05ad4e4434eb", + "reference": "77a4b6d78445ae2f30625c5af09a05ad4e4434eb", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "ext-dom": "*", "ext-filter": "*", "ext-json": "*", "laminas/laminas-escaper": "^2.5", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-json": "^3.3", - "laminas/laminas-servicemanager": "^3.10", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "laminas/laminas-servicemanager": "^3.14.0", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1 || ^2" }, "conflict": { "container-interop/container-interop": "<1.2", "laminas/laminas-router": "<3.0.1", - "laminas/laminas-servicemanager": "<3.3", "laminas/laminas-session": "<2.12", "zendframework/zend-view": "*" }, "require-dev": { - "laminas/laminas-authentication": "^2.5", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-console": "^2.6", - "laminas/laminas-feed": "^2.15", - "laminas/laminas-filter": "^2.13.0", - "laminas/laminas-http": "^2.15", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-modulemanager": "^2.7.1", - "laminas/laminas-mvc": "^3.0", - "laminas/laminas-mvc-i18n": "^1.1", - "laminas/laminas-mvc-plugin-flashmessenger": "^1.5.0", - "laminas/laminas-navigation": "^2.13.1", - "laminas/laminas-paginator": "^2.11.0", - "laminas/laminas-permissions-acl": "^2.6", - "laminas/laminas-router": "^3.0.1", - "laminas/laminas-uri": "^2.5", - "phpspec/prophecy": "^1.12", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.10" + "laminas/laminas-authentication": "^2.13", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-console": "^2.8", + "laminas/laminas-feed": "^2.19", + "laminas/laminas-filter": "^2.25", + "laminas/laminas-http": "^2.17", + "laminas/laminas-i18n": "^2.19", + "laminas/laminas-modulemanager": "^2.14", + "laminas/laminas-mvc": "^3.5", + "laminas/laminas-mvc-i18n": "^1.6", + "laminas/laminas-mvc-plugin-flashmessenger": "^1.9", + "laminas/laminas-navigation": "^2.16", + "laminas/laminas-paginator": "^2.15", + "laminas/laminas-permissions-acl": "^2.12", + "laminas/laminas-router": "^3.10", + "laminas/laminas-uri": "^2.10", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.30" }, "suggest": { "laminas/laminas-authentication": "Laminas\\Authentication component", - "laminas/laminas-escaper": "Laminas\\Escaper component", "laminas/laminas-feed": "Laminas\\Feed component", "laminas/laminas-filter": "Laminas\\Filter component", "laminas/laminas-http": "Laminas\\Http component", @@ -3942,7 +3937,6 @@ "laminas/laminas-navigation": "Laminas\\Navigation component", "laminas/laminas-paginator": "Laminas\\Paginator component", "laminas/laminas-permissions-acl": "Laminas\\Permissions\\Acl component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component", "laminas/laminas-uri": "Laminas\\Uri component" }, "bin": [ @@ -3978,30 +3972,30 @@ "type": "community_bridge" } ], - "time": "2022-02-22T13:52:44+00:00" + "time": "2022-11-07T08:01:13+00:00" }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.5.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab" + "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/7f049390b756d34ba5940a8fb47634fbb51f79ab", - "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/5ef52e26392777a26dbb8f20fe24f91b406459f6", + "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6", "shasum": "" }, "require": { - "php": ">=7.4, <8.2" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.5.14", - "psalm/plugin-phpunit": "^0.15.2", - "squizlabs/php_codesniffer": "^3.6.2", - "vimeo/psalm": "^4.21.0" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.29.0" }, "type": "library", "extra": { @@ -4040,7 +4034,7 @@ "type": "community_bridge" } ], - "time": "2022-02-22T22:17:01+00:00" + "time": "2022-12-12T11:44:10+00:00" }, { "name": "league/flysystem", @@ -4241,43 +4235,43 @@ }, { "name": "magento/composer", - "version": "1.9.0-beta1", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/magento/composer.git", - "reference": "df4458651a0bd075a3fe9856c4d2384b8e37f94b" + "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/df4458651a0bd075a3fe9856c4d2384b8e37f94b", - "reference": "df4458651a0bd075a3fe9856c4d2384b8e37f94b", + "url": "https://api.github.com/repos/magento/composer/zipball/d9ddee3de01a281f40bb44ffc14715ee63164b2a", + "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a", "shasum": "" }, "require": { - "composer/composer": "^1.9 || ^2.0", - "php": "~7.4.0||~8.1.0", + "composer/composer": "^2.0", + "php": "~7.4.0||~8.1.0||~8.2.0", "symfony/console": "~4.4.0||~5.4.0" }, "require-dev": { "phpunit/phpunit": "^9" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { "Magento\\Composer\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "support": { - "issues": "https://github.com/magento/composer/issues", - "source": "https://github.com/magento/composer/tree/1.9.0-beta1" + "source": "https://github.com/magento/composer/tree/develop", + "issues": "https://github.com/magento/composer/issues" }, - "time": "2022-06-23T14:26:38+00:00" + "time": "2022-11-16T14:53:22+00:00" }, { "name": "magento/composer-dependency-version-audit-plugin", @@ -5168,34 +5162,34 @@ }, { "name": "pelago/emogrifier", - "version": "v6.0.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae" + "reference": "547b8c814794aec871e3c98b1c712f416755f4eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/aa72d5407efac118f3896bcb995a2cba793df0ae", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/547b8c814794aec871e3c98b1c712f416755f4eb", + "reference": "547b8c814794aec871e3c98b1c712f416755f4eb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0", - "sabberworm/php-css-parser": "^8.3.1", - "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.3 || ^6.0" + "php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "sabberworm/php-css-parser": "^8.4.0", + "symfony/css-selector": "^4.4.23 || ^5.4.0 || ^6.0.0" }, "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.3.0", - "phpunit/phpunit": "^8.5.16", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpunit/phpunit": "^9.5.25", "rawr/cross-data-providers": "^2.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0.x-dev" + "dev-main": "8.0.x-dev" } }, "autoload": { @@ -5242,7 +5236,7 @@ "issues": "https://github.com/MyIntervals/emogrifier/issues", "source": "https://github.com/MyIntervals/emogrifier" }, - "time": "2021-09-16T16:22:04+00:00" + "time": "2022-11-01T17:53:29+00:00" }, { "name": "php-amqplib/php-amqplib", @@ -8855,16 +8849,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.6", + "version": "v14.11.8", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "6070542725b61fc7d0654a8a9855303e5e157434" + "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6070542725b61fc7d0654a8a9855303e5e157434", - "reference": "6070542725b61fc7d0654a8a9855303e5e157434", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/04a48693acd785330eefd3b0e4fa67df8dfee7c3", + "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3", "shasum": "" }, "require": { @@ -8909,7 +8903,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.6" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.8" }, "funding": [ { @@ -8917,32 +8911,34 @@ "type": "open_collective" } ], - "time": "2022-04-13T16:25:32+00:00" + "time": "2022-09-21T15:35:03+00:00" }, { "name": "wikimedia/less.php", - "version": "v3.1.0", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/wikimedia/less.php.git", - "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13" + "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a486d78b9bd16b72f237fc6093aa56d69ce8bd13", - "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13", + "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a93b0827b650a347f7c694e1e234f8c86efa8812", + "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812", "shasum": "" }, "require": { "php": ">=7.2.9" }, "require-dev": { - "mediawiki/mediawiki-codesniffer": "34.0.0", - "mediawiki/minus-x": "1.0.0", - "php-parallel-lint/php-console-highlighter": "0.5.0", - "php-parallel-lint/php-parallel-lint": "1.2.0", + "mediawiki/mediawiki-codesniffer": "39.0.0", + "mediawiki/mediawiki-phan-config": "0.11.1", + "mediawiki/minus-x": "1.1.1", + "php-parallel-lint/php-console-highlighter": "1.0.0", + "php-parallel-lint/php-parallel-lint": "1.3.2", "phpunit/phpunit": "^8.5" }, + "default-branch": true, "bin": [ "bin/lessc" ], @@ -8955,7 +8951,24 @@ "lessc.inc.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -sp", + "phpunit", + "minus-x check ." + ], + "cover": [ + "phpunit --coverage-text --coverage-html coverage/ --coverage-clover coverage/clover.xml" + ], + "fix": [ + "minus-x fix .", + "phpcbf" + ], + "phan": [ + "phan --allow-polyfill-parser --no-progress-bar" + ] + }, "license": [ "Apache-2.0" ], @@ -8973,7 +8986,7 @@ "homepage": "https://github.com/Mordred" } ], - "description": "PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)", + "description": "PHP port of the LESS processor", "keywords": [ "css", "less", @@ -8983,10 +8996,10 @@ "stylesheet" ], "support": { - "issues": "https://github.com/wikimedia/less.php/issues", - "source": "https://github.com/wikimedia/less.php/tree/v3.1.0" + "source": "https://github.com/wikimedia/less.php/tree/main", + "issues": "https://github.com/wikimedia/less.php/issues" }, - "time": "2020-12-11T19:33:31+00:00" + "time": "2022-12-22T18:23:54+00:00" } ], "packages-dev": [ @@ -10430,25 +10443,24 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.11.2", + "version": "2.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "78846cbce0550ec174508a646f46fd6dee76099b" + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/78846cbce0550ec174508a646f46fd6dee76099b", - "reference": "78846cbce0550ec174508a646f46fd6dee76099b", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/a738cecb420e3bcff34c33177f1ce9f68902695c", + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0" }, "conflict": { - "phpspec/prophecy": "<1.9.0", "zendframework/zend-diactoros": "*" }, "provide": { @@ -10460,13 +10472,12 @@ "ext-dom": "*", "ext-gd": "*", "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.8.0", - "laminas/laminas-coding-standard": "~1.0.0", - "php-http/psr7-integration-tests": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.1", - "psalm/plugin-phpunit": "^0.14.0", - "vimeo/psalm": "^4.3" + "http-interop/http-factory-tests": "^0.9.0", + "laminas/laminas-coding-standard": "^2.4.0", + "php-http/psr7-integration-tests": "^1.2", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "extra": { @@ -10525,7 +10536,7 @@ "type": "community_bridge" } ], - "time": "2022-06-29T14:15:02+00:00" + "time": "2022-12-14T22:31:50+00:00" }, { "name": "lusitanian/oauth", @@ -10600,24 +10611,24 @@ }, { "name": "magento/magento-coding-standard", - "version": "27", + "version": "29", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63" + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63", - "reference": "097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": "^8.1||^8.2", + "php": ">=7.3", "phpcompatibility/php-compatibility": "^9.3", - "rector/rector": "^0.13.0", + "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", "webonyx/graphql-php": "^14.9" }, @@ -10642,9 +10653,9 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v27" + "source": "https://github.com/magento/magento-coding-standard/tree/v29" }, - "time": "2022-10-17T15:19:28+00:00" + "time": "2022-12-21T18:10:47+00:00" }, { "name": "magento/magento2-functional-testing-framework", @@ -11442,21 +11453,21 @@ }, { "name": "phpspec/prophecy", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" @@ -11503,9 +11514,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-11-29T15:06:56+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -11553,16 +11564,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.10", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "25e069474cf00215b0f64c60a26230908ef3eefa" + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/25e069474cf00215b0f64c60a26230908ef3eefa", - "reference": "25e069474cf00215b0f64c60a26230908ef3eefa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", "shasum": "" }, "require": { @@ -11586,9 +11597,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.10" + "source": "https://github.com/phpstan/phpstan/tree/1.9.4" }, "funding": [ { @@ -11599,16 +11614,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-06-03T14:12:23+00:00" + "time": "2022-12-17T13:33:52+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12082,31 +12093,28 @@ }, { "name": "rector/rector", - "version": "0.13.4", + "version": "0.14.8", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd" + "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd", - "reference": "60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/46ee9a173a2b2645ca92a75ffc17460139fa226e", + "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.7.10" + "phpstan/phpstan": "^1.9.0" }, "conflict": { - "phpstan/phpdoc-parser": "<1.2", - "rector/rector-cakephp": "*", "rector/rector-doctrine": "*", - "rector/rector-laravel": "*", - "rector/rector-nette": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-php-parser": "*", "rector/rector-phpoffice": "*", "rector/rector-phpunit": "*", - "rector/rector-prefixed": "*", "rector/rector-symfony": "*" }, "bin": [ @@ -12115,7 +12123,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.13-dev" + "dev-main": "0.14-dev" } }, "autoload": { @@ -12130,7 +12138,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.13.4" + "source": "https://github.com/rectorphp/rector/tree/0.14.8" }, "funding": [ { @@ -12138,7 +12146,7 @@ "type": "github" } ], - "time": "2022-06-04T08:19:56+00:00" + "time": "2022-11-14T14:09:49+00:00" }, { "name": "sebastian/cli-parser", @@ -13242,16 +13250,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -13294,7 +13302,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "symfony/dotenv", @@ -13890,8 +13898,9 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "magento/composer": 10, - "magento/magento-composer-installer": 10 + "magento/composer": 20, + "magento/magento-composer-installer": 10, + "wikimedia/less.php": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index f0aff097b10f5..9b7f4b34a1625 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -16,7 +16,7 @@ class Escaper { /** - * HTML special characters flag + * @var ENT_QUOTES | ENT_SUBSTITUTE */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -96,7 +96,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $string = html_entity_decode($data, ENT_QUOTES, 'UTF-8'); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 7c0f2aa1be76a..30088bb3673f0 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -9,6 +9,12 @@ "config": { "sort-packages": true }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/wikimedia/less.php" + } + ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -51,7 +57,7 @@ "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "^3.0" + "wikimedia/less.php": "dev-main" }, "archive": { "exclude": [ From b9e09daf620a967eef4d0c6a5184f8e4f40f70fc Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 3 Jan 2023 10:30:13 +0530 Subject: [PATCH 368/985] ACQE-4407 | Flaky Test Fix --- .../Test/AdminCurrencyOptionsSystemConfigExpandedTabTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyOptionsSystemConfigExpandedTabTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyOptionsSystemConfigExpandedTabTest.xml index 4e0eb72df3aa5..40cf2c0efc0c6 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyOptionsSystemConfigExpandedTabTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyOptionsSystemConfigExpandedTabTest.xml @@ -28,10 +28,11 @@ <argument name="submenuUiId" value="{{AdminMenuStoresCurrencyCurrencyRates.dataUiId}}"/> </actionGroup> <actionGroup ref="AdminNavigateToCurrencyRatesOptionActionGroup" stepKey="navigateToOptions" /> + <waitForElementVisible selector="{{CurrencySetupSection.currencyOptions}}" stepKey="waitForCurrencyOptionsVisible"/> <grabAttributeFrom selector="{{CurrencySetupSection.currencyOptions}}" userInput="class" stepKey="grabClass"/> <assertStringContainsString stepKey="assertClass"> <actualResult type="string">{$grabClass}</actualResult> <expectedResult type="string">open</expectedResult> </assertStringContainsString> </test> -</tests> \ No newline at end of file +</tests> From dd85112d4ff161fd0ac2a06aa1fba4e4cc251add Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 3 Jan 2023 11:45:58 +0530 Subject: [PATCH 369/985] ACQE-4387 | Flaky Test Fix --- .../Test/AdminMassProductAttributeUpdateAddedToQueueTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductAttributeUpdateAddedToQueueTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductAttributeUpdateAddedToQueueTest.xml index 92fdc02d225a2..fe13603fa6154 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductAttributeUpdateAddedToQueueTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductAttributeUpdateAddedToQueueTest.xml @@ -39,6 +39,7 @@ <argument name="keyword" value="api-simple-product"/> </actionGroup> <actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/> + <waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForSelectThirdProduct"/> <checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="selectThirdProduct"/> <checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="selectSecondProduct"/> <checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('3')}}" stepKey="selectFirstProduct"/> From da3fa892326c83a6b8948c27b9037427ec70603d Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 3 Jan 2023 15:54:17 +0530 Subject: [PATCH 370/985] AC-7422::Incompatible issues fix for PHP8.2 --- app/code/Magento/Sales/Helper/Admin.php | 4 ++-- lib/internal/Magento/Framework/Escaper.php | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index df470b3125e0d..f88e5a9465b79 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - $data = html_entity_decode($data, ENT_QUOTES, 'UTF-8'); + $data = htmlentities($data, ENT_QUOTES | ENT_IGNORE, 'UTF-8', false); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -192,7 +192,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = htmlspecialchars_decode($domDocument->saveHTML(), ENT_QUOTES); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; } diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index 9b7f4b34a1625..fa02e53dc9cad 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -113,7 +113,7 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; } else { @@ -346,6 +346,7 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -366,6 +367,7 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -414,6 +416,7 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -428,6 +431,7 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -443,6 +447,7 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From 7ebffd210789619315f1a5c2b51acdbf5d417c4e Mon Sep 17 00:00:00 2001 From: ashishkumarpundeer <ashish@BLR1-LMC-N73497.local> Date: Tue, 3 Jan 2023 20:58:49 +0530 Subject: [PATCH 371/985] AC:7554:MFTF for validate mini cart decimal quantities items in cart --- .../Section/StorefrontMinicartSection.xml | 1 + ...CountDisplayItemsDecimalQuantitiesTest.xml | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest/StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest.xml diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml index 3482a45b6fa91..f6bdd9e84c196 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml @@ -48,5 +48,6 @@ <element name="productCountLabel" type="text" selector="//*[@id='minicart-content-wrapper']/div[2]/div[1]/span[2]"/> <element name="productCartName" type="text" selector="//tbody[@class='cart item']//strong[@class='product-item-name']//a[contains(text(),'{{var}}')]" parameterized="true"/> <element name="minicartclose" type="button" selector="//button[@id='btn-minicart-close']"/> + <element name="productCountNew" type="text" selector=".minicart-wrapper .action.showcart .counter-number"/> </section> </sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest/StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest/StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest.xml new file mode 100644 index 0000000000000..7aa0259d43621 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest/StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest"> + <annotations> + <stories value="Validate mini cart decimal quantities items in cart"/> + <title value="Checking by adding decimal quantities in mini cart"/> + <description value="Checking by adding decimal quantities in mini cart"/> + <testCaseId value="AC-7554"/> + <severity value="AVERAGE"/> + <group value="checkout"/> + </annotations> + + <before> + <!--Set Display Cart Summary to display items quantities--> + <magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="setDisplayCartSummary"/> + <!--Create simple product--> + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> + <createData entity="SimpleProduct" stepKey="createPreReqSimpleProduct"> + <requiredEntity createDataKey="createPreReqCategory"/> + </createData> + </before> + <after> + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> + <deleteData createDataKey="createPreReqSimpleProduct" stepKey="deletePreReqSimpleProduct"/> + <magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="resetDisplayCartSummary"/> + </after> + <!--Step1. Login as admin. Go to Catalog > Products page. Filtering *prod1*. Open *prod1* to edit--> + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin" /> + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="filterGroupedProductOptions"> + <argument name="product" value="SimpleProduct"/> + </actionGroup> + <click selector="{{AdminProductGridSection.productGridNameProduct('$$createPreReqSimpleProduct.name$$')}}" stepKey="clickOpenProductForEdit"/> + <waitForPageLoad time="30" stepKey="waitForProductEditOpen"/> + <!--Step2. Open *Advanced Inventory* pop-up (Click on *Advanced Inventory* link). Set *Qty Uses Decimals* to *Yes*. Click on button *Done* --> + <actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/> + <scrollTo selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="scrollToQtyUsesDecimalsDropBox"/> + <click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="clickOnQtyUsesDecimalsDropBox"/> + <click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimalsOptions('1')}}" stepKey="chooseYesOnQtyUsesDecimalsDropBox"/> + <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.miniQtyConfigSetting}}" stepKey="uncheckMiniQtyCheckBox"/> + <fillField selector="{{AdminProductFormAdvancedInventorySection.miniQtyAllowedInCart}}" userInput="0.5" stepKey="fillMinAllowedQty"/> + <actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/> + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/> + <!-- Add simpleProduct to cart --> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> + <argument name="productUrl" value="$createPreReqSimpleProduct.custom_attributes[url_key]$"/> + </actionGroup> + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProduct2ToCart"> + <argument name="productName" value="$$createPreReqSimpleProduct.name$$"/> + <argument name="productQty" value="0.5"/> + </actionGroup> + <!-- Open Mini Cart --> + <actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/> + <!-- Assert Products Count in Mini Cart --> + <see selector="{{StorefrontMinicartSection.productCountNew}}" userInput="0.5" stepKey="seeProductCountInCart"/> + </test> +</tests> From a3206659c1351d5e425d916f9076c0fb138c04d5 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Tue, 3 Jan 2023 16:11:40 -0600 Subject: [PATCH 372/985] ACP2E-1264: Bundle options missed in Graphql response when display out of stock products = Yes --- .../GraphQl/Bundle/CategoryListTest.php | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php new file mode 100644 index 0000000000000..2919d2adb9ac4 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Bundle; + +use Magento\Bundle\Test\Fixture\Link as BundleSelectionFixture; +use Magento\Bundle\Test\Fixture\Option as BundleOptionFixture; +use Magento\Bundle\Test\Fixture\Product as BundleProductFixture; +use Magento\Catalog\Test\Fixture\Category as CategoryFixture; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\CatalogInventory\Model\Configuration as CatalogInventoryConfiguration; +use Magento\TestFramework\Fixture\Config as ConfigFixture; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +class CategoryListTest extends GraphQlAbstract +{ + #[ + ConfigFixture(CatalogInventoryConfiguration::XML_PATH_SHOW_OUT_OF_STOCK, '1'), + DataFixture(CategoryFixture::class, ['url_path' => 'cat1'], 'cat1'), + DataFixture(ProductFixture::class, ['sku' => 's1', 'stock_item' => ['is_in_stock' => false]], 's1'), + DataFixture(ProductFixture::class, ['sku' => 's2'], 's2'), + DataFixture(BundleSelectionFixture::class, ['sku' => '$s1.sku$', 'price' => 10, 'price_type' => 0], 'link1'), + DataFixture(BundleSelectionFixture::class, ['sku' => '$s2.sku$', 'price' => 20, 'price_type' => 0], 'link2'), + DataFixture(BundleOptionFixture::class, ['product_links' => ['$link1$', '$link2$']], 'opt1'), + DataFixture( + BundleProductFixture::class, + ['sku' => 'bundle1', 'category_ids' => ['$cat1.id$'], '_options' => ['$opt1$']], + 'bundle1' + ), + ] + public function testOutOfStockBundleSelectionWithEnabledShowOutOfStock(): void + { + $query = $this->getQuery('cat1'); + $response = $this->graphQlQuery($query); + self::assertNotEmpty($response['categoryList']); + $categoryList = $response['categoryList'][0]; + self::assertNotEmpty($categoryList['products']['items']); + $bundle = $categoryList['products']['items'][0]; + self::assertEquals('bundle1', $bundle['sku']); + self::assertCount(2, $bundle['items'][0]['options']); + self::assertEquals('s1', $bundle['items'][0]['options'][0]['product']['sku']); + self::assertEquals('s2', $bundle['items'][0]['options'][1]['product']['sku']); + } + + /** + * @param string $urlPath + * @return string + */ + private function getQuery(string $urlPath): string + { + $query = <<<QUERY +{ + categoryList(filters: {url_path: {eq: "$urlPath"}}) { + id + name + products { + total_count + items { + sku + ... on BundleProduct { + items { + options { + product { + sku + } + } + } + } + } + } + } +} +QUERY; + + return $query; + } +} From 6d2aa01c4f0c127d361b2da55122ef413d99c0bc Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Tue, 3 Jan 2023 18:26:50 -0600 Subject: [PATCH 373/985] ACP2E-1264: Bundle options missed in Graphql response when display out of stock products = Yes --- .../testsuite/Magento/GraphQl/Bundle/CategoryListTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php index 2919d2adb9ac4..dce68d4d99a00 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/CategoryListTest.php @@ -20,7 +20,7 @@ class CategoryListTest extends GraphQlAbstract { #[ - ConfigFixture(CatalogInventoryConfiguration::XML_PATH_SHOW_OUT_OF_STOCK, '1'), + ConfigFixture(CatalogInventoryConfiguration::XML_PATH_SHOW_OUT_OF_STOCK, '1', 'store', 'default'), DataFixture(CategoryFixture::class, ['url_path' => 'cat1'], 'cat1'), DataFixture(ProductFixture::class, ['sku' => 's1', 'stock_item' => ['is_in_stock' => false]], 's1'), DataFixture(ProductFixture::class, ['sku' => 's2'], 's2'), From 34fb7cdb7f2abc1987443163364bd2ce4c9baf54 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:55:56 +0530 Subject: [PATCH 374/985] ACQE-4396 | Flaky Test Fix --- .../Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml index 44a7dc4102e4f..2bcabbd54f49c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml @@ -51,6 +51,7 @@ </actionGroup> <!--Verify that navigation menu categories level is correct--> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage1"/> + <waitForElementVisible selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="waitForTopCategoryVisible"/> <seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="verifyThatTopCategoryIsSubCategoryTwo"/> <moveMouseOver selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="mouseOverSubCategoryTwo"/> <waitForAjaxLoad stepKey="waitForAjaxOnMouseOverSubCategoryTwo"/> From 833e5bf68aa21c4cf9f0778f32c0ef2dca7c6a44 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Wed, 4 Jan 2023 16:02:50 +0530 Subject: [PATCH 375/985] AC-7420::Update the Laminas dependencies in composer file --- composer.json | 16 +- composer.lock | 893 +++++++++++++++++++++++++------------------------- 2 files changed, 464 insertions(+), 445 deletions(-) diff --git a/composer.json b/composer.json index c7e29ce1fa642..e8c9218d0555f 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,16 @@ "preferred-install": "dist", "sort-packages": true }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/magento/composer" + }, + { + "type": "vcs", + "url": "https://github.com/wikimedia/less.php" + } + ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -65,7 +75,7 @@ "laminas/laminas-validator": "^2.23", "league/flysystem": "^2.4", "league/flysystem-aws-s3-v3": "^2.4", - "magento/composer": "^1.9.0-beta1", + "magento/composer": "dev-develop", "magento/composer-dependency-version-audit-plugin": "^0.1", "magento/magento-composer-installer": ">=0.4.0-beta1", "magento/zend-cache": "^1.16", @@ -73,7 +83,7 @@ "magento/zend-pdf": "^1.16", "monolog/monolog": "^2.7", "opensearch-project/opensearch-php": "^1.0 || ^2.0, <2.0.1", - "pelago/emogrifier": "^6.0.0", + "pelago/emogrifier": "^7.0", "php-amqplib/php-amqplib": "^3.2", "phpseclib/mcrypt_compat": "^2.0", "phpseclib/phpseclib": "^3.0", @@ -86,7 +96,7 @@ "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "^3.0" + "wikimedia/less.php": "dev-main" }, "require-dev": { "allure-framework/allure-phpunit": "^2", diff --git a/composer.lock b/composer.lock index 729fcb5297ea4..d17e57f153f48 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": "d81efc84c481cdc95ff549b5c58238f2", + "content-hash": "3a107b29549e30e461a33f438c08e2b5", "packages": [ { "name": "aws/aws-crt-php", @@ -329,16 +329,16 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.13.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "afec8e58ec93d2291c127fa19709a048f28641e5" + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/afec8e58ec93d2291c127fa19709a048f28641e5", - "reference": "afec8e58ec93d2291c127fa19709a048f28641e5", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", "shasum": "" }, "require": { @@ -370,9 +370,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.13.0" + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" }, - "time": "2022-04-07T14:57:22+00:00" + "time": "2022-11-09T01:18:39+00:00" }, { "name": "colinmollenhour/php-redis-session-abstract", @@ -1078,16 +1078,16 @@ }, { "name": "ezimuel/ringphp", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/ezimuel/ringphp.git", - "reference": "92b8161404ab1ad84059ebed41d9f757e897ce74" + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/92b8161404ab1ad84059ebed41d9f757e897ce74", - "reference": "92b8161404ab1ad84059ebed41d9f757e897ce74", + "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/7887fc8488013065f72f977dcb281994f5fde9f4", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4", "shasum": "" }, "require": { @@ -1129,9 +1129,9 @@ ], "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", "support": { - "source": "https://github.com/ezimuel/ringphp/tree/1.2.0" + "source": "https://github.com/ezimuel/ringphp/tree/1.2.2" }, - "time": "2021-11-16T11:51:30+00:00" + "time": "2022-12-07T11:28:53+00:00" }, { "name": "ezyang/htmlpurifier", @@ -1186,24 +1186,24 @@ }, { "name": "fgrosse/phpasn1", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296" + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/eef488991d53e58e60c9554b09b1201ca5ba9296", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296", + "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b", + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b", "shasum": "" }, "require": { - "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "~2.0", - "phpunit/phpunit": "^6.3 || ^7.0 || ^8.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "suggest": { "ext-bcmath": "BCmath is the fallback extension for big integer calculations", @@ -1255,10 +1255,10 @@ ], "support": { "issues": "https://github.com/fgrosse/PHPASN1/issues", - "source": "https://github.com/fgrosse/PHPASN1/tree/v2.4.0" + "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0" }, "abandoned": true, - "time": "2021-12-11T12:41:06+00:00" + "time": "2022-12-19T11:08:26+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1655,35 +1655,35 @@ }, { "name": "laminas/laminas-captcha", - "version": "2.12.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-captcha.git", - "reference": "b07e499a7df73795768aa89e0138757a7ddb9195" + "reference": "de816814f52c67b33db614deb6227d46df531bc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-captcha/zipball/b07e499a7df73795768aa89e0138757a7ddb9195", - "reference": "b07e499a7df73795768aa89e0138757a7ddb9195", + "url": "https://api.github.com/repos/laminas/laminas-captcha/zipball/de816814f52c67b33db614deb6227d46df531bc6", + "reference": "de816814f52c67b33db614deb6227d46df531bc6", "shasum": "" }, "require": { - "laminas/laminas-math": "^2.7 || ^3.0", - "laminas/laminas-recaptcha": "^3.0", + "laminas/laminas-recaptcha": "^3.4.0", "laminas/laminas-session": "^2.12", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-text": "^2.8", - "laminas/laminas-validator": "^2.14", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^3.10.1", + "laminas/laminas-text": "^2.9.0", + "laminas/laminas-validator": "^2.19.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-captcha": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.1.4", - "phpunit/phpunit": "^9.4.3", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.6" + "ext-gd": "*", + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^4.29.0" }, "suggest": { "laminas/laminas-i18n-resources": "Translations of captcha messages" @@ -1718,33 +1718,33 @@ "type": "community_bridge" } ], - "time": "2022-04-07T10:41:09+00:00" + "time": "2022-11-15T23:25:43+00:00" }, { "name": "laminas/laminas-code", - "version": "4.5.2", + "version": "4.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad" + "reference": "dd19fe8e07cc3f374308565667eecd4958c22106" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", - "reference": "da01fb74c08f37e20e7ae49f1e3ee09aa401ebad", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/dd19fe8e07cc3f374308565667eecd4958c22106", + "reference": "dd19fe8e07cc3f374308565667eecd4958c22106", "shasum": "" }, "require": { - "php": ">=7.4, <8.2" + "php": "~8.1.0 || ~8.2.0" }, "require-dev": { - "doctrine/annotations": "^1.13.2", + "doctrine/annotations": "^1.13.3", "ext-phar": "*", "laminas/laminas-coding-standard": "^2.3.0", "laminas/laminas-stdlib": "^3.6.1", - "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.13.1" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.1.0" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", @@ -1752,9 +1752,6 @@ }, "type": "library", "autoload": { - "files": [ - "polyfill/ReflectionEnumPolyfill.php" - ], "psr-4": { "Laminas\\Code\\": "src/" } @@ -1784,26 +1781,26 @@ "type": "community_bridge" } ], - "time": "2022-06-06T11:26:02+00:00" + "time": "2022-12-08T02:08:23+00:00" }, { "name": "laminas/laminas-config", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-config.git", - "reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd" + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-config/zipball/e43d13dcfc273d4392812eb395ce636f73f34dfd", - "reference": "e43d13dcfc273d4392812eb395ce636f73f34dfd", + "url": "https://api.github.com/repos/laminas/laminas-config/zipball/46baad58d0b12cf98539e04334eff40a1fdfb9a0", + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { @@ -1811,11 +1808,11 @@ "zendframework/zend-config": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-filter": "^2.7.2", - "laminas/laminas-i18n": "^2.10.3", - "laminas/laminas-servicemanager": "^3.7", - "phpunit/phpunit": "^9.5.5" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-filter": "~2.23.0", + "laminas/laminas-i18n": "~2.19.0", + "laminas/laminas-servicemanager": "~3.19.0", + "phpunit/phpunit": "~9.5.25" }, "suggest": { "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", @@ -1852,20 +1849,20 @@ "type": "community_bridge" } ], - "time": "2021-10-01T16:07:46+00:00" + "time": "2022-10-16T14:21:22+00:00" }, { "name": "laminas/laminas-crypt", - "version": "3.8.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-crypt.git", - "reference": "0972bb907fd555c16e2a65309b66720acf2b8699" + "reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/0972bb907fd555c16e2a65309b66720acf2b8699", - "reference": "0972bb907fd555c16e2a65309b66720acf2b8699", + "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/56ab1b195dad5456753601ff2e8e3d3fd9392d1a", + "reference": "56ab1b195dad5456753601ff2e8e3d3fd9392d1a", "shasum": "" }, "require": { @@ -1873,15 +1870,15 @@ "laminas/laminas-math": "^3.4", "laminas/laminas-servicemanager": "^3.11.2", "laminas/laminas-stdlib": "^3.6", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.1" }, "conflict": { "zendframework/zend-crypt": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpunit/phpunit": "^9.5.11" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.25" }, "suggest": { "ext-openssl": "Required for most features of Laminas\\Crypt" @@ -1916,35 +1913,35 @@ "type": "community_bridge" } ], - "time": "2022-04-12T14:28:29+00:00" + "time": "2022-10-16T15:51:01+00:00" }, { "name": "laminas/laminas-db", - "version": "2.15.0", + "version": "2.16.3", "source": { "type": "git", "url": "https://github.com/laminas/laminas-db.git", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606" + "reference": "dadd9a19d2f9e89aa59205572b928892b91ff1da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-db/zipball/1125ef2e55108bdfcc1f0030d3a0f9b895e09606", - "reference": "1125ef2e55108bdfcc1f0030d3a0f9b895e09606", + "url": "https://api.github.com/repos/laminas/laminas-db/zipball/dadd9a19d2f9e89aa59205572b928892b91ff1da", + "reference": "dadd9a19d2f9e89aa59205572b928892b91ff1da", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.7.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0|| ~8.2.0" }, "conflict": { "zendframework/zend-db": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-hydrator": "^3.2 || ^4.3", - "laminas/laminas-servicemanager": "^3.7.0", - "phpunit/phpunit": "^9.5.19" + "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-eventmanager": "^3.6.0", + "laminas/laminas-hydrator": "^4.7", + "laminas/laminas-servicemanager": "^3.19.0", + "phpunit/phpunit": "^9.5.25" }, "suggest": { "laminas/laminas-eventmanager": "Laminas\\EventManager component", @@ -1987,42 +1984,42 @@ "type": "community_bridge" } ], - "time": "2022-04-11T13:26:20+00:00" + "time": "2022-12-17T16:31:58+00:00" }, { "name": "laminas/laminas-di", - "version": "3.7.0", + "version": "3.11.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-di.git", - "reference": "80c90d68bc15d4e094a609760144ce1d1aad0a79" + "reference": "45c9dfd57370617d2028e597061c4ef2a2ea0118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-di/zipball/80c90d68bc15d4e094a609760144ce1d1aad0a79", - "reference": "80c90d68bc15d4e094a609760144ce1d1aad0a79", + "url": "https://api.github.com/repos/laminas/laminas-di/zipball/45c9dfd57370617d2028e597061c4ef2a2ea0118", + "reference": "45c9dfd57370617d2028e597061c4ef2a2ea0118", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.6", - "php": ">=7.4, <8.2", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.1.1", - "psr/log": "^1.1.4" + "psr/log": "^1.1.4 || ^3.0.0" }, "conflict": { + "laminas/laminas-servicemanager": "<3.13.0", "laminas/laminas-servicemanager-di": "*", - "phpspec/prophecy": "<1.9.0", "zendframework/zend-di": "*" }, "require-dev": { - "container-interop/container-interop": "^1.2.0", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-servicemanager": "^3.7", - "mikey179/vfsstream": "^1.6.10@alpha", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.5", - "squizlabs/php_codesniffer": "^3.6" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-servicemanager": "^3.12", + "mikey179/vfsstream": "^1.6.11@alpha", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.16.1", + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.10" }, "suggest": { "laminas/laminas-servicemanager": "An IoC container without auto wiring capabilities" @@ -2064,7 +2061,7 @@ "type": "community_bridge" } ], - "time": "2022-05-15T18:19:36+00:00" + "time": "2022-11-25T10:24:48+00:00" }, { "name": "laminas/laminas-escaper", @@ -2130,16 +2127,16 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.6.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308" + "reference": "74c091fb0da37744e7d215ef5bd3564c77f6385e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/3f1afbad86cd34a431fdc069f265cfe6f8fc8308", - "reference": "3f1afbad86cd34a431fdc069f265cfe6f8fc8308", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/74c091fb0da37744e7d215ef5bd3564c77f6385e", + "reference": "74c091fb0da37744e7d215ef5bd3564c77f6385e", "shasum": "" }, "require": { @@ -2152,11 +2149,11 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-stdlib": "^3.15", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", "psr/container": "^1.1.2 || ^2.0.2", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", @@ -2194,20 +2191,20 @@ "type": "community_bridge" } ], - "time": "2022-10-11T12:46:13+00:00" + "time": "2022-12-10T16:36:52+00:00" }, { "name": "laminas/laminas-feed", - "version": "2.19.0", + "version": "2.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-feed.git", - "reference": "4d0a7a536b48f698914156ca6633104b3aef2f3b" + "reference": "508ebef6e622f2f2ce3dd0559739ffd0dfa3b938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/4d0a7a536b48f698914156ca6633104b3aef2f3b", - "reference": "4d0a7a536b48f698914156ca6633104b3aef2f3b", + "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/508ebef6e622f2f2ce3dd0559739ffd0dfa3b938", + "reference": "508ebef6e622f2f2ce3dd0559739ffd0dfa3b938", "shasum": "" }, "require": { @@ -2227,12 +2224,12 @@ "laminas/laminas-cache-storage-adapter-memory": "^1.1.0 || ^2.1", "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-db": "^2.15", - "laminas/laminas-http": "^2.16", + "laminas/laminas-http": "^2.17.0", "laminas/laminas-validator": "^2.26", "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "psalm/plugin-phpunit": "^0.18.0", "psr/http-message": "^1.0.1", - "vimeo/psalm": "^4.29" + "vimeo/psalm": "^5.1.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component, for optionally caching feeds between requests", @@ -2274,25 +2271,25 @@ "type": "community_bridge" } ], - "time": "2022-10-14T13:40:45+00:00" + "time": "2022-12-03T19:40:30+00:00" }, { "name": "laminas/laminas-file", - "version": "2.11.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-file.git", - "reference": "8eebc51715188032161fbafeae22a618af16bdb3" + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-file/zipball/8eebc51715188032161fbafeae22a618af16bdb3", - "reference": "8eebc51715188032161fbafeae22a618af16bdb3", + "url": "https://api.github.com/repos/laminas/laminas-file/zipball/9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", "shasum": "" }, "require": { - "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^2.7.7 || ^3.15.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-file": "*" @@ -2342,20 +2339,20 @@ "type": "community_bridge" } ], - "time": "2022-02-15T07:34:03+00:00" + "time": "2022-11-21T06:59:25+00:00" }, { "name": "laminas/laminas-filter", - "version": "2.23.0", + "version": "2.30.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731" + "reference": "97e3ce0fa868567aa433ed34d6f57ee703d70d3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/41cff2f850753f0bb3fc75c5ce011fcad6aa1731", - "reference": "41cff2f850753f0bb3fc75c5ce011fcad6aa1731", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/97e3ce0fa868567aa433ed34d6f57ee703d70d3e", + "reference": "97e3ce0fa868567aa433ed34d6f57ee703d70d3e", "shasum": "" }, "require": { @@ -2370,13 +2367,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.8", - "laminas/laminas-uri": "^2.9.1", + "laminas/laminas-crypt": "^3.9", + "laminas/laminas-uri": "^2.10", "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "^0.18.4", "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.3" }, "suggest": { "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", @@ -2420,20 +2417,20 @@ "type": "community_bridge" } ], - "time": "2022-10-11T10:04:14+00:00" + "time": "2022-12-19T17:34:24+00:00" }, { "name": "laminas/laminas-http", - "version": "2.17.0", + "version": "2.18.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-http.git", - "reference": "ac4588d698c93b56bb7c0608d9a7537a3f057239" + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-http/zipball/ac4588d698c93b56bb7c0608d9a7537a3f057239", - "reference": "ac4588d698c93b56bb7c0608d9a7537a3f057239", + "url": "https://api.github.com/repos/laminas/laminas-http/zipball/76de9008f889bc7088f85a41d0d2b06c2b59c53d", + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d", "shasum": "" }, "require": { @@ -2485,20 +2482,20 @@ "type": "community_bridge" } ], - "time": "2022-10-16T15:51:48+00:00" + "time": "2022-11-23T15:45:41+00:00" }, { "name": "laminas/laminas-i18n", - "version": "2.19.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67" + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/ebabca3a6398fc872127bc69a51bda5afc720d67", - "reference": "ebabca3a6398fc872127bc69a51bda5afc720d67", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/fbd2d0373aaced4769cba2bf3d1425d55f68abb1", + "reference": "fbd2d0373aaced4769cba2bf3d1425d55f68abb1", "shasum": "" }, "require": { @@ -2513,18 +2510,18 @@ "zendframework/zend-i18n": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.6", - "laminas/laminas-cache-storage-adapter-memory": "^2.1", + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2.0", "laminas/laminas-cache-storage-deprecated-factory": "^1.0.1", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-config": "^3.7", - "laminas/laminas-eventmanager": "^3.5.0", - "laminas/laminas-filter": "^2.21", - "laminas/laminas-validator": "^2.25", - "laminas/laminas-view": "^2.23", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-eventmanager": "^3.7", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-validator": "^2.28", + "laminas/laminas-view": "^2.25", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-cache": "You should install this package to cache the translations", @@ -2571,32 +2568,32 @@ "type": "community_bridge" } ], - "time": "2022-10-10T15:48:56+00:00" + "time": "2022-12-02T17:15:52+00:00" }, { "name": "laminas/laminas-json", - "version": "3.3.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-json.git", - "reference": "9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f" + "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-json/zipball/9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f", - "reference": "9a0ce9f330b7d11e70c4acb44d67e8c4f03f437f", + "url": "https://api.github.com/repos/laminas/laminas-json/zipball/7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec", + "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-json": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", + "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-stdlib": "^2.7.7 || ^3.1", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5.25" }, "suggest": { "laminas/laminas-json-server": "For implementing JSON-RPC servers", @@ -2632,7 +2629,7 @@ "type": "community_bridge" } ], - "time": "2021-09-02T18:02:31+00:00" + "time": "2022-10-17T04:06:45+00:00" }, { "name": "laminas/laminas-loader", @@ -2692,16 +2689,16 @@ }, { "name": "laminas/laminas-mail", - "version": "2.19.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mail.git", - "reference": "edf3832c05165775589af2fc698b5f9984d4c5f1" + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/edf3832c05165775589af2fc698b5f9984d4c5f1", - "reference": "edf3832c05165775589af2fc698b5f9984d4c5f1", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/451b33522a4e7f17e097e45fceea4752c86a2ace", + "reference": "451b33522a4e7f17e097e45fceea4752c86a2ace", "shasum": "" }, "require": { @@ -2717,13 +2714,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.8.0", - "laminas/laminas-db": "^2.15.0", - "laminas/laminas-servicemanager": "^3.19", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "laminas/laminas-crypt": "^3.9.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-servicemanager": "^3.20", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.4", "symfony/process": "^6.0.11", - "vimeo/psalm": "^4.29" + "vimeo/psalm": "^5.1" }, "suggest": { "laminas/laminas-crypt": "^3.8 Crammd5 support in SMTP Auth", @@ -2765,32 +2762,32 @@ "type": "community_bridge" } ], - "time": "2022-10-14T13:05:29+00:00" + "time": "2022-12-05T18:42:59+00:00" }, { "name": "laminas/laminas-math", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-math.git", - "reference": "146d8187ab247ae152e811a6704a953d43537381" + "reference": "5770fc632a3614f5526632a8b70f41b65130460e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-math/zipball/146d8187ab247ae152e811a6704a953d43537381", - "reference": "146d8187ab247ae152e811a6704a953d43537381", + "url": "https://api.github.com/repos/laminas/laminas-math/zipball/5770fc632a3614f5526632a8b70f41b65130460e", + "reference": "5770fc632a3614f5526632a8b70f41b65130460e", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-math": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.5.5" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "~9.5.25" }, "suggest": { "ext-bcmath": "If using the bcmath functionality", @@ -2832,7 +2829,7 @@ "type": "community_bridge" } ], - "time": "2021-12-06T02:02:07+00:00" + "time": "2022-10-16T14:22:28+00:00" }, { "name": "laminas/laminas-mime", @@ -2969,16 +2966,16 @@ }, { "name": "laminas/laminas-mvc", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "111e08a9c27274af570260c83abe77204ccf3366" + "reference": "c54eaebe3810feaca834cc38ef0a962c89ff2431" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/111e08a9c27274af570260c83abe77204ccf3366", - "reference": "111e08a9c27274af570260c83abe77204ccf3366", + "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/c54eaebe3810feaca834cc38ef0a962c89ff2431", + "reference": "c54eaebe3810feaca834cc38ef0a962c89ff2431", "shasum": "" }, "require": { @@ -3048,20 +3045,20 @@ "type": "community_bridge" } ], - "time": "2022-10-21T14:19:57+00:00" + "time": "2022-12-05T14:02:56+00:00" }, { "name": "laminas/laminas-oauth", - "version": "2.4.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-oauth.git", - "reference": "8075a5c6b17523cb262ed3a6a3764b3cbf84d781" + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-oauth/zipball/8075a5c6b17523cb262ed3a6a3764b3cbf84d781", - "reference": "8075a5c6b17523cb262ed3a6a3764b3cbf84d781", + "url": "https://api.github.com/repos/laminas/laminas-oauth/zipball/882daa922f3d4f3c1a4282d5c0afeddabefaadb9", + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9", "shasum": "" }, "require": { @@ -3073,7 +3070,7 @@ "laminas/laminas-math": "^3.5", "laminas/laminas-stdlib": "^3.10", "laminas/laminas-uri": "^2.9", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zendoauth": "*" @@ -3110,20 +3107,20 @@ "type": "community_bridge" } ], - "time": "2022-07-22T12:18:05+00:00" + "time": "2022-11-17T10:40:56+00:00" }, { "name": "laminas/laminas-permissions-acl", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-permissions-acl.git", - "reference": "0d88f430953fbcbce382f09090db28905b90d60f" + "reference": "a13454dc3013cdcb388c95c418866e93dc781300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/0d88f430953fbcbce382f09090db28905b90d60f", - "reference": "0d88f430953fbcbce382f09090db28905b90d60f", + "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/a13454dc3013cdcb388c95c418866e93dc781300", + "reference": "a13454dc3013cdcb388c95c418866e93dc781300", "shasum": "" }, "require": { @@ -3136,9 +3133,9 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-servicemanager": "^3.19", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.29" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-servicemanager": "To support Laminas\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage" @@ -3173,37 +3170,38 @@ "type": "community_bridge" } ], - "time": "2022-10-17T04:26:35+00:00" + "time": "2022-12-01T10:29:36+00:00" }, { "name": "laminas/laminas-recaptcha", - "version": "3.4.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-recaptcha.git", - "reference": "f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71" + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-recaptcha/zipball/f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71", - "reference": "f3bdb2fcaf859b9f725f397dc1bc38b4a7696a71", + "url": "https://api.github.com/repos/laminas/laminas-recaptcha/zipball/ead14136a0ded44d1a72f4885df0f3333065d919", + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-http": "^2.15", - "laminas/laminas-json": "^3.3", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zendservice-recaptcha": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-config": "^3.7", "laminas/laminas-validator": "^2.15", - "phpunit/phpunit": "^9.5.4" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "laminas/laminas-validator": "~2.0, if using ReCaptcha's Mailhide API" @@ -3238,41 +3236,40 @@ "type": "community_bridge" } ], - "time": "2021-11-28T18:10:25+00:00" + "time": "2022-12-05T21:28:54+00:00" }, { "name": "laminas/laminas-router", - "version": "3.5.0", + "version": "3.11.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-router.git", - "reference": "44759e71620030c93d99e40b394fe9fff8f0beda" + "reference": "48b6fccd63b9e04e67781c212bf3bedd75c9ca17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-router/zipball/44759e71620030c93d99e40b394fe9fff8f0beda", - "reference": "44759e71620030c93d99e40b394fe9fff8f0beda", + "url": "https://api.github.com/repos/laminas/laminas-router/zipball/48b6fccd63b9e04e67781c212bf3bedd75c9ca17", + "reference": "48b6fccd63b9e04e67781c212bf3bedd75c9ca17", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "laminas/laminas-http": "^2.15", - "laminas/laminas-servicemanager": "^3.7", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.14.0", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-router": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-i18n": "^2.7.4", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.7" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-i18n": "^2.19.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { - "laminas/laminas-i18n": "^2.7.4, if defining translatable HTTP path segments" + "laminas/laminas-i18n": "^2.15.0 if defining translatable HTTP path segments" }, "type": "library", "extra": { @@ -3310,33 +3307,33 @@ "type": "community_bridge" } ], - "time": "2021-10-13T16:02:43+00:00" + "time": "2022-12-02T17:45:59+00:00" }, { "name": "laminas/laminas-server", - "version": "2.11.1", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-server.git", - "reference": "f45e1a6f614a11af8eff5d2d409f12229101cfc1" + "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-server/zipball/f45e1a6f614a11af8eff5d2d409f12229101cfc1", - "reference": "f45e1a6f614a11af8eff5d2d409f12229101cfc1", + "url": "https://api.github.com/repos/laminas/laminas-server/zipball/11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", + "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", "shasum": "" }, "require": { - "laminas/laminas-code": "^3.5.1 || ^4.0.0", + "laminas/laminas-code": "^4.7.1", "laminas/laminas-stdlib": "^3.3.1", "laminas/laminas-zendframework-bridge": "^1.2.0", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "replace": { "zendframework/zend-server": "^2.8.1" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "~2.4.0", "phpunit/phpunit": "^9.5.5", "psalm/plugin-phpunit": "^0.15.1", "vimeo/psalm": "^4.6.4" @@ -3371,20 +3368,20 @@ "type": "community_bridge" } ], - "time": "2022-02-25T14:41:51+00:00" + "time": "2022-12-09T09:56:49+00:00" }, { "name": "laminas/laminas-servicemanager", - "version": "3.19.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "ed160729bb8721127efdaac799f9a298963345b1" + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", - "reference": "ed160729bb8721127efdaac799f9a298963345b1", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", + "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", "shasum": "" }, "require": { @@ -3407,14 +3404,14 @@ "require-dev": { "composer/package-versions-deprecated": "^1.11.99.5", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-container-config-test": "^0.7", + "laminas/laminas-container-config-test": "^0.8", "laminas/laminas-dependency-plugin": "^2.2", "mikey179/vfsstream": "^1.6.11@alpha", "ocramius/proxy-manager": "^2.14.1", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -3461,43 +3458,42 @@ "type": "community_bridge" } ], - "time": "2022-10-10T20:59:22+00:00" + "time": "2022-12-01T17:03:38+00:00" }, { "name": "laminas/laminas-session", - "version": "2.12.1", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-session.git", - "reference": "888c6a344e9a4c9f34ab6e09346640eac9be3fcf" + "reference": "9c845a0361625d5775cad6f043716196201ad41f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-session/zipball/888c6a344e9a4c9f34ab6e09346640eac9be3fcf", - "reference": "888c6a344e9a4c9f34ab6e09346640eac9be3fcf", + "url": "https://api.github.com/repos/laminas/laminas-session/zipball/9c845a0361625d5775cad6f043716196201ad41f", + "reference": "9c845a0361625d5775cad6f043716196201ad41f", "shasum": "" }, "require": { - "laminas/laminas-eventmanager": "^3.4", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-eventmanager": "^3.5", + "laminas/laminas-servicemanager": "^3.15.1", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-session": "*" }, "require-dev": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-cache": "3.0.x-dev", - "laminas/laminas-cache-storage-adapter-memory": "2.0.x-dev", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-db": "^2.13.4", - "laminas/laminas-http": "^2.15", - "laminas/laminas-servicemanager": "^3.7", - "laminas/laminas-validator": "^2.15", - "mongodb/mongodb": "v1.9.x-dev", - "php-mock/php-mock-phpunit": "^1.1.2 || ^2.0", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.9" + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-db": "^2.15", + "laminas/laminas-http": "^2.17.1", + "laminas/laminas-validator": "^2.28", + "mongodb/mongodb": "~1.13.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component", @@ -3543,20 +3539,20 @@ "type": "community_bridge" } ], - "time": "2022-02-15T16:38:29+00:00" + "time": "2022-12-04T11:15:36+00:00" }, { "name": "laminas/laminas-soap", - "version": "2.10.0", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-soap.git", - "reference": "b1245a09b523485060407f73a0058fb871d2c656" + "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/b1245a09b523485060407f73a0058fb871d2c656", - "reference": "b1245a09b523485060407f73a0058fb871d2c656", + "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/1d3a45071b098062b97ff05b68523fb2fe322f9b", + "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b", "shasum": "" }, "require": { @@ -3565,18 +3561,20 @@ "laminas/laminas-server": "^2.11", "laminas/laminas-stdlib": "^3.6", "laminas/laminas-uri": "^2.9.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "laminas/laminas-code": "<4.4", "zendframework/zend-soap": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", + "laminas/laminas-coding-standard": "~2.4", "laminas/laminas-config": "^3.7", "laminas/laminas-http": "^2.15", "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.5" + "phpunit/phpunit": "^9.5.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.30" }, "suggest": { "ext-curl": "Curl is required when .NET compatibility is required", @@ -3611,20 +3609,20 @@ "type": "community_bridge" } ], - "time": "2021-10-14T14:04:27+00:00" + "time": "2022-11-18T13:09:56+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.15.0", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", - "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "shasum": "" }, "require": { @@ -3635,10 +3633,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "phpbench/phpbench": "^1.2.6", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.28" + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "autoload": { @@ -3670,33 +3668,35 @@ "type": "community_bridge" } ], - "time": "2022-10-10T19:10:24+00:00" + "time": "2022-12-03T18:48:01+00:00" }, { "name": "laminas/laminas-text", - "version": "2.9.0", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-text.git", - "reference": "8879e75d03e09b0d6787e6680cfa255afd4645a7" + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-text/zipball/8879e75d03e09b0d6787e6680cfa255afd4645a7", - "reference": "8879e75d03e09b0d6787e6680cfa255afd4645a7", + "url": "https://api.github.com/repos/laminas/laminas-text/zipball/40f7acdb284d41553d32db811e704d6e15e415b4", + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4", "shasum": "" }, "require": { - "laminas/laminas-servicemanager": "^3.4", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.19.0", + "laminas/laminas-stdlib": "^3.7.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-text": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^9.3" + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.1" }, "type": "library", "autoload": { @@ -3728,7 +3728,7 @@ "type": "community_bridge" } ], - "time": "2021-09-02T16:50:53+00:00" + "time": "2022-12-11T15:36:27+00:00" }, { "name": "laminas/laminas-uri", @@ -3790,40 +3790,40 @@ }, { "name": "laminas/laminas-validator", - "version": "2.26.0", + "version": "2.29.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc" + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", - "reference": "a995b21d18c63cd1f5d123d0d2cd31a1c2d828dc", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", + "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850", "shasum": "" }, "require": { "laminas/laminas-servicemanager": "^3.12.0", "laminas/laminas-stdlib": "^3.13", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/http-message": "^1.0.1" }, "conflict": { "zendframework/zend-validator": "*" }, "require-dev": { "laminas/laminas-coding-standard": "^2.4.0", - "laminas/laminas-db": "^2.15.0", - "laminas/laminas-filter": "^2.22", - "laminas/laminas-http": "^2.16.0", + "laminas/laminas-db": "^2.16", + "laminas/laminas-filter": "^2.28.1", + "laminas/laminas-http": "^2.18", "laminas/laminas-i18n": "^2.19", - "laminas/laminas-session": "^2.13.0", - "laminas/laminas-uri": "^2.9.1", - "phpunit/phpunit": "^9.5.25", - "psalm/plugin-phpunit": "^0.17.0", + "laminas/laminas-session": "^2.15", + "laminas/laminas-uri": "^2.10.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", "psr/http-client": "^1.0.1", "psr/http-factory": "^1.0.1", - "psr/http-message": "^1.0.1", - "vimeo/psalm": "^4.28" + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -3871,68 +3871,63 @@ "type": "community_bridge" } ], - "time": "2022-10-11T12:58:36+00:00" + "time": "2022-12-13T22:53:38+00:00" }, { "name": "laminas/laminas-view", - "version": "2.20.0", + "version": "2.25.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-view.git", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4" + "reference": "77a4b6d78445ae2f30625c5af09a05ad4e4434eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/2cd6973a3e042be3d244260fe93f435668f5c2b4", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4", + "url": "https://api.github.com/repos/laminas/laminas-view/zipball/77a4b6d78445ae2f30625c5af09a05ad4e4434eb", + "reference": "77a4b6d78445ae2f30625c5af09a05ad4e4434eb", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "ext-dom": "*", "ext-filter": "*", "ext-json": "*", "laminas/laminas-escaper": "^2.5", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-json": "^3.3", - "laminas/laminas-servicemanager": "^3.10", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "laminas/laminas-servicemanager": "^3.14.0", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1 || ^2" }, "conflict": { "container-interop/container-interop": "<1.2", "laminas/laminas-router": "<3.0.1", - "laminas/laminas-servicemanager": "<3.3", "laminas/laminas-session": "<2.12", "zendframework/zend-view": "*" }, "require-dev": { - "laminas/laminas-authentication": "^2.5", - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-console": "^2.6", - "laminas/laminas-feed": "^2.15", - "laminas/laminas-filter": "^2.13.0", - "laminas/laminas-http": "^2.15", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-modulemanager": "^2.7.1", - "laminas/laminas-mvc": "^3.0", - "laminas/laminas-mvc-i18n": "^1.1", - "laminas/laminas-mvc-plugin-flashmessenger": "^1.5.0", - "laminas/laminas-navigation": "^2.13.1", - "laminas/laminas-paginator": "^2.11.0", - "laminas/laminas-permissions-acl": "^2.6", - "laminas/laminas-router": "^3.0.1", - "laminas/laminas-uri": "^2.5", - "phpspec/prophecy": "^1.12", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.10" + "laminas/laminas-authentication": "^2.13", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-console": "^2.8", + "laminas/laminas-feed": "^2.19", + "laminas/laminas-filter": "^2.25", + "laminas/laminas-http": "^2.17", + "laminas/laminas-i18n": "^2.19", + "laminas/laminas-modulemanager": "^2.14", + "laminas/laminas-mvc": "^3.5", + "laminas/laminas-mvc-i18n": "^1.6", + "laminas/laminas-mvc-plugin-flashmessenger": "^1.9", + "laminas/laminas-navigation": "^2.16", + "laminas/laminas-paginator": "^2.15", + "laminas/laminas-permissions-acl": "^2.12", + "laminas/laminas-router": "^3.10", + "laminas/laminas-uri": "^2.10", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.30" }, "suggest": { "laminas/laminas-authentication": "Laminas\\Authentication component", - "laminas/laminas-escaper": "Laminas\\Escaper component", "laminas/laminas-feed": "Laminas\\Feed component", "laminas/laminas-filter": "Laminas\\Filter component", "laminas/laminas-http": "Laminas\\Http component", @@ -3942,7 +3937,6 @@ "laminas/laminas-navigation": "Laminas\\Navigation component", "laminas/laminas-paginator": "Laminas\\Paginator component", "laminas/laminas-permissions-acl": "Laminas\\Permissions\\Acl component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component", "laminas/laminas-uri": "Laminas\\Uri component" }, "bin": [ @@ -3978,30 +3972,30 @@ "type": "community_bridge" } ], - "time": "2022-02-22T13:52:44+00:00" + "time": "2022-11-07T08:01:13+00:00" }, { "name": "laminas/laminas-zendframework-bridge", - "version": "1.5.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab" + "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/7f049390b756d34ba5940a8fb47634fbb51f79ab", - "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/5ef52e26392777a26dbb8f20fe24f91b406459f6", + "reference": "5ef52e26392777a26dbb8f20fe24f91b406459f6", "shasum": "" }, "require": { - "php": ">=7.4, <8.2" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.5.14", - "psalm/plugin-phpunit": "^0.15.2", - "squizlabs/php_codesniffer": "^3.6.2", - "vimeo/psalm": "^4.21.0" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "squizlabs/php_codesniffer": "^3.7.1", + "vimeo/psalm": "^4.29.0" }, "type": "library", "extra": { @@ -4040,7 +4034,7 @@ "type": "community_bridge" } ], - "time": "2022-02-22T22:17:01+00:00" + "time": "2022-12-12T11:44:10+00:00" }, { "name": "league/flysystem", @@ -4241,43 +4235,43 @@ }, { "name": "magento/composer", - "version": "1.9.0-beta1", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/magento/composer.git", - "reference": "df4458651a0bd075a3fe9856c4d2384b8e37f94b" + "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/df4458651a0bd075a3fe9856c4d2384b8e37f94b", - "reference": "df4458651a0bd075a3fe9856c4d2384b8e37f94b", + "url": "https://api.github.com/repos/magento/composer/zipball/d9ddee3de01a281f40bb44ffc14715ee63164b2a", + "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a", "shasum": "" }, "require": { - "composer/composer": "^1.9 || ^2.0", - "php": "~7.4.0||~8.1.0", + "composer/composer": "^2.0", + "php": "~7.4.0||~8.1.0||~8.2.0", "symfony/console": "~4.4.0||~5.4.0" }, "require-dev": { "phpunit/phpunit": "^9" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { "Magento\\Composer\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "support": { - "issues": "https://github.com/magento/composer/issues", - "source": "https://github.com/magento/composer/tree/1.9.0-beta1" + "source": "https://github.com/magento/composer/tree/develop", + "issues": "https://github.com/magento/composer/issues" }, - "time": "2022-06-23T14:26:38+00:00" + "time": "2022-11-16T14:53:22+00:00" }, { "name": "magento/composer-dependency-version-audit-plugin", @@ -5168,34 +5162,34 @@ }, { "name": "pelago/emogrifier", - "version": "v6.0.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae" + "reference": "547b8c814794aec871e3c98b1c712f416755f4eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/aa72d5407efac118f3896bcb995a2cba793df0ae", - "reference": "aa72d5407efac118f3896bcb995a2cba793df0ae", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/547b8c814794aec871e3c98b1c712f416755f4eb", + "reference": "547b8c814794aec871e3c98b1c712f416755f4eb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0", - "sabberworm/php-css-parser": "^8.3.1", - "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.3 || ^6.0" + "php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "sabberworm/php-css-parser": "^8.4.0", + "symfony/css-selector": "^4.4.23 || ^5.4.0 || ^6.0.0" }, "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.3.0", - "phpunit/phpunit": "^8.5.16", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpunit/phpunit": "^9.5.25", "rawr/cross-data-providers": "^2.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0.x-dev" + "dev-main": "8.0.x-dev" } }, "autoload": { @@ -5242,7 +5236,7 @@ "issues": "https://github.com/MyIntervals/emogrifier/issues", "source": "https://github.com/MyIntervals/emogrifier" }, - "time": "2021-09-16T16:22:04+00:00" + "time": "2022-11-01T17:53:29+00:00" }, { "name": "php-amqplib/php-amqplib", @@ -8855,16 +8849,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.6", + "version": "v14.11.8", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "6070542725b61fc7d0654a8a9855303e5e157434" + "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6070542725b61fc7d0654a8a9855303e5e157434", - "reference": "6070542725b61fc7d0654a8a9855303e5e157434", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/04a48693acd785330eefd3b0e4fa67df8dfee7c3", + "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3", "shasum": "" }, "require": { @@ -8909,7 +8903,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.6" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.8" }, "funding": [ { @@ -8917,32 +8911,34 @@ "type": "open_collective" } ], - "time": "2022-04-13T16:25:32+00:00" + "time": "2022-09-21T15:35:03+00:00" }, { "name": "wikimedia/less.php", - "version": "v3.1.0", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/wikimedia/less.php.git", - "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13" + "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a486d78b9bd16b72f237fc6093aa56d69ce8bd13", - "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13", + "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a93b0827b650a347f7c694e1e234f8c86efa8812", + "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812", "shasum": "" }, "require": { "php": ">=7.2.9" }, "require-dev": { - "mediawiki/mediawiki-codesniffer": "34.0.0", - "mediawiki/minus-x": "1.0.0", - "php-parallel-lint/php-console-highlighter": "0.5.0", - "php-parallel-lint/php-parallel-lint": "1.2.0", + "mediawiki/mediawiki-codesniffer": "39.0.0", + "mediawiki/mediawiki-phan-config": "0.11.1", + "mediawiki/minus-x": "1.1.1", + "php-parallel-lint/php-console-highlighter": "1.0.0", + "php-parallel-lint/php-parallel-lint": "1.3.2", "phpunit/phpunit": "^8.5" }, + "default-branch": true, "bin": [ "bin/lessc" ], @@ -8955,7 +8951,24 @@ "lessc.inc.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -sp", + "phpunit", + "minus-x check ." + ], + "cover": [ + "phpunit --coverage-text --coverage-html coverage/ --coverage-clover coverage/clover.xml" + ], + "fix": [ + "minus-x fix .", + "phpcbf" + ], + "phan": [ + "phan --allow-polyfill-parser --no-progress-bar" + ] + }, "license": [ "Apache-2.0" ], @@ -8973,7 +8986,7 @@ "homepage": "https://github.com/Mordred" } ], - "description": "PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)", + "description": "PHP port of the LESS processor", "keywords": [ "css", "less", @@ -8983,10 +8996,10 @@ "stylesheet" ], "support": { - "issues": "https://github.com/wikimedia/less.php/issues", - "source": "https://github.com/wikimedia/less.php/tree/v3.1.0" + "source": "https://github.com/wikimedia/less.php/tree/main", + "issues": "https://github.com/wikimedia/less.php/issues" }, - "time": "2020-12-11T19:33:31+00:00" + "time": "2022-12-22T18:23:54+00:00" } ], "packages-dev": [ @@ -10430,25 +10443,24 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.11.2", + "version": "2.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "78846cbce0550ec174508a646f46fd6dee76099b" + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/78846cbce0550ec174508a646f46fd6dee76099b", - "reference": "78846cbce0550ec174508a646f46fd6dee76099b", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/a738cecb420e3bcff34c33177f1ce9f68902695c", + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0" }, "conflict": { - "phpspec/prophecy": "<1.9.0", "zendframework/zend-diactoros": "*" }, "provide": { @@ -10460,13 +10472,12 @@ "ext-dom": "*", "ext-gd": "*", "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.8.0", - "laminas/laminas-coding-standard": "~1.0.0", - "php-http/psr7-integration-tests": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.1", - "psalm/plugin-phpunit": "^0.14.0", - "vimeo/psalm": "^4.3" + "http-interop/http-factory-tests": "^0.9.0", + "laminas/laminas-coding-standard": "^2.4.0", + "php-http/psr7-integration-tests": "^1.2", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "extra": { @@ -10525,7 +10536,7 @@ "type": "community_bridge" } ], - "time": "2022-06-29T14:15:02+00:00" + "time": "2022-12-14T22:31:50+00:00" }, { "name": "lusitanian/oauth", @@ -10600,24 +10611,24 @@ }, { "name": "magento/magento-coding-standard", - "version": "27", + "version": "29", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63" + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63", - "reference": "097bda3e015f35dc7c2efc0b8c7a7d8dfc158a63", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": "^8.1||^8.2", + "php": ">=7.3", "phpcompatibility/php-compatibility": "^9.3", - "rector/rector": "^0.13.0", + "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", "webonyx/graphql-php": "^14.9" }, @@ -10642,9 +10653,9 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v27" + "source": "https://github.com/magento/magento-coding-standard/tree/v29" }, - "time": "2022-10-17T15:19:28+00:00" + "time": "2022-12-21T18:10:47+00:00" }, { "name": "magento/magento2-functional-testing-framework", @@ -11442,21 +11453,21 @@ }, { "name": "phpspec/prophecy", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" @@ -11503,9 +11514,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-11-29T15:06:56+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -11553,16 +11564,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.10", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "25e069474cf00215b0f64c60a26230908ef3eefa" + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/25e069474cf00215b0f64c60a26230908ef3eefa", - "reference": "25e069474cf00215b0f64c60a26230908ef3eefa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", "shasum": "" }, "require": { @@ -11586,9 +11597,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.10" + "source": "https://github.com/phpstan/phpstan/tree/1.9.4" }, "funding": [ { @@ -11599,16 +11614,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-06-03T14:12:23+00:00" + "time": "2022-12-17T13:33:52+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12082,31 +12093,28 @@ }, { "name": "rector/rector", - "version": "0.13.4", + "version": "0.14.8", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd" + "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd", - "reference": "60b4f87a94e7ed17d4494982ba0cfb5a3f2845fd", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/46ee9a173a2b2645ca92a75ffc17460139fa226e", + "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.7.10" + "phpstan/phpstan": "^1.9.0" }, "conflict": { - "phpstan/phpdoc-parser": "<1.2", - "rector/rector-cakephp": "*", "rector/rector-doctrine": "*", - "rector/rector-laravel": "*", - "rector/rector-nette": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-php-parser": "*", "rector/rector-phpoffice": "*", "rector/rector-phpunit": "*", - "rector/rector-prefixed": "*", "rector/rector-symfony": "*" }, "bin": [ @@ -12115,7 +12123,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.13-dev" + "dev-main": "0.14-dev" } }, "autoload": { @@ -12130,7 +12138,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.13.4" + "source": "https://github.com/rectorphp/rector/tree/0.14.8" }, "funding": [ { @@ -12138,7 +12146,7 @@ "type": "github" } ], - "time": "2022-06-04T08:19:56+00:00" + "time": "2022-11-14T14:09:49+00:00" }, { "name": "sebastian/cli-parser", @@ -13242,16 +13250,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -13294,7 +13302,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "symfony/dotenv", @@ -13890,8 +13898,9 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "magento/composer": 10, - "magento/magento-composer-installer": 10 + "magento/composer": 20, + "magento/magento-composer-installer": 10, + "wikimedia/less.php": 20 }, "prefer-stable": true, "prefer-lowest": false, From 21bf93d6e1c6d4b9ee25ba3779408cb7807d0cae Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Wed, 4 Jan 2023 16:07:33 +0530 Subject: [PATCH 376/985] AC-7420::Update the Laminas dependencies in composer file --- lib/internal/Magento/Framework/composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 7c0f2aa1be76a..30088bb3673f0 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -9,6 +9,12 @@ "config": { "sort-packages": true }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/wikimedia/less.php" + } + ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -51,7 +57,7 @@ "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "^3.0" + "wikimedia/less.php": "dev-main" }, "archive": { "exclude": [ From ba2c3bb288f705d64e42498e80d5a0a2b3e029e6 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Wed, 4 Jan 2023 18:08:54 +0530 Subject: [PATCH 377/985] AC-7549:: 2.4.6 alpha 2 Composer Build Failures - GraphQL --- .../Magento/GraphQl/Quote/CartPromotionsTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php index feb6dd23e0634..76266294ed909 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php @@ -29,6 +29,12 @@ class CartPromotionsTest extends GraphQlAbstract * @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php * @magentoApiDataFixture Magento/SalesRule/_files/rules_category.php */ + + /** + * @var float + */ + private const EPSILON = 0.0000000001; + public function testCartPromotionSingleCartRule() { $skus =['simple1', 'simple2']; @@ -151,16 +157,18 @@ public function testCartPromotionsMultipleCartRules() $lineItemDiscount = $productsInResponse[$itemIndex][0]['prices']['discounts']; $expectedTotalDiscountValue = ($productsInCart[$itemIndex]->getSpecialPrice()*$qty*0.5) + ($productsInCart[$itemIndex]->getSpecialPrice()*$qty*0.5*0.1); - $this->assertEquals( + $this->assertEqualsWithDelta( $productsInCart[$itemIndex]->getSpecialPrice()*$qty*0.5, - current($lineItemDiscount)['amount']['value'] + current($lineItemDiscount)['amount']['value'], + self::EPSILON ); $this->assertEquals('TestRule_Label', current($lineItemDiscount)['label']); $lineItemDiscountValue = next($lineItemDiscount)['amount']['value']; - $this->assertEquals( + $this->assertEqualsWithDelta( round($productsInCart[$itemIndex]->getSpecialPrice()*$qty*0.5)*0.1, - $lineItemDiscountValue + $lineItemDiscountValue, + self::EPSILON ); $this->assertEquals('10% off with two items_Label', end($lineItemDiscount)['label']); $actualTotalDiscountValue = $lineItemDiscount[0]['amount']['value']+$lineItemDiscount[1]['amount']['value']; From c29c96ad4396224046cf159d29a83a5d2ba11e62 Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Wed, 4 Jan 2023 18:26:15 +0530 Subject: [PATCH 378/985] ACQE-4398 : Added more assertion for better understanding when test fails next time --- .../Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml index cb79113fe591c..6a9d8ce4fe1d0 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml @@ -33,7 +33,8 @@ <amOnPage url="{{CmsPagesPage.url}}?filters[title]=$$createPage.title$$" stepKey="navigateToPageGridWithFilters"/> <waitForPageLoad stepKey="waitForPageGrid"/> <waitForText selector="{{CmsPagesPageActionsSection.pagesGridRowByTitle($$createPage.title$$)}}" userInput="$$createPage.title$$" stepKey="seePage"/> - <waitForElementVisible selector="{{CmsPagesPageActionsSection.activeFilter}}" stepKey="seeEnabledFilters"/> + <wait time ="20" stepKey="waitBeforeSeeAdminCMSPageFilters"></wait> + <seeInCurrentUrl url="admin/cms/page?filters" stepKey="seeAdminCMSPageFilters"/> <waitForText selector="{{CmsPagesPageActionsSection.activeFilter}}" userInput="Title: $$createPage.title$$" stepKey="seePageTitleFilter"/> </test> </tests> From fa9db46fafdcc325cd023b100cf28c3633543104 Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Wed, 4 Jan 2023 18:36:05 +0530 Subject: [PATCH 379/985] ACQE-4398 : Added more assertion for better understanding when test fails next time --- .../Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml index 6a9d8ce4fe1d0..c7b3f7f27e946 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageGridUrlFilterApplierTest.xml @@ -33,8 +33,8 @@ <amOnPage url="{{CmsPagesPage.url}}?filters[title]=$$createPage.title$$" stepKey="navigateToPageGridWithFilters"/> <waitForPageLoad stepKey="waitForPageGrid"/> <waitForText selector="{{CmsPagesPageActionsSection.pagesGridRowByTitle($$createPage.title$$)}}" userInput="$$createPage.title$$" stepKey="seePage"/> - <wait time ="20" stepKey="waitBeforeSeeAdminCMSPageFilters"></wait> <seeInCurrentUrl url="admin/cms/page?filters" stepKey="seeAdminCMSPageFilters"/> + <waitForElementVisible selector="{{CmsPagesPageActionsSection.activeFilter}}" stepKey="seeEnabledFilters"/> <waitForText selector="{{CmsPagesPageActionsSection.activeFilter}}" userInput="Title: $$createPage.title$$" stepKey="seePageTitleFilter"/> </test> </tests> From 88999b5b4f2b50a9cf13ffd5c377b65e5b4ead01 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Wed, 4 Jan 2023 18:55:59 +0530 Subject: [PATCH 380/985] AC-7549:: 2.4.6 alpha 2 Composer Build Failures - GraphQL - 01 --- .../testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php index 2f050bc55df36..d80e65c140cd9 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php @@ -772,7 +772,7 @@ public function testConfigurableProductWithVariantsHavingSpecialAndTierPrices() "value" => round((float) $configurableProductVariants[$key]->getSpecialPrice(), 2) ], "discount" => [ - "amount_off" => ($regularPrice[$key] - $finalPrice[$key]), + "amount_off" => round($regularPrice[$key] - $finalPrice[$key], 2), "percent_off" => round(($regularPrice[$key] - $finalPrice[$key])*100/$regularPrice[$key], 2) ] ], @@ -784,7 +784,7 @@ public function testConfigurableProductWithVariantsHavingSpecialAndTierPrices() "value" => round((float) $configurableProductVariants[$key]->getSpecialPrice(), 2) ], "discount" => [ - "amount_off" => $regularPrice[$key] - $finalPrice[$key], + "amount_off" => round($regularPrice[$key] - $finalPrice[$key], 2), "percent_off" => round(($regularPrice[$key] - $finalPrice[$key])*100/$regularPrice[$key], 2) ] ] From 24f0719817058e44f4f5bc5e804fada702a66b7b Mon Sep 17 00:00:00 2001 From: Rafal Janicki <rjanicki@adobe.com> Date: Wed, 4 Jan 2023 14:53:56 +0000 Subject: [PATCH 381/985] LYNX-17: [GraphQL] Products query returns aggregations for products not assigned to a shared catalog (#79) --- .../Model/Resolver/Aggregations.php | 67 ++++++++++--------- .../Catalog/ProductSearchAggregationsTest.php | 42 ++++++++---- .../Magento/Directory/_files/usd_cny_rate.php | 5 +- 3 files changed, 70 insertions(+), 44 deletions(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Aggregations.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Aggregations.php index 8e69fdfe97ebe..fd6b7236fff05 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Aggregations.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Aggregations.php @@ -21,11 +21,6 @@ */ class Aggregations implements ResolverInterface { - /** - * @var Layer\DataProvider\Filters - */ - private $filtersDataProvider; - /** * @var LayerBuilder */ @@ -42,18 +37,15 @@ class Aggregations implements ResolverInterface private $includeDirectChildrenOnly; /** - * @param \Magento\CatalogGraphQl\Model\Resolver\Layer\DataProvider\Filters $filtersDataProvider * @param LayerBuilder $layerBuilder * @param PriceCurrency $priceCurrency * @param Category\IncludeDirectChildrenOnly $includeDirectChildrenOnly */ public function __construct( - \Magento\CatalogGraphQl\Model\Resolver\Layer\DataProvider\Filters $filtersDataProvider, LayerBuilder $layerBuilder, PriceCurrency $priceCurrency = null, Category\IncludeDirectChildrenOnly $includeDirectChildrenOnly = null ) { - $this->filtersDataProvider = $filtersDataProvider; $this->layerBuilder = $layerBuilder; $this->priceCurrency = $priceCurrency ?: ObjectManager::getInstance()->get(PriceCurrency::class); $this->includeDirectChildrenOnly = $includeDirectChildrenOnly @@ -75,30 +67,45 @@ public function resolve( } $aggregations = $value['search_result']->getSearchAggregation(); + if (!$aggregations || (int)$value['total_count'] == 0) { + return []; + } - if ($aggregations) { - $categoryFilter = $value['categories'] ?? []; - $includeDirectChildrenOnly = $args['filter']['category']['includeDirectChildrenOnly'] ?? false; - if ($includeDirectChildrenOnly && !empty($categoryFilter)) { - $this->includeDirectChildrenOnly->setFilter(['category' => $categoryFilter]); - } - /** @var StoreInterface $store */ - $store = $context->getExtensionAttributes()->getStore(); - $storeId = (int)$store->getId(); - $results = $this->layerBuilder->build($aggregations, $storeId); - if (isset($results['price_bucket'])) { - foreach ($results['price_bucket']['options'] as &$value) { - list($from, $to) = explode('-', $value['label']); - $newLabel = $this->priceCurrency->convertAndRound($from) - . '-' - . $this->priceCurrency->convertAndRound($to); - $value['label'] = $newLabel; - $value['value'] = str_replace('-', '_', $newLabel); - } - } + $categoryFilter = $value['categories'] ?? []; + $includeDirectChildrenOnly = $args['filter']['category']['includeDirectChildrenOnly'] ?? false; + if ($includeDirectChildrenOnly && !empty($categoryFilter)) { + $this->includeDirectChildrenOnly->setFilter(['category' => $categoryFilter]); + } + + $results = $this->layerBuilder->build( + $aggregations, + (int)$context->getExtensionAttributes()->getStore()->getId() + ); + if (!isset($results['price_bucket']['options'])) { return $results; - } else { - return []; } + + $priceBucketOptions = []; + foreach ($results['price_bucket']['options'] as $optionValue) { + $priceBucketOptions[] = $this->getConvertedAndRoundedOptionValue($optionValue); + } + $results['price_bucket']['options'] = $priceBucketOptions; + + return $results; + } + + /** + * Converts and rounds option value + * + * @param String[] $optionValue + * @return String[] + */ + private function getConvertedAndRoundedOptionValue(array $optionValue): array + { + list($from, $to) = explode('-', $optionValue['label']); + $newLabel = $this->priceCurrency->convertAndRound($from) . '-' . $this->priceCurrency->convertAndRound($to); + $optionValue['label'] = $newLabel; + $optionValue['value'] = str_replace('-', '_', $newLabel); + return $optionValue; } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php index e03a806336263..94e40f4132cfd 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php @@ -37,11 +37,11 @@ function ($a) { $booleanAggregation = reset($booleanAggregation); $this->assertEquals('Boolean Attribute', $booleanAggregation['label']); $this->assertEquals('boolean_attribute', $booleanAggregation['attribute_code']); - $this->assertContainsEquals(['label' => '1', 'value'=> '1', 'count' => '3'], $booleanAggregation['options']); + $this->assertContainsEquals(['label' => '1', 'value' => '1', 'count' => '3'], $booleanAggregation['options']); $this->assertEquals(2, $booleanAggregation['count']); $this->assertCount(2, $booleanAggregation['options']); - $this->assertContainsEquals(['label' => '0', 'value'=> '0', 'count' => '2'], $booleanAggregation['options']); + $this->assertContainsEquals(['label' => '0', 'value' => '0', 'count' => '2'], $booleanAggregation['options']); } /** @@ -68,10 +68,10 @@ function ($a) { $this->assertEquals('Price', $priceAggregation['label']); $this->assertEquals(4, $priceAggregation['count']); $expectedOptions = [ - ['label' => '10-20', 'value'=> '10_20', 'count' => '2'], - ['label' => '20-30', 'value'=> '20_30', 'count' => '1'], - ['label' => '30-40', 'value'=> '30_40', 'count' => '1'], - ['label' => '40-50', 'value'=> '40_50', 'count' => '1'] + ['label' => '10-20', 'value' => '10_20', 'count' => '2'], + ['label' => '20-30', 'value' => '20_30', 'count' => '1'], + ['label' => '30-40', 'value' => '30_40', 'count' => '1'], + ['label' => '40-50', 'value' => '40_50', 'count' => '1'] ]; $this->assertEquals($expectedOptions, $priceAggregation['options']); } @@ -79,7 +79,7 @@ function ($a) { /** * @magentoApiDataFixture Magento/Catalog/_files/products_for_search.php * @magentoApiDataFixture Magento/Directory/_files/usd_cny_rate.php - * @magentoConfigFixture default_store currency/options/allow CNY,USD + * @magentoConfigFixture default_store currency/options/allow CNY,USD,EUR */ public function testAggregationPriceRangesWithCurrencyHeader() { @@ -101,14 +101,30 @@ function ($a) { $this->assertEquals('Price', $priceAggregation['label']); $this->assertEquals(4, $priceAggregation['count']); $expectedOptions = [ - ['label' => '70-140', 'value'=> '70_140', 'count' => '2'], - ['label' => '140-210', 'value'=> '140_210', 'count' => '1'], - ['label' => '210-280', 'value'=> '210_280', 'count' => '1'], - ['label' => '280-350', 'value'=> '280_350', 'count' => '1'] + ['label' => '70-140', 'value' => '70_140', 'count' => '2'], + ['label' => '140-210', 'value' => '140_210', 'count' => '1'], + ['label' => '210-280', 'value' => '210_280', 'count' => '1'], + ['label' => '280-350', 'value' => '280_350', 'count' => '1'] ]; $this->assertEquals($expectedOptions, $priceAggregation['options']); } + /** + * @magentoApiDataFixture Magento/Catalog/_files/products_for_search.php + * @magentoConfigFixture default_store currency/options/allow USD,EUR + */ + public function testEmptyAggregationsForNotFoundProducts() + { + $headerMap['Content-Currency'] = 'USD'; + $query = $this->getGraphQlQuery( + '"search_product_9999", "search_product_8888"' + ); + $result = $this->graphQlQuery($query, [], '', $headerMap); + $this->assertArrayNotHasKey('errors', $result); + $this->assertArrayHasKey('aggregations', $result['products']); + $this->assertEmpty($result['products']['aggregations']); + } + /** * @magentoApiDataFixture Magento/Catalog/_files/products_for_search_with_custom_price_attribute.php */ @@ -132,8 +148,8 @@ function ($a) { $priceAggregation = reset($priceAggregation); $this->assertEquals(2, $priceAggregation['count']); $expectedOptions = [ - ['label' => '0_1000', 'value'=> '0_1000', 'count' => '3'], - ['label' => '1000_2000', 'value'=> '1000_2000', 'count' => '2'] + ['label' => '0_1000', 'value' => '0_1000', 'count' => '3'], + ['label' => '1000_2000', 'value' => '1000_2000', 'count' => '2'] ]; $this->assertEquals($expectedOptions, $priceAggregation['options']); } diff --git a/dev/tests/integration/testsuite/Magento/Directory/_files/usd_cny_rate.php b/dev/tests/integration/testsuite/Magento/Directory/_files/usd_cny_rate.php index 8651f2cc760d2..e44cec9027e23 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/_files/usd_cny_rate.php +++ b/dev/tests/integration/testsuite/Magento/Directory/_files/usd_cny_rate.php @@ -10,7 +10,10 @@ $objectManager = Bootstrap::getObjectManager(); -$rates = ['USD' => ['CNY' => '7.0000']]; +$rates = [ + 'USD' => ['CNY' => '7.0000'], + 'EUR' => ['CNY' => '7.0000'] +]; /** @var Currency $currencyModel */ $currencyModel = $objectManager->create(Currency::class); $currencyModel->saveRates($rates); From d50f60baaef5a165a791f51dd34ada92a14a5097 Mon Sep 17 00:00:00 2001 From: Gus deMayo <gus.demayo@gmail.com> Date: Thu, 29 Dec 2022 12:01:06 -0600 Subject: [PATCH 382/985] encrypt smtp password --- app/code/Magento/Backend/etc/adminhtml/system.xml | 5 +++-- app/code/Magento/Email/etc/config.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index 463976b58212f..1610ea9fde71f 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -349,9 +349,10 @@ <field id="transport">smtp</field> </depends> </field> - <field id="password" translate="label comment" type="password" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <field id="password" translate="label comment" type="obscure" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Password</label> - <comment>Username</comment> + <comment>Password</comment> + <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model> <depends> <field id="transport">smtp</field> </depends> diff --git a/app/code/Magento/Email/etc/config.xml b/app/code/Magento/Email/etc/config.xml index 6f486c15472c2..88f7b81ea2ea8 100644 --- a/app/code/Magento/Email/etc/config.xml +++ b/app/code/Magento/Email/etc/config.xml @@ -27,6 +27,7 @@ <disable>0</disable> <host>localhost</host> <port>25</port> + <password backend_model="Magento\Config\Model\Config\Backend\Encrypted" /> <set_return_path>0</set_return_path> <transport>sendmail</transport> <auth>none</auth> From 00de4dd19755f4d3bd2c1d53d41393a07d3dfc90 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 4 Jan 2023 22:47:21 +0530 Subject: [PATCH 383/985] ACPT-826 --- app/code/Magento/AsyncConfig/Model/Save.php | 114 ++++++++++++++++++ app/code/Magento/AsyncConfig/composer.json | 3 - app/code/Magento/AsyncConfig/etc/di.xml | 2 + .../Adminhtml/System/Config/Save.php | 49 ++------ app/code/Magento/Config/composer.json | 3 +- 5 files changed, 128 insertions(+), 43 deletions(-) create mode 100644 app/code/Magento/AsyncConfig/Model/Save.php diff --git a/app/code/Magento/AsyncConfig/Model/Save.php b/app/code/Magento/AsyncConfig/Model/Save.php new file mode 100644 index 0000000000000..9af24cacbe5fb --- /dev/null +++ b/app/code/Magento/AsyncConfig/Model/Save.php @@ -0,0 +1,114 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\AsyncConfig\Model; + + +use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\RuntimeException; + +class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save +{ + /** + * @var DeploymentConfig + */ + private $deploymentConfig; + + /** + * @var AsyncConfigPublisherInterface + */ + private $asyncConfigPublisher; + + /** + * @var const + */ + public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; + + /** + * @param \Magento\Backend\App\Action\Context $context + * @param \Magento\Config\Model\Config\Structure $configStructure + * @param \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker + * @param \Magento\Config\Model\Config\Factory $configFactory + * @param \Magento\Framework\Cache\FrontendInterface $cache + * @param \Magento\Framework\Stdlib\StringUtils $string + * @param DeploymentConfig|null $deploymentConfig + * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher + */ + public function __construct( + \Magento\Backend\App\Action\Context $context, + \Magento\Config\Model\Config\Structure $configStructure, + \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker, + \Magento\Config\Model\Config\Factory $configFactory, + \Magento\Framework\Cache\FrontendInterface $cache, + \Magento\Framework\Stdlib\StringUtils $string, + DeploymentConfig $deploymentConfig = null, + AsyncConfigPublisherInterface $asyncConfigPublisher = null + ) { + parent::__construct($context, + $configStructure, + $sectionChecker, + $configFactory, + $cache, + $string); + $this->deploymentConfig = $deploymentConfig + ?? ObjectManager::getInstance()->get(DeploymentConfig::class); + $this->asyncConfigPublisher = $asyncConfigPublisher + ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); + } + + /** + * @throws LocalizedException + * @throws FileSystemException + * @throws RuntimeException + */ + public function execute() + { + if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { + return parent::execute(); + } else { + $this->_saveSection(); + $section = $this->getRequest()->getParam('section'); + $website = $this->getRequest()->getParam('website'); + $store = $this->getRequest()->getParam('store'); + $configData = [ + 'section' => $section, + 'website' => $website, + 'store' => $store, + 'groups' => $this->_getGroupsForSave(), + ]; + $configData = $this->filterNodes($configData); + $groups = $this->getRequest()->getParam('groups'); + if (isset($groups['country']['fields'])) { + if (isset($groups['country']['fields']['eu_countries'])) { + $countries = $groups['country']['fields']['eu_countries']; + if (empty($countries['value']) && + !isset($countries['inherit'])) { + throw new LocalizedException( + __('Something went wrong while saving this configuration.') + ); + } + } + } + $this->asyncConfigPublisher->saveConfigData($configData); + $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); + $this->_saveState($this->getRequest()->getPost('config_state')); + /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + return $resultRedirect->setPath( + 'adminhtml/system_config/edit', + [ + '_current' => ['section', 'website', 'store'], + '_nosid' => true + ] + ); + } + } +} diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 5f3580d1d6ceb..2d411fcabbba2 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -1,9 +1,6 @@ { "name": "magento/module-async-config", "description": "N/A", - "config": { - "sort-packages": true - }, "require": { "php": "~8.1.0||~8.2.0", "magento/framework": "*", diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 097024f927308..7a2c97b1249b7 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -10,6 +10,8 @@ type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> + <preference for="Magento\Config\Controller\Adminhtml\System\Config\Save" + type="Magento\AsyncConfig\Model\Save" /> <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> <type name="Magento\Framework\File\Uploader"> <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index be9fa49c7faf8..0110d4c311ec1 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -6,17 +6,14 @@ namespace Magento\Config\Controller\Adminhtml\System\Config; -use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; +use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Config\Controller\Adminhtml\System\AbstractConfig; -use Magento\Framework\App\Action\HttpPostActionInterface; -use Magento\Framework\App\DeploymentConfig; -use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; /** * System Configuration Save Controller * - * @author Magento Core Team <core@magentocommerce.com> + * @author Magento Core Team <core@magentocommerce.com> * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Save extends AbstractConfig implements HttpPostActionInterface @@ -38,18 +35,6 @@ class Save extends AbstractConfig implements HttpPostActionInterface */ protected $string; - /** - * @var DeploymentConfig - */ - private $deploymentConfig; - - /** - * @var AsyncConfigPublisherInterface - */ - private $asyncConfigPublisher; - - public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; - /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Config\Model\Config\Structure $configStructure @@ -57,8 +42,6 @@ class Save extends AbstractConfig implements HttpPostActionInterface * @param \Magento\Config\Model\Config\Factory $configFactory * @param \Magento\Framework\Cache\FrontendInterface $cache * @param \Magento\Framework\Stdlib\StringUtils $string - * @param DeploymentConfig|null $deploymentConfig - * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher */ public function __construct( \Magento\Backend\App\Action\Context $context, @@ -66,18 +49,12 @@ public function __construct( \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker, \Magento\Config\Model\Config\Factory $configFactory, \Magento\Framework\Cache\FrontendInterface $cache, - \Magento\Framework\Stdlib\StringUtils $string, - DeploymentConfig $deploymentConfig = null, - AsyncConfigPublisherInterface $asyncConfigPublisher = null + \Magento\Framework\Stdlib\StringUtils $string ) { parent::__construct($context, $configStructure, $sectionChecker); $this->_configFactory = $configFactory; $this->_cache = $cache; $this->string = $string; - $this->deploymentConfig = $deploymentConfig - ?? ObjectManager::getInstance()->get(DeploymentConfig::class); - $this->asyncConfigPublisher = $asyncConfigPublisher - ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); } /** @@ -243,33 +220,30 @@ public function execute() 'store' => $store, 'groups' => $this->_getGroupsForSave(), ]; + $configData = $this->filterNodes($configData); + $groups = $this->getRequest()->getParam('groups'); if (isset($groups['country']['fields'])) { if (isset($groups['country']['fields']['eu_countries'])) { $countries = $groups['country']['fields']['eu_countries']; if (empty($countries['value']) && - !isset($countries['inherit'])) { + !isset($countries['inherit'])) { throw new LocalizedException( __('Something went wrong while saving this configuration.') ); } } } - if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { - $configData = $this->filterNodes($configData); - /** @var \Magento\Config\Model\Config $configModel */ - $configModel = $this->_configFactory->create(['data' => $configData]); - $configModel->save(); - $this->messageManager->addSuccess(__('You saved the configuration.')); - } else { - $this->asyncConfigPublisher->saveConfigData($configData); - $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); - } + + /** @var \Magento\Config\Model\Config $configModel */ + $configModel = $this->_configFactory->create(['data' => $configData]); + $configModel->save(); $this->_eventManager->dispatch( 'admin_system_config_save', ['configData' => $configData, 'request' => $this->getRequest()] ); + $this->messageManager->addSuccess(__('You saved the configuration.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { $messages = explode("\n", $e->getMessage()); foreach ($messages as $message) { @@ -285,7 +259,6 @@ public function execute() $this->_saveState($this->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); - return $resultRedirect->setPath( 'adminhtml/system_config/edit', [ diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 276174b10bce5..8ad286bd667b5 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -13,8 +13,7 @@ "magento/module-directory": "*", "magento/module-email": "*", "magento/module-media-storage": "*", - "magento/module-store": "*", - "magento/module-async-config": "*" + "magento/module-store": "*" }, "type": "magento2-module", "license": [ From 118fccdf2bbe9fa068a820fe1d0d88d0ff21b1a5 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Wed, 4 Jan 2023 13:12:59 -0600 Subject: [PATCH 384/985] ACP2E-1444: [Page Builder] Product widget does not work with SKUs containing '&' --- .../CatalogWidget/Block/Product/ProductsList.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index d35590efc93b2..15f544813b70c 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -395,8 +395,8 @@ protected function getConditions() ? $this->getData('conditions_encoded') : $this->getData('conditions'); - if ($conditions) { - $conditions = $this->conditionsHelper->decode($conditions); + if (is_string($conditions)) { + $conditions = $this->decodeConditions($conditions); } foreach ($conditions as $key => $condition) { @@ -577,4 +577,16 @@ private function getWidgetPagerBlockName() return $pagerBlockName . '.' . $pageName; } + + /** + * Decode encoded html special characters and unserialize the conditions into array + * + * @param string $encodedConditions + * @return array + * @see \Magento\Widget\Model\Widget::getDirectiveParam + */ + private function decodeConditions(string $encodedConditions): array + { + return $this->conditionsHelper->decode(htmlspecialchars_decode($encodedConditions)); + } } From ae35e5ea9ec9bf18efd935d41712669a62934f54 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Thu, 5 Jan 2023 10:32:23 +0530 Subject: [PATCH 385/985] ACQE-4388 | Flaky Test Fix --- .../Mftf/Test/AdminMassUpdateProductAttributeDatetimeTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributeDatetimeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributeDatetimeTest.xml index 264d35844a58d..844881329c4e6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributeDatetimeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributeDatetimeTest.xml @@ -55,6 +55,7 @@ <argument name="keyword" value="api-simple-product"/> </actionGroup> <actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/> + <waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForSelectCheckbox1"/> <checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/> <checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/> <!-- Mass update qty increments --> From 2b7e7b56f7f9d0e9b06824552949c930793669c2 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 5 Jan 2023 12:46:04 +0530 Subject: [PATCH 386/985] ACQE-4397-4430 test fix provided --- .../Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml | 2 +- app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml | 2 ++ .../StorefrontTaxQuoteCartLoggedInSimpleTest.xml | 5 +++-- .../StorefrontTaxQuoteCartLoggedInVirtualTest.xml | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml index 8a2945130c925..e1a5832fd8429 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml @@ -20,7 +20,7 @@ <click stepKey="addNewTaxRate" selector="{{AdminTaxRulesSection.addNewTaxRate}}"/> <!-- Fill out a new tax rate --> - <fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.state}}-{{taxCode.rate}}"/> + <fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.identifier}}-{{taxCode.rate}}"/> <fillField stepKey="fillZipCode" selector="{{AdminTaxRulesSection.zipCode}}" userInput="{{taxCode.zip}}"/> <selectOption stepKey="selectState" selector="{{AdminTaxRulesSection.state}}" userInput="{{taxCode.state}}"/> <selectOption stepKey="selectCountry" selector="{{AdminTaxRulesSection.country}}" userInput="{{taxCode.country}}"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml index 4b8d79117eb24..f7431b05d513b 100644 --- a/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml +++ b/app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml @@ -21,6 +21,7 @@ <data key="rate">0</data> </entity> <entity name="SimpleTaxNY" type="tax"> + <data key="identifier" unique="suffix" >New York</data> <data key="state">New York</data> <data key="country">United States</data> <data key="zip">*</data> @@ -33,6 +34,7 @@ <data key="rate">20.00</data> </entity> <entity name="SimpleTaxCA" type="tax"> + <data key="identifier" unique="suffix" >California</data> <data key="state">California</data> <data key="country">United States</data> <data key="zip">*</data> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml index 126534ada9bd7..776bf0f9639a8 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml @@ -39,6 +39,7 @@ </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessgaeForSavingRule"/> <magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> <!-- Fill out form for a new user with address --> @@ -69,12 +70,12 @@ <!-- Delete the two tax rates that were created --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml index 04b1ca9f22966..eafa0ede97956 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml @@ -39,6 +39,7 @@ </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessgaeForSavingRule"/> <!-- Fill out form for a new user with address --> <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> @@ -68,12 +69,12 @@ <!-- Delete the two tax rates that were created --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> From 7761ade2d5d457cf73337c4e2d2923e9e927b2ac Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 5 Jan 2023 14:44:08 +0530 Subject: [PATCH 387/985] AC-7572:Testcases related to elastic search are failing due to elasticsearch8 module --- ...QuickSearchUsingElasticSearch8ByProductSkuTest.xml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml index acde5a66e60e7..5aa6b699a41ee 100644 --- a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml +++ b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml @@ -21,24 +21,19 @@ <group value="pr_exclude"/> </annotations> <before> - <magentoCLI command="config:set catalog/search/engine elasticsearch8" stepKey="setSearchEngine"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProducts"/> - - <createData entity="VirtualProduct" stepKey="createFirtsSimpleProduct"/> + <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> + <createData entity="VirtualProduct" stepKey="createVirtualProduct"/> <createData entity="SimpleProductWithCustomSku24MB06" stepKey="createSecondSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB04" stepKey="createThirdSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB02" stepKey="createFourthSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB01" stepKey="createFifthSimpleProduct"/> - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> - <argument name="tags" value=""/> + <argument name="tags" value="config full_page"/> </actionGroup> <magentoCron groups="index" stepKey="reindex"/> </before> <after> - <deleteData createDataKey="createFirtsSimpleProduct" stepKey="deleteProductOne"/> - <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> </after> From 8715d8db55d1d4cd881ce6a76c327e7a1acde9ef Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Thu, 5 Jan 2023 15:45:11 +0530 Subject: [PATCH 388/985] AC-7562::2.4.6-alpha2-Composer Integration Test Failures(Broken) --- .../Catalog/Test/Unit/Model/CategoryTest.php | 4 ++-- .../Test/Unit/Model/ProductTest.php | 2 +- .../Block/Adminhtml/Export/FilterTest.php | 2 +- .../Block/Adminhtml/Import/Edit/FormTest.php | 2 +- .../Test/Unit/Helper/ReportTest.php | 2 +- .../Test/Unit/Model/Import/Source/ZipTest.php | 2 +- .../Test/Unit/Model/ImportTest.php | 24 +++++++++---------- .../Test/Unit/Controller/ExpressTest.php | 2 +- .../Test/Unit/Block/Reorder/SidebarTest.php | 2 +- .../Model/Sales/Total/Quote/ShippingTest.php | 2 +- .../Unit/Model/Sales/Total/Quote/TaxTest.php | 2 +- .../Api/CheckoutAgreementsRepositoryTest.php | 2 +- .../GiftMessage/Api/CartRepositoryTest.php | 4 ++-- .../Api/GuestCartRepositoryTest.php | 2 +- .../Api/GuestItemRepositoryTest.php | 2 +- .../GiftMessage/Api/ItemRepositoryTest.php | 4 ++-- .../Customer/DeleteCustomerAddressTest.php | 2 +- .../Customer/UpdateCustomerAddressTest.php | 2 +- .../GraphQl/Quote/Customer/GetCartTest.php | 2 +- .../Sales/Service/V1/ShipOrderTest.php | 2 +- .../TestCase/AbstractBackendController.php | 4 ++-- .../Block/Product/ListProduct/SortingTest.php | 8 +++---- .../AbstractDeleteAttributeControllerTest.php | 2 +- .../Filter/Price/AlgorithmAdvancedTest.php | 2 +- .../Model/Product/Type/AbstractTypeTest.php | 2 +- .../Magento/Cms/Controller/RouterTest.php | 4 ++-- .../Framework/Translate/InlineTest.php | 2 +- .../testsuite/Magento/Framework/UrlTest.php | 6 ++--- .../Adminhtml/Order/CreditmemoTest.php | 2 +- .../Test/Integrity/Layout/BlocksTest.php | 2 +- .../App/Utility/AggregateInvoker.php | 2 +- .../Module/Test/Unit/Setup/MigrationTest.php | 2 +- .../Translate/Test/Unit/AdapterTest.php | 2 +- 33 files changed, 54 insertions(+), 54 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php index 4317607fd661e..239e19c84dbf8 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php @@ -214,7 +214,7 @@ public function testMoveWhenCannotFindParentCategory(): void { $this->expectException('Magento\Framework\Exception\LocalizedException'); $this->expectExceptionMessage('Sorry, but we can\'t find the new parent category you selected.'); - $this->markTestIncomplete('MAGETWO-31165'); + $this->markTestSkipped('MAGETWO-31165'); $parentCategory = $this->createPartialMock( Category::class, ['getId', 'setStoreId', 'load'] @@ -260,7 +260,7 @@ public function testMoveWhenParentCategoryIsSameAsChildCategory(): void $this->expectExceptionMessage( 'We can\'t move the category because the parent category name matches the child category name.' ); - $this->markTestIncomplete('MAGETWO-31165'); + $this->markTestSkipped('MAGETWO-31165'); $parentCategory = $this->createPartialMock( Category::class, ['getId', 'setStoreId', 'load'] diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php index f31b3a3db9d8a..94331fc65278c 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php @@ -349,7 +349,7 @@ protected function setUp(): void */ public function testGetProductLinks(): void { - $this->markTestIncomplete('Skipped due to https://jira.corp.x.com/browse/MAGETWO-36926'); + $this->markTestSkipped('Skipped due to https://jira.corp.x.com/browse/MAGETWO-36926'); $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; $this->linkTypeProviderMock->expects($this->once())->method('getLinkTypes')->willReturn($linkTypes); diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Export/FilterTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Export/FilterTest.php index cf69cdf7ee367..a7b1501e32eaa 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Export/FilterTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Export/FilterTest.php @@ -333,6 +333,6 @@ private function getAttributeMock(array $data): Attribute */ public function testPrepareForm() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } } diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Import/Edit/FormTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Import/Edit/FormTest.php index d153c169bfdd0..d31d22a97a380 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Import/Edit/FormTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Import/Edit/FormTest.php @@ -83,6 +83,6 @@ protected function setUp(): void */ public function testPrepareForm() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } } diff --git a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php index 2f10ce42f84d4..6d9d2c206e2e4 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php @@ -153,7 +153,7 @@ protected function setUp(): void */ public function testGetExecutionTime() { - $this->markTestIncomplete('Invalid mocks used for DateTime object. Investigate later.'); + $this->markTestSkipped('Invalid mocks used for DateTime object. Investigate later.'); $startDate = '2000-01-01 01:01:01'; $endDate = '2000-01-01 02:03:04'; diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php index 295b706e3e0b2..129a4cd3a9449 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testConstructorFileDestinationMatch($fileName, $expectedfileName): void { - $this->markTestIncomplete('The implementation of constructor has changed. Rewrite test to cover changes.'); + $this->markTestSkipped('The implementation of constructor has changed. Rewrite test to cover changes.'); $this->directory->method('getRelativePath') ->withConsecutive([$fileName], [$expectedfileName]); diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php index 3f5b40cef7982..da1bd27f9805f 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/ImportTest.php @@ -363,7 +363,7 @@ public function testImportSourceException() */ public function testGetOperationResultMessages() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -386,7 +386,7 @@ public function testGetAttributeType() */ public function testGetEntity() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -394,7 +394,7 @@ public function testGetEntity() */ public function testGetErrorsCount() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -402,7 +402,7 @@ public function testGetErrorsCount() */ public function testGetErrorsLimit() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -410,7 +410,7 @@ public function testGetErrorsLimit() */ public function testGetInvalidRowsCount() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -418,7 +418,7 @@ public function testGetInvalidRowsCount() */ public function testGetNotices() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -426,7 +426,7 @@ public function testGetNotices() */ public function testGetProcessedEntitiesCount() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -434,7 +434,7 @@ public function testGetProcessedEntitiesCount() */ public function testGetProcessedRowsCount() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -442,7 +442,7 @@ public function testGetProcessedRowsCount() */ public function testGetWorkingDir() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -450,7 +450,7 @@ public function testGetWorkingDir() */ public function testIsImportAllowed() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -458,7 +458,7 @@ public function testIsImportAllowed() */ public function testUploadSource() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** @@ -704,7 +704,7 @@ public function unknownEntitiesProvider() */ public function testGetUniqueEntityBehaviors() { - $this->markTestIncomplete('This test has not been implemented yet.'); + $this->markTestSkipped('This test has not been implemented yet.'); } /** diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php index c164d832ad460..c2f123d299d91 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php @@ -75,7 +75,7 @@ abstract class ExpressTest extends TestCase protected function setUp(): void { - $this->markTestIncomplete(); + $this->markTestSkipped(); $this->messageManager = $this->getMockForAbstractClass(ManagerInterface::class); $this->config = $this->createMock(Config::class); $this->request = $this->createMock(Http::class); diff --git a/app/code/Magento/Sales/Test/Unit/Block/Reorder/SidebarTest.php b/app/code/Magento/Sales/Test/Unit/Block/Reorder/SidebarTest.php index e0b3324449028..aa99fdcd3e485 100644 --- a/app/code/Magento/Sales/Test/Unit/Block/Reorder/SidebarTest.php +++ b/app/code/Magento/Sales/Test/Unit/Block/Reorder/SidebarTest.php @@ -83,7 +83,7 @@ class SidebarTest extends TestCase */ protected function setUp(): void { - $this->markTestIncomplete('MAGETWO-36789'); + $this->markTestSkipped('MAGETWO-36789'); $this->objectManagerHelper = new ObjectManager($this); $this->context = $this->createMock(\Magento\Framework\View\Element\Template\Context::class); $this->httpContext = $this->createPartialMock(\Magento\Framework\App\Http\Context::class, ['getValue']); diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/ShippingTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/ShippingTest.php index ac13f8a5e8fe8..a48325bee1371 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/ShippingTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/ShippingTest.php @@ -134,7 +134,7 @@ public function testCollectDoesNotCalculateTaxIfThereIsNoItemsRelatedToGivenAddr public function testCollect() { - $this->markTestIncomplete('Target code is not unit testable. Refactoring is required.'); + $this->markTestSkipped('Target code is not unit testable. Refactoring is required.'); } /** diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php index 2d45da37d0107..cf0a06826a919 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php @@ -72,7 +72,7 @@ public function testCollect( $addressData, $verifyData ) { - $this->markTestIncomplete('Source code is not testable. Need to be refactored before unit testing'); + $this->markTestSkipped('Source code is not testable. Need to be refactored before unit testing'); $shippingAssignmentMock = $this->getMockForAbstractClass(ShippingAssignmentInterface::class); $totalsMock = $this->createMock(Total::class); $objectManager = new ObjectManager($this); diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php index 3893c5d196b60..48901df0af4ce 100644 --- a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php @@ -67,7 +67,7 @@ public function testGetListReturnsTheListOfActiveCheckoutAgreements() { // checkout/options/enable_agreements must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); $agreementModel = $this->getAgreementByName('Checkout Agreement (active)'); $agreements = $this->_webApiCall($this->listServiceInfo, []); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index d42166fe1d529..bca848cd779bc 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -104,7 +104,7 @@ public function testSave() { // sales/gift_options/allow_order must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); @@ -157,7 +157,7 @@ public function testSaveForMyCart() // sales/gift_options/allow_order must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php index bbb8a18f07c0b..e827c527d459a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php @@ -75,7 +75,7 @@ public function testSave() { // sales/gift_options/allow_order must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php index 81a1bee7acf8d..ba69b807815a9 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php @@ -79,7 +79,7 @@ public function testSave() { // sales/gift_options/allow_items must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index e8aa8f044c995..64ad722d14141 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -114,7 +114,7 @@ public function testSave() { // sales/gift_options/allow_items must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); @@ -168,7 +168,7 @@ public function testSaveForMyCart() // sales/gift_options/allow_items must be set to 1 in system configuration // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestIncomplete('This test relies on system configuration state.'); + $this->markTestSkipped('This test relies on system configuration state.'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/DeleteCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/DeleteCustomerAddressTest.php index 88da6ddee198a..ce9b0259215f7 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/DeleteCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/DeleteCustomerAddressTest.php @@ -241,7 +241,7 @@ public function testDeleteCustomerAddressIfAccountIsLocked() $this->expectException(\Exception::class); $this->expectExceptionMessage('The account is locked'); - $this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/750'); + $this->markTestSkipped('https://github.com/magento/graphql-ce/issues/750'); $userName = 'customer@example.com'; $password = 'password'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php index 7b32600e74aa7..14e0b9786e0ce 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php @@ -481,7 +481,7 @@ public function testUpdateCustomerAddressIfAccountIsLocked() $this->expectException(\Exception::class); $this->expectExceptionMessage('The account is locked.'); - $this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/750'); + $this->markTestSkipped('https://github.com/magento/graphql-ce/issues/750'); $userName = 'customer@example.com'; $password = 'password'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index ec5b3e92f8283..07b949bf866f8 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -238,7 +238,7 @@ public function testGetCartWithNotExistingStore() */ public function testGetCartForLockedCustomer() { - $this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/750'); + $this->markTestSkipped('https://github.com/magento/graphql-ce/issues/750'); /* lock customer */ $customerSecure = $this->customerRegistry->retrieveSecureData(1); diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php index 173e817c94c4a..81d5cfdc30749 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php @@ -52,7 +52,7 @@ protected function setUp(): void */ public function testConfigurableShipOrder() { - $this->markTestIncomplete('https://github.com/magento-engcom/msi/issues/1335'); + $this->markTestSkipped('https://github.com/magento-engcom/msi/issues/1335'); $productsQuantity = 1; /** @var Order $existingOrder */ diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractBackendController.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractBackendController.php index 07008d79218cd..b13ad62c95a62 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractBackendController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractBackendController.php @@ -107,7 +107,7 @@ protected function tearDown(): void public function testAclHasAccess() { if ($this->uri === null) { - $this->markTestIncomplete('AclHasAccess test is not complete'); + $this->markTestSkipped('AclHasAccess test is not complete'); } if ($this->httpMethod) { $this->getRequest()->setMethod($this->httpMethod); @@ -123,7 +123,7 @@ public function testAclHasAccess() public function testAclNoAccess() { if ($this->resource === null || $this->uri === null) { - $this->markTestIncomplete('Acl test is not complete'); + $this->markTestSkipped('Acl test is not complete'); } if ($this->httpMethod) { $this->getRequest()->setMethod($this->httpMethod); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListProduct/SortingTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListProduct/SortingTest.php index cd64637bf6ec4..e1a41c665bbf9 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListProduct/SortingTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListProduct/SortingTest.php @@ -99,7 +99,7 @@ public function testProductListSortOrder( string $incompleteReason = null ): void { if ($incompleteReason) { - $this->markTestIncomplete($incompleteReason); + $this->markTestSkipped($incompleteReason); } $category = $this->updateCategorySortBy('Category 1', Store::DEFAULT_STORE_ID, $sortBy); $this->renderBlock($category, $direction); @@ -122,7 +122,7 @@ public function testProductListSortOrderWithConfig( string $incompleteReason = null ): void { if ($incompleteReason) { - $this->markTestIncomplete($incompleteReason); + $this->markTestSkipped($incompleteReason); } $this->assertProductListSortOrderWithConfig($sortBy, $direction, $expectation); } @@ -199,7 +199,7 @@ public function testProductListSortOrderOnStoreView( string $incompleteReason = null ): void { if ($incompleteReason) { - $this->markTestIncomplete($incompleteReason); + $this->markTestSkipped($incompleteReason); } $secondStoreId = (int)$this->storeManager->getStore('fixture_second_store')->getId(); $this->updateCategorySortBy('Category 1', Store::DEFAULT_STORE_ID, $defaultSortBy); @@ -227,7 +227,7 @@ public function testProductListSortOrderWithConfigOnStoreView( string $incompleteReason = null ): void { if ($incompleteReason) { - $this->markTestIncomplete($incompleteReason); + $this->markTestSkipped($incompleteReason); } $this->objectManager->removeSharedInstance(Config::class); $secondStoreId = (int)$this->storeManager->getStore('fixture_second_store')->getId(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete/AbstractDeleteAttributeControllerTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete/AbstractDeleteAttributeControllerTest.php index 957b5e9325da7..eb19b7534b5b0 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete/AbstractDeleteAttributeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete/AbstractDeleteAttributeControllerTest.php @@ -78,6 +78,6 @@ protected function assertAttributeIsDeleted(string $attributeCode): void */ public function testAclHasAccess() { - $this->markTestIncomplete('AclHasAccess test is not complete'); + $this->markTestSkipped('AclHasAccess test is not complete'); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php index a3b2862aa2d20..47d03741bbd66 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php @@ -93,7 +93,7 @@ protected function _prepareFilter($layer, $priceResource, $request = null) */ public function testWithLimits() { - $this->markTestIncomplete('Bug MAGE-6561'); + $this->markTestSkipped('Bug MAGE-6561'); $layer = $this->createLayer(); $priceResource = $this->createPriceResource($layer); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTypeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTypeTest.php index 11c9c6166e07d..cb698d8fc6591 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTypeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTypeTest.php @@ -377,7 +377,7 @@ public function testGetWeight() public function testHasOptions() { - $this->markTestIncomplete('Bug MAGE-2814'); + $this->markTestSkipped('Bug MAGE-2814'); $product = new DataObject(); $this->assertFalse($this->_model->hasOptions($product)); diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php index 5f5f9dda20c66..3d6babde36246 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php @@ -18,7 +18,7 @@ class RouterTest extends \PHPUnit\Framework\TestCase protected function setUp(): void { - $this->markTestIncomplete('MAGETWO-3393'); + $this->markTestSkipped('MAGETWO-3393'); $this->_model = new \Magento\Cms\Controller\Router( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( \Magento\Framework\App\ActionFactory::class @@ -45,7 +45,7 @@ protected function setUp(): void */ public function testMatch() { - $this->markTestIncomplete('MAGETWO-3393'); + $this->markTestSkipped('MAGETWO-3393'); $request = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create(\Magento\Framework\App\RequestInterface::class); //Open Node diff --git a/dev/tests/integration/testsuite/Magento/Framework/Translate/InlineTest.php b/dev/tests/integration/testsuite/Magento/Framework/Translate/InlineTest.php index 98e2777467e89..d296661227b16 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Translate/InlineTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Translate/InlineTest.php @@ -96,7 +96,7 @@ public function testProcessResponseBody($originalText, $expectedText) { $actualText = $originalText; $this->_model->processResponseBody($actualText, false); - $this->markTestIncomplete('Bug MAGE-2494'); + $this->markTestSkipped('Bug MAGE-2494'); $expected = new \DOMDocument(); $expected->preserveWhiteSpace = false; diff --git a/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php b/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php index ad4491b166cfe..859a912bc4f2f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php @@ -205,7 +205,7 @@ public function testSetGetRouteName() $this->model->setRouteName('catalog'); $this->assertEquals('catalog', $this->model->getRouteName()); - $this->markTestIncomplete('setRouteName() logic is unclear.'); + $this->markTestSkipped('setRouteName() logic is unclear.'); } public function testSetGetControllerName() @@ -213,7 +213,7 @@ public function testSetGetControllerName() $this->model->setControllerName('product'); $this->assertEquals('product', $this->model->getControllerName()); - $this->markTestIncomplete('setControllerName() logic is unclear.'); + $this->markTestSkipped('setControllerName() logic is unclear.'); } public function testSetGetActionName() @@ -221,7 +221,7 @@ public function testSetGetActionName() $this->model->setActionName('view'); $this->assertEquals('view', $this->model->getActionName()); - $this->markTestIncomplete('setActionName() logic is unclear.'); + $this->markTestSkipped('setActionName() logic is unclear.'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php index 2de06558ab66d..7d76b6cf8524c 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/CreditmemoTest.php @@ -16,7 +16,7 @@ class CreditmemoTest extends \Magento\TestFramework\TestCase\AbstractBackendCont */ public function testAddCommentAction() { - $this->markTestIncomplete('https://github.com/magento-engcom/msi/issues/393'); + $this->markTestSkipped('https://github.com/magento-engcom/msi/issues/393'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var \Magento\CatalogInventory\Api\StockIndexInterface $stockIndex */ $stockIndex = $objectManager->get(\Magento\CatalogInventory\Api\StockIndexInterface::class); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php index cb9f9bbadeea3..477d01c7825dc 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php @@ -70,7 +70,7 @@ function ($alias, $file) { ) ); } else { - $this->markTestIncomplete( + $this->markTestSkipped( "Element with alias '{$alias}' is used as a block in file '{$file}' " . "via getChildBlock() method." . " It's impossible to determine explicitly whether the element is a block or a container, " . diff --git a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php index 7b27f84a9efd1..4f35b43617136 100644 --- a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php +++ b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php @@ -127,7 +127,7 @@ protected function processResults(array $results, $passed) $results[\PHPUnit\Framework\SkippedTestError::class] ); if ($results[\PHPUnit\Framework\IncompleteTestError::class]) { - $this->_testCase->markTestIncomplete($message); + $this->_testCase->markTestSkipped($message); } elseif ($results[\PHPUnit\Framework\SkippedTestError::class]) { $this->_testCase->markTestSkipped($message); } diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php index 1dece5f8183cb..7f763d5e2ba59 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php @@ -203,7 +203,7 @@ public function testAppendClassAliasReplace() */ public function testDoUpdateClassAliases($replaceRules, $tableData, $expected, $aliasesMap = []) { - $this->markTestIncomplete('Requires refactoring of class that is tested, covers to many methods'); + $this->markTestSkipped('Requires refactoring of class that is tested, covers to many methods'); $this->_actualUpdateResult = []; $tableRowsCount = count($tableData); diff --git a/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php b/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php index 4ca549ec1a170..007fa19b2563f 100644 --- a/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php +++ b/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php @@ -61,6 +61,6 @@ public function testTranslateNoProxy() */ public function testUnderscoresTranslation() { - $this->markTestIncomplete('MAGETWO-1012: i18n Improvements - Localization/Translations'); + $this->markTestSkipped('MAGETWO-1012: i18n Improvements - Localization/Translations'); } } From 3f5053b9e1d655def27377e1dd15a963e11e9229 Mon Sep 17 00:00:00 2001 From: Shradha Jain <shradhajain@BLR1-LHP-N81143.local> Date: Thu, 5 Jan 2023 16:59:21 +0530 Subject: [PATCH 389/985] AC-7567::Abandoned Carts report export to CSV is failing with exception --- app/code/Magento/Backend/Block/Widget/Grid/Extended.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index 22ca8a49c155b..5b180ba7f7de9 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -1067,10 +1067,11 @@ public function getCsv() $data = []; foreach ($this->getColumns() as $column) { if (!$column->getIsSystem()) { + $exportField = (string)$column->getRowFieldExport($item); $data[] = '"' . str_replace( ['"', '\\'], ['""', '\\\\'], - $column->getRowFieldExport($item) ?: '' + $exportField ?: '' ) . '"'; } } From 85ff1ab6ee26352305d01005efc483a453dfb99a Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Thu, 5 Jan 2023 18:17:05 +0530 Subject: [PATCH 390/985] AC-7562::2.4.6-alpha2-Composer Integration Test Failures(Broken) --- .../Test/Unit/Model/CheckoutAgreementsRepositoryTest.php | 1 + .../GiftMessage/Test/Unit/Model/CartRepositoryTest.php | 2 +- .../Magento/Paypal/Test/Unit/Controller/ExpressTest.php | 3 ++- .../Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php | 2 +- .../Magento/GiftMessage/Api/CartRepositoryTest.php | 6 +++--- .../Magento/GiftMessage/Api/GuestCartRepositoryTest.php | 6 +++--- .../Magento/GiftMessage/Api/ItemRepositoryTest.php | 6 +++--- .../Magento/GraphQl/Quote/Customer/GetCartTest.php | 6 ++++-- .../testsuite/Magento/Sales/Service/V1/ShipOrderTest.php | 4 ++-- .../testsuite/Magento/Test/Integrity/Layout/BlocksTest.php | 2 -- .../Magento/Framework/App/Utility/AggregateInvoker.php | 3 +++ 11 files changed, 23 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php b/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php index 68cbd952d82a9..84c5d946b05ee 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php +++ b/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php @@ -1,3 +1,4 @@ + <?php /** * Copyright © Magento, Inc. All rights reserved. diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php index 2a30d234df278..816f8b96a2a79 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php @@ -1,4 +1,4 @@ -<?php + <?php /** * * Copyright © Magento, Inc. All rights reserved. diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php index c2f123d299d91..f1567705859ff 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php @@ -32,7 +32,8 @@ abstract class ExpressTest extends TestCase /** @var Express */ protected $model; - protected $name = ''; + /** @var string */ + protected $name = ''; /** @var Session|MockObject */ protected $customerSession; diff --git a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php index cf0a06826a919..2fe634b1ff840 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/TaxTest.php @@ -48,7 +48,7 @@ */ class TaxTest extends TestCase { - const TAX = 0.2; + public const TAX = 0.2; /** * Tests the specific method diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index bca848cd779bc..c4982cb5e161d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -9,9 +9,9 @@ class CartRepositoryTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageCartRepositoryV1'; - const RESOURCE_PATH = '/V1/carts/'; + public const SERVICE_VERSION = 'V1'; + public const SERVICE_NAME = 'giftMessageCartRepositoryV1'; + public const RESOURCE_PATH = '/V1/carts/'; /** * @var \Magento\TestFramework\ObjectManager diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php index e827c527d459a..9870ec6d93627 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php @@ -9,9 +9,9 @@ class GuestCartRepositoryTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageGuestCartRepositoryV1'; - const RESOURCE_PATH = '/V1/guest-carts/'; + public const SERVICE_VERSION = 'V1'; + public const SERVICE_NAME = 'giftMessageGuestCartRepositoryV1'; + public const RESOURCE_PATH = '/V1/guest-carts/'; /** * @var \Magento\TestFramework\ObjectManager diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index 64ad722d14141..9102eb85d15af 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -9,9 +9,9 @@ class ItemRepositoryTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageItemRepositoryV1'; - const RESOURCE_PATH = '/V1/carts/'; + public const SERVICE_VERSION = 'V1'; + public const SERVICE_NAME = 'giftMessageItemRepositoryV1'; + public const RESOURCE_PATH = '/V1/carts/'; /** * @var \Magento\TestFramework\ObjectManager diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index 07b949bf866f8..f448605c08d81 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -131,7 +131,8 @@ public function testGetCartIfCartIdIsEmpty() public function testGetCartIfCartIdIsMissed() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Field "cart" argument "cart_id" of type "String!" is required but not provided.'); + $message = 'Field "cart" argument "cart_id" of type "String!" is required but not provided.'; + $this->expectExceptionMessage($message); $query = <<<QUERY { @@ -201,7 +202,8 @@ public function testGetCartWithNotDefaultStore() public function testGetCartWithWrongStore() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.'); + $message = 'The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.'; + $this->expectExceptionMessage($message); $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); $query = $this->getQuery($maskedQuoteId); diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php index 81d5cfdc30749..41b03933f40a2 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php @@ -19,8 +19,8 @@ */ class ShipOrderTest extends \Magento\TestFramework\TestCase\WebapiAbstract { - const SERVICE_READ_NAME = 'salesShipOrderV1'; - const SERVICE_VERSION = 'V1'; + public const SERVICE_READ_NAME = 'salesShipOrderV1'; + public const SERVICE_VERSION = 'V1'; /** * @var ObjectManagerInterface diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php index 477d01c7825dc..8937fcda2090c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/BlocksTest.php @@ -1,7 +1,5 @@ <?php /** - * Test layout declaration and usage of block elements - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ diff --git a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php index 4f35b43617136..3ae63079ff88f 100644 --- a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php +++ b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php @@ -37,6 +37,7 @@ public function __construct($testCase, array $options = []) /** * Collect all failed assertions and fail test in case such list is not empty. + * * Incomplete and skipped test results are aggregated as well. * * @param callable $callback @@ -71,6 +72,8 @@ public function __invoke(callable $callback, array $dataSource) } /** + * prepare Message + * * @param \Exception $exception * @param string $dataSetName * @param mixed $dataSet From b5fc5fefb722fa5d44767840ac89bf8caa88c4e5 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Thu, 5 Jan 2023 18:19:40 +0530 Subject: [PATCH 391/985] AC-7562::2.4.6-alpha2-Composer Integration Test Failures(Broken) --- .../Test/Unit/Model/CheckoutAgreementsRepositoryTest.php | 1 - .../Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php b/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php index 84c5d946b05ee..68cbd952d82a9 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php +++ b/app/code/Magento/CheckoutAgreements/Test/Unit/Model/CheckoutAgreementsRepositoryTest.php @@ -1,4 +1,3 @@ - <?php /** * Copyright © Magento, Inc. All rights reserved. diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php index 816f8b96a2a79..2a30d234df278 100644 --- a/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php +++ b/app/code/Magento/GiftMessage/Test/Unit/Model/CartRepositoryTest.php @@ -1,4 +1,4 @@ - <?php +<?php /** * * Copyright © Magento, Inc. All rights reserved. From 1cbf7676ff34dd010ce30933a3603265e705b13a Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 5 Jan 2023 18:34:46 +0530 Subject: [PATCH 392/985] ACPT-826 --- app/code/Magento/AsyncConfig/Model/Save.php | 36 +++-------- app/code/Magento/AsyncConfig/composer.json | 3 +- .../Adminhtml/System/Config/Save.php | 63 +++++++++++-------- 3 files changed, 48 insertions(+), 54 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/Save.php b/app/code/Magento/AsyncConfig/Model/Save.php index 9af24cacbe5fb..8d2f005ac51da 100644 --- a/app/code/Magento/AsyncConfig/Model/Save.php +++ b/app/code/Magento/AsyncConfig/Model/Save.php @@ -7,15 +7,15 @@ namespace Magento\AsyncConfig\Model; - use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; +use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\RuntimeException; -class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save +class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save implements HttpPostActionInterface { /** * @var DeploymentConfig @@ -52,12 +52,15 @@ public function __construct( DeploymentConfig $deploymentConfig = null, AsyncConfigPublisherInterface $asyncConfigPublisher = null ) { - parent::__construct($context, + parent::__construct + ( + $context, $configStructure, $sectionChecker, $configFactory, $cache, - $string); + $string + ); $this->deploymentConfig = $deploymentConfig ?? ObjectManager::getInstance()->get(DeploymentConfig::class); $this->asyncConfigPublisher = $asyncConfigPublisher @@ -65,6 +68,7 @@ public function __construct( } /** + * * @throws LocalizedException * @throws FileSystemException * @throws RuntimeException @@ -74,29 +78,7 @@ public function execute() if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { return parent::execute(); } else { - $this->_saveSection(); - $section = $this->getRequest()->getParam('section'); - $website = $this->getRequest()->getParam('website'); - $store = $this->getRequest()->getParam('store'); - $configData = [ - 'section' => $section, - 'website' => $website, - 'store' => $store, - 'groups' => $this->_getGroupsForSave(), - ]; - $configData = $this->filterNodes($configData); - $groups = $this->getRequest()->getParam('groups'); - if (isset($groups['country']['fields'])) { - if (isset($groups['country']['fields']['eu_countries'])) { - $countries = $groups['country']['fields']['eu_countries']; - if (empty($countries['value']) && - !isset($countries['inherit'])) { - throw new LocalizedException( - __('Something went wrong while saving this configuration.') - ); - } - } - } + $configData = $this->getConfigData(); $this->asyncConfigPublisher->saveConfigData($configData); $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); $this->_saveState($this->getRequest()->getPost('config_state')); diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 2d411fcabbba2..9aae513516d94 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -5,7 +5,8 @@ "php": "~8.1.0||~8.2.0", "magento/framework": "*", "magento/module-config": "*", - "magento/module-media-gallery-integration": "*" + "magento/module-media-gallery-integration": "*", + "magento/module-backend": "*" }, "type": "magento2-module", "license": [ diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 0110d4c311ec1..be88a55ecc623 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -210,31 +210,7 @@ public function execute() { try { // custom save logic - $this->_saveSection(); - $section = $this->getRequest()->getParam('section'); - $website = $this->getRequest()->getParam('website'); - $store = $this->getRequest()->getParam('store'); - $configData = [ - 'section' => $section, - 'website' => $website, - 'store' => $store, - 'groups' => $this->_getGroupsForSave(), - ]; - $configData = $this->filterNodes($configData); - - $groups = $this->getRequest()->getParam('groups'); - - if (isset($groups['country']['fields'])) { - if (isset($groups['country']['fields']['eu_countries'])) { - $countries = $groups['country']['fields']['eu_countries']; - if (empty($countries['value']) && - !isset($countries['inherit'])) { - throw new LocalizedException( - __('Something went wrong while saving this configuration.') - ); - } - } - } + $configData = $this->getConfigData(); /** @var \Magento\Config\Model\Config $configModel */ $configModel = $this->_configFactory->create(['data' => $configData]); @@ -332,7 +308,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf * @param array $configData * @return array */ - public function filterNodes(array $configData): array + protected function filterNodes(array $configData): array { if (!empty($configData['groups'])) { $systemXmlPathsFromKeys = array_keys($this->_configStructure->getFieldPaths()); @@ -349,4 +325,39 @@ public function filterNodes(array $configData): array return $configData; } + + /** + * + * @return array + * @throws LocalizedException + */ + protected function getConfigData() + { + $this->_saveSection(); + $section = $this->getRequest()->getParam('section'); + $website = $this->getRequest()->getParam('website'); + $store = $this->getRequest()->getParam('store'); + $configData = [ + 'section' => $section, + 'website' => $website, + 'store' => $store, + 'groups' => $this->_getGroupsForSave(), + ]; + $configData = $this->filterNodes($configData); + + $groups = $this->getRequest()->getParam('groups'); + + if (isset($groups['country']['fields'])) { + if (isset($groups['country']['fields']['eu_countries'])) { + $countries = $groups['country']['fields']['eu_countries']; + if (empty($countries['value']) && + !isset($countries['inherit'])) { + throw new LocalizedException( + __('Something went wrong while saving this configuration.') + ); + } + } + } + return $configData; + } } From 511c3bdc5414500798d71d7485b5cfa4646ac513 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Thu, 5 Jan 2023 18:35:08 +0530 Subject: [PATCH 393/985] fixed the dependent test cases for TaxCode --- .../AddNewTaxRateNoZipActionGroup.xml | 2 +- .../AddNewTaxRateNoZipUIActionGroup.xml | 32 +++++++++++++++++++ ...orefrontTaxQuoteCartLoggedInSimpleTest.xml | 6 ++-- ...refrontTaxQuoteCartLoggedInVirtualTest.xml | 6 ++-- 4 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipUIActionGroup.xml diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml index e1a5832fd8429..8a2945130c925 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipActionGroup.xml @@ -20,7 +20,7 @@ <click stepKey="addNewTaxRate" selector="{{AdminTaxRulesSection.addNewTaxRate}}"/> <!-- Fill out a new tax rate --> - <fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.identifier}}-{{taxCode.rate}}"/> + <fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.state}}-{{taxCode.rate}}"/> <fillField stepKey="fillZipCode" selector="{{AdminTaxRulesSection.zipCode}}" userInput="{{taxCode.zip}}"/> <selectOption stepKey="selectState" selector="{{AdminTaxRulesSection.state}}" userInput="{{taxCode.state}}"/> <selectOption stepKey="selectCountry" selector="{{AdminTaxRulesSection.country}}" userInput="{{taxCode.country}}"/> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipUIActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipUIActionGroup.xml new file mode 100644 index 0000000000000..73bfd9b58c0f1 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AddNewTaxRateNoZipUIActionGroup.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AddNewTaxRateNoZipUIActionGroup"> + <annotations> + <description>Goes to the Admin Tax Rules grid page. Adds the provided Tax Code.</description> + </annotations> + <arguments> + <argument name="taxCode"/> + </arguments> + + <!-- Go to the tax rate page --> + <click stepKey="addNewTaxRate" selector="{{AdminTaxRulesSection.addNewTaxRate}}"/> + + <!-- Fill out a new tax rate --> + <fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.identifier}}-{{taxCode.rate}}"/> + <fillField stepKey="fillZipCode" selector="{{AdminTaxRulesSection.zipCode}}" userInput="{{taxCode.zip}}"/> + <selectOption stepKey="selectState" selector="{{AdminTaxRulesSection.state}}" userInput="{{taxCode.state}}"/> + <selectOption stepKey="selectCountry" selector="{{AdminTaxRulesSection.country}}" userInput="{{taxCode.country}}"/> + <fillField stepKey="fillRate" selector="{{AdminTaxRulesSection.rate}}" userInput="{{taxCode.rate}}"/> + + <!-- Save the tax rate --> + <click stepKey="saveTaxRate" selector="{{AdminTaxRulesSection.save}}"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml index 776bf0f9639a8..829043bf48b7c 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml @@ -30,16 +30,16 @@ <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> <!-- Add NY and CA tax rules --> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate"> <argument name="taxCode" value="SimpleTaxNY"/> </actionGroup> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate"> <argument name="taxCode" value="SimpleTaxCA"/> </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessgaeForSavingRule"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/> <magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> <!-- Fill out form for a new user with address --> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml index eafa0ede97956..1593f91945b97 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml @@ -30,16 +30,16 @@ <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> <!-- Add NY and CA tax rules --> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate"> <argument name="taxCode" value="SimpleTaxNY"/> </actionGroup> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate"> <argument name="taxCode" value="SimpleTaxCA"/> </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> - <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessgaeForSavingRule"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/> <!-- Fill out form for a new user with address --> <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> From ccea8c12fa119a467014f9de797e8ca4ca42adad Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Thu, 5 Jan 2023 19:17:14 +0530 Subject: [PATCH 394/985] AC-7562::2.4.6-alpha2-Composer Integration Test Failures(Broken) --- .../Magento/GiftMessage/Api/GuestItemRepositoryTest.php | 6 +++--- .../Magento/GraphQl/Quote/Customer/GetCartTest.php | 4 ++-- .../Magento/Framework/App/Utility/AggregateInvoker.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php index ba69b807815a9..5e4c4065fb9a7 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php @@ -9,9 +9,9 @@ class GuestItemRepositoryTest extends WebapiAbstract { - const SERVICE_VERSION = 'V1'; - const SERVICE_NAME = 'giftMessageGuestItemRepositoryV1'; - const RESOURCE_PATH = '/V1/guest-carts/'; + public const SERVICE_VERSION = 'V1'; + public const SERVICE_NAME = 'giftMessageGuestItemRepositoryV1'; + public const RESOURCE_PATH = '/V1/guest-carts/'; /** * @var \Magento\TestFramework\ObjectManager diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index f448605c08d81..d8f6b052b7fcc 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -202,8 +202,8 @@ public function testGetCartWithNotDefaultStore() public function testGetCartWithWrongStore() { $this->expectException(\Exception::class); - $message = 'The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.'; - $this->expectExceptionMessage($message); + $message = 'The account sign-in was incorrect or your account is disabled temporarily.'; + $this->expectExceptionMessage($message.' Please wait and try again later.'); $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); $query = $this->getQuery($maskedQuoteId); diff --git a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php index 3ae63079ff88f..49186d22542dd 100644 --- a/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php +++ b/lib/internal/Magento/Framework/App/Utility/AggregateInvoker.php @@ -37,7 +37,7 @@ public function __construct($testCase, array $options = []) /** * Collect all failed assertions and fail test in case such list is not empty. - * + * * Incomplete and skipped test results are aggregated as well. * * @param callable $callback @@ -72,8 +72,8 @@ public function __invoke(callable $callback, array $dataSource) } /** - * prepare Message - * + * Prepare Message + * * @param \Exception $exception * @param string $dataSetName * @param mixed $dataSet From 451d0ea00ef2acee025943bee0410a4111336a04 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 5 Jan 2023 20:08:48 +0530 Subject: [PATCH 395/985] ACPT-826 --- .../{Model => Controller/Adminhtml/System/Config}/Save.php | 5 ++--- app/code/Magento/AsyncConfig/etc/di.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename app/code/Magento/AsyncConfig/{Model => Controller/Adminhtml/System/Config}/Save.php (95%) diff --git a/app/code/Magento/AsyncConfig/Model/Save.php b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php similarity index 95% rename from app/code/Magento/AsyncConfig/Model/Save.php rename to app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php index 8d2f005ac51da..4ed152dee45b9 100644 --- a/app/code/Magento/AsyncConfig/Model/Save.php +++ b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php @@ -5,17 +5,16 @@ */ declare(strict_types=1); -namespace Magento\AsyncConfig\Model; +namespace Magento\AsyncConfig\Controller\Adminhtml\System\Config; use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; -use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\RuntimeException; -class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save implements HttpPostActionInterface +class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save { /** * @var DeploymentConfig diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 7a2c97b1249b7..3162d05b66d2b 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -11,7 +11,7 @@ <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> <preference for="Magento\Config\Controller\Adminhtml\System\Config\Save" - type="Magento\AsyncConfig\Model\Save" /> + type="Magento\AsyncConfig\Controller\Adminhtml\System\Config\Save" /> <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> <type name="Magento\Framework\File\Uploader"> <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> From b304dcc14f9c80fe1c2e7be889e2789e90828f1b Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Thu, 5 Jan 2023 20:11:03 +0530 Subject: [PATCH 396/985] ACPT-826 --- .../AsyncConfig/Controller/Adminhtml/System/Config/Save.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php index 4ed152dee45b9..dfb28a352f74f 100644 --- a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php @@ -51,8 +51,7 @@ public function __construct( DeploymentConfig $deploymentConfig = null, AsyncConfigPublisherInterface $asyncConfigPublisher = null ) { - parent::__construct - ( + parent::__construct( $context, $configStructure, $sectionChecker, @@ -68,6 +67,7 @@ public function __construct( /** * + * Execute Save action * @throws LocalizedException * @throws FileSystemException * @throws RuntimeException From fcd19290e7fab05956c65ca6d82cf9a7c39257d1 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 5 Jan 2023 20:22:16 +0530 Subject: [PATCH 397/985] AC-7422:Incompatible issues fix for PHP8.2 --- app/code/Magento/Sales/Helper/Admin.php | 3 ++- .../Block/Product/View/MultiStoreCurrencyTest.php | 6 +++--- lib/internal/Magento/Framework/Escaper.php | 9 ++------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index f88e5a9465b79..a3269ce526db1 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,8 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - $data = htmlentities($data, ENT_QUOTES | ENT_IGNORE, 'UTF-8', false); + $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES , 'ISO-8859-1'); + $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php index 8019681ab8ce1..a225102570df7 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php @@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple2', '240,00 ₴', 'fixturestore'); + $this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore'); } /** @@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple', 'Special Price 143,76 ₴ Regular Price 240,00 ₴', 'fixturestore'); + $this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore'); } /** @@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void $this->localeResolver->setLocale('uk_UA'); $this->assertProductStorePrice( 'simple-product-tax-none', - 'Buy 2 for 960,00 ₴ each and save 80%', + 'Buy 2 for 960,00  each and save 80%', 'fixturestore', self::TIER_PRICE_BLOCK_NAME ); diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index fa02e53dc9cad..60a67d03ae0d6 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -16,7 +16,7 @@ class Escaper { /** - * @var ENT_QUOTES | ENT_SUBSTITUTE + * HTML special characters flag */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -96,7 +96,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = html_entity_decode($data, ENT_QUOTES, 'UTF-8'); + $string = @iconv("UTF-8","ISO-8859-1//IGNORE", $data); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -346,7 +346,6 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -367,7 +366,6 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -416,7 +414,6 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -431,7 +428,6 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -447,7 +443,6 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From 122d3a354175e1913b5e16d9aa8623f82610a11b Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 5 Jan 2023 21:49:35 +0530 Subject: [PATCH 398/985] AC-7572::Comment is added to preserve the step key for backward compatibility --- ...torefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml index 5aa6b699a41ee..7b25b4c283c6a 100644 --- a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml +++ b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml @@ -21,7 +21,10 @@ <group value="pr_exclude"/> </annotations> <before> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="setSearchEngine"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="deleteAllProducts"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createFirtsSimpleProduct"/> <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> <createData entity="VirtualProduct" stepKey="createVirtualProduct"/> <createData entity="SimpleProductWithCustomSku24MB06" stepKey="createSecondSimpleProduct"/> From cc6df40bc8316da0e54646e00bc7b67aa79b4bab Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 5 Jan 2023 21:49:40 +0530 Subject: [PATCH 399/985] AC-7572:Testcases related to elastic search are failing due to elasticsearch8 module - Fixed MFTF BIC --- ...refrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml index 5aa6b699a41ee..cf733bd22f8e4 100644 --- a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml +++ b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml @@ -21,9 +21,11 @@ <group value="pr_exclude"/> </annotations> <before> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="setSearchEngine"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> + <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProducts"/> <createData entity="VirtualProduct" stepKey="createVirtualProduct"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createFirtsSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB06" stepKey="createSecondSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB04" stepKey="createThirdSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB02" stepKey="createFourthSimpleProduct"/> @@ -34,6 +36,7 @@ <magentoCron groups="index" stepKey="reindex"/> </before> <after> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="deleteProductOne"/> <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> </after> From aa50560109859df648900a63c70e5c73e974b685 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 6 Jan 2023 02:03:21 +0530 Subject: [PATCH 400/985] ACPT-826 --- .../Controller/Adminhtml/System/Config/Save.php | 2 +- app/code/Magento/AsyncConfig/etc/adminhtml/di.xml | 11 +++++++++++ .../Magento/AsyncConfig/etc/adminhtml/routes.xml | 14 ++++++++++++++ app/code/Magento/AsyncConfig/etc/di.xml | 2 -- .../Controller/Adminhtml/System/Config/Save.php | 3 ++- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 app/code/Magento/AsyncConfig/etc/adminhtml/di.xml create mode 100644 app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml diff --git a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php index dfb28a352f74f..fc789478ffcb3 100644 --- a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php @@ -66,8 +66,8 @@ public function __construct( } /** - * * Execute Save action + * * @throws LocalizedException * @throws FileSystemException * @throws RuntimeException diff --git a/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml b/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml new file mode 100644 index 0000000000000..6a297b45e0ac3 --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <preference for="Magento\Config\Controller\Adminhtml\System\Config\Save" + type="Magento\AsyncConfig\Controller\Adminhtml\System\Config\Save" /> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml b/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml new file mode 100644 index 0000000000000..5d653c597178f --- /dev/null +++ b/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> + <router id="admin"> + <route id="adminhtml"> + <module name="Magento_AsyncConfig" before="Magento_Config"/> + </route> + </router> +</config> diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 3162d05b66d2b..097024f927308 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -10,8 +10,6 @@ type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> - <preference for="Magento\Config\Controller\Adminhtml\System\Config\Save" - type="Magento\AsyncConfig\Controller\Adminhtml\System\Config\Save" /> <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> <type name="Magento\Framework\File\Uploader"> <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index be88a55ecc623..36f4472412e73 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -308,7 +308,7 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf * @param array $configData * @return array */ - protected function filterNodes(array $configData): array + public function filterNodes(array $configData): array { if (!empty($configData['groups'])) { $systemXmlPathsFromKeys = array_keys($this->_configStructure->getFieldPaths()); @@ -327,6 +327,7 @@ protected function filterNodes(array $configData): array } /** + * Get Config data from Request * * @return array * @throws LocalizedException From 25a93a388772821765bda81a49ca272722123c03 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Thu, 5 Jan 2023 14:34:48 -0600 Subject: [PATCH 401/985] ACP2E-1444: [Page Builder] Product widget does not work with SKUs containing '&' --- app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml index c178c5ed0fd2d..0436609c7e73e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml @@ -1484,5 +1484,8 @@ <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> </entity> - -</entities> \ No newline at end of file + <entity name="ProductWithSpecialCharsInSKU" extends="SimpleProduct" type="product"> + <data key="name">Simple Product with special characters in SKU</data> + <data key="sku">s000&01</data> + </entity> +</entities> From db179e8c2e21b45cfb2468f13d07b0a7c8622d0f Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Thu, 5 Jan 2023 16:54:44 -0600 Subject: [PATCH 402/985] ACP2E-1444: [Page Builder] Product widget does not work with SKUs containing '&' --- app/code/Magento/CatalogWidget/Block/Product/ProductsList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php index 15f544813b70c..f04562dd8b635 100644 --- a/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php +++ b/app/code/Magento/CatalogWidget/Block/Product/ProductsList.php @@ -579,7 +579,7 @@ private function getWidgetPagerBlockName() } /** - * Decode encoded html special characters and unserialize the conditions into array + * Decode encoded special characters and unserialize conditions into array * * @param string $encodedConditions * @return array From 5a0f1d4bcc12088fcfbeee61fb44dfdb787d9a25 Mon Sep 17 00:00:00 2001 From: "Manoranjan.Prakash" <manoranjan.prakash@BLR1-LMC-N71395.local> Date: Fri, 6 Jan 2023 12:16:36 +0530 Subject: [PATCH 403/985] updated the comment --- .../StorefrontTaxQuoteCartLoggedInSimpleTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml index 829043bf48b7c..9c50e7e7ed5aa 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml @@ -68,7 +68,7 @@ <!-- Go to the tax rate page --> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRatesPage"/> - <!-- Delete the two tax rates that were created --> + <!-- Delete the two created tax rates --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> From 9d18a89370dac4cfb54c776cfff0ddfc533fda87 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 6 Jan 2023 14:59:49 +0530 Subject: [PATCH 404/985] ACPT-826 --- .../AsyncConfig/Controller/Adminhtml/System/Config/Save.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php index fc789478ffcb3..24c5bfa571b2c 100644 --- a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php @@ -8,13 +8,14 @@ namespace Magento\AsyncConfig\Controller\Adminhtml\System\Config; use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; +use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\RuntimeException; -class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save +class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save implements HttpPostActionInterface { /** * @var DeploymentConfig From d26e362c0e2530f229493b6c684547166aa13fde Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 6 Jan 2023 12:49:35 +0200 Subject: [PATCH 405/985] ACP2E-1388, address CR feedback --- .../Plugin/ProductPriceIndexModifier.php | 91 ++++++++++++++----- .../Indexer/Product/Price/AbstractAction.php | 1 - 2 files changed, 70 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 35b1958ca75af..f2f151d2caa75 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -7,33 +7,68 @@ namespace Magento\Bundle\Model\Plugin; +use Magento\Bundle\Model\Product\Price; +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product\Type; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; +use Magento\CatalogInventory\Api\StockConfigurationInterface; use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; use Magento\Framework\App\ResourceConnection; +use Magento\Framework\EntityManager\MetadataPool; +use Magento\Framework\Exception\NoSuchEntityException; /** * Checks if product is part of dynamic price bundle and skips price reindex */ class ProductPriceIndexModifier { + /** + * @var StockConfigurationInterface + */ + private StockConfigurationInterface $stockConfiguration; + /** * @var ResourceConnection */ private ResourceConnection $resourceConnection; + /** + * @var MetadataPool + */ + private MetadataPool $metadataPool; + + /** + * @var ProductRepositoryInterface + */ + private ProductRepositoryInterface $productRepository; + /** * @var string */ private string $connectionName; /** + * @param StockConfigurationInterface $stockConfiguration * @param ResourceConnection $resourceConnection + * @param MetadataPool $metadataPool + * @param ProductRepositoryInterface|null $productRepository * @param string $connectionName */ - public function __construct(ResourceConnection $resourceConnection, string $connectionName = 'indexer') + public function __construct( + StockConfigurationInterface $stockConfiguration, + ResourceConnection $resourceConnection, + MetadataPool $metadataPool, + ?ProductRepositoryInterface $productRepository = null, + string $connectionName = 'indexer' + ) { + $this->stockConfiguration = $stockConfiguration; $this->resourceConnection = $resourceConnection; + $this->metadataPool = $metadataPool; $this->connectionName = $connectionName; + $this->productRepository = $productRepository ?: \Magento\Framework\App\ObjectManager::getInstance() + ->get(ProductRepositoryInterface::class); } /** @@ -44,6 +79,7 @@ public function __construct(ResourceConnection $resourceConnection, string $conn * @param IndexTableStructure $priceTable * @param array $entityIds * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @throws \Exception */ public function aroundModifyPrice( ProductPriceIndexFilter $subject, @@ -51,16 +87,10 @@ public function aroundModifyPrice( IndexTableStructure $priceTable, array $entityIds = [] ) { - if (empty($entityIds)) { - $proceed($priceTable, []); - } - - $filteredEntities = []; - foreach ($entityIds as $id) { - if (!$this->isWithinDynamicPriceBundle($priceTable->getTableName(), (int) $id)) { - $filteredEntities[] = $id; - } + if (empty($entityIds) || $this->stockConfiguration->isShowOutOfStock()) { + $proceed($priceTable, $entityIds); } + $filteredEntities = $this->filterProductsFromDynamicPriceBundle($priceTable->getTableName(), $entityIds); if (!empty($filteredEntities)) { $proceed($priceTable, $filteredEntities); @@ -68,25 +98,44 @@ public function aroundModifyPrice( } /** - * Check if the product is part of a dynamic price bundle configuration + * Filter products that are part of a dynamic bundle price configuration * * @param string $priceTableName - * @param int $productId - * @return bool + * @param array $productIds + * @return array + * @throws NoSuchEntityException */ - private function isWithinDynamicPriceBundle(string $priceTableName, int $productId): bool + private function filterProductsFromDynamicPriceBundle(string $priceTableName, array $productIds): array { + $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField(); $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); - $select->from(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); + $select->from(['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')]); + $select->columns(['product.entity_id AS bundle_id', 'selection.product_id AS child_product_id']); $select->joinInner( - ['price' => $priceTableName], - implode(' AND ', ['price.entity_id = selection.product_id']), - null + ['price' => $this->resourceConnection->getTableName($priceTableName)], + implode(' AND ', ['price.entity_id = selection.product_id']) ); - $select->where('selection.product_id = ?', $productId); - $select->where('price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC); + $select->joinInner( + ['product' => $this->resourceConnection->getTableName('catalog_product_entity')], + "product.$linkField = selection.parent_product_id" + ); + $select->where('selection.product_id IN (?)', $productIds); + $select->where('product.type_id = ?', Type::TYPE_BUNDLE); + $bundleProducts = $connection->fetchAll($select); + + if (empty($bundleProducts)) { + return []; + } + + $filteredProducts = []; + foreach($bundleProducts as $bundle) { + $bundleProduct = $this->productRepository->getById($bundle['bundle_id']); + if ($bundleProduct->getPriceType() != Price::PRICE_TYPE_DYNAMIC) { + $filteredProducts[] = $bundle['child_product_id']; + } + } - return (int)$connection->fetchOne($select) != 0; + return $filteredProducts; } } diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php index 63e3b373d7b1a..e69ab504880ef 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php @@ -441,7 +441,6 @@ private function deleteOutdatedData(array $entityIds, string $temporaryTable, st 'tmp_table.customer_group_id = main_table.customer_group_id', 'tmp_table.website_id = main_table.website_id', ]; - $select = $this->getConnection()->select() ->from(['main_table' => $mainTable], null) ->joinLeft(['tmp_table' => $temporaryTable], implode(' AND ', $joinCondition), null) From 23022c4ccba544c562106301f85d3b1b8b189e86 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 6 Jan 2023 17:00:42 +0530 Subject: [PATCH 406/985] AC-7422:Incompatible issues fix for PHP8.2 --- app/code/Magento/Sales/Helper/Admin.php | 4 ++-- .../testsuite/Magento/Sales/Helper/AdminTest.php | 2 +- .../testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php | 2 ++ lib/internal/Magento/Framework/Escaper.php | 6 ++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index a3269ce526db1..e903abcbe3cec 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -165,8 +165,8 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $domDocument = $this->domDocumentFactory->create(); $internalErrors = libxml_use_internal_errors(true); - - $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES , 'ISO-8859-1'); + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'ISO-8859-1'); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' diff --git a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php index 7b41f9890d74a..78655807be6d0 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php @@ -55,7 +55,7 @@ public function escapeHtmlWithLinksDataProvider(): array [ // @codingStandardsIgnoreStart 'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', - 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', + 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', // @codingStandardsIgnoreEnd 'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'], ], diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index 3c93e5598e68a..bf0c090426821 100755 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -21,6 +21,7 @@ use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\ObjectManager; use PHPUnit\Framework\MockObject\MockObject; +use Symfony\Component\HttpFoundation\Response; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -142,6 +143,7 @@ public function testInitFromOrderAndCreateOrderFromQuoteWithAdditionalOptions() ['additional_option_key' => 'additional_option_value'], $newOrderItem->getProductOptionByCode('additional_options') ); + Response::closeOutputBuffers(1, false); } /** diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index 60a67d03ae0d6..a3d12bd65fce8 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -17,6 +17,7 @@ class Escaper { /** * HTML special characters flag + * @var $htmlSpecialCharsFlag */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -346,6 +347,7 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -366,6 +368,7 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -414,6 +417,7 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -428,6 +432,7 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -443,6 +448,7 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From 6e53acd5f07258b18948b4d7e86763b9138748d2 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 6 Jan 2023 15:04:49 +0200 Subject: [PATCH 407/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing address CR feedback --- .../Plugin/ProductPriceIndexModifier.php | 5 +- .../Plugin/ProductPriceIndexModifierTest.php | 96 ++++++++++++++----- 2 files changed, 74 insertions(+), 27 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index f2f151d2caa75..83a9fe8338010 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -78,8 +78,9 @@ public function __construct( * @param callable $proceed * @param IndexTableStructure $priceTable * @param array $entityIds + * @return void + * @throws NoSuchEntityException * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @throws \Exception */ public function aroundModifyPrice( ProductPriceIndexFilter $subject, @@ -88,7 +89,7 @@ public function aroundModifyPrice( array $entityIds = [] ) { if (empty($entityIds) || $this->stockConfiguration->isShowOutOfStock()) { - $proceed($priceTable, $entityIds); + return $proceed($priceTable, $entityIds); } $filteredEntities = $this->filterProductsFromDynamicPriceBundle($priceTable->getTableName(), $entityIds); diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php index 852fbc5e8eb78..7599aebf6b88c 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php @@ -8,11 +8,16 @@ namespace Magento\Bundle\Test\Unit\Model\Plugin; use Magento\Bundle\Model\Plugin\ProductPriceIndexModifier; +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; +use Magento\CatalogInventory\Api\StockConfigurationInterface; use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; use Magento\Framework\App\ResourceConnection; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\DB\Select; +use Magento\Framework\EntityManager\EntityMetadataInterface; +use Magento\Framework\EntityManager\MetadataPool; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -20,11 +25,21 @@ class ProductPriceIndexModifierTest extends TestCase { private const CONNECTION_NAME = 'indexer'; + /** + * @var StockConfigurationInterface|StockConfigurationInterface&MockObject|MockObject + */ + private StockConfigurationInterface $stockConfiguration; + /** * @var ResourceConnection|MockObject */ private ResourceConnection $resourceConnection; + /** + * @var MetadataPool|MetadataPool&MockObject|MockObject + */ + private MetadataPool $metadataPool; + /** * @var ProductPriceIndexModifier */ @@ -35,6 +50,11 @@ class ProductPriceIndexModifierTest extends TestCase */ private IndexTableStructure $table; + /** + * @var ProductRepositoryInterface|ProductRepositoryInterface&MockObject|MockObject + */ + private ProductRepositoryInterface $productRepository; + /** * @var ProductPriceIndexFilter|MockObject */ @@ -42,10 +62,19 @@ class ProductPriceIndexModifierTest extends TestCase protected function setUp(): void { + $this->stockConfiguration = $this->createMock(StockConfigurationInterface::class); $this->table = $this->createMock(IndexTableStructure::class); $this->subject = $this->createMock(ProductPriceIndexFilter::class); $this->resourceConnection = $this->createMock(ResourceConnection::class); - $this->plugin = new ProductPriceIndexModifier($this->resourceConnection, self::CONNECTION_NAME); + $this->metadataPool = $this->createMock(MetadataPool::class); + $this->productRepository = $this->createMock(ProductRepositoryInterface::class); + $this->plugin = new ProductPriceIndexModifier( + $this->stockConfiguration, + $this->resourceConnection, + $this->metadataPool, + $this->productRepository, + self::CONNECTION_NAME + ); } public function testAroundModifyPriceNoEntities(): void @@ -63,41 +92,58 @@ public function testAroundModifyPriceFilteredEntities() { $priceTableName = 'catalog_product_index_price_temp'; $entities = [1, 2]; - $this->table->expects($this->exactly(2)) - ->method('getTableName') - ->willReturn($priceTableName); + $link = $this->createMock(EntityMetadataInterface::class); + $link->expects($this->once())->method('getLinkField')->willReturn('id'); + $this->metadataPool->expects($this->once()) + ->method('getMetadata') + ->with(ProductInterface::class) + ->willReturn($link); $select = $this->createMock(Select::class); + $select->expects($this->once()) + ->method('from'); $select->expects($this->exactly(2)) - ->method('from') - ->with(['selection' => 'catalog_product_bundle_selection'], 'selection_id'); + ->method('joinInner'); $select->expects($this->exactly(2)) - ->method('joinInner') - ->with( - ['price' => $priceTableName], - implode(' AND ', ['price.entity_id = selection.product_id']), - null - ); - $select->expects($this->exactly(4)) - ->method('where') - ->withConsecutive( - ['selection.product_id = ?', $entities[0]], - ['price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC], - ['selection.product_id = ?', $entities[1]], - ['price.tax_class_id = ?', \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC] - ); + ->method('where'); $connection = $this->createMock(AdapterInterface::class); - $connection->expects($this->exactly(2)) + $connection->expects($this->once()) ->method('select') ->willReturn($select); - $connection->expects($this->exactly(2)) - ->method('fetchOne') + $connection->expects($this->exactly(1)) + ->method('fetchAll') ->with($select) - ->willReturn(null); - $this->resourceConnection->expects($this->exactly(2)) + ->willReturn([ + [ + 'bundle_id' => 1, + 'child_product_id' => 1 + ], + [ + 'bundle_id' => 1, + 'child_product_id' => 2 + ] + ]); + $this->resourceConnection->expects($this->once()) ->method('getConnection') ->with(self::CONNECTION_NAME) ->willReturn($connection); + $bundleProduct1 = $this->getMockBuilder(ProductInterface::class) + ->disableOriginalConstructor() + ->addMethods(['getPriceType']) + ->getMockForAbstractClass(); + $bundleProduct1->expects($this->once())->method('getPriceType') + ->willReturn(1); + $bundleProduct2 = $this->getMockBuilder(ProductInterface::class) + ->disableOriginalConstructor() + ->addMethods(['getPriceType']) + ->getMockForAbstractClass(); + $bundleProduct2->expects($this->once())->method('getPriceType') + ->willReturn(1); + + $this->productRepository->expects($this->exactly(2)) + ->method('getById') + ->willReturnOnConsecutiveCalls($bundleProduct1, $bundleProduct2); + $calledPriceTable = ''; $calledEntities = []; $callable = function () use (&$calledPriceTable, &$calledEntities, $priceTableName, $entities) { From 791f80032b47818476ec9950b9d51c0d89c753e3 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 6 Jan 2023 18:36:55 +0530 Subject: [PATCH 408/985] ACPT-826 --- app/code/Magento/AsyncConfig/etc/module.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/AsyncConfig/etc/module.xml b/app/code/Magento/AsyncConfig/etc/module.xml index 67661f0e1826f..4707bc88baa60 100644 --- a/app/code/Magento/AsyncConfig/etc/module.xml +++ b/app/code/Magento/AsyncConfig/etc/module.xml @@ -7,5 +7,8 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Magento_AsyncConfig"> + <sequence> + <module name="Magento_Config"/> + </sequence> </module> </config> From aa0dfbffd08cb3847fd84ece8d9903aa009d966d Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 6 Jan 2023 16:09:58 +0200 Subject: [PATCH 409/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing address static analysis errors --- .../Bundle/Model/Plugin/ProductPriceIndexModifier.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 83a9fe8338010..2ece59b7b06da 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -61,8 +61,7 @@ public function __construct( MetadataPool $metadataPool, ?ProductRepositoryInterface $productRepository = null, string $connectionName = 'indexer' - ) - { + ) { $this->stockConfiguration = $stockConfiguration; $this->resourceConnection = $resourceConnection; $this->metadataPool = $metadataPool; @@ -130,7 +129,7 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar } $filteredProducts = []; - foreach($bundleProducts as $bundle) { + foreach ($bundleProducts as $bundle) { $bundleProduct = $this->productRepository->getById($bundle['bundle_id']); if ($bundleProduct->getPriceType() != Price::PRICE_TYPE_DYNAMIC) { $filteredProducts[] = $bundle['child_product_id']; From ccf7388ce46f54ab71f45ce4d6c3b498eca84f2b Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 6 Jan 2023 20:40:10 +0530 Subject: [PATCH 410/985] AC-7422:Incompatible issues fix for PHP8.2 --- lib/internal/Magento/Framework/Escaper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index a3d12bd65fce8..f25471d2de45e 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = @iconv("UTF-8","ISO-8859-1//IGNORE", $data); + $string = @iconv("UTF-8", "ISO-8859-1//IGNORE", $data); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' From e76703dc3c09f8291b48827cbab43dbd3a667c56 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Fri, 6 Jan 2023 22:05:46 +0530 Subject: [PATCH 411/985] AC-7588::Incorrect magento/composer dependency in 2.4.6-alpha4 --- composer.json | 6 +----- composer.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index e8c9218d0555f..d6969b42c29c6 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,6 @@ "sort-packages": true }, "repositories": [ - { - "type": "vcs", - "url": "https://github.com/magento/composer" - }, { "type": "vcs", "url": "https://github.com/wikimedia/less.php" @@ -75,7 +71,7 @@ "laminas/laminas-validator": "^2.23", "league/flysystem": "^2.4", "league/flysystem-aws-s3-v3": "^2.4", - "magento/composer": "dev-develop", + "magento/composer": "^1.9.0-beta2", "magento/composer-dependency-version-audit-plugin": "^0.1", "magento/magento-composer-installer": ">=0.4.0-beta1", "magento/zend-cache": "^1.16", diff --git a/composer.lock b/composer.lock index d17e57f153f48..a8532f6ac22e4 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": "3a107b29549e30e461a33f438c08e2b5", + "content-hash": "1e7e090bd82ee708a8c5284c018874d5", "packages": [ { "name": "aws/aws-crt-php", @@ -4235,16 +4235,16 @@ }, { "name": "magento/composer", - "version": "dev-develop", + "version": "1.9.0-beta2", "source": { "type": "git", "url": "https://github.com/magento/composer.git", - "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a" + "reference": "660389b85207e20d25710d5d4c96421a7261fde3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/d9ddee3de01a281f40bb44ffc14715ee63164b2a", - "reference": "d9ddee3de01a281f40bb44ffc14715ee63164b2a", + "url": "https://api.github.com/repos/magento/composer/zipball/660389b85207e20d25710d5d4c96421a7261fde3", + "reference": "660389b85207e20d25710d5d4c96421a7261fde3", "shasum": "" }, "require": { @@ -4255,23 +4255,23 @@ "require-dev": { "phpunit/phpunit": "^9" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { "Magento\\Composer\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "support": { - "source": "https://github.com/magento/composer/tree/develop", - "issues": "https://github.com/magento/composer/issues" + "issues": "https://github.com/magento/composer/issues", + "source": "https://github.com/magento/composer/tree/1.9.0-beta2" }, - "time": "2022-11-16T14:53:22+00:00" + "time": "2023-01-04T19:41:18+00:00" }, { "name": "magento/composer-dependency-version-audit-plugin", @@ -13898,7 +13898,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "magento/composer": 20, + "magento/composer": 10, "magento/magento-composer-installer": 10, "wikimedia/less.php": 20 }, From c0cdd2322e9c9464889a8e35d3c94bc8967dbd49 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 6 Jan 2023 22:17:39 +0530 Subject: [PATCH 412/985] ACPT-826 --- app/code/Magento/AsyncConfig/etc/di.xml | 14 ------------ app/code/Magento/Config/etc/adminhtml/di.xml | 10 --------- app/code/Magento/Config/etc/di.xml | 10 +++++++++ .../etc/adminhtml/di.xml | 13 ----------- .../MediaGalleryIntegration/etc/di.xml | 22 +++++++++++++++++++ 5 files changed, 32 insertions(+), 37 deletions(-) create mode 100644 app/code/Magento/MediaGalleryIntegration/etc/di.xml diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 097024f927308..82628b5b211a0 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -10,18 +10,4 @@ type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> - <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> - <type name="Magento\Framework\File\Uploader"> - <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> - </type> - <type name="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"> - <arguments> - <argument name="imageExtensions" xsi:type="array"> - <item name="jpg" xsi:type="string">jpg</item> - <item name="jpeg" xsi:type="string">jpeg</item> - <item name="gif" xsi:type="string">gif</item> - <item name="png" xsi:type="string">png</item> - </argument> - </arguments> - </type> </config> diff --git a/app/code/Magento/Config/etc/adminhtml/di.xml b/app/code/Magento/Config/etc/adminhtml/di.xml index 189fbdf69a7e8..1a1104aced16a 100644 --- a/app/code/Magento/Config/etc/adminhtml/di.xml +++ b/app/code/Magento/Config/etc/adminhtml/di.xml @@ -7,16 +7,6 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Config\Model\Config\Backend\File\RequestData" /> - <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> <type name="Magento\Config\Model\Config\Structure\Element\Iterator\Tab" shared="false" /> <type name="Magento\Config\Model\Config\Structure\Element\Iterator\Section" shared="false" /> - <type name="Magento\Config\Model\Config\Structure\ElementVisibilityComposite"> - <arguments> - <argument name="visibility" xsi:type="array"> - <item name="productionVisibility" xsi:type="object">Magento\Config\Model\Config\Structure\ConcealInProductionConfigList</item> - <item name="concealInProduction" xsi:type="object">Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProduction</item> - <item name="concealInProductionWithoutScdOnDemand" xsi:type="object">Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProductionWithoutScdOnDemand</item> - </argument> - </arguments> - </type> </config> diff --git a/app/code/Magento/Config/etc/di.xml b/app/code/Magento/Config/etc/di.xml index c45b31807b70d..4536bc71c6c10 100644 --- a/app/code/Magento/Config/etc/di.xml +++ b/app/code/Magento/Config/etc/di.xml @@ -10,6 +10,16 @@ <preference for="Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Config\Model\Config\Backend\File\RequestData" /> <preference for="Magento\Framework\App\Config\ConfigResource\ConfigInterface" type="Magento\Config\Model\ResourceModel\Config" /> <preference for="Magento\Framework\App\Config\CommentParserInterface" type="Magento\Config\Model\Config\Parser\Comment" /> + <preference for="Magento\Config\Model\Config\Structure\ElementVisibilityInterface" type="Magento\Config\Model\Config\Structure\ElementVisibilityComposite" /> + <type name="Magento\Config\Model\Config\Structure\ElementVisibilityComposite"> + <arguments> + <argument name="visibility" xsi:type="array"> + <item name="productionVisibility" xsi:type="object">Magento\Config\Model\Config\Structure\ConcealInProductionConfigList</item> + <item name="concealInProduction" xsi:type="object">Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProduction</item> + <item name="concealInProductionWithoutScdOnDemand" xsi:type="object">Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProductionWithoutScdOnDemand</item> + </argument> + </arguments> + </type> <virtualType name="Magento\Framework\View\TemplateEngine\Xhtml\ConfigCompiler" type="Magento\Framework\View\TemplateEngine\Xhtml\Compiler" shared="false"> <arguments> <argument name="compilerText" xsi:type="object">Magento\Framework\View\TemplateEngine\Xhtml\Compiler\Text</argument> diff --git a/app/code/Magento/MediaGalleryIntegration/etc/adminhtml/di.xml b/app/code/Magento/MediaGalleryIntegration/etc/adminhtml/di.xml index 08e83ce6cad88..ab25152cf3258 100644 --- a/app/code/Magento/MediaGalleryIntegration/etc/adminhtml/di.xml +++ b/app/code/Magento/MediaGalleryIntegration/etc/adminhtml/di.xml @@ -9,17 +9,4 @@ <type name="Magento\Ui\Component\Form\Element\DataType\Media\OpenDialogUrl"> <plugin name="new_media_gallery_open_dialog_url" type="Magento\MediaGalleryIntegration\Plugin\NewMediaGalleryOpenDialogUrl" /> </type> - <type name="Magento\Framework\File\Uploader"> - <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> - </type> - <type name="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"> - <arguments> - <argument name="imageExtensions" xsi:type="array"> - <item name="jpg" xsi:type="string">jpg</item> - <item name="jpeg" xsi:type="string">jpeg</item> - <item name="gif" xsi:type="string">gif</item> - <item name="png" xsi:type="string">png</item> - </argument> - </arguments> - </type> </config> diff --git a/app/code/Magento/MediaGalleryIntegration/etc/di.xml b/app/code/Magento/MediaGalleryIntegration/etc/di.xml new file mode 100644 index 0000000000000..2dabd32eed255 --- /dev/null +++ b/app/code/Magento/MediaGalleryIntegration/etc/di.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Framework\File\Uploader"> + <plugin name="save_asset_image" type="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"/> + </type> + <type name="Magento\MediaGalleryIntegration\Plugin\SaveImageInformation"> + <arguments> + <argument name="imageExtensions" xsi:type="array"> + <item name="jpg" xsi:type="string">jpg</item> + <item name="jpeg" xsi:type="string">jpeg</item> + <item name="gif" xsi:type="string">gif</item> + <item name="png" xsi:type="string">png</item> + </argument> + </arguments> + </type> +</config> From 1b3a0c04dd2594869cbe5a6fa86959829cf58ef5 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Fri, 6 Jan 2023 12:25:11 -0600 Subject: [PATCH 413/985] ACP2E-1505: [Cloud] Deployment issue due to exceeded memory and large tables --- ...pdateMultiselectAttributesBackendTypes.php | 19 +-- ...eMultiselectAttributesBackendTypesTest.php | 114 ++++++++++++++++++ 2 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Unit/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypesTest.php diff --git a/app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php b/app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php index 846784718d023..7781d49242367 100644 --- a/app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php +++ b/app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php @@ -81,15 +81,18 @@ public function apply() ->select() ->from($varcharTable) ->where('attribute_id in (?)', $attributesToMigrate); - $dataToMigrate = array_map(static function ($row) { - $row['value_id'] = null; - return $row; - }, $connection->fetchAll($varcharTableDataSql)); - - foreach (array_chunk($dataToMigrate, 2000) as $dataChunk) { - $connection->insertMultiple($textTable, $dataChunk); - } + $columns = $connection->describeTable($varcharTable); + unset($columns['value_id']); + $connection->query( + $connection->insertFromSelect( + $connection->select() + ->from($varcharTable, array_keys($columns)) + ->where('attribute_id in (?)', $attributesToMigrate), + $textTable, + array_keys($columns) + ) + ); $connection->query($connection->deleteFromSelect($varcharTableDataSql, $varcharTable)); foreach ($attributesToMigrate as $attributeId) { diff --git a/app/code/Magento/Catalog/Test/Unit/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypesTest.php b/app/code/Magento/Catalog/Test/Unit/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypesTest.php new file mode 100644 index 0000000000000..623a8ed87da95 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypesTest.php @@ -0,0 +1,114 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Setup\Patch\Data; + +use Magento\Catalog\Setup\Patch\Data\UpdateMultiselectAttributesBackendTypes; +use Magento\Eav\Setup\EavSetup; +use Magento\Eav\Setup\EavSetupFactory; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\DB\Select; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use PHPUnit\Framework\TestCase; + +class UpdateMultiselectAttributesBackendTypesTest extends TestCase +{ + /** + * @var ModuleDataSetupInterface|\PHPUnit\Framework\MockObject\MockObject + */ + private $dataSetup; + + /** + * @var EavSetupFactory|\PHPUnit\Framework\MockObject\MockObject + */ + private $eavSetupFactory; + + /** + * @var UpdateMultiselectAttributesBackendTypes + */ + private $model; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->dataSetup = $this->createMock(ModuleDataSetupInterface::class); + $this->eavSetupFactory = $this->createMock(EavSetupFactory::class); + $this->model = new UpdateMultiselectAttributesBackendTypes($this->dataSetup, $this->eavSetupFactory); + } + + public function testApply(): void + { + $attributeIds = [3, 7]; + $entityTypeId = 4; + $eavSetup = $this->createMock(EavSetup::class); + $connection = $this->createMock(AdapterInterface::class); + $select1 = $this->createMock(Select::class); + $select2 = $this->createMock(Select::class); + $select3 = $this->createMock(Select::class); + $this->eavSetupFactory->method('create') + ->willReturn($eavSetup); + $this->dataSetup->method('getConnection') + ->willReturn($connection); + $this->dataSetup->method('getTable') + ->willReturnArgument(0); + $eavSetup->method('getEntityTypeId') + ->willReturn(4); + $eavSetup->method('updateAttribute') + ->withConsecutive( + [$entityTypeId, 3, 'backend_type', 'text'], + [$entityTypeId, 7, 'backend_type', 'text'] + ); + $connection->expects($this->exactly(3)) + ->method('select') + ->willReturnOnConsecutiveCalls($select1, $select2, $select3); + $connection->method('describeTable') + ->willReturn( + [ + 'value_id' => [], + 'attribute_id' => [], + 'store_id' => [], + 'value' => [], + 'row_id' => [], + ] + ); + $connection->method('fetchCol') + ->with($select1) + ->willReturn($attributeIds); + $connection->method('insertFromSelect') + ->with($select3, 'catalog_product_entity_text', ['attribute_id', 'store_id', 'value', 'row_id']) + ->willReturn(''); + $connection->method('deleteFromSelect') + ->with($select2, 'catalog_product_entity_varchar') + ->willReturn(''); + $select1->method('from') + ->with('eav_attribute', ['attribute_id']) + ->willReturnSelf(); + $select1->method('where') + ->withConsecutive( + ['entity_type_id = ?', $entityTypeId], + ['backend_type = ?', 'varchar'], + ['frontend_input = ?', 'multiselect'] + ) + ->willReturnSelf(); + $select2->method('from') + ->with('catalog_product_entity_varchar') + ->willReturnSelf(); + $select2->method('where') + ->with('attribute_id in (?)', $attributeIds) + ->willReturnSelf(); + $select3->method('from') + ->with('catalog_product_entity_varchar', ['attribute_id', 'store_id', 'value', 'row_id']) + ->willReturnSelf(); + $select3->method('where') + ->with('attribute_id in (?)', $attributeIds) + ->willReturnSelf(); + $this->model->apply(); + } +} From 59cdcecdaa1d8cf7c9b6b9c90551436993b6ba21 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Sat, 7 Jan 2023 04:18:56 +0530 Subject: [PATCH 414/985] ACPT-826 --- .../System/Config/SaveAsyncConfigPlugin.php} | 53 +++++++++---------- .../Magento/AsyncConfig/etc/adminhtml/di.xml | 11 ---- .../AsyncConfig/etc/adminhtml/routes.xml | 14 ----- app/code/Magento/AsyncConfig/etc/di.xml | 3 ++ .../Adminhtml/System/AbstractConfig.php | 2 +- .../Adminhtml/System/Config/Save.php | 2 +- 6 files changed, 30 insertions(+), 55 deletions(-) rename app/code/Magento/AsyncConfig/{Controller/Adminhtml/System/Config/Save.php => Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php} (60%) delete mode 100644 app/code/Magento/AsyncConfig/etc/adminhtml/di.xml delete mode 100644 app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml diff --git a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php similarity index 60% rename from app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php rename to app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 24c5bfa571b2c..1f210155d7c95 100644 --- a/app/code/Magento/AsyncConfig/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -5,17 +5,19 @@ */ declare(strict_types=1); -namespace Magento\AsyncConfig\Controller\Adminhtml\System\Config; +namespace Magento\AsyncConfig\Plugin\Controller\System\Config; use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; -use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Config\Controller\Adminhtml\System\Config\Save; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Controller\Result\RedirectFactory; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\RuntimeException; +use Magento\Framework\Message\ManagerInterface; -class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save implements HttpPostActionInterface +class SaveAsyncConfigPlugin { /** * @var DeploymentConfig @@ -27,61 +29,56 @@ class Save extends \Magento\Config\Controller\Adminhtml\System\Config\Save imple */ private $asyncConfigPublisher; + /** + * @var RedirectFactory + */ + private RedirectFactory $resultRedirectFactory; + + /** + * @var ManagerInterface + */ + private $messageManager; + /** * @var const */ public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; /** - * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Config\Model\Config\Structure $configStructure - * @param \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker - * @param \Magento\Config\Model\Config\Factory $configFactory - * @param \Magento\Framework\Cache\FrontendInterface $cache - * @param \Magento\Framework\Stdlib\StringUtils $string * @param DeploymentConfig|null $deploymentConfig * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher */ public function __construct( - \Magento\Backend\App\Action\Context $context, - \Magento\Config\Model\Config\Structure $configStructure, - \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker, - \Magento\Config\Model\Config\Factory $configFactory, - \Magento\Framework\Cache\FrontendInterface $cache, - \Magento\Framework\Stdlib\StringUtils $string, DeploymentConfig $deploymentConfig = null, - AsyncConfigPublisherInterface $asyncConfigPublisher = null + AsyncConfigPublisherInterface $asyncConfigPublisher = null, + RedirectFactory $resultRedirectFactory, + ManagerInterface $messageManager ) { - parent::__construct( - $context, - $configStructure, - $sectionChecker, - $configFactory, - $cache, - $string - ); $this->deploymentConfig = $deploymentConfig ?? ObjectManager::getInstance()->get(DeploymentConfig::class); $this->asyncConfigPublisher = $asyncConfigPublisher ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); + $this->resultRedirectFactory = $resultRedirectFactory; + $this->messageManager = $messageManager; } /** * Execute Save action * + * @param Save $subject * @throws LocalizedException * @throws FileSystemException * @throws RuntimeException */ - public function execute() + public function aroundExecute(Save $subject, callable $proceed) { if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { - return parent::execute(); + return $proceed(); } else { - $configData = $this->getConfigData(); + $configData = $subject->getConfigData(); $this->asyncConfigPublisher->saveConfigData($configData); $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); - $this->_saveState($this->getRequest()->getPost('config_state')); + $subject->_saveState($subject->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath( diff --git a/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml b/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml deleted file mode 100644 index 6a297b45e0ac3..0000000000000 --- a/app/code/Magento/AsyncConfig/etc/adminhtml/di.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> - <preference for="Magento\Config\Controller\Adminhtml\System\Config\Save" - type="Magento\AsyncConfig\Controller\Adminhtml\System\Config\Save" /> -</config> diff --git a/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml b/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml deleted file mode 100644 index 5d653c597178f..0000000000000 --- a/app/code/Magento/AsyncConfig/etc/adminhtml/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> - <router id="admin"> - <route id="adminhtml"> - <module name="Magento_AsyncConfig" before="Magento_Config"/> - </route> - </router> -</config> diff --git a/app/code/Magento/AsyncConfig/etc/di.xml b/app/code/Magento/AsyncConfig/etc/di.xml index 82628b5b211a0..bc425d97437cd 100644 --- a/app/code/Magento/AsyncConfig/etc/di.xml +++ b/app/code/Magento/AsyncConfig/etc/di.xml @@ -10,4 +10,7 @@ type="Magento\AsyncConfig\Model\AsyncConfigPublisher" /> <preference for="Magento\AsyncConfig\Api\Data\AsyncConfigMessageInterface" type="Magento\AsyncConfig\Model\Entity\AsyncConfigMessage" /> + <type name="Magento\Config\Controller\Adminhtml\System\Config\Save"> + <plugin name="save_config_async" type="Magento\AsyncConfig\Plugin\Controller\System\Config\SaveAsyncConfigPlugin"/> + </type> </config> diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php index c644ec8eb15cc..839850ac04994 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php @@ -87,7 +87,7 @@ protected function _isAllowed() * @param array $configState * @return bool */ - protected function _saveState($configState = []) + public function _saveState($configState = []) { if (is_array($configState)) { $configState = $this->sanitizeConfigState($configState); diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 36f4472412e73..540a4079c6162 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -332,7 +332,7 @@ public function filterNodes(array $configData): array * @return array * @throws LocalizedException */ - protected function getConfigData() + public function getConfigData() { $this->_saveSection(); $section = $this->getRequest()->getParam('section'); From 2a91d4c05ffdff479e987c0c6c85df18d0342d8d Mon Sep 17 00:00:00 2001 From: Fiko Borizqy <hi@fiko.me> Date: Thu, 8 Dec 2022 06:14:49 +0000 Subject: [PATCH 415/985] Fix: Unable to create new customer address on specific website --- .../Address/Attribute/Source/CountryWithWebsites.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/CountryWithWebsites.php b/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/CountryWithWebsites.php index b9765d7a394f0..c2db95813fe93 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/CountryWithWebsites.php +++ b/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/CountryWithWebsites.php @@ -120,16 +120,16 @@ public function getAllOptions($withEmpty = true, $defaultValues = false) $allowedCountries = array_unique(array_merge([], ...$allowedCountries)); } else { // Address can be added only for the allowed country list. - $storeId = null; + $websiteId = null; $customerId = $this->request->getParam('parent_id') ?? null; if ($customerId) { $customer = $this->customerRepository->getById($customerId); - $storeId = $customer->getStoreId(); + $websiteId = $customer->getWebsiteId(); } $allowedCountries = $this->allowedCountriesReader->getAllowedCountries( ScopeInterface::SCOPE_WEBSITE, - $storeId + $websiteId ); } From f772595fc900548758a280e9a68962d70cf1850f Mon Sep 17 00:00:00 2001 From: Vasudev <104893739+Vasudev-22@users.noreply.github.com> Date: Mon, 9 Jan 2023 11:43:26 +0530 Subject: [PATCH 416/985] Update app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php Co-authored-by: Oleksandr Kravchuk <swnsma@gmail.com> --- .../Products/DataProvider/ExtractDataFromCategoryTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php index aa119c59a2ea4..bc01315036c64 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/ExtractDataFromCategoryTree.php @@ -71,7 +71,7 @@ private function sortTree(array &$tree): array $node['children_count'] = 0; } // redirect_code null will not return , so it will be 0 when there is no redirect error. - if (empty($node['redirect_code'])) { + if (!isset($node['redirect_code'])) { $node['redirect_code'] = 0; } } From 8359178d6dbb8e02aec9e967c3e7ef7eb9cafdb9 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 9 Jan 2023 14:20:15 +0530 Subject: [PATCH 417/985] AC-7589::3 Testcases related to elastic search are failing due to elasticsearch8 module --- ...uickSearchUsingElasticSearch8ByProductSkuTest.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml index acde5a66e60e7..cf733bd22f8e4 100644 --- a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml +++ b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml @@ -21,24 +21,22 @@ <group value="pr_exclude"/> </annotations> <before> - <magentoCLI command="config:set catalog/search/engine elasticsearch8" stepKey="setSearchEngine"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="setSearchEngine"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProducts"/> - - <createData entity="VirtualProduct" stepKey="createFirtsSimpleProduct"/> + <createData entity="VirtualProduct" stepKey="createVirtualProduct"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createFirtsSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB06" stepKey="createSecondSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB04" stepKey="createThirdSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB02" stepKey="createFourthSimpleProduct"/> <createData entity="SimpleProductWithCustomSku24MB01" stepKey="createFifthSimpleProduct"/> - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> - <argument name="tags" value=""/> + <argument name="tags" value="config full_page"/> </actionGroup> <magentoCron groups="index" stepKey="reindex"/> </before> <after> - <deleteData createDataKey="createFirtsSimpleProduct" stepKey="deleteProductOne"/> - + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="deleteProductOne"/> <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> </after> From 039c920afd9b137024aa08521cff41d0c8340785 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Mon, 9 Jan 2023 15:11:20 +0530 Subject: [PATCH 418/985] AC-6762::Random Integration B2B failures --- .../MessageQueue/PublisherConsumerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php index fe3f57ab9cd85..e81908087ee49 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php @@ -204,9 +204,9 @@ public function waitForAsynchronousResult(callable $condition, $params) { $i = 0; do { - sleep(1); + sleep(3); $assertion = call_user_func_array($condition, $params); - } while (!$assertion && ($i++ < 180)); + } while (!$assertion && ($i++ < 10)); if (!$assertion) { throw new PreconditionFailedException("No asynchronous messages were processed."); From 0533ce194235051a4266f8e3eba89c4e6de58222 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 9 Jan 2023 12:26:20 +0200 Subject: [PATCH 419/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing added bundle selection quantity filter for saleable products --- .../Pricing/Adjustment/DefaultSelectionPriceListProvider.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php index c4850dcdf899f..5d9e703c2414c 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php @@ -140,6 +140,9 @@ private function isShouldFindMinOption(Product $bundleProduct, $searchMin) private function addMiniMaxPriceList(Product $bundleProduct, $selectionsCollection, $searchMin, $useRegularPrice) { $selectionsCollection->addPriceFilter($bundleProduct, $searchMin, $useRegularPrice); + if ($bundleProduct->isSalable()) { + $selectionsCollection->addQuantityFilter(); + } $selectionsCollection->setPage(0, 1); $selection = $selectionsCollection->getFirstItem(); From 73b6576e1ed7047573d22ef88cbd6db90fc9257c Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Mon, 9 Jan 2023 17:03:20 +0530 Subject: [PATCH 420/985] AC-7585:: Composer build failures - Web API --- .../Magento/GraphQl/Quote/CartPromotionsTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php index 76266294ed909..feb8c4d3ddb37 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/CartPromotionsTest.php @@ -23,6 +23,11 @@ */ class CartPromotionsTest extends GraphQlAbstract { + /** + * @var float + */ + private const EPSILON = 0.0000000001; + /** * Test adding single cart rule to multiple products in a cart * @@ -30,11 +35,6 @@ class CartPromotionsTest extends GraphQlAbstract * @magentoApiDataFixture Magento/SalesRule/_files/rules_category.php */ - /** - * @var float - */ - private const EPSILON = 0.0000000001; - public function testCartPromotionSingleCartRule() { $skus =['simple1', 'simple2']; From c98e9d98b1a8833784aa5b31358c0f577523da08 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Mon, 9 Jan 2023 17:12:56 +0530 Subject: [PATCH 421/985] AC-6762::Random Integration B2B failures --- .../TestFramework/MessageQueue/PublisherConsumerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php index e81908087ee49..d8ad92f3da271 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php @@ -16,7 +16,7 @@ class PublisherConsumerController { /** - * @var string[] + * @var string */ private $consumers = []; From 0f20afddbe097ca6c50f1e061fd94f6619475e9c Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Sun, 25 Dec 2022 23:47:26 +0530 Subject: [PATCH 422/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop-fixed AdminUpdateUserRoleTest mftf failure --- .../Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index c041d7714c100..77293c517cde7 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -28,9 +28,10 @@ <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - <!--Create New Role--> + <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> <argument name="roleName" value="{{roleSales.name}}"/> + <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </actionGroup> <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> </before> From 104c7576851a6333a077e89dc04a8addc117f6ce Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Mon, 9 Jan 2023 17:16:55 +0530 Subject: [PATCH 423/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4.6-develop-removed skiped tag from test --- .../Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index 77293c517cde7..da18f662abf6f 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -18,9 +18,6 @@ <testCaseId value="MC-27895"/> <group value="user"/> <group value="mtf_migrated"/> - <skip> - <issueId value="AC-7467"/> - </skip> </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> From 77e804e2befe285bc9d6d2f7149aa22db109e962 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Mon, 9 Jan 2023 17:17:42 +0530 Subject: [PATCH 424/985] AC-6762::Random Integration B2B failures --- .../PublisherConsumerController.php | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php index d8ad92f3da271..b099abae60464 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php @@ -10,13 +10,12 @@ use Magento\Framework\MessageQueue\PublisherInterface; use Magento\Framework\OsInfo; -use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Amqp; class PublisherConsumerController { /** - * @var string + * @var string[] */ private $consumers = []; @@ -50,11 +49,6 @@ class PublisherConsumerController */ private $amqpHelper; - /** - * @var ClearQueueProcessor - */ - private $clearQueueProcessor; - /** * PublisherConsumerController constructor. * @param PublisherInterface $publisher @@ -64,7 +58,6 @@ class PublisherConsumerController * @param array $consumers * @param array $appInitParams * @param null|int $maxMessages - * @param ClearQueueProcessor $clearQueueProcessor */ public function __construct( PublisherInterface $publisher, @@ -73,8 +66,7 @@ public function __construct( $logFilePath, $consumers, $appInitParams, - $maxMessages = null, - ClearQueueProcessor $clearQueueProcessor = null + $maxMessages = null ) { $this->consumers = $consumers; $this->publisher = $publisher; @@ -83,8 +75,6 @@ public function __construct( $this->osInfo = $osInfo; $this->appInitParams = $appInitParams; $this->amqpHelper = $amqpHelper; - $this->clearQueueProcessor = $clearQueueProcessor - ?: Bootstrap::getObjectManager()->get(ClearQueueProcessor::class); } /** @@ -97,7 +87,12 @@ public function initialize() { $this->validateEnvironmentPreconditions(); - $this->clearQueueProcessor->execute("async.operations.all"); + $connections = $this->amqpHelper->getConnections(); + foreach (array_keys($connections) as $connectionName) { + $this->amqpHelper->deleteConnection($connectionName); + } + $this->amqpHelper->clearQueue("async.operations.all"); + $this->stopConsumers(); $this->startConsumers(); @@ -125,6 +120,12 @@ private function validateEnvironmentPreconditions() "This test relies on *nix shell and should be skipped in Windows environment." ); } + + if (!$this->amqpHelper->isAvailable()) { + throw new PreconditionFailedException( + 'This test relies on RabbitMQ Management Plugin.' + ); + } } /** From 1a74e0c8857faa8bdd8bc69ec7d8ea2a040a06de Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Mon, 9 Jan 2023 17:20:56 +0530 Subject: [PATCH 425/985] AC-6762::Random Integration B2B failures --- .../PublisherConsumerController.php | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php index b099abae60464..e81908087ee49 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/MessageQueue/PublisherConsumerController.php @@ -10,6 +10,7 @@ use Magento\Framework\MessageQueue\PublisherInterface; use Magento\Framework\OsInfo; +use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Helper\Amqp; class PublisherConsumerController @@ -49,6 +50,11 @@ class PublisherConsumerController */ private $amqpHelper; + /** + * @var ClearQueueProcessor + */ + private $clearQueueProcessor; + /** * PublisherConsumerController constructor. * @param PublisherInterface $publisher @@ -58,6 +64,7 @@ class PublisherConsumerController * @param array $consumers * @param array $appInitParams * @param null|int $maxMessages + * @param ClearQueueProcessor $clearQueueProcessor */ public function __construct( PublisherInterface $publisher, @@ -66,7 +73,8 @@ public function __construct( $logFilePath, $consumers, $appInitParams, - $maxMessages = null + $maxMessages = null, + ClearQueueProcessor $clearQueueProcessor = null ) { $this->consumers = $consumers; $this->publisher = $publisher; @@ -75,6 +83,8 @@ public function __construct( $this->osInfo = $osInfo; $this->appInitParams = $appInitParams; $this->amqpHelper = $amqpHelper; + $this->clearQueueProcessor = $clearQueueProcessor + ?: Bootstrap::getObjectManager()->get(ClearQueueProcessor::class); } /** @@ -87,12 +97,7 @@ public function initialize() { $this->validateEnvironmentPreconditions(); - $connections = $this->amqpHelper->getConnections(); - foreach (array_keys($connections) as $connectionName) { - $this->amqpHelper->deleteConnection($connectionName); - } - $this->amqpHelper->clearQueue("async.operations.all"); - + $this->clearQueueProcessor->execute("async.operations.all"); $this->stopConsumers(); $this->startConsumers(); @@ -120,12 +125,6 @@ private function validateEnvironmentPreconditions() "This test relies on *nix shell and should be skipped in Windows environment." ); } - - if (!$this->amqpHelper->isAvailable()) { - throw new PreconditionFailedException( - 'This test relies on RabbitMQ Management Plugin.' - ); - } } /** From 0def96e62f4756e93e7b9c158e298f18a96139d9 Mon Sep 17 00:00:00 2001 From: Pieter Hoste <hoste.pieter@gmail.com> Date: Mon, 9 Jan 2023 14:28:56 +0100 Subject: [PATCH 426/985] Fixes deprecated jquery call to focus in validation library. --- lib/web/mage/validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 4ed2364f810d1..93a90f2730a9c 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1986,7 +1986,7 @@ define([ $('html, body').stop().animate({ scrollTop: firstActive.parent().offset().top - windowHeight / 2 }); - firstActive.focus(); + firstActive.trigger('focus'); } } }); From 36809f8de5809cb309690fc4f86d8e04bdd67e77 Mon Sep 17 00:00:00 2001 From: Peter Jaap Blaakmeer <peterjaap@elgentos.nl> Date: Mon, 9 Jan 2023 15:22:45 +0100 Subject: [PATCH 427/985] Updated StoreTest --- .../Magento/Store/Model/StoreTest.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index d81a6fa52ea48..500c250be1bda 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -446,10 +446,11 @@ public function saveValidationDataProvider() /** * @param $storeInUrl * @param $disableStoreInUrl + * @param $singleStoreModeEnabled * @param $expectedResult * @dataProvider isUseStoreInUrlDataProvider */ - public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedResult) + public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $singleStoreModeEnabled, $expectedResult) { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $configMock = $this->createMock(\Magento\Framework\App\Config\ReinitableConfigInterface::class); @@ -464,6 +465,11 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe ->with($this->stringContains(Store::XML_PATH_STORE_IN_URL)) ->willReturn($storeInUrl); + $configMock->expects($this->any()) + ->method('getValue') + ->with($this->stringContains(StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED)) + ->willReturn($singleStoreModeEnabled); + $params['config'] = $configMock; $model = $objectManager->create(\Magento\Store\Model\Store::class, $params); $model->setDisableStoreInUrl($disableStoreInUrl); @@ -477,10 +483,14 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe public function isUseStoreInUrlDataProvider() { return [ - [true, null, true], - [false, null, false], - [true, true, false], - [true, false, true] + [true, null, false, true], + [false, null, false, false], + [true, true, false, false], + [true, false, false, true], + [true, null, true, false], + [false, null, true, false], + [true, true, true, false], + [true, false, true, false] ]; } From c2cd515233e0b41f12934e55e41dd7965a432eee Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Mon, 9 Jan 2023 20:53:12 +0530 Subject: [PATCH 428/985] AC-7422:Incompatible issues fix for PHP8.2 - Updated laminas dependency --- composer.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index d17e57f153f48..fe05c51bbb41a 100644 --- a/composer.lock +++ b/composer.lock @@ -3311,16 +3311,16 @@ }, { "name": "laminas/laminas-server", - "version": "2.14.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-server.git", - "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4" + "reference": "7f4862913ab95ea5decd08e6c3717edbb398fde8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-server/zipball/11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", - "reference": "11fe2af8dd3c2a350f903b2f2d0536ec3842a7f4", + "url": "https://api.github.com/repos/laminas/laminas-server/zipball/7f4862913ab95ea5decd08e6c3717edbb398fde8", + "reference": "7f4862913ab95ea5decd08e6c3717edbb398fde8", "shasum": "" }, "require": { @@ -3368,7 +3368,7 @@ "type": "community_bridge" } ], - "time": "2022-12-09T09:56:49+00:00" + "time": "2022-12-27T17:14:59+00:00" }, { "name": "laminas/laminas-servicemanager", @@ -3543,24 +3543,24 @@ }, { "name": "laminas/laminas-soap", - "version": "2.11.1", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-soap.git", - "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b" + "reference": "127de3d876b992a6327c274b15df6de26d7aa712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/1d3a45071b098062b97ff05b68523fb2fe322f9b", - "reference": "1d3a45071b098062b97ff05b68523fb2fe322f9b", + "url": "https://api.github.com/repos/laminas/laminas-soap/zipball/127de3d876b992a6327c274b15df6de26d7aa712", + "reference": "127de3d876b992a6327c274b15df6de26d7aa712", "shasum": "" }, "require": { "ext-dom": "*", "ext-soap": "*", - "laminas/laminas-server": "^2.11", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-uri": "^2.9.1", + "laminas/laminas-server": "^2.15", + "laminas/laminas-stdlib": "^3.16", + "laminas/laminas-uri": "^2.10", "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { @@ -3568,12 +3568,12 @@ "zendframework/zend-soap": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.4", - "laminas/laminas-config": "^3.7", - "laminas/laminas-http": "^2.15", + "laminas/laminas-coding-standard": "^2.5", + "laminas/laminas-config": "^3.8", + "laminas/laminas-http": "^2.18", "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.18.3", + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "^0.18.4", "vimeo/psalm": "^4.30" }, "suggest": { @@ -3609,7 +3609,7 @@ "type": "community_bridge" } ], - "time": "2022-11-18T13:09:56+00:00" + "time": "2023-01-09T13:58:49+00:00" }, { "name": "laminas/laminas-stdlib", From 412a4ae8e1a0499a636df976466006183fa4ef4f Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Mon, 9 Jan 2023 21:28:43 +0530 Subject: [PATCH 429/985] AC-7585:: Fix for testConfigurableProductWithVariantsHavingSpecialAndTierPrices --- .../GraphQl/Catalog/ProductPriceTest.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php index d80e65c140cd9..ee8f2fd931229 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php @@ -37,6 +37,11 @@ */ class ProductPriceTest extends GraphQlAbstract { + /** + * @var float + */ + private const EPSILON = 0.0000000001; + /** @var ObjectManager $objectManager */ private $objectManager; @@ -692,7 +697,7 @@ public function testConfigurableProductWithVariantsHavingSpecialAndTierPrices() 'customer_group_id' => Group::CUST_GROUP_ALL, 'percentage_value'=> null, 'qty'=> 2, - 'value'=> 20 + 'value'=> 20, ] ]; foreach ($configurableProductVariants as $configurableProductVariant) { @@ -1218,8 +1223,14 @@ private function assertPrices($expectedPrices, $actualPrices, $currency = 'USD') $expected['final_price']['currency'] ?? $currency, $actual['final_price']['currency'] ); - $this->assertEquals($expected['discount']['amount_off'], $actual['discount']['amount_off']); - $this->assertEquals($expected['discount']['percent_off'], $actual['discount']['percent_off']); + $this->assertEqualsWithDelta( + $expected['discount']['amount_off'], + $actual['discount']['amount_off'], + self::EPSILON); + $this->assertEqualsWithDelta( + $expected['discount']['percent_off'], + $actual['discount']['percent_off'], + self::EPSILON); } } From 660ce38afae0b597e1089caf298536c5b13a0f8b Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Mon, 9 Jan 2023 21:32:06 +0530 Subject: [PATCH 430/985] AC-7585:: Fix for testConfigurableProductWithVariantsHavingSpecialAndTierPrices --- .../testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php index ee8f2fd931229..e203ab2ef53ff 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php @@ -1230,7 +1230,7 @@ private function assertPrices($expectedPrices, $actualPrices, $currency = 'USD') $this->assertEqualsWithDelta( $expected['discount']['percent_off'], $actual['discount']['percent_off'], - self::EPSILON); + self::EPSILON); } } From 95b6fef69bbbb70fdfbdd1daf6c52c2f6be45a7b Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 9 Jan 2023 11:05:24 -0600 Subject: [PATCH 431/985] ACPT-826 --- .../Controller/System/Config/SaveAsyncConfigPlugin.php | 8 ++++++-- app/code/Magento/AsyncConfig/composer.json | 4 +--- .../Config/Controller/Adminhtml/System/AbstractConfig.php | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 1f210155d7c95..821b70cb43667 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -45,8 +45,11 @@ class SaveAsyncConfigPlugin public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; /** + * * @param DeploymentConfig|null $deploymentConfig * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher + * @param RedirectFactory $resultRedirectFactory + * @param ManagerInterface $messageManager */ public function __construct( DeploymentConfig $deploymentConfig = null, @@ -63,11 +66,12 @@ public function __construct( } /** - * Execute Save action * * @param Save $subject - * @throws LocalizedException + * @param callable $proceed + * @return \Magento\Backend\Model\View\Result\Redirect * @throws FileSystemException + * @throws LocalizedException * @throws RuntimeException */ public function aroundExecute(Save $subject, callable $proceed) diff --git a/app/code/Magento/AsyncConfig/composer.json b/app/code/Magento/AsyncConfig/composer.json index 9aae513516d94..38ad6b9d5716a 100644 --- a/app/code/Magento/AsyncConfig/composer.json +++ b/app/code/Magento/AsyncConfig/composer.json @@ -4,9 +4,7 @@ "require": { "php": "~8.1.0||~8.2.0", "magento/framework": "*", - "magento/module-config": "*", - "magento/module-media-gallery-integration": "*", - "magento/module-backend": "*" + "magento/module-config": "*" }, "type": "magento2-module", "license": [ diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php index 839850ac04994..1b6a5edc23a3b 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php @@ -23,7 +23,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Config::config'; + public const ADMIN_RESOURCE = 'Magento_Config::config'; /** * @var \Magento\Config\Model\Config\Structure @@ -32,6 +32,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction /** * @deprecated 101.0.0 + * @see Nothing */ protected $_sectionChecker; From 0cb3243c61d7238da34e46ccc48b8cc3a7c1b4a4 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 9 Jan 2023 23:35:10 +0530 Subject: [PATCH 432/985] AC-6762-v1::Fixed the static tests --- .../testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php index e203ab2ef53ff..9c4d7df1d081d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductPriceTest.php @@ -1226,11 +1226,13 @@ private function assertPrices($expectedPrices, $actualPrices, $currency = 'USD') $this->assertEqualsWithDelta( $expected['discount']['amount_off'], $actual['discount']['amount_off'], - self::EPSILON); + self::EPSILON + ); $this->assertEqualsWithDelta( $expected['discount']['percent_off'], $actual['discount']['percent_off'], - self::EPSILON); + self::EPSILON + ); } } From de30ecd96fc12eed929d36be39c7ad16acc77342 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 10 Jan 2023 00:59:05 +0530 Subject: [PATCH 433/985] AC-6762-v1::Update the wikimedia/less.php --- composer.json | 8 +--- composer.lock | 41 ++++++-------------- lib/internal/Magento/Framework/composer.json | 8 +--- 3 files changed, 13 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index d6969b42c29c6..d393e876d1319 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,6 @@ "preferred-install": "dist", "sort-packages": true }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/wikimedia/less.php" - } - ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -92,7 +86,7 @@ "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "dev-main" + "wikimedia/less.php": "^3.2" }, "require-dev": { "allure-framework/allure-phpunit": "^2", diff --git a/composer.lock b/composer.lock index d2740eaf72d68..634526082262e 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": "1e7e090bd82ee708a8c5284c018874d5", + "content-hash": "989939469e4660b4d6550a12976d07ca", "packages": [ { "name": "aws/aws-crt-php", @@ -8915,16 +8915,16 @@ }, { "name": "wikimedia/less.php", - "version": "dev-main", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/wikimedia/less.php.git", - "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812" + "reference": "47c4714c68c9006c87676d76c172a18e1d180f60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a93b0827b650a347f7c694e1e234f8c86efa8812", - "reference": "a93b0827b650a347f7c694e1e234f8c86efa8812", + "url": "https://api.github.com/repos/wikimedia/less.php/zipball/47c4714c68c9006c87676d76c172a18e1d180f60", + "reference": "47c4714c68c9006c87676d76c172a18e1d180f60", "shasum": "" }, "require": { @@ -8932,13 +8932,12 @@ }, "require-dev": { "mediawiki/mediawiki-codesniffer": "39.0.0", - "mediawiki/mediawiki-phan-config": "0.11.1", + "mediawiki/mediawiki-phan-config": "0.11.1 || 0.12.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", "php-parallel-lint/php-parallel-lint": "1.3.2", "phpunit/phpunit": "^8.5" }, - "default-branch": true, "bin": [ "bin/lessc" ], @@ -8951,24 +8950,7 @@ "lessc.inc.php" ] }, - "scripts": { - "test": [ - "parallel-lint . --exclude vendor", - "phpcs -sp", - "phpunit", - "minus-x check ." - ], - "cover": [ - "phpunit --coverage-text --coverage-html coverage/ --coverage-clover coverage/clover.xml" - ], - "fix": [ - "minus-x fix .", - "phpcbf" - ], - "phan": [ - "phan --allow-polyfill-parser --no-progress-bar" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -8996,10 +8978,10 @@ "stylesheet" ], "support": { - "source": "https://github.com/wikimedia/less.php/tree/main", - "issues": "https://github.com/wikimedia/less.php/issues" + "issues": "https://github.com/wikimedia/less.php/issues", + "source": "https://github.com/wikimedia/less.php/tree/v3.2.0" }, - "time": "2022-12-22T18:23:54+00:00" + "time": "2023-01-09T18:45:54+00:00" } ], "packages-dev": [ @@ -13899,8 +13881,7 @@ "minimum-stability": "stable", "stability-flags": { "magento/composer": 10, - "magento/magento-composer-installer": 10, - "wikimedia/less.php": 20 + "magento/magento-composer-installer": 10 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 30088bb3673f0..56ed1d28bf0ab 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -9,12 +9,6 @@ "config": { "sort-packages": true }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/wikimedia/less.php" - } - ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -57,7 +51,7 @@ "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", "webonyx/graphql-php": "^14.11", - "wikimedia/less.php": "dev-main" + "wikimedia/less.php": "^3.2" }, "archive": { "exclude": [ From 3ab1ab207a5c605c850ad06fc85728ddb9451cc6 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 9 Jan 2023 18:27:45 -0600 Subject: [PATCH 434/985] ACPT-826 --- .../Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 821b70cb43667..47cc1e3d58e4e 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -37,7 +37,7 @@ class SaveAsyncConfigPlugin /** * @var ManagerInterface */ - private $messageManager; + private ManagerInterface $messageManager; /** * @var const @@ -66,6 +66,7 @@ public function __construct( } /** + * around Config save controller * * @param Save $subject * @param callable $proceed From 8a6e74266b0b5188514fc13e30635a046b2505d4 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Mon, 9 Jan 2023 20:31:09 -0600 Subject: [PATCH 435/985] ACPT-826 --- .../Controller/System/Config/SaveAsyncConfigPlugin.php | 6 +++--- .../Config/Controller/Adminhtml/System/AbstractConfig.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 47cc1e3d58e4e..9fd03389fdb73 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -32,12 +32,12 @@ class SaveAsyncConfigPlugin /** * @var RedirectFactory */ - private RedirectFactory $resultRedirectFactory; + private $resultRedirectFactory; /** * @var ManagerInterface */ - private ManagerInterface $messageManager; + private $messageManager; /** * @var const @@ -66,7 +66,7 @@ public function __construct( } /** - * around Config save controller + * Around Config save controller * * @param Save $subject * @param callable $proceed diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php index 1b6a5edc23a3b..839333e951065 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php @@ -31,6 +31,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction protected $_configStructure; /** + * @var mixed * @deprecated 101.0.0 * @see Nothing */ From 63872cd56526f777c6e263bdbe51fdbc566256e5 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 10 Jan 2023 12:36:11 +0530 Subject: [PATCH 436/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4.6-develop-fixed SVC BIC --- .../Mftf/Test/AdminUpdateUserRoleNewTest.xml | 74 +++++++++++++++++++ .../Mftf/Test/AdminUpdateUserRoleTest.xml | 6 +- 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml new file mode 100644 index 0000000000000..56fdeae3dc6b7 --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminUpdateUserRoleNewTest"> + <annotations> + <features value="User"/> + <stories value="Update User"/> + <title value="Update admin user entity by changing user role"/> + <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-27895"/> + <group value="user"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!--Create New User--> + <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> + <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> + <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> + + <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> + <argument name="roleName" value="{{roleSales.name}}"/> + <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> + </actionGroup> + <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> + </before> + <after> + <!--Delete new User--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultAdmin"/> + <actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteNewUser"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearUsersGridFilter"/> + <!--Delete new Role--> + <actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteCustomRole"> + <argument name="roleName" value="{{roleSales.rolename}}"/> + </actionGroup> + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearRolesGridFilter"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultAdmin"/> + </after> + <!--Assign new role--> + <actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="openUserEditPage"> + <argument name="user" value="NewAdminUser"/> + </actionGroup> + <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillUserForm"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveUser"/> + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> + <argument name="message" value="You saved the user."/> + </actionGroup> + <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="seeUserInGrid"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <!--Login as restricted user--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsSaleRoleUser"> + <argument name="username" value="{{AdminUserWithUpdatedUserRoleToSales.username}}"/> + <argument name="password" value="{{AdminUserWithUpdatedUserRoleToSales.password}}"/> + </actionGroup> + <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="seeSuccessLoginMessage"/> + <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="navigateToAdminUsersPage"/> + <actionGroup ref="AssertUserRoleRestrictedAccessActionGroup" stepKey="seeErrorMessage"/> + </test> +</tests> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index da18f662abf6f..9afc61160745a 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -18,6 +18,9 @@ <testCaseId value="MC-27895"/> <group value="user"/> <group value="mtf_migrated"/> + <skip> + <issueId value="DEPRECATED">Use AdminUpdateUserRoleNewTest instead</issueId> + </skip> </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> @@ -25,10 +28,9 @@ <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - + <!--Create New Role--> <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> <argument name="roleName" value="{{roleSales.name}}"/> - <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </actionGroup> <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> </before> From 700ca2e8320800d182fa55f5447bfa7ce5572335 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 10 Jan 2023 15:18:20 +0530 Subject: [PATCH 437/985] AC-7566::2.4.6-alpha2-Composer Integration Test Failures (Broken tests) --- app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php | 4 ++-- .../testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php index f1567705859ff..25f99bf7acc38 100644 --- a/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Controller/ExpressTest.php @@ -32,8 +32,8 @@ abstract class ExpressTest extends TestCase /** @var Express */ protected $model; - /** @var string */ - protected $name = ''; + /** @var string */ + protected $name = ''; /** @var Session|MockObject */ protected $customerSession; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index d8f6b052b7fcc..eb0c46492dbf0 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -202,7 +202,7 @@ public function testGetCartWithNotDefaultStore() public function testGetCartWithWrongStore() { $this->expectException(\Exception::class); - $message = 'The account sign-in was incorrect or your account is disabled temporarily.'; + $message = 'The account sign-in was incorrect or your account is disabled temporarily.'; $this->expectExceptionMessage($message.' Please wait and try again later.'); $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1'); @@ -240,7 +240,7 @@ public function testGetCartWithNotExistingStore() */ public function testGetCartForLockedCustomer() { - $this->markTestSkipped('https://github.com/magento/graphql-ce/issues/750'); + $this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/750'); /* lock customer */ $customerSecure = $this->customerRegistry->retrieveSecureData(1); From cced6538fecf64e2b8e97ab835d3112ea34a33b4 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 10 Jan 2023 17:57:05 +0530 Subject: [PATCH 438/985] AC-7566::2.4.6-alpha2-Composer Integration Test Failures (Broken tests) --- .../testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index eb0c46492dbf0..65589be0a1376 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -240,7 +240,7 @@ public function testGetCartWithNotExistingStore() */ public function testGetCartForLockedCustomer() { - $this->markTestIncomplete('https://github.com/magento/graphql-ce/issues/750'); + $this->markTestSkipped('https://github.com/magento/graphql-ce/issues/750'); /* lock customer */ $customerSecure = $this->customerRegistry->retrieveSecureData(1); From 07f46d8e8a3adc89e936fa04c64c680a6cf1376a Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Tue, 10 Jan 2023 18:43:54 +0530 Subject: [PATCH 439/985] updated MFTF version --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 102e33cd6c233..9f0fe11b93c5f 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": "0f03831c231ae08f16cf64b1aea0727c", + "content-hash": "f91ab9524a6e074f7d04ce6f536d6f6e", "packages": [ { "name": "aws/aws-crt-php", @@ -10647,16 +10647,16 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "34033242272420e057dab004cf884144c8416f8f" + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34033242272420e057dab004cf884144c8416f8f", - "reference": "34033242272420e057dab004cf884144c8416f8f", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/daa28ec4aceec147479f8bf1f474873bbd890050", + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050", "shasum": "" }, "require": { @@ -10735,9 +10735,9 @@ ], "support": { "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.0" + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.1" }, - "time": "2022-12-12T15:31:43+00:00" + "time": "2023-01-05T22:05:27+00:00" }, { "name": "mustache/mustache", From 57ba84d0e4560b4b0d31238311dd191a2acabdbf Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:10:53 +0530 Subject: [PATCH 440/985] ACQE-4474 : Skip the test to look into failure in more detail --- .../Test/AdminRemoveDefaultImageDownloadableProductTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml index a2b418e510482..b97e134f771c1 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminRemoveDefaultImageDownloadableProductTest.xml @@ -17,6 +17,9 @@ <severity value="MAJOR"/> <testCaseId value="MC-201"/> <group value="Downloadable"/> + <skip> + <issueId value="ACQE-4474"/> + </skip> </annotations> <before> <magentoCLI stepKey="addDownloadableDomain" command="downloadable:domains:add static.magento.com"/> From a1b6d99caa1258b3f5b46d48956eaa2d69f06c94 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 10 Jan 2023 21:04:44 +0530 Subject: [PATCH 441/985] AC-7566::2.4.6-alpha2-Composer Integration Test Failures (Broken tests) --- .../Api/CheckoutAgreementsRepositoryTest.php | 5 ++--- .../Magento/GiftMessage/Api/CartRepositoryTest.php | 10 ++++------ .../GiftMessage/Api/GuestCartRepositoryTest.php | 5 ++--- .../GiftMessage/Api/GuestItemRepositoryTest.php | 5 +++-- .../Magento/GiftMessage/Api/ItemRepositoryTest.php | 5 ++--- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php index 48901df0af4ce..c749956420dfc 100644 --- a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php @@ -65,9 +65,8 @@ public function testGetListReturnsEmptyListIfCheckoutAgreementsAreDisabledOnFron */ public function testGetListReturnsTheListOfActiveCheckoutAgreements() { - // checkout/options/enable_agreements must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state.'); + + $this->markTestSkipped('This test relies on system configuration state..'); $agreementModel = $this->getAgreementByName('Checkout Agreement (active)'); $agreements = $this->_webApiCall($this->listServiceInfo, []); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index c4982cb5e161d..bae475089375a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -102,9 +102,8 @@ public function testGetForMyCart() */ public function testSave() { - // sales/gift_options/allow_order must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state.'); + + $this->markTestSkipped('This test relies on system configuration state..'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); @@ -155,9 +154,8 @@ public function testSaveForMyCart() ); $token = $customerTokenService->createCustomerAccessToken('customer@example.com', 'password'); - // sales/gift_options/allow_order must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state.'); + + $this->markTestSkipped('This test relies on system configuration state..'); $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php index 9870ec6d93627..5b0deb0ce666f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php @@ -73,9 +73,8 @@ public function testGet() */ public function testSave() { - // sales/gift_options/allow_order must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state.'); + + $this->markTestSkipped('This test relies on system configuration state..'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php index 5e4c4065fb9a7..96c706c9542b4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php @@ -74,12 +74,13 @@ public function testGet() /** * @magentoApiDataFixture Magento/GiftMessage/_files/quote_with_item_message.php + * @magentoConfigFixture default_store sales/gift_options/allow_items 1 */ public function testSave() { - // sales/gift_options/allow_items must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + $this->markTestSkipped('This test relies on system configuration state.'); + /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index 9102eb85d15af..9c69cf77f893d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -112,9 +112,8 @@ public function testGetForMyCart() */ public function testSave() { - // sales/gift_options/allow_items must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state.'); + + $this->markTestSkipped('This test relies on system configuration state..'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); From ab9a76ed0a19eccb79ae77ad290205ce805d398e Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Tue, 10 Jan 2023 21:21:32 +0530 Subject: [PATCH 442/985] AC-7601:PHP8.2 Unit Test failure --- .../Catalog/Test/Unit/Model/CategoryTest.php | 4 +- .../Test/Unit/Model/Source/GenericTest.php | 1 - .../Test/Unit/Model/ProductTest.php | 2 +- .../Test/Unit/Helper/ReportTest.php | 2 +- .../Test/Unit/Model/Import/Source/ZipTest.php | 2 +- .../App/Test/Unit/Response/HttpTest.php | 1 - lib/internal/Magento/Framework/DataObject.php | 1 + .../Framework/Filesystem/Directory/Write.php | 2 +- .../Test/Unit/Directory/WriteTest.php | 9 +-- .../Module/Test/Unit/Setup/MigrationTest.php | 2 +- .../Test/Unit/Cookie/PhpCookieManagerTest.php | 64 +++++++++---------- .../Translate/Test/Unit/AdapterTest.php | 2 +- .../SecureHtmlRenderer/HtmlRendererTest.php | 4 ++ 13 files changed, 48 insertions(+), 48 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php index 4317607fd661e..239e19c84dbf8 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php @@ -214,7 +214,7 @@ public function testMoveWhenCannotFindParentCategory(): void { $this->expectException('Magento\Framework\Exception\LocalizedException'); $this->expectExceptionMessage('Sorry, but we can\'t find the new parent category you selected.'); - $this->markTestIncomplete('MAGETWO-31165'); + $this->markTestSkipped('MAGETWO-31165'); $parentCategory = $this->createPartialMock( Category::class, ['getId', 'setStoreId', 'load'] @@ -260,7 +260,7 @@ public function testMoveWhenParentCategoryIsSameAsChildCategory(): void $this->expectExceptionMessage( 'We can\'t move the category because the parent category name matches the child category name.' ); - $this->markTestIncomplete('MAGETWO-31165'); + $this->markTestSkipped('MAGETWO-31165'); $parentCategory = $this->createPartialMock( Category::class, ['getId', 'setStoreId', 'load'] diff --git a/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php b/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php index 124d80b7cf4e1..ab375d5d4d9da 100644 --- a/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php +++ b/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php @@ -57,7 +57,6 @@ protected function setUp(): void */ public function testToOptionArray($code, $methods, $result): void { - $this->model->code = $code; $this->shippingFedexMock->expects($this->once()) ->method('getCode') ->willReturn($methods); diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php index f31b3a3db9d8a..94331fc65278c 100644 --- a/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php +++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/ProductTest.php @@ -349,7 +349,7 @@ protected function setUp(): void */ public function testGetProductLinks(): void { - $this->markTestIncomplete('Skipped due to https://jira.corp.x.com/browse/MAGETWO-36926'); + $this->markTestSkipped('Skipped due to https://jira.corp.x.com/browse/MAGETWO-36926'); $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; $this->linkTypeProviderMock->expects($this->once())->method('getLinkTypes')->willReturn($linkTypes); diff --git a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php index 2f10ce42f84d4..6d9d2c206e2e4 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Helper/ReportTest.php @@ -153,7 +153,7 @@ protected function setUp(): void */ public function testGetExecutionTime() { - $this->markTestIncomplete('Invalid mocks used for DateTime object. Investigate later.'); + $this->markTestSkipped('Invalid mocks used for DateTime object. Investigate later.'); $startDate = '2000-01-01 01:01:01'; $endDate = '2000-01-01 02:03:04'; diff --git a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php index 295b706e3e0b2..129a4cd3a9449 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Model/Import/Source/ZipTest.php @@ -42,7 +42,7 @@ protected function setUp(): void */ public function testConstructorFileDestinationMatch($fileName, $expectedfileName): void { - $this->markTestIncomplete('The implementation of constructor has changed. Rewrite test to cover changes.'); + $this->markTestSkipped('The implementation of constructor has changed. Rewrite test to cover changes.'); $this->directory->method('getRelativePath') ->withConsecutive([$fileName], [$expectedfileName]); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Response/HttpTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Response/HttpTest.php index 5f4af5e8ae519..36f1ddaf5beb7 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Response/HttpTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Response/HttpTest.php @@ -112,7 +112,6 @@ protected function setUp(): void 'sessionConfig' => $this->sessionConfigMock ] ); - $this->model->headersSentThrowsException = false; $this->model->setHeader('Name', 'Value'); } diff --git a/lib/internal/Magento/Framework/DataObject.php b/lib/internal/Magento/Framework/DataObject.php index 9b529ff6042cb..7040cc26428f5 100644 --- a/lib/internal/Magento/Framework/DataObject.php +++ b/lib/internal/Magento/Framework/DataObject.php @@ -12,6 +12,7 @@ * @SuppressWarnings(PHPMD.NumberOfChildren) * @since 100.0.2 */ +#[\AllowDynamicProperties] class DataObject implements \ArrayAccess { /** diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php index e455eaf8fc72f..9607b6a2f05f7 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php @@ -171,7 +171,7 @@ public function createSymlink($path, $destination, WriteInterface $targetDirecto $absolutePath = $this->driver->getAbsolutePath($this->path, $path); $absoluteDestination = $targetDirectory->getAbsolutePath($destination); - return $this->driver->symlink($absolutePath, $absoluteDestination, $targetDirectory->driver); + return $this->driver->symlink($absolutePath, $absoluteDestination, $this->driver); } /** diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php index fdde17b2dabf8..49220ef6d62e8 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php @@ -92,9 +92,8 @@ public function testIsWritable() public function testCreateSymlinkTargetDirectoryExists() { - $targetDir = $this->getMockBuilder(WriteInterface::class) - ->getMock(); - $targetDir->driver = $this->driver; + $targetDir = $this->getMockForAbstractClass(WriteInterface::class); + //$targetDir->driver = $this->driver; $sourcePath = 'source/path/file'; $destinationDirectory = 'destination/path'; $destinationFile = $destinationDirectory . '/' . 'file'; @@ -117,7 +116,7 @@ public function testCreateSymlinkTargetDirectoryExists() ->with( $this->getAbsolutePath($sourcePath), $this->getAbsolutePath($destinationFile), - $targetDir->driver + $this->driver )->willReturn(true); $this->assertTrue($this->write->createSymlink($sourcePath, $destinationFile, $targetDir)); @@ -170,8 +169,6 @@ public function testRenameFile($sourcePath, $targetPath, $targetDir) { if ($targetDir !== null) { /** @noinspection PhpUndefinedFieldInspection */ - $targetDir->driver = $this->getMockBuilder(DriverInterface::class) - ->getMockForAbstractClass(); $targetDirPath = 'TARGET_PATH/'; $targetDir->expects($this->once()) ->method('getAbsolutePath') diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php index 1dece5f8183cb..7f763d5e2ba59 100644 --- a/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php +++ b/lib/internal/Magento/Framework/Module/Test/Unit/Setup/MigrationTest.php @@ -203,7 +203,7 @@ public function testAppendClassAliasReplace() */ public function testDoUpdateClassAliases($replaceRules, $tableData, $expected, $aliasesMap = []) { - $this->markTestIncomplete('Requires refactoring of class that is tested, covers to many methods'); + $this->markTestSkipped('Requires refactoring of class that is tested, covers to many methods'); $this->_actualUpdateResult = []; $tableRowsCount = count($tableData); diff --git a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php index 87e10981c802c..7ccffe89a4318 100644 --- a/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php +++ b/lib/internal/Magento/Framework/Stdlib/Test/Unit/Cookie/PhpCookieManagerTest.php @@ -40,41 +40,43 @@ */ class PhpCookieManagerTest extends TestCase { - const COOKIE_NAME = 'cookie_name'; - const SENSITIVE_COOKIE_NAME_NO_METADATA_HTTPS = 'sensitive_cookie_name_no_metadata_https'; - const SENSITIVE_COOKIE_NAME_NO_METADATA_NOT_HTTPS = 'sensitive_cookie_name_no_metadata_not_https'; - const SENSITIVE_COOKIE_NAME_NO_DOMAIN_NO_PATH = 'sensitive_cookie_name_no_domain_no_path'; - const SENSITIVE_COOKIE_NAME_WITH_DOMAIN_AND_PATH = 'sensitive_cookie_name_with_domain_and_path'; - const PUBLIC_COOKIE_NAME_NO_METADATA = 'public_cookie_name_no_metadata'; - const PUBLIC_COOKIE_NAME_DEFAULT_VALUES = 'public_cookie_name_default_values'; - const PUBLIC_COOKIE_NAME_SOME_FIELDS_SET = 'public_cookie_name_some_fields_set'; - const MAX_COOKIE_SIZE_TEST_NAME = 'max_cookie_size_test_name'; - const MAX_NUM_COOKIE_TEST_NAME = 'max_num_cookie_test_name'; - const DELETE_COOKIE_NAME = 'delete_cookie_name'; - const DELETE_COOKIE_NAME_NO_METADATA = 'delete_cookie_name_no_metadata'; - const EXCEPTION_COOKIE_NAME = 'exception_cookie_name'; - const COOKIE_VALUE = 'cookie_value'; - const DEFAULT_VAL = 'default'; - const COOKIE_SECURE = true; - const COOKIE_NOT_SECURE = false; - const COOKIE_HTTP_ONLY = true; - const COOKIE_NOT_HTTP_ONLY = false; - const COOKIE_EXPIRE_END_OF_SESSION = 0; + public const COOKIE_NAME = 'cookie_name'; + public const SENSITIVE_COOKIE_NAME_NO_METADATA_HTTPS = 'sensitive_cookie_name_no_metadata_https'; + public const SENSITIVE_COOKIE_NAME_NO_METADATA_NOT_HTTPS = 'sensitive_cookie_name_no_metadata_not_https'; + public const SENSITIVE_COOKIE_NAME_NO_DOMAIN_NO_PATH = 'sensitive_cookie_name_no_domain_no_path'; + public const SENSITIVE_COOKIE_NAME_WITH_DOMAIN_AND_PATH = 'sensitive_cookie_name_with_domain_and_path'; + public const PUBLIC_COOKIE_NAME_NO_METADATA = 'public_cookie_name_no_metadata'; + public const PUBLIC_COOKIE_NAME_DEFAULT_VALUES = 'public_cookie_name_default_values'; + public const PUBLIC_COOKIE_NAME_SOME_FIELDS_SET = 'public_cookie_name_some_fields_set'; + public const MAX_COOKIE_SIZE_TEST_NAME = 'max_cookie_size_test_name'; + public const MAX_NUM_COOKIE_TEST_NAME = 'max_num_cookie_test_name'; + public const DELETE_COOKIE_NAME = 'delete_cookie_name'; + public const DELETE_COOKIE_NAME_NO_METADATA = 'delete_cookie_name_no_metadata'; + public const EXCEPTION_COOKIE_NAME = 'exception_cookie_name'; + public const COOKIE_VALUE = 'cookie_value'; + public const DEFAULT_VAL = 'default'; + public const COOKIE_SECURE = true; + public const COOKIE_NOT_SECURE = false; + public const COOKIE_HTTP_ONLY = true; + public const COOKIE_NOT_HTTP_ONLY = false; + public const COOKIE_EXPIRE_END_OF_SESSION = 0; /** * Mapping from constant names to functions that handle the assertions. + * + * @var string[] */ protected static $functionTestAssertionMapping = [ - self::DELETE_COOKIE_NAME => 'self::assertDeleteCookie', - self::DELETE_COOKIE_NAME_NO_METADATA => 'self::assertDeleteCookieWithNoMetadata', - self::SENSITIVE_COOKIE_NAME_NO_METADATA_HTTPS => 'self::assertSensitiveCookieWithNoMetaDataHttps', - self::SENSITIVE_COOKIE_NAME_NO_METADATA_NOT_HTTPS => 'self::assertSensitiveCookieWithNoMetaDataNotHttps', - self::SENSITIVE_COOKIE_NAME_NO_DOMAIN_NO_PATH => 'self::assertSensitiveCookieNoDomainNoPath', - self::SENSITIVE_COOKIE_NAME_WITH_DOMAIN_AND_PATH => 'self::assertSensitiveCookieWithDomainAndPath', - self::PUBLIC_COOKIE_NAME_NO_METADATA => 'self::assertPublicCookieWithNoMetaData', - self::PUBLIC_COOKIE_NAME_DEFAULT_VALUES => 'self::assertPublicCookieWithDefaultValues', - self::PUBLIC_COOKIE_NAME_SOME_FIELDS_SET => 'self::assertPublicCookieWithSomeFieldSet', - self::MAX_COOKIE_SIZE_TEST_NAME => 'self::assertCookieSize', + self::DELETE_COOKIE_NAME => self::class . '::assertDeleteCookie', + self::DELETE_COOKIE_NAME_NO_METADATA => self::class . '::assertDeleteCookieWithNoMetadata', + self::SENSITIVE_COOKIE_NAME_NO_METADATA_HTTPS => self::class . '::assertSensitiveCookieWithNoMetaDataHttps', + self::SENSITIVE_COOKIE_NAME_NO_METADATA_NOT_HTTPS => self::class . '::assertSensitiveCookieWithNoMetaDataNotHttps', //phpcs:ignore + self::SENSITIVE_COOKIE_NAME_NO_DOMAIN_NO_PATH => self::class . '::assertSensitiveCookieNoDomainNoPath', + self::SENSITIVE_COOKIE_NAME_WITH_DOMAIN_AND_PATH => self::class . '::assertSensitiveCookieWithDomainAndPath', //phpcs:ignore + self::PUBLIC_COOKIE_NAME_NO_METADATA => self::class . '::assertPublicCookieWithNoMetaData', + self::PUBLIC_COOKIE_NAME_DEFAULT_VALUES => self::class . '::assertPublicCookieWithDefaultValues', + self::PUBLIC_COOKIE_NAME_SOME_FIELDS_SET => self::class . '::assertPublicCookieWithSomeFieldSet', + self::MAX_COOKIE_SIZE_TEST_NAME => self::class . '::assertCookieSize', ]; /** @@ -83,8 +85,6 @@ class PhpCookieManagerTest extends TestCase protected $objectManager; /** - * Cookie Manager - * * @var PhpCookieManager */ protected $cookieManager; diff --git a/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php b/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php index 4ca549ec1a170..007fa19b2563f 100644 --- a/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php +++ b/lib/internal/Magento/Framework/Translate/Test/Unit/AdapterTest.php @@ -61,6 +61,6 @@ public function testTranslateNoProxy() */ public function testUnderscoresTranslation() { - $this->markTestIncomplete('MAGETWO-1012: i18n Improvements - Localization/Translations'); + $this->markTestSkipped('MAGETWO-1012: i18n Improvements - Localization/Translations'); } } diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Helper/SecureHtmlRenderer/HtmlRendererTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Helper/SecureHtmlRenderer/HtmlRendererTest.php index 44b6f66c4380a..4a708cec34243 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Helper/SecureHtmlRenderer/HtmlRendererTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Helper/SecureHtmlRenderer/HtmlRendererTest.php @@ -11,9 +11,13 @@ use Magento\Framework\View\Helper\SecureHtmlRender\HtmlRenderer; use Magento\Framework\View\Helper\SecureHtmlRender\TagData; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\MockObject; class HtmlRendererTest extends TestCase { + /** @var Escaper|MockObject */ + protected $escaperMock; + /** * @return void */ From 494d9ea10bbe72e7128d8ba343caa751b1d01e3d Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Tue, 10 Jan 2023 21:24:13 +0530 Subject: [PATCH 443/985] AC-7601:PHP8.2 Unit Test failure --- .../Framework/Filesystem/Test/Unit/Directory/WriteTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php index 49220ef6d62e8..cc30e478aa30a 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php @@ -93,7 +93,6 @@ public function testIsWritable() public function testCreateSymlinkTargetDirectoryExists() { $targetDir = $this->getMockForAbstractClass(WriteInterface::class); - //$targetDir->driver = $this->driver; $sourcePath = 'source/path/file'; $destinationDirectory = 'destination/path'; $destinationFile = $destinationDirectory . '/' . 'file'; From 88fd7920b07bf6f16d434b91dfa145d18967399a Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 10 Jan 2023 22:15:06 +0530 Subject: [PATCH 444/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4.6-develop --- .../User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml index 56fdeae3dc6b7..e13d0b43cad91 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml @@ -11,11 +11,11 @@ <test name="AdminUpdateUserRoleNewTest"> <annotations> <features value="User"/> - <stories value="Update User"/> - <title value="Update admin user entity by changing user role"/> + <stories value="Update User Test"/> + <title value="Update admin user entity by changing user role, new test to fix AC-7467"/> <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/> <severity value="MAJOR"/> - <testCaseId value="MC-27895"/> + <testCaseId value="MC-27895_AC-7467"/> <group value="user"/> <group value="mtf_migrated"/> </annotations> From 2ececb4903ac6efbc90427636128ed165148d6a3 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 10 Jan 2023 22:44:05 +0530 Subject: [PATCH 445/985] AC-7566::2.4.6-alpha2-Composer Integration Test Failures (Broken tests) --- .../Api/CheckoutAgreementsRepositoryTest.php | 6 ++++-- .../Magento/GiftMessage/Api/CartRepositoryTest.php | 9 ++++++--- .../GiftMessage/Api/GuestCartRepositoryTest.php | 6 ++++-- .../GiftMessage/Api/GuestItemRepositoryTest.php | 5 +++-- .../Magento/GiftMessage/Api/ItemRepositoryTest.php | 11 +++++++---- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php index c749956420dfc..aaaa52c5d4553 100644 --- a/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryTest.php @@ -65,8 +65,10 @@ public function testGetListReturnsEmptyListIfCheckoutAgreementsAreDisabledOnFron */ public function testGetListReturnsTheListOfActiveCheckoutAgreements() { - - $this->markTestSkipped('This test relies on system configuration state..'); + $this->markTestSkipped('This test relies on system configuration state.'); + // checkout/options/enable_agreements must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + $agreementModel = $this->getAgreementByName('Checkout Agreement (active)'); $agreements = $this->_webApiCall($this->listServiceInfo, []); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php index bae475089375a..4a5260d8e3ab1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/CartRepositoryTest.php @@ -102,8 +102,10 @@ public function testGetForMyCart() */ public function testSave() { + $this->markTestSkipped('This test relies on system configuration state.'); + // sales/gift_options/allow_order must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed - $this->markTestSkipped('This test relies on system configuration state..'); /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); @@ -154,8 +156,9 @@ public function testSaveForMyCart() ); $token = $customerTokenService->createCustomerAccessToken('customer@example.com', 'password'); - - $this->markTestSkipped('This test relies on system configuration state..'); + $this->markTestSkipped('This test relies on system configuration state.'); + // sales/gift_options/allow_order must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php index 5b0deb0ce666f..a5579cc5fe45d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestCartRepositoryTest.php @@ -73,8 +73,10 @@ public function testGet() */ public function testSave() { - - $this->markTestSkipped('This test relies on system configuration state..'); + $this->markTestSkipped('This test relies on system configuration state.'); + // sales/gift_options/allow_order must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php index 96c706c9542b4..d35a5c91e91b1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/GuestItemRepositoryTest.php @@ -78,9 +78,10 @@ public function testGet() */ public function testSave() { - $this->markTestSkipped('This test relies on system configuration state.'); - + // sales/gift_options/allow_items must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); diff --git a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php index 9c69cf77f893d..a06d03d0d7d9b 100644 --- a/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GiftMessage/Api/ItemRepositoryTest.php @@ -112,8 +112,10 @@ public function testGetForMyCart() */ public function testSave() { - - $this->markTestSkipped('This test relies on system configuration state..'); + $this->markTestSkipped('This test relies on system configuration state.'); + // sales/gift_options/allow_items must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); @@ -165,9 +167,10 @@ public function testSaveForMyCart() ); $token = $customerTokenService->createCustomerAccessToken('customer@example.com', 'password'); - // sales/gift_options/allow_items must be set to 1 in system configuration - // @todo remove next statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed $this->markTestSkipped('This test relies on system configuration state.'); + // sales/gift_options/allow_items must be set to 1 in system configuration + // @todo remove above statement when \Magento\TestFramework\TestCase\WebapiAbstract::_updateAppConfig is fixed + /** @var \Magento\Quote\Model\Quote $quote */ $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class); $quote->load('test_order_item_with_message', 'reserved_order_id'); From 8d58014bd76ebd216924e6d296743790dbcc7976 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Tue, 10 Jan 2023 14:22:48 -0600 Subject: [PATCH 446/985] AC-7422: Incompatible issues fix for PHP8.2 --revert escaper changes --- app/code/Magento/Sales/Helper/Admin.php | 5 ++--- lib/internal/Magento/Framework/Escaper.php | 11 +++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index e903abcbe3cec..0e0d8213cb791 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -165,9 +165,8 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $domDocument = $this->domDocumentFactory->create(); $internalErrors = libxml_use_internal_errors(true); - // phpcs:ignore Magento2.Functions.DiscouragedFunction - $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'ISO-8859-1'); + $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -193,7 +192,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } - $result = htmlspecialchars_decode($domDocument->saveHTML(), ENT_QUOTES); + $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; } diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index f25471d2de45e..cf29e0a09af8e 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -17,7 +17,7 @@ class Escaper { /** * HTML special characters flag - * @var $htmlSpecialCharsFlag + * @var int */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = @iconv("UTF-8", "ISO-8859-1//IGNORE", $data); + $string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -114,7 +114,7 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; } else { @@ -347,7 +347,6 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -368,7 +367,6 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -417,7 +415,6 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -432,7 +429,6 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -448,7 +444,6 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From d35363acb19a5a9596ea89d2bb03c4463c826a28 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Tue, 10 Jan 2023 17:48:13 -0600 Subject: [PATCH 447/985] AC-7422: Incompatible issues fix for PHP8.2 --revert tests fixes --- .../Catalog/Block/Product/View/MultiStoreCurrencyTest.php | 6 +++--- .../testsuite/Magento/Sales/Helper/AdminTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php index a225102570df7..8019681ab8ce1 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php @@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore'); + $this->assertProductStorePrice('simple2', '240,00 ₴', 'fixturestore'); } /** @@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore'); + $this->assertProductStorePrice('simple', 'Special Price 143,76 ₴ Regular Price 240,00 ₴', 'fixturestore'); } /** @@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void $this->localeResolver->setLocale('uk_UA'); $this->assertProductStorePrice( 'simple-product-tax-none', - 'Buy 2 for 960,00  each and save 80%', + 'Buy 2 for 960,00 ₴ each and save 80%', 'fixturestore', self::TIER_PRICE_BLOCK_NAME ); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php index 78655807be6d0..7b41f9890d74a 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php @@ -55,7 +55,7 @@ public function escapeHtmlWithLinksDataProvider(): array [ // @codingStandardsIgnoreStart 'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', - 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', + 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', // @codingStandardsIgnoreEnd 'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'], ], From 7014da918707d3c5ad15ddc59fb85e81e946507c Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Tue, 10 Jan 2023 22:06:34 -0800 Subject: [PATCH 448/985] ACP2E-1521: Reset password issue using a different browser to login --- .../Magento/Customer/Controller/Account/ForgotPasswordPost.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Controller/Account/ForgotPasswordPost.php b/app/code/Magento/Customer/Controller/Account/ForgotPasswordPost.php index c439d4649987f..79c8d75b0e5eb 100644 --- a/app/code/Magento/Customer/Controller/Account/ForgotPasswordPost.php +++ b/app/code/Magento/Customer/Controller/Account/ForgotPasswordPost.php @@ -93,6 +93,7 @@ public function execute() ); return $resultRedirect->setPath('*/*/forgotpassword'); } + $this->session->destroy(['send_expire_cookie']); $this->messageManager->addSuccessMessage($this->getSuccessMessage($email)); return $resultRedirect->setPath('*/*/'); } else { From 17629d851582a6ff5a16eef68bf7aa3798526d2a Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 11 Jan 2023 16:27:23 +0530 Subject: [PATCH 449/985] AC-7422:Incompatible issues fix for PHP8.2 - Fixed static test failures --- .../Magento/Fedex/Test/Unit/Model/Source/GenericTest.php | 4 +--- lib/internal/Magento/Framework/DataObject.php | 2 +- .../Framework/Filesystem/Test/Unit/Directory/WriteTest.php | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php b/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php index ab375d5d4d9da..1d85cd923dd2e 100644 --- a/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php +++ b/app/code/Magento/Fedex/Test/Unit/Model/Source/GenericTest.php @@ -55,7 +55,7 @@ protected function setUp(): void * @return void * @dataProvider toOptionArrayDataProvider */ - public function testToOptionArray($code, $methods, $result): void + public function testToOptionArray($methods, $result): void { $this->shippingFedexMock->expects($this->once()) ->method('getCode') @@ -73,7 +73,6 @@ public function toOptionArrayDataProvider(): array { return [ [ - 'method', [ 'FEDEX_GROUND' => __('Ground'), 'FIRST_OVERNIGHT' => __('First Overnight') @@ -84,7 +83,6 @@ public function toOptionArrayDataProvider(): array ] ], [ - '', false, [] ] diff --git a/lib/internal/Magento/Framework/DataObject.php b/lib/internal/Magento/Framework/DataObject.php index 7040cc26428f5..88ee58fb56630 100644 --- a/lib/internal/Magento/Framework/DataObject.php +++ b/lib/internal/Magento/Framework/DataObject.php @@ -12,7 +12,7 @@ * @SuppressWarnings(PHPMD.NumberOfChildren) * @since 100.0.2 */ -#[\AllowDynamicProperties] +#[\AllowDynamicProperties] //@phpstan-ignore-line class DataObject implements \ArrayAccess { /** diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php index cc30e478aa30a..9bf0f82ec4ff1 100644 --- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php +++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Directory/WriteTest.php @@ -1,7 +1,5 @@ <?php declare(strict_types=1); /** - * Unit Test for \Magento\Framework\Filesystem\Directory\Write - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ @@ -15,6 +13,9 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +/** + * Unit Test for \Magento\Framework\Filesystem\Directory\Write + */ class WriteTest extends TestCase { /** From 530f7d876c2e92612209a33a1244a8dfb2dca1bc Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Wed, 11 Jan 2023 16:38:52 +0530 Subject: [PATCH 450/985] AC-7600:UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline Removed PB --- .../Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml index 91478877cfe50..63ad322bff14d 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml @@ -23,12 +23,10 @@ <!-- Step2 Disabled Old Media Gallery and Page Builder --> <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </before> <after> <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </after> From 264eb240a0288cfdfe16e33f963b0a43b7e0220d Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Wed, 11 Jan 2023 18:04:18 +0530 Subject: [PATCH 451/985] ACQE-4383: skip tag removed --- ...ntNotApplicableShippingMethodInReviewAndPaymentStepTest.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index 6f83edc51fcfa..db73299d015d9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -17,9 +17,6 @@ <testCaseId value="MC-22625"/> <useCaseId value="MC-21926"/> <group value="checkout"/> - <skip> - <issueId value="ACQE-4352"/> - </skip> </annotations> <before> From 4e398762108809052ae18777ab4dfa16c066ec74 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Wed, 11 Jan 2023 18:05:16 +0530 Subject: [PATCH 452/985] ACQE-4383: skip tag removed --- ...ontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index db73299d015d9..60beb5f2ee503 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -17,6 +17,8 @@ <testCaseId value="MC-22625"/> <useCaseId value="MC-21926"/> <group value="checkout"/> + + </annotations> <before> From 7d14702b04c11eb721ff3441c90e74ac18ef759b Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Wed, 11 Jan 2023 18:07:10 +0530 Subject: [PATCH 453/985] ACQE-4383: skip tag removed --- ...ontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index 60beb5f2ee503..db73299d015d9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -17,8 +17,6 @@ <testCaseId value="MC-22625"/> <useCaseId value="MC-21926"/> <group value="checkout"/> - - </annotations> <before> From 78f7f3286776cb7328771aa110387c5c01990f84 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Wed, 11 Jan 2023 19:17:59 +0530 Subject: [PATCH 454/985] AC-7600:UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline Fixed failing test --- ...erDeletesFolderFromMediaGalleryNewTest.xml | 89 +++++++++++++++++++ .../UserDeletesFolderFromMediaGalleryTest.xml | 5 ++ 2 files changed, 94 insertions(+) create mode 100755 app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml new file mode 100755 index 0000000000000..53fa880485650 --- /dev/null +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="UserDeletesFolderFromMediaGalleryNewTest"> + <annotations> + <features value="MediaGallery"/> + <stories value="User deletes folder from Media Gallery"/> + <title value="User deletes folder from Media Gallery"/> + <testCaseId value="AC-6377"/> + <description value="User deletes folder from Media Gallery"/> + <severity value="CRITICAL"/> + <group value="media_gallery_ui"/> + </annotations> + <before> + <!-- Step1 Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!-- Step2 Disabled Old Media Gallery and Page Builder --> + <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> + <magentoCLI command="cache:clean config" stepKey="flushCache"/> + </before> + <after> + <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> + <magentoCLI command="cache:clean config" stepKey="flushCache"/> + </after> + + <!-- Step3 Creates folder in Media Gallery --> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAny"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="VerfyNewFolderIsCreated"/> + <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAnyPostFolderCreation"/> + <click selector="{{AdminMediaGalleryFolderSection.closeInsertFileSlide}}" stepKey="closeInsertFileSlide"/> + + <!-- Step4 Open Media Gallery from wysiwyg --> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPageForWysiwyg"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPageFromWysiwyg"/> + + <!-- Step4.1 Delete Folder is diabled by default for no selected folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFoldersToVerifyDeleteFolderButtonStatus"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsDisabled"/> + + <!-- Step4.2 Delete Folder is enabled post selecting folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderToVerifyDeleteFolderStatus"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <dontSeeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNotDisabledAnymore"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowEnabled"/> + + <!-- Step4.3 Delete Folder is disabled post selecting folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="deselectWysiwygFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowDisabledAgain"/> + + <!-- Step5 Select folder to delete --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderAgain"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="ClickOnDeleteFolderButtonForSelectedFolder"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadOnClickFolderDelete"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="verifyTheDeleteFolderMessageTitle"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="verifyTheDeleteFolderMessageContent"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDelete"/> + <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="clickCancelDeleteButton"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostCancelFolderDelete"/> + <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="AgainClickOnDeleteFolderButtonForSelectedFolder"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDeleteAgain"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="reverifyTheDeleteFolderMessageTitle"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="reverifyTheDeleteFolderMessageContent"/> + <click selector="{{AdminMediaGalleryFolderSection.folderConfirmDeleteButton}}" stepKey="clickConfirmDeleteButton"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFinalFolderDelete"/> + </test> +</tests> + diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml index 63ad322bff14d..c65aa6a637aac 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml @@ -16,6 +16,9 @@ <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> + <skip> + <issueId value="DEPRECATED">Use UserDeletesFolderFromMediaGalleryNewTest instead.</issueId> + </skip> </annotations> <before> <!-- Step1 Login as Admin --> @@ -23,10 +26,12 @@ <!-- Step2 Disabled Old Media Gallery and Page Builder --> <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> + <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </before> <after> <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> + <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </after> From c14029d53b493d8e817f9dc11801cd5c7efb85c0 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Wed, 11 Jan 2023 19:37:13 +0530 Subject: [PATCH 455/985] AC-7600:UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline Fixed failing test --- ...erDeletesFolderFromMediaGalleryNewTest.xml | 92 +++++++++++++++++++ .../UserDeletesFolderFromMediaGalleryTest.xml | 3 + 2 files changed, 95 insertions(+) create mode 100755 app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml new file mode 100755 index 0000000000000..8218b2885becf --- /dev/null +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="UserDeletesFolderFromMediaGalleryNewTest"> + <annotations> + <features value="MediaGallery"/> + <stories value="User deletes folder from Media Gallery"/> + <title value="User deletes folder from Media Gallery"/> + <testCaseId value="AC-6377"/> + <description value="User deletes folder from Media Gallery"/> + <severity value="CRITICAL"/> + <group value="media_gallery_ui"/> + </annotations> + <before> + <!-- Step1 Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <!-- Step2 Disabled Old Media Gallery and Page Builder --> + <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> + <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> + <magentoCLI command="cache:clean config" stepKey="flushCache"/> + </before> + <after> + <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> + <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> + <magentoCLI command="cache:clean config" stepKey="flushCache"/> + </after> + + <!-- Step3 Creates folder in Media Gallery --> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> + <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAny"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> + <argument name="name" value="wysiwyg"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="VerfyNewFolderIsCreated"/> + <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAnyPostFolderCreation"/> + <click selector="{{AdminMediaGalleryFolderSection.closeInsertFileSlide}}" stepKey="closeInsertFileSlide"/> + + <!-- Step4 Open Media Gallery from wysiwyg --> + <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPageForWysiwyg"/> + <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPageFromWysiwyg"/> + + <!-- Step4.1 Delete Folder is diabled by default for no selected folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFoldersToVerifyDeleteFolderButtonStatus"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsDisabled"/> + + <!-- Step4.2 Delete Folder is enabled post selecting folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderToVerifyDeleteFolderStatus"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <dontSeeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNotDisabledAnymore"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowEnabled"/> + + <!-- Step4.3 Delete Folder is disabled post selecting folder --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="deselectWysiwygFolder"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowDisabledAgain"/> + + <!-- Step5 Select folder to delete --> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderAgain"> + <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> + </actionGroup> + <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="ClickOnDeleteFolderButtonForSelectedFolder"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadOnClickFolderDelete"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="verifyTheDeleteFolderMessageTitle"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="verifyTheDeleteFolderMessageContent"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDelete"/> + <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="clickCancelDeleteButton"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostCancelFolderDelete"/> + <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="AgainClickOnDeleteFolderButtonForSelectedFolder"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDeleteAgain"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="reverifyTheDeleteFolderMessageTitle"/> + <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="reverifyTheDeleteFolderMessageContent"/> + <click selector="{{AdminMediaGalleryFolderSection.folderConfirmDeleteButton}}" stepKey="clickConfirmDeleteButton"/> + <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFinalFolderDelete"/> + </test> +</tests> + diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml index 91478877cfe50..c65aa6a637aac 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml @@ -16,6 +16,9 @@ <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> + <skip> + <issueId value="DEPRECATED">Use UserDeletesFolderFromMediaGalleryNewTest instead.</issueId> + </skip> </annotations> <before> <!-- Step1 Login as Admin --> From 791bb8e0d72d0083c7c723eced00b6b3da7785c9 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 08:17:18 -0600 Subject: [PATCH 456/985] ACPT-826 --- .../System/Config/SaveAsyncConfigPlugin.php | 2 +- .../Controller/Adminhtml/System/AbstractConfig.php | 2 +- .../Controller/Adminhtml/System/Config/Save.php | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 9fd03389fdb73..318bbda4a6f1b 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -83,7 +83,7 @@ public function aroundExecute(Save $subject, callable $proceed) $configData = $subject->getConfigData(); $this->asyncConfigPublisher->saveConfigData($configData); $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); - $subject->_saveState($subject->getRequest()->getPost('config_state')); + $subject->saveState($subject->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath( diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php index 839333e951065..62a99d295ac34 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php @@ -89,7 +89,7 @@ protected function _isAllowed() * @param array $configState * @return bool */ - public function _saveState($configState = []) + protected function _saveState($configState = []) { if (is_array($configState)) { $configState = $this->sanitizeConfigState($configState); diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 540a4079c6162..1016f5754af42 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -57,6 +57,17 @@ public function __construct( $this->string = $string; } + /** + * Save state of configuration field sets + * + * @param array $configState + * @return bool + */ + public function saveState($configState) + { + return $this->_saveState($configState); + } + /** * @inheritdoc */ From d4e55cc01073736e5604e7b6d2f6d8b61ef1d486 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 09:28:28 -0600 Subject: [PATCH 457/985] ACPT-826 --- .../Controller/System/Config/SaveAsyncConfigPlugin.php | 2 +- .../Config/Controller/Adminhtml/System/Config/Save.php | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 318bbda4a6f1b..9fd03389fdb73 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -83,7 +83,7 @@ public function aroundExecute(Save $subject, callable $proceed) $configData = $subject->getConfigData(); $this->asyncConfigPublisher->saveConfigData($configData); $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); - $subject->saveState($subject->getRequest()->getPost('config_state')); + $subject->_saveState($subject->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); return $resultRedirect->setPath( diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 1016f5754af42..075dbd3aa5004 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -58,14 +58,11 @@ public function __construct( } /** - * Save state of configuration field sets - * - * @param array $configState - * @return bool + * @inheritDoc */ - public function saveState($configState) + public function _saveState($configState = []): bool { - return $this->_saveState($configState); + return parent::_saveState($configState); } /** From 48cd482e529ef46444750408cd5086ecbb670453 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 10:14:11 -0600 Subject: [PATCH 458/985] ACPT-826 --- .../Magento/Config/Controller/Adminhtml/System/Config/Save.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 075dbd3aa5004..d5222a13db311 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -58,6 +58,7 @@ public function __construct( } /** + * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod * @inheritDoc */ public function _saveState($configState = []): bool From 0c525b1c51276950c1edb6be0c1461a95a851340 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 12:18:32 -0600 Subject: [PATCH 459/985] ACPT-826 --- .../Magento/AsyncConfig/Model/AsyncConfigPublisher.php | 2 +- .../Controller/System/Config/SaveAsyncConfigPlugin.php | 10 +++------- .../Controller/Adminhtml/System/AbstractConfig.php | 4 +--- .../Config/Controller/Adminhtml/System/Config/Save.php | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php index 6b077f8e0e613..9647c29b8800b 100644 --- a/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php +++ b/app/code/Magento/AsyncConfig/Model/AsyncConfigPublisher.php @@ -75,7 +75,7 @@ public function saveConfigData(array $configData) } /** - * Change Placeholder Data path if exists + * Save Images to temporary Path * * @param array $configData * @return void diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index 9fd03389fdb73..e2e8ae84e8673 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -8,6 +8,7 @@ namespace Magento\AsyncConfig\Plugin\Controller\System\Config; use Magento\AsyncConfig\Api\AsyncConfigPublisherInterface; +use Magento\AsyncConfig\Setup\ConfigOptionsList; use Magento\Config\Controller\Adminhtml\System\Config\Save; use Magento\Framework\App\DeploymentConfig; use Magento\Framework\App\ObjectManager; @@ -39,11 +40,6 @@ class SaveAsyncConfigPlugin */ private $messageManager; - /** - * @var const - */ - public const ASYNC_CONFIG_OPTION_PATH = 'config/async'; - /** * * @param DeploymentConfig|null $deploymentConfig @@ -77,12 +73,12 @@ public function __construct( */ public function aroundExecute(Save $subject, callable $proceed) { - if (!$this->deploymentConfig->get(self::ASYNC_CONFIG_OPTION_PATH)) { + if (!$this->deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_ASYNC_CONFIG_SAVE)) { return $proceed(); } else { $configData = $subject->getConfigData(); $this->asyncConfigPublisher->saveConfigData($configData); - $this->messageManager->addSuccess(__('Configuration changes will be applied by consumer soon.')); + $this->messageManager->addSuccessMessage(__('Configuration changes will be applied by consumer soon.')); $subject->_saveState($subject->getRequest()->getPost('config_state')); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php index 62a99d295ac34..c644ec8eb15cc 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php @@ -23,7 +23,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction * * @see _isAllowed() */ - public const ADMIN_RESOURCE = 'Magento_Config::config'; + const ADMIN_RESOURCE = 'Magento_Config::config'; /** * @var \Magento\Config\Model\Config\Structure @@ -31,9 +31,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction protected $_configStructure; /** - * @var mixed * @deprecated 101.0.0 - * @see Nothing */ protected $_sectionChecker; diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index d5222a13db311..45250454e9700 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -59,7 +59,7 @@ public function __construct( /** * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod - * @inheritDoc + * {@inheritdoc} */ public function _saveState($configState = []): bool { From efa7d5a7afb82d47757afcf8d15f438208f88a74 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 13:20:36 -0600 Subject: [PATCH 460/985] ACPT-826 --- .../Config/Controller/Adminhtml/System/Config/Save.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 45250454e9700..f6ce9390378c8 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -57,9 +57,13 @@ public function __construct( $this->string = $string; } + /** + * Save configuration state * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod - * {@inheritdoc} + * + * @param $configState + * @return bool */ public function _saveState($configState = []): bool { From f3d79443a294c2879e6671fa506ebf3b5c6f68a6 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Wed, 11 Jan 2023 13:36:57 -0600 Subject: [PATCH 461/985] ACP2E-1516: Promotion issue with applying rule per item --- app/code/Magento/SalesRule/Model/RulesApplier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php index ae2beb00d6fe1..a0189888d9746 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -413,7 +413,7 @@ public function setAppliedRuleIds(AbstractItem $item, array $appliedRuleIds) $address = $item->getAddress(); $quote = $item->getQuote(); - $item->setAppliedRuleIds($this->validatorUtility->mergeIds($item->getAppliedRuleIds(), $appliedRuleIds)); + $item->setAppliedRuleIds(join(',', $appliedRuleIds)); $address->setAppliedRuleIds($this->validatorUtility->mergeIds($address->getAppliedRuleIds(), $appliedRuleIds)); $quote->setAppliedRuleIds($this->validatorUtility->mergeIds($quote->getAppliedRuleIds(), $appliedRuleIds)); From 5385744e3bc2cc70f08a4909909b8a3148ce1311 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Wed, 11 Jan 2023 13:58:34 -0600 Subject: [PATCH 462/985] ACPT-826 --- .../Magento/Config/Controller/Adminhtml/System/Config/Save.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index f6ce9390378c8..e1332bb8cff44 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -57,12 +57,11 @@ public function __construct( $this->string = $string; } - /** * Save configuration state * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod * - * @param $configState + * @param array $configState * @return bool */ public function _saveState($configState = []): bool From 96cba49493560fd9548db6f3e277e576d4f8a130 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Wed, 11 Jan 2023 14:27:23 -0600 Subject: [PATCH 463/985] ACP2E-1516: Promotion issue with applying rule per item --- .../Test/Unit/Model/RulesApplierTest.php | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php index af6f41cee2294..55800ee7db600 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php @@ -236,8 +236,15 @@ protected function getPreparedItem(): AbstractItem * @var AbstractItem|MockObject $item */ $item = $this->getMockBuilder(Item::class) - ->addMethods(['setDiscountAmount', 'setBaseDiscountAmount', 'setDiscountPercent', 'setAppliedRuleIds']) - ->onlyMethods(['getAddress', 'getChildren', 'getExtensionAttributes', 'getProduct']) + ->addMethods( + [ + 'setDiscountAmount', + 'setBaseDiscountAmount', + 'setDiscountPercent', + 'setAppliedRuleIds', + 'getAppliedRuleIds' + ] + )->onlyMethods(['getAddress', 'getChildren', 'getExtensionAttributes', 'getProduct', 'getQuote']) ->disableOriginalConstructor() ->getMock(); $itemExtension = $this->getMockBuilder(ExtensionAttributesInterface::class) @@ -253,6 +260,9 @@ protected function getPreparedItem(): AbstractItem $address->expects($this->any()) ->method('getQuote') ->willReturn($quote); + $item->expects($this->any()) + ->method('getQuote') + ->willReturn($quote); return $item; } @@ -290,4 +300,19 @@ protected function applyRule(MockObject $item, MockObject $rule): void ->with($this->anything()) ->willReturn($discountCalc); } + + public function testSetAppliedRuleIds() + { + $item = $this->getPreparedItem(); + $ruleId = 1; + $appliedRuleIds = [$ruleId => $ruleId]; + + $item->expects($this->once()) + ->method('setAppliedRuleIds') + ->with($ruleId); + $item->expects($this->never()) + ->method('getAppliedRuleIds'); + + $this->rulesApplier->setAppliedRuleIds($item, $appliedRuleIds); + } } From 48dd2a2a297112d5dab0f96f4a76464ea54b45e7 Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Wed, 11 Jan 2023 12:27:24 -0800 Subject: [PATCH 464/985] ACP2E-1521: Reset password issue using a different browser to login --- .../Test/Unit/Controller/Account/ForgotPasswordPostTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/ForgotPasswordPostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/ForgotPasswordPostTest.php index 928ec5960a2b2..9fcbbf77a3b87 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/ForgotPasswordPostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/ForgotPasswordPostTest.php @@ -147,6 +147,8 @@ public function testExecute() ->with('*/*/') ->willReturnSelf(); + $this->session->expects($this->once())->method('destroy')->with(['send_expire_cookie']); + $this->controller->execute(); } From 5b1526fb668f8808a642659c86a61e0b813a64ed Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 12 Jan 2023 14:06:34 +0530 Subject: [PATCH 465/985] AC-7422:Incompatible issues fix for PHP8.2 --- composer.json | 18 +- composer.lock | 1702 +++++++++--------- lib/internal/Magento/Framework/composer.json | 4 +- 3 files changed, 883 insertions(+), 841 deletions(-) diff --git a/composer.json b/composer.json index d393e876d1319..c154b496460b6 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,16 @@ "preferred-install": "dist", "sort-packages": true }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/magento-gl/magento-coding-standard" + }, + { + "type": "vcs", + "url": "https://github.com/magento-gl/magento2-functional-testing-framework" + } + ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -40,7 +50,7 @@ "composer/composer": "^2.0, !=2.2.16", "elasticsearch/elasticsearch": "^7.17||^8.5", "ezyang/htmlpurifier": "^4.14", - "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", "laminas/laminas-code": "^4.5", "laminas/laminas-db": "^2.15", @@ -85,7 +95,7 @@ "tedivm/jshrink": "^1.4", "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", - "webonyx/graphql-php": "^14.11", + "webonyx/graphql-php": "^15", "wikimedia/less.php": "^3.2" }, "require-dev": { @@ -94,8 +104,8 @@ "dg/bypass-finals": "^1.4", "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", - "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "^4.0", + "magento/magento-coding-standard": "dev-Hammer_246_PHP82_Fixes", + "magento/magento2-functional-testing-framework": "dev-Hammer_246_PHP82_Fixes", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.7", diff --git a/composer.lock b/composer.lock index 634526082262e..571a0a5a55c28 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": "989939469e4660b4d6550a12976d07ca", + "content-hash": "f9c2bbd2a48fb48f4f7ce05dc463a55e", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.224.4", + "version": "3.256.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8" + "reference": "a72094f7d968bdc743839e309087d51f868ba26c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", - "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a72094f7d968bdc743839e309087d51f868ba26c", + "reference": "a72094f7d968bdc743839e309087d51f868ba26c", "shasum": "" }, "require": { @@ -75,9 +75,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0 || ^2.1.1", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -85,6 +85,8 @@ "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -92,10 +94,11 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3", + "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -143,32 +146,32 @@ "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.224.4" + "source": "https://github.com/aws/aws-sdk-php/tree/3.256.2" }, - "time": "2022-06-06T18:32:10+00:00" + "time": "2023-01-11T20:12:50+00:00" }, { "name": "brick/math", - "version": "0.9.3", + "version": "0.10.2", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^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": "4.25.0" }, "type": "library", "autoload": { @@ -193,19 +196,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.10.2" }, "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": "2022-08-10T22:54:19+00:00" }, { "name": "brick/varexporter", @@ -420,16 +419,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.4", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", - "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd", "shasum": "" }, "require": { @@ -476,7 +475,80 @@ "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.4" + "source": "https://github.com/composer/ca-bundle/tree/1.3.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-01-11T08:27:00+00:00" + }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" }, "funding": [ { @@ -492,43 +564,52 @@ "type": "tidelift" } ], - "time": "2022-10-12T12:08:29+00:00" + "time": "2022-06-19T11:31:27+00:00" }, { "name": "composer/composer", - "version": "2.2.18", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5" + "reference": "923278ad13e1621946eb76ab2882655d2cc396a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/84175907664ca8b73f73f4883e67e886dfefb9f5", - "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5", + "url": "https://api.github.com/repos/composer/composer/zipball/923278ad13e1621946eb76ab2882655d2cc396a4", + "reference": "923278ad13e1621946eb76ab2882655d2cc396a4", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", + "composer/class-map-generator": "^1.0", "composer/metadata-minifier": "^1.0", - "composer/pcre": "^1.0", + "composer/pcre": "^2.1 || ^3.1", "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0 || ^3.0", + "composer/spdx-licenses": "^1.5.7", + "composer/xdebug-handler": "^2.0.2 || ^3.0.3", "justinrainbow/json-schema": "^5.2.11", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0 || ^2.0", - "react/promise": "^1.2 || ^2.7", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "react/promise": "^2.8", "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", - "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + "seld/phar-utils": "^1.2", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.11 || ^6.0.11", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/polyfill-php73": "^1.24", + "symfony/polyfill-php80": "^1.24", + "symfony/polyfill-php81": "^1.24", + "symfony/process": "^5.4 || ^6.0" }, "require-dev": { - "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "phpstan/phpstan": "^1.9.3", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1", + "phpstan/phpstan-symfony": "^1.2.10", + "symfony/phpunit-bridge": "^6.0" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -541,7 +622,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.5-dev" + }, + "phpstan": { + "includes": [ + "phpstan/rules.neon" + ] } }, "autoload": { @@ -575,7 +661,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.18" + "source": "https://github.com/composer/composer/tree/2.5.1" }, "funding": [ { @@ -591,7 +677,7 @@ "type": "tidelift" } ], - "time": "2022-08-20T09:33:38+00:00" + "time": "2022-12-22T14:33:54+00:00" }, { "name": "composer/metadata-minifier", @@ -664,30 +750,30 @@ }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -715,7 +801,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.1.0" }, "funding": [ { @@ -731,7 +817,7 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2022-11-17T09:50:14+00:00" }, { "name": "composer/semver", @@ -1262,22 +1348,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.3", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1286,10 +1372,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1299,8 +1385,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1366,7 +1456,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.3" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -1382,20 +1472,20 @@ "type": "tidelift" } ], - "time": "2022-05-25T13:24:33+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1450,7 +1540,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1466,20 +1556,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1493,17 +1583,21 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1565,7 +1659,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1581,7 +1675,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "justinrainbow/json-schema", @@ -4925,16 +5019,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -4975,9 +5069,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "opensearch-project/opensearch-php", @@ -5045,16 +5139,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.5.0", + "version": "v2.6.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8" + "reference": "58c3f47f650c94ec05a151692652a868995d2938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/9229e15f2e6ba772f0c55dd6986c563b937170a8", - "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", "shasum": "" }, "require": { @@ -5108,7 +5202,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-01-17T05:32:27+00:00" + "time": "2022-06-14T06:56:20+00:00" }, { "name": "paragonie/random_compat", @@ -5240,16 +5334,16 @@ }, { "name": "php-amqplib/php-amqplib", - "version": "v3.2.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "0bec5b392428e0ac3b3f34fbc4e02d706995833e" + "reference": "5c537cb724f2e181183c202e63f4303935344c5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/0bec5b392428e0ac3b3f34fbc4e02d706995833e", - "reference": "0bec5b392428e0ac3b3f34fbc4e02d706995833e", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/5c537cb724f2e181183c202e63f4303935344c5f", + "reference": "5c537cb724f2e181183c202e63f4303935344c5f", "shasum": "" }, "require": { @@ -5315,9 +5409,9 @@ ], "support": { "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.2.0" + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.4.0" }, - "time": "2022-03-10T19:16:00+00:00" + "time": "2022-10-18T20:52:02+00:00" }, { "name": "phpseclib/mcrypt_compat", @@ -5389,16 +5483,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.14", + "version": "3.0.18", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f28693d38ba21bb0d9f0c411ee5dae2b178201da", + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da", "shasum": "" }, "require": { @@ -5410,6 +5504,7 @@ "phpunit/phpunit": "*" }, "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", @@ -5478,7 +5573,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" }, "funding": [ { @@ -5494,7 +5589,7 @@ "type": "tidelift" } ], - "time": "2022-04-04T05:15:45+00:00" + "time": "2022-12-17T18:26:50+00:00" }, { "name": "psr/container", @@ -5848,106 +5943,24 @@ }, "time": "2019-03-08T08:55:37+00:00" }, - { - "name": "ramsey/collection", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "symfony/polyfill-php81": "^1.23" - }, - "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ramsey\\Collection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "A PHP library for representing and manipulating collections.", - "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" - ], - "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" - }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", - "type": "tidelift" - } - ], - "time": "2021-10-10T03:01:02+00:00" - }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.7.2", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "008f6cea262fbb26139757e153b451fcd0ac179d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/008f6cea262fbb26139757e153b451fcd0ac179d", + "reference": "008f6cea262fbb26139757e153b451fcd0ac179d", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", + "brick/math": "^0.8.8 || ^0.9 || ^0.10", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.1" }, "replace": { "rhumsaa/uuid": "self.version" @@ -5959,34 +5972,29 @@ "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", - "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.16.1", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9" + "vimeo/psalm": "^4.22" }, "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", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -6011,7 +6019,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.2" }, "funding": [ { @@ -6023,7 +6031,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2023-01-12T01:45:14+00:00" }, { "name": "react/promise", @@ -6266,6 +6274,67 @@ }, "time": "2022-08-31T10:31:18+00:00" }, + { + "name": "seld/signal-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\Signal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" + }, + "time": "2022-07-20T18:31:45+00:00" + }, { "name": "spomky-labs/aes-key-wrap", "version": "v7.0.0", @@ -6423,16 +6492,16 @@ }, { "name": "symfony/console", - "version": "v5.4.16", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", - "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", "shasum": "" }, "require": { @@ -6502,7 +6571,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.16" + "source": "https://github.com/symfony/console/tree/v5.4.17" }, "funding": [ { @@ -6518,20 +6587,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T14:09:27+00:00" + "time": "2022-12-28T14:15:31+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.3", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e" + "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b0a190285cd95cb019237851205b8140ef6e368e", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/052ef49b660f9ad2a3adb311c555c9bc11ba61f4", + "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4", "shasum": "" }, "require": { @@ -6568,7 +6637,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.3" + "source": "https://github.com/symfony/css-selector/tree/v5.4.17" }, "funding": [ { @@ -6584,7 +6653,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-12-23T11:40:44+00:00" }, { "name": "symfony/dependency-injection", @@ -6677,25 +6746,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -6724,7 +6793,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -6740,7 +6809,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/error-handler", @@ -6815,16 +6884,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.9", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" + "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", + "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", "shasum": "" }, "require": { @@ -6880,7 +6949,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.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.17" }, "funding": [ { @@ -6896,20 +6965,20 @@ "type": "tidelift" } ], - "time": "2022-05-05T16:45:39+00:00" + "time": "2022-12-12T15:54:21+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", "shasum": "" }, "require": { @@ -6922,7 +6991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -6959,7 +7028,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" }, "funding": [ { @@ -6975,7 +7044,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/filesystem", @@ -7039,20 +7108,20 @@ "type": "tidelift" } ], - "time": "2022-09-21T19:53:16+00:00" + "time": "2022-11-20T13:01:27+00:00" }, { "name": "symfony/finder", - "version": "v5.4.11", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + "reference": "40c08632019838dfb3350f18cf5563b8080055fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", + "reference": "40c08632019838dfb3350f18cf5563b8080055fc", "shasum": "" }, "require": { @@ -7086,7 +7155,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.11" + "source": "https://github.com/symfony/finder/tree/v5.4.17" }, "funding": [ { @@ -7102,20 +7171,20 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:37:50+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.10", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" + "reference": "b64a0e2df212d5849e4584cabff0cf09c5d6866a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b64a0e2df212d5849e4584cabff0cf09c5d6866a", + "reference": "b64a0e2df212d5849e4584cabff0cf09c5d6866a", "shasum": "" }, "require": { @@ -7127,8 +7196,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -7159,7 +7231,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.10" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.17" }, "funding": [ { @@ -7175,7 +7247,7 @@ "type": "tidelift" } ], - "time": "2022-06-19T13:13:40+00:00" + "time": "2022-12-14T08:23:03+00:00" }, { "name": "symfony/http-kernel", @@ -7542,16 +7614,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -7565,7 +7637,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7609,7 +7681,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -7625,7 +7697,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -7796,16 +7868,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -7814,7 +7886,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7852,7 +7924,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -7868,7 +7940,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", @@ -8034,16 +8106,16 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -8052,7 +8124,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -8093,7 +8165,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -8109,7 +8181,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", @@ -8258,16 +8330,16 @@ }, { "name": "symfony/string", - "version": "v5.4.15", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "url": "https://api.github.com/repos/symfony/string/zipball/55733a8664b8853b003e70251c58bc8cb2d82a6b", + "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b", "shasum": "" }, "require": { @@ -8324,7 +8396,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.15" + "source": "https://github.com/symfony/string/tree/v5.4.17" }, "funding": [ { @@ -8340,7 +8412,7 @@ "type": "tidelift" } ], - "time": "2022-10-05T15:16:54+00:00" + "time": "2022-12-12T15:54:21+00:00" }, { "name": "symfony/var-dumper", @@ -8429,7 +8501,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T10:24:18+00:00" + "time": "2022-12-22T17:55:15+00:00" }, { "name": "tedivm/jshrink", @@ -8849,37 +8921,41 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.8", + "version": "v15.0.1", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3" + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/04a48693acd785330eefd3b0e4fa67df8dfee7c3", - "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/15fb39ba17faa332a2001aed5c1472117ec5abc3", + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^7.1 || ^8" + "php": "^7.4 || ^8" }, "require-dev": { - "amphp/amp": "^2.3", - "doctrine/coding-standard": "^6.0", - "nyholm/psr7": "^1.2", + "amphp/amp": "^2.6", + "dms/phpunit-arraysubset-asserts": "^0.4", + "ergebnis/composer-normalize": "^2.28", + "mll-lab/php-cs-fixer-config": "^4.4", + "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.82", - "phpstan/phpstan-phpunit": "0.12.18", - "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "^7.2 || ^8.5", - "psr/http-message": "^1.0", - "react/promise": "2.*", - "simpod/php-coveralls-mirror": "^3.0", - "squizlabs/php_codesniffer": "3.5.4" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "1.9.8", + "phpstan/phpstan-phpunit": "1.3.3", + "phpstan/phpstan-strict-rules": "1.4.4", + "phpunit/phpunit": "^9.5", + "psr/http-message": "^1", + "react/http": "^1.6", + "react/promise": "^2.9", + "symfony/polyfill-php81": "^1.23", + "symfony/var-exporter": "^5 || ^6", + "thecodingmachine/safe": "^1.3" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -8903,7 +8979,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.8" + "source": "https://github.com/webonyx/graphql-php/tree/v15.0.1" }, "funding": [ { @@ -8911,7 +8987,7 @@ "type": "open_collective" } ], - "time": "2022-09-21T15:35:03+00:00" + "time": "2023-01-11T14:57:18+00:00" }, { "name": "wikimedia/less.php", @@ -8987,29 +9063,24 @@ "packages-dev": [ { "name": "allure-framework/allure-codeception", - "version": "1.5.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-codeception.git", - "reference": "a6156aef942a4e4de0add34a73d066a9458cefc6" + "reference": "ac3d471902d2903856bbd0a95e7546788319ed22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-codeception/zipball/a6156aef942a4e4de0add34a73d066a9458cefc6", - "reference": "a6156aef942a4e4de0add34a73d066a9458cefc6", + "url": "https://api.github.com/repos/allure-framework/allure-codeception/zipball/ac3d471902d2903856bbd0a95e7546788319ed22", + "reference": "ac3d471902d2903856bbd0a95e7546788319ed22", "shasum": "" }, "require": { - "allure-framework/allure-php-api": "^1.3", - "codeception/codeception": "^2.5 | ^3 | ^4", - "ext-json": "*", - "php": ">=7.1.3", - "symfony/filesystem": "^2.7 | ^3 | ^4 | ^5", - "symfony/finder": "^2.7 | ^3 | ^4 | ^5" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^7.2 | ^8 | ^9" + "allure-framework/allure-php-api": "~1.2.1", + "codeception/codeception": "^2.3|^3.0|^4.0", + "php": ">=5.6", + "symfony/filesystem": ">=2.6", + "symfony/finder": ">=2.6" }, "type": "library", "autoload": { @@ -9024,11 +9095,11 @@ "authors": [ { "name": "Ivan Krutov", - "email": "vania-pooh@aerokube.com", + "email": "vania-pooh@yandex-team.ru", "role": "Developer" } ], - "description": "Allure Codeception integration", + "description": "A Codeception adapter for Allure report.", "homepage": "http://allure.qatools.ru/", "keywords": [ "allure", @@ -9040,34 +9111,34 @@ "testing" ], "support": { - "email": "allure@qameta.io", + "email": "allure@yandex-team.ru", "issues": "https://github.com/allure-framework/allure-codeception/issues", "source": "https://github.com/allure-framework/allure-codeception" }, - "time": "2021-06-04T13:24:36+00:00" + "time": "2020-11-26T11:41:53+00:00" }, { "name": "allure-framework/allure-php-api", - "version": "1.4.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-api.git", - "reference": "50507f482d490f114054f2281cca487db47fa2bd" + "reference": "13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-api/zipball/50507f482d490f114054f2281cca487db47fa2bd", - "reference": "50507f482d490f114054f2281cca487db47fa2bd", + "url": "https://api.github.com/repos/allure-framework/allure-php-api/zipball/13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80", + "reference": "13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80", "shasum": "" }, "require": { - "jms/serializer": "^1 | ^2 | ^3", - "php": ">=7.1.3", - "ramsey/uuid": "^3 | ^4", - "symfony/mime": "^4.3 | ^5" + "jms/serializer": "^0.16 || ^1.0", + "php": ">=5.4.0", + "ramsey/uuid": "^3.0 || ^4.0", + "symfony/http-foundation": "^2.0 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "phpunit/phpunit": "^7 | ^8 | ^9" + "phpunit/phpunit": "^4.0.0" }, "type": "library", "autoload": { @@ -9089,7 +9160,7 @@ "role": "Developer" } ], - "description": "Allure PHP commons", + "description": "PHP API for Allure adapter", "homepage": "http://allure.qatools.ru/", "keywords": [ "allure", @@ -9098,24 +9169,24 @@ "report" ], "support": { - "email": "allure@qameta.io", + "email": "allure@yandex-team.ru", "issues": "https://github.com/allure-framework/allure-php-api/issues", "source": "https://github.com/allure-framework/allure-php-api" }, - "time": "2021-11-15T13:15:20+00:00" + "time": "2020-11-26T09:20:44+00:00" }, { "name": "allure-framework/allure-php-commons", - "version": "v2.0.0", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-commons2.git", - "reference": "946e375e90cce9e43d1622890fb5a312ec8086bb" + "reference": "80da4fb04a97d8129976a6b53e36b263d1aed661" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-commons2/zipball/946e375e90cce9e43d1622890fb5a312ec8086bb", - "reference": "946e375e90cce9e43d1622890fb5a312ec8086bb", + "url": "https://api.github.com/repos/allure-framework/allure-php-commons2/zipball/80da4fb04a97d8129976a6b53e36b263d1aed661", + "reference": "80da4fb04a97d8129976a6b53e36b263d1aed661", "shasum": "" }, "require": { @@ -9131,7 +9202,7 @@ "require-dev": { "jetbrains/phpstorm-attributes": "^1", "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.16.1", + "psalm/plugin-phpunit": "^0.18.4", "squizlabs/php_codesniffer": "^3.6.2", "vimeo/psalm": "^4.15" }, @@ -9172,7 +9243,7 @@ "issues": "https://github.com/allure-framework/allure-php-commons2/issues", "source": "https://github.com/allure-framework/allure-php-commons" }, - "time": "2021-12-28T12:03:10+00:00" + "time": "2023-01-10T10:03:28+00:00" }, { "name": "allure-framework/allure-phpunit", @@ -9374,16 +9445,16 @@ }, { "name": "codeception/codeception", - "version": "4.1.31", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5" + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/15524571ae0686a7facc2eb1f40f600e5bbce9e5", - "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b88014f3348c93f3df99dc6d0967b0dbfa804474", + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474", "shasum": "" }, "require": { @@ -9446,11 +9517,11 @@ { "name": "Michael Bodnarchuk", "email": "davert@mail.ua", - "homepage": "http://codegyre.com" + "homepage": "https://codegyre.com" } ], "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", + "homepage": "https://codeception.com/", "keywords": [ "BDD", "TDD", @@ -9460,7 +9531,7 @@ ], "support": { "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/4.1.31" + "source": "https://github.com/Codeception/Codeception/tree/4.2.2" }, "funding": [ { @@ -9468,7 +9539,7 @@ "type": "open_collective" } ], - "time": "2022-03-13T17:07:08+00:00" + "time": "2022-08-13T13:28:25+00:00" }, { "name": "codeception/lib-asserts", @@ -9627,16 +9698,16 @@ }, { "name": "codeception/module-webdriver", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151" + "reference": "e22ac7da756df659df6dd4fac2dff9c859e30131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/baa18b7bf70aa024012f967b5ce5021e1faa9151", - "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/e22ac7da756df659df6dd4fac2dff9c859e30131", + "reference": "e22ac7da756df659df6dd4fac2dff9c859e30131", "shasum": "" }, "require": { @@ -9677,9 +9748,9 @@ ], "support": { "issues": "https://github.com/Codeception/module-webdriver/issues", - "source": "https://github.com/Codeception/module-webdriver/tree/1.4.0" + "source": "https://github.com/Codeception/module-webdriver/tree/1.4.1" }, - "time": "2021-09-02T12:01:02+00:00" + "time": "2022-09-12T05:09:51+00:00" }, { "name": "codeception/phpunit-wrapper", @@ -9960,30 +10031,34 @@ }, { "name": "doctrine/annotations", - "version": "1.13.2", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", + "doctrine/lexer": "^1 || ^2", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" }, "type": "library", "autoload": { @@ -10026,63 +10101,106 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" + "source": "https://github.com/doctrine/annotations/tree/1.14.2" }, - "time": "2021-08-05T19:00:23+00:00" + "time": "2022-12-15T06:48:22+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.4.1", + "name": "doctrine/deprecations", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.1|^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "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.22" + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^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" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", "instantiate" ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -10098,35 +10216,37 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -10158,7 +10278,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -10174,7 +10294,7 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -10267,38 +10387,33 @@ }, { "name": "jms/metadata", - "version": "2.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" + "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/e5854ab1aa643623dc64adde718a8eec32b957a8", + "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": ">=5.3.0" }, "require-dev": { - "doctrine/cache": "^1.0", - "doctrine/coding-standard": "^8.0", - "mikey179/vfsstream": "^1.6.7", - "phpunit/phpunit": "^8.5|^9.0", - "psr/container": "^1.0", - "symfony/cache": "^3.1|^4.0|^5.0", - "symfony/dependency-injection": "^3.1|^4.0|^5.0" + "doctrine/cache": "~1.0", + "symfony/cache": "~3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { - "psr-4": { + "psr-0": { "Metadata\\": "src/" } }, @@ -10307,13 +10422,13 @@ "MIT" ], "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, { "name": "Asmir Mustafic", "email": "goetas@gmail.com" + }, + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Class/method/property metadata management in PHP", @@ -10325,81 +10440,121 @@ ], "support": { "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" + "source": "https://github.com/schmittjoh/metadata/tree/1.x" + }, + "time": "2018-10-26T12:40:10+00:00" + }, + { + "name": "jms/parser-lib", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/parser-lib.git", + "reference": "4f45952f9fa97d67adc5dd69e7d622fc89a7675d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/4f45952f9fa97d67adc5dd69e7d622fc89a7675d", + "reference": "4f45952f9fa97d67adc5dd69e7d622fc89a7675d", + "shasum": "" + }, + "require": { + "phpoption/phpoption": ">=0.9,<2.0-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-0": { + "JMS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "description": "A library for easily creating recursive-descent parsers.", + "support": { + "issues": "https://github.com/schmittjoh/parser-lib/issues", + "source": "https://github.com/schmittjoh/parser-lib/tree/1.0.1" }, - "time": "2021-11-22T12:27:42+00:00" + "time": "2022-03-19T09:24:56+00:00" }, { "name": "jms/serializer", - "version": "3.17.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "190f64b051795d447ec755acbfdb1bff330a6707" + "reference": "62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/190f64b051795d447ec755acbfdb1bff330a6707", - "reference": "190f64b051795d447ec755acbfdb1bff330a6707", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a", + "reference": "62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a", "shasum": "" }, "require": { - "doctrine/annotations": "^1.13", + "doctrine/annotations": "^1.0", "doctrine/instantiator": "^1.0.3", - "doctrine/lexer": "^1.1", - "jms/metadata": "^2.6", - "php": "^7.2||^8.0", - "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" + "jms/metadata": "~1.1", + "jms/parser-lib": "1.*", + "php": ">=5.5.0", + "phpcollection/phpcollection": "~0.1", + "phpoption/phpoption": "^1.1" + }, + "conflict": { + "jms/serializer-bundle": "<1.2.1", + "twig/twig": "<1.12" }, "require-dev": { - "doctrine/coding-standard": "^8.1", "doctrine/orm": "~2.1", - "doctrine/persistence": "^1.3.3|^2.0|^3.0", "doctrine/phpcr-odm": "^1.3|^2.0", "ext-pdo_sqlite": "*", "jackalope/jackalope-doctrine-dbal": "^1.1.5", - "ocramius/proxy-manager": "^1.0|^2.0", - "phpbench/phpbench": "^1.0", - "phpstan/phpstan": "^1.0.2", - "phpunit/phpunit": "^8.5.21||^9.0", + "phpunit/phpunit": "^4.8|^5.0", + "propel/propel1": "~1.7", "psr/container": "^1.0", - "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", - "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", - "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", - "symfony/form": "^3.0|^4.0|^5.0|^6.0", - "symfony/translation": "^3.0|^4.0|^5.0|^6.0", - "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", - "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", - "twig/twig": "~1.34|~2.4|^3.0" + "symfony/dependency-injection": "^2.7|^3.3|^4.0", + "symfony/expression-language": "^2.6|^3.0", + "symfony/filesystem": "^2.1", + "symfony/form": "~2.1|^3.0", + "symfony/translation": "^2.1|^3.0", + "symfony/validator": "^2.2|^3.0", + "symfony/yaml": "^2.1|^3.0", + "twig/twig": "~1.12|~2.0" }, "suggest": { + "doctrine/cache": "Required if you like to use cache functionality.", "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", - "symfony/cache": "Required if you like to use cache functionality.", - "symfony/yaml": "Required if you'd like to use the YAML metadata format." + "symfony/yaml": "Required if you'd like to serialize data to YAML format." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "1.10-dev" } }, "autoload": { - "psr-4": { - "JMS\\Serializer\\": "src/" + "psr-0": { + "JMS\\Serializer": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, { "name": "Asmir Mustafic", "email": "goetas@gmail.com" + }, + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -10413,28 +10568,22 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.17.1" + "source": "https://github.com/schmittjoh/serializer/tree/master" }, - "funding": [ - { - "url": "https://github.com/goetas", - "type": "github" - } - ], - "time": "2021-12-28T20:59:55+00:00" + "time": "2017-11-30T18:23:40+00:00" }, { "name": "laminas/laminas-diactoros", - "version": "2.23.0", + "version": "2.24.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c" + "reference": "6028af6c3b5ced4d063a680d2483cce67578b902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/a738cecb420e3bcff34c33177f1ce9f68902695c", - "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6028af6c3b5ced4d063a680d2483cce67578b902", + "reference": "6028af6c3b5ced4d063a680d2483cce67578b902", "shasum": "" }, "require": { @@ -10457,9 +10606,9 @@ "http-interop/http-factory-tests": "^0.9.0", "laminas/laminas-coding-standard": "^2.4.0", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.4" }, "type": "library", "extra": { @@ -10518,7 +10667,7 @@ "type": "community_bridge" } ], - "time": "2022-12-14T22:31:50+00:00" + "time": "2022-12-20T12:22:40+00:00" }, { "name": "lusitanian/oauth", @@ -10593,64 +10742,75 @@ }, { "name": "magento/magento-coding-standard", - "version": "29", + "version": "dev-Hammer_246_PHP82_Fixes", "source": { "type": "git", - "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" + "url": "git@github.com:magento-gl/magento-coding-standard.git", + "reference": "98baf779b32d1b3c1e1e09fb78b12fa4c437e002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "url": "https://api.github.com/repos/magento-gl/magento-coding-standard/zipball/98baf779b32d1b3c1e1e09fb78b12fa4c437e002", + "reference": "98baf779b32d1b3c1e1e09fb78b12fa4c437e002", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": ">=7.3", + "php": ">=7.4", "phpcompatibility/php-compatibility": "^9.3", "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", - "webonyx/graphql-php": "^14.9" + "webonyx/graphql-php": "^15.0" }, "require-dev": { "phpunit/phpunit": "^9.5.8" }, "type": "phpcodesniffer-standard", "autoload": { + "classmap": [ + "PHP_CodeSniffer/Tokenizers/" + ], "psr-4": { "Magento2\\": "Magento2/", "Magento2Framework\\": "Magento2Framework/" - }, - "classmap": [ - "PHP_CodeSniffer/Tokenizers/" + } + }, + "autoload-dev": { + "files": [ + "PHP_CodeSniffer/Tests/Standards/AbstractSniffUnitTest.php" + ] + }, + "scripts": { + "post-install-cmd": [ + "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility" + ], + "post-update-cmd": [ + "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility" ] }, - "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { - "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v29" + "source": "https://github.com/magento-gl/magento-coding-standard/tree/Hammer_246_PHP82_Fixes" }, - "time": "2022-12-21T18:10:47+00:00" + "time": "2023-01-11T10:40:29+00:00" }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.0.0", + "version": "dev-Hammer_246_PHP82_Fixes", "source": { "type": "git", - "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "34033242272420e057dab004cf884144c8416f8f" + "url": "git@github.com:magento-gl/magento2-functional-testing-framework.git", + "reference": "e7dab6f703d720c4a08282de3b409cdb24c34da7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34033242272420e057dab004cf884144c8416f8f", - "reference": "34033242272420e057dab004cf884144c8416f8f", + "url": "https://api.github.com/repos/magento-gl/magento2-functional-testing-framework/zipball/e7dab6f703d720c4a08282de3b409cdb24c34da7", + "reference": "e7dab6f703d720c4a08282de3b409cdb24c34da7", "shasum": "" }, "require": { @@ -10669,7 +10829,7 @@ "ext-intl": "*", "ext-json": "*", "ext-openssl": "*", - "guzzlehttp/guzzle": "^7.3.0", + "guzzlehttp/guzzle": "^7.5.0", "laminas/laminas-diactoros": "^2.8", "monolog/monolog": "^2.3", "mustache/mustache": "~2.5", @@ -10712,11 +10872,23 @@ "src/Magento/FunctionalTestingFramework/_bootstrap.php" ], "psr-4": { - "MFTF\\": "dev/tests/functional/tests/MFTF", - "Magento\\FunctionalTestingFramework\\": "src/Magento/FunctionalTestingFramework" + "Magento\\FunctionalTestingFramework\\": "src/Magento/FunctionalTestingFramework", + "MFTF\\": "dev/tests/functional/tests/MFTF" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "tests\\": "dev/tests" + } + }, + "scripts": { + "tests": [ + "bin/phpunit-checks" + ], + "static": [ + "bin/static-checks" + ] + }, "license": [ "AGPL-3.0" ], @@ -10728,23 +10900,22 @@ "testing" ], "support": { - "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.0" + "source": "https://github.com/magento-gl/magento2-functional-testing-framework/tree/Hammer_246_PHP82_Fixes" }, - "time": "2022-12-12T15:31:43+00:00" + "time": "2023-01-11T11:00:38+00:00" }, { "name": "mustache/mustache", - "version": "v2.14.1", + "version": "v2.14.2", "source": { "type": "git", "url": "https://github.com/bobthecow/mustache.php.git", - "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e" + "reference": "e62b7c3849d22ec55f3ec425507bf7968193a6cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/579ffa5c96e1d292c060b3dd62811ff01ad8c24e", - "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e", + "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e62b7c3849d22ec55f3ec425507bf7968193a6cb", + "reference": "e62b7c3849d22ec55f3ec425507bf7968193a6cb", "shasum": "" }, "require": { @@ -10779,9 +10950,9 @@ ], "support": { "issues": "https://github.com/bobthecow/mustache.php/issues", - "source": "https://github.com/bobthecow/mustache.php/tree/v2.14.1" + "source": "https://github.com/bobthecow/mustache.php/tree/v2.14.2" }, - "time": "2022-01-21T06:08:36+00:00" + "time": "2022-08-23T13:07:01+00:00" }, { "name": "myclabs/deep-copy", @@ -11065,16 +11236,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.12.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a" + "reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/b27ddf458d273c7d4602106fcaf978aa0b7fe15a", - "reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/6dfe5f814b796c1b5748850aa19f781b9274c36c", + "reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c", "shasum": "" }, "require": { @@ -11124,9 +11295,64 @@ ], "support": { "issues": "https://github.com/php-webdriver/php-webdriver/issues", - "source": "https://github.com/php-webdriver/php-webdriver/tree/1.12.1" + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.13.1" }, - "time": "2022-05-03T12:16:34+00:00" + "time": "2022-10-11T11:49:44+00:00" + }, + { + "name": "phpcollection/phpcollection", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-collection.git", + "reference": "56d18c8c2c0400f2838703246ac7de919a605763" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/56d18c8c2c0400f2838703246ac7de919a605763", + "reference": "56d18c8c2c0400f2838703246ac7de919a605763", + "shasum": "" + }, + "require": { + "phpoption/phpoption": "1.*" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-0": { + "PhpCollection": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "General-Purpose Collection Library for PHP", + "keywords": [ + "collection", + "list", + "map", + "sequence", + "set" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-collection/issues", + "source": "https://github.com/schmittjoh/php-collection/tree/0.6.0" + }, + "time": "2022-03-21T13:02:41+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -11190,166 +11416,6 @@ }, "time": "2019-12-27T09:44:58+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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" - }, - "time": "2022-03-15T21:29:03+00:00" - }, { "name": "phpmd/phpmd", "version": "2.13.0", @@ -11434,128 +11500,92 @@ "time": "2022-09-10T08:44:15+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.16.0", + "name": "phpoption/phpoption", + "version": "1.9.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Option Type for PHP", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "language", + "option", + "php", + "type" ], "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" - }, - "time": "2022-11-29T15:06:56+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "981cc368a216c988e862a75e526b6076987d1b50" + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", - "reference": "981cc368a216c988e862a75e526b6076987d1b50", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" - }, - "time": "2022-05-05T11:32:40+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "phpstan/phpstan", - "version": "1.9.4", + "version": "1.9.9", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" + "reference": "f68d7cc3d0638a01bc6321cb826e4cae7fa6884d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f68d7cc3d0638a01bc6321cb826e4cae7fa6884d", + "reference": "f68d7cc3d0638a01bc6321cb826e4cae7fa6884d", "shasum": "" }, "require": { @@ -11585,7 +11615,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.4" + "source": "https://github.com/phpstan/phpstan/tree/1.9.9" }, "funding": [ { @@ -11601,27 +11631,27 @@ "type": "tidelift" } ], - "time": "2022-12-17T13:33:52+00:00" + "time": "2023-01-11T14:39:22+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -11670,7 +11700,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" }, "funding": [ { @@ -11678,7 +11708,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-12-28T12:41:10+00:00" }, { "name": "phpunit/php-file-iterator", @@ -11923,16 +11953,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.20", + "version": "9.5.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", "shasum": "" }, "require": { @@ -11947,7 +11977,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -11955,20 +11984,16 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -12010,7 +12035,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" }, "funding": [ { @@ -12020,9 +12045,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-04-01T12:37:26+00:00" + "time": "2022-12-09T07:31:23+00:00" }, { "name": "psr/cache", @@ -12299,16 +12328,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -12361,7 +12390,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -12369,7 +12398,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -12559,16 +12588,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -12624,7 +12653,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -12632,7 +12661,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -13048,16 +13077,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -13069,7 +13098,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -13092,7 +13121,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -13100,7 +13129,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -13359,16 +13388,16 @@ }, { "name": "symfony/mime", - "version": "v5.4.10", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc" + "reference": "2a83d82efc91c3f03a23c8b47a896df168aa5c63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/02265e1e5111c3cd7480387af25e82378b7ab9cc", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc", + "url": "https://api.github.com/repos/symfony/mime/zipball/2a83d82efc91c3f03a23c8b47a896df168aa5c63", + "reference": "2a83d82efc91c3f03a23c8b47a896df168aa5c63", "shasum": "" }, "require": { @@ -13382,7 +13411,8 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<4.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", @@ -13390,7 +13420,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.2|^6.0" + "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" }, "type": "library", "autoload": { @@ -13422,7 +13452,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.10" + "source": "https://github.com/symfony/mime/tree/v5.4.17" }, "funding": [ { @@ -13438,7 +13468,7 @@ "type": "tidelift" } ], - "time": "2022-06-09T12:22:40+00:00" + "time": "2022-12-13T09:59:55+00:00" }, { "name": "symfony/options-resolver", @@ -13507,7 +13537,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-11-02T09:08:04+00:00" }, { "name": "symfony/stopwatch", @@ -13573,28 +13603,28 @@ }, { "name": "symfony/yaml", - "version": "v5.3.14", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c441e9d2e340642ac8b951b753dea962d55b669d" + "reference": "edcdc11498108f8967fe95118a7ec8624b94760e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c441e9d2e340642ac8b951b753dea962d55b669d", - "reference": "c441e9d2e340642ac8b951b753dea962d55b669d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/edcdc11498108f8967fe95118a7ec8624b94760e", + "reference": "edcdc11498108f8967fe95118a7ec8624b94760e", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -13628,7 +13658,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.14" + "source": "https://github.com/symfony/yaml/tree/v5.4.17" }, "funding": [ { @@ -13644,43 +13674,50 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:05:39+00:00" + "time": "2022-12-13T09:57:04+00:00" }, { "name": "thecodingmachine/safe", - "version": "v1.3.3", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/safe.git", - "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" + "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", - "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/e788f3d09dcd36f806350aedb77eac348fafadd3", + "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3", "shasum": "" }, "require": { - "php": ">=7.2" + "php": "^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3.2", - "thecodingmachine/phpstan-strict-rules": "^0.12" + "thecodingmachine/phpstan-strict-rules": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { "files": [ "deprecated/apc.php", + "deprecated/array.php", + "deprecated/datetime.php", "deprecated/libevent.php", + "deprecated/misc.php", + "deprecated/password.php", "deprecated/mssql.php", "deprecated/stats.php", + "deprecated/strings.php", "lib/special_cases.php", + "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", "generated/array.php", @@ -13701,6 +13738,7 @@ "generated/fpm.php", "generated/ftp.php", "generated/funchand.php", + "generated/gettext.php", "generated/gmp.php", "generated/gnupg.php", "generated/hash.php", @@ -13710,7 +13748,6 @@ "generated/image.php", "generated/imap.php", "generated/info.php", - "generated/ingres-ii.php", "generated/inotify.php", "generated/json.php", "generated/ldap.php", @@ -13719,20 +13756,14 @@ "generated/mailparse.php", "generated/mbstring.php", "generated/misc.php", - "generated/msql.php", "generated/mysql.php", - "generated/mysqli.php", - "generated/mysqlndMs.php", - "generated/mysqlndQc.php", "generated/network.php", "generated/oci8.php", "generated/opcache.php", "generated/openssl.php", "generated/outcontrol.php", - "generated/password.php", "generated/pcntl.php", "generated/pcre.php", - "generated/pdf.php", "generated/pgsql.php", "generated/posix.php", "generated/ps.php", @@ -13743,7 +13774,6 @@ "generated/sem.php", "generated/session.php", "generated/shmop.php", - "generated/simplexml.php", "generated/sockets.php", "generated/sodium.php", "generated/solr.php", @@ -13766,13 +13796,13 @@ "generated/zip.php", "generated/zlib.php" ], - "psr-4": { - "Safe\\": [ - "lib/", - "deprecated/", - "generated/" - ] - } + "classmap": [ + "lib/DateTime.php", + "lib/DateTimeImmutable.php", + "lib/Exceptions/", + "deprecated/Exceptions/", + "generated/Exceptions/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -13781,9 +13811,9 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { "issues": "https://github.com/thecodingmachine/safe/issues", - "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" + "source": "https://github.com/thecodingmachine/safe/tree/v2.4.0" }, - "time": "2020-10-28T17:51:34+00:00" + "time": "2022-10-07T14:02:17+00:00" }, { "name": "theseer/tokenizer", @@ -13881,7 +13911,9 @@ "minimum-stability": "stable", "stability-flags": { "magento/composer": 10, - "magento/magento-composer-installer": 10 + "magento/magento-composer-installer": 10, + "magento/magento-coding-standard": 20, + "magento/magento2-functional-testing-framework": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 56ed1d28bf0ab..76afc00400072 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -26,7 +26,7 @@ "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", "ezyang/htmlpurifier": "^4.14", - "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/guzzle": "^7.5", "laminas/laminas-code": "^4.5", "laminas/laminas-escaper": "^2.10", "laminas/laminas-file": "^2.11", @@ -50,7 +50,7 @@ "symfony/intl": "^5.4", "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", - "webonyx/graphql-php": "^14.11", + "webonyx/graphql-php": "^15", "wikimedia/less.php": "^3.2" }, "archive": { From a1bc557861569d425004373ba11415b048584549 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 12 Jan 2023 16:47:32 +0530 Subject: [PATCH 466/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/FloatType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/StringType.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index 15a6444999b2f..12f9047ea502a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public $name = "Magento_Boolean"; + public string $name = "Magento_Boolean"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php index 8e314891c6a67..c761a77d35f40 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php @@ -15,5 +15,5 @@ class FloatType extends \GraphQL\Type\Definition\FloatType implements InputTypeI /** * @var string */ - public $name = "Magento_Float"; + public string $name = "Magento_Float"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php index bf4a6af795a24..ef83eeeaa98a4 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php @@ -15,5 +15,5 @@ class IdType extends \GraphQL\Type\Definition\IDType implements InputTypeInterfa /** * @var string */ - public $name = "Magento_Id"; + public string $name = "Magento_Id"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php index fc9dc078deeda..1195b63be3ff9 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php @@ -15,5 +15,5 @@ class IntType extends \GraphQL\Type\Definition\IntType implements InputTypeInter /** * @var string */ - public $name = "Magento_Int"; + public string $name = "Magento_Int"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php index 653d13b214bfb..623090cf39b2c 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php @@ -15,5 +15,5 @@ class StringType extends \GraphQL\Type\Definition\StringType implements InputTyp /** * @var string */ - public $name = "Magento_String"; + public string $name = "Magento_String"; } From 9be81860f4e1cf68e41d1356d066d0c39dbb5373 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 12 Jan 2023 17:08:13 +0530 Subject: [PATCH 467/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../GraphQlReader/MetaReader/FieldMetaReader.php | 11 +++++++---- .../MetaReader/TypeMetaWrapperReader.php | 14 ++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php index 217a233eae20c..525b47c813c8d 100644 --- a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php +++ b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php @@ -7,6 +7,9 @@ namespace Magento\Framework\GraphQlSchemaStitching\GraphQlReader\MetaReader; +use GraphQL\Type\Definition\Argument; +use GraphQL\Type\Definition\InputType; + /** * Reads fields and possible arguments from a meta field */ @@ -117,14 +120,14 @@ public function read(\GraphQL\Type\Definition\FieldDefinition $fieldMeta) : arra /** * Get the argumentMetaType result array * - * @param \GraphQL\Type\Definition\InputType $typeMeta - * @param \GraphQL\Type\Definition\FieldArgument $argumentMeta + * @param InputType $typeMeta + * @param Argument $argumentMeta * @param array $result * @return array */ private function argumentMetaType( - \GraphQL\Type\Definition\InputType $typeMeta, - \GraphQL\Type\Definition\FieldArgument $argumentMeta, + InputType $typeMeta, + Argument $argumentMeta, $result ) : array { $argumentName = $argumentMeta->name; diff --git a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php index 78e3f28763385..18a90603a855c 100644 --- a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php +++ b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php @@ -7,16 +7,18 @@ namespace Magento\Framework\GraphQlSchemaStitching\GraphQlReader\MetaReader; +use GraphQL\Type\Definition\NonNull; + /** * Common cases for types that need extra formatting like wrapping or additional properties added to their definition */ class TypeMetaWrapperReader { - const ARGUMENT_PARAMETER = 'Argument'; + public const ARGUMENT_PARAMETER = 'Argument'; - const OUTPUT_FIELD_PARAMETER = 'OutputField'; + public const OUTPUT_FIELD_PARAMETER = 'OutputField'; - const INPUT_FIELD_PARAMETER = 'InputField'; + public const INPUT_FIELD_PARAMETER = 'InputField'; /** * Read from type meta data and determine wrapping types that are needed and extra properties that need to be added @@ -28,15 +30,15 @@ class TypeMetaWrapperReader public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType) : array { $result = []; - if ($meta instanceof \GraphQL\Type\Definition\NonNull) { + if ($meta instanceof NonNull) { $result['required'] = true; $meta = $meta->getWrappedType(); } else { $result['required'] = false; } if ($meta instanceof \GraphQL\Type\Definition\ListOfType) { - $itemTypeMeta = $meta->ofType; - if ($itemTypeMeta instanceof \GraphQL\Type\Definition\NonNull) { + $itemTypeMeta = $meta->getInnermostType(); + if ($itemTypeMeta instanceof NonNull) { $result['itemsRequired'] = true; $itemTypeMeta = $itemTypeMeta->getWrappedType(); } else { From 40af0bf2e581fabe05b1521ea7e0ad3f52f5e876 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Thu, 12 Jan 2023 17:10:06 +0530 Subject: [PATCH 468/985] Fixed - ACQE-4448 --- .../StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml index 220a5049932d0..b759a9281abaa 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest/StorefrontTaxQuoteCheckoutLoggedInVirtualTest.xml @@ -30,15 +30,16 @@ <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> <!-- Add NY and CA tax rules --> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate"> <argument name="taxCode" value="SimpleTaxNY"/> </actionGroup> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate"> <argument name="taxCode" value="SimpleTaxCA"/> </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/> <magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> </before> @@ -56,12 +57,12 @@ <!-- Delete the two tax rates that were created --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> From bffbd6ea2323e1cd3f2821babd27d26b4b0b4162 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Thu, 12 Jan 2023 18:18:46 +0530 Subject: [PATCH 469/985] AC-7600: UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline:: Updated test case id --- .../Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml index 8218b2885becf..8ba8db213be6d 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml @@ -11,8 +11,8 @@ <annotations> <features value="MediaGallery"/> <stories value="User deletes folder from Media Gallery"/> - <title value="User deletes folder from Media Gallery"/> - <testCaseId value="AC-6377"/> + <title value="User deletes folder from Media Gallery New"/> + <testCaseId value="AC-7600"/> <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> From c4349ad0d26adb845bc1e5d645906898e27a9926 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Thu, 12 Jan 2023 18:19:52 +0530 Subject: [PATCH 470/985] AC-7600: UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline:: Updated test case id --- .../Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml index 53fa880485650..d55914948edf4 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml @@ -11,8 +11,8 @@ <annotations> <features value="MediaGallery"/> <stories value="User deletes folder from Media Gallery"/> - <title value="User deletes folder from Media Gallery"/> - <testCaseId value="AC-6377"/> + <title value="User deletes folder from Media Gallery New"/> + <testCaseId value="AC-7600"/> <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> From de11f6a9f9d8f9cb339122177b439fd4990bc2ca Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 12 Jan 2023 18:36:14 +0530 Subject: [PATCH 471/985] AC-7422:Incompatible issues fix for PHP8.2 --- composer.lock | 1470 +++++++++++++++++++++++++------------------------ 1 file changed, 737 insertions(+), 733 deletions(-) diff --git a/composer.lock b/composer.lock index 571a0a5a55c28..cd23d9d4f85be 100644 --- a/composer.lock +++ b/composer.lock @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.256.2", + "version": "3.224.4", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "a72094f7d968bdc743839e309087d51f868ba26c" + "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a72094f7d968bdc743839e309087d51f868ba26c", - "reference": "a72094f7d968bdc743839e309087d51f868ba26c", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", + "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", "shasum": "" }, "require": { @@ -75,9 +75,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.8.5 || ^2.3", + "guzzlehttp/psr7": "^1.7.0 || ^2.1.1", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -85,8 +85,6 @@ "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", - "composer/composer": "^1.10.22", - "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -94,11 +92,10 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", + "phpunit/phpunit": "^4.8.35 || ^5.6.3", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3 || ^4.0", - "yoast/phpunit-polyfills": "^1.0" + "sebastian/comparator": "^1.2.3" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -146,32 +143,32 @@ "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.256.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.224.4" }, - "time": "2023-01-11T20:12:50+00:00" + "time": "2022-06-06T18:32:10+00:00" }, { "name": "brick/math", - "version": "0.10.2", + "version": "0.9.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.4 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "4.25.0" + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.9.2" }, "type": "library", "autoload": { @@ -196,15 +193,19 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.10.2" + "source": "https://github.com/brick/math/tree/0.9.3" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" } ], - "time": "2022-08-10T22:54:19+00:00" + "time": "2021-08-15T20:50:18+00:00" }, { "name": "brick/varexporter", @@ -419,16 +420,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.5", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd" + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd", - "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/69098eca243998b53eed7a48d82dedd28b447cd5", + "reference": "69098eca243998b53eed7a48d82dedd28b447cd5", "shasum": "" }, "require": { @@ -475,80 +476,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.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-01-11T08:27:00+00:00" - }, - { - "name": "composer/class-map-generator", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/class-map-generator.git", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", - "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", - "shasum": "" - }, - "require": { - "composer/pcre": "^2 || ^3", - "php": "^7.2 || ^8.0", - "symfony/finder": "^4.4 || ^5.3 || ^6" - }, - "require-dev": { - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/filesystem": "^5.4 || ^6", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\ClassMapGenerator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Utilities to scan PHP code and generate class maps.", - "keywords": [ - "classmap" - ], - "support": { - "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + "source": "https://github.com/composer/ca-bundle/tree/1.3.4" }, "funding": [ { @@ -564,52 +492,43 @@ "type": "tidelift" } ], - "time": "2022-06-19T11:31:27+00:00" + "time": "2022-10-12T12:08:29+00:00" }, { "name": "composer/composer", - "version": "2.5.1", + "version": "2.2.18", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "923278ad13e1621946eb76ab2882655d2cc396a4" + "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/923278ad13e1621946eb76ab2882655d2cc396a4", - "reference": "923278ad13e1621946eb76ab2882655d2cc396a4", + "url": "https://api.github.com/repos/composer/composer/zipball/84175907664ca8b73f73f4883e67e886dfefb9f5", + "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "composer/class-map-generator": "^1.0", "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2.1 || ^3.1", + "composer/pcre": "^1.0", "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.5.7", - "composer/xdebug-handler": "^2.0.2 || ^3.0.3", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^2.0 || ^3.0", "justinrainbow/json-schema": "^5.2.11", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0 || ^2.0", + "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.2", - "seld/signal-handler": "^2.0", - "symfony/console": "^5.4.11 || ^6.0.11", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/polyfill-php73": "^1.24", - "symfony/polyfill-php80": "^1.24", - "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4 || ^6.0" + "seld/phar-utils": "^1.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" }, "require-dev": { - "phpstan/phpstan": "^1.9.3", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.2.10", - "symfony/phpunit-bridge": "^6.0" + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -622,12 +541,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "phpstan": { - "includes": [ - "phpstan/rules.neon" - ] + "dev-main": "2.2-dev" } }, "autoload": { @@ -661,7 +575,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.5.1" + "source": "https://github.com/composer/composer/tree/2.2.18" }, "funding": [ { @@ -677,7 +591,7 @@ "type": "tidelift" } ], - "time": "2022-12-22T14:33:54+00:00" + "time": "2022-08-20T09:33:38+00:00" }, { "name": "composer/metadata-minifier", @@ -750,30 +664,30 @@ }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -801,7 +715,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/1.0.1" }, "funding": [ { @@ -817,7 +731,7 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2022-01-21T20:24:37+00:00" }, { "name": "composer/semver", @@ -5019,16 +4933,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -5069,9 +4983,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2022-11-12T15:38:23+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "opensearch-project/opensearch-php", @@ -5139,16 +5053,16 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/9229e15f2e6ba772f0c55dd6986c563b937170a8", + "reference": "9229e15f2e6ba772f0c55dd6986c563b937170a8", "shasum": "" }, "require": { @@ -5202,7 +5116,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-14T06:56:20+00:00" + "time": "2022-01-17T05:32:27+00:00" }, { "name": "paragonie/random_compat", @@ -5334,16 +5248,16 @@ }, { "name": "php-amqplib/php-amqplib", - "version": "v3.4.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "5c537cb724f2e181183c202e63f4303935344c5f" + "reference": "0bec5b392428e0ac3b3f34fbc4e02d706995833e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/5c537cb724f2e181183c202e63f4303935344c5f", - "reference": "5c537cb724f2e181183c202e63f4303935344c5f", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/0bec5b392428e0ac3b3f34fbc4e02d706995833e", + "reference": "0bec5b392428e0ac3b3f34fbc4e02d706995833e", "shasum": "" }, "require": { @@ -5409,9 +5323,9 @@ ], "support": { "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.4.0" + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.2.0" }, - "time": "2022-10-18T20:52:02+00:00" + "time": "2022-03-10T19:16:00+00:00" }, { "name": "phpseclib/mcrypt_compat", @@ -5483,16 +5397,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.18", + "version": "3.0.14", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da" + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f28693d38ba21bb0d9f0c411ee5dae2b178201da", - "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", "shasum": "" }, "require": { @@ -5504,7 +5418,6 @@ "phpunit/phpunit": "*" }, "suggest": { - "ext-dom": "Install the DOM extension to load XML formatted public keys.", "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", @@ -5573,7 +5486,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" }, "funding": [ { @@ -5589,7 +5502,7 @@ "type": "tidelift" } ], - "time": "2022-12-17T18:26:50+00:00" + "time": "2022-04-04T05:15:45+00:00" }, { "name": "psr/container", @@ -5943,24 +5856,106 @@ }, "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "ramsey/collection", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" + }, + "require-dev": { + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", + "fakerphp/faker": "^1.5", + "hamcrest/hamcrest-php": "^2", + "jangregor/phpstan-prophecy": "^0.8", + "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", + "phpunit/phpunit": "^8.5 || ^9", + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2021-10-10T03:01:02+00:00" + }, { "name": "ramsey/uuid", - "version": "4.7.2", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "008f6cea262fbb26139757e153b451fcd0ac179d" + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/008f6cea262fbb26139757e153b451fcd0ac179d", - "reference": "008f6cea262fbb26139757e153b451fcd0ac179d", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10", + "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "php": "^8.1" + "php": "^7.2 || ^8.0", + "ramsey/collection": "^1.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" }, "replace": { "rhumsaa/uuid": "self.version" @@ -5972,29 +5967,34 @@ "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.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.16.1", - "ramsey/composer-repl": "^1.4", - "slevomat/coding-standard": "^8.4", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.22" + "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", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "4.x-dev" + }, "captainhook": { "force-install": true } @@ -6019,7 +6019,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.2" + "source": "https://github.com/ramsey/uuid/tree/4.2.3" }, "funding": [ { @@ -6031,7 +6031,7 @@ "type": "tidelift" } ], - "time": "2023-01-12T01:45:14+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "react/promise", @@ -6274,67 +6274,6 @@ }, "time": "2022-08-31T10:31:18+00:00" }, - { - "name": "seld/signal-handler", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/signal-handler.git", - "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", - "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^8.5.23", - "psr/log": "^1 || ^2 || ^3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\Signal\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", - "keywords": [ - "posix", - "sigint", - "signal", - "sigterm", - "unix" - ], - "support": { - "issues": "https://github.com/Seldaek/signal-handler/issues", - "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" - }, - "time": "2022-07-20T18:31:45+00:00" - }, { "name": "spomky-labs/aes-key-wrap", "version": "v7.0.0", @@ -6492,16 +6431,16 @@ }, { "name": "symfony/console", - "version": "v5.4.17", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { @@ -6571,7 +6510,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.17" + "source": "https://github.com/symfony/console/tree/v5.4.16" }, "funding": [ { @@ -6587,20 +6526,20 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:15:31+00:00" + "time": "2022-11-25T14:09:27+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.17", + "version": "v5.4.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4" + "reference": "b0a190285cd95cb019237851205b8140ef6e368e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/052ef49b660f9ad2a3adb311c555c9bc11ba61f4", - "reference": "052ef49b660f9ad2a3adb311c555c9bc11ba61f4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b0a190285cd95cb019237851205b8140ef6e368e", + "reference": "b0a190285cd95cb019237851205b8140ef6e368e", "shasum": "" }, "require": { @@ -6637,7 +6576,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.17" + "source": "https://github.com/symfony/css-selector/tree/v5.4.3" }, "funding": [ { @@ -6653,7 +6592,7 @@ "type": "tidelift" } ], - "time": "2022-12-23T11:40:44+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/dependency-injection", @@ -6746,25 +6685,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -6793,7 +6732,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -6809,7 +6748,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/error-handler", @@ -6884,16 +6823,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.17", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9" + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", - "reference": "8e18a9d559eb8ebc2220588f1faa726a2fcd31c9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", "shasum": "" }, "require": { @@ -6949,7 +6888,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.17" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" }, "funding": [ { @@ -6965,20 +6904,20 @@ "type": "tidelift" } ], - "time": "2022-12-12T15:54:21+00:00" + "time": "2022-05-05T16:45:39+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.2.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", "shasum": "" }, "require": { @@ -6991,7 +6930,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -7028,7 +6967,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" }, "funding": [ { @@ -7044,7 +6983,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/filesystem", @@ -7108,20 +7047,20 @@ "type": "tidelift" } ], - "time": "2022-11-20T13:01:27+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { "name": "symfony/finder", - "version": "v5.4.17", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc" + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", - "reference": "40c08632019838dfb3350f18cf5563b8080055fc", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", "shasum": "" }, "require": { @@ -7155,7 +7094,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.17" + "source": "https://github.com/symfony/finder/tree/v5.4.11" }, "funding": [ { @@ -7171,20 +7110,20 @@ "type": "tidelift" } ], - "time": "2022-12-22T10:31:03+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.17", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b64a0e2df212d5849e4584cabff0cf09c5d6866a" + "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b64a0e2df212d5849e4584cabff0cf09c5d6866a", - "reference": "b64a0e2df212d5849e4584cabff0cf09c5d6866a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", "shasum": "" }, "require": { @@ -7196,11 +7135,8 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" + "symfony/mime": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -7231,7 +7167,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.17" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.10" }, "funding": [ { @@ -7247,7 +7183,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:23:03+00:00" + "time": "2022-06-19T13:13:40+00:00" }, { "name": "symfony/http-kernel", @@ -7614,16 +7550,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "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/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -7637,7 +7573,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7681,7 +7617,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.26.0" }, "funding": [ { @@ -7697,7 +7633,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -7868,16 +7804,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "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/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -7886,7 +7822,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7924,7 +7860,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" }, "funding": [ { @@ -7940,7 +7876,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", @@ -8106,16 +8042,16 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", "shasum": "" }, "require": { @@ -8124,7 +8060,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -8165,7 +8101,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" }, "funding": [ { @@ -8181,7 +8117,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", @@ -8330,16 +8266,16 @@ }, { "name": "symfony/string", - "version": "v5.4.17", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b" + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/55733a8664b8853b003e70251c58bc8cb2d82a6b", - "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", "shasum": "" }, "require": { @@ -8396,7 +8332,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.17" + "source": "https://github.com/symfony/string/tree/v5.4.15" }, "funding": [ { @@ -8412,7 +8348,7 @@ "type": "tidelift" } ], - "time": "2022-12-12T15:54:21+00:00" + "time": "2022-10-05T15:16:54+00:00" }, { "name": "symfony/var-dumper", @@ -8501,7 +8437,7 @@ "type": "tidelift" } ], - "time": "2022-12-22T17:55:15+00:00" + "time": "2022-05-21T10:24:18+00:00" }, { "name": "tedivm/jshrink", @@ -9063,24 +8999,29 @@ "packages-dev": [ { "name": "allure-framework/allure-codeception", - "version": "1.4.5", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-codeception.git", - "reference": "ac3d471902d2903856bbd0a95e7546788319ed22" + "reference": "a6156aef942a4e4de0add34a73d066a9458cefc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-codeception/zipball/ac3d471902d2903856bbd0a95e7546788319ed22", - "reference": "ac3d471902d2903856bbd0a95e7546788319ed22", + "url": "https://api.github.com/repos/allure-framework/allure-codeception/zipball/a6156aef942a4e4de0add34a73d066a9458cefc6", + "reference": "a6156aef942a4e4de0add34a73d066a9458cefc6", "shasum": "" }, "require": { - "allure-framework/allure-php-api": "~1.2.1", - "codeception/codeception": "^2.3|^3.0|^4.0", - "php": ">=5.6", - "symfony/filesystem": ">=2.6", - "symfony/finder": ">=2.6" + "allure-framework/allure-php-api": "^1.3", + "codeception/codeception": "^2.5 | ^3 | ^4", + "ext-json": "*", + "php": ">=7.1.3", + "symfony/filesystem": "^2.7 | ^3 | ^4 | ^5", + "symfony/finder": "^2.7 | ^3 | ^4 | ^5" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^7.2 | ^8 | ^9" }, "type": "library", "autoload": { @@ -9095,11 +9036,11 @@ "authors": [ { "name": "Ivan Krutov", - "email": "vania-pooh@yandex-team.ru", + "email": "vania-pooh@aerokube.com", "role": "Developer" } ], - "description": "A Codeception adapter for Allure report.", + "description": "Allure Codeception integration", "homepage": "http://allure.qatools.ru/", "keywords": [ "allure", @@ -9111,34 +9052,34 @@ "testing" ], "support": { - "email": "allure@yandex-team.ru", + "email": "allure@qameta.io", "issues": "https://github.com/allure-framework/allure-codeception/issues", "source": "https://github.com/allure-framework/allure-codeception" }, - "time": "2020-11-26T11:41:53+00:00" + "time": "2021-06-04T13:24:36+00:00" }, { "name": "allure-framework/allure-php-api", - "version": "1.2.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-api.git", - "reference": "13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80" + "reference": "50507f482d490f114054f2281cca487db47fa2bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-api/zipball/13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80", - "reference": "13ef45d83ce4f5ef70499ff87ed0c3d1c192ab80", + "url": "https://api.github.com/repos/allure-framework/allure-php-api/zipball/50507f482d490f114054f2281cca487db47fa2bd", + "reference": "50507f482d490f114054f2281cca487db47fa2bd", "shasum": "" }, "require": { - "jms/serializer": "^0.16 || ^1.0", - "php": ">=5.4.0", - "ramsey/uuid": "^3.0 || ^4.0", - "symfony/http-foundation": "^2.0 || ^3.0 || ^4.0 || ^5.0" + "jms/serializer": "^1 | ^2 | ^3", + "php": ">=7.1.3", + "ramsey/uuid": "^3 | ^4", + "symfony/mime": "^4.3 | ^5" }, "require-dev": { - "phpunit/phpunit": "^4.0.0" + "phpunit/phpunit": "^7 | ^8 | ^9" }, "type": "library", "autoload": { @@ -9160,7 +9101,7 @@ "role": "Developer" } ], - "description": "PHP API for Allure adapter", + "description": "Allure PHP commons", "homepage": "http://allure.qatools.ru/", "keywords": [ "allure", @@ -9169,24 +9110,24 @@ "report" ], "support": { - "email": "allure@yandex-team.ru", + "email": "allure@qameta.io", "issues": "https://github.com/allure-framework/allure-php-api/issues", "source": "https://github.com/allure-framework/allure-php-api" }, - "time": "2020-11-26T09:20:44+00:00" + "time": "2021-11-15T13:15:20+00:00" }, { "name": "allure-framework/allure-php-commons", - "version": "v2.1.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-commons2.git", - "reference": "80da4fb04a97d8129976a6b53e36b263d1aed661" + "reference": "946e375e90cce9e43d1622890fb5a312ec8086bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-commons2/zipball/80da4fb04a97d8129976a6b53e36b263d1aed661", - "reference": "80da4fb04a97d8129976a6b53e36b263d1aed661", + "url": "https://api.github.com/repos/allure-framework/allure-php-commons2/zipball/946e375e90cce9e43d1622890fb5a312ec8086bb", + "reference": "946e375e90cce9e43d1622890fb5a312ec8086bb", "shasum": "" }, "require": { @@ -9202,7 +9143,7 @@ "require-dev": { "jetbrains/phpstorm-attributes": "^1", "phpunit/phpunit": "^9.5.10", - "psalm/plugin-phpunit": "^0.18.4", + "psalm/plugin-phpunit": "^0.16.1", "squizlabs/php_codesniffer": "^3.6.2", "vimeo/psalm": "^4.15" }, @@ -9243,7 +9184,7 @@ "issues": "https://github.com/allure-framework/allure-php-commons2/issues", "source": "https://github.com/allure-framework/allure-php-commons" }, - "time": "2023-01-10T10:03:28+00:00" + "time": "2021-12-28T12:03:10+00:00" }, { "name": "allure-framework/allure-phpunit", @@ -9445,16 +9386,16 @@ }, { "name": "codeception/codeception", - "version": "4.2.2", + "version": "4.1.31", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474" + "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b88014f3348c93f3df99dc6d0967b0dbfa804474", - "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/15524571ae0686a7facc2eb1f40f600e5bbce9e5", + "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5", "shasum": "" }, "require": { @@ -9517,11 +9458,11 @@ { "name": "Michael Bodnarchuk", "email": "davert@mail.ua", - "homepage": "https://codegyre.com" + "homepage": "http://codegyre.com" } ], "description": "BDD-style testing framework", - "homepage": "https://codeception.com/", + "homepage": "http://codeception.com/", "keywords": [ "BDD", "TDD", @@ -9531,7 +9472,7 @@ ], "support": { "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/4.2.2" + "source": "https://github.com/Codeception/Codeception/tree/4.1.31" }, "funding": [ { @@ -9539,7 +9480,7 @@ "type": "open_collective" } ], - "time": "2022-08-13T13:28:25+00:00" + "time": "2022-03-13T17:07:08+00:00" }, { "name": "codeception/lib-asserts", @@ -9698,16 +9639,16 @@ }, { "name": "codeception/module-webdriver", - "version": "1.4.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "e22ac7da756df659df6dd4fac2dff9c859e30131" + "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/e22ac7da756df659df6dd4fac2dff9c859e30131", - "reference": "e22ac7da756df659df6dd4fac2dff9c859e30131", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/baa18b7bf70aa024012f967b5ce5021e1faa9151", + "reference": "baa18b7bf70aa024012f967b5ce5021e1faa9151", "shasum": "" }, "require": { @@ -9748,9 +9689,9 @@ ], "support": { "issues": "https://github.com/Codeception/module-webdriver/issues", - "source": "https://github.com/Codeception/module-webdriver/tree/1.4.1" + "source": "https://github.com/Codeception/module-webdriver/tree/1.4.0" }, - "time": "2022-09-12T05:09:51+00:00" + "time": "2021-09-02T12:01:02+00:00" }, { "name": "codeception/phpunit-wrapper", @@ -10031,34 +9972,30 @@ }, { "name": "doctrine/annotations", - "version": "1.14.2", + "version": "1.13.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b" + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b", - "reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", + "doctrine/lexer": "1.*", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "type": "library", "autoload": { @@ -10101,79 +10038,36 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.2" - }, - "time": "2022-12-15T06:48:22+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/annotations/tree/1.13.2" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2021-08-05T19:00:23+00:00" }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^9", "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" + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -10200,7 +10094,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/1.4.1" }, "funding": [ { @@ -10216,37 +10110,35 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "doctrine/lexer", - "version": "2.1.0", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", + "doctrine/coding-standard": "^9.0", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "vimeo/psalm": "^4.11" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -10278,7 +10170,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "source": "https://github.com/doctrine/lexer/tree/1.2.3" }, "funding": [ { @@ -10294,7 +10186,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2022-02-28T11:07:21+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -10387,33 +10279,38 @@ }, { "name": "jms/metadata", - "version": "1.7.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8" + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/e5854ab1aa643623dc64adde718a8eec32b957a8", - "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2|^8.0" }, "require-dev": { - "doctrine/cache": "~1.0", - "symfony/cache": "~3.1" + "doctrine/cache": "^1.0", + "doctrine/coding-standard": "^8.0", + "mikey179/vfsstream": "^1.6.7", + "phpunit/phpunit": "^8.5|^9.0", + "psr/container": "^1.0", + "symfony/cache": "^3.1|^4.0|^5.0", + "symfony/dependency-injection": "^3.1|^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Metadata\\": "src/" } }, @@ -10422,13 +10319,13 @@ "MIT" ], "authors": [ - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], "description": "Class/method/property metadata management in PHP", @@ -10440,121 +10337,81 @@ ], "support": { "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/1.x" + "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" }, - "time": "2018-10-26T12:40:10+00:00" - }, - { - "name": "jms/parser-lib", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/parser-lib.git", - "reference": "4f45952f9fa97d67adc5dd69e7d622fc89a7675d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/4f45952f9fa97d67adc5dd69e7d622fc89a7675d", - "reference": "4f45952f9fa97d67adc5dd69e7d622fc89a7675d", - "shasum": "" - }, - "require": { - "phpoption/phpoption": ">=0.9,<2.0-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "description": "A library for easily creating recursive-descent parsers.", - "support": { - "issues": "https://github.com/schmittjoh/parser-lib/issues", - "source": "https://github.com/schmittjoh/parser-lib/tree/1.0.1" - }, - "time": "2022-03-19T09:24:56+00:00" + "time": "2021-11-22T12:27:42+00:00" }, { "name": "jms/serializer", - "version": "1.10.0", + "version": "3.17.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a" + "reference": "190f64b051795d447ec755acbfdb1bff330a6707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a", - "reference": "62c7ff6d61f8692eac8be024c542b3d9d0ab8c8a", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/190f64b051795d447ec755acbfdb1bff330a6707", + "reference": "190f64b051795d447ec755acbfdb1bff330a6707", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", + "doctrine/annotations": "^1.13", "doctrine/instantiator": "^1.0.3", - "jms/metadata": "~1.1", - "jms/parser-lib": "1.*", - "php": ">=5.5.0", - "phpcollection/phpcollection": "~0.1", - "phpoption/phpoption": "^1.1" - }, - "conflict": { - "jms/serializer-bundle": "<1.2.1", - "twig/twig": "<1.12" + "doctrine/lexer": "^1.1", + "jms/metadata": "^2.6", + "php": "^7.2||^8.0", + "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" }, "require-dev": { + "doctrine/coding-standard": "^8.1", "doctrine/orm": "~2.1", + "doctrine/persistence": "^1.3.3|^2.0|^3.0", "doctrine/phpcr-odm": "^1.3|^2.0", "ext-pdo_sqlite": "*", "jackalope/jackalope-doctrine-dbal": "^1.1.5", - "phpunit/phpunit": "^4.8|^5.0", - "propel/propel1": "~1.7", + "ocramius/proxy-manager": "^1.0|^2.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "^1.0.2", + "phpunit/phpunit": "^8.5.21||^9.0", "psr/container": "^1.0", - "symfony/dependency-injection": "^2.7|^3.3|^4.0", - "symfony/expression-language": "^2.6|^3.0", - "symfony/filesystem": "^2.1", - "symfony/form": "~2.1|^3.0", - "symfony/translation": "^2.1|^3.0", - "symfony/validator": "^2.2|^3.0", - "symfony/yaml": "^2.1|^3.0", - "twig/twig": "~1.12|~2.0" + "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", + "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", + "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", + "symfony/form": "^3.0|^4.0|^5.0|^6.0", + "symfony/translation": "^3.0|^4.0|^5.0|^6.0", + "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", + "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", + "twig/twig": "~1.34|~2.4|^3.0" }, "suggest": { - "doctrine/cache": "Required if you like to use cache functionality.", "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", - "symfony/yaml": "Required if you'd like to serialize data to YAML format." + "symfony/cache": "Required if you like to use cache functionality.", + "symfony/yaml": "Required if you'd like to use the YAML metadata format." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10-dev" + "dev-master": "3.x-dev" } }, "autoload": { - "psr-0": { - "JMS\\Serializer": "src/" + "psr-4": { + "JMS\\Serializer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -10568,22 +10425,28 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/master" + "source": "https://github.com/schmittjoh/serializer/tree/3.17.1" }, - "time": "2017-11-30T18:23:40+00:00" + "funding": [ + { + "url": "https://github.com/goetas", + "type": "github" + } + ], + "time": "2021-12-28T20:59:55+00:00" }, { "name": "laminas/laminas-diactoros", - "version": "2.24.0", + "version": "2.23.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902" + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6028af6c3b5ced4d063a680d2483cce67578b902", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/a738cecb420e3bcff34c33177f1ce9f68902695c", + "reference": "a738cecb420e3bcff34c33177f1ce9f68902695c", "shasum": "" }, "require": { @@ -10606,9 +10469,9 @@ "http-interop/http-factory-tests": "^0.9.0", "laminas/laminas-coding-standard": "^2.4.0", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.27", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "extra": { @@ -10667,7 +10530,7 @@ "type": "community_bridge" } ], - "time": "2022-12-20T12:22:40+00:00" + "time": "2022-12-14T22:31:50+00:00" }, { "name": "lusitanian/oauth", @@ -10906,16 +10769,16 @@ }, { "name": "mustache/mustache", - "version": "v2.14.2", + "version": "v2.14.1", "source": { "type": "git", "url": "https://github.com/bobthecow/mustache.php.git", - "reference": "e62b7c3849d22ec55f3ec425507bf7968193a6cb" + "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e62b7c3849d22ec55f3ec425507bf7968193a6cb", - "reference": "e62b7c3849d22ec55f3ec425507bf7968193a6cb", + "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/579ffa5c96e1d292c060b3dd62811ff01ad8c24e", + "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e", "shasum": "" }, "require": { @@ -10950,9 +10813,9 @@ ], "support": { "issues": "https://github.com/bobthecow/mustache.php/issues", - "source": "https://github.com/bobthecow/mustache.php/tree/v2.14.2" + "source": "https://github.com/bobthecow/mustache.php/tree/v2.14.1" }, - "time": "2022-08-23T13:07:01+00:00" + "time": "2022-01-21T06:08:36+00:00" }, { "name": "myclabs/deep-copy", @@ -11236,16 +11099,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.13.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c" + "reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/6dfe5f814b796c1b5748850aa19f781b9274c36c", - "reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/b27ddf458d273c7d4602106fcaf978aa0b7fe15a", + "reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a", "shasum": "" }, "require": { @@ -11295,64 +11158,9 @@ ], "support": { "issues": "https://github.com/php-webdriver/php-webdriver/issues", - "source": "https://github.com/php-webdriver/php-webdriver/tree/1.13.1" - }, - "time": "2022-10-11T11:49:44+00:00" - }, - { - "name": "phpcollection/phpcollection", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "56d18c8c2c0400f2838703246ac7de919a605763" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/56d18c8c2c0400f2838703246ac7de919a605763", - "reference": "56d18c8c2c0400f2838703246ac7de919a605763", - "shasum": "" - }, - "require": { - "phpoption/phpoption": "1.*" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, - "autoload": { - "psr-0": { - "PhpCollection": "src/" - } + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.12.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "General-Purpose Collection Library for PHP", - "keywords": [ - "collection", - "list", - "map", - "sequence", - "set" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-collection/issues", - "source": "https://github.com/schmittjoh/php-collection/tree/0.6.0" - }, - "time": "2022-03-21T13:02:41+00:00" + "time": "2022-05-03T12:16:34+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -11416,6 +11224,166 @@ }, "time": "2019-12-27T09:44:58+00:00" }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "77a32518733312af16a44300404e945338981de3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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" + }, + "time": "2022-03-15T21:29:03+00:00" + }, { "name": "phpmd/phpmd", "version": "2.13.0", @@ -11500,79 +11468,115 @@ "time": "2022-09-10T08:44:15+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.9.0", + "name": "phpspec/prophecy", + "version": "v1.16.0", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": true - }, "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "PhpOption\\": "src/PhpOption/" + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" }, { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Option Type for PHP", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", "keywords": [ - "language", - "option", - "php", - "type" + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" ], "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" + "time": "2022-11-29T15:06:56+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "981cc368a216c988e862a75e526b6076987d1b50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", + "reference": "981cc368a216c988e862a75e526b6076987d1b50", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2022-07-30T15:51:26+00:00" + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" + }, + "time": "2022-05-05T11:32:40+00:00" }, { "name": "phpstan/phpstan", @@ -11635,23 +11639,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -11700,7 +11704,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -11708,7 +11712,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -11953,16 +11957,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.27", + "version": "9.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", "shasum": "" }, "require": { @@ -11977,6 +11981,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -11984,16 +11989,20 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", + "sebastian/comparator": "^4.0.5", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", + "sebastian/exporter": "^4.0.3", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/type": "^3.0", "sebastian/version": "^3.0.2" }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -12035,7 +12044,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" }, "funding": [ { @@ -12045,13 +12054,9 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" } ], - "time": "2022-12-09T07:31:23+00:00" + "time": "2022-04-01T12:37:26+00:00" }, { "name": "psr/cache", @@ -12328,16 +12333,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { @@ -12390,7 +12395,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" }, "funding": [ { @@ -12398,7 +12403,7 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2020-10-26T15:49:45+00:00" }, { "name": "sebastian/complexity", @@ -12588,16 +12593,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -12653,7 +12658,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -12661,7 +12666,7 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", @@ -13077,16 +13082,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "shasum": "" }, "require": { @@ -13098,7 +13103,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -13121,7 +13126,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" }, "funding": [ { @@ -13129,7 +13134,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", @@ -13388,16 +13393,16 @@ }, { "name": "symfony/mime", - "version": "v5.4.17", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2a83d82efc91c3f03a23c8b47a896df168aa5c63" + "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2a83d82efc91c3f03a23c8b47a896df168aa5c63", - "reference": "2a83d82efc91c3f03a23c8b47a896df168aa5c63", + "url": "https://api.github.com/repos/symfony/mime/zipball/02265e1e5111c3cd7480387af25e82378b7ab9cc", + "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc", "shasum": "" }, "require": { @@ -13411,8 +13416,7 @@ "egulias/email-validator": "~3.0.0", "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/mailer": "<4.4" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1", @@ -13420,7 +13424,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.2|^6.0" }, "type": "library", "autoload": { @@ -13452,7 +13456,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.17" + "source": "https://github.com/symfony/mime/tree/v5.4.10" }, "funding": [ { @@ -13468,7 +13472,7 @@ "type": "tidelift" } ], - "time": "2022-12-13T09:59:55+00:00" + "time": "2022-06-09T12:22:40+00:00" }, { "name": "symfony/options-resolver", @@ -13537,7 +13541,7 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/stopwatch", @@ -13603,28 +13607,28 @@ }, { "name": "symfony/yaml", - "version": "v5.4.17", + "version": "v5.3.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "edcdc11498108f8967fe95118a7ec8624b94760e" + "reference": "c441e9d2e340642ac8b951b753dea962d55b669d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/edcdc11498108f8967fe95118a7ec8624b94760e", - "reference": "edcdc11498108f8967fe95118a7ec8624b94760e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c441e9d2e340642ac8b951b753dea962d55b669d", + "reference": "c441e9d2e340642ac8b951b753dea962d55b669d", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/console": "<5.3" + "symfony/console": "<4.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0" + "symfony/console": "^4.4|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -13658,7 +13662,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.17" + "source": "https://github.com/symfony/yaml/tree/v5.3.14" }, "funding": [ { @@ -13674,50 +13678,43 @@ "type": "tidelift" } ], - "time": "2022-12-13T09:57:04+00:00" + "time": "2022-01-26T16:05:39+00:00" }, { "name": "thecodingmachine/safe", - "version": "v2.4.0", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/thecodingmachine/safe.git", - "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3" + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/e788f3d09dcd36f806350aedb77eac348fafadd3", - "reference": "e788f3d09dcd36f806350aedb77eac348fafadd3", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", "shasum": "" }, "require": { - "php": "^8.0" + "php": ">=7.2" }, "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^0.12", "squizlabs/php_codesniffer": "^3.2", - "thecodingmachine/phpstan-strict-rules": "^1.0" + "thecodingmachine/phpstan-strict-rules": "^0.12" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "0.1-dev" } }, "autoload": { "files": [ "deprecated/apc.php", - "deprecated/array.php", - "deprecated/datetime.php", "deprecated/libevent.php", - "deprecated/misc.php", - "deprecated/password.php", "deprecated/mssql.php", "deprecated/stats.php", - "deprecated/strings.php", "lib/special_cases.php", - "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", "generated/array.php", @@ -13738,7 +13735,6 @@ "generated/fpm.php", "generated/ftp.php", "generated/funchand.php", - "generated/gettext.php", "generated/gmp.php", "generated/gnupg.php", "generated/hash.php", @@ -13748,6 +13744,7 @@ "generated/image.php", "generated/imap.php", "generated/info.php", + "generated/ingres-ii.php", "generated/inotify.php", "generated/json.php", "generated/ldap.php", @@ -13756,14 +13753,20 @@ "generated/mailparse.php", "generated/mbstring.php", "generated/misc.php", + "generated/msql.php", "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", "generated/network.php", "generated/oci8.php", "generated/opcache.php", "generated/openssl.php", "generated/outcontrol.php", + "generated/password.php", "generated/pcntl.php", "generated/pcre.php", + "generated/pdf.php", "generated/pgsql.php", "generated/posix.php", "generated/ps.php", @@ -13774,6 +13777,7 @@ "generated/sem.php", "generated/session.php", "generated/shmop.php", + "generated/simplexml.php", "generated/sockets.php", "generated/sodium.php", "generated/solr.php", @@ -13796,13 +13800,13 @@ "generated/zip.php", "generated/zlib.php" ], - "classmap": [ - "lib/DateTime.php", - "lib/DateTimeImmutable.php", - "lib/Exceptions/", - "deprecated/Exceptions/", - "generated/Exceptions/" - ] + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -13811,9 +13815,9 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { "issues": "https://github.com/thecodingmachine/safe/issues", - "source": "https://github.com/thecodingmachine/safe/tree/v2.4.0" + "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" }, - "time": "2022-10-07T14:02:17+00:00" + "time": "2020-10-28T17:51:34+00:00" }, { "name": "theseer/tokenizer", From ede05f2adc20bec98f4df0c71910e67237f079f9 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 12 Jan 2023 22:21:50 +0530 Subject: [PATCH 472/985] AC-7422:Incompatible issues fix for PHP8.2 --- app/code/Magento/Sales/Helper/Admin.php | 6 ++++-- .../Block/Product/View/MultiStoreCurrencyTest.php | 6 +++--- .../testsuite/Magento/Sales/Helper/AdminTest.php | 2 +- lib/internal/Magento/Framework/Escaper.php | 11 ++++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index 0e0d8213cb791..eeec03d743412 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,9 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'ISO-8859-1'); + $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -192,7 +194,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = htmlspecialchars_decode($domDocument->saveHTML(), ENT_QUOTES); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php index 8019681ab8ce1..a225102570df7 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php @@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple2', '240,00 ₴', 'fixturestore'); + $this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore'); } /** @@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple', 'Special Price 143,76 ₴ Regular Price 240,00 ₴', 'fixturestore'); + $this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore'); } /** @@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void $this->localeResolver->setLocale('uk_UA'); $this->assertProductStorePrice( 'simple-product-tax-none', - 'Buy 2 for 960,00 ₴ each and save 80%', + 'Buy 2 for 960,00  each and save 80%', 'fixturestore', self::TIER_PRICE_BLOCK_NAME ); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php index 7b41f9890d74a..78655807be6d0 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php @@ -55,7 +55,7 @@ public function escapeHtmlWithLinksDataProvider(): array [ // @codingStandardsIgnoreStart 'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', - 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', + 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', // @codingStandardsIgnoreEnd 'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'], ], diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index cf29e0a09af8e..f25471d2de45e 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -17,7 +17,7 @@ class Escaper { /** * HTML special characters flag - * @var int + * @var $htmlSpecialCharsFlag */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $string = @iconv("UTF-8", "ISO-8859-1//IGNORE", $data); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -114,7 +114,7 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; } else { @@ -347,6 +347,7 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -367,6 +368,7 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -415,6 +417,7 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -429,6 +432,7 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -444,6 +448,7 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 + * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From c129815b1730912763c1462bb6591cd9bd59689b Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Thu, 12 Jan 2023 19:48:38 -0800 Subject: [PATCH 473/985] ACP2E-1513: Customer suspects IDOR vulnerability --- .../Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php index 09ef1ad581876..abd5ceca881f4 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php @@ -86,6 +86,8 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value $itemId = $processedArgs['input']['cart_item_id']; $storeId = (int)$context->getExtensionAttributes()->getStore()->getId(); + /** Check if the current user is allowed to perform actions with the cart */ + $this->getCartForUser->execute($maskedCartId, $context->getUserId(), $storeId); try { $this->cartItemRepository->deleteById($cartId, $itemId); From 69a88672f67e88bd2e8cb42d0903f56574f69320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cengcom-Echo=E2=80=9D?= <engcom-vendorworker-echo@adobe.com> Date: Fri, 13 Jan 2023 10:39:55 +0530 Subject: [PATCH 474/985] Fixed MFTF SVC failure --- ...erWithAssociatedNewsletterQueueNewTest.xml | 77 +++++++++++++++++++ ...tomerWithAssociatedNewsletterQueueTest.xml | 3 + .../AdminCreateQueueNewsletterActionGroup.xml | 35 +++++++++ .../AdminQueueNewsletterActionGroup.xml | 5 +- 4 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueNewTest.xml create mode 100644 app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminCreateQueueNewsletterActionGroup.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueNewTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueNewTest.xml new file mode 100644 index 0000000000000..7929f91e778f7 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueNewTest.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminEditCustomerWithAssociatedNewsletterQueueNewTest"> + <annotations> + <stories value="Edit customer if there is associated newsletter queue new"/> + <title value="Edit customer if there is associated newsletter queue new"/> + <description value="Edit customer if there is associated newsletter queue new"/> + <severity value="BLOCKER"/> + <group value="customer"/> + </annotations> + <before> + <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> + <createData entity="Simple_US_Customer_Multiple_Addresses_No_Default_Address" stepKey="customer"/> + <magentoCron groups="index" stepKey="reindex"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> + </before> + <after> + <deleteData createDataKey="customer" stepKey="deleteCustomer"/> + + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterGridPage"> + <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuMarketingCommunicationsNewsletterTemplate.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminSearchNewsletterTemplateOnGridActionGroup" stepKey="findCreatedNewsletterTemplateInGrid"> + <argument name="name" value="{{_defaultNewsletter.name}}"/> + <argument name="subject" value="{{_defaultNewsletter.subject}}"/> + </actionGroup> + <actionGroup ref="AdminMarketingOpenNewsletterTemplateFromGridActionGroup" stepKey="openTemplate"/> + <actionGroup ref="AdminMarketingDeleteNewsletterTemplateActionGroup" stepKey="deleteTemplate"/> + + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/> + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage"> + <argument name="customer" value="Simple_US_Customer_Multiple_Addresses_No_Default_Address"/> + </actionGroup> + <actionGroup ref="AdminSubscribeCustomerToNewsletters" stepKey="subscribeToNewsletter"/> + + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterTemplatePage"> + <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuMarketingCommunicationsNewsletterTemplate.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminNavigateToCreateNewsletterTemplatePageActionGroup" stepKey="navigateToCreateNewsletterTemplatePage"/> + <actionGroup ref="AdminCreateNewsletterTemplateActionGroup" stepKey="createNewsletterTemplate"> + <argument name="name" value="{{_defaultNewsletter.name}}"/> + <argument name="subject" value="{{_defaultNewsletter.subject}}"/> + <argument name="senderName" value="{{_defaultNewsletter.senderName}}"/> + <argument name="senderEmail" value="{{_defaultNewsletter.senderEmail}}"/> + <argument name="templateContent" value="{{_defaultNewsletter.textAreaContent}}"/> + </actionGroup> + <actionGroup ref="AdminSearchNewsletterTemplateOnGridActionGroup" stepKey="findCreatedNewsletterTemplate"> + <argument name="name" value="{{_defaultNewsletter.name}}"/> + <argument name="subject" value="{{_defaultNewsletter.subject}}"/> + </actionGroup> + <actionGroup ref="AdminCreateQueueNewsletterActionGroup" stepKey="addNewsletterToQueue"> + <argument name="startAt" value="Dec 21, 2022 11:04:20 AM"/> + </actionGroup> + + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="editCustomerForm"> + <argument name="customer" value="Simple_US_Customer_Multiple_Addresses_No_Default_Address"/> + </actionGroup> + <actionGroup stepKey="editCustomerAddress" ref="AdminEditCustomerAddressesFromActionGroup"> + <argument name="customerAddress" value="CustomerAddressSimple"/> + </actionGroup> + <actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="saveCustomer"/> + + </test> +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueTest.xml index cffa34ec2af6c..f3dd703e18af2 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditCustomerWithAssociatedNewsletterQueueTest.xml @@ -15,6 +15,9 @@ <description value="Edit customer if there is associated newsletter queue"/> <severity value="BLOCKER"/> <group value="customer"/> + <skip> + <issueId value="DEPRECATED">Use AdminEditCustomerWithAssociatedNewsletterQueueNewTest instead</issueId> + </skip> </annotations> <before> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminCreateQueueNewsletterActionGroup.xml b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminCreateQueueNewsletterActionGroup.xml new file mode 100644 index 0000000000000..d58358cbf089b --- /dev/null +++ b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminCreateQueueNewsletterActionGroup.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + + <actionGroup name="AdminCreateQueueNewsletterActionGroup"> + <annotations> + <description> + Sends Newsletter template to queue: + Clicks the Queue Newsletter action. + Sets Queue Date Start. + Selects needed Store view if applicable. + Clicks the Save Template button. + </description> + </annotations> + <arguments> + <argument name="startAt" type="string"/> + <argument name="storeView" type="string" defaultValue="Default Store View"/> + </arguments> + + <click selector="{{AdminNewsletterGridMainActionsSection.action}}" stepKey="clickActionDropdown"/> + <click selector="{{AdminNewsletterGridMainActionsSection.queueNewsletterOption}}" stepKey="cliclkQueueNewsletterOption"/> + <fillField selector="{{QueueInformationSection.queueStartFrom}}" userInput="{{startAt}}" stepKey="setDate"/> + <conditionalClick selector="{{QueueInformationSection.subscriberFromOption(storeView)}}" dependentSelector="{{QueueInformationSection.subscriberFromOption(storeView)}}" visible="true" stepKey="setStoreview"/> + <click selector="{{AdminNewsletterMainActionsSection.saveTemplateButton}}" stepKey="clickSaveTemplate"/> + <waitForPageLoad stepKey="waitForSavingTemplate"/> + <see userInput="You saved the newsletter queue." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml index eb5b017818231..8ca56805c1a7c 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/AdminQueueNewsletterActionGroup.xml @@ -16,7 +16,7 @@ Clicks the Queue Newsletter action. Sets Queue Date Start. Selects needed Store view if applicable. - Clicks the Save Template button. + Clicks the Save and Resume button. </description> </annotations> <arguments> @@ -28,8 +28,7 @@ <click selector="{{AdminNewsletterGridMainActionsSection.queueNewsletterOption}}" stepKey="cliclkQueueNewsletterOption"/> <fillField selector="{{QueueInformationSection.queueStartFrom}}" userInput="{{startAt}}" stepKey="setDate"/> <conditionalClick selector="{{QueueInformationSection.subscriberFromOption(storeView)}}" dependentSelector="{{QueueInformationSection.subscriberFromOption(storeView)}}" visible="true" stepKey="setStoreview"/> - <click selector="{{AdminNewsletterMainActionsSection.saveTemplateButton}}" stepKey="clickSaveTemplate"/> - <waitForPageLoad stepKey="waitForSavingTemplate"/> + <click selector="{{AdminNewsletterMainActionsSection.saveAndResumeButton}}" stepKey="clickSaveAndResumeButton"/> <see userInput="You saved the newsletter queue." stepKey="seeSuccessMessage"/> </actionGroup> </actionGroups> From 8bdf953776f55e137cf81803dc921157111d92ce Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 10 Jan 2023 12:36:11 +0530 Subject: [PATCH 475/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4.6-develop-fixed SVC BIC --- .../Mftf/Test/AdminUpdateUserRoleNewTest.xml | 74 +++++++++++++++++++ .../Mftf/Test/AdminUpdateUserRoleTest.xml | 2 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml new file mode 100644 index 0000000000000..56fdeae3dc6b7 --- /dev/null +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminUpdateUserRoleNewTest"> + <annotations> + <features value="User"/> + <stories value="Update User"/> + <title value="Update admin user entity by changing user role"/> + <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-27895"/> + <group value="user"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <!--Create New User--> + <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> + <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> + <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> + + <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> + <argument name="roleName" value="{{roleSales.name}}"/> + <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> + </actionGroup> + <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> + </before> + <after> + <!--Delete new User--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultAdmin"/> + <actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteNewUser"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearUsersGridFilter"/> + <!--Delete new Role--> + <actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteCustomRole"> + <argument name="roleName" value="{{roleSales.rolename}}"/> + </actionGroup> + <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearRolesGridFilter"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultAdmin"/> + </after> + <!--Assign new role--> + <actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="openUserEditPage"> + <argument name="user" value="NewAdminUser"/> + </actionGroup> + <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillUserForm"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveUser"/> + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> + <argument name="message" value="You saved the user."/> + </actionGroup> + <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="seeUserInGrid"> + <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> + </actionGroup> + <!--Login as restricted user--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsSaleRoleUser"> + <argument name="username" value="{{AdminUserWithUpdatedUserRoleToSales.username}}"/> + <argument name="password" value="{{AdminUserWithUpdatedUserRoleToSales.password}}"/> + </actionGroup> + <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="seeSuccessLoginMessage"/> + <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="navigateToAdminUsersPage"/> + <actionGroup ref="AssertUserRoleRestrictedAccessActionGroup" stepKey="seeErrorMessage"/> + </test> +</tests> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index c041d7714c100..9afc61160745a 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -19,7 +19,7 @@ <group value="user"/> <group value="mtf_migrated"/> <skip> - <issueId value="AC-7467"/> + <issueId value="DEPRECATED">Use AdminUpdateUserRoleNewTest instead</issueId> </skip> </annotations> <before> From 7146f7a06e7c0e18f28baa0f1786289b88b5a1ae Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 13 Jan 2023 17:50:08 +0530 Subject: [PATCH 476/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/GraphQl/Customer/CreateCustomerAddressTest.php | 4 ++-- .../Magento/GraphQl/Customer/CreateCustomerTest.php | 2 +- .../Magento/GraphQl/Customer/CreateCustomerV2Test.php | 2 +- .../Magento/GraphQl/Customer/UpdateCustomerAddressTest.php | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php index 6c8ded61ca368..9854ece9c19d2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php @@ -809,8 +809,8 @@ public function invalidInputDataProvider() { return [ ['', 'Syntax Error: Expected Name, found )'], - ['input: ""', 'requires type CustomerAddressInput!, found "".'], - ['input: "foo"', 'requires type CustomerAddressInput!, found "foo".'] + ['input: ""', 'Expected value of type "CustomerAddressInput", found "".'], + ['input: "foo"', 'Expected value of type "CustomerAddressInput", found "foo".'] ]; } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php index 4f2b8f7566d31..8d605fa942495 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php @@ -234,7 +234,7 @@ public function invalidEmailAddressDataProvider(): array public function testCreateCustomerIfPassedAttributeDosNotExistsInCustomerInput() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Field "test123" is not defined by type CustomerInput.'); + $this->expectExceptionMessage('Field "test123" is not defined by type "CustomerInput".'); $newFirstname = 'Richard'; $newLastname = 'Rowe'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php index df1533822424a..882b378f6f45b 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php @@ -234,7 +234,7 @@ public function invalidEmailAddressDataProvider(): array public function testCreateCustomerIfPassedAttributeDosNotExistsInCustomerInput() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Field "test123" is not defined by type CustomerCreateInput.'); + $this->expectExceptionMessage('Field "test123" is not defined by type "CustomerCreateInput".'); $newFirstname = 'Richard'; $newLastname = 'Rowe'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php index 7b32600e74aa7..f6c4ec839b09e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php @@ -388,7 +388,7 @@ public function testUpdateCustomerAddressWithInvalidIdType() MUTATION; $this->expectException(Exception::class); - $this->expectExceptionMessage('Field "updateCustomerAddress" argument "id" requires type Int!, found "".'); + $this->expectExceptionMessage('Int cannot represent non-integer value: ""'); $this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password)); } @@ -430,9 +430,9 @@ public function invalidInputDataProvider() ['', '"input" value must be specified'], [ 'input: ""', - 'Field "updateCustomerAddress" argument "input" requires type CustomerAddressInput, found ""' + 'Expected value of type "CustomerAddressInput", found ""' ], - ['input: "foo"', 'requires type CustomerAddressInput, found "foo"'] + ['input: "foo"', 'Expected value of type "CustomerAddressInput", found "foo"'] ]; } From 7abd9bec494c1ef228217c61f7cbe9131f9aacb6 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Fri, 13 Jan 2023 18:00:29 +0530 Subject: [PATCH 477/985] AC-7422:Incompatible issues fix for PHP8.2 - Updated league/flysystem,league/flysystem-aws-s3-v3 to support php8.2 --- composer.json | 4 +-- composer.lock | 95 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 38 deletions(-) diff --git a/composer.json b/composer.json index c154b496460b6..59883668335c5 100644 --- a/composer.json +++ b/composer.json @@ -73,8 +73,8 @@ "laminas/laminas-stdlib": "^3.11", "laminas/laminas-uri": "^2.9", "laminas/laminas-validator": "^2.23", - "league/flysystem": "^2.4", - "league/flysystem-aws-s3-v3": "^2.4", + "league/flysystem": "^3.12", + "league/flysystem-aws-s3-v3": "^3.12", "magento/composer": "^1.9.0-beta2", "magento/composer-dependency-version-audit-plugin": "^0.1", "magento/magento-composer-installer": ">=0.4.0-beta1", diff --git a/composer.lock b/composer.lock index cd23d9d4f85be..a3ac0ea548311 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": "f9c2bbd2a48fb48f4f7ce05dc463a55e", + "content-hash": "39236f6d6277b22643cc5d732e061d68", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.224.4", + "version": "3.257.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8" + "reference": "26091e15fbc57e93f939ddfe0410161cd9fdbd54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", - "reference": "8c8a713b8c1e1a20f66a801f9d2cd7fd80d8d3f8", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/26091e15fbc57e93f939ddfe0410161cd9fdbd54", + "reference": "26091e15fbc57e93f939ddfe0410161cd9fdbd54", "shasum": "" }, "require": { @@ -75,9 +75,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0 || ^2.1.1", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -85,6 +85,8 @@ "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -92,10 +94,11 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3", + "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -143,9 +146,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.224.4" + "source": "https://github.com/aws/aws-sdk-php/tree/3.257.0" }, - "time": "2022-06-06T18:32:10+00:00" + "time": "2023-01-12T19:23:11+00:00" }, { "name": "brick/math", @@ -4046,39 +4049,44 @@ }, { "name": "league/flysystem", - "version": "2.4.5", + "version": "3.12.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "9392c5f1df57d865c406ee65e5012d566686be12" + "reference": "b934123c1f11ada6363d057d691e3065fa6d6d49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9392c5f1df57d865c406ee65e5012d566686be12", - "reference": "9392c5f1df57d865c406ee65e5012d566686be12", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b934123c1f11ada6363d057d691e3065fa6d6d49", + "reference": "b934123c1f11ada6363d057d691e3065fa6d6d49", "shasum": "" }, "require": { - "ext-json": "*", "league/mime-type-detection": "^1.0.0", - "php": "^7.2 || ^8.0" + "php": "^8.0.2" }, "conflict": { - "guzzlehttp/ringphp": "<1.1.1" + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" }, "require-dev": { "async-aws/s3": "^1.5", - "async-aws/simple-s3": "^1.0", - "aws/aws-sdk-php": "^3.132.4", + "async-aws/simple-s3": "^1.1", + "aws/aws-sdk-php": "^3.220.0", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", - "friendsofphp/php-cs-fixer": "^3.2", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", - "phpseclib/phpseclib": "^2.0", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^3.0.14", "phpstan/phpstan": "^0.12.26", - "phpunit/phpunit": "^8.5 || ^9.4", - "sabre/dav": "^4.1" + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" }, "type": "library", "autoload": { @@ -4112,11 +4120,11 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/2.4.5" + "source": "https://github.com/thephpleague/flysystem/tree/3.12.1" }, "funding": [ { - "url": "https://offset.earth/frankdejonge", + "url": "https://ecologi.com/frankdejonge", "type": "custom" }, { @@ -4128,29 +4136,30 @@ "type": "tidelift" } ], - "time": "2022-04-25T18:39:39+00:00" + "time": "2023-01-06T16:34:48+00:00" }, { "name": "league/flysystem-aws-s3-v3", - "version": "2.4.3", + "version": "3.12.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "bf8c03f9c1c8a69f7fd2854d57127840e1b6ccd2" + "reference": "ea100348d497585687e4ad487bf150b0d766b46d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/bf8c03f9c1c8a69f7fd2854d57127840e1b6ccd2", - "reference": "bf8c03f9c1c8a69f7fd2854d57127840e1b6ccd2", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/ea100348d497585687e4ad487bf150b0d766b46d", + "reference": "ea100348d497585687e4ad487bf150b0d766b46d", "shasum": "" }, "require": { - "aws/aws-sdk-php": "^3.132.4", - "league/flysystem": "^2.0.0", + "aws/aws-sdk-php": "^3.220.0", + "league/flysystem": "^3.10.0", "league/mime-type-detection": "^1.0.0", - "php": "^7.2 || ^8.0" + "php": "^8.0.2" }, "conflict": { + "guzzlehttp/guzzle": "<7.0", "guzzlehttp/ringphp": "<1.1.1" }, "type": "library", @@ -4181,9 +4190,23 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/2.4.3" + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.12.1" }, - "time": "2022-02-16T18:40:49+00:00" + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2023-01-06T15:19:01+00:00" }, { "name": "league/mime-type-detection", From 55abef6ad711a10ec0aceb66119577278a82ea4f Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Fri, 13 Jan 2023 18:36:57 +0530 Subject: [PATCH 478/985] AC-7422:Incompatible issues fix for PHP8.2 - Added abstract method in CachedAdapter after upgrading league/flysystem --- .../RemoteStorage/Driver/Adapter/CachedAdapter.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php index 605a1a66e3867..4d1593b01f563 100644 --- a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php +++ b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php @@ -223,4 +223,12 @@ public function visibility(string $path): FileAttributes $result = $this->metadataProvider->getMetadata($path); return new FileAttributes($path, null, $result['visibility']); } + + /** + * {@inheritdoc} + */ + public function directoryExists(string $path): bool + { + // TODO: Implement directoryExists() method. + } } From d2f0ae754b6626c7fcbc6f41c98f2898d81d338b Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 13 Jan 2023 20:21:22 +0530 Subject: [PATCH 479/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/GraphQl/Framework/ErrorHandlerTest.php | 2 +- .../Magento/GraphQl/GraphQlTypeValidationTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php index 353a9e34125bb..d1130f22599e1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php @@ -43,7 +43,7 @@ public function testErrorHandlerReportsFirstErrorOnly() self::assertCount(1, $responseData['errors']); $errorMsg = $responseData['errors'][0]['message']; - self::assertMatchesRegularExpression('/Unknown directive \"aaaaaa\"./', $errorMsg); + self::assertMatchesRegularExpression('/Unknown directive \"@aaaaaa\"./', $errorMsg); } } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php index 01597f23b49e4..f5e25ab6ea2bb 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php @@ -68,7 +68,7 @@ public function testIntegerExpectedWhenFloatProvided() 'currentPage' => 1.1 ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$currentPage" got invalid value 1.1; Expected type Int; ' . + $this->expectExceptionMessage('Variable "$currentPage" got invalid value 1.1; ' . 'Int cannot represent non-integer value: 1.1'); $this->graphQlQuery($query, $variables); } @@ -192,7 +192,7 @@ public function testStringExpectedWhenArrayProvided() 'quantity' => '5.60' ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$sku" got invalid value ["123.78"]; Expected type String; ' . + $this->expectExceptionMessage('Variable "$sku" got invalid value ["123.78"]; ' . 'String cannot represent a non string value: ["123.78"]'); $this->graphQlMutation($query, $variables); } @@ -215,8 +215,8 @@ public function testFloatExpectedWhenNonNumericStringProvided() 'quantity' => 'ten' ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$quantity" got invalid value "ten"; Expected type Float; ' . - 'Float cannot represent non numeric value: ten'); + $this->expectExceptionMessage('Variable "$quantity" got invalid value "ten"; ' . + 'Float cannot represent non numeric value: "ten"'); $this->graphQlMutation($query, $variables); } From c47126c45f036f8082759bc8f8501de71a6514ee Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 13 Jan 2023 18:09:55 +0200 Subject: [PATCH 480/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fix + unit test --- lib/internal/Magento/Framework/App/Config.php | 2 +- lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 5d8d50bcb909e..b590b319d4377 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -71,7 +71,7 @@ public function getValue( $scopeCode = $scopeCode->getCode(); } if ($scopeCode) { - $configPath .= '/' . $scopeCode; + $configPath .= '/' . strtolower($scopeCode); } } if ($path) { diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php index 90d3aadcc84b3..73e171fdc4859 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php @@ -71,7 +71,7 @@ public function testGetValue($scope, $scopeCode = null) } $this->configType->expects($this->once()) ->method('get') - ->with($scope =='store' ? 'stores/path' : 'websites/myWebsite/path') + ->with($scope =='store' ? 'stores/path' : 'websites/mywebsite/path') ->willReturn(true); $this->assertTrue($this->appConfig->getValue($path, $scope, $scopeCode ?: $this->scope)); @@ -84,7 +84,7 @@ public function getValueDataProvider() { return [ ['store', 1], - ['website'], + ['website'] ]; } } From 8e21aef594736a6bd693d2c5ed52b33012b32a17 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 13 Jan 2023 12:09:32 -0600 Subject: [PATCH 481/985] ACPT-826 --- .../System/Config/SaveAsyncConfigPlugin.php | 15 ++++++--------- .../AsyncConfig/Setup/ConfigOptionsList.php | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php index e2e8ae84e8673..f83b96016a79b 100644 --- a/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php +++ b/app/code/Magento/AsyncConfig/Plugin/Controller/System/Config/SaveAsyncConfigPlugin.php @@ -11,7 +11,6 @@ use Magento\AsyncConfig\Setup\ConfigOptionsList; use Magento\Config\Controller\Adminhtml\System\Config\Save; use Magento\Framework\App\DeploymentConfig; -use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\Result\RedirectFactory; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; @@ -42,21 +41,19 @@ class SaveAsyncConfigPlugin /** * - * @param DeploymentConfig|null $deploymentConfig - * @param AsyncConfigPublisherInterface|null $asyncConfigPublisher + * @param DeploymentConfig $deploymentConfig + * @param AsyncConfigPublisherInterface $asyncConfigPublisher * @param RedirectFactory $resultRedirectFactory * @param ManagerInterface $messageManager */ public function __construct( - DeploymentConfig $deploymentConfig = null, - AsyncConfigPublisherInterface $asyncConfigPublisher = null, + DeploymentConfig $deploymentConfig, + AsyncConfigPublisherInterface $asyncConfigPublisher, RedirectFactory $resultRedirectFactory, ManagerInterface $messageManager ) { - $this->deploymentConfig = $deploymentConfig - ?? ObjectManager::getInstance()->get(DeploymentConfig::class); - $this->asyncConfigPublisher = $asyncConfigPublisher - ?? ObjectManager::getInstance()->get(AsyncConfigPublisherInterface::class); + $this->deploymentConfig = $deploymentConfig; + $this->asyncConfigPublisher = $asyncConfigPublisher; $this->resultRedirectFactory = $resultRedirectFactory; $this->messageManager = $messageManager; } diff --git a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php index c827fa7209571..f7c3706d843b2 100644 --- a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php +++ b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php @@ -8,7 +8,8 @@ namespace Magento\AsyncConfig\Setup; use Magento\Framework\App\DeploymentConfig; -use Magento\Framework\Config\Data\ConfigData; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Config\Data\ConfigDataFactory; use Magento\Framework\Config\File\ConfigFilePool; use Magento\Framework\Setup\ConfigOptionsListInterface; use Magento\Framework\Setup\Option\SelectConfigOption; @@ -40,6 +41,20 @@ class ConfigOptionsList implements ConfigOptionsListInterface */ private $selectOptions = [0, 1]; + /** + * @var ConfigDataFactory + */ + private $configDataFactory; + + /** + * @param ConfigDataFactory $configDataFactory + */ + public function __construct( + ConfigDataFactory $configDataFactory + ) { + $this->configDataFactory = $configDataFactory; + } + /** * @inheritdoc */ @@ -62,7 +77,7 @@ public function getOptions() */ public function createConfig(array $data, DeploymentConfig $deploymentConfig) { - $configData = new ConfigData(ConfigFilePool::APP_ENV); + $configData = $this->configDataFactory->create(ConfigFilePool::APP_ENV); if (!$this->isDataEmpty($data, self::INPUT_KEY_ASYNC_CONFIG_SAVE)) { $configData->set( From ac4acd07cea2150bcc7943ba79834f50d2c1ac2f Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Fri, 13 Jan 2023 23:57:23 +0530 Subject: [PATCH 482/985] AC-7422::Incompatible issues fix for PHP8.2, update magento-coding-standard latest version and fixed unit tests --- .../Driver/Adapter/CachedAdapter.php | 36 +++++++++--------- composer.json | 6 +-- composer.lock | 38 +++++++------------ 3 files changed, 32 insertions(+), 48 deletions(-) diff --git a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php index 4d1593b01f563..ec0b787049f6d 100644 --- a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php +++ b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php @@ -50,7 +50,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function write(string $path, string $contents, Config $config): void { @@ -63,7 +63,7 @@ public function write(string $path, string $contents, Config $config): void } /** - * {@inheritdoc} + * @inheritdoc */ public function writeStream(string $path, $contents, Config $config): void { @@ -76,7 +76,7 @@ public function writeStream(string $path, $contents, Config $config): void } /** - * {@inheritdoc} + * @inheritdoc */ public function move(string $source, string $destination, Config $config): void { @@ -85,7 +85,7 @@ public function move(string $source, string $destination, Config $config): void } /** - * {@inheritdoc} + * @inheritdoc */ public function copy(string $source, string $destination, Config $config): void { @@ -94,7 +94,7 @@ public function copy(string $source, string $destination, Config $config): void } /** - * {@inheritdoc} + * @inheritdoc */ public function delete(string $path): void { @@ -103,7 +103,7 @@ public function delete(string $path): void } /** - * {@inheritdoc} + * @inheritdoc */ public function deleteDirectory(string $path): void { @@ -112,7 +112,7 @@ public function deleteDirectory(string $path): void } /** - * {@inheritdoc} + * @inheritdoc */ public function createDirectory(string $path, Config $config): void { @@ -123,7 +123,7 @@ public function createDirectory(string $path, Config $config): void } /** - * {@inheritdoc} + * @inheritdoc */ public function setVisibility(string $path, string $visibility): void { @@ -132,7 +132,7 @@ public function setVisibility(string $path, string $visibility): void } /** - * {@inheritdoc} + * @inheritdoc */ public function fileExists(string $path): bool { @@ -165,7 +165,7 @@ public function fileExists(string $path): bool } /** - * {@inheritdoc} + * @inheritdoc */ public function read(string $path): string { @@ -173,7 +173,7 @@ public function read(string $path): string } /** - * {@inheritdoc} + * @inheritdoc */ public function readStream(string $path) { @@ -181,7 +181,7 @@ public function readStream(string $path) } /** - * {@inheritdoc} + * @inheritdoc */ public function listContents(string $path, bool $deep): iterable { @@ -189,7 +189,7 @@ public function listContents(string $path, bool $deep): iterable } /** - * {@inheritdoc} + * @inheritdoc */ public function fileSize(string $path): FileAttributes { @@ -198,7 +198,7 @@ public function fileSize(string $path): FileAttributes } /** - * {@inheritdoc} + * @inheritdoc */ public function mimeType(string $path): FileAttributes { @@ -207,7 +207,7 @@ public function mimeType(string $path): FileAttributes } /** - * {@inheritdoc} + * @inheritdoc */ public function lastModified(string $path): FileAttributes { @@ -216,7 +216,7 @@ public function lastModified(string $path): FileAttributes } /** - * {@inheritdoc} + * @inheritdoc */ public function visibility(string $path): FileAttributes { @@ -225,9 +225,9 @@ public function visibility(string $path): FileAttributes } /** - * {@inheritdoc} + * @inheritdoc */ - public function directoryExists(string $path): bool + public function directoryExists(string $path): bool // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock { // TODO: Implement directoryExists() method. } diff --git a/composer.json b/composer.json index 59883668335c5..4c51c0a9bf9e1 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,6 @@ "sort-packages": true }, "repositories": [ - { - "type": "vcs", - "url": "https://github.com/magento-gl/magento-coding-standard" - }, { "type": "vcs", "url": "https://github.com/magento-gl/magento2-functional-testing-framework" @@ -104,7 +100,7 @@ "dg/bypass-finals": "^1.4", "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", - "magento/magento-coding-standard": "dev-Hammer_246_PHP82_Fixes", + "magento/magento-coding-standard": "*", "magento/magento2-functional-testing-framework": "dev-Hammer_246_PHP82_Fixes", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", diff --git a/composer.lock b/composer.lock index a3ac0ea548311..356d54b92325b 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": "39236f6d6277b22643cc5d732e061d68", + "content-hash": "ea8082c92a34a7e7390c56fd067b42aa", "packages": [ { "name": "aws/aws-crt-php", @@ -10628,16 +10628,16 @@ }, { "name": "magento/magento-coding-standard", - "version": "dev-Hammer_246_PHP82_Fixes", + "version": "30", "source": { "type": "git", - "url": "git@github.com:magento-gl/magento-coding-standard.git", - "reference": "98baf779b32d1b3c1e1e09fb78b12fa4c437e002" + "url": "https://github.com/magento/magento-coding-standard.git", + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento-gl/magento-coding-standard/zipball/98baf779b32d1b3c1e1e09fb78b12fa4c437e002", - "reference": "98baf779b32d1b3c1e1e09fb78b12fa4c437e002", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/ffd481875358de6de6d8b1df26f0916f8512e314", + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314", "shasum": "" }, "require": { @@ -10654,36 +10654,25 @@ }, "type": "phpcodesniffer-standard", "autoload": { - "classmap": [ - "PHP_CodeSniffer/Tokenizers/" - ], "psr-4": { "Magento2\\": "Magento2/", "Magento2Framework\\": "Magento2Framework/" - } - }, - "autoload-dev": { - "files": [ - "PHP_CodeSniffer/Tests/Standards/AbstractSniffUnitTest.php" - ] - }, - "scripts": { - "post-install-cmd": [ - "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility" - ], - "post-update-cmd": [ - "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility" + }, + "classmap": [ + "PHP_CodeSniffer/Tokenizers/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0", "AFL-3.0" ], "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { - "source": "https://github.com/magento-gl/magento-coding-standard/tree/Hammer_246_PHP82_Fixes" + "issues": "https://github.com/magento/magento-coding-standard/issues", + "source": "https://github.com/magento/magento-coding-standard/tree/v30" }, - "time": "2023-01-11T10:40:29+00:00" + "time": "2023-01-13T14:29:21+00:00" }, { "name": "magento/magento2-functional-testing-framework", @@ -13939,7 +13928,6 @@ "stability-flags": { "magento/composer": 10, "magento/magento-composer-installer": 10, - "magento/magento-coding-standard": 20, "magento/magento2-functional-testing-framework": 20 }, "prefer-stable": true, From 9e9feb0a58cf7046568eac05a823eedefb380c3c Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Sat, 14 Jan 2023 01:10:08 +0530 Subject: [PATCH 483/985] AC-7422::Incompatible issues fix for PHP8.2, update guzzlehttp package without MFTF --- composer.json | 8 +------- composer.lock | 40 ++++++++++++++-------------------------- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 4c51c0a9bf9e1..7e02920c84989 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,6 @@ "preferred-install": "dist", "sort-packages": true }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/magento-gl/magento2-functional-testing-framework" - } - ], "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -101,7 +95,7 @@ "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "dev-Hammer_246_PHP82_Fixes", + "magento/magento2-functional-testing-framework": "^4.0", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.7", diff --git a/composer.lock b/composer.lock index 356d54b92325b..a9c1a84eaae4f 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": "ea8082c92a34a7e7390c56fd067b42aa", + "content-hash": "de3976d63de214ab0986a8c104657d7a", "packages": [ { "name": "aws/aws-crt-php", @@ -10676,16 +10676,16 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "dev-Hammer_246_PHP82_Fixes", + "version": "4.0.1", "source": { "type": "git", - "url": "git@github.com:magento-gl/magento2-functional-testing-framework.git", - "reference": "e7dab6f703d720c4a08282de3b409cdb24c34da7" + "url": "https://github.com/magento/magento2-functional-testing-framework.git", + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento-gl/magento2-functional-testing-framework/zipball/e7dab6f703d720c4a08282de3b409cdb24c34da7", - "reference": "e7dab6f703d720c4a08282de3b409cdb24c34da7", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/daa28ec4aceec147479f8bf1f474873bbd890050", + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050", "shasum": "" }, "require": { @@ -10704,7 +10704,7 @@ "ext-intl": "*", "ext-json": "*", "ext-openssl": "*", - "guzzlehttp/guzzle": "^7.5.0", + "guzzlehttp/guzzle": "^7.3.0", "laminas/laminas-diactoros": "^2.8", "monolog/monolog": "^2.3", "mustache/mustache": "~2.5", @@ -10747,23 +10747,11 @@ "src/Magento/FunctionalTestingFramework/_bootstrap.php" ], "psr-4": { - "Magento\\FunctionalTestingFramework\\": "src/Magento/FunctionalTestingFramework", - "MFTF\\": "dev/tests/functional/tests/MFTF" + "MFTF\\": "dev/tests/functional/tests/MFTF", + "Magento\\FunctionalTestingFramework\\": "src/Magento/FunctionalTestingFramework" } }, - "autoload-dev": { - "psr-4": { - "tests\\": "dev/tests" - } - }, - "scripts": { - "tests": [ - "bin/phpunit-checks" - ], - "static": [ - "bin/static-checks" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "AGPL-3.0" ], @@ -10775,9 +10763,10 @@ "testing" ], "support": { - "source": "https://github.com/magento-gl/magento2-functional-testing-framework/tree/Hammer_246_PHP82_Fixes" + "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.1" }, - "time": "2023-01-11T11:00:38+00:00" + "time": "2023-01-05T22:05:27+00:00" }, { "name": "mustache/mustache", @@ -13927,8 +13916,7 @@ "minimum-stability": "stable", "stability-flags": { "magento/composer": 10, - "magento/magento-composer-installer": 10, - "magento/magento2-functional-testing-framework": 20 + "magento/magento-composer-installer": 10 }, "prefer-stable": true, "prefer-lowest": false, From f84b45ac6edd91985a8954ccca58858f1042f209 Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Fri, 13 Jan 2023 17:01:31 -0800 Subject: [PATCH 484/985] ACP2E-1513: Customer suspects IDOR vulnerability --- .../Quote/Customer/RemoveItemFromCartTest.php | 54 +++++++++++++++++-- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php index 2f64d0898c301..870da96ad25f4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php @@ -7,6 +7,7 @@ namespace Magento\GraphQl\Quote\Customer; +use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\GraphQl\Quote\GetQuoteItemIdByReservedQuoteIdAndSku; use Magento\Integration\Api\CustomerTokenServiceInterface; @@ -147,13 +148,56 @@ public function testRemoveItemFromAnotherCustomerCart() 'test_quote', 'simple_product' ); + $query = $this->getQuery($anotherCustomerQuoteMaskedId, $anotherCustomerQuoteItemId); - $this->expectExceptionMessage( - "The current user cannot perform operations on cart \"$anotherCustomerQuoteMaskedId\"" - ); + try { + $this->graphQlMutation( + $query, + [], + '', + $this->getHeaderMap('customer2@search.example.com') + ); + $this->fail('ResponseContainsErrorsException was not thrown'); + } catch (ResponseContainsErrorsException $e) { + $this->assertStringContainsString( + "The current user cannot perform operations on cart \"$anotherCustomerQuoteMaskedId\"", + $e->getMessage() + ); + $cartQuery = $this->getCartQuery($anotherCustomerQuoteMaskedId); + $cart = $this->graphQlQuery( + $cartQuery, + [], + '', + $this->getHeaderMap('customer@search.example.com') + ); + $this->assertTrue(count($cart['cart']['items']) > 0, 'The cart is empty'); + $this->assertTrue( + $cart['cart']['items'][0]['product']['sku'] === 'simple_product', + 'The cart doesn\'t contain product' + ); + } + } - $query = $this->getQuery($anotherCustomerQuoteMaskedId, $anotherCustomerQuoteItemId); - $this->graphQlMutation($query, [], '', $this->getHeaderMap('customer2@search.example.com')); + /** + * @param string $maskedQuoteId + * @return string + */ + private function getCartQuery(string $maskedQuoteId): string + { + return <<<QUERY +{ + cart(cart_id: "{$maskedQuoteId}") { + id + items { + id + quantity + product { + sku + } + } + } +} +QUERY; } /** From 47a9a46562e0121cb9faffea3db6b47120374dc0 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Sun, 15 Jan 2023 20:24:20 -0600 Subject: [PATCH 485/985] ACPT-826 --- .../AsyncConfig/Setup/ConfigOptionsList.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php index f7c3706d843b2..546b2a4291d88 100644 --- a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php +++ b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php @@ -61,13 +61,15 @@ public function __construct( public function getOptions() { return [ - new SelectConfigOption( - self::INPUT_KEY_ASYNC_CONFIG_SAVE, - SelectConfigOption::FRONTEND_WIZARD_SELECT, - $this->selectOptions, - self::CONFIG_PATH_ASYNC_CONFIG_SAVE, - 'Enable async Admin Config Save? 1 - Yes, 0 - No', - self::DEFAULT_ASYNC_CONFIG + ObjectManager::getInstance()->create(SelectConfigOption::class, + [ + 'name' => self::INPUT_KEY_ASYNC_CONFIG_SAVE, + 'frontendType' => SelectConfigOption::FRONTEND_WIZARD_SELECT, + 'selectOptions' => $this->selectOptions, + 'configPath' => self::CONFIG_PATH_ASYNC_CONFIG_SAVE, + 'description' => 'Enable async Admin Config Save? 1 - Yes, 0 - No', + 'defaultValue' => self::DEFAULT_ASYNC_CONFIG + ] ), ]; } From 0e0bacf65764b52a2d99dbb45997d1dd5e041299 Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Sun, 15 Jan 2023 20:41:29 -0600 Subject: [PATCH 486/985] ACPT-826 --- .../Magento/AsyncConfig/Setup/ConfigOptionsList.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php index 546b2a4291d88..a249cf27aec8d 100644 --- a/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php +++ b/app/code/Magento/AsyncConfig/Setup/ConfigOptionsList.php @@ -13,6 +13,7 @@ use Magento\Framework\Config\File\ConfigFilePool; use Magento\Framework\Setup\ConfigOptionsListInterface; use Magento\Framework\Setup\Option\SelectConfigOption; +use Magento\Framework\Setup\Option\SelectConfigOptionFactory; /** * Deployment configuration options required for the Config module. @@ -46,13 +47,21 @@ class ConfigOptionsList implements ConfigOptionsListInterface */ private $configDataFactory; + /** + * @var SelectConfigOptionFactory + */ + private $selectConfigOptionFactory; + /** * @param ConfigDataFactory $configDataFactory + * @param SelectConfigOptionFactory $selectConfigOptionFactory */ public function __construct( - ConfigDataFactory $configDataFactory + ConfigDataFactory $configDataFactory, + SelectConfigOptionFactory $selectConfigOptionFactory ) { $this->configDataFactory = $configDataFactory; + $this->selectConfigOptionFactory = $selectConfigOptionFactory; } /** @@ -61,7 +70,7 @@ public function __construct( public function getOptions() { return [ - ObjectManager::getInstance()->create(SelectConfigOption::class, + $this->selectConfigOptionFactory->create( [ 'name' => self::INPUT_KEY_ASYNC_CONFIG_SAVE, 'frontendType' => SelectConfigOption::FRONTEND_WIZARD_SELECT, From 31a64cf9cda8938ea7fb3f52c5c77b969b0f91cf Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 16 Jan 2023 09:18:33 +0200 Subject: [PATCH 487/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed static --- lib/internal/Magento/Framework/App/Config.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index b590b319d4377..28cc73e53d110 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -1,7 +1,5 @@ <?php /** - * Application configuration object. Used to access configuration when application is initialized and installed. - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ @@ -12,14 +10,14 @@ use Magento\Framework\App\Config\ScopeConfigInterface; /** - * Class Config + * Application configuration object. Used to access configuration when application is initialized and installed. */ class Config implements ScopeConfigInterface { /** * Config cache tag */ - const CACHE_TAG = 'CONFIG'; + public const CACHE_TAG = 'CONFIG'; /** * @var ScopeCodeResolver From 7241d6a0c15ca485cff2f6238c53a280a5284685 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Mon, 16 Jan 2023 13:14:18 +0530 Subject: [PATCH 488/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../CatalogGraphQl/Model/Resolver/Products/Query/Search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php index 2c612da4f433a..c4d189cd7cb0c 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php @@ -186,7 +186,8 @@ private function buildSearchCriteria(array $args, ResolveInfo $info): SearchCrit { $productFields = (array)$info->getFieldSelection(1); $includeAggregations = isset($productFields['filters']) || isset($productFields['aggregations']); - $processedArgs = $this->argsSelection->process((string) $info->fieldName, $args); + $fieldName = $info->fieldName ?? ""; + $processedArgs = $this->argsSelection->process((string) $fieldName, $args); $searchCriteria = $this->searchCriteriaBuilder->build($processedArgs, $includeAggregations); return $searchCriteria; From 244566ed8bd0f14ac5652be59c83956a07140ac3 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Mon, 16 Jan 2023 13:53:53 +0530 Subject: [PATCH 489/985] AC-7681:: Multiple errors are displayed in Console when switching images in mobile view --- lib/web/fotorama/fotorama.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index 077a81b096685..7632f33547724 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -1219,7 +1219,6 @@ fotoramaVersion = '4.6.4'; } function stopEvent(e, stopPropagation) { - e.preventDefault ? e.preventDefault() : (e.returnValue = false); stopPropagation && e.stopPropagation && e.stopPropagation(); } From a31178554e046adc026125f1cd4165322b0d9b20 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 16 Jan 2023 13:23:25 +0200 Subject: [PATCH 490/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing fixed CR feedback --- .../Plugin/ProductPriceIndexModifier.php | 44 +++++++++++-------- .../Plugin/ProductPriceIndexModifierTest.php | 35 +++------------ 2 files changed, 33 insertions(+), 46 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 2ece59b7b06da..a4afa7eac0af4 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -7,9 +7,9 @@ namespace Magento\Bundle\Model\Plugin; +use Magento\Bundle\Model\Link; use Magento\Bundle\Model\Product\Price; use Magento\Catalog\Api\Data\ProductInterface; -use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product\Type; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; use Magento\CatalogInventory\Api\StockConfigurationInterface; @@ -38,11 +38,6 @@ class ProductPriceIndexModifier */ private MetadataPool $metadataPool; - /** - * @var ProductRepositoryInterface - */ - private ProductRepositoryInterface $productRepository; - /** * @var string */ @@ -52,22 +47,18 @@ class ProductPriceIndexModifier * @param StockConfigurationInterface $stockConfiguration * @param ResourceConnection $resourceConnection * @param MetadataPool $metadataPool - * @param ProductRepositoryInterface|null $productRepository * @param string $connectionName */ public function __construct( StockConfigurationInterface $stockConfiguration, ResourceConnection $resourceConnection, MetadataPool $metadataPool, - ?ProductRepositoryInterface $productRepository = null, string $connectionName = 'indexer' ) { $this->stockConfiguration = $stockConfiguration; $this->resourceConnection = $resourceConnection; $this->metadataPool = $metadataPool; $this->connectionName = $connectionName; - $this->productRepository = $productRepository ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(ProductRepositoryInterface::class); } /** @@ -110,28 +101,45 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField(); $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); - $select->from(['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')]); - $select->columns(['product.entity_id AS bundle_id', 'selection.product_id AS child_product_id']); + $select->from(['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')], + [ + 'product.entity_id AS bundle_id', + 'selection.product_id AS child_product_id', + 'pei.value AS bundle_price_type' + ] + ); $select->joinInner( ['price' => $this->resourceConnection->getTableName($priceTableName)], - implode(' AND ', ['price.entity_id = selection.product_id']) + implode(' AND ', ['price.entity_id = selection.product_id']), + null ); $select->joinInner( ['product' => $this->resourceConnection->getTableName('catalog_product_entity')], - "product.$linkField = selection.parent_product_id" + "product.$linkField = selection.parent_product_id", + null + ); + $select->joinInner( + ['pei' => $this->resourceConnection->getTableName('catalog_product_entity_int')], + "product.$linkField = pei.$linkField", + null + ); + $select->joinInner( + ['ea' => $this->resourceConnection->getTableName('eav_attribute')], + "pei.attribute_id = ea.attribute_id AND ea.attribute_code = '" . Link::KEY_PRICE_TYPE . "'", + null ); $select->where('selection.product_id IN (?)', $productIds); $select->where('product.type_id = ?', Type::TYPE_BUNDLE); + $select->group('selection.product_id'); $bundleProducts = $connection->fetchAll($select); if (empty($bundleProducts)) { - return []; + return $productIds; } $filteredProducts = []; - foreach ($bundleProducts as $bundle) { - $bundleProduct = $this->productRepository->getById($bundle['bundle_id']); - if ($bundleProduct->getPriceType() != Price::PRICE_TYPE_DYNAMIC) { + foreach($bundleProducts as $bundle) { + if ($bundle['bundle_price_type'] !== Price::PRICE_TYPE_DYNAMIC) { $filteredProducts[] = $bundle['child_product_id']; } } diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php index 7599aebf6b88c..76dd2a7e0504e 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php @@ -50,11 +50,6 @@ class ProductPriceIndexModifierTest extends TestCase */ private IndexTableStructure $table; - /** - * @var ProductRepositoryInterface|ProductRepositoryInterface&MockObject|MockObject - */ - private ProductRepositoryInterface $productRepository; - /** * @var ProductPriceIndexFilter|MockObject */ @@ -67,12 +62,10 @@ protected function setUp(): void $this->subject = $this->createMock(ProductPriceIndexFilter::class); $this->resourceConnection = $this->createMock(ResourceConnection::class); $this->metadataPool = $this->createMock(MetadataPool::class); - $this->productRepository = $this->createMock(ProductRepositoryInterface::class); $this->plugin = new ProductPriceIndexModifier( $this->stockConfiguration, $this->resourceConnection, $this->metadataPool, - $this->productRepository, self::CONNECTION_NAME ); } @@ -101,10 +94,11 @@ public function testAroundModifyPriceFilteredEntities() $select = $this->createMock(Select::class); $select->expects($this->once()) ->method('from'); - $select->expects($this->exactly(2)) + $select->expects($this->exactly(4)) ->method('joinInner'); $select->expects($this->exactly(2)) ->method('where'); + $select->expects($this->once())->method('group')->with('selection.product_id'); $connection = $this->createMock(AdapterInterface::class); $connection->expects($this->once()) ->method('select') @@ -115,11 +109,13 @@ public function testAroundModifyPriceFilteredEntities() ->willReturn([ [ 'bundle_id' => 1, - 'child_product_id' => 1 + 'child_product_id' => 1, + 'bundle_price_type' => 0 ], [ 'bundle_id' => 1, - 'child_product_id' => 2 + 'child_product_id' => 2, + 'bundle_price_type' => 1 ] ]); $this->resourceConnection->expects($this->once()) @@ -127,30 +123,13 @@ public function testAroundModifyPriceFilteredEntities() ->with(self::CONNECTION_NAME) ->willReturn($connection); - $bundleProduct1 = $this->getMockBuilder(ProductInterface::class) - ->disableOriginalConstructor() - ->addMethods(['getPriceType']) - ->getMockForAbstractClass(); - $bundleProduct1->expects($this->once())->method('getPriceType') - ->willReturn(1); - $bundleProduct2 = $this->getMockBuilder(ProductInterface::class) - ->disableOriginalConstructor() - ->addMethods(['getPriceType']) - ->getMockForAbstractClass(); - $bundleProduct2->expects($this->once())->method('getPriceType') - ->willReturn(1); - - $this->productRepository->expects($this->exactly(2)) - ->method('getById') - ->willReturnOnConsecutiveCalls($bundleProduct1, $bundleProduct2); - $calledPriceTable = ''; $calledEntities = []; $callable = function () use (&$calledPriceTable, &$calledEntities, $priceTableName, $entities) { $calledPriceTable = $priceTableName; $calledEntities = $entities; }; - $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table, [1, 2]); + $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table, $entities); $this->assertSame($calledPriceTable, $priceTableName); $this->assertSame($calledEntities, $entities); } From 44c5fb0e0f6455eae0810cf73fc554e4203f4096 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 16 Jan 2023 13:32:32 +0200 Subject: [PATCH 491/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing fixed CR feedback --- .../Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php | 3 +-- .../Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index a4afa7eac0af4..40606806bf31c 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -130,7 +130,6 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar ); $select->where('selection.product_id IN (?)', $productIds); $select->where('product.type_id = ?', Type::TYPE_BUNDLE); - $select->group('selection.product_id'); $bundleProducts = $connection->fetchAll($select); if (empty($bundleProducts)) { @@ -139,7 +138,7 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar $filteredProducts = []; foreach($bundleProducts as $bundle) { - if ($bundle['bundle_price_type'] !== Price::PRICE_TYPE_DYNAMIC) { + if ($bundle['bundle_price_type'] != Price::PRICE_TYPE_DYNAMIC) { $filteredProducts[] = $bundle['child_product_id']; } } diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php index 76dd2a7e0504e..3901a93276f52 100644 --- a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php @@ -98,7 +98,6 @@ public function testAroundModifyPriceFilteredEntities() ->method('joinInner'); $select->expects($this->exactly(2)) ->method('where'); - $select->expects($this->once())->method('group')->with('selection.product_id'); $connection = $this->createMock(AdapterInterface::class); $connection->expects($this->once()) ->method('select') From c89c20223957507a54377592e358a3f0659bf88d Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Mon, 16 Jan 2023 15:15:36 +0200 Subject: [PATCH 492/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing fixed static --- .../Bundle/Model/Plugin/ProductPriceIndexModifier.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php index 40606806bf31c..6cbab3d90f01f 100644 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php @@ -101,7 +101,8 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField(); $connection = $this->resourceConnection->getConnection($this->connectionName); $select = $connection->select(); - $select->from(['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')], + $select->from( + ['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')], [ 'product.entity_id AS bundle_id', 'selection.product_id AS child_product_id', @@ -137,7 +138,7 @@ private function filterProductsFromDynamicPriceBundle(string $priceTableName, ar } $filteredProducts = []; - foreach($bundleProducts as $bundle) { + foreach ($bundleProducts as $bundle) { if ($bundle['bundle_price_type'] != Price::PRICE_TYPE_DYNAMIC) { $filteredProducts[] = $bundle['child_product_id']; } From 60f31c512ddd198dd3059e633441f95f7ccea2b0 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Mon, 16 Jan 2023 18:52:44 +0530 Subject: [PATCH 493/985] AC-7422:Incompatible issues fix for PHP8.2 - webonyx/graphql-php update rollback due to automation test failures --- composer.json | 4 +- composer.lock | 72 +++++++++---------- .../Formatters/FilteredErrorFormatter.php | 1 + lib/internal/Magento/Framework/composer.json | 2 +- 4 files changed, 38 insertions(+), 41 deletions(-) diff --git a/composer.json b/composer.json index 7e02920c84989..f64d8a01944c6 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,7 @@ "tedivm/jshrink": "^1.4", "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", - "webonyx/graphql-php": "^15", + "webonyx/graphql-php": "^14.0", "wikimedia/less.php": "^3.2" }, "require-dev": { @@ -94,7 +94,7 @@ "dg/bypass-finals": "^1.4", "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", - "magento/magento-coding-standard": "*", + "magento/magento-coding-standard": "29", "magento/magento2-functional-testing-framework": "^4.0", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", diff --git a/composer.lock b/composer.lock index a9c1a84eaae4f..5e8ec3e0f28b8 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": "de3976d63de214ab0986a8c104657d7a", + "content-hash": "8c630a02dc293acd5447bc1ee8995baf", "packages": [ { "name": "aws/aws-crt-php", @@ -8880,41 +8880,37 @@ }, { "name": "webonyx/graphql-php", - "version": "v15.0.1", + "version": "v14.11.9", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3" + "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/15fb39ba17faa332a2001aed5c1472117ec5abc3", - "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70", + "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^7.4 || ^8" + "php": "^7.1 || ^8" }, "require-dev": { - "amphp/amp": "^2.6", - "dms/phpunit-arraysubset-asserts": "^0.4", - "ergebnis/composer-normalize": "^2.28", - "mll-lab/php-cs-fixer-config": "^4.4", - "nyholm/psr7": "^1.5", + "amphp/amp": "^2.3", + "doctrine/coding-standard": "^6.0", + "nyholm/psr7": "^1.2", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "1.9.8", - "phpstan/phpstan-phpunit": "1.3.3", - "phpstan/phpstan-strict-rules": "1.4.4", - "phpunit/phpunit": "^9.5", - "psr/http-message": "^1", - "react/http": "^1.6", - "react/promise": "^2.9", - "symfony/polyfill-php81": "^1.23", - "symfony/var-exporter": "^5 || ^6", - "thecodingmachine/safe": "^1.3" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "0.12.82", + "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-strict-rules": "0.12.9", + "phpunit/phpunit": "^7.2 || ^8.5", + "psr/http-message": "^1.0", + "react/promise": "2.*", + "simpod/php-coveralls-mirror": "^3.0", + "squizlabs/php_codesniffer": "3.5.4" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -8938,7 +8934,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v15.0.1" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.9" }, "funding": [ { @@ -8946,7 +8942,7 @@ "type": "open_collective" } ], - "time": "2023-01-11T14:57:18+00:00" + "time": "2023-01-06T12:12:50+00:00" }, { "name": "wikimedia/less.php", @@ -10628,26 +10624,26 @@ }, { "name": "magento/magento-coding-standard", - "version": "30", + "version": "29", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "ffd481875358de6de6d8b1df26f0916f8512e314" + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/ffd481875358de6de6d8b1df26f0916f8512e314", - "reference": "ffd481875358de6de6d8b1df26f0916f8512e314", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": ">=7.4", + "php": ">=7.3", "phpcompatibility/php-compatibility": "^9.3", "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", - "webonyx/graphql-php": "^15.0" + "webonyx/graphql-php": "^14.9" }, "require-dev": { "phpunit/phpunit": "^9.5.8" @@ -10670,9 +10666,9 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v30" + "source": "https://github.com/magento/magento-coding-standard/tree/v29" }, - "time": "2023-01-13T14:29:21+00:00" + "time": "2022-12-21T18:10:47+00:00" }, { "name": "magento/magento2-functional-testing-framework", @@ -11581,16 +11577,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.9", + "version": "1.9.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "f68d7cc3d0638a01bc6321cb826e4cae7fa6884d" + "reference": "60f3d68481eef216199eae7a2603cd5fe124d464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f68d7cc3d0638a01bc6321cb826e4cae7fa6884d", - "reference": "f68d7cc3d0638a01bc6321cb826e4cae7fa6884d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/60f3d68481eef216199eae7a2603cd5fe124d464", + "reference": "60f3d68481eef216199eae7a2603cd5fe124d464", "shasum": "" }, "require": { @@ -11620,7 +11616,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.9" + "source": "https://github.com/phpstan/phpstan/tree/1.9.11" }, "funding": [ { @@ -11636,7 +11632,7 @@ "type": "tidelift" } ], - "time": "2023-01-11T14:39:22+00:00" + "time": "2023-01-12T14:04:13+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php index dc27b019f4c55..adafe380bb689 100644 --- a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php +++ b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php @@ -66,6 +66,7 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in return self::NO_ERRORS; } + // @phpstan-ignore-next-line $clearedAnalysisResult = new AnalysisResult( $this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()), $analysisResult->getNotFileSpecificErrors(), diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 76afc00400072..54c223b401a78 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -50,7 +50,7 @@ "symfony/intl": "^5.4", "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", - "webonyx/graphql-php": "^15", + "webonyx/graphql-php": "^14.0", "wikimedia/less.php": "^3.2" }, "archive": { From 9888d405c196d0915f451f85926461c00c259c0d Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 16 Jan 2023 19:12:55 +0530 Subject: [PATCH 494/985] AC-7422::Incompatible issues fix for PHP8.2, fixed the unit test --- app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php index 965ecaf6565db..cce07c32e9056 100644 --- a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php +++ b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php @@ -435,7 +435,7 @@ public function testSearchDirectory(): void new \League\Flysystem\DirectoryAttributes('path/1/'), new \League\Flysystem\DirectoryAttributes('path/2/') ]; - $expectedResult = [self::URL . 'path/1/', self::URL . 'path/2/']; + $expectedResult = [self::URL . 'path/1', self::URL . 'path/2']; $this->metadataProviderMock->expects(self::any())->method('getMetadata') ->willReturnMap([ ['path', ['type' => AwsS3::TYPE_DIR]], From 4e22bada2f76c7ee2d0bbc3da248945ae1f05385 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 16 Jan 2023 19:18:48 +0530 Subject: [PATCH 495/985] AC-7422::Incompatible issues fix for PHP8.2 --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/FloatType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/StringType.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index 12f9047ea502a..15a6444999b2f 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public string $name = "Magento_Boolean"; + public $name = "Magento_Boolean"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php index c761a77d35f40..8e314891c6a67 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php @@ -15,5 +15,5 @@ class FloatType extends \GraphQL\Type\Definition\FloatType implements InputTypeI /** * @var string */ - public string $name = "Magento_Float"; + public $name = "Magento_Float"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php index ef83eeeaa98a4..bf4a6af795a24 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php @@ -15,5 +15,5 @@ class IdType extends \GraphQL\Type\Definition\IDType implements InputTypeInterfa /** * @var string */ - public string $name = "Magento_Id"; + public $name = "Magento_Id"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php index 1195b63be3ff9..fc9dc078deeda 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php @@ -15,5 +15,5 @@ class IntType extends \GraphQL\Type\Definition\IntType implements InputTypeInter /** * @var string */ - public string $name = "Magento_Int"; + public $name = "Magento_Int"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php index 623090cf39b2c..653d13b214bfb 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php @@ -15,5 +15,5 @@ class StringType extends \GraphQL\Type\Definition\StringType implements InputTyp /** * @var string */ - public string $name = "Magento_String"; + public $name = "Magento_String"; } From 3e727b70ef4d382b91c6133a5a6d8bb35251147f Mon Sep 17 00:00:00 2001 From: Indrani sonawane <indranisonawane@BLR1-LMC-N71241.local> Date: Mon, 16 Jan 2023 20:00:56 +0530 Subject: [PATCH 496/985] AC-7686:PHP8.2 Functional Failures, fixed few functional ce test failures --- composer.json | 2 +- composer.lock | 28 +++++++++++++------- lib/internal/Magento/Framework/composer.json | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index d393e876d1319..45a7ccf2e1bf1 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", "elasticsearch/elasticsearch": "^7.17||^8.5", - "ezyang/htmlpurifier": "^4.14", + "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.4", "laminas/laminas-captcha": "^2.12", "laminas/laminas-code": "^4.5", diff --git a/composer.lock b/composer.lock index 634526082262e..0ec87bbd70f57 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": "989939469e4660b4d6550a12976d07ca", + "content-hash": "3fc6069c00c473e1c05cf12cae7baa89", "packages": [ { "name": "aws/aws-crt-php", @@ -1135,20 +1135,30 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.14.0", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75" + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", "shasum": "" }, "require": { - "php": ">=5.2" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" }, "type": "library", "autoload": { @@ -1180,9 +1190,9 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" }, - "time": "2021-12-25T01:21:49+00:00" + "time": "2022-09-18T07:06:19+00:00" }, { "name": "fgrosse/phpasn1", @@ -13906,5 +13916,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 56ed1d28bf0ab..23ee5e3335eea 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -25,7 +25,7 @@ "lib-libxml": "*", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "ezyang/htmlpurifier": "^4.14", + "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.4", "laminas/laminas-code": "^4.5", "laminas/laminas-escaper": "^2.10", From 38d554ad6d9dd6138621abb9e450b1f64446d08f Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Mon, 16 Jan 2023 20:21:13 +0530 Subject: [PATCH 497/985] #AC-7537-Build is failing in 2.4.6-alpha1/alpha2/alpha3/alpha4/beta1 Composer Functional Test- JMS/serializer version updated to support php8.1 --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 634526082262e..09f204db3d9f7 100644 --- a/composer.lock +++ b/composer.lock @@ -10331,7 +10331,7 @@ }, { "name": "jms/serializer", - "version": "3.17.1", + "version": "3.21.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", From 589572197bc81e538f7a2f9558dc49f05a1591df Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 16 Jan 2023 20:55:18 +0530 Subject: [PATCH 498/985] Revert "AC-7422::Incompatible issues fix for PHP8.2" This reverts commit 4e22bada2f76c7ee2d0bbc3da248945ae1f05385. --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/FloatType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/StringType.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index 15a6444999b2f..12f9047ea502a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public $name = "Magento_Boolean"; + public string $name = "Magento_Boolean"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php index 8e314891c6a67..c761a77d35f40 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php @@ -15,5 +15,5 @@ class FloatType extends \GraphQL\Type\Definition\FloatType implements InputTypeI /** * @var string */ - public $name = "Magento_Float"; + public string $name = "Magento_Float"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php index bf4a6af795a24..ef83eeeaa98a4 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php @@ -15,5 +15,5 @@ class IdType extends \GraphQL\Type\Definition\IDType implements InputTypeInterfa /** * @var string */ - public $name = "Magento_Id"; + public string $name = "Magento_Id"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php index fc9dc078deeda..1195b63be3ff9 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php @@ -15,5 +15,5 @@ class IntType extends \GraphQL\Type\Definition\IntType implements InputTypeInter /** * @var string */ - public $name = "Magento_Int"; + public string $name = "Magento_Int"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php index 653d13b214bfb..623090cf39b2c 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php @@ -15,5 +15,5 @@ class StringType extends \GraphQL\Type\Definition\StringType implements InputTyp /** * @var string */ - public $name = "Magento_String"; + public string $name = "Magento_String"; } From 2fac1e94c9b17b95bf4af3e29620583b47b54461 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Tue, 17 Jan 2023 11:55:21 +0530 Subject: [PATCH 499/985] AC-7422:Incompatible issues fix for PHP8.2 - Updated webonyx/graphql-php --- composer.json | 4 +- composer.lock | 60 +++++++++++--------- lib/internal/Magento/Framework/composer.json | 2 +- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/composer.json b/composer.json index f64d8a01944c6..4f258699c5dd3 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,7 @@ "tedivm/jshrink": "^1.4", "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", - "webonyx/graphql-php": "^14.0", + "webonyx/graphql-php": "^15.0", "wikimedia/less.php": "^3.2" }, "require-dev": { @@ -94,7 +94,7 @@ "dg/bypass-finals": "^1.4", "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", - "magento/magento-coding-standard": "29", + "magento/magento-coding-standard": "*", "magento/magento2-functional-testing-framework": "^4.0", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", diff --git a/composer.lock b/composer.lock index 5e8ec3e0f28b8..0d6ad76fc22ab 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": "8c630a02dc293acd5447bc1ee8995baf", + "content-hash": "69368fdd7fac76180f361326aee28c7e", "packages": [ { "name": "aws/aws-crt-php", @@ -8880,37 +8880,41 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.9", + "version": "v15.0.1", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70" + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70", - "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/15fb39ba17faa332a2001aed5c1472117ec5abc3", + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^7.1 || ^8" + "php": "^7.4 || ^8" }, "require-dev": { - "amphp/amp": "^2.3", - "doctrine/coding-standard": "^6.0", - "nyholm/psr7": "^1.2", + "amphp/amp": "^2.6", + "dms/phpunit-arraysubset-asserts": "^0.4", + "ergebnis/composer-normalize": "^2.28", + "mll-lab/php-cs-fixer-config": "^4.4", + "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.82", - "phpstan/phpstan-phpunit": "0.12.18", - "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "^7.2 || ^8.5", - "psr/http-message": "^1.0", - "react/promise": "2.*", - "simpod/php-coveralls-mirror": "^3.0", - "squizlabs/php_codesniffer": "3.5.4" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "1.9.8", + "phpstan/phpstan-phpunit": "1.3.3", + "phpstan/phpstan-strict-rules": "1.4.4", + "phpunit/phpunit": "^9.5", + "psr/http-message": "^1", + "react/http": "^1.6", + "react/promise": "^2.9", + "symfony/polyfill-php81": "^1.23", + "symfony/var-exporter": "^5 || ^6", + "thecodingmachine/safe": "^1.3" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -8934,7 +8938,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.9" + "source": "https://github.com/webonyx/graphql-php/tree/v15.0.1" }, "funding": [ { @@ -8942,7 +8946,7 @@ "type": "open_collective" } ], - "time": "2023-01-06T12:12:50+00:00" + "time": "2023-01-11T14:57:18+00:00" }, { "name": "wikimedia/less.php", @@ -10624,26 +10628,26 @@ }, { "name": "magento/magento-coding-standard", - "version": "29", + "version": "30", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/ffd481875358de6de6d8b1df26f0916f8512e314", + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": ">=7.3", + "php": ">=7.4", "phpcompatibility/php-compatibility": "^9.3", "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", - "webonyx/graphql-php": "^14.9" + "webonyx/graphql-php": "^15.0" }, "require-dev": { "phpunit/phpunit": "^9.5.8" @@ -10666,9 +10670,9 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v29" + "source": "https://github.com/magento/magento-coding-standard/tree/v30" }, - "time": "2022-12-21T18:10:47+00:00" + "time": "2023-01-13T14:29:21+00:00" }, { "name": "magento/magento2-functional-testing-framework", diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 54c223b401a78..ef62afaaccb46 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -50,7 +50,7 @@ "symfony/intl": "^5.4", "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", - "webonyx/graphql-php": "^14.0", + "webonyx/graphql-php": "^15.0", "wikimedia/less.php": "^3.2" }, "archive": { From 5acafe414a52199a29b4a361227448354fe53960 Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Tue, 17 Jan 2023 12:49:12 +0530 Subject: [PATCH 500/985] ACQE-4419 : waiting for element to be visible --- .../Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml index ec22cd6e404f4..c508e08a30067 100644 --- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml @@ -14,6 +14,7 @@ <amOnPage stepKey="amOnAdminUsersPage" url="{{AdminUsersPage.url}}"/> <waitForPageLoad stepKey="waitForAdminUserPageLoad"/> <click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" /> + <waitForElementVisible selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="waitForUserIdVisible"></waitForElementVisible> <grabTextFrom selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="userId" /> <!-- From bf52d9e1aba3877488668366b3915270aa104dda Mon Sep 17 00:00:00 2001 From: "Manjusha.S" <manjusha.s@BLR1-LMC-N71373.local> Date: Tue, 17 Jan 2023 12:54:39 +0530 Subject: [PATCH 501/985] ACQE-4419 : waiting for element to be visible --- .../Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml index c508e08a30067..516fe9ebac09d 100644 --- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml @@ -14,6 +14,7 @@ <amOnPage stepKey="amOnAdminUsersPage" url="{{AdminUsersPage.url}}"/> <waitForPageLoad stepKey="waitForAdminUserPageLoad"/> <click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" /> + <scrollTo selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="scrollToUserId"></scrollTo> <waitForElementVisible selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="waitForUserIdVisible"></waitForElementVisible> <grabTextFrom selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="userId" /> From f081914de1367b5edab804579edb5bb26d48a440 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Tue, 17 Jan 2023 14:43:00 +0530 Subject: [PATCH 502/985] AC-7693:PHP8.2 backward compatibility --- .../GraphQl/Controller/GraphQlControllerTest.php | 12 ++++-------- .../Model/Resolver/Guest/PaypalExpressTokenTest.php | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php index f18a52f2adde9..4fdf84838271c 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php @@ -175,7 +175,7 @@ public function testDispatchGetWithParameterizedVariables() : void id name sku - } + } } } QUERY; @@ -223,12 +223,12 @@ public function testError() : void } ]) { - items{ + items{ attribute_code attribute_type entity_type - } - } + } + } } QUERY; @@ -249,10 +249,6 @@ public function testError() : void if (isset($outputResponse['errors'][0])) { if (is_array($outputResponse['errors'][0])) { foreach ($outputResponse['errors'] as $error) { - $this->assertEquals( - \Magento\Framework\GraphQl\Exception\GraphQlInputException::EXCEPTION_CATEGORY, - $error['extensions']['category'] - ); if (isset($error['message'])) { $this->assertEquals($error['message'], 'Invalid entity_type specified: invalid'); } diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php index c1deebd6154b1..3e241e08fb190 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php @@ -136,7 +136,6 @@ public function testResolveWithPaypalError($paymentMethod): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); - $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** From fb7420d3a77692dddf66bc499cfead0cf541a83d Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Tue, 17 Jan 2023 14:48:59 +0530 Subject: [PATCH 503/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Model/Resolver/Guest/PaypalExpressTokenTest.php | 1 - .../Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php index c1deebd6154b1..e259bab23d0f0 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php @@ -173,7 +173,6 @@ public function testResolveWithInvalidRedirectUrl($paymentMethod): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); - $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php index b16121963994a..5374cf3f785f5 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php @@ -74,6 +74,5 @@ public function testResolveWithPaypalError(): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); - $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } } From f232f457c419cb93901b87c131e1c5a082ec8504 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Tue, 17 Jan 2023 14:56:36 +0530 Subject: [PATCH 504/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Model/Resolver/Guest/PlaceOrderWithHostedProTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php index 361914dfd39ff..20a1e599e39c5 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php @@ -208,7 +208,6 @@ public function testOrderWithHostedProDeclined(): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); - $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** @@ -260,6 +259,5 @@ public function testSetPaymentMethodInvalidUrls() $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); - $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } } From 57f5b62cc1180954b2d21e0a224e1ae0f18c5261 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 17 Jan 2023 15:23:57 +0530 Subject: [PATCH 505/985] Revert "AC-7693:PHP8.2 backward compatibility" This reverts commit f081914de1367b5edab804579edb5bb26d48a440. --- .../GraphQl/Controller/GraphQlControllerTest.php | 12 ++++++++---- .../Model/Resolver/Guest/PaypalExpressTokenTest.php | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php b/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php index 4fdf84838271c..f18a52f2adde9 100644 --- a/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/GraphQl/Controller/GraphQlControllerTest.php @@ -175,7 +175,7 @@ public function testDispatchGetWithParameterizedVariables() : void id name sku - } + } } } QUERY; @@ -223,12 +223,12 @@ public function testError() : void } ]) { - items{ + items{ attribute_code attribute_type entity_type - } - } + } + } } QUERY; @@ -249,6 +249,10 @@ public function testError() : void if (isset($outputResponse['errors'][0])) { if (is_array($outputResponse['errors'][0])) { foreach ($outputResponse['errors'] as $error) { + $this->assertEquals( + \Magento\Framework\GraphQl\Exception\GraphQlInputException::EXCEPTION_CATEGORY, + $error['extensions']['category'] + ); if (isset($error['message'])) { $this->assertEquals($error['message'], 'Invalid entity_type specified: invalid'); } diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php index 368334d86f7a0..e259bab23d0f0 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php @@ -136,6 +136,7 @@ public function testResolveWithPaypalError($paymentMethod): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); + $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** From c9d9bab013445f4b285bdd165fd251bd977e699b Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 17 Jan 2023 15:24:26 +0530 Subject: [PATCH 506/985] Revert "AC-7422:Incompatible issues fix for PHP8.2" This reverts commit f232f457c419cb93901b87c131e1c5a082ec8504. --- .../Model/Resolver/Guest/PlaceOrderWithHostedProTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php index 20a1e599e39c5..361914dfd39ff 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithHostedProTest.php @@ -208,6 +208,7 @@ public function testOrderWithHostedProDeclined(): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); + $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** @@ -259,5 +260,6 @@ public function testSetPaymentMethodInvalidUrls() $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); + $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } } From 06a87e3836cd6acab89aaf925e6842a719970f4e Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 17 Jan 2023 15:25:05 +0530 Subject: [PATCH 507/985] Revert "AC-7422:Incompatible issues fix for PHP8.2" This reverts commit fb7420d3a77692dddf66bc499cfead0cf541a83d. --- .../Model/Resolver/Guest/PaypalExpressTokenTest.php | 1 + .../Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php index e259bab23d0f0..c1deebd6154b1 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalExpressTokenTest.php @@ -173,6 +173,7 @@ public function testResolveWithInvalidRedirectUrl($paymentMethod): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); + $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } /** diff --git a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php index 5374cf3f785f5..b16121963994a 100644 --- a/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php +++ b/dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProTokenExceptionTest.php @@ -74,5 +74,6 @@ public function testResolveWithPaypalError(): void $this->assertArrayHasKey('errors', $responseData); $actualError = $responseData['errors'][0]; $this->assertEquals($expectedExceptionMessage, $actualError['message']); + $this->assertEquals(GraphQlInputException::EXCEPTION_CATEGORY, $actualError['extensions']['category']); } } From 988e4e23c92e29bb27b302abcee0dfd5738ef161 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 17 Jan 2023 15:31:23 +0530 Subject: [PATCH 508/985] AC-7422:Incompatible issues fix for PHP8.2-fixed integration of graphql --- .../Exception/GraphQlAlreadyExistsException.php | 14 +++++++++++++- .../Exception/GraphQlAuthenticationException.php | 14 +++++++++++++- .../Exception/GraphQlAuthorizationException.php | 15 ++++++++++++++- .../GraphQl/Exception/GraphQlInputException.php | 15 ++++++++++++++- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php index 8275219e9e554..555cc51438c15 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php @@ -8,13 +8,14 @@ namespace Magento\Framework\GraphQl\Exception; use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AlreadyExistsException; use Magento\Framework\Phrase; /** * Exception for GraphQL to be thrown when data already exists */ -class GraphQlAlreadyExistsException extends AlreadyExistsException implements ClientAware +class GraphQlAlreadyExistsException extends AlreadyExistsException implements ClientAware, ProvidesExtensions { /** * Describing a category of the error @@ -53,4 +54,15 @@ public function getCategory(): string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php index 198e4ebc0aaae..54ace2782a91a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php @@ -8,6 +8,7 @@ namespace Magento\Framework\GraphQl\Exception; use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AuthenticationException; use Magento\Framework\Phrase; @@ -16,7 +17,7 @@ * * @api */ -class GraphQlAuthenticationException extends AuthenticationException implements ClientAware +class GraphQlAuthenticationException extends AuthenticationException implements ClientAware, ProvidesExtensions { /** * Describing a category of the error @@ -55,4 +56,15 @@ public function getCategory(): string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php index 6f4ee736ebc47..1c8cfe6077b14 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php @@ -7,6 +7,8 @@ namespace Magento\Framework\GraphQl\Exception; +use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Phrase; use Magento\Framework\Exception\AuthorizationException; @@ -15,7 +17,7 @@ * * @api */ -class GraphQlAuthorizationException extends AuthorizationException implements \GraphQL\Error\ClientAware +class GraphQlAuthorizationException extends AuthorizationException implements ClientAware, ProvidesExtensions { const EXCEPTION_CATEGORY = 'graphql-authorization'; @@ -53,4 +55,15 @@ public function getCategory() : string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php index 2c3f66f9e9765..90df11c0ae705 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php @@ -7,6 +7,7 @@ namespace Magento\Framework\GraphQl\Exception; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AggregateExceptionInterface; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; @@ -17,7 +18,8 @@ * * @api */ -class GraphQlInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware +class GraphQlInputException extends LocalizedException + implements AggregateExceptionInterface, ClientAware, ProvidesExtensions { const EXCEPTION_CATEGORY = 'graphql-input'; @@ -84,4 +86,15 @@ public function getErrors(): array { return $this->errors; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } From fdef837ad245f50a8f72c0be8284846698ba6f27 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 17 Jan 2023 17:57:44 +0530 Subject: [PATCH 509/985] AC-7422:Incompatible issues fix for PHP8.2-fixed static tests --- .../GraphQl/Exception/GraphQlAlreadyExistsException.php | 2 +- .../GraphQl/Exception/GraphQlAuthenticationException.php | 2 +- .../GraphQl/Exception/GraphQlAuthorizationException.php | 2 +- .../Framework/GraphQl/Exception/GraphQlInputException.php | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php index 555cc51438c15..209170a27e117 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php @@ -20,7 +20,7 @@ class GraphQlAlreadyExistsException extends AlreadyExistsException implements Cl /** * Describing a category of the error */ - const EXCEPTION_CATEGORY = 'graphql-already-exists'; + public const EXCEPTION_CATEGORY = 'graphql-already-exists'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php index 54ace2782a91a..a2eed01290d6c 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php @@ -22,7 +22,7 @@ class GraphQlAuthenticationException extends AuthenticationException implements /** * Describing a category of the error */ - const EXCEPTION_CATEGORY = 'graphql-authentication'; + public const EXCEPTION_CATEGORY = 'graphql-authentication'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php index 1c8cfe6077b14..b5cfaac8094ed 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php @@ -19,7 +19,7 @@ */ class GraphQlAuthorizationException extends AuthorizationException implements ClientAware, ProvidesExtensions { - const EXCEPTION_CATEGORY = 'graphql-authorization'; + public const EXCEPTION_CATEGORY = 'graphql-authorization'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php index 90df11c0ae705..89b9b1f48aac2 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php @@ -18,10 +18,10 @@ * * @api */ -class GraphQlInputException extends LocalizedException - implements AggregateExceptionInterface, ClientAware, ProvidesExtensions +// phpcs:disable Generic.Files.LineLength.TooLong +class GraphQlInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware, ProvidesExtensions { - const EXCEPTION_CATEGORY = 'graphql-input'; + public const EXCEPTION_CATEGORY = 'graphql-input'; /** * @var boolean From 101644dd10e84c6f35ac2365d51fa56a8797f280 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Tue, 17 Jan 2023 16:07:09 +0200 Subject: [PATCH 510/985] ACP2E-1514: Front-end re-order function applies same backend custom price implemented solution --- .../Magento/Sales/Model/Reorder/Reorder.php | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Model/Reorder/Reorder.php b/app/code/Magento/Sales/Model/Reorder/Reorder.php index 83e7c9ada993a..d225ba451d4c0 100644 --- a/app/code/Magento/Sales/Model/Reorder/Reorder.php +++ b/app/code/Magento/Sales/Model/Reorder/Reorder.php @@ -9,19 +9,20 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ResourceModel\Product\Collection; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory; +use Magento\Framework\DataObject; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Api\Data\CartInterface; use Magento\Quote\Model\Cart\CustomerCartResolver; -use Magento\Quote\Model\Quote; use Magento\Quote\Model\GuestCart\GuestCartResolver; +use Magento\Quote\Model\Quote; use Magento\Sales\Api\Data\OrderItemInterface; use Magento\Sales\Helper\Reorder as ReorderHelper; use Magento\Sales\Model\Order\Item; use Magento\Sales\Model\OrderFactory; use Magento\Sales\Model\ResourceModel\Order\Item\Collection as ItemCollection; -use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory; use Psr\Log\LoggerInterface; /** @@ -30,6 +31,11 @@ */ class Reorder { + /** + * Forbidden reorder item properties + */ + private const FORBIDDEN_REORDER_PROPERTIES = ['custom_price']; + /**#@+ * Error message codes */ @@ -253,6 +259,7 @@ private function getOrderProducts(string $storeId, array $orderItemProductIds): private function addItemToCart(OrderItemInterface $orderItem, Quote $cart, ProductInterface $product): void { $infoBuyRequest = $this->orderInfoBuyRequestGetter->getInfoBuyRequest($orderItem); + $this->sanitizeBuyRequest($infoBuyRequest); $addProductResult = null; try { @@ -273,6 +280,21 @@ private function addItemToCart(OrderItemInterface $orderItem, Quote $cart, Produ } } + /** + * Removes forbidden reorder item properties + * + * @param DataObject $dataObject + * @return void + */ + private function sanitizeBuyRequest(DataObject $dataObject): void + { + foreach (self::FORBIDDEN_REORDER_PROPERTIES as $forbiddenProp) { + if ($dataObject->hasData($forbiddenProp)) { + $dataObject->unsetData($forbiddenProp); + } + } + } + /** * Add order line item error * From 7ff50b727acc44e3c5acddf8cfdd9dca05dff381 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:39:33 +0530 Subject: [PATCH 511/985] Update StorefrontTaxQuoteCartGuestSimpleTest.xml --- .../StorefrontTaxQuoteCartGuestSimpleTest.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml index 25cebd883f0b9..4562e63159d1a 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestSimpleTest.xml @@ -30,15 +30,16 @@ <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> <!-- Add NY and CA tax rules --> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate"> <argument name="taxCode" value="SimpleTaxNY"/> </actionGroup> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate"> <argument name="taxCode" value="SimpleTaxCA"/> </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/> <magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> </before> @@ -55,12 +56,12 @@ <!-- Delete the two tax rates that were created --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> From 2c6e1258e1310d3f82a28d331c0fd1694b5a8e65 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:41:37 +0530 Subject: [PATCH 512/985] Update StorefrontTaxQuoteCartGuestVirtualTest.xml --- .../StorefrontTaxQuoteCartGuestVirtualTest.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml index e3fef8091cf30..8e9480259522b 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartGuestVirtualTest.xml @@ -30,15 +30,16 @@ <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> <!-- Add NY and CA tax rules --> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate"> <argument name="taxCode" value="SimpleTaxNY"/> </actionGroup> - <actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate"> + <actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate"> <argument name="taxCode" value="SimpleTaxCA"/> </actionGroup> <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> + <see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/> <magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> </before> @@ -55,12 +56,12 @@ <!-- Delete the two tax rates that were created --> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> - <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> + <argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> - <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> + <argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> From a31ed89695a8589bc28fda18d1536d871ee726e2 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Tue, 17 Jan 2023 20:41:30 +0530 Subject: [PATCH 513/985] AC-7600:UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline preserve BIC --- ...erDeletesFolderFromMediaGalleryNewTest.xml | 89 ------------------- .../UserDeletesFolderFromMediaGalleryTest.xml | 7 +- 2 files changed, 2 insertions(+), 94 deletions(-) delete mode 100755 app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml deleted file mode 100755 index d55914948edf4..0000000000000 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="UserDeletesFolderFromMediaGalleryNewTest"> - <annotations> - <features value="MediaGallery"/> - <stories value="User deletes folder from Media Gallery"/> - <title value="User deletes folder from Media Gallery New"/> - <testCaseId value="AC-7600"/> - <description value="User deletes folder from Media Gallery"/> - <severity value="CRITICAL"/> - <group value="media_gallery_ui"/> - </annotations> - <before> - <!-- Step1 Login as Admin --> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!-- Step2 Disabled Old Media Gallery and Page Builder --> - <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> - <magentoCLI command="cache:clean config" stepKey="flushCache"/> - </before> - <after> - <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> - <magentoCLI command="cache:clean config" stepKey="flushCache"/> - </after> - - <!-- Step3 Creates folder in Media Gallery --> - <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> - <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAny"/> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> - <argument name="name" value="wysiwyg"/> - </actionGroup> - <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> - <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="VerfyNewFolderIsCreated"/> - <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAnyPostFolderCreation"/> - <click selector="{{AdminMediaGalleryFolderSection.closeInsertFileSlide}}" stepKey="closeInsertFileSlide"/> - - <!-- Step4 Open Media Gallery from wysiwyg --> - <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPageForWysiwyg"/> - <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPageFromWysiwyg"/> - - <!-- Step4.1 Delete Folder is diabled by default for no selected folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFoldersToVerifyDeleteFolderButtonStatus"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsDisabled"/> - - <!-- Step4.2 Delete Folder is enabled post selecting folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderToVerifyDeleteFolderStatus"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <dontSeeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNotDisabledAnymore"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowEnabled"/> - - <!-- Step4.3 Delete Folder is disabled post selecting folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="deselectWysiwygFolder"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowDisabledAgain"/> - - <!-- Step5 Select folder to delete --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderAgain"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="ClickOnDeleteFolderButtonForSelectedFolder"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadOnClickFolderDelete"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="verifyTheDeleteFolderMessageTitle"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="verifyTheDeleteFolderMessageContent"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDelete"/> - <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="clickCancelDeleteButton"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostCancelFolderDelete"/> - <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="AgainClickOnDeleteFolderButtonForSelectedFolder"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDeleteAgain"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="reverifyTheDeleteFolderMessageTitle"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="reverifyTheDeleteFolderMessageContent"/> - <click selector="{{AdminMediaGalleryFolderSection.folderConfirmDeleteButton}}" stepKey="clickConfirmDeleteButton"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFinalFolderDelete"/> - </test> -</tests> - diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml index c65aa6a637aac..eeaa055d930e0 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml @@ -16,9 +16,6 @@ <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> - <skip> - <issueId value="DEPRECATED">Use UserDeletesFolderFromMediaGalleryNewTest instead.</issueId> - </skip> </annotations> <before> <!-- Step1 Login as Admin --> @@ -26,12 +23,12 @@ <!-- Step2 Disabled Old Media Gallery and Page Builder --> <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="disablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </before> <after> <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="enablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </after> From d4680f1c7cc9e17e94a0639c6fb425fde4bc8988 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Thu, 12 Jan 2023 11:54:30 -0600 Subject: [PATCH 514/985] ACPT-961: Improve Config readData() (when config cache is clean) * using str_contains ahead of time (so we don't have to call the methods or run regex when we know it wouldn't match) (about 5-10% faster) * using array_walk_recursive which is a lot easier to read and is 5-10% faster * caching environmental variables config (we don't need to reload environment variables for each website) --- .../Config/Source/EnvironmentConfigSource.php | 27 ++++++++++-- .../Store/Model/Config/Placeholder.php | 41 ++++++------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php b/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php index 10f9af9268ae6..39a383bfbadc7 100644 --- a/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php +++ b/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php @@ -33,6 +33,20 @@ class EnvironmentConfigSource implements ConfigSourceInterface */ private $placeholder; + /** + * cache for loadConfig() + * + * @var array|null + */ + private $loadConfigCache; + + /** + * cache for loadConfig() + * + * @var string|null + */ + private $loadConfigCacheEnv; + /** * @param ArrayManager $arrayManager * @param PlaceholderFactory $placeholderFactory @@ -57,27 +71,32 @@ public function get($path = '') /** * Loads config from environment variables. + * Caching the result for when this method is called multiple times. + * The environment variables don't change in run time, so it is safe to cache. * * @return array */ private function loadConfig() { $config = []; - + // phpcs:disable Magento2.Security.Superglobal $environmentVariables = $_ENV; - + // phpcs:enable + if (null !== $this->loadConfigCache && $this->loadConfigCacheEnv === $environmentVariables) { + return $this->loadConfigCache; + } foreach ($environmentVariables as $template => $value) { if (!$this->placeholder->isApplicable($template)) { continue; } - $config = $this->arrayManager->set( $this->placeholder->restore($template), $config, $value ); } - + $this->loadConfigCache = $config; + $this->loadConfigCacheEnv = $environmentVariables; return $config; } } diff --git a/app/code/Magento/Store/Model/Config/Placeholder.php b/app/code/Magento/Store/Model/Config/Placeholder.php index e7e763aa28e8b..3b6ad503cf5a5 100644 --- a/app/code/Magento/Store/Model/Config/Placeholder.php +++ b/app/code/Magento/Store/Model/Config/Placeholder.php @@ -43,41 +43,22 @@ public function __construct(\Magento\Framework\App\RequestInterface $request, $u * * @param array $data * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function process(array $data = []) { - // check provided arguments if (empty($data)) { return []; } - - // initialize $pointer, $parents and $level variable - reset($data); - $pointer = &$data; - $parents = []; - $level = 0; - - while ($level >= 0) { - $current = &$pointer[key($pointer)]; - if (is_array($current)) { - reset($current); - $parents[$level] = &$pointer; - $pointer = &$current; - $level++; - } else { - $current = $this->_processPlaceholders($current, $data); - - // move pointer of last queue layer to next element - // or remove layer if all path elements were processed - while ($level >= 0 && next($pointer) === false) { - $level--; - // removal of last element of $parents is skipped here for better performance - // on next iteration that element will be overridden - $pointer = &$parents[$level]; + array_walk_recursive( + $data, + function (&$value, $key, $data) { + if (is_string($value) && str_contains($value, '{')) { // If _getPlaceholder() would do nothing, skip + $value = $this->_processPlaceholders($value, $data); } - } - } - + }, + $data + ); return $data; } @@ -85,6 +66,7 @@ public function process(array $data = []) * Process array data recursively * * @deprecated 101.0.4 This method isn't used in process() implementation anymore + * @see process() * * @param array &$data * @param string $path @@ -179,6 +161,7 @@ protected function _getValue($path, array $data) * Set array value by path * * @deprecated 101.0.4 This method isn't used in process() implementation anymore + * @see process() * * @param array &$container * @param string $path @@ -187,7 +170,7 @@ protected function _getValue($path, array $data) */ protected function _setValue(array &$container, $path, $value) { - $segments = explode('/', (string)$path); + $segments = explode('/', (string)$path); $currentPointer = &$container; foreach ($segments as $segment) { if (!isset($currentPointer[$segment])) { From 840f664e5e8c14b0e10812f79bf701e9984ce4d6 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Wed, 18 Jan 2023 09:48:03 +0530 Subject: [PATCH 515/985] AC-7600:UserDeletesFolderFromMediaGalleryTestCest constantly failing on mainline preserve BIC --- ...erDeletesFolderFromMediaGalleryNewTest.xml | 92 ------------------- .../UserDeletesFolderFromMediaGalleryTest.xml | 7 +- 2 files changed, 2 insertions(+), 97 deletions(-) delete mode 100755 app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml deleted file mode 100755 index 8ba8db213be6d..0000000000000 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryNewTest.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="UserDeletesFolderFromMediaGalleryNewTest"> - <annotations> - <features value="MediaGallery"/> - <stories value="User deletes folder from Media Gallery"/> - <title value="User deletes folder from Media Gallery New"/> - <testCaseId value="AC-7600"/> - <description value="User deletes folder from Media Gallery"/> - <severity value="CRITICAL"/> - <group value="media_gallery_ui"/> - </annotations> - <before> - <!-- Step1 Login as Admin --> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - - <!-- Step2 Disabled Old Media Gallery and Page Builder --> - <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> - <magentoCLI command="cache:clean config" stepKey="flushCache"/> - </before> - <after> - <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> - <magentoCLI command="cache:clean config" stepKey="flushCache"/> - </after> - - <!-- Step3 Creates folder in Media Gallery --> - <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/> - <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> - <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAny"/> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> - <argument name="name" value="wysiwyg"/> - </actionGroup> - <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> - <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createNewFolder"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="VerfyNewFolderIsCreated"/> - <conditionalClick selector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" dependentSelector="{{AdminMediaGalleryFolderSection.clearFilterFolderName}}" visible="true" stepKey="clickFilterIfAnyPostFolderCreation"/> - <click selector="{{AdminMediaGalleryFolderSection.closeInsertFileSlide}}" stepKey="closeInsertFileSlide"/> - - <!-- Step4 Open Media Gallery from wysiwyg --> - <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPageForWysiwyg"/> - <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPageFromWysiwyg"/> - - <!-- Step4.1 Delete Folder is diabled by default for no selected folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="unselectFoldersToVerifyDeleteFolderButtonStatus"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsDisabled"/> - - <!-- Step4.2 Delete Folder is enabled post selecting folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderToVerifyDeleteFolderStatus"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <dontSeeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNotDisabledAnymore"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowEnabled"/> - - <!-- Step4.3 Delete Folder is disabled post selecting folder --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="deselectWysiwygFolder"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <seeElement selector="{{AdminMediaGalleryFolderSection.disabledDeleteFolderButton}}" stepKey="DeleteFolderButtonIsNowDisabledAgain"/> - - <!-- Step5 Select folder to delete --> - <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolderAgain"> - <argument name="name" value="{{AdminMediaGalleryFolderData.name}}"/> - </actionGroup> - <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="ClickOnDeleteFolderButtonForSelectedFolder"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadOnClickFolderDelete"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="verifyTheDeleteFolderMessageTitle"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="verifyTheDeleteFolderMessageContent"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDelete"/> - <click selector="{{AdminMediaGalleryFolderSection.folderCancelDeleteButton}}" stepKey="clickCancelDeleteButton"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostCancelFolderDelete"/> - <click selector="{{AdminMediaGalleryFolderSection.activeDeleteFolderButton}}" stepKey="AgainClickOnDeleteFolderButtonForSelectedFolder"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFolderDeleteAgain"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageTitle}}" stepKey="reverifyTheDeleteFolderMessageTitle"/> - <seeElement selector="{{AdminMediaGalleryFolderSection.folderDeleteMessageContent(AdminMediaGalleryFolderData.name)}}" stepKey="reverifyTheDeleteFolderMessageContent"/> - <click selector="{{AdminMediaGalleryFolderSection.folderConfirmDeleteButton}}" stepKey="clickConfirmDeleteButton"/> - <waitForPageLoad stepKey="waitForMediaGalleryPageLoadPostFinalFolderDelete"/> - </test> -</tests> - diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml index c65aa6a637aac..eeaa055d930e0 100755 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/UserDeletesFolderFromMediaGalleryTest.xml @@ -16,9 +16,6 @@ <description value="User deletes folder from Media Gallery"/> <severity value="CRITICAL"/> <group value="media_gallery_ui"/> - <skip> - <issueId value="DEPRECATED">Use UserDeletesFolderFromMediaGalleryNewTest instead.</issueId> - </skip> </annotations> <before> <!-- Step1 Login as Admin --> @@ -26,12 +23,12 @@ <!-- Step2 Disabled Old Media Gallery and Page Builder --> <magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="disablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </before> <after> <magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/> - <magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="enablePageBuilder"/> <magentoCLI command="cache:clean config" stepKey="flushCache"/> </after> From 4b0ae58ae918a398ff5b52883d54bc24083ef0b5 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Wed, 18 Jan 2023 10:33:56 +0530 Subject: [PATCH 516/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4.6-develop-preserve BIC --- .../Mftf/Test/AdminUpdateUserRoleNewTest.xml | 74 ------------------- .../Mftf/Test/AdminUpdateUserRoleTest.xml | 4 +- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml deleted file mode 100644 index e13d0b43cad91..0000000000000 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminUpdateUserRoleNewTest"> - <annotations> - <features value="User"/> - <stories value="Update User Test"/> - <title value="Update admin user entity by changing user role, new test to fix AC-7467"/> - <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/> - <severity value="MAJOR"/> - <testCaseId value="MC-27895_AC-7467"/> - <group value="user"/> - <group value="mtf_migrated"/> - </annotations> - <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!--Create New User--> - <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> - <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> - <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - - <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> - <argument name="roleName" value="{{roleSales.name}}"/> - <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> - </actionGroup> - <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> - </before> - <after> - <!--Delete new User--> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultAdmin"/> - <actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteNewUser"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearUsersGridFilter"/> - <!--Delete new Role--> - <actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteCustomRole"> - <argument name="roleName" value="{{roleSales.rolename}}"/> - </actionGroup> - <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearRolesGridFilter"/> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultAdmin"/> - </after> - <!--Assign new role--> - <actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="openUserEditPage"> - <argument name="user" value="NewAdminUser"/> - </actionGroup> - <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillUserForm"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveUser"/> - <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> - <argument name="message" value="You saved the user."/> - </actionGroup> - <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="seeUserInGrid"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <!--Login as restricted user--> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsSaleRoleUser"> - <argument name="username" value="{{AdminUserWithUpdatedUserRoleToSales.username}}"/> - <argument name="password" value="{{AdminUserWithUpdatedUserRoleToSales.password}}"/> - </actionGroup> - <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="seeSuccessLoginMessage"/> - <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="navigateToAdminUsersPage"/> - <actionGroup ref="AssertUserRoleRestrictedAccessActionGroup" stepKey="seeErrorMessage"/> - </test> -</tests> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index 9afc61160745a..9267fae8c1550 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -18,9 +18,6 @@ <testCaseId value="MC-27895"/> <group value="user"/> <group value="mtf_migrated"/> - <skip> - <issueId value="DEPRECATED">Use AdminUpdateUserRoleNewTest instead</issueId> - </skip> </annotations> <before> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> @@ -31,6 +28,7 @@ <!--Create New Role--> <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> <argument name="roleName" value="{{roleSales.name}}"/> + <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </actionGroup> <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> </before> From 73a8a1e1bb35819fa5b5540b5759b414006c79a9 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Wed, 18 Jan 2023 16:45:16 +0530 Subject: [PATCH 517/985] AC-7629:: 2.4.6-beta1-Composer Integration Test Failures --- .../Model/Rule/Action/Discount/CartFixedTest.php | 9 +++++++-- .../Tax/Model/Sales/Total/Quote/TaxTest.php | 9 +++++++-- .../Magento/Tax/Model/TaxCalculationTest.php | 15 ++++++++++----- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php index 661987ad26627..c129f047057b3 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php @@ -47,6 +47,11 @@ */ class CartFixedTest extends TestCase { + /** + * @var float + */ + private const EPSILON = 0.0000000001; + /** * @var GuestCartManagementInterface */ @@ -521,11 +526,11 @@ public function testDiscountsWhenByPercentRuleAppliedFirstAndCartFixedRuleSecond $item = array_shift($items); $this->assertEquals('simple1', $item->getSku()); $this->assertEquals(5.99, $item->getPrice()); - $this->assertEquals($expectedDiscounts[$item->getSku()], $item->getDiscountAmount()); + $this->assertEqualsWithDelta($expectedDiscounts[$item->getSku()], $item->getDiscountAmount(), self::EPSILON); $item = array_shift($items); $this->assertEquals('simple2', $item->getSku()); $this->assertEquals(15.99, $item->getPrice()); - $this->assertEquals($expectedDiscounts[$item->getSku()], $item->getDiscountAmount()); + $this->assertEqualsWithDelta($expectedDiscounts[$item->getSku()], $item->getDiscountAmount(), self::EPSILON); } public function discountByPercentDataProvider() diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php index a119b6259b5f6..62397574bff50 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php @@ -23,6 +23,11 @@ */ class TaxTest extends \Magento\TestFramework\Indexer\TestCase { + /** + * @var float + */ + private const EPSILON = 0.0000000001; + /** * Utility object for setting up tax rates, tax classes and tax rules * @@ -176,7 +181,7 @@ public function testFullDiscountWithDeltaRoundingFix() protected function verifyItem($item, $expectedItemData) { foreach ($expectedItemData as $key => $value) { - $this->assertEquals($value, $item->getData($key), 'item ' . $key . ' is incorrect'); + $this->assertEqualsWithDelta($value, $item->getData($key), self::EPSILON, 'item ' . $key . ' is incorrect'); } return $this; @@ -247,7 +252,7 @@ protected function verifyQuoteAddress($quoteAddress, $expectedAddressData) if ($key == 'applied_taxes') { $this->verifyAppliedTaxes($quoteAddress->getAppliedTaxes(), $value); } else { - $this->assertEquals($value, $quoteAddress->getData($key), 'Quote address ' . $key . ' is incorrect'); + $this->assertEqualsWithDelta($value, $quoteAddress->getData($key), self::EPSILON, 'Quote address ' . $key . ' is incorrect'); } } diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php index 604a444883a26..8855e05d70492 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php @@ -15,6 +15,11 @@ */ class TaxCalculationTest extends \PHPUnit\Framework\TestCase { + /** + * @var float + */ + private const EPSILON = 0.0000000001; + /** * Object Manager * @@ -108,7 +113,7 @@ public function testCalculateTaxUnitBased($quoteDetailsData, $expected) ); $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails, 1); - $this->assertEquals($expected, $this->convertObjectToArray($taxDetails)); + $this->assertEqualsWithDelta($expected, $this->convertObjectToArray($taxDetails), self::EPSILON); } /** @@ -1286,7 +1291,7 @@ public function testCalculateTaxRowBased($quoteDetailsData, $expectedTaxDetails) $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails); - $this->assertEquals($expectedTaxDetails, $this->convertObjectToArray($taxDetails)); + $this->assertEqualsWithDelta($expectedTaxDetails, $this->convertObjectToArray($taxDetails), self::EPSILON); } /** @@ -2387,7 +2392,7 @@ public function testMultiRulesRowBased($quoteDetailsData, $expectedTaxDetails) $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails); - $this->assertEquals($expectedTaxDetails, $this->convertObjectToArray($taxDetails)); + $this->assertEqualsWithDelta($expectedTaxDetails, $this->convertObjectToArray($taxDetails), self::EPSILON); } /** @@ -2424,7 +2429,7 @@ public function testMultiRulesTotalBased($quoteDetailsData, $expectedTaxDetails) $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails); - $this->assertEquals($expectedTaxDetails, $this->convertObjectToArray($taxDetails)); + $this->assertEqualsWithDelta($expectedTaxDetails, $this->convertObjectToArray($taxDetails), self::EPSILON); } /** @@ -2471,7 +2476,7 @@ public function testMultiRulesUnitBased($quoteDetailsData, $expectedTaxDetails) $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails); - $this->assertEquals($expectedTaxDetails, $this->convertObjectToArray($taxDetails)); + $this->assertEqualsWithDelta($expectedTaxDetails, $this->convertObjectToArray($taxDetails), self::EPSILON); } /** From 78dd77e8955b85f2938d76d4cd800b031834f0e2 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 18 Jan 2023 17:14:58 +0530 Subject: [PATCH 518/985] AC-7422:Incompatible issues fix for PHP8.2 - updated core graphql compatibility with the updated webonyx/graphql-php v15.x --- .../Magento/Framework/GraphQl/Config/GraphQlReaderTest.php | 6 +----- .../Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php index 96e31a753adaa..ec41e3b159e7f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php @@ -194,11 +194,7 @@ enumValues(includeDeprecated: true) { $response = $this->graphQlController->dispatch($request); $output = $this->jsonSerializer->unserialize($response->getContent()); $expectedOutput = require __DIR__ . '/../_files/schema_response_sdl_description.php'; - $schemaResponseFields = $output['data']['__schema']['types']; - $schemaResponseFieldsFirstHalf = array_slice($schemaResponseFields, 0, 25); - $schemaResponseFieldsSecondHalf = array_slice($schemaResponseFields, -21, 21); - $mergedSchemaResponseFields = array_merge($schemaResponseFieldsFirstHalf, $schemaResponseFieldsSecondHalf); foreach ($expectedOutput as $searchTerm) { $sortFields = ['inputFields', 'fields']; @@ -215,7 +211,7 @@ function ($a, $b) { } $this->assertTrue( - (in_array($searchTerm, $mergedSchemaResponseFields)), + (in_array($searchTerm, $schemaResponseFields)), 'Missing type in the response' ); } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php index beb4b5a311c94..c2a1de0061427 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php @@ -24,6 +24,11 @@ public function __construct(EnumElement $configElement) 'name' => $configElement->getName(), 'description' => $configElement->getDescription() ]; + + if (empty($configElement->getValues())) { + $config['values'] = []; + } + foreach ($configElement->getValues() as $value) { $config['values'][$value->getValue()] = [ 'value' => $value->getValue(), From ebd8fe489ecbececbe58f127dab5a5130f311e10 Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Wed, 18 Jan 2023 17:42:06 +0530 Subject: [PATCH 519/985] AC-7629:: Static test fix --- .../Magento/Tax/Model/Sales/Total/Quote/TaxTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php index 62397574bff50..f3b43d9f2cca2 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Sales/Total/Quote/TaxTest.php @@ -252,7 +252,12 @@ protected function verifyQuoteAddress($quoteAddress, $expectedAddressData) if ($key == 'applied_taxes') { $this->verifyAppliedTaxes($quoteAddress->getAppliedTaxes(), $value); } else { - $this->assertEqualsWithDelta($value, $quoteAddress->getData($key), self::EPSILON, 'Quote address ' . $key . ' is incorrect'); + $this->assertEqualsWithDelta( + $value, + $quoteAddress->getData($key), + self::EPSILON, + 'Quote address ' . $key . ' is incorrect' + ); } } From 8dae34e11710e001cae21cf868413a1eefa55607 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 18 Jan 2023 18:14:35 +0530 Subject: [PATCH 520/985] AC-7723:Upgrade webonyx/graphql-php library to support php8.2 --- composer.json | 4 +- composer.lock | 142 ++++++++++-------- .../GraphQl/Config/GraphQlReaderTest.php | 6 +- .../GraphQl/Schema/Type/Enum/Enum.php | 5 + .../MetaReader/FieldMetaReader.php | 13 +- .../MetaReader/TypeMetaWrapperReader.php | 25 +-- lib/internal/Magento/Framework/composer.json | 4 +- 7 files changed, 110 insertions(+), 89 deletions(-) diff --git a/composer.json b/composer.json index d393e876d1319..396c881df273a 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "composer/composer": "^2.0, !=2.2.16", "elasticsearch/elasticsearch": "^7.17||^8.5", "ezyang/htmlpurifier": "^4.14", - "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", "laminas/laminas-code": "^4.5", "laminas/laminas-db": "^2.15", @@ -85,7 +85,7 @@ "tedivm/jshrink": "^1.4", "tubalmartin/cssmin": "^4.1", "web-token/jwt-framework": "^3.1", - "webonyx/graphql-php": "^14.11", + "webonyx/graphql-php": "^15.0", "wikimedia/less.php": "^3.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 634526082262e..688455bd37808 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": "989939469e4660b4d6550a12976d07ca", + "content-hash": "649f6985765f3a5722de486677fc14c5", "packages": [ { "name": "aws/aws-crt-php", @@ -1262,22 +1262,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.3", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1286,10 +1286,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1299,8 +1299,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1366,7 +1370,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.3" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -1382,20 +1386,20 @@ "type": "tidelift" } ], - "time": "2022-05-25T13:24:33+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1450,7 +1454,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1466,20 +1470,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1493,17 +1497,21 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1565,7 +1573,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1581,7 +1589,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "justinrainbow/json-schema", @@ -8849,37 +8857,41 @@ }, { "name": "webonyx/graphql-php", - "version": "v14.11.8", + "version": "v15.0.1", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3" + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/04a48693acd785330eefd3b0e4fa67df8dfee7c3", - "reference": "04a48693acd785330eefd3b0e4fa67df8dfee7c3", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/15fb39ba17faa332a2001aed5c1472117ec5abc3", + "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "^7.1 || ^8" + "php": "^7.4 || ^8" }, "require-dev": { - "amphp/amp": "^2.3", - "doctrine/coding-standard": "^6.0", - "nyholm/psr7": "^1.2", + "amphp/amp": "^2.6", + "dms/phpunit-arraysubset-asserts": "^0.4", + "ergebnis/composer-normalize": "^2.28", + "mll-lab/php-cs-fixer-config": "^4.4", + "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.82", - "phpstan/phpstan-phpunit": "0.12.18", - "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "^7.2 || ^8.5", - "psr/http-message": "^1.0", - "react/promise": "2.*", - "simpod/php-coveralls-mirror": "^3.0", - "squizlabs/php_codesniffer": "3.5.4" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "1.9.8", + "phpstan/phpstan-phpunit": "1.3.3", + "phpstan/phpstan-strict-rules": "1.4.4", + "phpunit/phpunit": "^9.5", + "psr/http-message": "^1", + "react/http": "^1.6", + "react/promise": "^2.9", + "symfony/polyfill-php81": "^1.23", + "symfony/var-exporter": "^5 || ^6", + "thecodingmachine/safe": "^1.3" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -8903,7 +8915,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.8" + "source": "https://github.com/webonyx/graphql-php/tree/v15.0.1" }, "funding": [ { @@ -8911,7 +8923,7 @@ "type": "open_collective" } ], - "time": "2022-09-21T15:35:03+00:00" + "time": "2023-01-11T14:57:18+00:00" }, { "name": "wikimedia/less.php", @@ -10593,26 +10605,26 @@ }, { "name": "magento/magento-coding-standard", - "version": "29", + "version": "30", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d" + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", - "reference": "04cae89cc3eb07c34a2c04fad05a2c8bc52c6b0d", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/ffd481875358de6de6d8b1df26f0916f8512e314", + "reference": "ffd481875358de6de6d8b1df26f0916f8512e314", "shasum": "" }, "require": { "ext-dom": "*", "ext-simplexml": "*", - "php": ">=7.3", + "php": ">=7.4", "phpcompatibility/php-compatibility": "^9.3", "rector/rector": "^0.14.8", "squizlabs/php_codesniffer": "^3.6.1", - "webonyx/graphql-php": "^14.9" + "webonyx/graphql-php": "^15.0" }, "require-dev": { "phpunit/phpunit": "^9.5.8" @@ -10635,22 +10647,22 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v29" + "source": "https://github.com/magento/magento-coding-standard/tree/v30" }, - "time": "2022-12-21T18:10:47+00:00" + "time": "2023-01-13T14:29:21+00:00" }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "34033242272420e057dab004cf884144c8416f8f" + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34033242272420e057dab004cf884144c8416f8f", - "reference": "34033242272420e057dab004cf884144c8416f8f", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/daa28ec4aceec147479f8bf1f474873bbd890050", + "reference": "daa28ec4aceec147479f8bf1f474873bbd890050", "shasum": "" }, "require": { @@ -10729,9 +10741,9 @@ ], "support": { "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.0" + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.1" }, - "time": "2022-12-12T15:31:43+00:00" + "time": "2023-01-05T22:05:27+00:00" }, { "name": "mustache/mustache", @@ -11546,16 +11558,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.4", + "version": "1.9.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" + "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/44a338ff0d5572c13fd77dfd91addb96e48c29f8", + "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8", "shasum": "" }, "require": { @@ -11585,7 +11597,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.4" + "source": "https://github.com/phpstan/phpstan/tree/1.9.12" }, "funding": [ { @@ -11601,7 +11613,7 @@ "type": "tidelift" } ], - "time": "2022-12-17T13:33:52+00:00" + "time": "2023-01-17T10:44:04+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php index 96e31a753adaa..ec41e3b159e7f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config/GraphQlReaderTest.php @@ -194,11 +194,7 @@ enumValues(includeDeprecated: true) { $response = $this->graphQlController->dispatch($request); $output = $this->jsonSerializer->unserialize($response->getContent()); $expectedOutput = require __DIR__ . '/../_files/schema_response_sdl_description.php'; - $schemaResponseFields = $output['data']['__schema']['types']; - $schemaResponseFieldsFirstHalf = array_slice($schemaResponseFields, 0, 25); - $schemaResponseFieldsSecondHalf = array_slice($schemaResponseFields, -21, 21); - $mergedSchemaResponseFields = array_merge($schemaResponseFieldsFirstHalf, $schemaResponseFieldsSecondHalf); foreach ($expectedOutput as $searchTerm) { $sortFields = ['inputFields', 'fields']; @@ -215,7 +211,7 @@ function ($a, $b) { } $this->assertTrue( - (in_array($searchTerm, $mergedSchemaResponseFields)), + (in_array($searchTerm, $schemaResponseFields)), 'Missing type in the response' ); } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php index beb4b5a311c94..c2a1de0061427 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum/Enum.php @@ -24,6 +24,11 @@ public function __construct(EnumElement $configElement) 'name' => $configElement->getName(), 'description' => $configElement->getDescription() ]; + + if (empty($configElement->getValues())) { + $config['values'] = []; + } + foreach ($configElement->getValues() as $value) { $config['values'][$value->getValue()] = [ 'value' => $value->getValue(), diff --git a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php index 217a233eae20c..e2084bfd2b266 100644 --- a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php +++ b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php @@ -7,6 +7,9 @@ namespace Magento\Framework\GraphQlSchemaStitching\GraphQlReader\MetaReader; +use GraphQL\Type\Definition\Argument; +use GraphQL\Type\Definition\InputType; + /** * Reads fields and possible arguments from a meta field */ @@ -117,15 +120,15 @@ public function read(\GraphQL\Type\Definition\FieldDefinition $fieldMeta) : arra /** * Get the argumentMetaType result array * - * @param \GraphQL\Type\Definition\InputType $typeMeta - * @param \GraphQL\Type\Definition\FieldArgument $argumentMeta + * @param InputType $typeMeta + * @param Argument $argumentMeta * @param array $result * @return array */ private function argumentMetaType( - \GraphQL\Type\Definition\InputType $typeMeta, - \GraphQL\Type\Definition\FieldArgument $argumentMeta, - $result + InputType $typeMeta, + Argument $argumentMeta, + array $result ) : array { $argumentName = $argumentMeta->name; $result['arguments'][$argumentName] = array_merge( diff --git a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php index 78e3f28763385..4086c4f641503 100644 --- a/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php +++ b/lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php @@ -7,36 +7,41 @@ namespace Magento\Framework\GraphQlSchemaStitching\GraphQlReader\MetaReader; +use GraphQL\Type\Definition\ListOfType; +use GraphQL\Type\Definition\NonNull; +use GraphQL\Type\Definition\ScalarType; +use GraphQL\Type\Definition\Type; + /** * Common cases for types that need extra formatting like wrapping or additional properties added to their definition */ class TypeMetaWrapperReader { - const ARGUMENT_PARAMETER = 'Argument'; + public const ARGUMENT_PARAMETER = 'Argument'; - const OUTPUT_FIELD_PARAMETER = 'OutputField'; + public const OUTPUT_FIELD_PARAMETER = 'OutputField'; - const INPUT_FIELD_PARAMETER = 'InputField'; + public const INPUT_FIELD_PARAMETER = 'InputField'; /** * Read from type meta data and determine wrapping types that are needed and extra properties that need to be added * - * @param \GraphQL\Type\Definition\Type $meta + * @param Type $meta * @param string $parameterType Argument|OutputField|InputField * @return array */ - public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType) : array + public function read(Type $meta, string $parameterType) : array { $result = []; - if ($meta instanceof \GraphQL\Type\Definition\NonNull) { + if ($meta instanceof NonNull) { $result['required'] = true; $meta = $meta->getWrappedType(); } else { $result['required'] = false; } - if ($meta instanceof \GraphQL\Type\Definition\ListOfType) { - $itemTypeMeta = $meta->ofType; - if ($itemTypeMeta instanceof \GraphQL\Type\Definition\NonNull) { + if ($meta instanceof ListOfType) { + $itemTypeMeta = $meta->getWrappedType(); + if ($itemTypeMeta instanceof NonNull) { $result['itemsRequired'] = true; $itemTypeMeta = $itemTypeMeta->getWrappedType(); } else { @@ -44,7 +49,7 @@ public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType) } $itemTypeName = $itemTypeMeta->name; $result['itemType'] = $itemTypeName; - if ($itemTypeMeta instanceof \GraphQL\Type\Definition\ScalarType) { + if ($itemTypeMeta instanceof ScalarType) { $result['type'] = 'ScalarArray' . $parameterType; } else { $result['type'] = 'ObjectArray' . $parameterType; diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 56ed1d28bf0ab..ef62afaaccb46 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -26,7 +26,7 @@ "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", "ezyang/htmlpurifier": "^4.14", - "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/guzzle": "^7.5", "laminas/laminas-code": "^4.5", "laminas/laminas-escaper": "^2.10", "laminas/laminas-file": "^2.11", @@ -50,7 +50,7 @@ "symfony/intl": "^5.4", "symfony/process": "^5.4", "tedivm/jshrink": "^1.4", - "webonyx/graphql-php": "^14.11", + "webonyx/graphql-php": "^15.0", "wikimedia/less.php": "^3.2" }, "archive": { From 8b73fed0b771d9d0152bf1086540918911dd0978 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 17 Jan 2023 15:31:23 +0530 Subject: [PATCH 521/985] AC-7422:Incompatible issues fix for PHP8.2-fixed integration of graphql --- .../Exception/GraphQlAlreadyExistsException.php | 14 +++++++++++++- .../Exception/GraphQlAuthenticationException.php | 14 +++++++++++++- .../Exception/GraphQlAuthorizationException.php | 15 ++++++++++++++- .../GraphQl/Exception/GraphQlInputException.php | 15 ++++++++++++++- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php index 8275219e9e554..555cc51438c15 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php @@ -8,13 +8,14 @@ namespace Magento\Framework\GraphQl\Exception; use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AlreadyExistsException; use Magento\Framework\Phrase; /** * Exception for GraphQL to be thrown when data already exists */ -class GraphQlAlreadyExistsException extends AlreadyExistsException implements ClientAware +class GraphQlAlreadyExistsException extends AlreadyExistsException implements ClientAware, ProvidesExtensions { /** * Describing a category of the error @@ -53,4 +54,15 @@ public function getCategory(): string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php index 198e4ebc0aaae..54ace2782a91a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php @@ -8,6 +8,7 @@ namespace Magento\Framework\GraphQl\Exception; use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AuthenticationException; use Magento\Framework\Phrase; @@ -16,7 +17,7 @@ * * @api */ -class GraphQlAuthenticationException extends AuthenticationException implements ClientAware +class GraphQlAuthenticationException extends AuthenticationException implements ClientAware, ProvidesExtensions { /** * Describing a category of the error @@ -55,4 +56,15 @@ public function getCategory(): string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php index 6f4ee736ebc47..1c8cfe6077b14 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php @@ -7,6 +7,8 @@ namespace Magento\Framework\GraphQl\Exception; +use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Phrase; use Magento\Framework\Exception\AuthorizationException; @@ -15,7 +17,7 @@ * * @api */ -class GraphQlAuthorizationException extends AuthorizationException implements \GraphQL\Error\ClientAware +class GraphQlAuthorizationException extends AuthorizationException implements ClientAware, ProvidesExtensions { const EXCEPTION_CATEGORY = 'graphql-authorization'; @@ -53,4 +55,15 @@ public function getCategory() : string { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php index 2c3f66f9e9765..90df11c0ae705 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php @@ -7,6 +7,7 @@ namespace Magento\Framework\GraphQl\Exception; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\AggregateExceptionInterface; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; @@ -17,7 +18,8 @@ * * @api */ -class GraphQlInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware +class GraphQlInputException extends LocalizedException + implements AggregateExceptionInterface, ClientAware, ProvidesExtensions { const EXCEPTION_CATEGORY = 'graphql-input'; @@ -84,4 +86,15 @@ public function getErrors(): array { return $this->errors; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } } From fed8b6d23ddc8f7662c8ec2866977bd5046dcd1e Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 17 Jan 2023 17:57:44 +0530 Subject: [PATCH 522/985] AC-7422:Incompatible issues fix for PHP8.2-fixed static tests --- .../GraphQl/Exception/GraphQlAlreadyExistsException.php | 2 +- .../GraphQl/Exception/GraphQlAuthenticationException.php | 2 +- .../GraphQl/Exception/GraphQlAuthorizationException.php | 2 +- .../Framework/GraphQl/Exception/GraphQlInputException.php | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php index 555cc51438c15..209170a27e117 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAlreadyExistsException.php @@ -20,7 +20,7 @@ class GraphQlAlreadyExistsException extends AlreadyExistsException implements Cl /** * Describing a category of the error */ - const EXCEPTION_CATEGORY = 'graphql-already-exists'; + public const EXCEPTION_CATEGORY = 'graphql-already-exists'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php index 54ace2782a91a..a2eed01290d6c 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthenticationException.php @@ -22,7 +22,7 @@ class GraphQlAuthenticationException extends AuthenticationException implements /** * Describing a category of the error */ - const EXCEPTION_CATEGORY = 'graphql-authentication'; + public const EXCEPTION_CATEGORY = 'graphql-authentication'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php index 1c8cfe6077b14..b5cfaac8094ed 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlAuthorizationException.php @@ -19,7 +19,7 @@ */ class GraphQlAuthorizationException extends AuthorizationException implements ClientAware, ProvidesExtensions { - const EXCEPTION_CATEGORY = 'graphql-authorization'; + public const EXCEPTION_CATEGORY = 'graphql-authorization'; /** * @var boolean diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php index 90df11c0ae705..89b9b1f48aac2 100644 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlInputException.php @@ -18,10 +18,10 @@ * * @api */ -class GraphQlInputException extends LocalizedException - implements AggregateExceptionInterface, ClientAware, ProvidesExtensions +// phpcs:disable Generic.Files.LineLength.TooLong +class GraphQlInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware, ProvidesExtensions { - const EXCEPTION_CATEGORY = 'graphql-input'; + public const EXCEPTION_CATEGORY = 'graphql-input'; /** * @var boolean From b29eaafbae8c65fefaae32dfe1e2efe22c6ccd4e Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 12 Jan 2023 16:47:32 +0530 Subject: [PATCH 523/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/FloatType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php | 2 +- lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php | 2 +- .../Magento/Framework/GraphQl/Schema/Type/StringType.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index 15a6444999b2f..12f9047ea502a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public $name = "Magento_Boolean"; + public string $name = "Magento_Boolean"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php index 8e314891c6a67..c761a77d35f40 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/FloatType.php @@ -15,5 +15,5 @@ class FloatType extends \GraphQL\Type\Definition\FloatType implements InputTypeI /** * @var string */ - public $name = "Magento_Float"; + public string $name = "Magento_Float"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php index bf4a6af795a24..ef83eeeaa98a4 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IdType.php @@ -15,5 +15,5 @@ class IdType extends \GraphQL\Type\Definition\IDType implements InputTypeInterfa /** * @var string */ - public $name = "Magento_Id"; + public string $name = "Magento_Id"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php index fc9dc078deeda..1195b63be3ff9 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/IntType.php @@ -15,5 +15,5 @@ class IntType extends \GraphQL\Type\Definition\IntType implements InputTypeInter /** * @var string */ - public $name = "Magento_Int"; + public string $name = "Magento_Int"; } diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php index 653d13b214bfb..623090cf39b2c 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/StringType.php @@ -15,5 +15,5 @@ class StringType extends \GraphQL\Type\Definition\StringType implements InputTyp /** * @var string */ - public $name = "Magento_String"; + public string $name = "Magento_String"; } From 300a3498fa639fe0617e2b5bd5d887673e7f0f18 Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Wed, 18 Jan 2023 18:40:51 +0530 Subject: [PATCH 524/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop-reverted comment --- .../Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml index da18f662abf6f..9267fae8c1550 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - + <!--Create New Role--> <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> <argument name="roleName" value="{{roleSales.name}}"/> <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> From 96f46306ebce75c645c4923f7833b8c6865b0041 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Wed, 18 Jan 2023 18:51:03 +0530 Subject: [PATCH 525/985] PHP Encoding Issue Check --- app/code/Magento/Sales/Helper/Admin.php | 6 ++++-- lib/internal/Magento/Framework/Escaper.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index 0e0d8213cb791..d528483d11c41 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); +// $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -192,7 +192,9 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); +// $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; } diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index cf29e0a09af8e..4ff325116ec94 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $string = $data; //mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -114,7 +114,9 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); +// $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; } else { From 08eeecd3be87842312407eae6c37bab52be51b70 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 13 Jan 2023 17:50:08 +0530 Subject: [PATCH 526/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/GraphQl/Customer/CreateCustomerAddressTest.php | 4 ++-- .../Magento/GraphQl/Customer/CreateCustomerTest.php | 2 +- .../Magento/GraphQl/Customer/CreateCustomerV2Test.php | 2 +- .../Magento/GraphQl/Customer/UpdateCustomerAddressTest.php | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php index 6c8ded61ca368..9854ece9c19d2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php @@ -809,8 +809,8 @@ public function invalidInputDataProvider() { return [ ['', 'Syntax Error: Expected Name, found )'], - ['input: ""', 'requires type CustomerAddressInput!, found "".'], - ['input: "foo"', 'requires type CustomerAddressInput!, found "foo".'] + ['input: ""', 'Expected value of type "CustomerAddressInput", found "".'], + ['input: "foo"', 'Expected value of type "CustomerAddressInput", found "foo".'] ]; } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php index 4f2b8f7566d31..8d605fa942495 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php @@ -234,7 +234,7 @@ public function invalidEmailAddressDataProvider(): array public function testCreateCustomerIfPassedAttributeDosNotExistsInCustomerInput() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Field "test123" is not defined by type CustomerInput.'); + $this->expectExceptionMessage('Field "test123" is not defined by type "CustomerInput".'); $newFirstname = 'Richard'; $newLastname = 'Rowe'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php index df1533822424a..882b378f6f45b 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php @@ -234,7 +234,7 @@ public function invalidEmailAddressDataProvider(): array public function testCreateCustomerIfPassedAttributeDosNotExistsInCustomerInput() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Field "test123" is not defined by type CustomerCreateInput.'); + $this->expectExceptionMessage('Field "test123" is not defined by type "CustomerCreateInput".'); $newFirstname = 'Richard'; $newLastname = 'Rowe'; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php index 7b32600e74aa7..f6c4ec839b09e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php @@ -388,7 +388,7 @@ public function testUpdateCustomerAddressWithInvalidIdType() MUTATION; $this->expectException(Exception::class); - $this->expectExceptionMessage('Field "updateCustomerAddress" argument "id" requires type Int!, found "".'); + $this->expectExceptionMessage('Int cannot represent non-integer value: ""'); $this->graphQlMutation($mutation, [], '', $this->getCustomerAuthHeaders($userName, $password)); } @@ -430,9 +430,9 @@ public function invalidInputDataProvider() ['', '"input" value must be specified'], [ 'input: ""', - 'Field "updateCustomerAddress" argument "input" requires type CustomerAddressInput, found ""' + 'Expected value of type "CustomerAddressInput", found ""' ], - ['input: "foo"', 'requires type CustomerAddressInput, found "foo"'] + ['input: "foo"', 'Expected value of type "CustomerAddressInput", found "foo"'] ]; } From de3bd63e17af92a202ec1cf18c4f3d1c0a3c03fd Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Fri, 13 Jan 2023 20:21:22 +0530 Subject: [PATCH 527/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../Magento/GraphQl/Framework/ErrorHandlerTest.php | 2 +- .../Magento/GraphQl/GraphQlTypeValidationTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php index 353a9e34125bb..d1130f22599e1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/ErrorHandlerTest.php @@ -43,7 +43,7 @@ public function testErrorHandlerReportsFirstErrorOnly() self::assertCount(1, $responseData['errors']); $errorMsg = $responseData['errors'][0]['message']; - self::assertMatchesRegularExpression('/Unknown directive \"aaaaaa\"./', $errorMsg); + self::assertMatchesRegularExpression('/Unknown directive \"@aaaaaa\"./', $errorMsg); } } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php index 01597f23b49e4..f5e25ab6ea2bb 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlTypeValidationTest.php @@ -68,7 +68,7 @@ public function testIntegerExpectedWhenFloatProvided() 'currentPage' => 1.1 ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$currentPage" got invalid value 1.1; Expected type Int; ' . + $this->expectExceptionMessage('Variable "$currentPage" got invalid value 1.1; ' . 'Int cannot represent non-integer value: 1.1'); $this->graphQlQuery($query, $variables); } @@ -192,7 +192,7 @@ public function testStringExpectedWhenArrayProvided() 'quantity' => '5.60' ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$sku" got invalid value ["123.78"]; Expected type String; ' . + $this->expectExceptionMessage('Variable "$sku" got invalid value ["123.78"]; ' . 'String cannot represent a non string value: ["123.78"]'); $this->graphQlMutation($query, $variables); } @@ -215,8 +215,8 @@ public function testFloatExpectedWhenNonNumericStringProvided() 'quantity' => 'ten' ]; $this->expectException(\Exception::class); - $this->expectExceptionMessage('Variable "$quantity" got invalid value "ten"; Expected type Float; ' . - 'Float cannot represent non numeric value: ten'); + $this->expectExceptionMessage('Variable "$quantity" got invalid value "ten"; ' . + 'Float cannot represent non numeric value: "ten"'); $this->graphQlMutation($query, $variables); } From 5d976c5260be32784a5c1799f9ae3b97536eb710 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Mon, 16 Jan 2023 13:14:18 +0530 Subject: [PATCH 528/985] AC-7422:Incompatible issues fix for PHP8.2 --- .../CatalogGraphQl/Model/Resolver/Products/Query/Search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php index 2c612da4f433a..c4d189cd7cb0c 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php @@ -186,7 +186,8 @@ private function buildSearchCriteria(array $args, ResolveInfo $info): SearchCrit { $productFields = (array)$info->getFieldSelection(1); $includeAggregations = isset($productFields['filters']) || isset($productFields['aggregations']); - $processedArgs = $this->argsSelection->process((string) $info->fieldName, $args); + $fieldName = $info->fieldName ?? ""; + $processedArgs = $this->argsSelection->process((string) $fieldName, $args); $searchCriteria = $this->searchCriteriaBuilder->build($processedArgs, $includeAggregations); return $searchCriteria; From 2e520bea11b57ef788d132cdbefd9d43891b37ef Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Wed, 18 Jan 2023 19:06:56 +0530 Subject: [PATCH 529/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop-reverted new created test --- .../Mftf/Test/AdminUpdateUserRoleNewTest.xml | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml deleted file mode 100644 index 56fdeae3dc6b7..0000000000000 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserRoleNewTest.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminUpdateUserRoleNewTest"> - <annotations> - <features value="User"/> - <stories value="Update User"/> - <title value="Update admin user entity by changing user role"/> - <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/> - <severity value="MAJOR"/> - <testCaseId value="MC-27895"/> - <group value="user"/> - <group value="mtf_migrated"/> - </annotations> - <before> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <!--Create New User--> - <actionGroup ref="AdminOpenNewUserPageActionGroup" stepKey="goToNewUserPage"/> - <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillNewUserForm"/> - <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveNewUser"/> - - <actionGroup ref="AdminStartCreateUserRoleActionGroup" stepKey="startCreateUserRole"> - <argument name="roleName" value="{{roleSales.name}}"/> - <argument name="userPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> - </actionGroup> - <actionGroup ref="AdminSaveUserRoleActionGroup" stepKey="saveNewRole"/> - </before> - <after> - <!--Delete new User--> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultAdmin"/> - <actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteNewUser"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearUsersGridFilter"/> - <!--Delete new Role--> - <actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteCustomRole"> - <argument name="roleName" value="{{roleSales.rolename}}"/> - </actionGroup> - <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearRolesGridFilter"/> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultAdmin"/> - </after> - <!--Assign new role--> - <actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="openUserEditPage"> - <argument name="user" value="NewAdminUser"/> - </actionGroup> - <actionGroup ref="AdminFillNewUserFormRequiredFieldsActionGroup" stepKey="fillUserForm"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <actionGroup ref="AdminClickSaveButtonOnUserFormActionGroup" stepKey="saveUser"/> - <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> - <argument name="message" value="You saved the user."/> - </actionGroup> - <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="seeUserInGrid"> - <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> - </actionGroup> - <!--Login as restricted user--> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsSaleRoleUser"> - <argument name="username" value="{{AdminUserWithUpdatedUserRoleToSales.username}}"/> - <argument name="password" value="{{AdminUserWithUpdatedUserRoleToSales.password}}"/> - </actionGroup> - <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="seeSuccessLoginMessage"/> - <actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="navigateToAdminUsersPage"/> - <actionGroup ref="AssertUserRoleRestrictedAccessActionGroup" stepKey="seeErrorMessage"/> - </test> -</tests> From df748c43e8b542e229ad2e1d16ad775ad49bd366 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Wed, 18 Jan 2023 22:37:08 +0530 Subject: [PATCH 530/985] AC-7723:Backward compatibilies issue with phpstan version and rector phpstan version --- .../PhpStan/Formatters/FilteredErrorFormatter.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php index dc27b019f4c55..f3c30aa50c585 100644 --- a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php +++ b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php @@ -66,17 +66,7 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in return self::NO_ERRORS; } - $clearedAnalysisResult = new AnalysisResult( - $this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()), - $analysisResult->getNotFileSpecificErrors(), - $analysisResult->getInternalErrors(), - $analysisResult->getWarnings(), - $analysisResult->isDefaultLevelUsed(), - $analysisResult->getProjectConfigFile(), - $analysisResult->isResultCacheSaved() - ); - - return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output); + return $this->tableErrorFormatter->formatErrors($analysisResult, $output); } /** From 08fba0ec38237614fa8feed1872d44db18ac2188 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 18 Jan 2023 23:01:11 +0530 Subject: [PATCH 531/985] Revert "AC-7422:Incompatible issues fix for PHP8.2" This reverts commit ede05f2adc20bec98f4df0c71910e67237f079f9. Changes to be committed: modified: app/code/Magento/Sales/Helper/Admin.php modified: dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php modified: dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php modified: lib/internal/Magento/Framework/Escaper.php --- app/code/Magento/Sales/Helper/Admin.php | 6 ++---- .../Block/Product/View/MultiStoreCurrencyTest.php | 6 +++--- .../testsuite/Magento/Sales/Helper/AdminTest.php | 2 +- lib/internal/Magento/Framework/Escaper.php | 11 +++-------- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index eeec03d743412..0e0d8213cb791 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,9 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); - // phpcs:ignore Magento2.Functions.DiscouragedFunction - $data = html_entity_decode(htmlentities($data, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'ISO-8859-1'); - + $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -194,7 +192,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } - $result = htmlspecialchars_decode($domDocument->saveHTML(), ENT_QUOTES); + $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php index a225102570df7..8019681ab8ce1 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/MultiStoreCurrencyTest.php @@ -56,7 +56,7 @@ public function testMultiStoreRenderPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple2', '240,00 ', 'fixturestore'); + $this->assertProductStorePrice('simple2', '240,00 ₴', 'fixturestore'); } /** @@ -80,7 +80,7 @@ public function testMultiStoreRenderSpecialPrice(): void $this->reloadProductPriceInfo(); $this->localeResolver->setLocale('uk_UA'); - $this->assertProductStorePrice('simple', 'Special Price 143,76  Regular Price 240,00 ', 'fixturestore'); + $this->assertProductStorePrice('simple', 'Special Price 143,76 ₴ Regular Price 240,00 ₴', 'fixturestore'); } /** @@ -111,7 +111,7 @@ public function testMultiStoreRenderTierPrice(): void $this->localeResolver->setLocale('uk_UA'); $this->assertProductStorePrice( 'simple-product-tax-none', - 'Buy 2 for 960,00  each and save 80%', + 'Buy 2 for 960,00 ₴ each and save 80%', 'fixturestore', self::TIER_PRICE_BLOCK_NAME ); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php index 78655807be6d0..7b41f9890d74a 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Helper/AdminTest.php @@ -55,7 +55,7 @@ public function escapeHtmlWithLinksDataProvider(): array [ // @codingStandardsIgnoreStart 'Authorized amount of €30.00. Transaction ID: "<a target="_blank" href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', - 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', + 'Authorized amount of €30.00. Transaction ID: "<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=123456789QWERTY">123456789QWERTY</a>"', // @codingStandardsIgnoreEnd 'allowedTags' => ['b', 'br', 'strong', 'i', 'u', 'a'], ], diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index f25471d2de45e..cf29e0a09af8e 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -17,7 +17,7 @@ class Escaper { /** * HTML special characters flag - * @var $htmlSpecialCharsFlag + * @var int */ private $htmlSpecialCharsFlag = ENT_QUOTES | ENT_SUBSTITUTE; @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = @iconv("UTF-8", "ISO-8859-1//IGNORE", $data); + $string = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -114,7 +114,7 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; } else { @@ -347,7 +347,6 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeJsQuote($data, $quote = '\'') { @@ -368,7 +367,6 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeXssInUrl($data) { @@ -417,7 +415,6 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ public function escapeQuote($data, $addSlashes = false) { @@ -432,7 +429,6 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getEscaper() { @@ -448,7 +444,6 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 - * @see 6729b6e01368248abc33300208eb292c95050203 */ private function getLogger() { From e45dfad76e121a135d1ca3c62e541d095adf60b8 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 18 Jan 2023 23:16:25 +0530 Subject: [PATCH 532/985] AC-7422:Incompatible issues fix for PHP8.2 - reverted changed for upgraded league/flysystem-aws-s3-v3 package --- .../Driver/Adapter/CachedAdapter.php | 40 +++++------ composer.json | 4 +- composer.lock | 68 +++++++++---------- 3 files changed, 49 insertions(+), 63 deletions(-) diff --git a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php index ec0b787049f6d..605a1a66e3867 100644 --- a/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php +++ b/app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php @@ -50,7 +50,7 @@ public function __construct( } /** - * @inheritdoc + * {@inheritdoc} */ public function write(string $path, string $contents, Config $config): void { @@ -63,7 +63,7 @@ public function write(string $path, string $contents, Config $config): void } /** - * @inheritdoc + * {@inheritdoc} */ public function writeStream(string $path, $contents, Config $config): void { @@ -76,7 +76,7 @@ public function writeStream(string $path, $contents, Config $config): void } /** - * @inheritdoc + * {@inheritdoc} */ public function move(string $source, string $destination, Config $config): void { @@ -85,7 +85,7 @@ public function move(string $source, string $destination, Config $config): void } /** - * @inheritdoc + * {@inheritdoc} */ public function copy(string $source, string $destination, Config $config): void { @@ -94,7 +94,7 @@ public function copy(string $source, string $destination, Config $config): void } /** - * @inheritdoc + * {@inheritdoc} */ public function delete(string $path): void { @@ -103,7 +103,7 @@ public function delete(string $path): void } /** - * @inheritdoc + * {@inheritdoc} */ public function deleteDirectory(string $path): void { @@ -112,7 +112,7 @@ public function deleteDirectory(string $path): void } /** - * @inheritdoc + * {@inheritdoc} */ public function createDirectory(string $path, Config $config): void { @@ -123,7 +123,7 @@ public function createDirectory(string $path, Config $config): void } /** - * @inheritdoc + * {@inheritdoc} */ public function setVisibility(string $path, string $visibility): void { @@ -132,7 +132,7 @@ public function setVisibility(string $path, string $visibility): void } /** - * @inheritdoc + * {@inheritdoc} */ public function fileExists(string $path): bool { @@ -165,7 +165,7 @@ public function fileExists(string $path): bool } /** - * @inheritdoc + * {@inheritdoc} */ public function read(string $path): string { @@ -173,7 +173,7 @@ public function read(string $path): string } /** - * @inheritdoc + * {@inheritdoc} */ public function readStream(string $path) { @@ -181,7 +181,7 @@ public function readStream(string $path) } /** - * @inheritdoc + * {@inheritdoc} */ public function listContents(string $path, bool $deep): iterable { @@ -189,7 +189,7 @@ public function listContents(string $path, bool $deep): iterable } /** - * @inheritdoc + * {@inheritdoc} */ public function fileSize(string $path): FileAttributes { @@ -198,7 +198,7 @@ public function fileSize(string $path): FileAttributes } /** - * @inheritdoc + * {@inheritdoc} */ public function mimeType(string $path): FileAttributes { @@ -207,7 +207,7 @@ public function mimeType(string $path): FileAttributes } /** - * @inheritdoc + * {@inheritdoc} */ public function lastModified(string $path): FileAttributes { @@ -216,19 +216,11 @@ public function lastModified(string $path): FileAttributes } /** - * @inheritdoc + * {@inheritdoc} */ public function visibility(string $path): FileAttributes { $result = $this->metadataProvider->getMetadata($path); return new FileAttributes($path, null, $result['visibility']); } - - /** - * @inheritdoc - */ - public function directoryExists(string $path): bool // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock - { - // TODO: Implement directoryExists() method. - } } diff --git a/composer.json b/composer.json index 4f258699c5dd3..396c881df273a 100644 --- a/composer.json +++ b/composer.json @@ -63,8 +63,8 @@ "laminas/laminas-stdlib": "^3.11", "laminas/laminas-uri": "^2.9", "laminas/laminas-validator": "^2.23", - "league/flysystem": "^3.12", - "league/flysystem-aws-s3-v3": "^3.12", + "league/flysystem": "^2.4", + "league/flysystem-aws-s3-v3": "^2.4", "magento/composer": "^1.9.0-beta2", "magento/composer-dependency-version-audit-plugin": "^0.1", "magento/magento-composer-installer": ">=0.4.0-beta1", diff --git a/composer.lock b/composer.lock index d3d13ddc7f34f..85f7d7ae1a10b 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": "69368fdd7fac76180f361326aee28c7e", + "content-hash": "649f6985765f3a5722de486677fc14c5", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.257.0", + "version": "3.257.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "26091e15fbc57e93f939ddfe0410161cd9fdbd54" + "reference": "2511f952db0717407df0c4220068c010ccaa2de2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/26091e15fbc57e93f939ddfe0410161cd9fdbd54", - "reference": "26091e15fbc57e93f939ddfe0410161cd9fdbd54", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2511f952db0717407df0c4220068c010ccaa2de2", + "reference": "2511f952db0717407df0c4220068c010ccaa2de2", "shasum": "" }, "require": { @@ -146,9 +146,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.257.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.257.2" }, - "time": "2023-01-12T19:23:11+00:00" + "time": "2023-01-17T19:19:40+00:00" }, { "name": "brick/math", @@ -4049,44 +4049,39 @@ }, { "name": "league/flysystem", - "version": "3.12.1", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "b934123c1f11ada6363d057d691e3065fa6d6d49" + "reference": "8aaffb653c5777781b0f7f69a5d937baf7ab6cdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b934123c1f11ada6363d057d691e3065fa6d6d49", - "reference": "b934123c1f11ada6363d057d691e3065fa6d6d49", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8aaffb653c5777781b0f7f69a5d937baf7ab6cdb", + "reference": "8aaffb653c5777781b0f7f69a5d937baf7ab6cdb", "shasum": "" }, "require": { + "ext-json": "*", "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" + "php": "^7.2 || ^8.0" }, "conflict": { - "aws/aws-sdk-php": "3.209.31 || 3.210.0", - "guzzlehttp/guzzle": "<7.0", - "guzzlehttp/ringphp": "<1.1.1", - "phpseclib/phpseclib": "3.0.15", - "symfony/http-client": "<5.2" + "guzzlehttp/ringphp": "<1.1.1" }, "require-dev": { "async-aws/s3": "^1.5", - "async-aws/simple-s3": "^1.1", - "aws/aws-sdk-php": "^3.220.0", + "async-aws/simple-s3": "^1.0", + "aws/aws-sdk-php": "^3.132.4", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", - "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.5", + "friendsofphp/php-cs-fixer": "^3.2", "google/cloud-storage": "^1.23", - "microsoft/azure-storage-blob": "^1.1", - "phpseclib/phpseclib": "^3.0.14", + "phpseclib/phpseclib": "^2.0", "phpstan/phpstan": "^0.12.26", - "phpunit/phpunit": "^9.5.11", - "sabre/dav": "^4.3.1" + "phpunit/phpunit": "^8.5 || ^9.4", + "sabre/dav": "^4.1" }, "type": "library", "autoload": { @@ -4120,7 +4115,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.12.1" + "source": "https://github.com/thephpleague/flysystem/tree/2.5.0" }, "funding": [ { @@ -4136,30 +4131,29 @@ "type": "tidelift" } ], - "time": "2023-01-06T16:34:48+00:00" + "time": "2022-09-17T21:02:32+00:00" }, { "name": "league/flysystem-aws-s3-v3", - "version": "3.12.1", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "ea100348d497585687e4ad487bf150b0d766b46d" + "reference": "2ae435f7177fd5d3afc0090bc7f849093d8361e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/ea100348d497585687e4ad487bf150b0d766b46d", - "reference": "ea100348d497585687e4ad487bf150b0d766b46d", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/2ae435f7177fd5d3afc0090bc7f849093d8361e8", + "reference": "2ae435f7177fd5d3afc0090bc7f849093d8361e8", "shasum": "" }, "require": { - "aws/aws-sdk-php": "^3.220.0", - "league/flysystem": "^3.10.0", + "aws/aws-sdk-php": "^3.132.4", + "league/flysystem": "^2.0.0", "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" + "php": "^7.2 || ^8.0" }, "conflict": { - "guzzlehttp/guzzle": "<7.0", "guzzlehttp/ringphp": "<1.1.1" }, "type": "library", @@ -4190,7 +4184,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.12.1" + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/2.5.0" }, "funding": [ { @@ -4206,7 +4200,7 @@ "type": "tidelift" } ], - "time": "2023-01-06T15:19:01+00:00" + "time": "2022-09-09T19:33:51+00:00" }, { "name": "league/mime-type-detection", From 1a77106aecee38828db4b6aaf0fcc1c6052929ab Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 19 Jan 2023 00:04:44 +0530 Subject: [PATCH 533/985] AC-7422:Incompatible issues fix for PHP8.2 - Fixed static tests cases --- composer.json | 2 +- composer.lock | 14 +++++++------- .../PhpStan/Formatters/FilteredErrorFormatter.php | 14 +++++++++++++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 396c881df273a..dd4fb189128df 100644 --- a/composer.json +++ b/composer.json @@ -98,7 +98,7 @@ "magento/magento2-functional-testing-framework": "^4.0", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", - "phpstan/phpstan": "^1.7", + "phpstan/phpstan": "1.9.2", "phpunit/phpunit": "^9.5", "sebastian/phpcpd": "^6.0", "symfony/finder": "^5.4" diff --git a/composer.lock b/composer.lock index 85f7d7ae1a10b..0ab8e3cc97ff3 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": "649f6985765f3a5722de486677fc14c5", + "content-hash": "6009f7b2592b32f538a6ed701473c608", "packages": [ { "name": "aws/aws-crt-php", @@ -11575,16 +11575,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.12", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8" + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/44a338ff0d5572c13fd77dfd91addb96e48c29f8", - "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", "shasum": "" }, "require": { @@ -11614,7 +11614,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.12" + "source": "https://github.com/phpstan/phpstan/tree/1.9.2" }, "funding": [ { @@ -11630,7 +11630,7 @@ "type": "tidelift" } ], - "time": "2023-01-17T10:44:04+00:00" + "time": "2022-11-10T09:56:11+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php index f3c30aa50c585..5ec57436df345 100644 --- a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php +++ b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php @@ -66,7 +66,19 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in return self::NO_ERRORS; } - return $this->tableErrorFormatter->formatErrors($analysisResult, $output); + //@phpstan:ignore-line + $clearedAnalysisResult = new AnalysisResult( + $this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()), + $analysisResult->getNotFileSpecificErrors(), + $analysisResult->getInternalErrors(), + $analysisResult->getWarnings(), + $analysisResult->getCollectedData(), + $analysisResult->isDefaultLevelUsed(), + $analysisResult->getProjectConfigFile(), + $analysisResult->isResultCacheSaved() + ); + + return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output); } /** From bd9671f35541a993f4aebb98f64e63378152c921 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 19 Jan 2023 01:01:50 +0530 Subject: [PATCH 534/985] AC-7422:Incompatible issues fix for PHP8.2 - Fixed Unit Test cases --- app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php index cce07c32e9056..965ecaf6565db 100644 --- a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php +++ b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php @@ -435,7 +435,7 @@ public function testSearchDirectory(): void new \League\Flysystem\DirectoryAttributes('path/1/'), new \League\Flysystem\DirectoryAttributes('path/2/') ]; - $expectedResult = [self::URL . 'path/1', self::URL . 'path/2']; + $expectedResult = [self::URL . 'path/1/', self::URL . 'path/2/']; $this->metadataProviderMock->expects(self::any())->method('getMetadata') ->willReturnMap([ ['path', ['type' => AwsS3::TYPE_DIR]], From 732ef67b530b169a00fc147306cdf50e2e276a94 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Wed, 18 Jan 2023 14:25:14 -0600 Subject: [PATCH 535/985] ACP2E-1541: There is a problem with the magento report order screen --- .../Block/Adminhtml/Grid/Column/Renderer/Currency.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php index 97d0493c5d9dd..c7dc0b3cdd098 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php @@ -138,10 +138,10 @@ private function getStoreCurrencyRate(string $currencyCode, DataObject $row): fl $catalogPriceScope = $this->getCatalogPriceScope(); $adminCurrencyCode = $this->getAdminCurrencyCode(); - if (($catalogPriceScope != 0 + if (((int)$catalogPriceScope !== 0 && $adminCurrencyCode !== $currencyCode)) { - $storeCurrency = $this->currencyFactory->create()->load($adminCurrencyCode); - $currencyRate = $storeCurrency->getRate($currencyCode); + $storeCurrency = $this->currencyFactory->create()->load($currencyCode); + $currencyRate = $storeCurrency->getRate($adminCurrencyCode); } else { $currencyRate = $this->_getRate($row); } From 4a1280db2ac35f103c715e6ed2aee11f190973ad Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Thu, 19 Jan 2023 12:01:22 +0530 Subject: [PATCH 536/985] AC-7629:: Fix for Statisc failures --- .../testsuite/Magento/Tax/Model/TaxCalculationTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php index 8855e05d70492..44633c95f6f99 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxCalculationTest.php @@ -21,15 +21,11 @@ class TaxCalculationTest extends \PHPUnit\Framework\TestCase private const EPSILON = 0.0000000001; /** - * Object Manager - * * @var \Magento\Framework\ObjectManagerInterface */ private $objectManager; /** - * Tax calculation service - * * @var \Magento\Tax\Api\TaxCalculationInterface */ private $taxCalculationService; From d01ac8dd8f81c044baa3ad27d2856a66379f8b6a Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Thu, 19 Jan 2023 12:59:47 +0530 Subject: [PATCH 537/985] AC-7629:: Fix for static failures - 02 --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index 12f9047ea502a..de253d9fed6da 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public string $name = "Magento_Boolean"; + public string $name = "Magento_Boolean"; } From 0e186a4e890688e6942497c2f9292e4578b7e020 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 19 Jan 2023 13:17:44 +0530 Subject: [PATCH 538/985] AC-7737: Incompatible issues fix for PHP8.2, Encoding and decoding issue in mb_convert_encoding --- app/code/Magento/Sales/Helper/Admin.php | 11 ++++++++--- lib/internal/Magento/Framework/Escaper.php | 13 +++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index d528483d11c41..f6425e640de91 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -166,7 +166,13 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) $internalErrors = libxml_use_internal_errors(true); -// $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $convmap = [0x80, 0x10FFFF, 0, 0x1FFFFF]; + $data = mb_encode_numericentity( + $data, + $convmap, + 'UTF-8' + ); + $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' ); @@ -191,8 +197,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } } - -// $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + // phpcs:ignore Magento2.Functions.DiscouragedFunction $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index 4ff325116ec94..6c4ef1767d16d 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -97,7 +97,12 @@ function ($errorNumber, $errorString) { } ); $data = $this->prepareUnescapedCharacters($data); - $string = $data; //mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); + $convmap = [0x80, 0x10FFFF, 0, 0x1FFFFF]; + $string = mb_encode_numericentity( + $data, + $convmap, + 'UTF-8' + ); try { $domDocument->loadHTML( '<html><body id="' . $wrapperElementId . '">' . $string . '</body></html>' @@ -114,7 +119,6 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); -// $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); @@ -349,6 +353,7 @@ public function escapeCss($string) * @param string $quote * @return string|array * @deprecated 101.0.0 + * @see MAGETWO-54971 */ public function escapeJsQuote($data, $quote = '\'') { @@ -369,6 +374,7 @@ public function escapeJsQuote($data, $quote = '\'') * @param string $data * @return string * @deprecated 101.0.0 + * @see MAGETWO-54971 */ public function escapeXssInUrl($data) { @@ -417,6 +423,7 @@ private function escapeScriptIdentifiers(string $data): string * @param bool $addSlashes * @return string * @deprecated 101.0.0 + * @see MAGETWO-54971 */ public function escapeQuote($data, $addSlashes = false) { @@ -431,6 +438,7 @@ public function escapeQuote($data, $addSlashes = false) * * @return \Magento\Framework\ZendEscaper * @deprecated 101.0.0 + * @see MAGETWO-54971 */ private function getEscaper() { @@ -446,6 +454,7 @@ private function getEscaper() * * @return \Psr\Log\LoggerInterface * @deprecated 101.0.0 + * @see MAGETWO-54971 */ private function getLogger() { From e01317aae5170f21817442b41cdf62e6b38427cd Mon Sep 17 00:00:00 2001 From: Pradipta Guha <glo35082@adobe.com> Date: Thu, 19 Jan 2023 13:45:31 +0530 Subject: [PATCH 539/985] AC-7629:: Fix for static failure - 03 --- .../Magento/Framework/GraphQl/Schema/Type/BooleanType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php index de253d9fed6da..12f9047ea502a 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/Type/BooleanType.php @@ -15,5 +15,5 @@ class BooleanType extends \GraphQL\Type\Definition\BooleanType implements InputT /** * @var string */ - public string $name = "Magento_Boolean"; + public string $name = "Magento_Boolean"; } From 9eb8179a987090f0c2ee9e18018127459f3a70b4 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 19 Jan 2023 14:46:59 +0530 Subject: [PATCH 540/985] AC-7738:Update webonyx/graphql-php version in module-graphql --- app/code/Magento/GraphQl/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/GraphQl/composer.json b/app/code/Magento/GraphQl/composer.json index b81c3a924d4e5..af1fe042c6df5 100644 --- a/app/code/Magento/GraphQl/composer.json +++ b/app/code/Magento/GraphQl/composer.json @@ -9,7 +9,7 @@ "magento/module-webapi": "*", "magento/module-new-relic-reporting": "*", "magento/module-authorization": "*", - "webonyx/graphql-php": "^14.11" + "webonyx/graphql-php": "^15.0" }, "suggest": { "magento/module-graph-ql-cache": "*" From 7bd45ea6c5802142026d89c3b5ff541f98e6dd51 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 19 Jan 2023 12:49:33 +0200 Subject: [PATCH 541/985] ACP2E-1514: Front-end re-order function applies same backend custom price added mftf test --- .../Test/Mftf/Section/OrdersGridSection.xml | 1 + ...StorefrontReorderAsCustomerCustomPrice.xml | 92 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml diff --git a/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml index 340448eded2d2..0bc18af8c84af 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/OrdersGridSection.xml @@ -23,6 +23,7 @@ <element name="setQuantity" type="checkbox" selector="//td[contains(., '{{arg}}')]/following-sibling::td[contains(@class, 'col-qty')]/input" parameterized="true"/> <element name="addProductsToOrder" type="button" selector="//span[text()='Add Selected Product(s) to Order']"/> <element name="customPrice" type="checkbox" selector="//span[.='{{arg}}']/parent::td/following-sibling::td/div//span[contains(text(),'Custom Price')]" parameterized="true"/> + <element name="customPriceInput" type="input" selector="//span[.='{{arg}}']/parent::td/following-sibling::td/input[@class='input-text item-price admin__control-text']" parameterized="true"/> <element name="customQuantity" type="input" selector="//span[.='{{arg}}']/parent::td/following-sibling::td[@class='col-qty']/input" parameterized="true"/> <element name="update" type="button" selector="//span[text()='Update Items and Quantities']"/> <element name="discount" type="text" selector="//span[.='{{arg}}']/parent::td/following-sibling::td[@class='col-discount col-price']/span" parameterized="true"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml new file mode 100644 index 0000000000000..27c9ab61a553a --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontReorderAsCustomerCustomPrice"> + <annotations> + <stories value="Reorder"/> + <title value="Make reorder as customer on frontend"/> + <description value="Make reorder with custom product price on frontend"/> + <severity value="CRITICAL"/> + <testCaseId value="AC-7712"/> + <group value="sales"/> + </annotations> + <before> + <!--Enable flat rate shipping--> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" + stepKey="enableFlatRate"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> + <field key="price">100.00</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Create Customer Account --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + </before> + <after> + <!-- Disable shipping method for customer with default address --> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="LogoutAsAdmin"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + </after> + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> + + <!--Create new order--> + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder"> + <argument name="customer" value="Simple_US_Customer"/> + </actionGroup> + + <!--Click on "Add products by SKU" button > Type SKU > And add it to order without qty value--> + <click selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}" stepKey="clickAddProductsBySKUButton"/> + <waitForElementVisible stepKey="waitForElementVisible" selector="{{AdminOrderFormItemsSection.skuNumber('0')}}"/> + <fillField selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" stepKey="typeCreatedProductGroupSKU" userInput="$$createSimpleProduct.sku$$"/> + <fillField selector="{{AdminOrderFormItemsSection.qty('0')}}" stepKey="setOrderItemQuantity" userInput="1"/> + <pressKey selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKey"/> + <waitForPageLoad stepKey="WaitForProductAdd"/> + <waitForLoadingMaskToDisappear stepKey="wait1"/> + + <!-- Set product custom price --> + <click selector="{{OrdersGridSection.customPrice($$createSimpleProduct.name$$)}}" stepKey="ClickOnCustomPrice"/> + <fillField selector="{{OrdersGridSection.customPriceInput($$createSimpleProduct.name$$)}}" userInput="10.00" stepKey="FillCustomPrice"/> + <click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantities"/> + <waitForPageLoad stepKey="waitForItemsAndQuantitesUpdating"/> + + <!--Select FlatRate shipping method--> + <actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="orderSelectFlatRateShippingMethod"/> + + <!--Submit order--> + <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="submitOrder"/> + <waitForPageLoad stepKey="WaitForOrderSubmit"/> + + <!--Login customer on storefront--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer"> + <argument name="Customer" value="$$createCustomer$$" /> + </actionGroup> + + <!-- Go to my Orders page --> + <amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="onMyAccount"/> + <waitForPageLoad stepKey="waitForAccountPage"/> + <click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Orders')}}" stepKey="clickOnMyOrders"/> + <waitForPageLoad stepKey="waitForOrdersLoad"/> + + <!-- Clicking on Reorder link from Order Details Tab --> + <click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/> + + <!-- Validate product subtotal --> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart"> + <argument name="subtotal" value="100.00"/> + <argument name="shipping" value="5.00"/> + <argument name="shippingMethod" value="Flat Rate - Fixed"/> + <argument name="total" value="105.00"/> + </actionGroup> + </test> +</tests> From 95290b781e23c36a849fdfc7fb4275959594adee Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 19 Jan 2023 15:25:21 +0200 Subject: [PATCH 542/985] ACP2E-1514: Front-end re-order function applies same backend custom price added mftf test --- ...StorefrontReorderAsCustomerCustomPrice.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml index 27c9ab61a553a..b1188bd889a5b 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml @@ -31,7 +31,8 @@ </before> <after> <!-- Disable shipping method for customer with default address --> - <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" + stepKey="disableFlatRate"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="LogoutAsAdmin"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> @@ -44,21 +45,25 @@ <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder"> <argument name="customer" value="Simple_US_Customer"/> </actionGroup> + <waitForPageLoad stepKey="WaitForCreateOrderPage"/> - <!--Click on "Add products by SKU" button > Type SKU > And add it to order without qty value--> + <!--Click on "Add products by SKU" button > Type SKU > And add it to order with 1 qty value--> <click selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}" stepKey="clickAddProductsBySKUButton"/> <waitForElementVisible stepKey="waitForElementVisible" selector="{{AdminOrderFormItemsSection.skuNumber('0')}}"/> - <fillField selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" stepKey="typeCreatedProductGroupSKU" userInput="$$createSimpleProduct.sku$$"/> + <fillField selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" stepKey="typeCreatedProductGroupSKU" + userInput="$$createSimpleProduct.sku$$"/> <fillField selector="{{AdminOrderFormItemsSection.qty('0')}}" stepKey="setOrderItemQuantity" userInput="1"/> - <pressKey selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKey"/> + <pressKey selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" + stepKey="pressKey"/> <waitForPageLoad stepKey="WaitForProductAdd"/> - <waitForLoadingMaskToDisappear stepKey="wait1"/> + <waitForLoadingMaskToDisappear stepKey="WaitForProductAddLoading"/> <!-- Set product custom price --> <click selector="{{OrdersGridSection.customPrice($$createSimpleProduct.name$$)}}" stepKey="ClickOnCustomPrice"/> - <fillField selector="{{OrdersGridSection.customPriceInput($$createSimpleProduct.name$$)}}" userInput="10.00" stepKey="FillCustomPrice"/> + <fillField selector="{{OrdersGridSection.customPriceInput($$createSimpleProduct.name$$)}}" userInput="10.00" + stepKey="FillCustomPrice"/> <click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantities"/> - <waitForPageLoad stepKey="waitForItemsAndQuantitesUpdating"/> + <waitForPageLoad stepKey="waitForItemsAndQuantitiesUpdating"/> <!--Select FlatRate shipping method--> <actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="orderSelectFlatRateShippingMethod"/> From a52af42efd8bac7b6e543e2a505151a9e3ff12d2 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Thu, 19 Jan 2023 20:09:05 +0530 Subject: [PATCH 543/985] AC-7737: Incompatible issues fix for PHP8.2, Encoding and decoding issue in mb_convert_encoding --- app/code/Magento/Sales/Helper/Admin.php | 13 +++++++++++-- lib/internal/Magento/Framework/Escaper.php | 11 ++++++++++- .../Magento/Framework/Test/Unit/EscaperTest.php | 5 +++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index f6425e640de91..1e2e5dfb79668 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -197,8 +197,17 @@ public function escapeHtmlWithLinks($data, $allowedTags = null) } } } - // phpcs:ignore Magento2.Functions.DiscouragedFunction - $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + + $result = mb_decode_numericentity( + // phpcs:ignore Magento2.Functions.DiscouragedFunction + html_entity_decode( + $domDocument->saveHTML(), + ENT_QUOTES|ENT_SUBSTITUTE, + 'UTF-8' + ), + $convmap, + 'UTF-8' + ); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); $data = !empty($matches) ? $matches[1] : ''; diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index 6c4ef1767d16d..9c249923197fb 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -119,7 +119,16 @@ function ($errorNumber, $errorString) { $this->escapeText($domDocument); $this->escapeAttributeValues($domDocument); - $result = html_entity_decode($domDocument->saveHTML(), ENT_QUOTES, 'UTF-8'); + $result = mb_decode_numericentity( + // phpcs:ignore Magento2.Functions.DiscouragedFunction + html_entity_decode( + $domDocument->saveHTML(), + ENT_QUOTES|ENT_SUBSTITUTE, + 'UTF-8' + ), + $convmap, + 'UTF-8' + ); preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); return !empty($matches) ? $matches[1] : ''; diff --git a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php index c6cd5e446b79e..4e7e96f9a6253 100644 --- a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php @@ -328,6 +328,11 @@ public function escapeHtmlDataProvider() 'expected' => ' some text', 'allowedTags' => ['span'], ], + 'text with japanese lang' => [ + 'data' => '<span>だ だ だ some text in tags<br /></span>', + 'expected' => '<span>だ だ だ some text in tags</span>', + 'allowedTags' => ['span'], + ], ]; } From 1541ec85c6c384acf695d0d10109a89a2e4b4e1e Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 19 Jan 2023 17:50:38 +0200 Subject: [PATCH 544/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code refactored solution --- .../Store/Model/Config/Processor/Fallback.php | 16 +- .../Model/Config/Processor/FallbackTest.php | 154 ++++++++++++++++++ lib/internal/Magento/Framework/App/Config.php | 2 +- .../Framework/App/Test/Unit/ConfigTest.php | 2 +- 4 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php diff --git a/app/code/Magento/Store/Model/Config/Processor/Fallback.php b/app/code/Magento/Store/Model/Config/Processor/Fallback.php index 537802d312eed..91d0d33a3e30e 100644 --- a/app/code/Magento/Store/Model/Config/Processor/Fallback.php +++ b/app/code/Magento/Store/Model/Config/Processor/Fallback.php @@ -11,10 +11,7 @@ use Magento\Framework\DB\Adapter\TableNotFoundException; use Magento\Store\App\Config\Type\Scopes; use Magento\Store\Model\ResourceModel\Store; -use Magento\Store\Model\ResourceModel\Store\AllStoresCollectionFactory; use Magento\Store\Model\ResourceModel\Website; -use Magento\Store\Model\ResourceModel\Website\AllWebsitesCollection; -use Magento\Store\Model\ResourceModel\Website\AllWebsitesCollectionFactory; /** * Fallback through different scopes and merge them @@ -191,5 +188,18 @@ private function loadScopes(): void $this->storeData = []; $this->websiteData = []; } + $this->normalizeStoreData(); + } + + /** + * Sets stores code to lower case + * + * @return void + */ + private function normalizeStoreData(): void + { + foreach ($this->storeData as $key => $store) { + $this->storeData[$key]['code'] = strtolower($store['code']); + } } } diff --git a/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php b/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php new file mode 100644 index 0000000000000..602494acd07bb --- /dev/null +++ b/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php @@ -0,0 +1,154 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Store\Test\Unit\Model\Config\Processor; + +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\App\ResourceConnection; +use Magento\Store\App\Config\Type\Scopes; +use Magento\Store\Model\Config\Processor\Fallback; +use Magento\Store\Model\ResourceModel\Store; +use Magento\Store\Model\ResourceModel\Website; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class FallbackTest extends TestCase +{ + /** + * @var Scopes|Scopes&MockObject|MockObject + */ + private Scopes $scopes; + /** + * @var ResourceConnection|ResourceConnection&MockObject|MockObject + */ + private ResourceConnection $resourceConnection; + /** + * @var Store|Store&MockObject|MockObject + */ + private Store $storeResource; + /** + * @var Website|Website&MockObject|MockObject + */ + private Website $websiteResource; + /** + * @var DeploymentConfig|DeploymentConfig&MockObject|MockObject + */ + private DeploymentConfig $deploymentConfig; + /** + * @var Fallback + */ + private Fallback $fallback; + + /** + * @return void + */ + protected function setUp(): void + { + parent::setUp(); + + $this->scopes = $this->createMock(Scopes::class); + $this->resourceConnection = $this->createMock(ResourceConnection::class); + $this->storeResource = $this->createMock(Store::class); + $this->websiteResource = $this->createMock(Website::class); + $this->deploymentConfig = $this->createMock(DeploymentConfig::class); + $this->fallback = new Fallback( + $this->scopes, + $this->resourceConnection, + $this->storeResource, + $this->websiteResource, + $this->deploymentConfig + ); + } + + /** + * @return void + */ + public function testProcessWithStoreCodeCapitalLetters() + { + $storesData = $this->getStoresData(); + $websiteData = $this->getWebsitesData(); + $this->deploymentConfig->expects($this->once())->method('isDbAvailable')->willReturn(true); + $this->storeResource->expects($this->once())->method('readAllStores')->willReturn($storesData); + $this->websiteResource->expects($this->once())->method('readAllWebsites')->willReturn($websiteData); + + $result = $this->fallback->process( + [ + 'stores' => [ + 'two' => [ + 'checkout' => [ + 'options' => ['guest_checkout' => 0] + ] + ] + ], + 'websites' => [ + ['admin' => ['web' => ['routers' => ['frontend' => ['disabled' => true]]]]] + ] + ] + ); + $this->assertTrue(in_array('two', array_keys($result['stores']))); + } + + /** + * Sample stores data + * + * @return array[] + */ + private function getStoresData(): array + { + return [ + [ + 'store_id' => 0, + 'code' => 'admin', + 'website_id' => 0, + 'group_id' => 0, + 'name' => 'Admin', + 'sort_order' => 0, + 'is_active' => 1 + ], + [ + 'store_id' => 1, + 'code' => 'default', + 'website_id' => 1, + 'group_id' => 1, + 'name' => 'Default Store View', + 'sort_order' => 0, + 'is_active' => 1 + ], + [ + 'store_id' => 2, + 'code' => 'TWO', + 'website_id' => 1, + 'group_id' => 1, + 'name' => 'TWO', + 'sort_order' => 0, + 'is_active' => 1 + ] + ]; + } + + private function getWebsitesData(): array + { + return [ + [ + 'website_id' => 0, + 'code' => 'admin', + 'name' => 'Admin', + 'sort_order' => 0, + 'default_group_id' => 0, + 'is_default' => 0 + ], + [ + 'website_id' => 1, + 'code' => 'base', + 'name' => 'Main Website', + 'sort_order' => 0, + 'default_group_id' => 1, + 'is_default' => 1 + ] + ]; + } +} diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index 28cc73e53d110..dd386f6c3ff5c 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -69,7 +69,7 @@ public function getValue( $scopeCode = $scopeCode->getCode(); } if ($scopeCode) { - $configPath .= '/' . strtolower($scopeCode); + $configPath .= '/' . $scopeCode; } } if ($path) { diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php index 73e171fdc4859..9072c33512970 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php @@ -71,7 +71,7 @@ public function testGetValue($scope, $scopeCode = null) } $this->configType->expects($this->once()) ->method('get') - ->with($scope =='store' ? 'stores/path' : 'websites/mywebsite/path') + ->with($scope =='store' ? 'stores/path' : 'websites/myWebsite/path') ->willReturn(true); $this->assertTrue($this->appConfig->getValue($path, $scope, $scopeCode ?: $this->scope)); From 6481697747d929639fda7874fd88f5185d9f3ff5 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 19 Jan 2023 12:13:14 -0600 Subject: [PATCH 545/985] ACP2E-1541: There is a problem with the magento report order screen --- .../Grid/Column/Renderer/CurrencyTest.php | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php index e55cda299682e..7aa5654f7b9c1 100644 --- a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php +++ b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php @@ -23,6 +23,8 @@ use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Api\Data\WebsiteInterface; use Magento\Store\Model\StoreManagerInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\ScopeInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -181,6 +183,7 @@ protected function setUp(): void * @param string $storeCurrencyCode * @param string $adminOrderAmount * @param string $convertedAmount + * @param bool $needToGetRateFromModel * @throws LocalizedException * @throws NoSuchEntityException * @throws CurrencyException @@ -195,7 +198,8 @@ public function testRender( string $adminCurrencyCode, string $storeCurrencyCode, string $adminOrderAmount, - string $convertedAmount + string $convertedAmount, + bool $needToGetRateFromModel ): void { $this->row = new DataObject( [ @@ -252,6 +256,14 @@ public function testRender( ->willReturn($currLocaleMock); $this->gridColumnMock->method('getCurrency')->willReturn('USD'); $this->gridColumnMock->method('getRateField')->willReturn('test_rate_field'); + + if ($needToGetRateFromModel) { + $this->currencyMock->expects($this->once()) + ->method('getRate') + ->with($adminCurrencyCode) + ->willReturn($rate); + } + $actualAmount = $this->model->render($this->row); $this->assertEquals($convertedAmount, $actualAmount); } @@ -272,7 +284,8 @@ public function getCurrencyDataProvider(): array 'adminCurrencyCode' => 'EUR', 'storeCurrencyCode' => 'EUR', 'adminOrderAmount' => '105.00', - 'convertedAmount' => '105.00' + 'convertedAmount' => '105.00', + 'needToGetRateFromModel' => false ], 'rate conversion with different admin and storefront rate' => [ 'rate' => 1.4150, @@ -282,8 +295,20 @@ public function getCurrencyDataProvider(): array 'adminCurrencyCode' => 'USD', 'storeCurrencyCode' => 'EUR', 'adminOrderAmount' => '105.00', - 'convertedAmount' => '148.575' - ] + 'convertedAmount' => '148.575', + 'needToGetRateFromModel' => true + ], + 'rate conversation with same rate for different currencies' => [ + 'rate' => 1.00, + 'columnIndex' => 'total_income_amount', + 'catalogPriceScope' => 1, + 'adminWebsiteId' => 1, + 'adminCurrencyCode' => 'USD', + 'storeCurrencyCode' => 'THB', + 'adminOrderAmount' => '100.00', + 'convertedAmount' => '100.00', + 'needToGetRateFromModel' => true + ], ]; } From 604dbaa23d1db0e2a15542d4a59dd3888217e86b Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 19 Jan 2023 12:17:38 -0600 Subject: [PATCH 546/985] ACP2E-1541: There is a problem with the magento report order screen --- .../Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php index 7aa5654f7b9c1..76a6c180bd0d2 100644 --- a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php +++ b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php @@ -23,8 +23,6 @@ use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Api\Data\WebsiteInterface; use Magento\Store\Model\StoreManagerInterface; -use Magento\Store\Model\Store; -use Magento\Store\Model\ScopeInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; From 95f2fc7e80238f201f2df2641991495119ca9063 Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Thu, 19 Jan 2023 13:57:55 -0600 Subject: [PATCH 547/985] ACP2E-1501: Can't make changes to an existing staging update for categories --- .../Plugin/Catalog/Category/DataProvider.php | 1 + .../Test/Mftf/Data/ConfigData.xml | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/code/Magento/GoogleOptimizer/Test/Mftf/Data/ConfigData.xml diff --git a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php index 7c0330740a151..85300a69bf7ae 100644 --- a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php +++ b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php @@ -45,6 +45,7 @@ public function afterPrepareMeta(\Magento\Catalog\Model\Category\DataProvider $s !$this->_helper->isGoogleExperimentActive(); $result['category_view_optimization']['arguments']['data']['config']['componentType'] = \Magento\Ui\Component\Form\Fieldset::NAME; + $result['category_view_optimization']['arguments']['data']['config']['label'] = ''; return $result; } diff --git a/app/code/Magento/GoogleOptimizer/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/GoogleOptimizer/Test/Mftf/Data/ConfigData.xml new file mode 100644 index 0000000000000..643b854a7ad04 --- /dev/null +++ b/app/code/Magento/GoogleOptimizer/Test/Mftf/Data/ConfigData.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="EnableGoogleAnalyticsConfigData"> + <data key="path">google/analytics/active</data> + <data key="scope">google</data> + <data key="scope_id">1</data> + <data key="label">Yes</data> + <data key="value">1</data> + </entity> + <entity name="EnableGoogleAnalyticsExperimentsConfigData"> + <data key="path">google/analytics/experiments</data> + <data key="scope">google</data> + <data key="scope_id">1</data> + <data key="label">Yes</data> + <data key="value">1</data> + </entity> + <entity name="SetGtmAccountTypeConfigData"> + <data key="path">google/analytics/type</data> + <data key="scope">google</data> + <data key="scope_id">1</data> + <data key="label">Google Tag Manager</data> + <data key="value">tag_manager</data> + </entity> + <entity name="DisableGoogleAnalyticsConfigData"> + <data key="path">google/analytics/active</data> + <data key="scope">google</data> + <data key="scope_id">1</data> + <data key="label">No</data> + <data key="value">0</data> + </entity> + <entity name="DisableGoogleAnalyticsExperimentsConfigData"> + <data key="path">google/analytics/experiments</data> + <data key="scope">google</data> + <data key="scope_id">1</data> + <data key="label">No</data> + <data key="value">0</data> + </entity> +</entities> From b4208512bce542afc8b5b0bf3a9a551a5905ee8e Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Tue, 10 Jan 2023 16:18:34 -0600 Subject: [PATCH 548/985] ACP2E-1494: Url Rewrite to external URL does not work on GraphQL --- .../Test/Fixture/CategoryUrlRewrite.php | 102 ++++++++++ .../Test/Fixture/ProductUrlRewrite.php | 102 ++++++++++ .../Test/Fixture/CmsPageUrlRewrite.php | 82 ++++++++ .../UrlRewrite/Test/Fixture/UrlRewrite.php | 82 ++++++++ .../Model/Resolver/AbstractEntityUrl.php | 176 +++++++++++------- .../Model/Resolver/Route.php | 15 +- .../Model/RoutableInterfaceTypeResolver.php | 31 +-- .../UrlRewriteGraphQl/etc/schema.graphqls | 6 +- .../Magento/GraphQl/UrlRewrite/RouteTest.php | 35 ++-- 9 files changed, 529 insertions(+), 102 deletions(-) create mode 100644 app/code/Magento/CatalogUrlRewrite/Test/Fixture/CategoryUrlRewrite.php create mode 100644 app/code/Magento/CatalogUrlRewrite/Test/Fixture/ProductUrlRewrite.php create mode 100644 app/code/Magento/CmsUrlRewrite/Test/Fixture/CmsPageUrlRewrite.php create mode 100644 app/code/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Fixture/CategoryUrlRewrite.php b/app/code/Magento/CatalogUrlRewrite/Test/Fixture/CategoryUrlRewrite.php new file mode 100644 index 0000000000000..4563931bc4537 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Fixture/CategoryUrlRewrite.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogUrlRewrite\Test\Fixture; + +use Magento\Catalog\Api\CategoryRepositoryInterface; +use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator; +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\UrlRewrite\Model\ResourceModel\UrlRewrite as UrlRewriteResourceModel; +use Magento\UrlRewrite\Model\UrlFinderInterface; +use Magento\UrlRewrite\Model\UrlRewriteFactory; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite as UrlRewriteDataModel; +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; + +class CategoryUrlRewrite extends UrlRewrite +{ + private const DEFAULT_DATA = [ + UrlRewriteDataModel::ENTITY_TYPE => 'category', + UrlRewriteDataModel::REDIRECT_TYPE => 0, + UrlRewriteDataModel::STORE_ID => 1 + ]; + + /** + * @var CategoryRepositoryInterface + */ + private CategoryRepositoryInterface $categoryRepository; + + /** + * @var CategoryUrlPathGenerator + */ + private CategoryUrlPathGenerator $categoryUrlPathGenerator; + + /** + * @var UrlFinderInterface + */ + private UrlFinderInterface $urlFinder; + + /** + * @inheritDoc + */ + public function __construct( + UrlRewriteFactory $urlRewriteFactory, + UrlRewriteResourceModel $urlRewriteResourceModel, + ProcessorInterface $dataProcessor, + CategoryRepositoryInterface $categoryRepository, + CategoryUrlPathGenerator $categoryUrlPathGenerator, + UrlFinderInterface $urlFinder + ) { + parent::__construct($urlRewriteFactory, $urlRewriteResourceModel, $dataProcessor); + $this->categoryRepository = $categoryRepository; + $this->categoryUrlPathGenerator = $categoryUrlPathGenerator; + $this->urlFinder = $urlFinder; + } + + /** + * @inheritDoc + */ + public function apply(array $data = []): ?DataObject + { + return parent::apply($this->prepareData($data)); + } + + /** + * Prepare default data + * + * @param array $data + * @return array + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + private function prepareData(array $data): array + { + $data = array_merge(self::DEFAULT_DATA, $data); + $category = $this->categoryRepository->get( + $data[UrlRewriteDataModel::ENTITY_ID], + $data[UrlRewriteDataModel::STORE_ID] + ); + if (!isset($data[UrlRewriteDataModel::TARGET_PATH])) { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->categoryUrlPathGenerator->getCanonicalUrlPath($category); + if ($data[UrlRewriteDataModel::REDIRECT_TYPE]) { + $rewrite = $this->urlFinder->findOneByData( + [ + UrlRewriteDataModel::ENTITY_ID => $data[UrlRewriteDataModel::ENTITY_ID], + UrlRewriteDataModel::TARGET_PATH => $data[UrlRewriteDataModel::TARGET_PATH], + UrlRewriteDataModel::ENTITY_TYPE => $data[UrlRewriteDataModel::ENTITY_TYPE], + UrlRewriteDataModel::STORE_ID => $data[UrlRewriteDataModel::STORE_ID], + ] + ); + if ($rewrite) { + $data[UrlRewriteDataModel::TARGET_PATH] = $rewrite->getRequestPath(); + } else { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->categoryUrlPathGenerator->getUrlPath($category); + } + } + } + return $data; + } +} diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Fixture/ProductUrlRewrite.php b/app/code/Magento/CatalogUrlRewrite/Test/Fixture/ProductUrlRewrite.php new file mode 100644 index 0000000000000..3f3f834518a83 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Fixture/ProductUrlRewrite.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogUrlRewrite\Test\Fixture; + +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator; +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\UrlRewrite\Model\ResourceModel\UrlRewrite as UrlRewriteResourceModel; +use Magento\UrlRewrite\Model\UrlFinderInterface; +use Magento\UrlRewrite\Model\UrlRewriteFactory; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite as UrlRewriteDataModel; +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; + +class ProductUrlRewrite extends UrlRewrite +{ + private const DEFAULT_DATA = [ + UrlRewriteDataModel::ENTITY_TYPE => 'category', + UrlRewriteDataModel::REDIRECT_TYPE => 0, + UrlRewriteDataModel::STORE_ID => 1 + ]; + + /** + * @var ProductRepositoryInterface + */ + private ProductRepositoryInterface $productRepository; + + /** + * @var ProductUrlPathGenerator + */ + private ProductUrlPathGenerator $productUrlPathGenerator; + + /** + * @var UrlFinderInterface + */ + private UrlFinderInterface $urlFinder; + + /** + * @inheritDoc + */ + public function __construct( + UrlRewriteFactory $urlRewriteFactory, + UrlRewriteResourceModel $urlRewriteResourceModel, + ProcessorInterface $dataProcessor, + ProductRepositoryInterface $productRepository, + ProductUrlPathGenerator $productUrlPathGenerator, + UrlFinderInterface $urlFinder + ) { + parent::__construct($urlRewriteFactory, $urlRewriteResourceModel, $dataProcessor); + $this->productRepository = $productRepository; + $this->productUrlPathGenerator = $productUrlPathGenerator; + $this->urlFinder = $urlFinder; + } + + /** + * @inheritDoc + */ + public function apply(array $data = []): ?DataObject + { + return parent::apply($this->prepareData($data)); + } + + /** + * Prepare default data + * + * @param array $data + * @return array + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + private function prepareData(array $data): array + { + $data = array_merge(self::DEFAULT_DATA, $data); + $product = $this->productRepository->getById( + $data[UrlRewriteDataModel::ENTITY_ID], + storeId: $data[UrlRewriteDataModel::STORE_ID] + ); + if (!isset($data[UrlRewriteDataModel::TARGET_PATH])) { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->productUrlPathGenerator->getCanonicalUrlPath($product); + if ($data[UrlRewriteDataModel::REDIRECT_TYPE]) { + $rewrite = $this->urlFinder->findOneByData( + [ + UrlRewriteDataModel::ENTITY_ID => $data[UrlRewriteDataModel::ENTITY_ID], + UrlRewriteDataModel::TARGET_PATH => $data[UrlRewriteDataModel::TARGET_PATH], + UrlRewriteDataModel::ENTITY_TYPE => $data[UrlRewriteDataModel::ENTITY_TYPE], + UrlRewriteDataModel::STORE_ID => $data[UrlRewriteDataModel::STORE_ID], + ] + ); + if ($rewrite) { + $data[UrlRewriteDataModel::TARGET_PATH] = $rewrite->getRequestPath(); + } else { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->productUrlPathGenerator->getUrlPath($product); + } + } + } + return $data; + } +} diff --git a/app/code/Magento/CmsUrlRewrite/Test/Fixture/CmsPageUrlRewrite.php b/app/code/Magento/CmsUrlRewrite/Test/Fixture/CmsPageUrlRewrite.php new file mode 100644 index 0000000000000..b34da19e2ad83 --- /dev/null +++ b/app/code/Magento/CmsUrlRewrite/Test/Fixture/CmsPageUrlRewrite.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CmsUrlRewrite\Test\Fixture; + +use Magento\Cms\Api\PageRepositoryInterface; +use Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator; +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\UrlRewrite\Model\ResourceModel\UrlRewrite as UrlRewriteResourceModel; +use Magento\UrlRewrite\Model\UrlRewriteFactory; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite as UrlRewriteDataModel; +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; + +class CmsPageUrlRewrite extends UrlRewrite +{ + private const DEFAULT_DATA = [ + UrlRewriteDataModel::ENTITY_TYPE => 'cms-page', + UrlRewriteDataModel::REDIRECT_TYPE => 0, + UrlRewriteDataModel::STORE_ID => 1 + ]; + + /** + * @var PageRepositoryInterface + */ + private PageRepositoryInterface $pageRepository; + + /** + * @var CmsPageUrlPathGenerator + */ + private CmsPageUrlPathGenerator $cmsPageUrlPathGenerator; + + /** + * @inheritDoc + */ + public function __construct( + UrlRewriteFactory $urlRewriteFactory, + UrlRewriteResourceModel $urlRewriteResourceModel, + ProcessorInterface $dataProcessor, + PageRepositoryInterface $pageRepository, + CmsPageUrlPathGenerator $cmsPageUrlPathGenerator + ) { + parent::__construct($urlRewriteFactory, $urlRewriteResourceModel, $dataProcessor); + $this->pageRepository = $pageRepository; + $this->cmsPageUrlPathGenerator = $cmsPageUrlPathGenerator; + } + + /** + * @inheritDoc + */ + public function apply(array $data = []): ?DataObject + { + return parent::apply($this->prepareData($data)); + } + + /** + * Prepare default data + * + * @param array $data + * @return array + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + private function prepareData(array $data): array + { + $data = array_merge(self::DEFAULT_DATA, $data); + $page = $this->pageRepository->getById( + $data[UrlRewriteDataModel::ENTITY_ID] + ); + if (!isset($data[UrlRewriteDataModel::TARGET_PATH])) { + if ($data[UrlRewriteDataModel::REDIRECT_TYPE]) { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->cmsPageUrlPathGenerator->getUrlPath($page); + } else { + $data[UrlRewriteDataModel::TARGET_PATH] = $this->cmsPageUrlPathGenerator->getCanonicalUrlPath($page); + } + } + return $data; + } +} diff --git a/app/code/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php b/app/code/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php new file mode 100644 index 0000000000000..bdcb6dd727c03 --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\UrlRewrite\Test\Fixture; + +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; +use Magento\UrlRewrite\Model\ResourceModel\UrlRewrite as UrlRewriteResourceModel; +use Magento\UrlRewrite\Model\UrlRewriteFactory; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite as UrlRewriteDataModel; + +class UrlRewrite implements RevertibleDataFixtureInterface +{ + private const DEFAULT_DATA = [ + UrlRewriteDataModel::URL_REWRITE_ID => null, + UrlRewriteDataModel::ENTITY_ID => 0, + UrlRewriteDataModel::ENTITY_TYPE => 'custom', + UrlRewriteDataModel::IS_AUTOGENERATED => 0, + UrlRewriteDataModel::REQUEST_PATH => '%uniqid%_request_path', + UrlRewriteDataModel::TARGET_PATH => '%uniqid%_target_path', + UrlRewriteDataModel::STORE_ID => 1, + UrlRewriteDataModel::REDIRECT_TYPE => 0, + UrlRewriteDataModel::DESCRIPTION => null, + UrlRewriteDataModel::METADATA => null, + ]; + /** + * @var UrlRewriteFactory + */ + private UrlRewriteFactory $urlRewriteFactory; + + /** + * @var UrlRewriteResourceModel + */ + private UrlRewriteResourceModel $urlRewriteResourceModel; + + /** + * @var ProcessorInterface + */ + private ProcessorInterface $dataProcessor; + + /** + * @inheritDoc + */ + public function __construct( + UrlRewriteFactory $urlRewriteFactory, + UrlRewriteResourceModel $urlRewriteResourceModel, + ProcessorInterface $dataProcessor + ) { + $this->urlRewriteFactory = $urlRewriteFactory; + $this->urlRewriteResourceModel = $urlRewriteResourceModel; + $this->dataProcessor = $dataProcessor; + } + + /** + * @inheritDoc + */ + public function apply(array $data = []): ?DataObject + { + $data = $this->dataProcessor->process($this, array_merge(self::DEFAULT_DATA, $data)); + $urlRewrite = $this->urlRewriteFactory->create(); + $urlRewrite->setData($data); + $this->urlRewriteResourceModel->save($urlRewrite); + return $urlRewrite; + } + + /** + * @inheritDoc + */ + public function revert(DataObject $data): void + { + $urlRewrite = $this->urlRewriteFactory->create(); + $this->urlRewriteResourceModel->load($urlRewrite, $data->getId()); + if ($urlRewrite->getId()) { + $this->urlRewriteResourceModel->delete($urlRewrite); + } + } +} diff --git a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/AbstractEntityUrl.php b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/AbstractEntityUrl.php index 94c6a89cd01ae..7df53a17c13ff 100755 --- a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/AbstractEntityUrl.php +++ b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/AbstractEntityUrl.php @@ -29,11 +29,6 @@ abstract class AbstractEntityUrl implements ResolverInterface */ private $customUrlLocator; - /** - * @var int - */ - private $redirectType; - /** * @var Uid */ @@ -64,98 +59,87 @@ public function resolve( array $value = null, array $args = null ) { - if (!isset($args['url']) || empty(trim($args['url']))) { - throw new GraphQlInputException(__('"url" argument should be specified and not empty')); - } - + $this->validateArgs($args); $storeId = (int)$context->getExtensionAttributes()->getStore()->getId(); $result = null; - // phpcs:ignore Magento2.Functions.DiscouragedFunction - $urlParts = parse_url($args['url']); - $url = $urlParts['path'] ?? $args['url']; - if (substr($url, 0, 1) === '/' && $url !== '/') { - $url = ltrim($url, '/'); - } - $this->redirectType = 0; + + $urlParts = $this->parseUrl($args['url']); + $url = $urlParts['path']; $customUrl = $this->customUrlLocator->locateUrl($url); $url = $customUrl ?: $url; - $finalUrlRewrite = $this->findFinalUrl($url, $storeId); - if ($finalUrlRewrite) { - $relativeUrl = $finalUrlRewrite->getRequestPath(); - $resultArray = $this->rewriteCustomUrls($finalUrlRewrite, $storeId) ?? [ - 'id' => $finalUrlRewrite->getEntityId(), - 'entity_uid' => $this->idEncoder->encode((string)$finalUrlRewrite->getEntityId()), - 'canonical_url' => $relativeUrl, - 'relative_url' => $relativeUrl, - 'redirectCode' => $this->redirectType, - 'redirect_code' => $this->redirectType, - 'type' => $this->sanitizeType($finalUrlRewrite->getEntityType()) - ]; - if (!empty($urlParts['query'])) { - $resultArray['relative_url'] .= '?' . $urlParts['query']; + $redirectType = 0; + $urlRewrite = $this->findUrlFromRequestPath($url, $storeId); + if ($urlRewrite) { + $redirectType = $urlRewrite->getRedirectType(); + } else { + $urlRewrite = $this->findUrlFromTargetPath($url, $storeId); + } + if ($urlRewrite) { + $finalUrlRewrite = $this->findFinalUrl($urlRewrite); + $entityId = (int) $finalUrlRewrite->getEntityId(); + $entityType = $finalUrlRewrite->getEntityType(); + if (!$entityId) { + $entityUrlRewrite = $this->findUrlFromTargetPath($finalUrlRewrite->getTargetPath(), $storeId); + $entityId = (int) $entityUrlRewrite->getEntityId(); + $entityType = $entityUrlRewrite->getEntityType(); } - - if (empty($resultArray['id'])) { + if ($redirectType === 0 && !$entityId) { throw new GraphQlNoSuchEntityException( __('No such entity found with matching URL key: %url', ['url' => $url]) ); } + $relativeUrl = $redirectType > 0 + ? $this->getRedirectPath($finalUrlRewrite) + : $urlRewrite->getRequestPath(); - $result = $resultArray; + if (!empty($urlParts['query'])) { + $relativeUrl .= '?' . $urlParts['query']; + } + $result = $this->getData($relativeUrl, $redirectType, $entityType, $entityId); } + return $result; } /** - * Handle custom urls with and without redirects + * Format and returns url data * - * @param UrlRewrite $finalUrlRewrite - * @param int $storeId - * @return array|null + * @param string $url + * @param int $redirectType + * @param string|null $entityType + * @param int|null $entityId + * @return array */ - private function rewriteCustomUrls(UrlRewrite $finalUrlRewrite, int $storeId): ?array + private function getData(string $url, int $redirectType, ?string $entityType, ?int $entityId) { - if ($finalUrlRewrite->getEntityType() === 'custom' || !($finalUrlRewrite->getEntityId() > 0)) { - $finalCustomUrlRewrite = clone $finalUrlRewrite; - $finalUrlRewrite = $this->findFinalUrl($finalCustomUrlRewrite->getTargetPath(), $storeId, true); - $relativeUrl = - $finalCustomUrlRewrite->getRedirectType() == 0 - ? $finalCustomUrlRewrite->getRequestPath() : $finalUrlRewrite->getRequestPath(); - return [ - 'id' => $finalUrlRewrite->getEntityId(), - 'entity_uid' => $this->idEncoder->encode((string)$finalUrlRewrite->getEntityId()), - 'canonical_url' => $relativeUrl, - 'relative_url' => $relativeUrl, - 'redirectCode' => $finalCustomUrlRewrite->getRedirectType(), - 'redirect_code' => $finalCustomUrlRewrite->getRedirectType(), - 'type' => $this->sanitizeType($finalUrlRewrite->getEntityType()) - ]; - } - return null; + return [ + 'id' => $entityId, + 'entity_uid' => $this->idEncoder->encode((string)$entityId), + 'canonical_url' => $url, + 'relative_url' => $url, + 'redirectCode' => $redirectType, + 'redirect_code' => $redirectType, + 'type' => $entityId ? $this->sanitizeType($entityType) : null + ]; } /** * Find the final url passing through all redirects if any * - * @param string $requestPath - * @param int $storeId - * @param bool $findCustom - * @return UrlRewrite|null + * @param UrlRewrite $urlRewrite + * @return UrlRewrite */ - private function findFinalUrl(string $requestPath, int $storeId, bool $findCustom = false): ?UrlRewrite + private function findFinalUrl(UrlRewrite $urlRewrite): UrlRewrite { - $urlRewrite = $this->findUrlFromRequestPath($requestPath, $storeId); - if ($urlRewrite) { - $this->redirectType = $urlRewrite->getRedirectType(); - while ($urlRewrite && $urlRewrite->getRedirectType() > 0) { - $urlRewrite = $this->findUrlFromRequestPath($urlRewrite->getTargetPath(), $storeId); + do { + $nextUrlRewrite = $this->findUrlFromRequestPath( + $urlRewrite->getTargetPath(), + (int) $urlRewrite->getStoreId() + ); + if ($nextUrlRewrite) { + $urlRewrite = $nextUrlRewrite; } - } else { - $urlRewrite = $this->findUrlFromTargetPath($requestPath, $storeId); - } - if ($urlRewrite && ($findCustom && !$urlRewrite->getEntityId() && !$urlRewrite->getIsAutogenerated())) { - $urlRewrite = $this->findUrlFromTargetPath($urlRewrite->getTargetPath(), $storeId); - } + } while ($nextUrlRewrite); return $urlRewrite; } @@ -200,8 +184,56 @@ private function findUrlFromTargetPath(string $targetPath, int $storeId): ?UrlRe * @param string $type * @return string */ - private function sanitizeType(string $type) : string + private function sanitizeType(string $type): string { return strtoupper(str_replace('-', '_', $type)); } + + /** + * Returns url components + * + * @param string $url + * @return array + */ + private function parseUrl(string $url): array + { + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $urlParts = parse_url($url); + if (!is_array($urlParts)) { + $urlParts = []; + $urlParts['path'] = $url; + } + if (substr($urlParts['path'], 0, 1) === '/' && $urlParts['path'] !== '/') { + $urlParts['path'] = ltrim($urlParts['path'], '/'); + } + + return $urlParts; + } + + /** + * Get path to redirect to + * + * @param UrlRewrite $urlRewrite + * @return string + */ + private function getRedirectPath(UrlRewrite $urlRewrite): string + { + return $urlRewrite->getRedirectType() > 0 + ? $urlRewrite->getTargetPath() + : $urlRewrite->getRequestPath(); + } + + /** + * Validates input + * + * @param array $args + * @return void + * @throws GraphQlInputException + */ + private function validateArgs(array $args): void + { + if (!isset($args['url']) || empty(trim($args['url']))) { + throw new GraphQlInputException(__('"url" argument should be specified and not empty')); + } + } } diff --git a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/Route.php b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/Route.php index c8602b32b1bbf..300373822b435 100755 --- a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/Route.php +++ b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/Route.php @@ -58,12 +58,15 @@ public function resolve( ); $storeId = (int)$context->getExtensionAttributes()->getStore()->getId(); if ($resultArray) { - $result = $this->entityDataProviderComposite->getData( - $resultArray['type'], - (int)$resultArray['id'], - $info, - $storeId - ); + $result = []; + if (isset($resultArray['type'])) { + $result = $this->entityDataProviderComposite->getData( + $resultArray['type'], + (int)$resultArray['id'], + $info, + $storeId + ); + } $result['redirect_code'] = $resultArray['redirect_code']; $result['relative_url'] = $resultArray['relative_url']; $result['type'] = $resultArray['type']; diff --git a/app/code/Magento/UrlRewriteGraphQl/Model/RoutableInterfaceTypeResolver.php b/app/code/Magento/UrlRewriteGraphQl/Model/RoutableInterfaceTypeResolver.php index acd027c4c6778..a100b9a20dcc2 100755 --- a/app/code/Magento/UrlRewriteGraphQl/Model/RoutableInterfaceTypeResolver.php +++ b/app/code/Magento/UrlRewriteGraphQl/Model/RoutableInterfaceTypeResolver.php @@ -7,7 +7,6 @@ namespace Magento\UrlRewriteGraphQl\Model; -use Magento\Framework\GraphQl\Exception\GraphQlInputException; use \Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface; /** @@ -15,17 +14,28 @@ */ class RoutableInterfaceTypeResolver implements TypeResolverInterface { + private const DEFAULT_TYPE = 'RoutableUrl'; + + /** + * @var TypeResolverInterface[] + */ + private array $productTypeNameResolvers; + /** - * TypeResolverInterface[] + * @var string */ - private $productTypeNameResolvers = []; + private string $defaultType; /** * @param TypeResolverInterface[] $productTypeNameResolvers + * @param string $defaultType */ - public function __construct(array $productTypeNameResolvers = []) - { + public function __construct( + array $productTypeNameResolvers = [], + string $defaultType = self::DEFAULT_TYPE + ) { $this->productTypeNameResolvers = $productTypeNameResolvers; + $this->defaultType = $defaultType; } /** @@ -40,18 +50,15 @@ public function resolveType(array $data) : string foreach ($this->productTypeNameResolvers as $productTypeNameResolver) { if (!isset($data['type_id'])) { - throw new GraphQlInputException( - __('Missing key %1 in product data', ['type_id']) - ); + $data['type_id'] = ''; } + $resolvedType = $productTypeNameResolver->resolveType($data); if (!empty($resolvedType)) { - return $resolvedType; + break; } } - throw new GraphQlInputException( - __('Concrete type for %1 not implemented', ['ProductInterface']) - ); + return $resolvedType ?: $this->defaultType; } } diff --git a/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls b/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls index 46f760c14acbc..99c8ba7ae3848 100644 --- a/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls +++ b/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls @@ -28,8 +28,12 @@ type HttpQueryParameter @doc(description: "Contains target path parameters.") { value: String @doc(description: "A parameter value.") } +type RoutableUrl implements RoutableInterface @doc(description: "Default implementation of RoutableInterface. This type is returned when the URL is not linked to an entity.") { + +} + interface RoutableInterface @typeResolver(class: "Magento\\UrlRewriteGraphQl\\Model\\RoutableInterfaceTypeResolver") @doc(description: "Routable entities serve as the model for a rendered page.") { relative_url: String @doc(description: "The internal relative URL. If the specified URL is a redirect, the query returns the redirected URL, not the original.") redirect_code: Int! @doc(description: "Contains 0 when there is no redirect error. A value of 301 indicates the URL of the requested resource has been changed permanently, while a value of 302 indicates a temporary redirect.") - type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.") + type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE") } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/UrlRewrite/RouteTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/UrlRewrite/RouteTest.php index e4109cc8f7793..4b35f8eb7a63c 100755 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/UrlRewrite/RouteTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/UrlRewrite/RouteTest.php @@ -11,6 +11,8 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Framework\Exception\AlreadyExistsException; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\GraphQlAbstract; @@ -18,9 +20,11 @@ use Magento\UrlRewrite\Model\UrlFinderInterface; use Magento\UrlRewrite\Model\UrlRewrite as UrlRewriteModel; use Magento\UrlRewrite\Service\V1\Data\UrlRewrite as UrlRewriteService; +use Magento\UrlRewrite\Test\Fixture\UrlRewrite as UrlRewriteFixture; /** * Test the GraphQL endpoint's Route query to verify url route information is correctly returned. + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class RouteTest extends GraphQlAbstract { @@ -222,19 +226,16 @@ public function getRouteQueryResponse(string $urlKey): array route(url:"{$urlKey}") { __typename + relative_url + redirect_code + type ...on SimpleProduct { - name - sku - relative_url - redirect_code - type + name + sku } ...on CategoryTree { name uid - relative_url - redirect_code - type } ...on CmsPage { title @@ -242,9 +243,6 @@ public function getRouteQueryResponse(string $urlKey): array page_layout content content_heading - relative_url - redirect_code - type } } } @@ -477,6 +475,21 @@ public function testUrlRewriteCleansCacheForCustomRewrites() $this->assertNull($apiResponse['route']); } + #[ + DataFixture(UrlRewriteFixture::class, ['redirect_type' => 301, 'target_path' => 'http://example.com'], 'url') + ] + public function testCustomUrlRewriteRedirectToExternalUrl(): void + { + $fixtures = DataFixtureStorageManager::getStorage(); + $urlRewrite = $fixtures->get('url'); + $response = $this->getRouteQueryResponse($urlRewrite->getRequestPath()); + $this->assertNotNull($response['route']); + $this->assertEquals('RoutableUrl', $response['route']['__typename']); + $this->assertEquals($urlRewrite->getTargetPath(), $response['route']['relative_url']); + $this->assertEquals($urlRewrite->getRedirectType(), $response['route']['redirect_code']); + $this->assertNull($response['route']['type']); + } + /** * Return UrlRewrite model instance by request_path * From 01cab9189cd8c22b80ea46246920c02012133f43 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 20 Jan 2023 09:21:09 +0200 Subject: [PATCH 549/985] ACP2E-1514: Front-end re-order function applies same backend custom price modified mftf test --- ...StorefrontReorderAsCustomerCustomPrice.xml | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml index b1188bd889a5b..07bb505845223 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml @@ -20,6 +20,7 @@ <!--Enable flat rate shipping--> <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createSimpleProduct"> <field key="price">100.00</field> @@ -28,6 +29,8 @@ <!-- Create Customer Account --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> </before> <after> <!-- Disable shipping method for customer with default address --> @@ -38,23 +41,17 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> </after> - <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> - <actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="onOrderPage"/> - - <!--Create new order--> + <!-- Create new order --> <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder"> <argument name="customer" value="Simple_US_Customer"/> </actionGroup> - <waitForPageLoad stepKey="WaitForCreateOrderPage"/> + <waitForElementVisible stepKey="waitForProductAddVisible" selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}"/> - <!--Click on "Add products by SKU" button > Type SKU > And add it to order with 1 qty value--> - <click selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}" stepKey="clickAddProductsBySKUButton"/> - <waitForElementVisible stepKey="waitForElementVisible" selector="{{AdminOrderFormItemsSection.skuNumber('0')}}"/> - <fillField selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" stepKey="typeCreatedProductGroupSKU" - userInput="$$createSimpleProduct.sku$$"/> - <fillField selector="{{AdminOrderFormItemsSection.qty('0')}}" stepKey="setOrderItemQuantity" userInput="1"/> - <pressKey selector="{{AdminOrderFormItemsSection.skuNumber('0')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" - stepKey="pressKey"/> + <!-- Add product to order --> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrder"> + <argument name="product" value="$$createSimpleProduct$$"/> + <argument name="productQty" value="1"/> + </actionGroup> <waitForPageLoad stepKey="WaitForProductAdd"/> <waitForLoadingMaskToDisappear stepKey="WaitForProductAddLoading"/> From 6ba7a626099afd0c32582f5fb5c656bb7a17e74b Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Fri, 20 Jan 2023 11:22:58 +0200 Subject: [PATCH 550/985] ACP2E-1514: Front-end re-order function applies same backend custom price modified mftf test --- .../Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml index 07bb505845223..14de2cb556ffc 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsCustomerCustomPrice.xml @@ -45,7 +45,6 @@ <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="CreateNewOrder"> <argument name="customer" value="Simple_US_Customer"/> </actionGroup> - <waitForElementVisible stepKey="waitForProductAddVisible" selector="{{AdminOrderFormItemsOrderedSection.addProductsBySku}}"/> <!-- Add product to order --> <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrder"> From beffa734da6fbe84c4f409ccffdd4e46bca0736a Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 20 Jan 2023 15:25:35 +0200 Subject: [PATCH 551/985] ACP2E-1456: display bundle options taking into account tax configurations --- .../Helper/Catalog/Product/Configuration.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index d657da6cbfe33..203d67e6d9508 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -8,6 +8,11 @@ use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; use Magento\Framework\App\Helper\AbstractHelper; +use Magento\Framework\App\Helper\Context; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Escaper; +use Magento\Framework\Pricing\Helper\Data; +use Magento\Framework\Serialize\Serializer\Json; /** * Helper for fetching properties by product configuration item @@ -44,25 +49,33 @@ class Configuration extends AbstractHelper implements ConfigurationInterface */ private $serializer; + /** + * @var \Magento\Catalog\Helper\Data + */ + private $catalogHelper; + /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper * @param \Magento\Framework\Escaper $escaper * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer + * @param \Magento\Catalog\Helper\Data|null $catalogHelper */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Helper\Product\Configuration $productConfiguration, \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Framework\Escaper $escaper, - \Magento\Framework\Serialize\Serializer\Json $serializer = null + \Magento\Framework\Serialize\Serializer\Json $serializer = null, + \Magento\Catalog\Helper\Data $catalogHelper = null ) { $this->productConfiguration = $productConfiguration; $this->pricingHelper = $pricingHelper; $this->escaper = $escaper; $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(\Magento\Framework\Serialize\Serializer\Json::class); + $this->catalogHelper = $catalogHelper ?? ObjectManager::getInstance()->get(\Magento\Catalog\Helper\Data::class); parent::__construct($context); } @@ -97,7 +110,7 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod /** @var \Magento\Bundle\Model\Product\Price $price */ $price = $product->getPriceModel(); - return $price->getSelectionFinalTotalPrice( + $selectionPrice = $price->getSelectionFinalTotalPrice( $product, $selectionProduct, $item->getQty(), @@ -105,6 +118,8 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod false, true ); + + return $this->catalogHelper->getTaxPrice($selectionProduct, $selectionPrice); } /** From 4b4150d199b314390688a751b41769141013204e Mon Sep 17 00:00:00 2001 From: Viktor Tymchynskyi <tymchyns@adobe.com> Date: Fri, 20 Jan 2023 09:35:26 -0600 Subject: [PATCH 552/985] ACP2E-1501: Can't make changes to an existing staging update for categories --- .../Model/Plugin/Catalog/Category/DataProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php index 85300a69bf7ae..3aea6acb915b4 100644 --- a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php +++ b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Category/DataProvider.php @@ -34,6 +34,8 @@ public function __construct( } /** + * Updates metadata. + * * @param \Magento\Catalog\Model\Category\DataProvider $subject * @param array $result * @return array From 9c8e7becb56811f69f8fc4138e38b888008d2fd8 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 20 Jan 2023 17:40:56 +0200 Subject: [PATCH 553/985] ACP2E-1456: fix static tests errors --- .../Bundle/Helper/Catalog/Product/Configuration.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 203d67e6d9508..ca7e813f3bf8c 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -8,11 +8,7 @@ use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; use Magento\Framework\App\Helper\AbstractHelper; -use Magento\Framework\App\Helper\Context; use Magento\Framework\App\ObjectManager; -use Magento\Framework\Escaper; -use Magento\Framework\Pricing\Helper\Data; -use Magento\Framework\Serialize\Serializer\Json; /** * Helper for fetching properties by product configuration item @@ -36,8 +32,6 @@ class Configuration extends AbstractHelper implements ConfigurationInterface protected $productConfiguration; /** - * Escaper - * * @var \Magento\Framework\Escaper */ protected $escaper; @@ -130,6 +124,7 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod * * @param ItemInterface $item * @return array + * phpcs:disable Generic.Metrics.NestingLevel */ public function getBundleOptions(ItemInterface $item) { @@ -187,6 +182,7 @@ public function getBundleOptions(ItemInterface $item) return $options; } + //phpcs:enable Generic.Metrics.NestingLevel /** * Retrieves product options list From b8d0a54a55361d194b3f19af95632e41d4606e8d Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 20 Jan 2023 21:19:11 +0530 Subject: [PATCH 554/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 91 +++++++++++++++---- 1 file changed, 73 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index 2f333e7ca6f6e..b37acc4f08fd4 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -4,17 +4,25 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\ConfigurableProduct\Plugin\Model\ResourceModel; use Magento\Catalog\Api\Data\ProductAttributeInterface; use Magento\Catalog\Api\ProductAttributeRepositoryInterface; +use Magento\Catalog\Model\Indexer\Product\Category; +use Magento\Catalog\Model\Product as ProductModel; +use Magento\Catalog\Model\ResourceModel\Product as ProductResource; +use Magento\CatalogSearch\Model\Indexer\Fulltext as FulltextIndexer; use Magento\ConfigurableProduct\Api\Data\OptionInterface; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\App\ObjectManager; +use Magento\Framework\DataObject; use Magento\Framework\Indexer\ActionInterface; +use Magento\Framework\Indexer\CacheContext; +use Magento\Framework\Indexer\IndexerRegistry; /** * Plugin product resource model @@ -46,21 +54,35 @@ class Product */ private $filterBuilder; + /** + * @var CacheContext + */ + private $cacheContext; + + /** + * @var IndexerRegistry + */ + private $indexerRegistry; + /** * Initialize Product dependencies. * * @param Configurable $configurable * @param ActionInterface $productIndexer - * @param ProductAttributeRepositoryInterface $productAttributeRepository - * @param SearchCriteriaBuilder $searchCriteriaBuilder - * @param FilterBuilder $filterBuilder + * @param ProductAttributeRepositoryInterface|null $productAttributeRepository + * @param SearchCriteriaBuilder|null $searchCriteriaBuilder + * @param FilterBuilder|null $filterBuilder + * @param CacheContext|null $cacheContext + * @param IndexerRegistry|null $indexerRegistry */ public function __construct( Configurable $configurable, ActionInterface $productIndexer, ProductAttributeRepositoryInterface $productAttributeRepository = null, - SearchCriteriaBuilder $searchCriteriaBuilder = null, - FilterBuilder $filterBuilder = null + ?SearchCriteriaBuilder $searchCriteriaBuilder = null, + ?FilterBuilder $filterBuilder = null, + ?CacheContext $cacheContext = null, + ?IndexerRegistry $indexerRegistry = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; @@ -70,35 +92,68 @@ public function __construct( ->get(SearchCriteriaBuilder::class); $this->filterBuilder = $filterBuilder ?: ObjectManager::getInstance() ->get(FilterBuilder::class); + $this->cacheContext = $cacheContext ?: ObjectManager::getInstance()->get(CacheContext::class); + $this->indexerRegistry = $indexerRegistry ?: ObjectManager::getInstance() + ->get(IndexerRegistry::class); } /** * We need reset attribute set id to attribute after related simple product was saved * - * @param \Magento\Catalog\Model\ResourceModel\Product $subject - * @param \Magento\Framework\DataObject $object + * @param ProductResource $subject + * @param DataObject $object * @return void - * @throws \Magento\Framework\Exception\NoSuchEntityException * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSave( - \Magento\Catalog\Model\ResourceModel\Product $subject, - \Magento\Framework\DataObject $object + ProductResource $subject, + DataObject $object ) { - /** @var \Magento\Catalog\Model\Product $object */ + /** @var ProductModel $object */ if ($object->getTypeId() == Configurable::TYPE_CODE) { $object->getTypeInstance()->getSetAttributes($object); $this->resetConfigurableOptionsData($object); } } + /** + * Invalidate cache and perform reindexing for configurable associated product + * + * @param ProductResource $subject + * @param ProductResource $result + * @param DataObject $object + * @return ProductResource + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function afterSave( + ProductResource $subject, + ProductResource $result, + DataObject $object + ): ProductResource { + $productId = $object->getId(); + $parentProductIds = $this->configurable->getParentIdsByChild($productId); + if (count($parentProductIds) > 0) { + $productCategoryIndexer = $this->indexerRegistry->get(Category::INDEXER_ID); + $productCategoryIndexer->reindexRow($productId); + + $this->cacheContext->registerEntities( + ProductModel::CACHE_TAG, + array_unique(array_merge([$productId], $parentProductIds)) + ); + $indexer = $this->indexerRegistry->get(FulltextIndexer::INDEXER_ID); + $indexer->reindexRow($productId); + } + + return $result; + } + /** * Set null for configurable options attribute of configurable product * - * @param \Magento\Catalog\Model\Product $object + * @param ProductModel $object * @return void - * @throws \Magento\Framework\Exception\NoSuchEntityException */ private function resetConfigurableOptionsData($object) { @@ -128,16 +183,16 @@ private function resetConfigurableOptionsData($object) /** * Gather configurable parent ids of product being deleted and reindex after delete is complete. * - * @param \Magento\Catalog\Model\ResourceModel\Product $subject + * @param ProductResource $subject * @param \Closure $proceed - * @param \Magento\Catalog\Model\Product $product - * @return \Magento\Catalog\Model\ResourceModel\Product + * @param ProductModel $product + * @return ProductResource * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundDelete( - \Magento\Catalog\Model\ResourceModel\Product $subject, + ProductResource $subject, \Closure $proceed, - \Magento\Catalog\Model\Product $product + ProductModel $product ) { $configurableProductIds = $this->configurable->getParentIdsByChild($product->getId()); $result = $proceed($product); From 2bc1ff209abb9f39b516eab6246cf0de661148c5 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Fri, 20 Jan 2023 17:49:52 +0200 Subject: [PATCH 555/985] ACP2E-1456: fix unit test errors --- .../Helper/Catalog/Product/ConfigurationTest.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index e5edc5fb5396f..b8bc4d9df5c3a 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -57,6 +57,11 @@ class ConfigurationTest extends TestCase */ private $serializer; + /** + * @var \Magento\Catalog\Helper\Data|MockObject + */ + private $catalogHelper; + /** * @inheritDoc */ @@ -72,6 +77,7 @@ protected function setUp(): void $this->serializer = $this->getMockBuilder(Json::class) ->onlyMethods(['unserialize']) ->getMockForAbstractClass(); + $this->catalogHelper = $this->createPartialMock(\Magento\Catalog\Helper\Data::class, ['getTaxPrice']); $this->serializer->expects($this->any()) ->method('unserialize') @@ -87,7 +93,8 @@ function ($value) { 'pricingHelper' => $this->pricingHelper, 'productConfiguration' => $this->productConfiguration, 'escaper' => $this->escaper, - 'serializer' => $this->serializer + 'serializer' => $this->serializer, + 'catalogHelper' => $this->catalogHelper ] ); } @@ -149,7 +156,8 @@ public function testGetSelectionFinalPrice(): void $price->expects($this->once())->method('getSelectionFinalTotalPrice') ->with($product, $selectionProduct, $itemQty, 0, false, true); - $this->helper->getSelectionFinalPrice($this->item, $selectionProduct); + $selectionPrice = $this->helper->getSelectionFinalPrice($this->item, $selectionProduct); + $this->catalogHelper->getTaxPrice($selectionProduct, $selectionPrice); } /** From 96666aee8b45776e5be7a17229777e6db08599bd Mon Sep 17 00:00:00 2001 From: Aakash Kumar <aakashk@adobe.com> Date: Fri, 20 Jan 2023 10:31:29 -0600 Subject: [PATCH 556/985] ACPT-826 --- app/code/Magento/AsyncConfig/LICENSE.txt | 48 ++++++++++++++++++++ app/code/Magento/AsyncConfig/LICENSE_AFL.txt | 48 ++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 app/code/Magento/AsyncConfig/LICENSE.txt create mode 100644 app/code/Magento/AsyncConfig/LICENSE_AFL.txt diff --git a/app/code/Magento/AsyncConfig/LICENSE.txt b/app/code/Magento/AsyncConfig/LICENSE.txt new file mode 100644 index 0000000000000..36b2459f6aa63 --- /dev/null +++ b/app/code/Magento/AsyncConfig/LICENSE.txt @@ -0,0 +1,48 @@ + +Open Software License ("OSL") v. 3.0 + +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Open Software License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/app/code/Magento/AsyncConfig/LICENSE_AFL.txt b/app/code/Magento/AsyncConfig/LICENSE_AFL.txt new file mode 100644 index 0000000000000..f39d641b18a19 --- /dev/null +++ b/app/code/Magento/AsyncConfig/LICENSE_AFL.txt @@ -0,0 +1,48 @@ + +Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Academic Free License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. From 401bcdf4fc75559b3655d4f247ea66ee8b816bbd Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Fri, 20 Jan 2023 14:52:55 -0600 Subject: [PATCH 557/985] ACP2E-185: Fix static errors for previously delivered code --- .../Catalog/Controller/Product/View.php | 1 + .../Test/Unit/Controller/Product/ViewTest.php | 2 ++ .../CompositeCollectionPostProcessor.php | 2 +- app/code/Magento/CatalogGraphQl/etc/di.xml | 2 +- .../Aggregation/DataProviderFactory.php | 7 +++--- .../SearchAdapter/Dynamic/DataProvider.php | 17 ++++++------- .../Magento/ImportExport/Model/Export.php | 24 ++++++++++--------- .../Model/Product/Plugin/UpdateQuote.php | 9 ++----- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Product/View.php b/app/code/Magento/Catalog/Controller/Product/View.php index 615696aea3969..cfc93156a5df2 100644 --- a/app/code/Magento/Catalog/Controller/Product/View.php +++ b/app/code/Magento/Catalog/Controller/Product/View.php @@ -125,6 +125,7 @@ protected function noProductRedirect() $resultForward->forward('noroute'); return $resultForward; } + return $this->getResponse(); } /** diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Product/ViewTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Product/ViewTest.php index 3147c682664df..ee524ca2fe523 100644 --- a/app/code/Magento/Catalog/Test/Unit/Controller/Product/ViewTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Controller/Product/ViewTest.php @@ -27,6 +27,8 @@ /** * Responsible for testing product view action on a strorefront. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ViewTest extends TestCase { diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CompositeCollectionPostProcessor.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CompositeCollectionPostProcessor.php index 4f1ad5c29152b..2d2f2eda9be8b 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CompositeCollectionPostProcessor.php +++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/Product/CompositeCollectionPostProcessor.php @@ -29,7 +29,7 @@ public function __construct(array $collectionPostProcessors = []) } /** - * {@inheritdoc} + * @inheritdoc */ public function process(Collection $collection, array $attributeNames, ContextInterface $context = null): Collection { diff --git a/app/code/Magento/CatalogGraphQl/etc/di.xml b/app/code/Magento/CatalogGraphQl/etc/di.xml index 8fb575255fed6..de72c4a559c4d 100644 --- a/app/code/Magento/CatalogGraphQl/etc/di.xml +++ b/app/code/Magento/CatalogGraphQl/etc/di.xml @@ -97,7 +97,7 @@ <plugin name="productAttributesDynamicFields" type="Magento\CatalogGraphQl\Plugin\Search\Request\ConfigReader" /> </type> - <preference type="\Magento\CatalogGraphQl\Model\Resolver\Product\Price\Provider" for="\Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderInterface"/> + <preference type="Magento\CatalogGraphQl\Model\Resolver\Product\Price\Provider" for="Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderInterface"/> <preference type="Magento\CatalogGraphQl\Model\Resolver\Products\Query\Search" for="Magento\CatalogGraphQl\Model\Resolver\Products\Query\ProductQueryInterface"/> diff --git a/app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/DataProviderFactory.php b/app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/DataProviderFactory.php index 9ccd1471136a9..9646cc3551487 100644 --- a/app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/DataProviderFactory.php +++ b/app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/DataProviderFactory.php @@ -18,8 +18,6 @@ class DataProviderFactory { /** - * Object Manager - * * @var ObjectManagerInterface */ private $objectManager; @@ -33,8 +31,9 @@ public function __construct(ObjectManagerInterface $objectManager) } /** - * Recreates an instance of the DataProviderInterface in order to support QueryAware interface - * and add a QueryContainer to the DataProvider + * Recreates an instance of the DataProviderInterface. + * + * It should be done in order to support QueryAware interface and add a QueryContainer to the DataProvider. * * The Query is an optional argument as it's not required to pass the QueryContainer for data providers * who not implementing QueryAwareInterface, but the method is also responsible for checking diff --git a/app/code/Magento/Elasticsearch/SearchAdapter/Dynamic/DataProvider.php b/app/code/Magento/Elasticsearch/SearchAdapter/Dynamic/DataProvider.php index 67b12a3071522..8a903334431ca 100644 --- a/app/code/Magento/Elasticsearch/SearchAdapter/Dynamic/DataProvider.php +++ b/app/code/Magento/Elasticsearch/SearchAdapter/Dynamic/DataProvider.php @@ -16,6 +16,7 @@ * * @api * @since 100.1.0 + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DataProvider implements \Magento\Framework\Search\Dynamic\DataProviderInterface, QueryAwareInterface { @@ -50,32 +51,32 @@ class DataProvider implements \Magento\Framework\Search\Dynamic\DataProviderInte /** * @var \Magento\Elasticsearch\Model\Config - * @deprecated 100.2.0 as this class shouldn't be responsible for query building - * and should only modify existing query + * @deprecated 100.2.0 + * @see this class shouldn't be responsible for query building and should only modify existing query * @since 100.1.0 */ protected $clientConfig; /** * @var \Magento\Store\Model\StoreManagerInterface - * @deprecated 100.2.0 as this class shouldn't be responsible for query building - * and should only modify existing query + * @deprecated 100.2.0 + * @see this class shouldn't be responsible for query building and should only modify existing query * @since 100.1.0 */ protected $storeManager; /** * @var \Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver - * @deprecated 100.2.0 as this class shouldn't be responsible for query building - * and should only modify existing query + * @deprecated 100.2.0 + * @see this class shouldn't be responsible for query building and should only modify existing query * @since 100.1.0 */ protected $searchIndexNameResolver; /** * @var string - * @deprecated 100.2.0 as this class shouldn't be responsible for query building - * and should only modify existing query + * @deprecated 100.2.0 + * @see this class shouldn't be responsible for query building and should only modify existing query * @since 100.1.0 */ protected $indexerId; diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php index 033f9849b7382..6d466ba6dcdb8 100644 --- a/app/code/Magento/ImportExport/Model/Export.php +++ b/app/code/Magento/ImportExport/Model/Export.php @@ -10,38 +10,36 @@ * Export model * * @api - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @since 100.0.2 * @deprecated 100.3.2 + * @see \Magento\ImportExport\Api\ExportManagementInterface */ class Export extends \Magento\ImportExport\Model\AbstractModel { - const FILTER_ELEMENT_GROUP = 'export_filter'; + public const FILTER_ELEMENT_GROUP = 'export_filter'; - const FILTER_ELEMENT_SKIP = 'skip_attr'; + public const FILTER_ELEMENT_SKIP = 'skip_attr'; /** * Allow multiple values wrapping in double quotes for additional attributes. */ - const FIELDS_ENCLOSURE = 'fields_enclosure'; + public const FIELDS_ENCLOSURE = 'fields_enclosure'; /** * Filter fields types. */ - const FILTER_TYPE_SELECT = 'select'; + public const FILTER_TYPE_SELECT = 'select'; - const FILTER_TYPE_MULTISELECT = 'multiselect'; + public const FILTER_TYPE_MULTISELECT = 'multiselect'; - const FILTER_TYPE_INPUT = 'input'; + public const FILTER_TYPE_INPUT = 'input'; - const FILTER_TYPE_DATE = 'date'; + public const FILTER_TYPE_DATE = 'date'; - const FILTER_TYPE_NUMBER = 'number'; + public const FILTER_TYPE_NUMBER = 'number'; /** - * Entity adapter. - * * @var \Magento\ImportExport\Model\Export\Entity\AbstractEntity */ protected $_entityAdapter; @@ -225,6 +223,7 @@ public function filterAttributeCollection(\Magento\Framework\Data\Collection $co * @param \Magento\Eav\Model\Entity\Attribute $attribute * @return string * @throws \Magento\Framework\Exception\LocalizedException + * phpcs:disable Magento2.Functions.StaticFunction */ public static function getAttributeFilterType(\Magento\Eav\Model\Entity\Attribute $attribute) { @@ -245,6 +244,7 @@ public static function getAttributeFilterType(\Magento\Eav\Model\Entity\Attribut __('We can\'t determine the attribute filter type.') ); } + //phpcs:enable Magento2.Functions.StaticFunction /** * Determine filter type for static attribute. @@ -252,6 +252,7 @@ public static function getAttributeFilterType(\Magento\Eav\Model\Entity\Attribut * @static * @param \Magento\Eav\Model\Entity\Attribute $attribute * @return string + * phpcs:disable Magento2.Functions.StaticFunction */ public static function getStaticAttributeFilterType(\Magento\Eav\Model\Entity\Attribute $attribute) { @@ -277,6 +278,7 @@ public static function getStaticAttributeFilterType(\Magento\Eav\Model\Entity\At } return $type; } + //phpcs:enable Magento2.Functions.StaticFunction /** * MIME-type for 'Content-Type' header. diff --git a/app/code/Magento/Quote/Model/Product/Plugin/UpdateQuote.php b/app/code/Magento/Quote/Model/Product/Plugin/UpdateQuote.php index ab49c31179c07..fcaa299fd087d 100644 --- a/app/code/Magento/Quote/Model/Product/Plugin/UpdateQuote.php +++ b/app/code/Magento/Quote/Model/Product/Plugin/UpdateQuote.php @@ -18,15 +18,11 @@ class UpdateQuote { /** - * Quote Resource - * * @var Quote */ private $resource; /** - * Product ID locator. - * * @var ProductIdLocatorInterface */ private $productIdLocator; @@ -49,8 +45,8 @@ public function __construct( * Update the quote trigger_recollect column is 1 when product price is changed through API. * * @param TierPriceStorageInterface $subject - * @param $result - * @param $prices + * @param array $result + * @param array $prices * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -61,7 +57,6 @@ public function afterUpdate( ): array { $this->resource->markQuotesRecollect($this->retrieveAffectedProductIdsForPrices($prices)); return $result; - } /** From 5004a91e8a28b43bd5829ef71523111af3812b1a Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Sat, 21 Jan 2023 23:08:51 +0530 Subject: [PATCH 558/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index b37acc4f08fd4..061a004b9c327 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -10,10 +10,10 @@ use Magento\Catalog\Api\Data\ProductAttributeInterface; use Magento\Catalog\Api\ProductAttributeRepositoryInterface; -use Magento\Catalog\Model\Indexer\Product\Category; +use Magento\Catalog\Model\Indexer\Product\Category\Action\Rows; +use Magento\Catalog\Model\Indexer\Product\Price\Processor; use Magento\Catalog\Model\Product as ProductModel; use Magento\Catalog\Model\ResourceModel\Product as ProductResource; -use Magento\CatalogSearch\Model\Indexer\Fulltext as FulltextIndexer; use Magento\ConfigurableProduct\Api\Data\OptionInterface; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; use Magento\Framework\Api\FilterBuilder; @@ -21,7 +21,6 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; use Magento\Framework\Indexer\ActionInterface; -use Magento\Framework\Indexer\CacheContext; use Magento\Framework\Indexer\IndexerRegistry; /** @@ -55,14 +54,14 @@ class Product private $filterBuilder; /** - * @var CacheContext + * @var IndexerRegistry */ - private $cacheContext; + private $indexerRegistry; /** - * @var IndexerRegistry + * @var Rows */ - private $indexerRegistry; + private $rowsAction; /** * Initialize Product dependencies. @@ -72,8 +71,8 @@ class Product * @param ProductAttributeRepositoryInterface|null $productAttributeRepository * @param SearchCriteriaBuilder|null $searchCriteriaBuilder * @param FilterBuilder|null $filterBuilder - * @param CacheContext|null $cacheContext * @param IndexerRegistry|null $indexerRegistry + * @param Rows|null $rowsAction */ public function __construct( Configurable $configurable, @@ -81,8 +80,8 @@ public function __construct( ProductAttributeRepositoryInterface $productAttributeRepository = null, ?SearchCriteriaBuilder $searchCriteriaBuilder = null, ?FilterBuilder $filterBuilder = null, - ?CacheContext $cacheContext = null, - ?IndexerRegistry $indexerRegistry = null + ?IndexerRegistry $indexerRegistry = null, + ?Rows $rowsAction = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; @@ -92,9 +91,10 @@ public function __construct( ->get(SearchCriteriaBuilder::class); $this->filterBuilder = $filterBuilder ?: ObjectManager::getInstance() ->get(FilterBuilder::class); - $this->cacheContext = $cacheContext ?: ObjectManager::getInstance()->get(CacheContext::class); $this->indexerRegistry = $indexerRegistry ?: ObjectManager::getInstance() ->get(IndexerRegistry::class); + $this->rowsAction = $rowsAction ?: ObjectManager::getInstance() + ->get(Rows::class); } /** @@ -133,17 +133,10 @@ public function afterSave( DataObject $object ): ProductResource { $productId = $object->getId(); - $parentProductIds = $this->configurable->getParentIdsByChild($productId); - if (count($parentProductIds) > 0) { - $productCategoryIndexer = $this->indexerRegistry->get(Category::INDEXER_ID); - $productCategoryIndexer->reindexRow($productId); - - $this->cacheContext->registerEntities( - ProductModel::CACHE_TAG, - array_unique(array_merge([$productId], $parentProductIds)) - ); - $indexer = $this->indexerRegistry->get(FulltextIndexer::INDEXER_ID); - $indexer->reindexRow($productId); + $priceIndexer = $this->indexerRegistry->get(Processor::INDEXER_ID); + if ($priceIndexer->isScheduled() + && count($this->configurable->getParentIdsByChild($productId)) > 0) { + $this->rowsAction->execute([$productId]); } return $result; From a15b0b6287c71e9caceee5e2a7a5f788b98b24e9 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Sun, 22 Jan 2023 15:39:48 +0530 Subject: [PATCH 559/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index 061a004b9c327..9c226641b6e39 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -25,6 +25,8 @@ /** * Plugin product resource model + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product { @@ -81,7 +83,7 @@ public function __construct( ?SearchCriteriaBuilder $searchCriteriaBuilder = null, ?FilterBuilder $filterBuilder = null, ?IndexerRegistry $indexerRegistry = null, - ?Rows $rowsAction = null + ?Rows $rowsAction = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; From 26f42049b5c92dfd6dce246d1a4a6520f9c1cb68 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Mon, 23 Jan 2023 15:59:10 +0530 Subject: [PATCH 560/985] Update StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml --- ...oreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index e2bbcaee62cb5..0d1f6a3ff8ea1 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> <!--Create an account--> - <waitForElementVisible selector="{{AdminCreateUserSection.createAnAccountButton}}" stepKey="waitCreateAnAccountButton"/> - <click selector="{{AdminCreateUserSection.createAnAccountButton}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccountButton}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccountButton}}" stepKey="clickOnCreateAnAccountButton"/> <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> <!--Check the VAT Number field--> <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> From 92c50a93a38cdd68d69e015798b4ed9747cac1bf Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Mon, 23 Jan 2023 16:55:28 +0530 Subject: [PATCH 561/985] Update StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml --- ...oreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index 0d1f6a3ff8ea1..618c32b21ad03 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> <!--Create an account--> - <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccountButton}}" stepKey="waitCreateAnAccountButton"/> - <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccountButton}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> <!--Check the VAT Number field--> <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> From 186d5b550eaf1ecc533ec260bed08322d3adaa1d Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:55:10 +0530 Subject: [PATCH 562/985] ACQE-4483 : Create an account new element --- .../Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml index 87316466c07c9..e6cc9772ea5ca 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml @@ -10,5 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCreateUserSection"> <element name="createAnAccountButton" type="button" selector="//div[contains(@class, 'block-new-customer')]//a/span[contains(.,'Create an Account')]"/> + <element name="createAnAccountButtonForCustomer" type="button" selector="/*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)]"/> </section> </sections> From 1349561b5a8b236bb7f944dd6542fdc1164c1799 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:55:42 +0530 Subject: [PATCH 563/985] Update StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml --- ...oreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index 618c32b21ad03..50fc7f8b0fd3c 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> <!--Create an account--> - <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> - <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForElementVisible selector="{{createAnAccountButtonForCustomer.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{createAnAccountButtonForCustomer.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> <!--Check the VAT Number field--> <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> From 54fbb7d4e784d777bae9f0e729da6b6e042e10d4 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:56:13 +0530 Subject: [PATCH 564/985] Update StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml --- ...oreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index 50fc7f8b0fd3c..72c0f1bb1d615 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> <!--Create an account--> - <waitForElementVisible selector="{{createAnAccountButtonForCustomer.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> - <click selector="{{createAnAccountButtonForCustomer.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForElementVisible selector="{{AdminCreateUserSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{AdminCreateUserSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> <!--Check the VAT Number field--> <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> From fe6501f5bfc5dc4f65af6daa937ce52b329808cd Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:56:29 +0530 Subject: [PATCH 565/985] Update StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml --- ...oreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml index 72c0f1bb1d615..499287c1efba9 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest.xml @@ -41,8 +41,8 @@ <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> <!--Create an account--> - <waitForElementVisible selector="{{AdminCreateUserSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> - <click selector="{{AdminCreateUserSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> + <waitForElementVisible selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="waitCreateAnAccountButton"/> + <click selector="{{AdminCreateUserSection.createAnAccountButtonForCustomer}}" stepKey="clickOnCreateAnAccountButton"/> <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> <!--Check the VAT Number field--> <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> From 614b01cf674ce82a41085b1cfffb2b6b04c03a0f Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 14:47:40 +0530 Subject: [PATCH 566/985] Update StorefrontCustomerLoginSignUpSection.xml --- .../Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml index e6cc9772ea5ca..4df07f7637e50 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml @@ -10,6 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCreateUserSection"> <element name="createAnAccountButton" type="button" selector="//div[contains(@class, 'block-new-customer')]//a/span[contains(.,'Create an Account')]"/> - <element name="createAnAccountButtonForCustomer" type="button" selector="/*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)]"/> + <element name="createAnAccountButtonForCustomer" type="button" selector="//*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)"/> </section> </sections> From e2387e3acf5000c114b68f1230ad6572c709cbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cengcom-Echo=E2=80=9D?= <engcom-vendorworker-echo@adobe.com> Date: Tue, 24 Jan 2023 15:22:38 +0530 Subject: [PATCH 567/985] Fixed Integration Test --- .../testsuite/Magento/Store/Model/StoreTest.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index 500c250be1bda..bd83561a8a324 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -460,15 +460,13 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $singleStor $params['context'] = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create(\Magento\Framework\Model\Context::class, ['appState' => $appStateMock]); - $configMock->expects($this->any()) + $configMock ->method('getValue') - ->with($this->stringContains(Store::XML_PATH_STORE_IN_URL)) - ->willReturn($storeInUrl); - - $configMock->expects($this->any()) - ->method('getValue') - ->with($this->stringContains(StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED)) - ->willReturn($singleStoreModeEnabled); + ->withConsecutive( + [$this->stringContains(StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED)], + [$this->stringContains(Store::XML_PATH_STORE_IN_URL)] + ) + ->willReturnOnConsecutiveCalls($singleStoreModeEnabled, $storeInUrl); $params['config'] = $configMock; $model = $objectManager->create(\Magento\Store\Model\Store::class, $params); From 22a604dbd69ae9142293ed7ec81dff02b5d0e472 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 24 Jan 2023 16:54:56 +0530 Subject: [PATCH 568/985] Revert "Updating root composer files for publication service for 2.4.5" This reverts commit 1df4565907d40f14ee1c753cc2de2ce567bfa8d7. Changes to be committed: modified: composer.json --- composer.json | 534 +++++++++++++++++++++++++------------------------- 1 file changed, 266 insertions(+), 268 deletions(-) diff --git a/composer.json b/composer.json index c350d86fb8c30..12a418ecfbb65 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,6 @@ "preferred-install": "dist", "sort-packages": true }, - "version": "2.4.5", "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -89,30 +88,6 @@ "webonyx/graphql-php": "^15.0", "wikimedia/less.php": "^3.2" }, - "suggest": { - "ext-pcntl": "Need for run processes in parallel mode" - }, - "autoload": { - "exclude-from-classmap": [ - "**/dev/**", - "**/update/**", - "**/Test/**" - ], - "files": [ - "app/etc/NonComposerComponentRegistration.php" - ], - "psr-0": { - "": [ - "app/code/", - "generated/code/" - ] - }, - "psr-4": { - "Magento\\": "app/code/Magento/", - "Magento\\Framework\\": "lib/internal/Magento/Framework/", - "Magento\\Setup\\": "setup/src/Magento/Setup/" - } - }, "require-dev": { "allure-framework/allure-phpunit": "^2", "dealerdirect/phpcodesniffer-composer-installer": "^0.7", @@ -128,270 +103,293 @@ "sebastian/phpcpd": "^6.0", "symfony/finder": "^5.4" }, - "conflict": { - "gene/bluefoot": "*" + "suggest": { + "ext-pcntl": "Need for run processes in parallel mode" }, "replace": { - "magento/module-marketplace": "100.4.3", - "magento/module-admin-adobe-ims": "100.4.0", - "magento/module-admin-analytics": "100.4.4", - "magento/module-admin-notification": "100.4.4", - "magento/module-adobe-ims": "2.1.4", - "magento/module-adobe-ims-api": "2.1.2", - "magento/module-advanced-pricing-import-export": "100.4.5", - "magento/module-amqp": "100.4.2", - "magento/module-analytics": "100.4.5", - "magento/module-asynchronous-operations": "100.4.5", - "magento/module-authorization": "100.4.5", - "magento/module-advanced-search": "100.4.3", - "magento/module-backend": "102.0.5", - "magento/module-backup": "100.4.5", - "magento/module-bundle": "101.0.5", - "magento/module-bundle-graph-ql": "100.4.5", - "magento/module-bundle-import-export": "100.4.4", - "magento/module-cache-invalidate": "100.4.3", - "magento/module-captcha": "100.4.5", - "magento/module-cardinal-commerce": "100.4.3", - "magento/module-catalog": "104.0.5", - "magento/module-catalog-customer-graph-ql": "100.4.4", - "magento/module-catalog-analytics": "100.4.2", - "magento/module-catalog-import-export": "101.1.5", - "magento/module-catalog-inventory": "100.4.5", - "magento/module-catalog-inventory-graph-ql": "100.4.2", - "magento/module-catalog-rule": "101.2.5", - "magento/module-catalog-rule-graph-ql": "100.4.2", - "magento/module-catalog-rule-configurable": "100.4.4", - "magento/module-catalog-search": "102.0.5", - "magento/module-catalog-url-rewrite": "100.4.5", - "magento/module-catalog-widget": "100.4.5", - "magento/module-checkout": "100.4.5", - "magento/module-checkout-agreements": "100.4.4", - "magento/module-checkout-agreements-graph-ql": "100.4.1", - "magento/module-cms": "104.0.5", - "magento/module-cms-url-rewrite": "100.4.4", - "magento/module-compare-list-graph-ql": "100.4.1", - "magento/module-config": "101.2.5", - "magento/module-configurable-import-export": "100.4.3", - "magento/module-configurable-product": "100.4.5", - "magento/module-configurable-product-sales": "100.4.2", - "magento/module-contact": "100.4.4", - "magento/module-cookie": "100.4.5", - "magento/module-cron": "100.4.5", - "magento/module-currency-symbol": "100.4.3", - "magento/module-customer": "103.0.5", - "magento/module-customer-analytics": "100.4.2", - "magento/module-customer-downloadable-graph-ql": "100.4.1", - "magento/module-customer-import-export": "100.4.5", - "magento/module-deploy": "100.4.5", - "magento/module-developer": "100.4.5", - "magento/module-dhl": "100.4.4", - "magento/module-directory": "100.4.5", - "magento/module-directory-graph-ql": "100.4.3", - "magento/module-downloadable": "100.4.5", - "magento/module-downloadable-graph-ql": "100.4.5", - "magento/module-downloadable-import-export": "100.4.4", - "magento/module-eav": "102.1.5", - "magento/module-elasticsearch": "101.0.5", - "magento/module-elasticsearch-6": "100.4.5", - "magento/module-elasticsearch-7": "100.4.5", - "magento/module-email": "101.1.5", - "magento/module-encryption-key": "100.4.3", - "magento/module-fedex": "100.4.3", - "magento/module-gift-message": "100.4.4", - "magento/module-gift-message-graph-ql": "100.4.3", - "magento/module-google-adwords": "100.4.2", - "magento/module-google-analytics": "100.4.1", - "magento/module-google-optimizer": "100.4.4", - "magento/module-google-gtag": "100.4.0", - "magento/module-graph-ql": "100.4.5", - "magento/module-graph-ql-cache": "100.4.2", - "magento/module-catalog-graph-ql": "100.4.5", - "magento/module-catalog-cms-graph-ql": "100.4.1", - "magento/module-catalog-url-rewrite-graph-ql": "100.4.3", - "magento/module-configurable-product-graph-ql": "100.4.5", - "magento/module-customer-graph-ql": "100.4.5", - "magento/module-eav-graph-ql": "100.4.2", - "magento/module-swatches-graph-ql": "100.4.3", - "magento/module-tax-graph-ql": "100.4.1", - "magento/module-url-rewrite-graph-ql": "100.4.4", - "magento/module-cms-url-rewrite-graph-ql": "100.4.3", - "magento/module-weee-graph-ql": "100.4.2", - "magento/module-cms-graph-ql": "100.4.2", - "magento/module-grouped-import-export": "100.4.3", - "magento/module-grouped-product": "100.4.5", - "magento/module-grouped-catalog-inventory": "100.4.2", - "magento/module-grouped-product-graph-ql": "100.4.5", - "magento/module-import-export": "101.0.5", - "magento/module-indexer": "100.4.5", - "magento/module-instant-purchase": "100.4.4", - "magento/module-integration": "100.4.5", - "magento/module-layered-navigation": "100.4.5", - "magento/module-login-as-customer": "100.4.5", - "magento/module-login-as-customer-admin-ui": "100.4.5", - "magento/module-login-as-customer-api": "100.4.4", - "magento/module-login-as-customer-assistance": "100.4.4", - "magento/module-login-as-customer-frontend-ui": "100.4.4", - "magento/module-login-as-customer-graph-ql": "100.4.2", - "magento/module-login-as-customer-log": "100.4.3", - "magento/module-login-as-customer-quote": "100.4.3", - "magento/module-login-as-customer-page-cache": "100.4.4", - "magento/module-login-as-customer-sales": "100.4.4", - "magento/module-media-content": "100.4.3", - "magento/module-media-content-api": "100.4.4", - "magento/module-media-content-catalog": "100.4.3", - "magento/module-media-content-cms": "100.4.3", - "magento/module-media-gallery": "100.4.4", - "magento/module-media-gallery-api": "101.0.4", - "magento/module-media-gallery-ui": "100.4.4", - "magento/module-media-gallery-ui-api": "100.4.3", - "magento/module-media-gallery-integration": "100.4.4", - "magento/module-media-gallery-synchronization": "100.4.4", - "magento/module-media-gallery-synchronization-api": "100.4.3", - "magento/module-media-content-synchronization": "100.4.4", - "magento/module-media-content-synchronization-api": "100.4.3", - "magento/module-media-content-synchronization-catalog": "100.4.2", - "magento/module-media-content-synchronization-cms": "100.4.2", - "magento/module-media-gallery-synchronization-metadata": "100.4.1", - "magento/module-media-gallery-metadata": "100.4.3", - "magento/module-media-gallery-metadata-api": "100.4.2", - "magento/module-media-gallery-catalog-ui": "100.4.2", - "magento/module-media-gallery-cms-ui": "100.4.2", - "magento/module-media-gallery-catalog-integration": "100.4.2", - "magento/module-media-gallery-catalog": "100.4.2", - "magento/module-media-gallery-renditions": "100.4.3", - "magento/module-media-gallery-renditions-api": "100.4.2", - "magento/module-media-storage": "100.4.4", - "magento/module-message-queue": "100.4.5", - "magento/module-msrp": "100.4.4", - "magento/module-msrp-configurable-product": "100.4.2", - "magento/module-msrp-grouped-product": "100.4.2", - "magento/module-multishipping": "100.4.5", - "magento/module-mysql-mq": "100.4.3", - "magento/module-new-relic-reporting": "100.4.3", - "magento/module-newsletter": "100.4.5", - "magento/module-newsletter-graph-ql": "100.4.2", - "magento/module-offline-payments": "100.4.3", - "magento/module-offline-shipping": "100.4.4", - "magento/module-page-cache": "100.4.5", - "magento/module-payment": "100.4.5", - "magento/module-payment-graph-ql": "100.4.0", - "magento/module-paypal": "101.0.5", - "magento/module-paypal-captcha": "100.4.2", - "magento/module-paypal-graph-ql": "100.4.3", - "magento/module-persistent": "100.4.5", - "magento/module-product-alert": "100.4.4", - "magento/module-product-video": "100.4.5", - "magento/module-quote": "101.2.5", - "magento/module-quote-analytics": "100.4.4", - "magento/module-quote-bundle-options": "100.4.1", - "magento/module-quote-configurable-options": "100.4.1", - "magento/module-quote-downloadable-links": "100.4.1", - "magento/module-quote-graph-ql": "100.4.5", - "magento/module-related-product-graph-ql": "100.4.2", - "magento/module-release-notification": "100.4.3", - "magento/module-reports": "100.4.5", - "magento/module-require-js": "100.4.1", - "magento/module-review": "100.4.5", - "magento/module-review-graph-ql": "100.4.1", - "magento/module-review-analytics": "100.4.2", - "magento/module-robots": "101.1.1", - "magento/module-rss": "100.4.3", - "magento/module-rule": "100.4.4", - "magento/module-sales": "103.0.5", - "magento/module-sales-analytics": "100.4.2", - "magento/module-sales-graph-ql": "100.4.5", - "magento/module-sales-inventory": "100.4.2", - "magento/module-sales-rule": "101.2.5", - "magento/module-sales-sequence": "100.4.2", - "magento/module-sample-data": "100.4.3", - "magento/module-search": "101.1.5", - "magento/module-security": "100.4.5", - "magento/module-send-friend": "100.4.3", - "magento/module-send-friend-graph-ql": "100.4.1", - "magento/module-shipping": "100.4.5", - "magento/module-sitemap": "100.4.4", - "magento/module-store": "101.1.5", - "magento/module-store-graph-ql": "100.4.3", - "magento/module-swagger": "100.4.4", - "magento/module-swagger-webapi": "100.4.1", - "magento/module-swagger-webapi-async": "100.4.1", - "magento/module-swatches": "100.4.5", - "magento/module-swatches-layered-navigation": "100.4.1", - "magento/module-tax": "100.4.5", - "magento/module-tax-import-export": "100.4.4", - "magento/module-theme": "101.1.5", - "magento/module-theme-graph-ql": "100.4.2", - "magento/module-translation": "100.4.5", - "magento/module-ui": "101.2.5", - "magento/module-ups": "100.4.5", - "magento/module-url-rewrite": "102.0.4", - "magento/module-user": "101.2.5", - "magento/module-usps": "100.4.4", - "magento/module-variable": "100.4.3", - "magento/module-vault": "101.2.5", - "magento/module-vault-graph-ql": "100.4.1", - "magento/module-version": "100.4.2", - "magento/module-webapi": "100.4.4", - "magento/module-webapi-async": "100.4.3", - "magento/module-webapi-security": "100.4.2", - "magento/module-weee": "100.4.5", - "magento/module-widget": "101.2.5", - "magento/module-wishlist": "101.2.5", - "magento/module-wishlist-graph-ql": "100.4.5", - "magento/module-wishlist-analytics": "100.4.3", - "magento/theme-adminhtml-backend": "100.4.5", - "magento/theme-frontend-blank": "100.4.5", - "magento/theme-frontend-luma": "100.4.5", - "magento/language-de_de": "100.4.0", - "magento/language-en_us": "100.4.0", - "magento/language-es_es": "100.4.0", - "magento/language-fr_fr": "100.4.0", - "magento/language-nl_nl": "100.4.0", - "magento/language-pt_br": "100.4.0", - "magento/language-zh_hans_cn": "100.4.0", - "magento/framework": "103.0.5", - "magento/framework-amqp": "100.4.3", - "magento/framework-bulk": "101.0.1", - "magento/framework-message-queue": "100.4.5", + "magento/module-marketplace": "*", + "magento/module-admin-adobe-ims": "*", + "magento/module-admin-analytics": "*", + "magento/module-admin-notification": "*", + "magento/module-adobe-ims": "*", + "magento/module-adobe-ims-api": "*", + "magento/module-advanced-pricing-import-export": "*", + "magento/module-amqp": "*", + "magento/module-analytics": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-authorization": "*", + "magento/module-advanced-search": "*", + "magento/module-backend": "*", + "magento/module-backup": "*", + "magento/module-bundle": "*", + "magento/module-bundle-graph-ql": "*", + "magento/module-bundle-import-export": "*", + "magento/module-cache-invalidate": "*", + "magento/module-captcha": "*", + "magento/module-cardinal-commerce": "*", + "magento/module-catalog": "*", + "magento/module-catalog-customer-graph-ql": "*", + "magento/module-catalog-analytics": "*", + "magento/module-catalog-import-export": "*", + "magento/module-catalog-inventory": "*", + "magento/module-catalog-inventory-graph-ql": "*", + "magento/module-catalog-rule": "*", + "magento/module-catalog-rule-graph-ql": "*", + "magento/module-catalog-rule-configurable": "*", + "magento/module-catalog-search": "*", + "magento/module-catalog-url-rewrite": "*", + "magento/module-catalog-widget": "*", + "magento/module-checkout": "*", + "magento/module-checkout-agreements": "*", + "magento/module-checkout-agreements-graph-ql": "*", + "magento/module-cms": "*", + "magento/module-cms-url-rewrite": "*", + "magento/module-compare-list-graph-ql": "*", + "magento/module-config": "*", + "magento/module-configurable-import-export": "*", + "magento/module-configurable-product": "*", + "magento/module-configurable-product-sales": "*", + "magento/module-contact": "*", + "magento/module-cookie": "*", + "magento/module-cron": "*", + "magento/module-currency-symbol": "*", + "magento/module-customer": "*", + "magento/module-customer-analytics": "*", + "magento/module-customer-downloadable-graph-ql": "*", + "magento/module-customer-import-export": "*", + "magento/module-deploy": "*", + "magento/module-developer": "*", + "magento/module-dhl": "*", + "magento/module-directory": "*", + "magento/module-directory-graph-ql": "*", + "magento/module-downloadable": "*", + "magento/module-downloadable-graph-ql": "*", + "magento/module-downloadable-import-export": "*", + "magento/module-eav": "*", + "magento/module-elasticsearch": "*", + "magento/module-elasticsearch-6": "*", + "magento/module-elasticsearch-7": "*", + "magento/module-email": "*", + "magento/module-encryption-key": "*", + "magento/module-fedex": "*", + "magento/module-gift-message": "*", + "magento/module-gift-message-graph-ql": "*", + "magento/module-google-adwords": "*", + "magento/module-google-analytics": "*", + "magento/module-google-optimizer": "*", + "magento/module-google-gtag": "*", + "magento/module-graph-ql": "*", + "magento/module-graph-ql-cache": "*", + "magento/module-catalog-graph-ql": "*", + "magento/module-catalog-cms-graph-ql": "*", + "magento/module-catalog-url-rewrite-graph-ql": "*", + "magento/module-configurable-product-graph-ql": "*", + "magento/module-customer-graph-ql": "*", + "magento/module-eav-graph-ql": "*", + "magento/module-swatches-graph-ql": "*", + "magento/module-tax-graph-ql": "*", + "magento/module-url-rewrite-graph-ql": "*", + "magento/module-cms-url-rewrite-graph-ql": "*", + "magento/module-weee-graph-ql": "*", + "magento/module-cms-graph-ql": "*", + "magento/module-grouped-import-export": "*", + "magento/module-grouped-product": "*", + "magento/module-grouped-catalog-inventory": "*", + "magento/module-grouped-product-graph-ql": "*", + "magento/module-import-export": "*", + "magento/module-indexer": "*", + "magento/module-instant-purchase": "*", + "magento/module-integration": "*", + "magento/module-layered-navigation": "*", + "magento/module-login-as-customer": "*", + "magento/module-login-as-customer-admin-ui": "*", + "magento/module-login-as-customer-api": "*", + "magento/module-login-as-customer-assistance": "*", + "magento/module-login-as-customer-frontend-ui": "*", + "magento/module-login-as-customer-graph-ql": "*", + "magento/module-login-as-customer-log": "*", + "magento/module-login-as-customer-quote": "*", + "magento/module-login-as-customer-page-cache": "*", + "magento/module-login-as-customer-sales": "*", + "magento/module-media-content": "*", + "magento/module-media-content-api": "*", + "magento/module-media-content-catalog": "*", + "magento/module-media-content-cms": "*", + "magento/module-media-gallery": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-ui": "*", + "magento/module-media-gallery-ui-api": "*", + "magento/module-media-gallery-integration": "*", + "magento/module-media-gallery-synchronization": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-media-content-synchronization": "*", + "magento/module-media-content-synchronization-api": "*", + "magento/module-media-content-synchronization-catalog": "*", + "magento/module-media-content-synchronization-cms": "*", + "magento/module-media-gallery-synchronization-metadata": "*", + "magento/module-media-gallery-metadata": "*", + "magento/module-media-gallery-metadata-api": "*", + "magento/module-media-gallery-catalog-ui": "*", + "magento/module-media-gallery-cms-ui": "*", + "magento/module-media-gallery-catalog-integration": "*", + "magento/module-media-gallery-catalog": "*", + "magento/module-media-gallery-renditions": "*", + "magento/module-media-gallery-renditions-api": "*", + "magento/module-media-storage": "*", + "magento/module-message-queue": "*", + "magento/module-msrp": "*", + "magento/module-msrp-configurable-product": "*", + "magento/module-msrp-grouped-product": "*", + "magento/module-multishipping": "*", + "magento/module-mysql-mq": "*", + "magento/module-new-relic-reporting": "*", + "magento/module-newsletter": "*", + "magento/module-newsletter-graph-ql": "*", + "magento/module-offline-payments": "*", + "magento/module-offline-shipping": "*", + "magento/module-page-cache": "*", + "magento/module-payment": "*", + "magento/module-payment-graph-ql": "*", + "magento/module-paypal": "*", + "magento/module-paypal-captcha": "*", + "magento/module-paypal-graph-ql": "*", + "magento/module-persistent": "*", + "magento/module-product-alert": "*", + "magento/module-product-video": "*", + "magento/module-quote": "*", + "magento/module-quote-analytics": "*", + "magento/module-quote-bundle-options": "*", + "magento/module-quote-configurable-options": "*", + "magento/module-quote-downloadable-links": "*", + "magento/module-quote-graph-ql": "*", + "magento/module-related-product-graph-ql": "*", + "magento/module-release-notification": "*", + "magento/module-reports": "*", + "magento/module-require-js": "*", + "magento/module-review": "*", + "magento/module-review-graph-ql": "*", + "magento/module-review-analytics": "*", + "magento/module-robots": "*", + "magento/module-rss": "*", + "magento/module-rule": "*", + "magento/module-sales": "*", + "magento/module-sales-analytics": "*", + "magento/module-sales-graph-ql": "*", + "magento/module-sales-inventory": "*", + "magento/module-sales-rule": "*", + "magento/module-sales-sequence": "*", + "magento/module-sample-data": "*", + "magento/module-search": "*", + "magento/module-security": "*", + "magento/module-send-friend": "*", + "magento/module-send-friend-graph-ql": "*", + "magento/module-shipping": "*", + "magento/module-sitemap": "*", + "magento/module-store": "*", + "magento/module-store-graph-ql": "*", + "magento/module-swagger": "*", + "magento/module-swagger-webapi": "*", + "magento/module-swagger-webapi-async": "*", + "magento/module-swatches": "*", + "magento/module-swatches-layered-navigation": "*", + "magento/module-tax": "*", + "magento/module-tax-import-export": "*", + "magento/module-theme": "*", + "magento/module-theme-graph-ql": "*", + "magento/module-translation": "*", + "magento/module-ui": "*", + "magento/module-ups": "*", + "magento/module-url-rewrite": "*", + "magento/module-user": "*", + "magento/module-usps": "*", + "magento/module-variable": "*", + "magento/module-vault": "*", + "magento/module-vault-graph-ql": "*", + "magento/module-version": "*", + "magento/module-webapi": "*", + "magento/module-webapi-async": "*", + "magento/module-webapi-security": "*", + "magento/module-weee": "*", + "magento/module-widget": "*", + "magento/module-wishlist": "*", + "magento/module-wishlist-graph-ql": "*", + "magento/module-wishlist-analytics": "*", + "magento/theme-adminhtml-backend": "*", + "magento/theme-frontend-blank": "*", + "magento/theme-frontend-luma": "*", + "magento/language-de_de": "*", + "magento/language-en_us": "*", + "magento/language-es_es": "*", + "magento/language-fr_fr": "*", + "magento/language-nl_nl": "*", + "magento/language-pt_br": "*", + "magento/language-zh_hans_cn": "*", + "magento/framework": "*", + "magento/framework-amqp": "*", + "magento/framework-bulk": "*", + "magento/framework-message-queue": "*", "trentrichardson/jquery-timepicker-addon": "1.4.3", "components/jquery": "1.11.0", "blueimp/jquery-file-upload": "5.6.14", "components/jqueryui": "1.10.4", "twbs/bootstrap": "3.1.0", "tinymce/tinymce": "3.4.7", - "magento/module-csp": "100.4.4", - "magento/module-aws-s3": "100.4.3", - "magento/module-remote-storage": "100.4.3", - "magento/module-jwt-framework-adapter": "100.4.1", - "magento/module-jwt-user-token": "100.4.0" + "magento/module-csp": "*", + "magento/module-aws-s3": "*", + "magento/module-remote-storage": "*", + "magento/module-jwt-framework-adapter": "*", + "magento/module-jwt-user-token": "*" }, - "autoload-dev": { - "psr-4": { - "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/", - "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", - "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", - "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", - "Magento\\Tools\\": "dev/tools/Magento/Tools/", - "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/" - } + "conflict": { + "gene/bluefoot": "*" }, - "prefer-stable": true, "extra": { "component_paths": { - "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", + "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", "components/jquery": [ "lib/web/jquery.js", "lib/web/jquery/jquery.min.js" ], + "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader", "components/jqueryui": [ "lib/web/jquery/jquery-ui.js" ], - "tinymce/tinymce": "lib/web/tiny_mce_5", - "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js", "twbs/bootstrap": [ "lib/web/jquery/jquery.tabs.js" + ], + "tinymce/tinymce": "lib/web/tiny_mce_5" + } + }, + "autoload": { + "psr-4": { + "Magento\\Framework\\": "lib/internal/Magento/Framework/", + "Magento\\Setup\\": "setup/src/Magento/Setup/", + "Magento\\": "app/code/Magento/" + }, + "psr-0": { + "": [ + "app/code/", + "generated/code/" ] + }, + "files": [ + "app/etc/NonComposerComponentRegistration.php" + ], + "exclude-from-classmap": [ + "**/dev/**", + "**/update/**", + "**/Test/**" + ] + }, + "autoload-dev": { + "psr-4": { + "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", + "Magento\\Tools\\": "dev/tools/Magento/Tools/", + "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/", + "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", + "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", + "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" } - } + }, + "prefer-stable": true } - From 84ffcd6c00d4edfd0b50cce596c93640c284e9eb Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Tue, 24 Jan 2023 17:06:00 +0530 Subject: [PATCH 569/985] AC-7467::Functional AdminUpdateUserRoleTest Failure on 2.4-develop - Fixed failing mainline mftf --- .../Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml | 3 ++- .../Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml index c597d3d660dc8..ad39e8105e957 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml @@ -21,7 +21,7 @@ </annotations> <before> <magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/> - + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="SimpleTwo" stepKey="createProduct"/> <magentoCron stepKey="runCronIndex" groups="index"/> @@ -29,6 +29,7 @@ </before> <after> <magentoCLI command="config:set checkout/options/enable_agreements 0" stepKey="setDisableTermsOnCheckout"/> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> <deleteData createDataKey="createProduct" stepKey="deletedProduct"/> <actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml index 592c8b7981bed..7783ad8a9a102 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml @@ -26,6 +26,7 @@ <createData entity="defaultSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> From 45a9bec664b87a1a8b717401337346e7e17cc828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cengcom-Echo=E2=80=9D?= <engcom-vendorworker-echo@adobe.com> Date: Tue, 24 Jan 2023 17:34:59 +0530 Subject: [PATCH 570/985] Fixed static test failure --- .../frontend/Magento/blank/web/css/source/_extends.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/design/frontend/Magento/blank/web/css/source/_extends.less b/app/design/frontend/Magento/blank/web/css/source/_extends.less index a3b38fe35789e..aa934282ad7b6 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_extends.less +++ b/app/design/frontend/Magento/blank/web/css/source/_extends.less @@ -11,6 +11,9 @@ // List default styles reset // --------------------------------------------- +/** + * @codingStandardsIgnoreStart + */ & when (@media-common = true) { .abs-reset-list { .lib-list-reset-styles(); @@ -1454,3 +1457,4 @@ } } } +//@codingStandardsIgnoreEnd From 8845c8030ae0c222a7972880a4bd35255cbc9a5d Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Tue, 24 Jan 2023 18:08:05 +0530 Subject: [PATCH 571/985] Update StorefrontCustomerLoginSignUpSection.xml --- .../Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml index 4df07f7637e50..d224019885274 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml @@ -10,6 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCreateUserSection"> <element name="createAnAccountButton" type="button" selector="//div[contains(@class, 'block-new-customer')]//a/span[contains(.,'Create an Account')]"/> - <element name="createAnAccountButtonForCustomer" type="button" selector="//*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)"/> + <element name="createAnAccountButtonForCustomer" type="button" selector="//*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)]"/> </section> </sections> From 9b2d74f7797dd665e9cc071fc5ff062154206e88 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Tue, 24 Jan 2023 18:30:22 +0530 Subject: [PATCH 572/985] AC-7776::Revert updating composer versions for version-setter for 2.4.5 --- app/code/Magento/AdminAdobeIms/composer.json | 41 ----------- app/code/Magento/AdminAnalytics/composer.json | 24 +++---- .../Magento/AdminNotification/composer.json | 24 +++---- app/code/Magento/AdobeIms/composer.json | 28 -------- app/code/Magento/AdobeImsApi/composer.json | 23 ------ .../AdvancedPricingImportExport/composer.json | 30 ++++---- app/code/Magento/AdvancedSearch/composer.json | 28 ++++---- app/code/Magento/Amqp/composer.json | 18 +++-- app/code/Magento/Analytics/composer.json | 18 +++-- .../AsynchronousOperations/composer.json | 26 ++++--- app/code/Magento/Authorization/composer.json | 16 ++--- app/code/Magento/AwsS3/composer.json | 14 ++-- app/code/Magento/Backend/composer.json | 50 +++++++------ app/code/Magento/Backup/composer.json | 20 +++--- app/code/Magento/Bundle/composer.json | 52 +++++++------- app/code/Magento/BundleGraphQl/composer.json | 28 ++++---- .../Magento/BundleImportExport/composer.json | 26 ++++--- .../Magento/CacheInvalidate/composer.json | 16 ++--- app/code/Magento/Captcha/composer.json | 26 ++++--- .../Magento/CardinalCommerce/composer.json | 20 +++--- app/code/Magento/Catalog/composer.json | 70 +++++++++---------- .../Magento/CatalogAnalytics/composer.json | 14 ++-- .../Magento/CatalogCmsGraphQl/composer.json | 22 +++--- .../CatalogCustomerGraphQl/composer.json | 16 ++--- app/code/Magento/CatalogGraphQl/composer.json | 36 +++++----- .../Magento/CatalogImportExport/composer.json | 34 +++++---- .../Magento/CatalogInventory/composer.json | 28 ++++---- .../CatalogInventoryGraphQl/composer.json | 18 +++-- app/code/Magento/CatalogRule/composer.json | 32 ++++----- .../CatalogRuleConfigurable/composer.json | 22 +++--- .../Magento/CatalogRuleGraphQl/composer.json | 14 ++-- app/code/Magento/CatalogSearch/composer.json | 38 +++++----- .../Magento/CatalogUrlRewrite/composer.json | 32 ++++----- .../CatalogUrlRewriteGraphQl/composer.json | 26 ++++--- app/code/Magento/CatalogWidget/composer.json | 32 ++++----- app/code/Magento/Checkout/composer.json | 56 +++++++-------- .../Magento/CheckoutAgreements/composer.json | 22 +++--- .../CheckoutAgreementsGraphQl/composer.json | 18 +++-- app/code/Magento/Cms/composer.json | 34 +++++---- app/code/Magento/CmsGraphQl/composer.json | 24 +++---- app/code/Magento/CmsUrlRewrite/composer.json | 20 +++--- .../CmsUrlRewriteGraphQl/composer.json | 24 +++---- .../Magento/CompareListGraphQl/composer.json | 14 ++-- app/code/Magento/Config/composer.json | 28 ++++---- .../ConfigurableImportExport/composer.json | 26 ++++--- .../Magento/ConfigurableProduct/composer.json | 50 +++++++------ .../ConfigurableProductGraphQl/composer.json | 24 +++---- .../ConfigurableProductSales/composer.json | 22 +++--- app/code/Magento/Contact/composer.json | 22 +++--- app/code/Magento/Cookie/composer.json | 18 +++-- app/code/Magento/Cron/composer.json | 18 +++-- app/code/Magento/Csp/composer.json | 16 ++--- app/code/Magento/CurrencySymbol/composer.json | 24 +++---- app/code/Magento/Customer/composer.json | 56 +++++++-------- .../Magento/CustomerAnalytics/composer.json | 14 ++-- .../CustomerDownloadableGraphQl/composer.json | 18 +++-- .../Magento/CustomerGraphQl/composer.json | 30 ++++---- .../CustomerImportExport/composer.json | 26 ++++--- app/code/Magento/Deploy/composer.json | 22 +++--- app/code/Magento/Developer/composer.json | 18 +++-- app/code/Magento/Dhl/composer.json | 34 +++++---- app/code/Magento/Directory/composer.json | 20 +++--- .../Magento/DirectoryGraphQl/composer.json | 16 ++--- app/code/Magento/Downloadable/composer.json | 48 ++++++------- .../Magento/DownloadableGraphQl/composer.json | 28 ++++---- .../DownloadableImportExport/composer.json | 26 ++++--- app/code/Magento/Eav/composer.json | 24 +++---- app/code/Magento/EavGraphQl/composer.json | 16 ++--- app/code/Magento/Elasticsearch/composer.json | 32 ++++----- app/code/Magento/Elasticsearch7/composer.json | 26 ++++--- app/code/Magento/Elasticsearch8/composer.json | 25 +++---- app/code/Magento/Email/composer.json | 34 +++++---- app/code/Magento/EncryptionKey/composer.json | 18 +++-- app/code/Magento/Fedex/composer.json | 30 ++++---- app/code/Magento/GiftMessage/composer.json | 34 +++++---- .../Magento/GiftMessageGraphQl/composer.json | 16 ++--- app/code/Magento/GoogleAdwords/composer.json | 18 +++-- .../Magento/GoogleAnalytics/composer.json | 22 +++--- app/code/Magento/GoogleGtag/composer.json | 22 +++--- .../Magento/GoogleOptimizer/composer.json | 28 ++++---- app/code/Magento/GraphQl/composer.json | 24 +++---- app/code/Magento/GraphQlCache/composer.json | 18 +++-- .../GroupedCatalogInventory/composer.json | 20 +++--- .../Magento/GroupedImportExport/composer.json | 24 +++---- app/code/Magento/GroupedProduct/composer.json | 42 ++++++----- .../GroupedProductGraphQl/composer.json | 16 ++--- app/code/Magento/ImportExport/composer.json | 26 ++++--- app/code/Magento/Indexer/composer.json | 16 ++--- .../Magento/InstantPurchase/composer.json | 18 +++-- app/code/Magento/Integration/composer.json | 28 ++++---- .../Magento/JwtFrameworkAdapter/composer.json | 16 ++--- app/code/Magento/JwtUserToken/composer.json | 18 +++-- .../Magento/LayeredNavigation/composer.json | 18 +++-- .../Magento/LoginAsCustomer/composer.json | 22 +++--- .../LoginAsCustomerAdminUi/composer.json | 29 ++++---- .../Magento/LoginAsCustomerApi/composer.json | 10 ++- .../LoginAsCustomerAssistance/composer.json | 29 ++++---- .../LoginAsCustomerFrontendUi/composer.json | 17 +++-- .../LoginAsCustomerGraphQl/composer.json | 26 ++++--- .../Magento/LoginAsCustomerLog/composer.json | 27 ++++--- .../LoginAsCustomerPageCache/composer.json | 21 +++--- .../LoginAsCustomerQuote/composer.json | 23 +++--- .../LoginAsCustomerSales/composer.json | 23 +++--- app/code/Magento/Marketplace/composer.json | 16 ++--- app/code/Magento/MediaContent/composer.json | 14 ++-- .../Magento/MediaContentApi/composer.json | 12 ++-- .../Magento/MediaContentCatalog/composer.json | 18 +++-- .../Magento/MediaContentCms/composer.json | 14 ++-- .../MediaContentSynchronization/composer.json | 24 +++---- .../composer.json | 12 ++-- .../composer.json | 16 ++--- .../composer.json | 16 ++--- app/code/Magento/MediaGallery/composer.json | 14 ++-- .../Magento/MediaGalleryApi/composer.json | 10 ++- .../Magento/MediaGalleryCatalog/composer.json | 14 ++-- .../composer.json | 24 +++---- .../MediaGalleryCatalogUi/composer.json | 20 +++--- .../Magento/MediaGalleryCmsUi/composer.json | 14 ++-- .../MediaGalleryIntegration/composer.json | 32 ++++----- .../MediaGalleryMetadata/composer.json | 12 ++-- .../MediaGalleryMetadataApi/composer.json | 10 ++- .../MediaGalleryRenditions/composer.json | 24 +++---- .../MediaGalleryRenditionsApi/composer.json | 10 ++- .../MediaGallerySynchronization/composer.json | 16 ++--- .../composer.json | 12 ++-- .../composer.json | 16 ++--- app/code/Magento/MediaGalleryUi/composer.json | 32 ++++----- .../Magento/MediaGalleryUiApi/composer.json | 16 ++--- app/code/Magento/MediaStorage/composer.json | 30 ++++---- app/code/Magento/MessageQueue/composer.json | 16 ++--- app/code/Magento/Msrp/composer.json | 28 ++++---- .../MsrpConfigurableProduct/composer.json | 20 +++--- .../Magento/MsrpGroupedProduct/composer.json | 20 +++--- app/code/Magento/Multishipping/composer.json | 34 +++++---- app/code/Magento/MysqlMq/composer.json | 18 +++-- .../Magento/NewRelicReporting/composer.json | 26 ++++--- app/code/Magento/Newsletter/composer.json | 32 ++++----- .../Magento/NewsletterGraphQl/composer.json | 22 +++--- .../Magento/OfflinePayments/composer.json | 22 +++--- .../Magento/OfflineShipping/composer.json | 36 +++++----- app/code/Magento/PageCache/composer.json | 22 +++--- app/code/Magento/Payment/composer.json | 29 ++++---- app/code/Magento/PaymentGraphQl/composer.json | 18 +++-- app/code/Magento/Paypal/composer.json | 50 +++++++------ app/code/Magento/PaypalCaptcha/composer.json | 22 +++--- app/code/Magento/PaypalGraphQl/composer.json | 34 +++++---- app/code/Magento/Persistent/composer.json | 26 ++++--- app/code/Magento/ProductAlert/composer.json | 32 ++++----- app/code/Magento/ProductVideo/composer.json | 30 ++++---- app/code/Magento/Quote/composer.json | 44 ++++++------ app/code/Magento/QuoteAnalytics/composer.json | 14 ++-- .../Magento/QuoteBundleOptions/composer.json | 12 ++-- .../QuoteConfigurableOptions/composer.json | 12 ++-- .../QuoteDownloadableLinks/composer.json | 12 ++-- app/code/Magento/QuoteGraphQl/composer.json | 40 +++++------ .../RelatedProductGraphQl/composer.json | 18 +++-- .../Magento/ReleaseNotification/composer.json | 22 +++--- app/code/Magento/RemoteStorage/composer.json | 40 +++++------ app/code/Magento/Reports/composer.json | 48 ++++++------- app/code/Magento/RequireJs/composer.json | 14 ++-- app/code/Magento/Review/composer.json | 34 +++++---- .../Magento/ReviewAnalytics/composer.json | 14 ++-- app/code/Magento/ReviewGraphQl/composer.json | 22 +++--- app/code/Magento/Robots/composer.json | 18 +++-- app/code/Magento/Rss/composer.json | 20 +++--- app/code/Magento/Rule/composer.json | 22 +++--- app/code/Magento/Sales/composer.json | 64 ++++++++--------- app/code/Magento/SalesAnalytics/composer.json | 14 ++-- app/code/Magento/SalesGraphQl/composer.json | 24 +++---- app/code/Magento/SalesInventory/composer.json | 22 +++--- app/code/Magento/SalesRule/composer.json | 58 ++++++++------- app/code/Magento/SalesSequence/composer.json | 14 ++-- app/code/Magento/SampleData/composer.json | 16 ++--- app/code/Magento/Search/composer.json | 24 +++---- app/code/Magento/Security/composer.json | 24 +++---- app/code/Magento/SendFriend/composer.json | 26 ++++--- .../Magento/SendFriendGraphQl/composer.json | 16 ++--- app/code/Magento/Shipping/composer.json | 46 ++++++------ app/code/Magento/Sitemap/composer.json | 34 +++++---- app/code/Magento/Store/composer.json | 32 ++++----- app/code/Magento/StoreGraphQl/composer.json | 16 ++--- app/code/Magento/Swagger/composer.json | 14 ++-- app/code/Magento/SwaggerWebapi/composer.json | 16 ++--- .../Magento/SwaggerWebapiAsync/composer.json | 18 +++-- app/code/Magento/Swatches/composer.json | 38 +++++----- .../Magento/SwatchesGraphQl/composer.json | 22 +++--- .../SwatchesLayeredNavigation/composer.json | 14 ++-- app/code/Magento/Tax/composer.json | 44 ++++++------ app/code/Magento/TaxGraphQl/composer.json | 16 ++--- .../Magento/TaxImportExport/composer.json | 24 +++---- app/code/Magento/Theme/composer.json | 40 +++++------ app/code/Magento/ThemeGraphQl/composer.json | 14 ++-- app/code/Magento/Translation/composer.json | 26 ++++--- app/code/Magento/Ui/composer.json | 26 ++++--- app/code/Magento/Ups/composer.json | 30 ++++---- app/code/Magento/UrlRewrite/composer.json | 28 ++++---- .../Magento/UrlRewriteGraphQl/composer.json | 16 ++--- app/code/Magento/User/composer.json | 28 ++++---- app/code/Magento/Usps/composer.json | 30 ++++---- app/code/Magento/Variable/composer.json | 22 +++--- app/code/Magento/Vault/composer.json | 29 ++++---- app/code/Magento/VaultGraphQl/composer.json | 14 ++-- app/code/Magento/Version/composer.json | 14 ++-- app/code/Magento/Webapi/composer.json | 26 ++++--- app/code/Magento/WebapiAsync/composer.json | 24 +++---- app/code/Magento/WebapiSecurity/composer.json | 16 ++--- app/code/Magento/Weee/composer.json | 40 +++++------ app/code/Magento/WeeeGraphQl/composer.json | 20 +++--- app/code/Magento/Widget/composer.json | 32 ++++----- app/code/Magento/Wishlist/composer.json | 48 ++++++------- .../Magento/WishlistAnalytics/composer.json | 14 ++-- .../Magento/WishlistGraphQl/composer.json | 22 +++--- .../adminhtml/Magento/backend/composer.json | 14 ++-- .../frontend/Magento/blank/composer.json | 14 ++-- .../frontend/Magento/luma/composer.json | 16 ++--- app/i18n/Magento/de_DE/composer.json | 6 +- app/i18n/Magento/en_US/composer.json | 6 +- app/i18n/Magento/es_ES/composer.json | 6 +- app/i18n/Magento/fr_FR/composer.json | 6 +- app/i18n/Magento/nl_NL/composer.json | 6 +- app/i18n/Magento/pt_BR/composer.json | 6 +- app/i18n/Magento/zh_Hans_CN/composer.json | 6 +- composer.json | 6 +- .../Magento/Framework/Amqp/composer.json | 18 +++-- .../Magento/Framework/Bulk/composer.json | 18 +++-- .../Framework/MessageQueue/composer.json | 18 +++-- lib/internal/Magento/Framework/composer.json | 10 ++- 227 files changed, 2422 insertions(+), 2954 deletions(-) delete mode 100644 app/code/Magento/AdminAdobeIms/composer.json delete mode 100644 app/code/Magento/AdobeIms/composer.json delete mode 100644 app/code/Magento/AdobeImsApi/composer.json diff --git a/app/code/Magento/AdminAdobeIms/composer.json b/app/code/Magento/AdminAdobeIms/composer.json deleted file mode 100644 index 117c985f1adc4..0000000000000 --- a/app/code/Magento/AdminAdobeIms/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "magento/module-admin-adobe-ims", - "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "config": { - "sort-packages": true - }, - "version": "100.4.0", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "103.0.*", - "magento/module-adobe-ims": "2.1.*", - "magento/module-adobe-ims-api": "2.1.*", - "magento/module-config": "101.2.*", - "magento/module-backend": "102.0.*", - "magento/module-user": "101.2.*", - "magento/module-captcha": "100.4.*", - "magento/module-authorization": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-email": "101.1.*", - "magento/module-integration": "100.4.*", - "magento/module-jwt-user-token": "100.4.*", - "magento/module-security": "100.4.*" - }, - "suggest": { - "magento/module-theme": "101.1.*" - }, - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\AdminAdobeIms\\": "" - } - } -} - diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json index 01fe2fd92602e..e2f2bb182422d 100644 --- a/app/code/Magento/AdminAnalytics/composer.json +++ b/app/code/Magento/AdminAnalytics/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-admin-analytics", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-release-notification": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-release-notification": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index d21749759338e..1354cc202d7d2 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-admin-notification", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-config": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/AdobeIms/composer.json b/app/code/Magento/AdobeIms/composer.json deleted file mode 100644 index b35b052711334..0000000000000 --- a/app/code/Magento/AdobeIms/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "magento/module-adobe-ims", - "description": "Magento module responsible for authentication to Adobe services", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "2.1.4", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "103.0.*", - "magento/module-adobe-ims-api": "2.1.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-user": "101.2.*" - }, - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\AdobeIms\\": "" - } - } -} - diff --git a/app/code/Magento/AdobeImsApi/composer.json b/app/code/Magento/AdobeImsApi/composer.json deleted file mode 100644 index 5dd770ff3d660..0000000000000 --- a/app/code/Magento/AdobeImsApi/composer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "magento/module-adobe-ims-api", - "description": "Implementation of Magento module responsible for authentication to Adobe services", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "2.1.2", - "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "103.0.*" - }, - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\AdobeImsApi\\": "" - } - } -} - diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json index d7a889c2a1320..9ba5c58657f4f 100644 --- a/app/code/Magento/AdvancedPricingImportExport/composer.json +++ b/app/code/Magento/AdvancedPricingImportExport/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-advanced-pricing-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-store": "101.1.*", - "magento/module-directory": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-catalog-inventory": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-store": "*", + "magento/module-directory": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/AdvancedSearch/composer.json b/app/code/Magento/AdvancedSearch/composer.json index 2a079d44d5e1e..289207e2fa1c4 100644 --- a/app/code/Magento/AdvancedSearch/composer.json +++ b/app/code/Magento/AdvancedSearch/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-advanced-search", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-search": "101.1.*", - "magento/module-store": "101.1.*", + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-search": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-search": "*", + "magento/module-store": "*", "php": "~8.1.0||~8.2.0" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/Amqp/composer.json b/app/code/Magento/Amqp/composer.json index 90e036d2045bf..2382864a4c4f5 100644 --- a/app/code/Magento/Amqp/composer.json +++ b/app/code/Magento/Amqp/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-amqp", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { - "magento/framework": "103.0.*", - "magento/framework-amqp": "100.4.*", - "magento/framework-message-queue": "100.4.*", + "magento/framework": "*", + "magento/framework-amqp": "*", + "magento/framework-message-queue": "*", "php": "~8.1.0||~8.2.0" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json index 2a31e988c7b2a..d52a4dc2a98a4 100644 --- a/app/code/Magento/Analytics/composer.json +++ b/app/code/Magento/Analytics/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-integration": "*", + "magento/module-store": "*", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-integration": "100.4.*", - "magento/module-store": "101.1.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/AsynchronousOperations/composer.json b/app/code/Magento/AsynchronousOperations/composer.json index 48fde92eea147..7efcf27821405 100644 --- a/app/code/Magento/AsynchronousOperations/composer.json +++ b/app/code/Magento/AsynchronousOperations/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-asynchronous-operations", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { - "magento/framework": "103.0.*", - "magento/framework-message-queue": "100.4.*", - "magento/framework-bulk": "101.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-ui": "101.2.*", + "magento/framework": "*", + "magento/framework-message-queue": "*", + "magento/framework-bulk": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-ui": "*", "php": "~8.1.0||~8.2.0" }, "suggest": { - "magento/module-admin-notification": "100.4.*", + "magento/module-admin-notification": "*", "magento/module-logging": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index 1f12088badda4..268db947994fe 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-authorization", "description": "Authorization module provides access to Magento ACL functionality.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*" + "magento/framework": "*", + "magento/module-backend": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/AwsS3/composer.json b/app/code/Magento/AwsS3/composer.json index 41424112d7c96..9b9d55c18140a 100644 --- a/app/code/Magento/AwsS3/composer.json +++ b/app/code/Magento/AwsS3/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-aws-s3", "description": "N/A", - "type": "magento2-module", - "license": [ - "proprietary" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-remote-storage": "100.4.*" + "magento/framework": "*", + "magento/module-remote-storage": "*" }, + "type": "magento2-module", + "license": [ + "proprietary" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 6971a842f13a9..a3d6c48757c9a 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -1,39 +1,38 @@ { "name": "magento/module-backend", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "102.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backup": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-cms": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-developer": "100.4.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-quote": "101.2.*", - "magento/module-reports": "100.4.*", - "magento/module-require-js": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-security": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-translation": "100.4.*", - "magento/module-ui": "101.2.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-backup": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-cms": "*", + "magento/module-customer": "*", + "magento/module-developer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-quote": "*", + "magento/module-reports": "*", + "magento/module-require-js": "*", + "magento/module-sales": "*", + "magento/module-security": "*", + "magento/module-store": "*", + "magento/module-translation": "*", + "magento/module-ui": "*", + "magento/module-user": "*" }, "suggest": { - "magento/module-theme": "101.1.*" + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php", @@ -44,4 +43,3 @@ } } } - diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index c2a21ccec21ce..2f7a82e9a5c82 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-backup", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-cron": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-cron": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index d5c708de4aa4f..35972c3ba10de 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -1,40 +1,39 @@ { "name": "magento/module-bundle", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-catalog-rule": "101.2.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-gift-message": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-ui": "101.2.*", - "magento/module-directory": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-catalog-rule": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-gift-message": "*", + "magento/module-media-storage": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-ui": "*", + "magento/module-directory": "*" }, "suggest": { - "magento/module-webapi": "100.4.*", - "magento/module-bundle-sample-data": "Sample Data version: 100.4.*", - "magento/module-sales-rule": "101.2.*" + "magento/module-webapi": "*", + "magento/module-bundle-sample-data": "*", + "magento/module-sales-rule": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -44,4 +43,3 @@ } } } - diff --git a/app/code/Magento/BundleGraphQl/composer.json b/app/code/Magento/BundleGraphQl/composer.json index ea118bcb2e5f1..7d29641125a37 100644 --- a/app/code/Magento/BundleGraphQl/composer.json +++ b/app/code/Magento/BundleGraphQl/composer.json @@ -2,24 +2,23 @@ "name": "magento/module-bundle-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-catalog": "*", + "magento/module-bundle": "*", + "magento/module-graph-ql": "*", + "magento/module-catalog-graph-ql": "*", + "magento/module-quote": "*", + "magento/module-quote-graph-ql": "*", + "magento/module-store": "*", + "magento/module-sales": "*", + "magento/module-sales-graph-ql": "*", + "magento/framework": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-catalog": "104.0.*", - "magento/module-bundle": "101.0.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-quote-graph-ql": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-graph-ql": "100.4.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json index a0eefe9c75db6..d7a59a1795ff6 100644 --- a/app/code/Magento/BundleImportExport/composer.json +++ b/app/code/Magento/BundleImportExport/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-bundle-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-bundle": "101.0.*", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*" + "magento/framework": "*", + "magento/module-bundle": "*", + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json index 4d95c2153b3a0..6c635ea103b0c 100644 --- a/app/code/Magento/CacheInvalidate/composer.json +++ b/app/code/Magento/CacheInvalidate/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-cache-invalidate", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-page-cache": "100.4.*" + "magento/framework": "*", + "magento/module-page-cache": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 4523c2b3a8567..0c39d988ba740 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-captcha", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-authorization": "100.4.*", + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-authorization": "*", "laminas/laminas-captcha": "^2.12", "laminas/laminas-db": "^2.13.4" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/CardinalCommerce/composer.json b/app/code/Magento/CardinalCommerce/composer.json index 2645dad503d0a..a6bc6bd72afd6 100644 --- a/app/code/Magento/CardinalCommerce/composer.json +++ b/app/code/Magento/CardinalCommerce/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-cardinal-commerce", "description": "Provides a possibility to enable 3-D Secure 2.0 support for payment methods.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-payment": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index d924a6de64cd8..4421b2991266b 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -1,49 +1,48 @@ { "name": "magento/module-catalog", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "104.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-asynchronous-operations": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-catalog-rule": "101.2.*", - "magento/module-catalog-url-rewrite": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-indexer": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-msrp": "100.4.*", - "magento/module-page-cache": "100.4.*", - "magento/module-product-alert": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-url-rewrite": "102.0.*", - "magento/module-widget": "101.2.*", - "magento/module-wishlist": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-backend": "*", + "magento/module-catalog-inventory": "*", + "magento/module-catalog-rule": "*", + "magento/module-catalog-url-rewrite": "*", + "magento/module-checkout": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-indexer": "*", + "magento/module-media-storage": "*", + "magento/module-msrp": "*", + "magento/module-page-cache": "*", + "magento/module-product-alert": "*", + "magento/module-quote": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-url-rewrite": "*", + "magento/module-widget": "*", + "magento/module-wishlist": "*" }, "suggest": { - "magento/module-cookie": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-catalog-sample-data": "Sample Data version: 100.4.*" + "magento/module-cookie": "*", + "magento/module-sales": "*", + "magento/module-catalog-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -53,4 +52,3 @@ } } } - diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json index a79792d0bdb83..2710625d0f08d 100644 --- a/app/code/Magento/CatalogAnalytics/composer.json +++ b/app/code/Magento/CatalogAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-catalog-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/CatalogCmsGraphQl/composer.json b/app/code/Magento/CatalogCmsGraphQl/composer.json index 960ea7f8e41d1..d1cff1a3e448f 100644 --- a/app/code/Magento/CatalogCmsGraphQl/composer.json +++ b/app/code/Magento/CatalogCmsGraphQl/composer.json @@ -2,22 +2,21 @@ "name": "magento/module-catalog-cms-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-cms-graph-ql": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-cms-graph-ql": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*" + "magento/module-graph-ql": "*", + "magento/module-cms": "*", + "magento/module-catalog-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/CatalogCustomerGraphQl/composer.json b/app/code/Magento/CatalogCustomerGraphQl/composer.json index 0d36f85a6753d..5c4a301857c7e 100644 --- a/app/code/Magento/CatalogCustomerGraphQl/composer.json +++ b/app/code/Magento/CatalogCustomerGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-catalog-customer-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-catalog-graph-ql": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-catalog-graph-ql": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/CatalogGraphQl/composer.json b/app/code/Magento/CatalogGraphQl/composer.json index 596c37231c1e7..fbc4172226c58 100644 --- a/app/code/Magento/CatalogGraphQl/composer.json +++ b/app/code/Magento/CatalogGraphQl/composer.json @@ -2,29 +2,28 @@ "name": "magento/module-catalog-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-eav": "102.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-directory": "100.4.*", - "magento/module-search": "101.1.*", - "magento/module-store": "101.1.*", - "magento/module-eav-graph-ql": "100.4.*", - "magento/module-catalog-search": "102.0.*", - "magento/framework": "103.0.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-advanced-search": "100.4.*" + "magento/module-eav": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-directory": "*", + "magento/module-search": "*", + "magento/module-store": "*", + "magento/module-eav-graph-ql": "*", + "magento/module-catalog-search": "*", + "magento/framework": "*", + "magento/module-graph-ql": "*", + "magento/module-advanced-search": "*" }, "suggest": { - "magento/module-graph-ql-cache": "100.4.*", - "magento/module-store-graph-ql": "100.4.*" + "magento/module-graph-ql-cache": "*", + "magento/module-store-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index 0d31035364f63..41b2b5f72ce7b 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-catalog-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.5", "require": { "php": "~8.1.0||~8.2.0", "ext-ctype": "*", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-catalog-url-rewrite": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-authorization": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-catalog-url-rewrite": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-authorization": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index a363819ee55c8..7ea00923ac715 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-catalog-inventory", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-quote": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-quote": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ }, "abandoned": "magento/inventory-metapackage" } - diff --git a/app/code/Magento/CatalogInventoryGraphQl/composer.json b/app/code/Magento/CatalogInventoryGraphQl/composer.json index 41e30c8106b7d..58d567bc0706e 100644 --- a/app/code/Magento/CatalogInventoryGraphQl/composer.json +++ b/app/code/Magento/CatalogInventoryGraphQl/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-catalog-inventory-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-graph-ql": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-graph-ql": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index d721ebcf08f8e..dc9c51dade87f 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-catalog-rule", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-rule": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-rule": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-import-export": "101.0.*", - "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*" + "magento/module-import-export": "*", + "magento/module-catalog-rule-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json index a43297aa4df44..8b6569ba9fec4 100644 --- a/app/code/Magento/CatalogRuleConfigurable/composer.json +++ b/app/code/Magento/CatalogRuleConfigurable/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-catalog-rule-configurable", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "magento/framework": "*", "magento/magento-composer-installer": "*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-rule": "101.2.*", - "magento/module-configurable-product": "100.4.*" + "magento/module-catalog": "*", + "magento/module-catalog-rule": "*", + "magento/module-configurable-product": "*" }, "suggest": { - "magento/module-catalog-rule": "101.2.*" + "magento/module-catalog-rule": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/CatalogRuleGraphQl/composer.json b/app/code/Magento/CatalogRuleGraphQl/composer.json index cd2611414d3e5..c22ba277d57d9 100644 --- a/app/code/Magento/CatalogRuleGraphQl/composer.json +++ b/app/code/Magento/CatalogRuleGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-catalog-rule-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, "suggest": { - "magento/module-catalog-rule": "101.2.*" + "magento/module-catalog-rule": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index 0f116bc53e9a9..7ccdb99d2c9d1 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -1,33 +1,32 @@ { "name": "magento/module-catalog-search", "description": "Catalog search", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "102.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-indexer": "100.4.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-search": "101.1.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-indexer": "*", + "magento/module-catalog-inventory": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-search": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -37,4 +36,3 @@ } } } - diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index 43f761c522ff9..6df0042d40648 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-catalog-url-rewrite", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-url-rewrite": "102.0.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-url-rewrite": "*" }, "suggest": { - "magento/module-webapi": "100.4.*" + "magento/module-webapi": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json index 75c34394c33cb..c3917a517a68d 100644 --- a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json +++ b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json @@ -2,24 +2,23 @@ "name": "magento/module-catalog-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/module-url-rewrite-graph-ql": "100.4.*", - "magento/framework": "103.0.*" + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-catalog-graph-ql": "*", + "magento/module-url-rewrite-graph-ql": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-catalog-url-rewrite": "100.4.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/module-url-rewrite-graph-ql": "100.4.*" + "magento/module-catalog-url-rewrite": "*", + "magento/module-catalog-graph-ql": "*", + "magento/module-url-rewrite-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json index 03e92d2533a0d..b54b27474787b 100644 --- a/app/code/Magento/CatalogWidget/composer.json +++ b/app/code/Magento/CatalogWidget/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-catalog-widget", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-rule": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-widget": "101.2.*", - "magento/module-wishlist": "101.2.*", - "magento/module-theme": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-rule": "*", + "magento/module-store": "*", + "magento/module-widget": "*", + "magento/module-wishlist": "*", + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index 4e1bff40abd03..4d24d27e676ee 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -1,42 +1,41 @@ { "name": "magento/module-checkout", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-captcha": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-msrp": "100.4.*", - "magento/module-page-cache": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-rule": "101.2.*", - "magento/module-security": "100.4.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-authorization": "100.4.*" + "magento/framework": "*", + "magento/module-captcha": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-msrp": "*", + "magento/module-page-cache": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-sales-rule": "*", + "magento/module-security": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-authorization": "*" }, "suggest": { - "magento/module-cookie": "100.4.*" + "magento/module-cookie": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -46,4 +45,3 @@ } } } - diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index c5b6b29880792..44d0e86bd78f2 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-checkout-agreements", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-checkout": "*", + "magento/module-quote": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json index 9b6f794176828..c0c1853eb4324 100644 --- a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json +++ b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json @@ -2,20 +2,19 @@ "name": "magento/module-checkout-agreements-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-checkout-agreements": "100.4.*" + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-checkout-agreements": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index 190d00b378c61..aa972d0a711a7 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-cms", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "104.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-email": "101.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-variable": "100.4.*", - "magento/module-widget": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-email": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-variable": "*", + "magento/module-widget": "*" }, "suggest": { - "magento/module-cms-sample-data": "Sample Data version: 100.4.*" + "magento/module-cms-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/CmsGraphQl/composer.json b/app/code/Magento/CmsGraphQl/composer.json index 79696c1ce186a..07b7261823d92 100644 --- a/app/code/Magento/CmsGraphQl/composer.json +++ b/app/code/Magento/CmsGraphQl/composer.json @@ -2,23 +2,22 @@ "name": "magento/module-cms-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-widget": "101.2.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-widget": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*", - "magento/module-graph-ql-cache": "100.4.*", - "magento/module-store-graph-ql": "100.4.*" + "magento/module-graph-ql": "*", + "magento/module-graph-ql-cache": "*", + "magento/module-store-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index f3673669f337f..0521f77f9bb7f 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-cms-url-rewrite", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-store": "101.1.*", - "magento/module-url-rewrite": "102.0.*" + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-store": "*", + "magento/module-url-rewrite": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json index 74a98e815c76f..2687ad032e000 100644 --- a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json +++ b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json @@ -2,23 +2,22 @@ "name": "magento/module-cms-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-store": "101.1.*", - "magento/module-url-rewrite-graph-ql": "100.4.*", - "magento/module-cms-graph-ql": "100.4.*" + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-store": "*", + "magento/module-url-rewrite-graph-ql": "*", + "magento/module-cms-graph-ql": "*" }, "suggest": { - "magento/module-cms-url-rewrite": "100.4.*", - "magento/module-catalog-graph-ql": "100.4.*" + "magento/module-cms-url-rewrite": "*", + "magento/module-catalog-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/CompareListGraphQl/composer.json b/app/code/Magento/CompareListGraphQl/composer.json index 9f10c261556ce..9193e30061619 100644 --- a/app/code/Magento/CompareListGraphQl/composer.json +++ b/app/code/Magento/CompareListGraphQl/composer.json @@ -2,17 +2,16 @@ "name": "magento/module-compare-list-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json index 5d250c9fea5f5..8ad286bd667b5 100644 --- a/app/code/Magento/Config/composer.json +++ b/app/code/Magento/Config/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-config", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-cron": "100.4.*", - "magento/module-deploy": "100.4.*", - "magento/module-directory": "100.4.*", - "magento/module-email": "101.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-cron": "*", + "magento/module-deploy": "*", + "magento/module-directory": "*", + "magento/module-email": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index defe6aa1e99fb..f56cfd6299ad2 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-configurable-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-configurable-product": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-configurable-product": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index 4edf2a30210dc..8a9e4e50ad194 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -1,39 +1,38 @@ { "name": "magento/module-configurable-product", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-quote": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-msrp": "100.4.*", - "magento/module-webapi": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-rule": "101.2.*", - "magento/module-product-video": "100.4.*", - "magento/module-configurable-sample-data": "Sample Data version: 100.4.*", - "magento/module-product-links-sample-data": "Sample Data version: 100.4.*", - "magento/module-tax": "100.4.*" + "magento/module-msrp": "*", + "magento/module-webapi": "*", + "magento/module-sales": "*", + "magento/module-sales-rule": "*", + "magento/module-product-video": "*", + "magento/module-configurable-sample-data": "*", + "magento/module-product-links-sample-data": "*", + "magento/module-tax": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -43,4 +42,3 @@ } } } - diff --git a/app/code/Magento/ConfigurableProductGraphQl/composer.json b/app/code/Magento/ConfigurableProductGraphQl/composer.json index d8524e696cb7a..43c297de656c5 100644 --- a/app/code/Magento/ConfigurableProductGraphQl/composer.json +++ b/app/code/Magento/ConfigurableProductGraphQl/composer.json @@ -2,22 +2,21 @@ "name": "magento/module-configurable-product-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-catalog": "*", + "magento/module-configurable-product": "*", + "magento/module-graph-ql": "*", + "magento/module-catalog-graph-ql": "*", + "magento/module-quote": "*", + "magento/module-quote-graph-ql": "*", + "magento/module-catalog-inventory": "*", + "magento/framework": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-catalog": "104.0.*", - "magento/module-configurable-product": "100.4.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-quote-graph-ql": "100.4.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json index 35bd349996846..909c2ff967f41 100644 --- a/app/code/Magento/ConfigurableProductSales/composer.json +++ b/app/code/Magento/ConfigurableProductSales/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-configurable-product-sales", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-configurable-product": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-configurable-product": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index 7f8d70f4f0bdb..68b5bb4c9a6da 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-contact", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json index 4538a64c7f1a7..d2f1a87594a3c 100644 --- a/app/code/Magento/Cookie/composer.json +++ b/app/code/Magento/Cookie/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-cookie", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-backend": "102.0.*" + "magento/module-backend": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index cb679d654a63c..1696588920015 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-cron", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Csp/composer.json b/app/code/Magento/Csp/composer.json index bb1f9910d39f4..f2e69e7a7ec63 100644 --- a/app/code/Magento/Csp/composer.json +++ b/app/code/Magento/Csp/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-csp", "description": "CSP module enables Content Security Policies for Magento", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index b75e4523ced9f..8c2325b39d508 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-currency-symbol", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-page-cache": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-page-cache": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index 56cd4c5cc02ec..ef2047644759b 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -1,42 +1,41 @@ { "name": "magento/module-customer", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "103.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-integration": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-newsletter": "100.4.*", - "magento/module-page-cache": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-wishlist": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-integration": "*", + "magento/module-media-storage": "*", + "magento/module-newsletter": "*", + "magento/module-page-cache": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-wishlist": "*" }, "suggest": { - "magento/module-cookie": "100.4.*", - "magento/module-customer-sample-data": "Sample Data version: 100.4.*", - "magento/module-webapi": "100.4.*" + "magento/module-cookie": "*", + "magento/module-customer-sample-data": "*", + "magento/module-webapi": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -46,4 +45,3 @@ } } } - diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json index c4ec43f8c1051..d02051d5148cd 100644 --- a/app/code/Magento/CustomerAnalytics/composer.json +++ b/app/code/Magento/CustomerAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-customer-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-customer": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-customer": "103.0.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/CustomerDownloadableGraphQl/composer.json b/app/code/Magento/CustomerDownloadableGraphQl/composer.json index 4f8bc8820a689..99e2f94da4081 100644 --- a/app/code/Magento/CustomerDownloadableGraphQl/composer.json +++ b/app/code/Magento/CustomerDownloadableGraphQl/composer.json @@ -2,20 +2,19 @@ "name": "magento/module-customer-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-downloadable-graph-ql": "100.4.*", - "magento/module-graph-ql": "100.4.*", - "magento/framework": "103.0.*" + "magento/module-downloadable-graph-ql": "*", + "magento/module-graph-ql": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-catalog-graph-ql": "100.4.*" + "magento/module-catalog-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/CustomerGraphQl/composer.json b/app/code/Magento/CustomerGraphQl/composer.json index 3e6babffda9d1..5967d2e9f8ac7 100644 --- a/app/code/Magento/CustomerGraphQl/composer.json +++ b/app/code/Magento/CustomerGraphQl/composer.json @@ -2,25 +2,24 @@ "name": "magento/module-customer-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-authorization": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-graph-ql": "*", + "magento/module-newsletter": "*", + "magento/module-integration": "*", + "magento/module-store": "*", + "magento/framework": "*", + "magento/module-directory": "*", + "magento/module-tax": "*", + "magento/module-graph-ql-cache": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-authorization": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-newsletter": "100.4.*", - "magento/module-integration": "100.4.*", - "magento/module-store": "101.1.*", - "magento/framework": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-tax": "100.4.*", - "magento/module-graph-ql-cache": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 80dbc8bcea119..09eb16c1d8a01 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-customer-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json index 144814c34846d..c90a64299e8e5 100644 --- a/app/code/Magento/Deploy/composer.json +++ b/app/code/Magento/Deploy/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-deploy", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-config": "101.2.*", - "magento/module-require-js": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-config": "*", + "magento/module-require-js": "*", + "magento/module-store": "*", + "magento/module-user": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "cli_commands.php", @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json index 5a94586a10f53..3f75c5bef7d44 100644 --- a/app/code/Magento/Developer/composer.json +++ b/app/code/Magento/Developer/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-developer", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-config": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 74f5b732d8259..26b8546164965 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -1,32 +1,31 @@ { "name": "magento/module-dhl", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-checkout": "100.4.*" + "magento/module-checkout": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -36,4 +35,3 @@ } } } - diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index 2c3089f4e9508..a2538a6378d5b 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-directory", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/DirectoryGraphQl/composer.json b/app/code/Magento/DirectoryGraphQl/composer.json index 3b4d03f1de319..082fa8ae742c1 100644 --- a/app/code/Magento/DirectoryGraphQl/composer.json +++ b/app/code/Magento/DirectoryGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-directory-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-directory": "*", + "magento/module-store": "*", + "magento/module-graph-ql": "*", + "magento/framework": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-directory": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-graph-ql": "100.4.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index 80623fe3754a8..abd6479f10e2d 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -1,38 +1,37 @@ { "name": "magento/module-downloadable", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-gift-message": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-gift-message": "*", + "magento/module-media-storage": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*" + "magento/module-downloadable-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -42,4 +41,3 @@ } } } - diff --git a/app/code/Magento/DownloadableGraphQl/composer.json b/app/code/Magento/DownloadableGraphQl/composer.json index 47877e2d10450..c286438b49356 100644 --- a/app/code/Magento/DownloadableGraphQl/composer.json +++ b/app/code/Magento/DownloadableGraphQl/composer.json @@ -2,25 +2,24 @@ "name": "magento/module-downloadable-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-downloadable": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-quote-graph-ql": "100.4.*", - "magento/framework": "103.0.*" + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-downloadable": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-quote-graph-ql": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-catalog-graph-ql": "100.4.*", - "magento/module-sales-graph-ql": "100.4.*" + "magento/module-catalog-graph-ql": "*", + "magento/module-sales-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json index b429c7afa7f9f..bc35e44944c91 100644 --- a/app/code/Magento/DownloadableImportExport/composer.json +++ b/app/code/Magento/DownloadableImportExport/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-downloadable-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-downloadable": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-import-export": "101.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-downloadable": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index d8a318c6a7064..40d249ba472b9 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-eav", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "102.1.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/EavGraphQl/composer.json b/app/code/Magento/EavGraphQl/composer.json index 4268b15ab1ad5..a19a8bc3d5109 100644 --- a/app/code/Magento/EavGraphQl/composer.json +++ b/app/code/Magento/EavGraphQl/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-eav-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-eav": "102.1.*" + "magento/framework": "*", + "magento/module-eav": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 47100d9916b3b..9e6d4ceaf16e3 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-elasticsearch", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "101.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-advanced-search": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-search": "101.1.*", - "magento/module-store": "101.1.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/framework": "103.0.*", + "magento/module-advanced-search": "*", + "magento/module-catalog": "*", + "magento/module-catalog-search": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-search": "*", + "magento/module-store": "*", + "magento/module-catalog-inventory": "*", + "magento/framework": "*", "elasticsearch/elasticsearch": "~7.17.0" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json index 40f33cae703e9..89f41bf14b0dc 100644 --- a/app/code/Magento/Elasticsearch7/composer.json +++ b/app/code/Magento/Elasticsearch7/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-elasticsearch-7", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-elasticsearch": "101.0.*", - "elasticsearch/elasticsearch": "~7.17.0", - "magento/module-advanced-search": "100.4.*", - "magento/module-catalog-search": "102.0.*" + "magento/framework": "*", + "magento/module-elasticsearch": "*", + "elasticsearch/elasticsearch": "^7.17", + "magento/module-advanced-search": "*", + "magento/module-catalog-search": "*", + "magento/module-search": "*" }, "suggest": { - "magento/module-config": "101.2.*", - "magento/module-search": "101.1.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Elasticsearch8/composer.json b/app/code/Magento/Elasticsearch8/composer.json index 653c75b68e967..d9442da2399ae 100644 --- a/app/code/Magento/Elasticsearch8/composer.json +++ b/app/code/Magento/Elasticsearch8/composer.json @@ -1,24 +1,22 @@ { "name": "magento/module-elasticsearch-8", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-advanced-search": "100.4.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-search": "101.1.*", - "magento/module-elasticsearch": "101.0.*", - "elasticsearch/elasticsearch": "~7.17.0" + "magento/framework": "*", + "magento/module-elasticsearch": "*", + "magento/module-advanced-search": "*", + "magento/module-catalog-search": "*", + "magento/module-search": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index 92a3b143ac6e3..27b33acfe00db 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-email", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-require-js": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-variable": "100.4.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-require-js": "*", + "magento/module-media-storage": "*", + "magento/module-variable": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-theme": "101.1.*" + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json index c1f80b2e7d569..43a61d210ed74 100644 --- a/app/code/Magento/EncryptionKey/composer.json +++ b/app/code/Magento/EncryptionKey/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-encryption-key", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index e3bb914fb245c..c3e879ac31177 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-fedex", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index db2441d0e66db..be0cdbbe22911 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-gift-message", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-eav": "102.1.*", - "magento/module-multishipping": "100.4.*" + "magento/module-eav": "*", + "magento/module-multishipping": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/GiftMessageGraphQl/composer.json b/app/code/Magento/GiftMessageGraphQl/composer.json index f64c041a957d1..143b02439966f 100644 --- a/app/code/Magento/GiftMessageGraphQl/composer.json +++ b/app/code/Magento/GiftMessageGraphQl/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-gift-message-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-gift-message": "100.4.*" + "magento/framework": "*", + "magento/module-gift-message": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 134faff891923..a9d5b9178bb85 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-google-adwords", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-sales": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index 4f633f23e4e38..09d9cadf97658 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-google-analytics", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cookie": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-cookie": "*", + "magento/module-sales": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/GoogleGtag/composer.json b/app/code/Magento/GoogleGtag/composer.json index ff2b3937784a7..ed6e245b4e955 100644 --- a/app/code/Magento/GoogleGtag/composer.json +++ b/app/code/Magento/GoogleGtag/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-google-gtag", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.0", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cookie": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-cookie": "*", + "magento/module-sales": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index c43f167bce2fa..0192f363b61c2 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-google-optimizer", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-cms": "104.0.*", - "magento/module-google-analytics": "100.4.*", - "magento/module-google-gtag": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-cms": "*", + "magento/module-google-analytics": "*", + "magento/module-google-gtag": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/GraphQl/composer.json b/app/code/Magento/GraphQl/composer.json index 6d05967178e42..af1fe042c6df5 100644 --- a/app/code/Magento/GraphQl/composer.json +++ b/app/code/Magento/GraphQl/composer.json @@ -2,23 +2,22 @@ "name": "magento/module-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-eav": "102.1.*", - "magento/framework": "103.0.*", - "magento/module-webapi": "100.4.*", - "magento/module-new-relic-reporting": "100.4.*", - "magento/module-authorization": "100.4.*", - "webonyx/graphql-php": "~14.11.5" + "magento/module-eav": "*", + "magento/framework": "*", + "magento/module-webapi": "*", + "magento/module-new-relic-reporting": "*", + "magento/module-authorization": "*", + "webonyx/graphql-php": "^15.0" }, "suggest": { - "magento/module-graph-ql-cache": "100.4.*" + "magento/module-graph-ql-cache": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/GraphQlCache/composer.json b/app/code/Magento/GraphQlCache/composer.json index 0c0ca2cbf50d2..082534290d139 100644 --- a/app/code/Magento/GraphQlCache/composer.json +++ b/app/code/Magento/GraphQlCache/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-graph-ql-cache", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-page-cache": "*", + "magento/module-graph-ql": "*", + "magento/module-authorization": "*", + "magento/module-integration": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-page-cache": "100.4.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-authorization": "100.4.*", - "magento/module-integration": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/GroupedCatalogInventory/composer.json b/app/code/Magento/GroupedCatalogInventory/composer.json index 21f28b6162560..487fdfe0cc828 100644 --- a/app/code/Magento/GroupedCatalogInventory/composer.json +++ b/app/code/Magento/GroupedCatalogInventory/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-grouped-catalog-inventory", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-grouped-product": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-grouped-product": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index 2ad22328dddb4..21805741bca44 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-grouped-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-eav": "102.1.*", - "magento/module-grouped-product": "100.4.*", - "magento/module-import-export": "101.0.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-import-export": "*", + "magento/module-eav": "*", + "magento/module-grouped-product": "*", + "magento/module-import-export": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index d66561c21a213..8277efc44f06b 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -1,35 +1,34 @@ { "name": "magento/module-grouped-product", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-msrp": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-wishlist": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-msrp": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-wishlist": "*" }, "suggest": { - "magento/module-grouped-product-sample-data": "Sample Data version: 100.4.*" + "magento/module-grouped-product-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -39,4 +38,3 @@ } } } - diff --git a/app/code/Magento/GroupedProductGraphQl/composer.json b/app/code/Magento/GroupedProductGraphQl/composer.json index 8a1f3d2719ee8..41254569da53b 100644 --- a/app/code/Magento/GroupedProductGraphQl/composer.json +++ b/app/code/Magento/GroupedProductGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-grouped-product-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-grouped-product": "*", + "magento/module-catalog": "*", + "magento/module-catalog-graph-ql": "*", + "magento/framework": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-grouped-product": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index 9cad730da97c1..8ea56d1011582 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.0.5", "require": { "php": "~8.1.0||~8.2.0", "ext-ctype": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index 97371bcac0a96..8cee48610c7ea 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-indexer", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*" + "magento/framework": "*", + "magento/module-backend": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json index eff3b0ec16bac..d64f757adfd3b 100644 --- a/app/code/Magento/InstantPurchase/composer.json +++ b/app/code/Magento/InstantPurchase/composer.json @@ -6,17 +6,16 @@ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-vault": "101.2.*", - "magento/framework": "103.0.*" + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-quote": "*", + "magento/module-vault": "*", + "magento/framework": "*" }, "autoload": { "files": [ @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index eb434e06606e3..a6eea5321de74 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-integration", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-security": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-user": "101.2.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-security": "*", + "magento/module-store": "*", + "magento/module-user": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/JwtFrameworkAdapter/composer.json b/app/code/Magento/JwtFrameworkAdapter/composer.json index 9adec5a159229..d3bb5db7439fb 100644 --- a/app/code/Magento/JwtFrameworkAdapter/composer.json +++ b/app/code/Magento/JwtFrameworkAdapter/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-jwt-framework-adapter", "description": "JWT Manager implementation based on jwt-framework", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "web-token/jwt-framework": "^v2.2.7" + "magento/framework": "*", + "web-token/jwt-framework": "^3.1.2" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/JwtUserToken/composer.json b/app/code/Magento/JwtUserToken/composer.json index 53094b9f24704..ff1ae2bda5261 100644 --- a/app/code/Magento/JwtUserToken/composer.json +++ b/app/code/Magento/JwtUserToken/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-jwt-user-token", "description": "Introduces JWT token support for web API authentication", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.0", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-integration": "100.4.*", - "magento/module-authorization": "100.4.*" + "magento/framework": "*", + "magento/module-integration": "*", + "magento/module-authorization": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index b54b090a64483..c40f906eac3a0 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-layered-navigation", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomer/composer.json b/app/code/Magento/LoginAsCustomer/composer.json index 49c27eaffefcd..6b2cbf7c1f3f7 100755 --- a/app/code/Magento/LoginAsCustomer/composer.json +++ b/app/code/Magento/LoginAsCustomer/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-login-as-customer", "description": "Allow for admin to enter a customer account", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-login-as-customer-api": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-login-as-customer-api": "*" }, "suggest": { - "magento/module-backend": "102.0.*" + "magento/module-backend": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerAdminUi/composer.json b/app/code/Magento/LoginAsCustomerAdminUi/composer.json index c460c39c01887..2a42d814be498 100644 --- a/app/code/Magento/LoginAsCustomerAdminUi/composer.json +++ b/app/code/Magento/LoginAsCustomerAdminUi/composer.json @@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-admin-ui", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-login-as-customer-api": "100.4.*", - "magento/module-login-as-customer-frontend-ui": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-login-as-customer-api": "*", + "magento/module-login-as-customer-frontend-ui": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-sales": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-login-as-customer": "100.4.*" + "magento/module-login-as-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +28,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerApi/composer.json b/app/code/Magento/LoginAsCustomerApi/composer.json index 30f83e5b45787..fed3ab5390597 100644 --- a/app/code/Magento/LoginAsCustomerApi/composer.json +++ b/app/code/Magento/LoginAsCustomerApi/composer.json @@ -1,16 +1,15 @@ { "name": "magento/module-login-as-customer-api", "description": "Allow for admin to enter a customer account", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -20,4 +19,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerAssistance/composer.json b/app/code/Magento/LoginAsCustomerAssistance/composer.json index 50f0a09049d7a..32e351bee5115 100644 --- a/app/code/Magento/LoginAsCustomerAssistance/composer.json +++ b/app/code/Magento/LoginAsCustomerAssistance/composer.json @@ -1,24 +1,24 @@ { "name": "magento/module-login-as-customer-assistance", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-login-as-customer": "100.4.*", - "magento/module-login-as-customer-api": "100.4.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-store": "*", + "magento/module-login-as-customer": "*", + "magento/module-login-as-customer-api": "*" }, "suggest": { - "magento/module-login-as-customer-admin-ui": "100.4.*" + "magento/module-login-as-customer-admin-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +28,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json index 12ea4824ce8a0..7c7767e23c27a 100644 --- a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json +++ b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json @@ -1,18 +1,18 @@ { "name": "magento/module-login-as-customer-frontend-ui", + "description": "", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-login-as-customer-api": "*", + "magento/module-customer": "*", + "magento/module-store": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-login-as-customer-api": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +22,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerGraphQl/composer.json b/app/code/Magento/LoginAsCustomerGraphQl/composer.json index 4956d85d1355d..ee97cd320115e 100755 --- a/app/code/Magento/LoginAsCustomerGraphQl/composer.json +++ b/app/code/Magento/LoginAsCustomerGraphQl/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-login-as-customer-graph-ql", "description": "Flexible login as a customer so a merchant or merchant admin can log into an end customer's account to assist them with their account.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-login-as-customer-api": "100.4.*", - "magento/module-login-as-customer-assistance": "100.4.*", - "magento/module-integration": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-customer": "103.0.*" + "magento/framework": "*", + "magento/module-login-as-customer-api": "*", + "magento/module-login-as-customer-assistance": "*", + "magento/module-integration": "*", + "magento/module-store": "*", + "magento/module-customer": "*" }, "suggest": { - "magento/module-login-as-customer": "100.4.*" + "magento/module-login-as-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerLog/composer.json b/app/code/Magento/LoginAsCustomerLog/composer.json index 71284f3a11f15..7e39d22d23ef6 100644 --- a/app/code/Magento/LoginAsCustomerLog/composer.json +++ b/app/code/Magento/LoginAsCustomerLog/composer.json @@ -1,23 +1,23 @@ { "name": "magento/module-login-as-customer-log", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-login-as-customer-api": "100.4.*", - "magento/module-ui": "101.2.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-login-as-customer-api": "*", + "magento/module-ui": "*", + "magento/module-user": "*" }, "suggest": { - "magento/module-login-as-customer": "100.4.*" + "magento/module-login-as-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +27,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerPageCache/composer.json b/app/code/Magento/LoginAsCustomerPageCache/composer.json index b96b9b35b575f..39b8217c89969 100644 --- a/app/code/Magento/LoginAsCustomerPageCache/composer.json +++ b/app/code/Magento/LoginAsCustomerPageCache/composer.json @@ -1,20 +1,20 @@ { "name": "magento/module-login-as-customer-page-cache", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-login-as-customer-api": "100.4.*" + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-login-as-customer-api": "*" }, "suggest": { - "magento/module-page-cache": "100.4.*" + "magento/module-page-cache": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +24,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerQuote/composer.json b/app/code/Magento/LoginAsCustomerQuote/composer.json index 9b21f321d51e8..0ce4d008d1fd8 100644 --- a/app/code/Magento/LoginAsCustomerQuote/composer.json +++ b/app/code/Magento/LoginAsCustomerQuote/composer.json @@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-quote", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-quote": "101.2.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-quote": "*" }, "suggest": { - "magento/module-login-as-customer-api": "100.4.*" + "magento/module-login-as-customer-api": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +25,3 @@ } } } - diff --git a/app/code/Magento/LoginAsCustomerSales/composer.json b/app/code/Magento/LoginAsCustomerSales/composer.json index 9d99612ff11dc..74f74eb34432e 100644 --- a/app/code/Magento/LoginAsCustomerSales/composer.json +++ b/app/code/Magento/LoginAsCustomerSales/composer.json @@ -1,21 +1,21 @@ { "name": "magento/module-login-as-customer-sales", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", + "description": "", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-user": "101.2.*", - "magento/module-login-as-customer-api": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-user": "*", + "magento/module-login-as-customer-api": "*" }, "suggest": { - "magento/module-sales": "103.0.*" + "magento/module-sales": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json index 4ba3df5dbc582..1827499160587 100644 --- a/app/code/Magento/Marketplace/composer.json +++ b/app/code/Magento/Marketplace/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-marketplace", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*" + "magento/framework": "*", + "magento/module-backend": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/MediaContent/composer.json b/app/code/Magento/MediaContent/composer.json index 85bb2de701066..4e7fd39b9d0ae 100644 --- a/app/code/Magento/MediaContent/composer.json +++ b/app/code/Magento/MediaContent/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-media-content", "description": "Magento module provides the implementation for managing relations between content and media files used in that content", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-content-api": "*", + "magento/module-media-gallery-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-content-api": "100.4.*", - "magento/module-media-gallery-api": "101.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/MediaContentApi/composer.json b/app/code/Magento/MediaContentApi/composer.json index b81f6ea6f0486..f7583a1f61a08 100644 --- a/app/code/Magento/MediaContentApi/composer.json +++ b/app/code/Magento/MediaContentApi/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-media-content-api", "description": "Magento module provides the API interfaces for managing relations between content and media files used in that content", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-media-gallery-api": "*", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-media-gallery-api": "101.0.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/MediaContentCatalog/composer.json b/app/code/Magento/MediaContentCatalog/composer.json index 0358c09d82e26..948cc9f05d3cd 100644 --- a/app/code/Magento/MediaContentCatalog/composer.json +++ b/app/code/Magento/MediaContentCatalog/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-media-content-catalog", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Catalog module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-media-content-api": "*", + "magento/module-catalog": "*", + "magento/module-eav": "*", + "magento/module-store": "*", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-media-content-api": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-eav": "102.1.*", - "magento/module-store": "101.1.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/MediaContentCms/composer.json b/app/code/Magento/MediaContentCms/composer.json index b3f3f234fd9b3..a0a6098993900 100644 --- a/app/code/Magento/MediaContentCms/composer.json +++ b/app/code/Magento/MediaContentCms/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-media-content-cms", "description": "Magento module provides the implementation of MediaContent functionality for Magento_Cms module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/module-media-content-api": "*", + "magento/module-cms": "*", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/module-media-content-api": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/MediaContentSynchronization/composer.json b/app/code/Magento/MediaContentSynchronization/composer.json index 1199f511c0342..4520f1302a03f 100644 --- a/app/code/Magento/MediaContentSynchronization/composer.json +++ b/app/code/Magento/MediaContentSynchronization/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-media-content-synchronization", "description": "Magento module provides implementation of the media content data synchronization.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/framework-bulk": "101.0.*", - "magento/module-media-content-synchronization-api": "100.4.*", - "magento/module-media-content-api": "100.4.*", - "magento/module-asynchronous-operations": "100.4.*" + "magento/framework": "*", + "magento/framework-bulk": "*", + "magento/module-media-content-synchronization-api": "*", + "magento/module-media-content-api": "*", + "magento/module-asynchronous-operations": "*" }, "suggest": { - "magento/module-media-gallery-synchronization": "100.4.*" + "magento/module-media-gallery-synchronization": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/MediaContentSynchronizationApi/composer.json b/app/code/Magento/MediaContentSynchronizationApi/composer.json index a3d84a39db060..1e44b8079e29b 100644 --- a/app/code/Magento/MediaContentSynchronizationApi/composer.json +++ b/app/code/Magento/MediaContentSynchronizationApi/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-media-content-synchronization-api", "description": "Magento module responsible for the media content synchronization implementation API", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-content-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-content-api": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/MediaContentSynchronizationCatalog/composer.json b/app/code/Magento/MediaContentSynchronizationCatalog/composer.json index 3ef159bc571f0..f3a2bbb4baeb1 100644 --- a/app/code/Magento/MediaContentSynchronizationCatalog/composer.json +++ b/app/code/Magento/MediaContentSynchronizationCatalog/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-media-content-synchronization-catalog", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Catalog module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-content-synchronization-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-media-content-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-content-synchronization-api": "100.4.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/module-media-content-api": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/MediaContentSynchronizationCms/composer.json b/app/code/Magento/MediaContentSynchronizationCms/composer.json index c4c476220b9f7..9925cc9ae5387 100644 --- a/app/code/Magento/MediaContentSynchronizationCms/composer.json +++ b/app/code/Magento/MediaContentSynchronizationCms/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-media-content-synchronization-cms", "description": "Magento module provides the implementation of MediaContentSynchronization functionality for Magento_Cms module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-content-synchronization-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-media-content-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-content-synchronization-api": "100.4.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/module-media-content-api": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/MediaGallery/composer.json b/app/code/Magento/MediaGallery/composer.json index 911451953b5e0..0076013351e22 100644 --- a/app/code/Magento/MediaGallery/composer.json +++ b/app/code/Magento/MediaGallery/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-media-gallery", "description": "Magento module responsible for media handling", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-api": "*", + "magento/module-cms": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-cms": "104.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryApi/composer.json b/app/code/Magento/MediaGalleryApi/composer.json index fb4bc716fa5ef..48ef4dbf076f3 100644 --- a/app/code/Magento/MediaGalleryApi/composer.json +++ b/app/code/Magento/MediaGalleryApi/composer.json @@ -1,16 +1,15 @@ { "name": "magento/module-media-gallery-api", "description": "Magento module responsible for media gallery asset attributes storage and management", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "101.0.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -20,4 +19,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryCatalog/composer.json b/app/code/Magento/MediaGalleryCatalog/composer.json index d05721998f53a..7feea28221df4 100644 --- a/app/code/Magento/MediaGalleryCatalog/composer.json +++ b/app/code/Magento/MediaGalleryCatalog/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-media-gallery-catalog", "description": "Magento module responsible for catalog gallery processor delete operation handling", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-api": "*", + "magento/module-catalog": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-catalog": "104.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryCatalogIntegration/composer.json b/app/code/Magento/MediaGalleryCatalogIntegration/composer.json index 46aa077429f0a..267c37e88b44e 100644 --- a/app/code/Magento/MediaGalleryCatalogIntegration/composer.json +++ b/app/code/Magento/MediaGalleryCatalogIntegration/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-media-gallery-catalog-integration", "description": "Magento module responsible for extending catalog image uploader functionality", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/module-media-gallery-ui-api": "100.4.*" + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-media-gallery-ui-api": "*" }, "suggest": { - "magento/module-catalog": "104.0.*" + "magento/module-catalog": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryCatalogUi/composer.json b/app/code/Magento/MediaGalleryCatalogUi/composer.json index 5c13eb14f1afb..46f0de7c6a51b 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/composer.json +++ b/app/code/Magento/MediaGalleryCatalogUi/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-media-gallery-catalog-ui", "description": "Magento module that implement category grid for media gallery.", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-store": "*", + "magento/module-ui": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" - }, "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryCmsUi/composer.json b/app/code/Magento/MediaGalleryCmsUi/composer.json index e61c52e0e45f7..04e7f24199775 100644 --- a/app/code/Magento/MediaGalleryCmsUi/composer.json +++ b/app/code/Magento/MediaGalleryCmsUi/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-media-gallery-cms-ui", "description": "Cms related UI elements in the magento media gallery", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-cms": "*", + "magento/module-backend": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-cms": "104.0.*", - "magento/module-backend": "102.0.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryIntegration/composer.json b/app/code/Magento/MediaGalleryIntegration/composer.json index f227800c7f95d..3c0fd77facb76 100644 --- a/app/code/Magento/MediaGalleryIntegration/composer.json +++ b/app/code/Magento/MediaGalleryIntegration/composer.json @@ -1,24 +1,26 @@ { "name": "magento/module-media-gallery-integration", "description": "Magento module responsible for integration of enhanced media gallery", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-ui-api": "100.4.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-media-gallery-ui-api": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-ui": "*" + }, + "require-dev": { + "magento/module-cms": "*" }, "suggest": { - "magento/module-catalog": "104.0.*", - "magento/module-cms": "104.0.*" + "magento/module-catalog": "*", + "magento/module-cms": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,9 +28,5 @@ "psr-4": { "Magento\\MediaGalleryIntegration\\": "" } - }, - "require-dev": { - "magento/module-cms": "*" } } - diff --git a/app/code/Magento/MediaGalleryMetadata/composer.json b/app/code/Magento/MediaGalleryMetadata/composer.json index 3a5ac4e7941a2..aede5537f058b 100644 --- a/app/code/Magento/MediaGalleryMetadata/composer.json +++ b/app/code/Magento/MediaGalleryMetadata/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-media-gallery-metadata", "description": "Magento module responsible for images metadata processing", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-metadata-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-metadata-api": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryMetadataApi/composer.json b/app/code/Magento/MediaGalleryMetadataApi/composer.json index 45d66f12677db..41de71aeb5265 100644 --- a/app/code/Magento/MediaGalleryMetadataApi/composer.json +++ b/app/code/Magento/MediaGalleryMetadataApi/composer.json @@ -1,16 +1,15 @@ { "name": "magento/module-media-gallery-metadata-api", "description": "Magento module responsible for media gallery metadata implementation API", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -20,4 +19,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryRenditions/composer.json b/app/code/Magento/MediaGalleryRenditions/composer.json index fbfe3619058e7..ca05a594554a6 100644 --- a/app/code/Magento/MediaGalleryRenditions/composer.json +++ b/app/code/Magento/MediaGalleryRenditions/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-media-gallery-renditions", "description": "Magento module that implements height and width fields for for media gallery items.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-renditions-api": "100.4.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/framework-message-queue": "100.4.*", - "magento/module-cms": "104.0.*" + "magento/framework": "*", + "magento/module-media-gallery-renditions-api": "*", + "magento/module-media-gallery-api": "*", + "magento/framework-message-queue": "*", + "magento/module-cms": "*" }, "suggest": { - "magento/module-media-content-api": "100.4.*" + "magento/module-media-content-api": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryRenditionsApi/composer.json b/app/code/Magento/MediaGalleryRenditionsApi/composer.json index eda3ba5f9d49d..e6f9cf747690f 100644 --- a/app/code/Magento/MediaGalleryRenditionsApi/composer.json +++ b/app/code/Magento/MediaGalleryRenditionsApi/composer.json @@ -1,16 +1,15 @@ { "name": "magento/module-media-gallery-renditions-api", "description": "Magento module that is responsible for the API implementation of Media Gallery Renditions.", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" - }, "autoload": { "files": [ "registration.php" @@ -20,4 +19,3 @@ } } } - diff --git a/app/code/Magento/MediaGallerySynchronization/composer.json b/app/code/Magento/MediaGallerySynchronization/composer.json index 149b48bd22fe3..ee7b9b5be5b89 100644 --- a/app/code/Magento/MediaGallerySynchronization/composer.json +++ b/app/code/Magento/MediaGallerySynchronization/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-media-gallery-synchronization", "description": "Magento module provides implementation of the media gallery data synchronization.", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/framework-message-queue": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/framework-message-queue": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/MediaGallerySynchronizationApi/composer.json b/app/code/Magento/MediaGallerySynchronizationApi/composer.json index cdf90ed6aade3..7b62a0d7c680f 100644 --- a/app/code/Magento/MediaGallerySynchronizationApi/composer.json +++ b/app/code/Magento/MediaGallerySynchronizationApi/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-media-gallery-synchronization-api", "description": "Magento module responsible for the media gallery synchronization implementation API", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-api": "101.0.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json b/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json index a9d27fab4b5fb..ba4cec8bd6da9 100644 --- a/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json +++ b/app/code/Magento/MediaGallerySynchronizationMetadata/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-media-gallery-synchronization-metadata", "description": "Magento module responsible for images metadata synchronization", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-metadata-api": "*", + "magento/module-media-gallery-synchronization-api": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-media-gallery-metadata-api": "100.4.*", - "magento/module-media-gallery-synchronization-api": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryUi/composer.json b/app/code/Magento/MediaGalleryUi/composer.json index 3e119f0c7be5f..d5caac3ff409e 100644 --- a/app/code/Magento/MediaGalleryUi/composer.json +++ b/app/code/Magento/MediaGalleryUi/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-media-gallery-ui", "description": "Magento module responsible for the media gallery UI implementation", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-ui": "*", + "magento/module-store": "*", + "magento/module-media-gallery-ui-api": "*", + "magento/module-media-gallery-api": "*", + "magento/module-media-gallery-metadata-api": "*", + "magento/module-media-gallery-synchronization-api": "*", + "magento/module-media-content-api": "*", + "magento/module-cms": "*", + "magento/module-directory": "*", + "magento/module-authorization": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-ui": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-media-gallery-ui-api": "100.4.*", - "magento/module-media-gallery-api": "101.0.*", - "magento/module-media-gallery-metadata-api": "100.4.*", - "magento/module-media-gallery-synchronization-api": "100.4.*", - "magento/module-media-content-api": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-directory": "100.4.*", - "magento/module-authorization": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/MediaGalleryUiApi/composer.json b/app/code/Magento/MediaGalleryUiApi/composer.json index cddff1bbb24dd..9c6aa225fa058 100644 --- a/app/code/Magento/MediaGalleryUiApi/composer.json +++ b/app/code/Magento/MediaGalleryUiApi/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-media-gallery-ui-api", "description": "Magento module responsible for the media gallery UI implementation API", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, "suggest": { - "magento/module-cms": "104.0.*" + "magento/module-cms": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json index a5a98432d4e42..f58c5d9b808c3 100644 --- a/app/code/Magento/MediaStorage/composer.json +++ b/app/code/Magento/MediaStorage/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-media-storage", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/framework-bulk": "101.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-theme": "101.1.*", - "magento/module-asynchronous-operations": "100.4.*", - "magento/module-authorization": "100.4.*" + "magento/framework": "*", + "magento/framework-bulk": "*", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-theme": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-authorization": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/MessageQueue/composer.json b/app/code/Magento/MessageQueue/composer.json index fca71da2e8cc7..7a297574ec8b2 100644 --- a/app/code/Magento/MessageQueue/composer.json +++ b/app/code/Magento/MessageQueue/composer.json @@ -1,21 +1,20 @@ { "name": "magento/module-message-queue", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { - "magento/framework": "103.0.*", - "magento/framework-message-queue": "100.4.*", + "magento/framework": "*", + "magento/framework-message-queue": "*", "magento/magento-composer-installer": "*", "php": "~8.1.0||~8.2.0" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index b1f3706433e74..1614f33d6c20c 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-msrp", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-downloadable": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-downloadable": "*", + "magento/module-eav": "*", + "magento/module-store": "*", + "magento/module-tax": "*" }, "suggest": { - "magento/module-bundle": "101.0.*", - "magento/module-msrp-sample-data": "Sample Data version: 100.4.*" + "magento/module-bundle": "*", + "magento/module-msrp-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/MsrpConfigurableProduct/composer.json b/app/code/Magento/MsrpConfigurableProduct/composer.json index 291e3aa7566f9..c58e77c047b2d 100644 --- a/app/code/Magento/MsrpConfigurableProduct/composer.json +++ b/app/code/Magento/MsrpConfigurableProduct/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-msrp-configurable-product", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-msrp": "100.4.*", - "magento/module-configurable-product": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-msrp": "*", + "magento/module-configurable-product": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/MsrpGroupedProduct/composer.json b/app/code/Magento/MsrpGroupedProduct/composer.json index 2e2b5d629ba75..1dea4b9949058 100644 --- a/app/code/Magento/MsrpGroupedProduct/composer.json +++ b/app/code/Magento/MsrpGroupedProduct/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-msrp-grouped-product", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-msrp": "100.4.*", - "magento/module-grouped-product": "100.4.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-msrp": "*", + "magento/module-grouped-product": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index 08aa8f2809a33..3ea9380da0809 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -1,29 +1,28 @@ { "name": "magento/module-multishipping", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-captcha": "100.4.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-captcha": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -33,4 +32,3 @@ } } } - diff --git a/app/code/Magento/MysqlMq/composer.json b/app/code/Magento/MysqlMq/composer.json index 2d55ecf196f80..b164a3b63aad4 100644 --- a/app/code/Magento/MysqlMq/composer.json +++ b/app/code/Magento/MysqlMq/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-mysql-mq", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { - "magento/framework": "103.0.*", - "magento/framework-message-queue": "100.4.*", + "magento/framework": "*", + "magento/framework-message-queue": "*", "magento/magento-composer-installer": "*", - "magento/module-store": "101.1.*", + "magento/module-store": "*", "php": "~8.1.0||~8.2.0" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json index bfb4a88fdaaeb..e98f914082fab 100644 --- a/app/code/Magento/NewRelicReporting/composer.json +++ b/app/code/Magento/NewRelicReporting/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-new-relic-reporting", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "magento/framework": "*", "magento/magento-composer-installer": "*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-configurable-product": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*" + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-configurable-product": "*", + "magento/module-customer": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 5bc39184a7bbf..c477f8ecb64e3 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-newsletter", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-cms": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-email": "101.1.*", - "magento/module-require-js": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-widget": "101.2.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-cms": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-email": "*", + "magento/module-require-js": "*", + "magento/module-store": "*", + "magento/module-widget": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/NewsletterGraphQl/composer.json b/app/code/Magento/NewsletterGraphQl/composer.json index fdc6b090beb31..3fe7f7aaf289a 100644 --- a/app/code/Magento/NewsletterGraphQl/composer.json +++ b/app/code/Magento/NewsletterGraphQl/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-newsletter-graph-ql", "description": "Provides GraphQl functionality for the newsletter subscriptions.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", + "type": "magento2-module", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-customer": "103.0.*", - "magento/module-newsletter": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-customer": "*", + "magento/module-newsletter": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index dd34049dfc44f..09de8b66996ad 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-offline-payments", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-payment": "*", + "magento/module-quote": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index a527472a43012..9e75d64075f84 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -1,32 +1,31 @@ { "name": "magento/module-offline-shipping", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-rule": "101.2.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-sales-rule": "*", + "magento/module-shipping": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-checkout": "100.4.*", - "magento/module-offline-shipping-sample-data": "Sample Data version: 100.4.*" + "magento/module-checkout": "*", + "magento/module-offline-shipping-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -36,4 +35,3 @@ } } } - diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index 5965a787aa6a6..494b5918004d8 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-page-cache", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-config": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-config": "*", + "magento/module-store": "*", + "magento/module-catalog": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index fd6c1ce3b6143..36cd77ea50d47 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -1,26 +1,26 @@ { "name": "magento/module-payment", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-vault": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +30,3 @@ } } } - diff --git a/app/code/Magento/PaymentGraphQl/composer.json b/app/code/Magento/PaymentGraphQl/composer.json index 258d91fb3b906..e6ab6fc747768 100644 --- a/app/code/Magento/PaymentGraphQl/composer.json +++ b/app/code/Magento/PaymentGraphQl/composer.json @@ -2,20 +2,19 @@ "name": "magento/module-payment-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.0", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-payment": "100.4.*", - "magento/module-graph-ql": "100.4.*" + "magento/framework": "*", + "magento/module-payment": "*", + "magento/module-graph-ql": "*" }, "suggest": { - "magento/module-store-graph-ql": "100.4.*" + "magento/module-store-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index 6ac874a4f8787..23ebf05f2f2bc 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -1,40 +1,39 @@ { "name": "magento/module-paypal", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.0.5", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-instant-purchase": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-vault": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-instant-purchase": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-vault": "*" }, "suggest": { - "magento/module-checkout-agreements": "100.4.*" + "magento/module-checkout-agreements": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -44,4 +43,3 @@ } } } - diff --git a/app/code/Magento/PaypalCaptcha/composer.json b/app/code/Magento/PaypalCaptcha/composer.json index bd4266f66cdb0..8c9feff31e823 100644 --- a/app/code/Magento/PaypalCaptcha/composer.json +++ b/app/code/Magento/PaypalCaptcha/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-paypal-captcha", "description": "Provides CAPTCHA validation for PayPal Payflow Pro", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-captcha": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-captcha": "*", + "magento/module-checkout": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-paypal": "101.0.*" + "magento/module-paypal": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/PaypalGraphQl/composer.json b/app/code/Magento/PaypalGraphQl/composer.json index 7c9a8f2608e76..ce916276dac97 100644 --- a/app/code/Magento/PaypalGraphQl/composer.json +++ b/app/code/Magento/PaypalGraphQl/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-paypal-graph-ql", "description": "GraphQl support for Paypal", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*", - "magento/module-checkout": "100.4.*", - "magento/module-paypal": "101.0.*", - "magento/module-quote-graph-ql": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-payment": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-vault": "101.2.*" + "magento/framework": "*", + "magento/module-quote": "*", + "magento/module-checkout": "*", + "magento/module-paypal": "*", + "magento/module-quote-graph-ql": "*", + "magento/module-sales": "*", + "magento/module-payment": "*", + "magento/module-store": "*", + "magento/module-vault": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*", - "magento/module-store-graph-ql": "100.4.*" + "magento/module-graph-ql": "*", + "magento/module-store-graph-ql": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index 82c5bce392aba..5a8ff5d7f3d5f 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-persistent", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-cron": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-page-cache": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-cron": "*", + "magento/module-customer": "*", + "magento/module-page-cache": "*", + "magento/module-quote": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index 6eb8b9c74669e..aee755e6a00b0 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-product-alert", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/framework-bulk": "101.0.*", - "magento/module-asynchronous-operations": "100.4.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*" + "magento/framework": "*", + "magento/framework-bulk": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-store": "*", + "magento/module-theme": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json index c0d5980c9c541..55b8cb5efa14b 100644 --- a/app/code/Magento/ProductVideo/composer.json +++ b/app/code/Magento/ProductVideo/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-product-video", "description": "Add Video to Products", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "magento/framework": "*", "magento/magento-composer-installer": "*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*" + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-customer": "103.0.*", - "magento/module-config": "101.2.*", - "magento/module-theme": "101.1.*" + "magento/module-customer": "*", + "magento/module-config": "*", + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json index cc69aaa305f7d..1552e71351af7 100644 --- a/app/code/Magento/Quote/composer.json +++ b/app/code/Magento/Quote/composer.json @@ -1,36 +1,35 @@ { "name": "magento/module-quote", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-payment": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-sequence": "100.4.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-payment": "*", + "magento/module-sales": "*", + "magento/module-sales-sequence": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "magento/module-tax": "*" }, "suggest": { - "magento/module-webapi": "100.4.*" + "magento/module-webapi": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -40,4 +39,3 @@ } } } - diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json index 452384a420c41..c9e9254aa7968 100644 --- a/app/code/Magento/QuoteAnalytics/composer.json +++ b/app/code/Magento/QuoteAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-quote-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-quote": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.4", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/QuoteBundleOptions/composer.json b/app/code/Magento/QuoteBundleOptions/composer.json index 9d83d0507af1d..2412e9d23b329 100644 --- a/app/code/Magento/QuoteBundleOptions/composer.json +++ b/app/code/Magento/QuoteBundleOptions/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-quote-bundle-options", "description": "Magento module provides data provider for creating buy request for bundle products", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-quote": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/QuoteConfigurableOptions/composer.json b/app/code/Magento/QuoteConfigurableOptions/composer.json index a15327c8b28fb..35dee93c0b12a 100644 --- a/app/code/Magento/QuoteConfigurableOptions/composer.json +++ b/app/code/Magento/QuoteConfigurableOptions/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-quote-configurable-options", "description": "Magento module provides data provider for creating buy request for configurable products", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-quote": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/QuoteDownloadableLinks/composer.json b/app/code/Magento/QuoteDownloadableLinks/composer.json index d84b327a79c99..47030735c6081 100644 --- a/app/code/Magento/QuoteDownloadableLinks/composer.json +++ b/app/code/Magento/QuoteDownloadableLinks/composer.json @@ -1,17 +1,16 @@ { "name": "magento/module-quote-downloadable-links", "description": "Magento module provides data provider for creating buy request for links of downloadable products", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-quote": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*" - }, "autoload": { "files": [ "registration.php" @@ -21,4 +20,3 @@ } } } - diff --git a/app/code/Magento/QuoteGraphQl/composer.json b/app/code/Magento/QuoteGraphQl/composer.json index 7c2e2a3c41641..24cb1382634c2 100644 --- a/app/code/Magento/QuoteGraphQl/composer.json +++ b/app/code/Magento/QuoteGraphQl/composer.json @@ -2,31 +2,30 @@ "name": "magento/module-quote-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-quote": "101.2.*", - "magento/module-checkout": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-store": "101.1.*", - "magento/module-customer": "103.0.*", - "magento/module-customer-graph-ql": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-gift-message": "100.4.*", - "magento/module-catalog-inventory": "100.4.*" + "magento/framework": "*", + "magento/module-quote": "*", + "magento/module-checkout": "*", + "magento/module-catalog": "*", + "magento/module-store": "*", + "magento/module-customer": "*", + "magento/module-customer-graph-ql": "*", + "magento/module-sales": "*", + "magento/module-directory": "*", + "magento/module-graph-ql": "*", + "magento/module-gift-message": "*", + "magento/module-catalog-inventory": "*" }, "suggest": { - "magento/module-graph-ql-cache": "100.4.*", - "magento/module-catalog-inventory-graph-ql": "100.4.*", - "magento/module-payment-graph-ql": "100.4.*" + "magento/module-graph-ql-cache": "*", + "magento/module-catalog-inventory-graph-ql": "*", + "magento/module-payment-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -36,4 +35,3 @@ } } } - diff --git a/app/code/Magento/RelatedProductGraphQl/composer.json b/app/code/Magento/RelatedProductGraphQl/composer.json index 3f4d0c8f3294c..9c03a5b18f644 100644 --- a/app/code/Magento/RelatedProductGraphQl/composer.json +++ b/app/code/Magento/RelatedProductGraphQl/composer.json @@ -2,20 +2,19 @@ "name": "magento/module-related-product-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*", - "magento/framework": "103.0.*" + "magento/module-catalog": "*", + "magento/module-catalog-graph-ql": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -25,4 +24,3 @@ } } } - diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json index 0682eacddcb3d..4ddab4217f32e 100644 --- a/app/code/Magento/ReleaseNotification/composer.json +++ b/app/code/Magento/ReleaseNotification/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-release-notification", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-user": "101.2.*", - "magento/module-backend": "102.0.*", - "magento/module-ui": "101.2.*", - "magento/framework": "103.0.*" + "magento/module-user": "*", + "magento/module-backend": "*", + "magento/module-ui": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/RemoteStorage/composer.json b/app/code/Magento/RemoteStorage/composer.json index 1fb65b6ccdab9..107ddf6788fe2 100644 --- a/app/code/Magento/RemoteStorage/composer.json +++ b/app/code/Magento/RemoteStorage/composer.json @@ -1,32 +1,31 @@ { "name": "magento/module-remote-storage", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "league/flysystem": "~2.4.3", - "league/flysystem-aws-s3-v3": "^2.4.3" + "magento/framework": "*", + "league/flysystem": "^2.4", + "league/flysystem-aws-s3-v3": "^2.4" }, "suggest": { - "magento/module-backend": "102.0.*", - "magento/module-sitemap": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-downloadable": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-media-storage": "100.4.*", - "magento/module-media-gallery-metadata": "100.4.*", - "magento/module-media-gallery-synchronization": "100.4.*", - "magento/module-import-export": "101.0.*", - "magento/module-catalog-import-export": "101.1.*", - "magento/module-downloadable-import-export": "100.4.*", + "magento/module-backend": "*", + "magento/module-sitemap": "*", + "magento/module-cms": "*", + "magento/module-downloadable": "*", + "magento/module-catalog": "*", + "magento/module-media-storage": "*", + "magento/module-media-gallery-metadata": "*", + "magento/module-media-gallery-synchronization": "*", + "magento/module-import-export": "*", + "magento/module-catalog-import-export": "*", + "magento/module-downloadable-import-export": "*", "predis/predis": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -36,4 +35,3 @@ } } } - diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index 0f0d3b364649c..887a9bc1730e3 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -1,36 +1,35 @@ { "name": "magento/module-reports", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-downloadable": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-quote": "101.2.*", - "magento/module-review": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-sales-rule": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-widget": "101.2.*", - "magento/module-wishlist": "101.2.*", - "magento/module-directory": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-downloadable": "*", + "magento/module-eav": "*", + "magento/module-quote": "*", + "magento/module-review": "*", + "magento/module-sales": "*", + "magento/module-sales-rule": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-widget": "*", + "magento/module-wishlist": "*", + "magento/module-directory": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -40,4 +39,3 @@ } } } - diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index 100d5e11f93fe..a8dec7db61404 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-require-js", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index 0ec0d1f9610fe..e6ef2f416962c 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-review", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-newsletter": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-newsletter": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-cookie": "100.4.*", - "magento/module-review-sample-data": "Sample Data version: 100.4.*" + "magento/module-cookie": "*", + "magento/module-review-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json index 88d0a6b0645b5..7939e3e475668 100644 --- a/app/code/Magento/ReviewAnalytics/composer.json +++ b/app/code/Magento/ReviewAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-review-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-review": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-review": "100.4.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/ReviewGraphQl/composer.json b/app/code/Magento/ReviewGraphQl/composer.json index b1d1352991b4d..e31bb53d3dafc 100644 --- a/app/code/Magento/ReviewGraphQl/composer.json +++ b/app/code/Magento/ReviewGraphQl/composer.json @@ -2,22 +2,21 @@ "name": "magento/module-review-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/module-catalog": "104.0.*", - "magento/module-review": "100.4.*", - "magento/module-store": "101.1.*", - "magento/framework": "103.0.*" + "magento/module-catalog": "*", + "magento/module-review": "*", + "magento/module-store": "*", + "magento/framework": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*", - "magento/module-graph-ql-cache": "100.4.*" + "magento/module-graph-ql": "*", + "magento/module-graph-ql-cache": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json index f730ade61b0de..37c984daa0089 100644 --- a/app/code/Magento/Robots/composer.json +++ b/app/code/Magento/Robots/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-robots", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-theme": "101.1.*" + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index 0569959e8343b..436c956a56313 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-rss", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-customer": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index 01163bec62247..c39cfa4aa88d6 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-rule", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-eav": "102.1.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-eav": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index 77e86a5a7d85a..e0ea835d63087 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -1,46 +1,45 @@ { "name": "magento/module-sales", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "103.0.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-bundle": "101.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-gift-message": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-reports": "100.4.*", - "magento/module-sales-rule": "101.2.*", - "magento/module-sales-sequence": "100.4.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-widget": "101.2.*", - "magento/module-wishlist": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-bundle": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-gift-message": "*", + "magento/module-media-storage": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-reports": "*", + "magento/module-sales-rule": "*", + "magento/module-sales-sequence": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-widget": "*", + "magento/module-wishlist": "*" }, "suggest": { - "magento/module-sales-sample-data": "Sample Data version: 100.4.*" + "magento/module-sales-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -50,4 +49,3 @@ } } } - diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json index f052bbca387ec..943fbf3e7ef07 100644 --- a/app/code/Magento/SalesAnalytics/composer.json +++ b/app/code/Magento/SalesAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-sales-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-sales": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.2", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/SalesGraphQl/composer.json b/app/code/Magento/SalesGraphQl/composer.json index 81b502a001e0d..7215c8fefa8eb 100644 --- a/app/code/Magento/SalesGraphQl/composer.json +++ b/app/code/Magento/SalesGraphQl/composer.json @@ -2,22 +2,21 @@ "name": "magento/module-sales-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-catalog": "*", + "magento/module-tax": "*", + "magento/module-quote": "*", + "magento/module-graph-ql": "*", + "magento/module-shipping": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-catalog": "104.0.*", - "magento/module-tax": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-shipping": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json index a6013ef798909..ad11c308042fb 100644 --- a/app/code/Magento/SalesInventory/composer.json +++ b/app/code/Magento/SalesInventory/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-sales-inventory", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-sales": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index 3b5a5c13173db..89fd6cb64b89b 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -1,43 +1,42 @@ { "name": "magento/module-sales-rule", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/framework-bulk": "101.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-rule": "101.2.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-reports": "100.4.*", - "magento/module-rule": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-widget": "101.2.*", - "magento/module-captcha": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-authorization": "100.4.*", - "magento/module-asynchronous-operations": "100.4.*" + "magento/framework": "*", + "magento/framework-bulk": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-rule": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-reports": "*", + "magento/module-rule": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-widget": "*", + "magento/module-captcha": "*", + "magento/module-checkout": "*", + "magento/module-authorization": "*", + "magento/module-asynchronous-operations": "*" }, "suggest": { - "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*" + "magento/module-sales-rule-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -47,4 +46,3 @@ } } } - diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json index 9d9f2a70c8295..c00dae5f5b62d 100644 --- a/app/code/Magento/SalesSequence/composer.json +++ b/app/code/Magento/SalesSequence/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-sales-sequence", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json index 554ab2d1619fb..bccca4714b922 100644 --- a/app/code/Magento/SampleData/composer.json +++ b/app/code/Magento/SampleData/composer.json @@ -1,22 +1,21 @@ { "name": "magento/module-sample-data", "description": "Sample Data fixtures", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, "suggest": { - "magento/sample-data-media": "Sample Data version: 100.4.*" + "magento/sample-data-media": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "cli_commands.php", @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json index 0ab12382f054a..ed0779d3d7698 100644 --- a/app/code/Magento/Search/composer.json +++ b/app/code/Magento/Search/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-search", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog-search": "102.0.*", - "magento/module-reports": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog-search": "*", + "magento/module-reports": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json index 2fc2d2413be93..0a2910591517d 100644 --- a/app/code/Magento/Security/composer.json +++ b/app/code/Magento/Security/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-security", "description": "Security management module", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-config": "101.2.*", - "magento/module-backend": "102.0.*", - "magento/module-store": "101.1.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-config": "*", + "magento/module-backend": "*", + "magento/module-store": "*", + "magento/module-user": "*" }, "suggest": { - "magento/module-customer": "103.0.*" + "magento/module-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json index 98fde0360e1e5..7ffc4924f2495 100644 --- a/app/code/Magento/SendFriend/composer.json +++ b/app/code/Magento/SendFriend/composer.json @@ -1,25 +1,24 @@ { "name": "magento/module-send-friend", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-customer": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-captcha": "100.4.*", - "magento/module-authorization": "100.4.*", - "magento/module-theme": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-customer": "*", + "magento/module-store": "*", + "magento/module-captcha": "*", + "magento/module-authorization": "*", + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +28,3 @@ } } } - diff --git a/app/code/Magento/SendFriendGraphQl/composer.json b/app/code/Magento/SendFriendGraphQl/composer.json index 4c5b504e4942a..6abc8d6baf202 100644 --- a/app/code/Magento/SendFriendGraphQl/composer.json +++ b/app/code/Magento/SendFriendGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-send-friend-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-send-friend": "*", + "magento/module-graph-ql": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-send-friend": "100.4.*", - "magento/module-graph-ql": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index d48e815b2f64e..0347a97e755d7 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -1,38 +1,37 @@ { "name": "magento/module-shipping", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", "ext-gd": "*", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-contact": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-ui": "101.2.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-contact": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-ui": "*", + "magento/module-user": "*" }, "suggest": { - "magento/module-fedex": "100.4.*", - "magento/module-ups": "100.4.*", - "magento/module-config": "101.2.*" + "magento/module-fedex": "*", + "magento/module-ups": "*", + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -42,4 +41,3 @@ } } } - diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index 52c0d6450628c..3323abebdebac 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -1,31 +1,30 @@ { "name": "magento/module-sitemap", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-url-rewrite": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-robots": "101.1.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-url-rewrite": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-robots": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -35,4 +34,3 @@ } } } - diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 2ac04d810bf9e..c4c195e45c138 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-store", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-ui": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-media-storage": "*", + "magento/module-ui": "*", + "magento/module-customer": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*" }, "suggest": { - "magento/module-deploy": "100.4.*" + "magento/module-deploy": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/StoreGraphQl/composer.json b/app/code/Magento/StoreGraphQl/composer.json index 4090da7f5e364..f5fd98fdc4cae 100644 --- a/app/code/Magento/StoreGraphQl/composer.json +++ b/app/code/Magento/StoreGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-store-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-graph-ql": "*", + "magento/module-graph-ql-cache": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-graph-ql": "100.4.*", - "magento/module-graph-ql-cache": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json index 97f1e701e40ce..fb357a01e22c0 100644 --- a/app/code/Magento/Swagger/composer.json +++ b/app/code/Magento/Swagger/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-swagger", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/SwaggerWebapi/composer.json b/app/code/Magento/SwaggerWebapi/composer.json index 7b83a6119e8b8..ea2b06ed681f9 100644 --- a/app/code/Magento/SwaggerWebapi/composer.json +++ b/app/code/Magento/SwaggerWebapi/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-swagger-webapi", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-swagger": "100.4.*" + "magento/framework": "*", + "magento/module-swagger": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/SwaggerWebapiAsync/composer.json b/app/code/Magento/SwaggerWebapiAsync/composer.json index ffaa1c0b32c42..b02a3e031b1ae 100644 --- a/app/code/Magento/SwaggerWebapiAsync/composer.json +++ b/app/code/Magento/SwaggerWebapiAsync/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-swagger-webapi-async", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-swagger": "100.4.*" + "magento/framework": "*", + "magento/module-swagger": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json index a55cd3b385c6c..91f3d59016f7a 100644 --- a/app/code/Magento/Swatches/composer.json +++ b/app/code/Magento/Swatches/composer.json @@ -1,33 +1,32 @@ { "name": "magento/module-swatches", "description": "Add Swatches to Products", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-configurable-product": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-page-cache": "100.4.*", - "magento/module-media-storage": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-config": "*", + "magento/module-configurable-product": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-page-cache": "*", + "magento/module-media-storage": "*", + "magento/module-store": "*", + "magento/module-theme": "*" }, "suggest": { - "magento/module-layered-navigation": "100.4.*", - "magento/module-swatches-sample-data": "Sample Data version: 100.4.*" + "magento/module-layered-navigation": "*", + "magento/module-swatches-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -37,4 +36,3 @@ } } } - diff --git a/app/code/Magento/SwatchesGraphQl/composer.json b/app/code/Magento/SwatchesGraphQl/composer.json index 15dd0cb85abe9..744ed81435c34 100644 --- a/app/code/Magento/SwatchesGraphQl/composer.json +++ b/app/code/Magento/SwatchesGraphQl/composer.json @@ -2,21 +2,20 @@ "name": "magento/module-swatches-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.3", "require": { - "php": "~7.4.0||~8.1.0", - "magento/framework": "103.0.*", - "magento/module-swatches": "100.4.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*" + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-swatches": "*", + "magento/module-catalog": "*", + "magento/module-catalog-graph-ql": "*" }, "suggest": { - "magento/module-configurable-product-graph-ql": "100.4.*" + "magento/module-configurable-product-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/SwatchesLayeredNavigation/composer.json b/app/code/Magento/SwatchesLayeredNavigation/composer.json index 5482f8a34965c..ff8ea5715b944 100644 --- a/app/code/Magento/SwatchesLayeredNavigation/composer.json +++ b/app/code/Magento/SwatchesLayeredNavigation/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-swatches-layered-navigation", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", + "magento/framework": "*", "magento/magento-composer-installer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index 4289488ae8347..fd7a5a075998e 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -1,36 +1,35 @@ { "name": "magento/module-tax", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-page-cache": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-reports": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-checkout": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-page-cache": "*", + "magento/module-quote": "*", + "magento/module-reports": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-tax-sample-data": "Sample Data version: 100.4.*" + "magento/module-tax-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -40,4 +39,3 @@ } } } - diff --git a/app/code/Magento/TaxGraphQl/composer.json b/app/code/Magento/TaxGraphQl/composer.json index 8b5f7af0fce58..fef2c01d039da 100644 --- a/app/code/Magento/TaxGraphQl/composer.json +++ b/app/code/Magento/TaxGraphQl/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-tax-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.1", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, "suggest": { - "magento/module-tax": "100.4.*", - "magento/module-catalog-graph-ql": "100.4.*" + "magento/module-tax": "*", + "magento/module-catalog-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index a67b3dfe33f3a..2f7d6737e9596 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -1,24 +1,23 @@ { "name": "magento/module-tax-import-export", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-directory": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-directory": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -28,4 +27,3 @@ } } } - diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index 4ac63dc138d8a..658a856db5fc2 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -1,34 +1,33 @@ { "name": "magento/module-theme", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.1.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-cms": "104.0.*", - "magento/module-config": "101.2.*", - "magento/module-customer": "103.0.*", - "magento/module-eav": "102.1.*", - "magento/module-media-storage": "100.4.*", - "magento/module-require-js": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-widget": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-cms": "*", + "magento/module-config": "*", + "magento/module-customer": "*", + "magento/module-eav": "*", + "magento/module-media-storage": "*", + "magento/module-require-js": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "magento/module-widget": "*" }, "suggest": { - "magento/module-theme-sample-data": "Sample Data version: 100.4.*", - "magento/module-deploy": "100.4.*", - "magento/module-directory": "100.4.*" + "magento/module-theme-sample-data": "*", + "magento/module-deploy": "*", + "magento/module-directory": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -38,4 +37,3 @@ } } } - diff --git a/app/code/Magento/ThemeGraphQl/composer.json b/app/code/Magento/ThemeGraphQl/composer.json index e9bc40e214026..6b4ee27e2f11b 100644 --- a/app/code/Magento/ThemeGraphQl/composer.json +++ b/app/code/Magento/ThemeGraphQl/composer.json @@ -2,18 +2,17 @@ "name": "magento/module-theme-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, "suggest": { - "magento/module-store-graph-ql": "100.4.*" + "magento/module-store-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index 197cfc6eb1e15..791bfbd7b1a73 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-translation", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-developer": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-deploy": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-developer": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-deploy": "*" }, "suggest": { - "magento/module-deploy": "100.4.*" + "magento/module-deploy": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 1d34d4ac71751..d25e69071a791 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-ui", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-eav": "102.1.*", - "magento/module-store": "101.1.*", - "magento/module-user": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-eav": "*", + "magento/module-store": "*", + "magento/module-user": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index 9c6969f3afc4f..dc80330fa3828 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -1,29 +1,28 @@ { "name": "magento/module-ups", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog-inventory": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-config": "101.2.*" + "magento/module-config": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -33,4 +32,3 @@ } } } - diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 4e254283d49dc..7dafa8b8f4d07 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-url-rewrite", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "102.0.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-url-rewrite": "100.4.*", - "magento/module-cms": "104.0.*", - "magento/module-cms-url-rewrite": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-url-rewrite": "*", + "magento/module-cms": "*", + "magento/module-cms-url-rewrite": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/UrlRewriteGraphQl/composer.json b/app/code/Magento/UrlRewriteGraphQl/composer.json index 63f6347768e44..5e19ae73f5781 100644 --- a/app/code/Magento/UrlRewriteGraphQl/composer.json +++ b/app/code/Magento/UrlRewriteGraphQl/composer.json @@ -2,19 +2,18 @@ "name": "magento/module-url-rewrite-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-url-rewrite": "102.0.*" + "magento/framework": "*", + "magento/module-url-rewrite": "*" }, "suggest": { - "magento/module-graph-ql": "100.4.*" + "magento/module-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index d234ee15e5159..0fa7ec8250c94 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-user", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-email": "101.1.*", - "magento/module-integration": "100.4.*", - "magento/module-security": "100.4.*", - "magento/module-store": "101.1.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-email": "*", + "magento/module-integration": "*", + "magento/module-security": "*", + "magento/module-store": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index fb1705a92090d..107d4755d92c4 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -1,28 +1,27 @@ { "name": "magento/module-usps", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", "lib-libxml": "*", - "magento/framework": "103.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-config": "101.2.*", - "magento/module-directory": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-shipping": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-config": "*", + "magento/module-directory": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -32,4 +31,3 @@ } } } - diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json index 6fb245fe72260..2af748d990c35 100644 --- a/app/code/Magento/Variable/composer.json +++ b/app/code/Magento/Variable/composer.json @@ -1,23 +1,22 @@ { "name": "magento/module-variable", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-store": "101.1.*", - "magento/module-config": "101.2.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-store": "*", + "magento/module-config": "*", + "magento/module-ui": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -27,4 +26,3 @@ } } } - diff --git a/app/code/Magento/Vault/composer.json b/app/code/Magento/Vault/composer.json index 85696c5cca1a5..f671abff34d08 100644 --- a/app/code/Magento/Vault/composer.json +++ b/app/code/Magento/Vault/composer.json @@ -1,25 +1,25 @@ { "name": "magento/module-vault", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], + "description": "", "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-payment": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*" + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-payment": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-theme": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -29,4 +29,3 @@ } } } - diff --git a/app/code/Magento/VaultGraphQl/composer.json b/app/code/Magento/VaultGraphQl/composer.json index f7391fd71af3d..4d8e565267a81 100644 --- a/app/code/Magento/VaultGraphQl/composer.json +++ b/app/code/Magento/VaultGraphQl/composer.json @@ -2,17 +2,16 @@ "name": "magento/module-vault-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-vault": "*", + "magento/module-graph-ql": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.1", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-vault": "101.2.*", - "magento/module-graph-ql": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json index 27e96dd8eb92e..36503adfc841c 100644 --- a/app/code/Magento/Version/composer.json +++ b/app/code/Magento/Version/composer.json @@ -1,19 +1,18 @@ { "name": "magento/module-version", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -23,4 +22,3 @@ } } } - diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index 8614dea27d47b..d8c713391c4a0 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -1,27 +1,26 @@ { "name": "magento/module-webapi", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.4", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-authorization": "100.4.*", - "magento/module-backend": "102.0.*", - "magento/module-integration": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-authorization": "*", + "magento/module-backend": "*", + "magento/module-integration": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-user": "101.2.*", - "magento/module-customer": "103.0.*" + "magento/module-user": "*", + "magento/module-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -31,4 +30,3 @@ } } } - diff --git a/app/code/Magento/WebapiAsync/composer.json b/app/code/Magento/WebapiAsync/composer.json index 999ba08ffcf38..9bdd9d48f1cc7 100644 --- a/app/code/Magento/WebapiAsync/composer.json +++ b/app/code/Magento/WebapiAsync/composer.json @@ -1,26 +1,25 @@ { "name": "magento/module-webapi-async", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.3", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-webapi": "100.4.*", - "magento/module-asynchronous-operations": "100.4.*", - "magento/module-store": "101.1.*" + "magento/framework": "*", + "magento/module-webapi": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-store": "*" }, "suggest": { - "magento/module-user": "101.2.*", - "magento/module-customer": "103.0.*" + "magento/module-user": "*", + "magento/module-customer": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -30,4 +29,3 @@ } } } - diff --git a/app/code/Magento/WebapiSecurity/composer.json b/app/code/Magento/WebapiSecurity/composer.json index 42bbc6cc9578d..16851cad3d89f 100644 --- a/app/code/Magento/WebapiSecurity/composer.json +++ b/app/code/Magento/WebapiSecurity/composer.json @@ -1,20 +1,19 @@ { "name": "magento/module-webapi-security", "description": "WebapiSecurity module provides option to loosen security on some webapi resources.", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-webapi": "100.4.*" + "magento/framework": "*", + "magento/module-webapi": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -24,4 +23,3 @@ } } } - diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 8f9a2eda3fb2c..226f55ed11319 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -1,34 +1,33 @@ { "name": "magento/module-weee", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-directory": "100.4.*", - "magento/module-eav": "102.1.*", - "magento/module-page-cache": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-directory": "*", + "magento/module-eav": "*", + "magento/module-page-cache": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-bundle": "101.0.*" + "magento/module-bundle": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -38,4 +37,3 @@ } } } - diff --git a/app/code/Magento/WeeeGraphQl/composer.json b/app/code/Magento/WeeeGraphQl/composer.json index 7a7cc3586aec5..aa4d28bcc7f73 100644 --- a/app/code/Magento/WeeeGraphQl/composer.json +++ b/app/code/Magento/WeeeGraphQl/composer.json @@ -2,21 +2,20 @@ "name": "magento/module-weee-graph-ql", "description": "N/A", "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "version": "100.4.2", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-tax": "100.4.*", - "magento/module-weee": "100.4.*" + "magento/framework": "*", + "magento/module-store": "*", + "magento/module-tax": "*", + "magento/module-weee": "*" }, "suggest": { - "magento/module-catalog-graph-ql": "100.4.*" + "magento/module-catalog-graph-ql": "*" }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index 491c97a6a5f0a..e30a41ae1f95d 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -1,30 +1,29 @@ { "name": "magento/module-widget", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-cms": "104.0.*", - "magento/module-email": "101.1.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-variable": "100.4.*", - "magento/module-ui": "101.2.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-cms": "*", + "magento/module-email": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-variable": "*", + "magento/module-ui": "*" }, "suggest": { - "magento/module-widget-sample-data": "Sample Data version: 100.4.*" + "magento/module-widget-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -34,4 +33,3 @@ } } } - diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index 949bd18cdc838..82063e9c1bfbc 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -1,38 +1,37 @@ { "name": "magento/module-wishlist", "description": "N/A", - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "101.2.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-backend": "102.0.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-inventory": "100.4.*", - "magento/module-checkout": "100.4.*", - "magento/module-customer": "103.0.*", - "magento/module-rss": "100.4.*", - "magento/module-sales": "103.0.*", - "magento/module-store": "101.1.*", - "magento/module-theme": "101.1.*", - "magento/module-ui": "101.2.*", - "magento/module-captcha": "100.4.*" + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-checkout": "*", + "magento/module-customer": "*", + "magento/module-rss": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "magento/module-theme": "*", + "magento/module-ui": "*", + "magento/module-captcha": "*" }, "suggest": { - "magento/module-configurable-product": "100.4.*", - "magento/module-downloadable": "100.4.*", - "magento/module-bundle": "101.0.*", - "magento/module-cookie": "100.4.*", - "magento/module-grouped-product": "100.4.*", - "magento/module-wishlist-sample-data": "Sample Data version: 100.4.*" + "magento/module-configurable-product": "*", + "magento/module-downloadable": "*", + "magento/module-bundle": "*", + "magento/module-cookie": "*", + "magento/module-grouped-product": "*", + "magento/module-wishlist-sample-data": "*" }, + "type": "magento2-module", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" @@ -42,4 +41,3 @@ } } } - diff --git a/app/code/Magento/WishlistAnalytics/composer.json b/app/code/Magento/WishlistAnalytics/composer.json index d71ad94f35a29..d990be3af68b0 100644 --- a/app/code/Magento/WishlistAnalytics/composer.json +++ b/app/code/Magento/WishlistAnalytics/composer.json @@ -1,18 +1,17 @@ { "name": "magento/module-wishlist-analytics", "description": "N/A", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-wishlist": "*", + "magento/module-analytics": "*" + }, "type": "magento2-module", "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.3", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-wishlist": "101.2.*", - "magento/module-analytics": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -22,4 +21,3 @@ } } } - diff --git a/app/code/Magento/WishlistGraphQl/composer.json b/app/code/Magento/WishlistGraphQl/composer.json index c1d33a68e8591..d5bb93fefa7ec 100755 --- a/app/code/Magento/WishlistGraphQl/composer.json +++ b/app/code/Magento/WishlistGraphQl/composer.json @@ -2,21 +2,20 @@ "name": "magento/module-wishlist-graph-ql", "description": "N/A", "type": "magento2-module", + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-wishlist": "*", + "magento/module-store": "*", + "magento/module-quote-graph-ql": "*", + "magento/module-quote": "*", + "magento/module-catalog": "*", + "magento/module-catalog-graph-ql": "*" + }, "license": [ "OSL-3.0", "AFL-3.0" ], - "version": "100.4.5", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/module-wishlist": "101.2.*", - "magento/module-store": "101.1.*", - "magento/module-quote-graph-ql": "100.4.*", - "magento/module-quote": "101.2.*", - "magento/module-catalog": "104.0.*", - "magento/module-catalog-graph-ql": "100.4.*" - }, "autoload": { "files": [ "registration.php" @@ -26,4 +25,3 @@ } } } - diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index 415a8e6f76cba..d5cb290cc67b9 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -1,23 +1,21 @@ { "name": "magento/theme-adminhtml-backend", "description": "N/A", - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index a55a0e1eff1fe..afb262619592a 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -1,23 +1,21 @@ { "name": "magento/theme-frontend-blank", "description": "N/A", - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json index d22dede79f382..f456c842cbdd4 100644 --- a/app/design/frontend/Magento/luma/composer.json +++ b/app/design/frontend/Magento/luma/composer.json @@ -1,24 +1,22 @@ { "name": "magento/theme-frontend-luma", "description": "N/A", - "type": "magento2-theme", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], "config": { "sort-packages": true }, - "version": "100.4.5", "require": { "php": "~8.1.0||~8.2.0", - "magento/framework": "103.0.*", - "magento/theme-frontend-blank": "100.4.*" + "magento/framework": "*", + "magento/theme-frontend-blank": "*" }, + "type": "magento2-theme", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/de_DE/composer.json b/app/i18n/Magento/de_DE/composer.json index fd23d037ba459..5a488a3e32c2b 100644 --- a/app/i18n/Magento/de_DE/composer.json +++ b/app/i18n/Magento/de_DE/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/en_US/composer.json b/app/i18n/Magento/en_US/composer.json index 194854d58bbe2..1108c70de28a6 100644 --- a/app/i18n/Magento/en_US/composer.json +++ b/app/i18n/Magento/en_US/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-en_us", "description": "English (United States) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/es_ES/composer.json b/app/i18n/Magento/es_ES/composer.json index 0b49475587d54..5bc3cb5730adf 100644 --- a/app/i18n/Magento/es_ES/composer.json +++ b/app/i18n/Magento/es_ES/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/fr_FR/composer.json b/app/i18n/Magento/fr_FR/composer.json index ada414e6a7a32..50c541308673b 100644 --- a/app/i18n/Magento/fr_FR/composer.json +++ b/app/i18n/Magento/fr_FR/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/nl_NL/composer.json b/app/i18n/Magento/nl_NL/composer.json index a881eed112ea0..a182e179d4103 100644 --- a/app/i18n/Magento/nl_NL/composer.json +++ b/app/i18n/Magento/nl_NL/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/pt_BR/composer.json b/app/i18n/Magento/pt_BR/composer.json index 6e10bc16f6a79..46734cc09b363 100644 --- a/app/i18n/Magento/pt_BR/composer.json +++ b/app/i18n/Magento/pt_BR/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/app/i18n/Magento/zh_Hans_CN/composer.json b/app/i18n/Magento/zh_Hans_CN/composer.json index 8491eced1389f..ce214ce649f56 100644 --- a/app/i18n/Magento/zh_Hans_CN/composer.json +++ b/app/i18n/Magento/zh_Hans_CN/composer.json @@ -1,7 +1,6 @@ { "name": "magento/language-zh_hans_cn", "description": "Chinese (China) language", - "type": "magento2-language", "license": [ "OSL-3.0", "AFL-3.0" @@ -9,14 +8,13 @@ "config": { "sort-packages": true }, - "version": "100.4.0", "require": { - "magento/framework": "103.0.*" + "magento/framework": "*" }, + "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } } - diff --git a/composer.json b/composer.json index 12a418ecfbb65..dd4fb189128df 100644 --- a/composer.json +++ b/composer.json @@ -108,11 +108,8 @@ }, "replace": { "magento/module-marketplace": "*", - "magento/module-admin-adobe-ims": "*", "magento/module-admin-analytics": "*", "magento/module-admin-notification": "*", - "magento/module-adobe-ims": "*", - "magento/module-adobe-ims-api": "*", "magento/module-advanced-pricing-import-export": "*", "magento/module-amqp": "*", "magento/module-analytics": "*", @@ -166,9 +163,10 @@ "magento/module-downloadable-graph-ql": "*", "magento/module-downloadable-import-export": "*", "magento/module-eav": "*", + "magento/module-open-search": "*", "magento/module-elasticsearch": "*", - "magento/module-elasticsearch-6": "*", "magento/module-elasticsearch-7": "*", + "magento/module-elasticsearch-8": "*", "magento/module-email": "*", "magento/module-encryption-key": "*", "magento/module-fedex": "*", diff --git a/lib/internal/Magento/Framework/Amqp/composer.json b/lib/internal/Magento/Framework/Amqp/composer.json index 98422bdc53f0c..d6f7337988934 100644 --- a/lib/internal/Magento/Framework/Amqp/composer.json +++ b/lib/internal/Magento/Framework/Amqp/composer.json @@ -1,27 +1,25 @@ { "name": "magento/framework-amqp", "description": "N/A", + "config": { + "sort-packages": true + }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], - "config": { - "sort-packages": true - }, - "version": "100.4.3", "require": { - "magento/framework": "103.0.*", + "magento/framework": "*", "php": "~8.1.0||~8.2.0", "php-amqplib/php-amqplib": "~3.2.0" }, "autoload": { - "files": [ - "registration.php" - ], "psr-4": { "Magento\\Framework\\Amqp\\": "" - } + }, + "files": [ + "registration.php" + ] } } - diff --git a/lib/internal/Magento/Framework/Bulk/composer.json b/lib/internal/Magento/Framework/Bulk/composer.json index 77f35c107a54e..7beccb44975b3 100644 --- a/lib/internal/Magento/Framework/Bulk/composer.json +++ b/lib/internal/Magento/Framework/Bulk/composer.json @@ -1,26 +1,24 @@ { "name": "magento/framework-bulk", "description": "N/A", + "config": { + "sort-packages": true + }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], - "config": { - "sort-packages": true - }, - "version": "101.0.1", "require": { - "magento/framework": "103.0.*", + "magento/framework": "*", "php": "~8.1.0||~8.2.0" }, "autoload": { - "files": [ - "registration.php" - ], "psr-4": { "Magento\\Framework\\Bulk\\": "" - } + }, + "files": [ + "registration.php" + ] } } - diff --git a/lib/internal/Magento/Framework/MessageQueue/composer.json b/lib/internal/Magento/Framework/MessageQueue/composer.json index a5f371f7dac65..07cce7c905463 100644 --- a/lib/internal/Magento/Framework/MessageQueue/composer.json +++ b/lib/internal/Magento/Framework/MessageQueue/composer.json @@ -1,26 +1,24 @@ { "name": "magento/framework-message-queue", "description": "N/A", + "config": { + "sort-packages": true + }, "type": "magento2-library", "license": [ "OSL-3.0", "AFL-3.0" ], - "config": { - "sort-packages": true - }, - "version": "100.4.5", "require": { - "magento/framework": "103.0.*", + "magento/framework": "*", "php": "~8.1.0||~8.2.0" }, "autoload": { - "files": [ - "registration.php" - ], "psr-4": { "Magento\\Framework\\MessageQueue\\": "" - } + }, + "files": [ + "registration.php" + ] } } - diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index a1f77bb2ffe6a..ef62afaaccb46 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -9,7 +9,6 @@ "config": { "sort-packages": true }, - "version": "103.0.5", "require": { "php": "~8.1.0||~8.2.0", "ext-bcmath": "*", @@ -65,12 +64,11 @@ "ext-imagick": "Use Image Magick >=3.0.0 as an optional alternative image processing library" }, "autoload": { - "files": [ - "registration.php" - ], "psr-4": { "Magento\\Framework\\": "" - } + }, + "files": [ + "registration.php" + ] } } - From 70150763b9975bd86a976fa313417eb03f58ea31 Mon Sep 17 00:00:00 2001 From: Jacob Brown <jacob@gnu.org> Date: Mon, 23 Jan 2023 15:50:27 -0600 Subject: [PATCH 573/985] ACPT-978: Improve Config Save filtering This performance improvement is in Save and Structure and totals to ~42x improvement in Magento\Config\Controller\Adminhtml\System\Config\Save::filterNodes --- .../Controller/Adminhtml/System/Config/Save.php | 11 ++--------- .../Magento/Config/Model/Config/Structure.php | 16 +++------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php index 91f93e02dc651..b81ae6158a1b9 100644 --- a/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php +++ b/app/code/Magento/Config/Controller/Adminhtml/System/Config/Save.php @@ -335,18 +335,11 @@ private function filterPaths(string $prefix, array $groups, array $systemXmlConf private function filterNodes(array $configData): array { if (!empty($configData['groups'])) { - $systemXmlPathsFromKeys = array_keys($this->_configStructure->getFieldPaths()); - $systemXmlPathsFromValues = array_reduce( - array_values($this->_configStructure->getFieldPaths()), - 'array_merge', - [] - ); //Full list of paths defined in system.xml - $systemXmlConfig = array_merge($systemXmlPathsFromKeys, $systemXmlPathsFromValues); - + $fieldPaths = $this->_configStructure->getFieldPaths(); + $systemXmlConfig = array_merge(array_keys($fieldPaths), ...array_values($fieldPaths)); $configData['groups'] = $this->filterPaths($configData['section'], $configData['groups'], $systemXmlConfig); } - return $configData; } } diff --git a/app/code/Magento/Config/Model/Config/Structure.php b/app/code/Magento/Config/Model/Config/Structure.php index 024d963927e1a..6344714ad678f 100644 --- a/app/code/Magento/Config/Model/Config/Structure.php +++ b/app/code/Magento/Config/Model/Config/Structure.php @@ -384,32 +384,22 @@ public function getFieldPaths() * Iteration that collects config field paths recursively from config files. * * @param array $elements The elements to be parsed + * @param array $result used for recursive calls * @return array An array of config path to config structure path map */ - private function getFieldsRecursively(array $elements = []) + private function getFieldsRecursively(array $elements = [], &$result = []) { - $result = []; - foreach ($elements as $element) { if (isset($element['children'])) { - $result = array_merge_recursive( - $result, - $this->getFieldsRecursively($element['children']) - ); + $this->getFieldsRecursively($element['children'], $result); } else { if ($element['_elementType'] === 'field') { $structurePath = (isset($element['path']) ? $element['path'] . '/' : '') . $element['id']; $configPath = isset($element['config_path']) ? $element['config_path'] : $structurePath; - - if (!isset($result[$configPath])) { - $result[$configPath] = []; - } - $result[$configPath][] = $structurePath; } } } - return $result; } } From 84e68af440c6719233141fe769667077c96d61ef Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Tue, 24 Jan 2023 19:39:28 -0600 Subject: [PATCH 574/985] ACP2E-1579: Catalog rule discount disappears after a product is saved from Admin --- .../Model/Indexer/IndexBuilder.php | 29 +++++++++++++++---- .../Model/Indexer/Product/PriceTest.php | 4 --- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 7c570e2909916..e19757401621a 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -9,6 +9,7 @@ use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ProductFactory; use Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory; use Magento\CatalogRule\Model\Indexer\IndexBuilder\ProductLoader; use Magento\CatalogRule\Model\Indexer\IndexerTableSwapperInterface as TableSwapper; use Magento\CatalogRule\Model\ResourceModel\Rule\Collection as RuleCollection; @@ -167,6 +168,11 @@ class IndexBuilder */ private $productLoader; + /** + * @var ProductCollectionFactory + */ + private $productCollectionFactory; + /** * @param RuleCollectionFactory $ruleCollectionFactory * @param PriceCurrencyInterface $priceCurrency @@ -188,6 +194,7 @@ class IndexBuilder * @param ProductLoader|null $productLoader * @param TableSwapper|null $tableSwapper * @param TimezoneInterface|null $localeDate + * @param ProductCollectionFactory|null $productCollectionFactory * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -211,7 +218,8 @@ public function __construct( ActiveTableSwitcher $activeTableSwitcher = null, ProductLoader $productLoader = null, TableSwapper $tableSwapper = null, - TimezoneInterface $localeDate = null + TimezoneInterface $localeDate = null, + ProductCollectionFactory $productCollectionFactory = null ) { $this->resource = $resource; $this->connection = $resource->getConnection(); @@ -253,6 +261,8 @@ public function __construct( ObjectManager::getInstance()->get(TableSwapper::class); $this->localeDate = $localeDate ?? ObjectManager::getInstance()->get(TimezoneInterface::class); + $this->productCollectionFactory = $productCollectionFactory ?? + ObjectManager::getInstance()->get(ProductCollectionFactory::class); } /** @@ -497,13 +507,20 @@ protected function applyRule(Rule $rule, $product) */ private function applyRules(RuleCollection $ruleCollection, Product $product): void { + /** @var \Magento\CatalogRule\Model\Rule $rule */ foreach ($ruleCollection as $rule) { - if (!$rule->validate($product)) { - continue; - } - + $productCollection = $this->productCollectionFactory->create(); + $productCollection->addIdFilter($product->getId()); + $rule->getConditions()->collectValidatedAttributes($productCollection); + $validationResult = []; $websiteIds = array_intersect($product->getWebsiteIds(), $rule->getWebsiteIds()); - $this->assignProductToRule($rule, $product->getId(), $websiteIds); + foreach ($websiteIds as $websiteId) { + $defaultGroupId = $this->storeManager->getWebsite($websiteId)->getDefaultGroupId(); + $defaultStoreId = $this->storeManager->getGroup($defaultGroupId)->getDefaultStoreId(); + $product->setStoreId($defaultStoreId); + $validationResult[$websiteId] = $rule->validate($product); + } + $this->assignProductToRule($rule, $product->getId(), array_keys(array_filter($validationResult))); } $this->cleanProductPriceIndex([$product->getId()]); diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php index 716f8d6260c4a..4dc07309ee70b 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php @@ -96,11 +96,7 @@ public function testPriceForSecondStore():void { $websiteId = $this->websiteRepository->get('test')->getId(); $simpleProduct = $this->productRepository->get('simple'); - $simpleProduct->setPriceCalculation(true); $this->assertEquals('simple', $simpleProduct->getSku()); - $this->assertFalse( - $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()) - ); $this->indexerBuilder->reindexById($simpleProduct->getId()); $this->assertEquals( 25, From 1544a507f2f4bf5d1e1f900f110084ab03fe11ec Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Thu, 8 Dec 2022 19:35:14 +0530 Subject: [PATCH 575/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- app/code/Magento/CatalogImportExport/Model/Export/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index 4d3dceeb3eb62..0fd767ebc2a4a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1097,7 +1097,7 @@ protected function collectRawData() $additionalAttributes[$fieldName] = $fieldName . ImportProduct::PAIR_NAME_VALUE_SEPARATOR . $this->wrapValue($attrValue); } - $data[$itemId][$storeId][$fieldName] = htmlspecialchars_decode($attrValue); + $data[$itemId][$storeId][$fieldName] = $attrValue; } } else { $this->collectMultiselectValues($item, $code, $storeId); From e67757aa69c379076de6187e86173bfd2a3c1c91 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Sat, 10 Dec 2022 11:45:35 +0530 Subject: [PATCH 576/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- app/code/Magento/CatalogImportExport/Model/Export/Product.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index 0fd767ebc2a4a..cf64d83ed4882 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1086,7 +1086,7 @@ protected function collectRawData() if ($storeId != Store::DEFAULT_STORE_ID && isset($data[$itemId][Store::DEFAULT_STORE_ID][$fieldName]) - && $data[$itemId][Store::DEFAULT_STORE_ID][$fieldName] == htmlspecialchars_decode($attrValue) + && $data[$itemId][Store::DEFAULT_STORE_ID][$fieldName] == $attrValue ) { continue; } @@ -1112,7 +1112,6 @@ protected function collectRawData() } if (!empty($additionalAttributes)) { - $additionalAttributes = array_map('htmlspecialchars_decode', $additionalAttributes); $data[$itemId][$storeId][self::COL_ADDITIONAL_ATTRIBUTES] = implode(Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR, $additionalAttributes); } else { From c33fc1760ee3077de6f56b58f588fcff0b71e74f Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 12 Dec 2022 20:35:42 +0530 Subject: [PATCH 577/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Magento/CatalogImportExport/Model/Export/ProductTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 14283de9a071d..d19695a27f5c8 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -136,7 +136,7 @@ public function testExport(): void $this->assertStringContainsString('max_characters=10', $exportData); $this->assertStringContainsString('text_attribute=!@#$%^&*()_+1234567890-=|\\:;""\'<,>.?/', $exportData); $occurrencesCount = substr_count($exportData, 'Hello "" &"" Bring the water bottle when you can!'); - $this->assertEquals(1, $occurrencesCount); + $this->assertEquals(0, $occurrencesCount); } /** From eb4cd7667f2aaf5a0aeaea581447901d158321b0 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 12:26:53 +0530 Subject: [PATCH 578/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Model/Export/ProductTest.php | 27 ++++++++++++- .../product_export_data_with_html_tag.php | 40 +++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index d19695a27f5c8..0461fd8dbdb58 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -135,8 +135,31 @@ public function testExport(): void $this->assertStringContainsString('test_option_code_2', $exportData); $this->assertStringContainsString('max_characters=10', $exportData); $this->assertStringContainsString('text_attribute=!@#$%^&*()_+1234567890-=|\\:;""\'<,>.?/', $exportData); - $occurrencesCount = substr_count($exportData, 'Hello "" &"" Bring the water bottle when you can!'); - $this->assertEquals(0, $occurrencesCount); + $occurrencesCount = substr_count($exportData, 'Hello "" &"" Bring the water bottle when you can!'); + $this->assertEquals(1, $occurrencesCount); + } + + /** + * Verify successful export of product + * + * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php + * @magentoDbIsolation enabled + * + * @return void + */ + public function testExportBehaviour(): void + { + $this->model->setWriter( + $this->objectManager->create( + \Magento\ImportExport\Model\Export\Adapter\Csv::class + ) + ); + $exportData = $this->model->export(); + $this->assertStringContainsString('New Product', $exportData); + $this->assertStringContainsString('Description with <h2>this is my page14454</h2>', $exportData); + + $occurrencesCount = substr_count($exportData, 'Description with <h2>this is my page14454</h2>'); + $this->assertEquals(1, $occurrencesCount); } /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php new file mode 100644 index 0000000000000..bab541510977f --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php @@ -0,0 +1,40 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +use Magento\TestFramework\Workaround\Override\Fixture\Resolver; + +/** Create category */ +Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/category.php'); +/** Create category with special chars */ +Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/catalog_category_with_slash.php'); +/** Create fixture store */ +Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_store.php'); +/** Create product with multiselect attribute and values */ +Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/products_with_multiselect_attribute.php'); +/** Create dummy text attribute */ +Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/product_text_attribute.php'); + +$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + +/** @var \Magento\Catalog\Model\Product $productModel */ +$productModel = $objectManager->create(\Magento\Catalog\Model\Product::class); + +$productModel->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE) + ->setId(1) + ->setAttributeSetId(4) + ->setName('New Product') + ->setSku('simple "1"') + ->setPrice(10) + ->setDescription('Description with <h2>this is test page</h2>') + ->addData(['text_attribute' => '!@#$%^&*()_+1234567890-=|\\:;"\'<,>.?/›ƒª']) + ->setTierPrice([0 => ['website_id' => 0, 'cust_group' => 0, 'price_qty' => 3, 'price' => 8]]) + ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) + ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) + ->setWebsiteIds([1]) + ->setStockData(['qty' => 100, 'is_in_stock' => 1, 'manage_stock' => 1]) + ->setCanSaveCustomOptions(true) + ->setCategoryIds([333, 3331]); + +$productModel->setOptions([])->save(); From dbcdc9687d923358f87813d443ea40f98f523d38 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 19:03:00 +0530 Subject: [PATCH 579/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Magento/CatalogImportExport/Model/Export/ProductTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 0461fd8dbdb58..9d8785b9b5d9c 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -142,7 +142,7 @@ public function testExport(): void /** * Verify successful export of product * - * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php + * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php * @magentoDbIsolation enabled * * @return void From a6f59cc016cc6f76cf3d531e98af04151be400d9 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 19:28:27 +0530 Subject: [PATCH 580/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Magento/CatalogImportExport/Model/Export/ProductTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 9d8785b9b5d9c..5181456e710e8 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -156,9 +156,9 @@ public function testExportBehaviour(): void ); $exportData = $this->model->export(); $this->assertStringContainsString('New Product', $exportData); - $this->assertStringContainsString('Description with <h2>this is my page14454</h2>', $exportData); + $this->assertStringContainsString('Description with <h2>this is test page</h2>', $exportData); - $occurrencesCount = substr_count($exportData, 'Description with <h2>this is my page14454</h2>'); + $occurrencesCount = substr_count($exportData, 'Description with <h2>this is test page</h2>'); $this->assertEquals(1, $occurrencesCount); } From 5289d3d211b42153e518a61e93b1c93a7491b438 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 20:13:50 +0530 Subject: [PATCH 581/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../CatalogImportExport/Model/Export/ProductTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 5181456e710e8..029179bc34578 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -142,13 +142,16 @@ public function testExport(): void /** * Verify successful export of product * - * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php + * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php * @magentoDbIsolation enabled * * @return void */ public function testExportBehaviour(): void { + $product = $this->productRepository->get('simple "1"'); + $product->setDescription('Description with <h2>this is test page</h2>'); + $product->save(); $this->model->setWriter( $this->objectManager->create( \Magento\ImportExport\Model\Export\Adapter\Csv::class @@ -157,9 +160,6 @@ public function testExportBehaviour(): void $exportData = $this->model->export(); $this->assertStringContainsString('New Product', $exportData); $this->assertStringContainsString('Description with <h2>this is test page</h2>', $exportData); - - $occurrencesCount = substr_count($exportData, 'Description with <h2>this is test page</h2>'); - $this->assertEquals(1, $occurrencesCount); } /** From 4777fddc92570a7233dcef12be5e8dc81aead224 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 20:16:16 +0530 Subject: [PATCH 582/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../product_export_data_with_html_tag.php | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php deleted file mode 100644 index bab541510977f..0000000000000 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_with_html_tag.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -use Magento\TestFramework\Workaround\Override\Fixture\Resolver; - -/** Create category */ -Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/category.php'); -/** Create category with special chars */ -Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/catalog_category_with_slash.php'); -/** Create fixture store */ -Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_store.php'); -/** Create product with multiselect attribute and values */ -Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/products_with_multiselect_attribute.php'); -/** Create dummy text attribute */ -Resolver::getInstance()->requireDataFixture('Magento/Catalog/_files/product_text_attribute.php'); - -$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - -/** @var \Magento\Catalog\Model\Product $productModel */ -$productModel = $objectManager->create(\Magento\Catalog\Model\Product::class); - -$productModel->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE) - ->setId(1) - ->setAttributeSetId(4) - ->setName('New Product') - ->setSku('simple "1"') - ->setPrice(10) - ->setDescription('Description with <h2>this is test page</h2>') - ->addData(['text_attribute' => '!@#$%^&*()_+1234567890-=|\\:;"\'<,>.?/›ƒª']) - ->setTierPrice([0 => ['website_id' => 0, 'cust_group' => 0, 'price_qty' => 3, 'price' => 8]]) - ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) - ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) - ->setWebsiteIds([1]) - ->setStockData(['qty' => 100, 'is_in_stock' => 1, 'manage_stock' => 1]) - ->setCanSaveCustomOptions(true) - ->setCategoryIds([333, 3331]); - -$productModel->setOptions([])->save(); From 6b4d01af6f4beabd6204f8f5f97298dd25640ebe Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 14 Dec 2022 22:05:43 +0530 Subject: [PATCH 583/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Magento/CatalogImportExport/Model/Export/ProductTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 029179bc34578..aeb2258bfaa02 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -140,7 +140,7 @@ public function testExport(): void } /** - * Verify successful export of product + * Verify successful export of product with HTML tag * * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php * @magentoDbIsolation enabled From d66eec20da3216a11f0c28e8dd840cce1e0aa731 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 20 Dec 2022 13:08:47 +0530 Subject: [PATCH 584/985] ACP2E-1418: [Cloud] REST Orders API returns different results when a simple configurable product is out of stock --- app/code/Magento/CatalogImportExport/Model/Export/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index cf64d83ed4882..2c0d7f45af19a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1122,7 +1122,7 @@ protected function collectRawData() $data[$itemId][$storeId][self::COL_STORE] = $storeCode; $data[$itemId][$storeId][self::COL_ATTR_SET] = $this->_attrSetIdToName[$attrSetId]; $data[$itemId][$storeId][self::COL_TYPE] = $item->getTypeId(); - $data[$itemId][$storeId][self::COL_SKU] = htmlspecialchars_decode($item->getSku()); + $data[$itemId][$storeId][self::COL_SKU] = $item->getSku(); $data[$itemId][$storeId]['store_id'] = $storeId; $data[$itemId][$storeId]['product_id'] = $itemId; $data[$itemId][$storeId]['product_link_id'] = $productLinkId; From ed32d508102d94a190d4a76718b64ea42bbe4346 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 20 Dec 2022 15:55:24 +0530 Subject: [PATCH 585/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Magento/CatalogImportExport/Model/Export/ProductTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index aeb2258bfaa02..6f585a78891f6 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -271,7 +271,7 @@ public function testExportSpecialChars(): void ) ); $exportData = $this->model->export(); - $this->assertStringContainsString('simple ""1""', $exportData); + $this->assertStringContainsString('simple "1"', $exportData); $this->assertStringContainsString('Category with slash\/ symbol', $exportData); } From f1dc1165d88b88e4814b74e30b955a0585844bf2 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 20 Dec 2022 15:59:46 +0530 Subject: [PATCH 586/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- app/code/Magento/CatalogImportExport/Model/Export/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index 2c0d7f45af19a..cf64d83ed4882 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1122,7 +1122,7 @@ protected function collectRawData() $data[$itemId][$storeId][self::COL_STORE] = $storeCode; $data[$itemId][$storeId][self::COL_ATTR_SET] = $this->_attrSetIdToName[$attrSetId]; $data[$itemId][$storeId][self::COL_TYPE] = $item->getTypeId(); - $data[$itemId][$storeId][self::COL_SKU] = $item->getSku(); + $data[$itemId][$storeId][self::COL_SKU] = htmlspecialchars_decode($item->getSku()); $data[$itemId][$storeId]['store_id'] = $storeId; $data[$itemId][$storeId]['product_id'] = $itemId; $data[$itemId][$storeId]['product_link_id'] = $productLinkId; From 2b889f417448aaff58b7d860f0ef425aa8d64be8 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 20 Dec 2022 16:00:29 +0530 Subject: [PATCH 587/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- app/code/Magento/CatalogImportExport/Model/Export/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index cf64d83ed4882..2c0d7f45af19a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1122,7 +1122,7 @@ protected function collectRawData() $data[$itemId][$storeId][self::COL_STORE] = $storeCode; $data[$itemId][$storeId][self::COL_ATTR_SET] = $this->_attrSetIdToName[$attrSetId]; $data[$itemId][$storeId][self::COL_TYPE] = $item->getTypeId(); - $data[$itemId][$storeId][self::COL_SKU] = htmlspecialchars_decode($item->getSku()); + $data[$itemId][$storeId][self::COL_SKU] = $item->getSku(); $data[$itemId][$storeId]['store_id'] = $storeId; $data[$itemId][$storeId]['product_id'] = $itemId; $data[$itemId][$storeId]['product_link_id'] = $productLinkId; From d8b30bb603196e7bc003d2d38ad7b07258ab3c04 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 21 Dec 2022 15:15:56 +0530 Subject: [PATCH 588/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Model/Export/ProductTest.php | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 6f585a78891f6..a229f85bea58a 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -8,8 +8,8 @@ namespace Magento\CatalogImportExport\Model\Export; -use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Api\CategoryRepositoryInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection as ProductAttributeCollection; use Magento\Catalog\Observer\SwitchPriceAttributeScopeOnConfigChange; use Magento\Catalog\Test\Fixture\Category as CategoryFixture; @@ -19,6 +19,8 @@ use Magento\CatalogInventory\Api\StockItemRepositoryInterface; use Magento\CatalogInventory\Model\Stock\Item; use Magento\Framework\App\Config\ReinitableConfigInterface; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Test\Fixture\Store as StoreFixture; use Magento\TestFramework\Fixture\AppArea; @@ -139,29 +141,6 @@ public function testExport(): void $this->assertEquals(1, $occurrencesCount); } - /** - * Verify successful export of product with HTML tag - * - * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php - * @magentoDbIsolation enabled - * - * @return void - */ - public function testExportBehaviour(): void - { - $product = $this->productRepository->get('simple "1"'); - $product->setDescription('Description with <h2>this is test page</h2>'); - $product->save(); - $this->model->setWriter( - $this->objectManager->create( - \Magento\ImportExport\Model\Export\Adapter\Csv::class - ) - ); - $exportData = $this->model->export(); - $this->assertStringContainsString('New Product', $exportData); - $this->assertStringContainsString('Description with <h2>this is test page</h2>', $exportData); - } - /** * Verify successful export of product with stock data with 'use config max sale quantity is enabled * @@ -259,20 +238,46 @@ public function exportWithJsonAndMarkupTextAttributeDataProvider(): array /** * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php - * @magentoDbIsolation enabled + * @magentoDbIsolation disabled * * @return void + * @throws NoSuchEntityException */ public function testExportSpecialChars(): void { + $product = $this->productRepository->get('simple "1"'); + $product->setStoreId(Store::DEFAULT_STORE_ID); + $product->setDescription('Description with <h2>this is test page</h2>'); + $product->save(); + $this->model->setWriter( $this->objectManager->create( \Magento\ImportExport\Model\Export\Adapter\Csv::class ) ); $exportData = $this->model->export(); + $this->assertStringContainsString('simple "1"', $exportData); $this->assertStringContainsString('Category with slash\/ symbol', $exportData); + $this->assertStringContainsString('New Product', $exportData); + $this->assertStringContainsString('Description with <h2>this is test page</h2>', $exportData); + $this->assertFalse($this->hasDuplicateRowsForProducts($exportData)); + } + + /** + * Verify exported data does not contain duplicate rows for product + * + * @param $exportData + * @return bool + */ + private function hasDuplicateRowsForProducts($exportData): bool + { + $skus = []; + foreach (explode("\n", $exportData, -1) as $line) { + $skus[] = current(explode(',', $line)); + } + array_shift($skus); + return count($skus) !== count(array_flip($skus)); } /** From 89357305c478c312f6ed5d3f3cf7d053e91a708e Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 21 Dec 2022 22:28:49 +0530 Subject: [PATCH 589/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Model/Export/ProductTest.php | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index a229f85bea58a..47dab16eba1fa 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -238,17 +238,18 @@ public function exportWithJsonAndMarkupTextAttributeDataProvider(): array /** * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_data_special_chars.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled * * @return void * @throws NoSuchEntityException */ public function testExportSpecialChars(): void { + /** @var \Magento\Catalog\Model\Product $product */ $product = $this->productRepository->get('simple "1"'); $product->setStoreId(Store::DEFAULT_STORE_ID); $product->setDescription('Description with <h2>this is test page</h2>'); - $product->save(); + $this->productRepository->save($product); $this->model->setWriter( $this->objectManager->create( @@ -256,30 +257,50 @@ public function testExportSpecialChars(): void ) ); $exportData = $this->model->export(); + $rows = $this->csvToArray($exportData); - $this->assertStringContainsString('simple "1"', $exportData); + $this->assertCount(4, $rows); + $this->assertEquals('simple "1"', $rows[0]['sku']); + $this->assertEquals('Description with <h2>this is test page</h2>', $rows[0]['description']); $this->assertStringContainsString('Category with slash\/ symbol', $exportData); - $this->assertStringContainsString('New Product', $exportData); - $this->assertStringContainsString('Description with <h2>this is test page</h2>', $exportData); - $this->assertFalse($this->hasDuplicateRowsForProducts($exportData)); + $this->assertFalse($this->hasDuplicateRowsForProducts($rows)); } /** * Verify exported data does not contain duplicate rows for product * - * @param $exportData + * @param $rows * @return bool */ - private function hasDuplicateRowsForProducts($exportData): bool + private function hasDuplicateRowsForProducts($rows): bool { $skus = []; - foreach (explode("\n", $exportData, -1) as $line) { - $skus[] = current(explode(',', $line)); + foreach ($rows as $product) { + $skus[] = $product['sku']; } - array_shift($skus); return count($skus) !== count(array_flip($skus)); } + /** + * Converts comma separated csv data to array + * + * @param $exportData + * @return array + */ + private function csvToArray($exportData): array + { + $rows = []; + $headers = []; + foreach (str_getcsv($exportData, "\n") as $row) { + if (!$headers) { + $headers = str_getcsv($row); + } else { + $rows[] = array_combine($headers, str_getcsv($row)); + } + } + return $rows; + } + /** * @magentoDataFixture Magento/CatalogImportExport/_files/product_export_with_product_links_data.php * @magentoDbIsolation enabled From 56aaac9aeacbdf7810e88296106e647ac8cf8728 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 21 Dec 2022 22:48:17 +0530 Subject: [PATCH 590/985] ACP2E-1377: HTML tags removed in Page Builder editor after Product Import --- .../Model/Export/ProductTest.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 47dab16eba1fa..18fcaff5cc1f6 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -261,24 +261,11 @@ public function testExportSpecialChars(): void $this->assertCount(4, $rows); $this->assertEquals('simple "1"', $rows[0]['sku']); + $this->assertEquals('simple_ms_1', $rows[1]['sku']); + $this->assertEquals('simple_ms_2', $rows[2]['sku']); + $this->assertEquals('simple_ms_3', $rows[3]['sku']); $this->assertEquals('Description with <h2>this is test page</h2>', $rows[0]['description']); $this->assertStringContainsString('Category with slash\/ symbol', $exportData); - $this->assertFalse($this->hasDuplicateRowsForProducts($rows)); - } - - /** - * Verify exported data does not contain duplicate rows for product - * - * @param $rows - * @return bool - */ - private function hasDuplicateRowsForProducts($rows): bool - { - $skus = []; - foreach ($rows as $product) { - $skus[] = $product['sku']; - } - return count($skus) !== count(array_flip($skus)); } /** From f413b3eb25df1c9567ff53a55d9b673d2723f220 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 21 Dec 2022 19:13:20 +0530 Subject: [PATCH 591/985] ACP2E-1422: No products in categories or search --- .../Model/Product/Attribute/Repository.php | 20 +++++++++-- .../Product/Attribute/RepositoryTest.php | 36 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index 2ff5b14fcb9e0..73a431812b748 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -7,7 +7,7 @@ namespace Magento\Catalog\Model\Product\Attribute; use Laminas\Validator\Regex; -use Magento\Eav\Api\Data\AttributeInterface; +use Magento\Catalog\Api\Data\EavAttributeInterface; use Magento\Eav\Model\Entity\Attribute; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; @@ -19,6 +19,8 @@ */ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInterface { + private const FILTERABLE_ALLOWED_INPUT_TYPES = ['date', 'datetime', 'price', 'text', 'textarea', 'texteditor']; + /** * @var \Magento\Catalog\Model\ResourceModel\Attribute */ @@ -110,6 +112,20 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr */ public function save(\Magento\Catalog\Api\Data\ProductAttributeInterface $attribute) { + if (in_array($attribute->getFrontendInput(), self::FILTERABLE_ALLOWED_INPUT_TYPES)) { + if ($attribute->getIsFilterable()) { + throw InputException::invalidFieldValue( + EavAttributeInterface::IS_FILTERABLE, $attribute->getIsFilterable() + ); + } + + if ($attribute->getIsFilterableInSearch()) { + throw InputException::invalidFieldValue( + EavAttributeInterface::IS_FILTERABLE_IN_SEARCH, $attribute->getIsFilterableInSearch() + ); + } + } + $attribute->setEntityTypeId( $this->eavConfig ->getEntityType(\Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE) @@ -156,7 +172,7 @@ public function save(\Magento\Catalog\Api\Data\ProductAttributeInterface $attrib ); $attribute->setIsUserDefined(1); } - if (!empty($attribute->getData(AttributeInterface::OPTIONS))) { + if (!empty($attribute->getData(EavAttributeInterface::OPTIONS))) { $options = []; $sortOrder = 0; $default = []; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/RepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/RepositoryTest.php index 2924bf66949c1..42e7cab8fe142 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/RepositoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/RepositoryTest.php @@ -241,6 +241,42 @@ public function testSaveInputExceptionRequiredField() $this->model->save($attributeMock); } + /** + * @param string $field + * @param string $method + * @param bool $filterable + * + * @return void + * @dataProvider filterableDataProvider + */ + public function testSaveInputExceptionInvalidIsFilterableFieldValue( + string $field, + string $method, + bool $filterable + ) : void { + $this->expectException('Magento\Framework\Exception\InputException'); + $this->expectExceptionMessage('Invalid value of "'.$filterable.'" provided for the '.$field.' field.'); + $attributeMock = $this->createPartialMock( + Attribute::class, + ['getFrontendInput', $method] + ); + $attributeMock->expects($this->atLeastOnce())->method('getFrontendInput')->willReturn('text'); + $attributeMock->expects($this->atLeastOnce())->method($method)->willReturn($filterable); + + $this->model->save($attributeMock); + } + + /** + * @return array + */ + public function filterableDataProvider(): array + { + return [ + [ProductAttributeInterface::IS_FILTERABLE, 'getIsFilterable', true], + [ProductAttributeInterface::IS_FILTERABLE_IN_SEARCH, 'getIsFilterableInSearch', true] + ]; + } + public function testSaveInputExceptionInvalidFieldValue() { $this->expectException('Magento\Framework\Exception\InputException'); From 103797cc64ec9e52cbd39e38d8f6a9062d103008 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 21 Dec 2022 20:15:15 +0530 Subject: [PATCH 592/985] ACP2E-1422: No products in categories or search --- .../Magento/Catalog/Model/Product/Attribute/Repository.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index 73a431812b748..2789f9e1db207 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -115,13 +115,15 @@ public function save(\Magento\Catalog\Api\Data\ProductAttributeInterface $attrib if (in_array($attribute->getFrontendInput(), self::FILTERABLE_ALLOWED_INPUT_TYPES)) { if ($attribute->getIsFilterable()) { throw InputException::invalidFieldValue( - EavAttributeInterface::IS_FILTERABLE, $attribute->getIsFilterable() + EavAttributeInterface::IS_FILTERABLE, + $attribute->getIsFilterable() ); } if ($attribute->getIsFilterableInSearch()) { throw InputException::invalidFieldValue( - EavAttributeInterface::IS_FILTERABLE_IN_SEARCH, $attribute->getIsFilterableInSearch() + EavAttributeInterface::IS_FILTERABLE_IN_SEARCH, + $attribute->getIsFilterableInSearch() ); } } From e1e5ee39cc67318491dd37724b93f16c9c463b3b Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 21 Dec 2022 22:48:17 +0530 Subject: [PATCH 593/985] ACP2E-1422: No products in categories or search --- app/code/Magento/Catalog/Model/Product/Attribute/Repository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php index 2789f9e1db207..7bd1c32daa502 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Repository.php @@ -19,7 +19,7 @@ */ class Repository implements \Magento\Catalog\Api\ProductAttributeRepositoryInterface { - private const FILTERABLE_ALLOWED_INPUT_TYPES = ['date', 'datetime', 'price', 'text', 'textarea', 'texteditor']; + private const FILTERABLE_ALLOWED_INPUT_TYPES = ['date', 'datetime', 'text', 'textarea', 'texteditor']; /** * @var \Magento\Catalog\Model\ResourceModel\Attribute From fe985b590d3ec3f181218f9427b61f445026835f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 22 Dec 2022 01:24:20 +0530 Subject: [PATCH 594/985] ACP2E-1422: No products in categories or search --- .../_files/product_simple_with_custom_attribute_in_flat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_attribute_in_flat.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_attribute_in_flat.php index 2b1b271a8bb3c..c8460cf03a8aa 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_attribute_in_flat.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_with_custom_attribute_in_flat.php @@ -41,7 +41,7 @@ ->setEntityTypeId($entityTypeId) ->setIsVisible(true) ->setFrontendInput('text') - ->setIsFilterable(1) + ->setIsFilterable(0) ->setIsUserDefined(1) ->setUsedInProductListing(1) ->setBackendType('varchar') From c5e4bc56035957675a389b286f314acc9c1ea6ef Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 22 Dec 2022 01:42:37 +0530 Subject: [PATCH 595/985] ACP2E-1422: No products in categories or search --- .../Catalog/Test/Mftf/Data/ProductAttributeData.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml index 93bc62f3d7d02..98085011dbc1c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml @@ -20,8 +20,8 @@ <data key="is_wysiwyg_enabled">true</data> <data key="is_visible_in_advanced_search">true</data> <data key="is_visible_on_front">true</data> - <data key="is_filterable">true</data> - <data key="is_filterable_in_search">true</data> + <data key="is_filterable">false</data> + <data key="is_filterable_in_search">false</data> <data key="used_in_product_listing">true</data> <data key="is_used_for_promo_rules">true</data> <data key="is_comparable">true</data> @@ -227,8 +227,8 @@ <data key="is_visible">true</data> <data key="is_visible_in_advanced_search">true</data> <data key="is_visible_on_front">true</data> - <data key="is_filterable">true</data> - <data key="is_filterable_in_search">true</data> + <data key="is_filterable">false</data> + <data key="is_filterable_in_search">false</data> <data key="used_in_product_listing">true</data> <data key="is_used_for_promo_rules">true</data> <data key="is_comparable">true</data> @@ -356,8 +356,8 @@ <data key="is_wysiwyg_enabled">true</data> <data key="is_visible_in_advanced_search">true</data> <data key="is_visible_on_front">true</data> - <data key="is_filterable">true</data> - <data key="is_filterable_in_search">true</data> + <data key="is_filterable">false</data> + <data key="is_filterable_in_search">false</data> <data key="used_in_product_listing">true</data> <data key="is_used_for_promo_rules">true</data> <data key="is_comparable">true</data> From 0acb5f2f232edcd18e8e1dd1485416abd4f27ef5 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 13 Dec 2022 05:51:40 -0800 Subject: [PATCH 596/985] ACP2E-1462: Not secure response for 400 error from the server --- app/code/Magento/Customer/Controller/Section/Load.php | 4 +++- .../Customer/Test/Unit/Controller/Section/LoadTest.php | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php index e735366d0b8b8..58884ee99defd 100644 --- a/app/code/Magento/Customer/Controller/Section/Load.php +++ b/app/code/Magento/Customer/Controller/Section/Load.php @@ -69,7 +69,9 @@ public function execute() $resultJson->setHeader('Pragma', 'no-cache', true); try { $sectionNames = $this->getRequest()->getParam('sections'); - $sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null; + $sectionNames = $sectionNames + ? array_unique(is_array($sectionNames) ? $sectionNames : explode(',', $sectionNames)) + : null; $forceNewSectionTimestamp = $this->getRequest()->getParam('force_new_section_timestamp'); if ('false' === $forceNewSectionTimestamp) { diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php index fab560aaa21be..c09a25f2cd7f9 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php @@ -146,6 +146,12 @@ public function executeDataProvider() 'sectionNamesAsArray' => null, 'forceNewTimestamp' => false ], + [ + 'sectionNames' => ['sectionName1', 'sectionName2', 'sectionName3'], + 'forceNewSectionTimestamp' => 'forceNewSectionTimestamp', + 'sectionNamesAsArray' => ['sectionName1', 'sectionName2', 'sectionName3'], + 'forceNewTimestamp' => true + ], ]; } From 8bb3e19d14e9dd9bd4de8cc98394920fa614d015 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 14 Dec 2022 10:34:05 +0530 Subject: [PATCH 597/985] ACP2E-1462: Not secure response for 400 error from the server --- app/code/Magento/Customer/Controller/Section/Load.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php index 58884ee99defd..ddbcb7610f326 100644 --- a/app/code/Magento/Customer/Controller/Section/Load.php +++ b/app/code/Magento/Customer/Controller/Section/Load.php @@ -24,6 +24,7 @@ class Load extends \Magento\Framework\App\Action\Action implements HttpGetAction /** * @var Identifier * @deprecated 101.0.0 + * @see Used only for backward compatibility for do not break current class implementation with its dependencies */ protected $sectionIdentifier; From e9e80cf943e6a20b95fc155308ff487a554e225a Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Mon, 19 Dec 2022 20:12:24 +0530 Subject: [PATCH 598/985] ACP2E-1418: [Cloud] REST Orders API returns different results when a simple configurable product is out of stock --- .../Quote/Model/Quote/Item/Compare.php | 8 ++++++-- .../Unit/Model/Quote/Item/CompareTest.php | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Quote/Model/Quote/Item/Compare.php b/app/code/Magento/Quote/Model/Quote/Item/Compare.php index abe8b0d966050..f7fa741f0f1c3 100644 --- a/app/code/Magento/Quote/Model/Quote/Item/Compare.php +++ b/app/code/Magento/Quote/Model/Quote/Item/Compare.php @@ -5,10 +5,10 @@ */ namespace Magento\Quote\Model\Quote\Item; -use Magento\Quote\Model\Quote\Item; -use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\App\ObjectManager; use Magento\Framework\Serialize\JsonValidator; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\Quote\Model\Quote\Item; /** * Compare quote items @@ -68,6 +68,10 @@ protected function getOptionValues($value) */ public function compare(Item $target, Item $compared) { + if ($target->getSku() !== null && $target->getSku() === $compared->getSku()) { + return true; + } + if ($target->getProductId() != $compared->getProductId()) { return false; } diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php index 7dd0bcf8f8b0b..5316706dbd7c2 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php @@ -61,12 +61,12 @@ protected function setUp(): void ); $this->itemMock = $this->getMockBuilder(Item::class) ->addMethods(['getProductId']) - ->onlyMethods(['__wakeup', 'getOptions', 'getOptionsByCode']) + ->onlyMethods(['__wakeup', 'getOptions', 'getOptionsByCode', 'getSku']) ->setConstructorArgs($constrArgs) ->getMock(); $this->comparedMock = $this->getMockBuilder(Item::class) ->addMethods(['getProductId']) - ->onlyMethods(['__wakeup', 'getOptions', 'getOptionsByCode']) + ->onlyMethods(['__wakeup', 'getOptions', 'getOptionsByCode', 'getSku']) ->setConstructorArgs($constrArgs) ->getMock(); $this->optionMock = $this->getMockBuilder(Option::class) @@ -236,4 +236,19 @@ public function testCompareItemWithoutOptionWithCompared() ->willReturn([]); $this->assertFalse($this->helper->compare($this->itemMock, $this->comparedMock)); } + + /** + * test compare when configurable products has assigned its selected variant sku + */ + public function testCompareConfigurableProductAndItsVariant() + { + $this->itemMock->expects($this->exactly(2)) + ->method('getSku') + ->willReturn('cr1-r'); + $this->comparedMock->expects($this->once()) + ->method('getSku') + ->willReturn('cr1-r'); + + $this->assertTrue($this->helper->compare($this->itemMock, $this->comparedMock)); + } } From 4b593c83554a8764e80359a7185294487676350d Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 20 Dec 2022 11:31:10 +0530 Subject: [PATCH 599/985] ACP2E-1418: [Cloud] REST Orders API returns different results when a simple configurable product is out of stock --- .../Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php index 5316706dbd7c2..5a8905f8b98d6 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/CompareTest.php @@ -238,7 +238,7 @@ public function testCompareItemWithoutOptionWithCompared() } /** - * test compare when configurable products has assigned its selected variant sku + * test compare two items- when configurable products has assigned sku of its selected variant */ public function testCompareConfigurableProductAndItsVariant() { From face8387fe48034d981d07efd45612ab2950f460 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Mon, 12 Dec 2022 21:58:08 +0530 Subject: [PATCH 600/985] ACP2E-1446 : Admin password recovery link opens the login page when store code is added to URLs --- .../User/view/adminhtml/email/password_reset_confirmation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/User/view/adminhtml/email/password_reset_confirmation.html b/app/code/Magento/User/view/adminhtml/email/password_reset_confirmation.html index 374713cad91d6..dafab3740114f 100644 --- a/app/code/Magento/User/view/adminhtml/email/password_reset_confirmation.html +++ b/app/code/Magento/User/view/adminhtml/email/password_reset_confirmation.html @@ -20,7 +20,7 @@ {{trans "If you requested this change, reset your password here:"}} -{{store url="admin/auth/resetpassword/" _query_id=$user.user_id _query_token=$user.rp_token _nosid=1}} +{{store url="admin/auth/resetpassword/" _type="web" _query_id=$user.user_id _query_token=$user.rp_token _nosid=1 }} {{trans "If you did not make this request, you can ignore this email and your password will remain the same."}} From ac3a859349cff630391b00af4beae56e6c6db254 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 20 Dec 2022 23:03:29 +0530 Subject: [PATCH 601/985] ACP2E-1446 : Added test coverage for this ticket --- .../Adminhtml/UserResetPasswordEmailTest.php | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php new file mode 100644 index 0000000000000..67791252b5695 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -0,0 +1,73 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\User\Controller\Adminhtml; + +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Mail\EmailMessage; +use Magento\TestFramework\Fixture\Config as Config; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Mail\Template\TransportBuilderMock; +use Magento\TestFramework\TestCase\AbstractBackendController; +use Magento\User\Model\User as UserModel; +use Magento\User\Test\Fixture\User as UserDataFixture; + +/** + * Test class for user reset password email + * + * @magentoAppArea adminhtml + */ +class UserResetPasswordEmailTest extends AbstractBackendController +{ + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @var UserModel + */ + protected $userModel; + + /** + * @throws LocalizedException + */ + protected function setUp(): void + { + parent::setUp(); + $this->fixtures = DataFixtureStorageManager::getStorage(); + $this->userModel = $this->_objectManager->create(UserModel::class); + } + + #[ + Config('admin/emails/forgot_email_template', 'admin_emails_forgot_email_template'), + Config('admin/emails/forgot_email_identity', 'general'), + Config('web/url/use_store', 1), + DataFixture(UserDataFixture::class, ['role_id' => 1], 'user') + ] + public function testUserResetPasswordEmail() + { + $user = $this->fixtures->get('user'); + $userEmail = $user->getDataByKey('email'); + $transportMock = $this->_objectManager->get(TransportBuilderMock::class); + $this->getRequest()->setPostValue('email', $userEmail); + $this->dispatch('backend/admin/auth/forgotpassword'); + $message = $transportMock->getSentMessage(); + $this->assertNotEmpty($message); + $this->assertEquals('backend/admin/auth/resetpassword', $this->getResetPasswordUri($message)); + } + + private function getResetPasswordUri(EmailMessage $message): string + { + $emailParts = $message->getBody()->getParts(); + $messageContent = current($emailParts)->getRawContent(); + $pattern = '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#'; + preg_match_all($pattern, $messageContent, $match); + $urlString = strstr($match[0][0], 'backend'); + return substr($urlString, 0, strpos($urlString, "/key")); + } +} From 4dba2307c1c1a11d187cca6a56da8c83b0634df8 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 21 Dec 2022 01:34:57 +0530 Subject: [PATCH 602/985] ACP2E-1446 : fixed issue in test coverage --- .../Controller/Adminhtml/UserResetPasswordEmailTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php index 67791252b5695..c1b19ca77beb4 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserResetPasswordEmailTest.php @@ -3,10 +3,13 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\User\Controller\Adminhtml; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Mail\EmailMessage; +use Magento\Store\Model\Store; use Magento\TestFramework\Fixture\Config as Config; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DataFixtureStorage; @@ -63,11 +66,12 @@ public function testUserResetPasswordEmail() private function getResetPasswordUri(EmailMessage $message): string { + $store = $this->_objectManager->get(Store::class); $emailParts = $message->getBody()->getParts(); $messageContent = current($emailParts)->getRawContent(); $pattern = '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#'; preg_match_all($pattern, $messageContent, $match); - $urlString = strstr($match[0][0], 'backend'); + $urlString = trim($match[0][0], $store->getBaseUrl('web')); return substr($urlString, 0, strpos($urlString, "/key")); } } From f883d96dc679d03f0e8f92dfde30e6bcc8549311 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Thu, 29 Dec 2022 17:44:37 +0530 Subject: [PATCH 603/985] ACP2E-1486: No Email confirmation when changing password via Graphql --- .../Model/Resolver/ChangePassword.php | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CustomerGraphQl/Model/Resolver/ChangePassword.php b/app/code/Magento/CustomerGraphQl/Model/Resolver/ChangePassword.php index a6b6ad71109c7..9cf858da9c672 100644 --- a/app/code/Magento/CustomerGraphQl/Model/Resolver/ChangePassword.php +++ b/app/code/Magento/CustomerGraphQl/Model/Resolver/ChangePassword.php @@ -8,9 +8,11 @@ namespace Magento\CustomerGraphQl\Model\Resolver; use Magento\Customer\Api\AccountManagementInterface; +use Magento\Customer\Model\EmailNotificationInterface; use Magento\CustomerGraphQl\Model\Customer\CheckCustomerPassword; use Magento\CustomerGraphQl\Model\Customer\ExtractCustomerData; use Magento\CustomerGraphQl\Model\Customer\GetCustomer; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\GraphQl\Config\Element\Field; use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException; @@ -44,22 +46,31 @@ class ChangePassword implements ResolverInterface */ private $extractCustomerData; + /** + * @var EmailNotificationInterface + */ + private $emailNotification; + /** * @param GetCustomer $getCustomer * @param CheckCustomerPassword $checkCustomerPassword * @param AccountManagementInterface $accountManagement * @param ExtractCustomerData $extractCustomerData + * @param EmailNotificationInterface|null $emailNotification */ public function __construct( GetCustomer $getCustomer, CheckCustomerPassword $checkCustomerPassword, AccountManagementInterface $accountManagement, - ExtractCustomerData $extractCustomerData + ExtractCustomerData $extractCustomerData, + ?EmailNotificationInterface $emailNotification = null ) { $this->getCustomer = $getCustomer; $this->checkCustomerPassword = $checkCustomerPassword; $this->accountManagement = $accountManagement; $this->extractCustomerData = $extractCustomerData; + $this->emailNotification = $emailNotification + ?? ObjectManager::getInstance()->get(EmailNotificationInterface::class); } /** @@ -89,12 +100,25 @@ public function resolve( $this->checkCustomerPassword->execute($args['currentPassword'], $customerId); try { - $this->accountManagement->changePasswordById($customerId, $args['currentPassword'], $args['newPassword']); + $isPasswordChanged = $this->accountManagement->changePasswordById( + $customerId, + $args['currentPassword'], + $args['newPassword'] + ); } catch (LocalizedException $e) { throw new GraphQlInputException(__($e->getMessage()), $e); } $customer = $this->getCustomer->execute($context); + + if ($isPasswordChanged) { + $this->emailNotification->credentialsChanged( + $customer, + $customer->getEmail(), + $isPasswordChanged + ); + } + return $this->extractCustomerData->execute($customer); } } From 0604e806fb1925c82335472572584eb0677b7d8a Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 3 Jan 2023 11:52:59 +0530 Subject: [PATCH 604/985] ACP2E-1486: No Email confirmation when changing password via Graphql --- .../Model/Resolver/ChangePasswordTest.php | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/CustomerGraphQl/Model/Resolver/ChangePasswordTest.php diff --git a/dev/tests/integration/testsuite/Magento/CustomerGraphQl/Model/Resolver/ChangePasswordTest.php b/dev/tests/integration/testsuite/Magento/CustomerGraphQl/Model/Resolver/ChangePasswordTest.php new file mode 100644 index 0000000000000..19c3cf2ec9090 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CustomerGraphQl/Model/Resolver/ChangePasswordTest.php @@ -0,0 +1,127 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CustomerGraphQl\Model\Resolver; + +use Magento\Customer\Test\Fixture\Customer; +use Magento\Framework\Exception\AuthenticationException; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Serialize\SerializerInterface; +use Magento\GraphQl\Service\GraphQlRequest; +use Magento\Integration\Api\CustomerTokenServiceInterface; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Fixture\DbIsolation; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Mail\Template\TransportBuilderMock; +use PHPUnit\Framework\TestCase; + +class ChangePasswordTest extends TestCase +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @var GraphQlRequest + */ + private $graphQlRequest; + + /** + * @var SerializerInterface + */ + private $json; + + /** + * @var CustomerTokenServiceInterface + */ + private $customerTokenService; + + public function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->fixtures = DataFixtureStorageManager::getStorage(); + $this->graphQlRequest = $this->objectManager->create(GraphQlRequest::class); + $this->json = $this->objectManager->get(SerializerInterface::class); + $this->customerTokenService = $this->objectManager->get(CustomerTokenServiceInterface::class); + } + + /** + * Test that change password sends an email + * + * @magentoAppArea graphql + * @throws AuthenticationException + */ + #[ + DbIsolation(false), + DataFixture(Customer::class, ['email' => 'customer@example.com'], as: 'customer'), + ] + public function testChangePasswordSendsEmail(): void + { + $currentPassword = 'password'; + $query + = <<<QUERY +mutation { + changeCustomerPassword( + currentPassword: "$currentPassword" + newPassword: "T3stP4assw0rd" + ) { + id + email + } +} +QUERY; + $customer = $this->fixtures->get('customer'); + $response = $this->graphQlRequest->send( + $query, + [], + '', + $this->getCustomerAuthHeaders($customer->getEmail(), $currentPassword) + ); + $responseData = $this->json->unserialize($response->getContent()); + + // Assert the response of the GraphQL request + $this->assertNull($responseData['data']['changeCustomerPassword']['id']); + $this->assertEquals($customer->getEmail(), $responseData['data']['changeCustomerPassword']['email']); + + /** @var TransportBuilderMock $transportBuilderMock */ + $transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class); + $sentMessage = $transportBuilderMock->getSentMessage(); + + // Verify an email was dispatched to the correct user + $this->assertNotNull($sentMessage); + $this->assertEquals($customer->getName(), $sentMessage->getTo()[0]->getName()); + $this->assertEquals($customer->getEmail(), $sentMessage->getTo()[0]->getEmail()); + + // Assert the email contains the expected content + $this->assertEquals('Your Main Website Store password has been changed', $sentMessage->getSubject()); + $messageRaw = $sentMessage->getBody()->getParts()[0]->getRawContent(); + $this->assertStringContainsString( + 'We have received a request to change the following information associated with your account', + $messageRaw + ); + } + + /** + * @param string $email + * @param string $password + * @return array + * @throws AuthenticationException + */ + private function getCustomerAuthHeaders(string $email, string $password): array + { + $customerToken = $this->customerTokenService->createCustomerAccessToken($email, $password); + return ['Authorization' => 'Bearer ' . $customerToken]; + } +} From fd4db3a23f7438234e98a0a01d48e821a5d851d5 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 25 Jan 2023 10:07:30 +0200 Subject: [PATCH 605/985] ACP2E-1456: fix unit test errors --- .../Test/Unit/Helper/Catalog/Product/ConfigurationTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index b8bc4d9df5c3a..fab812c50ff64 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -269,6 +269,9 @@ public function testGetOptions(): void ->method('escapeHtml') ->with('name') ->willReturn('name'); + $this->catalogHelper->expects($this->any()) + ->method('getTaxPrice') + ->willReturn(15); $this->pricingHelper->expects($this->once())->method('currency')->with(15) ->willReturn('<span class="price">$15.00</span>'); $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15); From 3c989f7e2cc617d00c0bd9eb31342b102926f0bc Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Wed, 25 Jan 2023 15:49:51 +0530 Subject: [PATCH 606/985] #AC-7699::DHL shipping method is causing an error-fixed deprecated utf encoding --- app/code/Magento/Dhl/Model/Carrier.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index e64c7f1ae377b..200ee62720755 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1047,7 +1047,7 @@ protected function _getQuotes() (string)$this->getConfigData('gateway_url'), Request::METHOD_POST, ['Content-Type' => 'application/xml'], - utf8_encode($request) + mb_convert_encoding($request, 'UTF-8') ) ), 'date' => $date, @@ -1105,7 +1105,7 @@ protected function _getQuotesFromServer($request) $client = $this->_httpClientFactory->create(); $client->setUri($this->getGatewayURL()); $client->setOptions(['maxredirects' => 0, 'timeout' => 30]); - $client->setRawBody(utf8_encode($request)); + $client->setRawBody(mb_convert_encoding($request, 'UTF-8')); $client->setMethod(HttpRequest::METHOD_POST); return $client->send()->getBody(); @@ -1716,7 +1716,7 @@ protected function _doRequest() $request = $xml->asXML(); if ($request && !(mb_detect_encoding($request) == 'UTF-8')) { - $request = utf8_encode($request); + $request = mb_convert_encoding($request, 'UTF-8'); } $responseBody = $this->_getCachedQuotes($request); @@ -1731,7 +1731,7 @@ protected function _doRequest() $request ) ); - $responseBody = utf8_decode($response->get()->getBody()); + $responseBody = mb_convert_encoding($response->get()->getBody(), 'ISO-8859-1', 'UTF-8'); $debugData['result'] = $this->filterDebugData($responseBody); $this->_setCachedQuotes($request, $responseBody); } catch (\Exception $e) { @@ -1880,7 +1880,7 @@ protected function _getXMLTracking($trackings) //$xml->addChild('PiecesEnabled', 'ALL_CHECK_POINTS'); $request = $xml->asXML(); - $request = utf8_encode($request); + $request = mb_convert_encoding($request, 'UTF-8'); $responseBody = $this->_getCachedQuotes($request); if ($responseBody === null) { From ac91b3d1623178ca9e38316a34154b12925a8902 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 25 Jan 2023 12:53:59 +0200 Subject: [PATCH 607/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed disabled "use system value" issue --- .../Config/Reader/Source/Deployed/SettingChecker.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php b/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php index 0d56aca14fb0a..48c53f8201bb2 100644 --- a/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php +++ b/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php @@ -102,8 +102,12 @@ public function getPlaceholderValue($path, $scope, $scopeCode = null) public function getEnvValue($placeholder) { // phpcs:disable Magento2.Security.Superglobal - if ($this->placeholder->isApplicable($placeholder) && isset($_ENV[$placeholder])) { - return $_ENV[$placeholder]; + $environment = []; + foreach ($_ENV as $key => $value) { + $environment[strtolower($key)] = $value; + } + if ($this->placeholder->isApplicable($placeholder) && isset($environment[strtolower($placeholder)])) { + return $environment[strtolower($placeholder)]; } // phpcs:enable From 286e5f6e7d3a5724a8fb282f34bd4d33e9ac9a88 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 25 Jan 2023 13:01:47 +0200 Subject: [PATCH 608/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed disabled "use system value" issue, added unit test --- .../Reader/Source/Deployed/SettingCheckerTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php b/app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php index a0158a6b473df..157d740d524c1 100644 --- a/app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php +++ b/app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php @@ -69,6 +69,16 @@ protected function setUp(): void $this->checker = new SettingChecker($this->configMock, $placeholderFactoryMock, $this->scopeCodeResolverMock); } + public function testGetEnvValue(): void + { + $_ENV = array_merge($this->env, ['SOME_PLACEHOLDER' => 0, 'another_placeholder' => 1, 'some_placeholder' => 1]); + $this->placeholderMock->expects($this->any()) + ->method('isApplicable') + ->willReturn(true); + $this->assertSame($this->checker->getEnvValue('SOME_PLACEHOLDER'), 1); + $this->assertSame($this->checker->getEnvValue('another_placeholder'), 1); + } + /** * @param string $path * @param string $scope From 06ec0c03c83728e47ff59033deb2ff26a2cbdc87 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Wed, 25 Jan 2023 17:14:32 +0530 Subject: [PATCH 609/985] AC-7767::Allure report Unknown error for all the functional tests with PHP 8.1 --- composer.lock | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 12c6e0ee80270..f0c49a4b53d6e 100644 --- a/composer.lock +++ b/composer.lock @@ -10364,18 +10364,18 @@ "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "190f64b051795d447ec755acbfdb1bff330a6707" + "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/190f64b051795d447ec755acbfdb1bff330a6707", - "reference": "190f64b051795d447ec755acbfdb1bff330a6707", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/cc49ca6cd97baa173166c1f4fc54521964cf28bd", + "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd", "shasum": "" }, "require": { - "doctrine/annotations": "^1.13", + "doctrine/annotations": "^1.13 || ^2.0", "doctrine/instantiator": "^1.0.3", - "doctrine/lexer": "^1.1", + "doctrine/lexer": "^1.1 || ^2", "jms/metadata": "^2.6", "php": "^7.2||^8.0", "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" @@ -10397,6 +10397,7 @@ "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", "symfony/form": "^3.0|^4.0|^5.0|^6.0", "symfony/translation": "^3.0|^4.0|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", "twig/twig": "~1.34|~2.4|^3.0" @@ -10404,6 +10405,7 @@ "suggest": { "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", "symfony/cache": "Required if you like to use cache functionality.", + "symfony/uid": "Required if you'd like to serialize UID objects.", "symfony/yaml": "Required if you'd like to use the YAML metadata format." }, "type": "library", @@ -10431,7 +10433,7 @@ "email": "goetas@gmail.com" } ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "description": "Library for (de-)serializing data of any complexity; supports XML, and JSON.", "homepage": "http://jmsyst.com/libs/serializer", "keywords": [ "deserialization", @@ -10442,7 +10444,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.17.1" + "source": "https://github.com/schmittjoh/serializer/tree/3.21.0" }, "funding": [ { @@ -10450,7 +10452,7 @@ "type": "github" } ], - "time": "2021-12-28T20:59:55+00:00" + "time": "2023-01-10T13:08:17+00:00" }, { "name": "laminas/laminas-diactoros", From 4837e80227fad9302db5194fa5f3f1df66651be9 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 25 Jan 2023 15:04:30 +0200 Subject: [PATCH 610/985] ACP2E-1456: display bundle options taking into account catalog tax configurations --- .../Helper/Catalog/Product/Configuration.php | 31 +++++++++++++++---- .../Catalog/Product/ConfigurationTest.php | 13 +++++++- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index ca7e813f3bf8c..bee1051d5d1f1 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -48,6 +48,11 @@ class Configuration extends AbstractHelper implements ConfigurationInterface */ private $catalogHelper; + /** + * @var \Magento\Tax\Helper\Data|mixed + */ + private $taxHelper; + /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration @@ -55,6 +60,7 @@ class Configuration extends AbstractHelper implements ConfigurationInterface * @param \Magento\Framework\Escaper $escaper * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer * @param \Magento\Catalog\Helper\Data|null $catalogHelper + * @param \Magento\Tax\Helper\Data|null $taxHelper */ public function __construct( \Magento\Framework\App\Helper\Context $context, @@ -62,7 +68,8 @@ public function __construct( \Magento\Framework\Pricing\Helper\Data $pricingHelper, \Magento\Framework\Escaper $escaper, \Magento\Framework\Serialize\Serializer\Json $serializer = null, - \Magento\Catalog\Helper\Data $catalogHelper = null + \Magento\Catalog\Helper\Data $catalogHelper = null, + \Magento\Tax\Helper\Data $taxHelper = null ) { $this->productConfiguration = $productConfiguration; $this->pricingHelper = $pricingHelper; @@ -70,6 +77,7 @@ public function __construct( $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(\Magento\Framework\Serialize\Serializer\Json::class); $this->catalogHelper = $catalogHelper ?? ObjectManager::getInstance()->get(\Magento\Catalog\Helper\Data::class); + $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(\Magento\Tax\Helper\Data::class); parent::__construct($context); } @@ -104,7 +112,7 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod /** @var \Magento\Bundle\Model\Product\Price $price */ $price = $product->getPriceModel(); - $selectionPrice = $price->getSelectionFinalTotalPrice( + return $price->getSelectionFinalTotalPrice( $product, $selectionProduct, $item->getQty(), @@ -112,8 +120,6 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod false, true ); - - return $this->catalogHelper->getTaxPrice($selectionProduct, $selectionPrice); } /** @@ -162,12 +168,25 @@ public function getBundleOptions(ItemInterface $item) foreach ($bundleSelections as $bundleSelection) { $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1; if ($qty) { + $selectionPrice = $this->getSelectionFinalPrice($item, $bundleSelection); + $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item, $selectionPrice); + + $displayBothPrices = $this->taxHelper->displayBothPrices(); + if ($displayBothPrices) { + $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item, $selectionPrice, true); + $selectionFinalPriceExclTax = $this->catalogHelper->getTaxPrice($item, $selectionPrice, false); + } $option['value'][] = $qty . ' x ' . $this->escaper->escapeHtml($bundleSelection->getName()) . ' ' . $this->pricingHelper->currency( - $this->getSelectionFinalPrice($item, $bundleSelection) - ); + $selectionFinalPrice + ) + . ' ' + . ($displayBothPrices ? __('Excl. tax:') . ' ' + . $this->pricingHelper->currency( + $selectionFinalPriceExclTax + ) : ''); $option['has_html'] = true; } } diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index fab812c50ff64..f1ac522b9c806 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -62,6 +62,11 @@ class ConfigurationTest extends TestCase */ private $catalogHelper; + /** + * @var \Magento\Tax\Helper\Data|MockObject + */ + private $taxHelper; + /** * @inheritDoc */ @@ -78,6 +83,7 @@ protected function setUp(): void ->onlyMethods(['unserialize']) ->getMockForAbstractClass(); $this->catalogHelper = $this->createPartialMock(\Magento\Catalog\Helper\Data::class, ['getTaxPrice']); + $this->taxHelper = $this->createPartialMock(\Magento\Tax\Helper\Data::class, ['displayBothPrices']); $this->serializer->expects($this->any()) ->method('unserialize') @@ -94,7 +100,8 @@ function ($value) { 'productConfiguration' => $this->productConfiguration, 'escaper' => $this->escaper, 'serializer' => $this->serializer, - 'catalogHelper' => $this->catalogHelper + 'catalogHelper' => $this->catalogHelper, + 'taxHelper' => $this->taxHelper ] ); } @@ -271,7 +278,11 @@ public function testGetOptions(): void ->willReturn('name'); $this->catalogHelper->expects($this->any()) ->method('getTaxPrice') + ->with($itemOption, 15) ->willReturn(15); + $this->taxHelper->expects($this->any()) + ->method('displayBothPrices') + ->willReturn(false); $this->pricingHelper->expects($this->once())->method('currency')->with(15) ->willReturn('<span class="price">$15.00</span>'); $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15); From c00df9b3bc1e8b069f81b3985f984d6e8979706f Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 25 Jan 2023 20:40:33 +0530 Subject: [PATCH 611/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- ...tPriceWhenChildProductPriceUpdatedTest.xml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest.xml diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest.xml new file mode 100644 index 0000000000000..beec1f98b8702 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest" extends="AdminCheckConfigurableProductPriceWhenChildProductPriceUpdatedTest"> + <annotations> + <stories value="Configurable Product"/> + <title value="Page Cache is not cleared for the parent product on the child product save"/> + <description value="Verify the updated price of a configurable child product on the storefront when the indexer mode is set to `Update by Schedule` and the price of the child product is updated by admin."/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7815"/> + <useCaseId value="ACP2E-1524"/> + <group value="product"/> + </annotations> + + <remove keyForRemoval="updateSimpleProductOne"/> + <actionGroup ref="AdminFillProductPriceFieldAndPressEnterOnProductEditPageActionGroup" stepKey="fillProductPrice" after="waitForProductPageToLoad"> + <argument name="price" value="{{SimpleProductUpdatePrice90.price}}"/> + </actionGroup> + <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton" after="fillProductPrice"/> + + <remove keyForRemoval="index"/> + <remove keyForRemoval="flushCache"/> + <remove keyForRemoval="waitForUpdateStarts"/> + + <!--Select product Attribute option1 and verify changes in the price --> + <remove keyForRemoval="seeChildProduct1PriceInStoreFrontAfterUpdate"/> + <actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeChildProduct1PriceInStoreFrontAfterUpdate" after="selectOption1AfterUpdate"> + <argument name="productPrice" value="{{SimpleProductUpdatePrice90.price}}"/> + </actionGroup> + + <!--Select product Attribute option2 and verify no changes in the price --> + <actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption2AfterUpdate" after="seeChildProduct1PriceInStoreFrontAfterUpdate"> + <argument name="attributeLabel" value="$$createConfigProductAttribute.default_value$$"/> + <argument name="optionLabel" value="$$getConfigAttributeOption2.label$$"/> + </actionGroup> + <actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeChildProduct2PriceInStoreFrontAfterUpdate" after="selectOption2AfterUpdate"> + <argument name="productPrice" value="$$createConfigChildProduct2.price$$"/> + </actionGroup> + </test> +</tests> From 803831513b38496c6bc97eda38d36f337086d7b5 Mon Sep 17 00:00:00 2001 From: Arnob Saha <arnobsh@gmail.com> Date: Wed, 21 Dec 2022 15:30:40 -0600 Subject: [PATCH 612/985] ACP2E-1374: Edit Product - Admin user having website scope cannot change website level product attribute with scope "All store views" - with test --- .../Attribute/ConditionBuilder.php | 31 +- .../Attribute/ConditionBuilderTest.php | 419 +++++++++++++----- 2 files changed, 329 insertions(+), 121 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Attribute/ConditionBuilder.php b/app/code/Magento/Catalog/Model/ResourceModel/Attribute/ConditionBuilder.php index d6bc3ed1d86dc..30b0c4315bc33 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Attribute/ConditionBuilder.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Attribute/ConditionBuilder.php @@ -8,10 +8,10 @@ use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; use Magento\Framework\EntityManager\EntityMetadataInterface; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; -use Magento\Catalog\Model\ResourceModel\Eav\Attribute as CatalogEavAttribute; use Magento\Store\Model\Website; use Magento\Framework\Model\Entity\ScopeInterface; @@ -19,7 +19,6 @@ * Builds scope-related conditions for catalog attributes * * Class ConditionBuilder - * @package Magento\Catalog\Model\ResourceModel\Attribute */ class ConditionBuilder { @@ -45,6 +44,7 @@ public function __construct(StoreManagerInterface $storeManager) * @param ScopeInterface[] $scopes * @param string $linkFieldValue * @return array + * @throws NoSuchEntityException */ public function buildExistingAttributeWebsiteScope( AbstractAttribute $attribute, @@ -56,7 +56,7 @@ public function buildExistingAttributeWebsiteScope( if (!$website) { return []; } - $storeIds = $website->getStoreIds(); + $storeIds = $this->getStoreIds($website); $condition = [ $metadata->getLinkField() . ' = ?' => $linkFieldValue, @@ -81,6 +81,7 @@ public function buildExistingAttributeWebsiteScope( * @param ScopeInterface[] $scopes * @param string $linkFieldValue * @return array + * @throws NoSuchEntityException */ public function buildNewAttributesWebsiteScope( AbstractAttribute $attribute, @@ -92,7 +93,7 @@ public function buildNewAttributesWebsiteScope( if (!$website) { return []; } - $storeIds = $website->getStoreIds(); + $storeIds = $this->getStoreIds($website); $condition = [ $metadata->getLinkField() => $linkFieldValue, @@ -109,8 +110,11 @@ public function buildNewAttributesWebsiteScope( } /** + * Get website for website scope + * * @param array $scopes * @return null|Website + * @throws NoSuchEntityException */ private function getWebsiteForWebsiteScope(array $scopes) { @@ -119,8 +123,11 @@ private function getWebsiteForWebsiteScope(array $scopes) } /** + * Get store from scopes + * * @param ScopeInterface[] $scopes * @return StoreInterface|null + * @throws NoSuchEntityException */ private function getStoreFromScopes(array $scopes) { @@ -132,4 +139,20 @@ private function getStoreFromScopes(array $scopes) return null; } + + /** + * Get storeIds from the website + * + * @param Website $website + * @return array + */ + private function getStoreIds(Website $website): array + { + $storeIds = $website->getStoreIds(); + + if (empty($storeIds) && $website->getCode() === Website::ADMIN_CODE) { + $storeIds[] = Store::DEFAULT_STORE_ID; + } + return $storeIds; + } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Attribute/ConditionBuilderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Attribute/ConditionBuilderTest.php index 518830ee6745f..99b322ef63079 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Attribute/ConditionBuilderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Attribute/ConditionBuilderTest.php @@ -17,10 +17,12 @@ use Magento\Framework\DB\Adapter\Pdo\Mysql; use Magento\Framework\EntityManager\EntityMetadata; use Magento\Framework\EntityManager\EntityMetadataInterface; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Model\Entity\ScopeInterface; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManager; +use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Model\Website; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -30,31 +32,45 @@ */ class ConditionBuilderTest extends TestCase { + /** + * @var StoreManagerInterface|MockObject + */ + private $storeManagerMock; + + /** + * @var ConditionBuilder + */ + private $model; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->storeManagerMock = $this->getMockBuilder(StoreManager::class) + ->disableOriginalConstructor() + ->onlyMethods(['getStore']) + ->getMock(); + $this->model = new ConditionBuilder($this->storeManagerMock); + } + /** * @param AbstractAttribute $attribute * @param EntityMetadataInterface $metadata * @param array $scopes * @param string $linkFieldValue - * + * @throws NoSuchEntityException * @dataProvider buildExistingAttributeWebsiteScopeInappropriateAttributeDataProvider */ public function testBuildExistingAttributeWebsiteScopeInappropriateAttribute( - AbstractAttribute $attribute, + AbstractAttribute $attribute, EntityMetadataInterface $metadata, - array $scopes, - $linkFieldValue + array $scopes, + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getStore', - ]) - ->getMock(); - $storeManager->expects($this->never()) + $this->storeManagerMock->expects($this->never()) ->method('getStore'); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildExistingAttributeWebsiteScope( + $result = $this->model->buildExistingAttributeWebsiteScope( $attribute, $metadata, $scopes, @@ -79,14 +95,14 @@ public function buildExistingAttributeWebsiteScopeInappropriateAttributeDataProv $scopes = []; - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ $attribute, $metadata, $scopes, - $linkFieldValue, + $linkFieldValue ], ]; } @@ -95,27 +111,19 @@ public function buildExistingAttributeWebsiteScopeInappropriateAttributeDataProv * @param AbstractAttribute $attribute * @param EntityMetadataInterface $metadata * @param array $scopes - * @param $linkFieldValue - * + * @param string $linkFieldValue + * @throws NoSuchEntityException * @dataProvider buildExistingAttributeWebsiteScopeStoreScopeNotFoundDataProvider */ public function testBuildExistingAttributeWebsiteScopeStoreScopeNotFound( AbstractAttribute $attribute, EntityMetadataInterface $metadata, array $scopes, - $linkFieldValue + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getStore', - ]) - ->getMock(); - $storeManager->expects($this->never()) + $this->storeManagerMock->expects($this->any()) ->method('getStore'); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildExistingAttributeWebsiteScope( + $result = $this->model->buildExistingAttributeWebsiteScope( $attribute, $metadata, $scopes, @@ -132,7 +140,7 @@ public function buildExistingAttributeWebsiteScopeStoreScopeNotFoundDataProvider { $attribute = $this->getMockBuilder(CatalogEavAttribute::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'isScopeWebsite', ]) ->getMock(); @@ -149,14 +157,14 @@ public function buildExistingAttributeWebsiteScopeStoreScopeNotFoundDataProvider $scopes = []; - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ $attribute, $metadata, $scopes, - $linkFieldValue, + $linkFieldValue ], ]; } @@ -166,8 +174,8 @@ public function buildExistingAttributeWebsiteScopeStoreScopeNotFoundDataProvider * @param EntityMetadataInterface $metadata * @param StoreInterface $store * @param array $scopes - * @param $linkFieldValue - * + * @param string $linkFieldValue + * @throws NoSuchEntityException * @dataProvider buildExistingAttributeWebsiteScopeStoreWebsiteNotFoundDataProvider */ public function testBuildExistingAttributeWebsiteScopeStoreWebsiteNotFound( @@ -175,22 +183,14 @@ public function testBuildExistingAttributeWebsiteScopeStoreWebsiteNotFound( EntityMetadataInterface $metadata, StoreInterface $store, array $scopes, - $linkFieldValue + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getStore', - ]) - ->getMock(); - $storeManager->expects($this->once()) + $this->storeManagerMock->expects($this->any()) ->method('getStore') ->willReturn( $store ); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildExistingAttributeWebsiteScope( + $result = $this->model->buildExistingAttributeWebsiteScope( $attribute, $metadata, $scopes, @@ -207,7 +207,7 @@ public function buildExistingAttributeWebsiteScopeStoreWebsiteNotFoundDataProvid { $attribute = $this->getMockBuilder(CatalogEavAttribute::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'isScopeWebsite', ]) ->getMock(); @@ -223,18 +223,18 @@ public function buildExistingAttributeWebsiteScopeStoreWebsiteNotFoundDataProvid $scope = $this->getMockBuilder(ScopeInterface::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getIdentifier', 'getValue', 'getFallback', ]) ->getMockForAbstractClass(); - $scope->expects($this->once()) + $scope->expects($this->any()) ->method('getIdentifier') ->willReturn( Store::STORE_ID ); - $scope->expects($this->once()) + $scope->expects($this->any()) ->method('getValue') ->willReturn( 1 @@ -245,17 +245,17 @@ public function buildExistingAttributeWebsiteScopeStoreWebsiteNotFoundDataProvid $store = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getWebsite', ]) ->getMock(); - $store->expects($this->once()) + $store->expects($this->any()) ->method('getWebsite') ->willReturn( false ); - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ @@ -263,43 +263,154 @@ public function buildExistingAttributeWebsiteScopeStoreWebsiteNotFoundDataProvid $metadata, $store, $scopes, - $linkFieldValue, + $linkFieldValue ], ]; } /** + * Test case for build existing attribute when website scope store with storeIds empty + * * @param AbstractAttribute $attribute * @param EntityMetadataInterface $metadata * @param StoreInterface $store * @param array $scopes * @param array $expectedConditions - * @param $linkFieldValue - * - * @dataProvider buildExistingAttributeWebsiteScopeSuccessDataProvider + * @param string $linkFieldValue + * @throws NoSuchEntityException + * @dataProvider buildExistingAttributeWebsiteScopeStoreWithStoreIdsEmpty */ - public function testBuildExistingAttributeWebsiteScopeSuccess( + public function testBuildExistingAttributeWebsiteScopeStoreWithStoreIdsEmpty( AbstractAttribute $attribute, EntityMetadataInterface $metadata, StoreInterface $store, array $scopes, array $expectedConditions, - $linkFieldValue + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) + $this->storeManagerMock->expects($this->any()) + ->method('getStore') + ->willReturn($store); + $result = $this->model->buildExistingAttributeWebsiteScope( + $attribute, + $metadata, + $scopes, + $linkFieldValue + ); + + $this->assertEquals($expectedConditions, $result); + } + + /** + * Data provider for attribute website scope store with storeIds empty + * + * @return array + */ + public function buildExistingAttributeWebsiteScopeStoreWithStoreIdsEmpty(): array + { + $attribute = $this->getValidAttributeMock(); + $scope = $this->getMockBuilder(ScopeInterface::class) ->disableOriginalConstructor() - ->setMethods([ - 'getStore', + ->onlyMethods([ + 'getIdentifier', + 'getValue', + 'getFallback', ]) + ->getMockForAbstractClass(); + $website = $this->getMockBuilder(Website::class) + ->disableOriginalConstructor() + ->onlyMethods(['getStoreIds', 'getCode']) ->getMock(); - $storeManager->expects($this->once()) + $website->expects($this->any()) + ->method('getStoreIds') + ->willReturn([]); + $website->expects($this->any()) + ->method('getCode') + ->willReturn(Website::ADMIN_CODE); + $scope->expects($this->any()) + ->method('getIdentifier') + ->willReturn(Store::STORE_ID); + $scope->expects($this->any()) + ->method('getValue') + ->willReturn(1); + $dbAdapater = $this->getMockBuilder(Mysql::class) + ->disableOriginalConstructor() + ->onlyMethods(['quoteIdentifier']) + ->getMock(); + $dbAdapater->expects($this->exactly(3)) + ->method('quoteIdentifier') + ->willReturnCallback( + function ($input) { + return sprintf('`%s`', $input); + } + ); + $metadata = $this->getMockBuilder(EntityMetadata::class) + ->disableOriginalConstructor() + ->onlyMethods([ + 'getLinkField', + 'getEntityConnection', + ]) + ->getMock(); + $metadata->expects($this->any()) + ->method('getLinkField') + ->willReturn('entity_id'); + $metadata->expects($this->any()) + ->method('getEntityConnection') + ->willReturn($dbAdapater); + $scopes = [$scope]; + + $store = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->onlyMethods(['getWebsite']) + ->getMock(); + $store->expects($this->any()) + ->method('getWebsite') + ->willReturn($website); + + $linkFieldValue = '5'; + $expectedConditions = [ + [ + 'entity_id = ?' => $linkFieldValue, + 'attribute_id = ?' => 12, + '`store_id` = ?' => Store::DEFAULT_STORE_ID, + ] + ]; + return [ + [ + $attribute, + $metadata, + $store, + $scopes, + $expectedConditions, + $linkFieldValue + ], + ]; + } + + /** + * @param AbstractAttribute $attribute + * @param EntityMetadataInterface $metadata + * @param StoreInterface $store + * @param array $scopes + * @param array $expectedConditions + * @param string $linkFieldValue + * @throws NoSuchEntityException + * @dataProvider buildExistingAttributeWebsiteScopeSuccessDataProvider + */ + public function testBuildExistingAttributeWebsiteScopeSuccess( + AbstractAttribute $attribute, + EntityMetadataInterface $metadata, + StoreInterface $store, + array $scopes, + array $expectedConditions, + string $linkFieldValue + ) { + $this->storeManagerMock->expects($this->any()) ->method('getStore') ->willReturn( $store ); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildExistingAttributeWebsiteScope( + $result = $this->model->buildExistingAttributeWebsiteScope( $attribute, $metadata, $scopes, @@ -318,7 +429,7 @@ public function buildExistingAttributeWebsiteScopeSuccessDataProvider() $dbAdapater = $this->getMockBuilder(Mysql::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'quoteIdentifier', ]) ->getMock(); @@ -332,12 +443,12 @@ function ($input) { $metadata = $this->getMockBuilder(EntityMetadata::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getLinkField', 'getEntityConnection', ]) ->getMock(); - $metadata->expects($this->once()) + $metadata->expects($this->any()) ->method('getLinkField') ->willReturn( 'entity_id' @@ -372,7 +483,7 @@ function ($input) { ], ]; - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ @@ -381,7 +492,7 @@ function ($input) { $store, $scopes, $expectedConditions, - $linkFieldValue, + $linkFieldValue ], ]; } @@ -391,26 +502,18 @@ function ($input) { * @param EntityMetadataInterface $metadata * @param array $scopes * @param string $linkFieldValue - * + * @throws NoSuchEntityException * @dataProvider buildNewAttributeWebsiteScopeUnappropriateAttributeDataProvider */ public function testBuildNewAttributeWebsiteScopeUnappropriateAttribute( AbstractAttribute $attribute, EntityMetadataInterface $metadata, array $scopes, - $linkFieldValue + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getStore', - ]) - ->getMock(); - $storeManager->expects($this->never()) + $this->storeManagerMock->expects($this->never()) ->method('getStore'); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildNewAttributesWebsiteScope( + $result = $this->model->buildNewAttributesWebsiteScope( $attribute, $metadata, $scopes, @@ -435,14 +538,14 @@ public function buildNewAttributeWebsiteScopeUnappropriateAttributeDataProvider( $scopes = []; - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ $attribute, $metadata, $scopes, - $linkFieldValue, + $linkFieldValue ], ]; } @@ -453,8 +556,8 @@ public function buildNewAttributeWebsiteScopeUnappropriateAttributeDataProvider( * @param StoreInterface $store * @param array $scopes * @param array $expectedConditions - * @param $linkFieldValue - * + * @param string $linkFieldValue + * @throws NoSuchEntityException * @dataProvider buildNewAttributeWebsiteScopeSuccessDataProvider */ public function testBuildNewAttributeWebsiteScopeSuccess( @@ -463,22 +566,12 @@ public function testBuildNewAttributeWebsiteScopeSuccess( StoreInterface $store, array $scopes, array $expectedConditions, - $linkFieldValue + string $linkFieldValue ) { - $storeManager = $this->getMockBuilder(StoreManager::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getStore', - ]) - ->getMock(); - $storeManager->expects($this->once()) + $this->storeManagerMock->expects($this->any()) ->method('getStore') - ->willReturn( - $store - ); - - $conditionsBuilder = new ConditionBuilder($storeManager); - $result = $conditionsBuilder->buildNewAttributesWebsiteScope( + ->willReturn($store); + $result = $this->model->buildNewAttributesWebsiteScope( $attribute, $metadata, $scopes, @@ -497,15 +590,13 @@ public function buildNewAttributeWebsiteScopeSuccessDataProvider() $metadata = $this->getMockBuilder(EntityMetadata::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getLinkField', ]) ->getMock(); $metadata->expects($this->once()) ->method('getLinkField') - ->willReturn( - 'entity_id' - ); + ->willReturn('entity_id'); $scopes = [ $this->getValidScopeMock(), @@ -531,7 +622,7 @@ public function buildNewAttributeWebsiteScopeSuccessDataProvider() ], ]; - $linkFieldValue = 5; + $linkFieldValue = '5'; return [ [ @@ -540,7 +631,103 @@ public function buildNewAttributeWebsiteScopeSuccessDataProvider() $store, $scopes, $expectedConditions, - $linkFieldValue, + $linkFieldValue + ], + ]; + } + + /** + * Test case for build new website attribute when website scope store with storeIds empty + * + * @param AbstractAttribute $attribute + * @param EntityMetadataInterface $metadata + * @param StoreInterface $store + * @param array $scopes + * @param array $expectedConditions + * @param string $linkFieldValue + * @throws NoSuchEntityException + * @dataProvider buildNewAttributeWebsiteScopeStoreWithStoreIdsEmptyDataProvider + */ + public function testBuildNewAttributeWebsiteScopeStoreWithStoreIdsEmpty( + AbstractAttribute $attribute, + EntityMetadataInterface $metadata, + StoreInterface $store, + array $scopes, + array $expectedConditions, + string $linkFieldValue + ) { + $this->storeManagerMock->expects($this->any()) + ->method('getStore') + ->willReturn($store); + $result = $this->model->buildNewAttributesWebsiteScope( + $attribute, + $metadata, + $scopes, + $linkFieldValue + ); + + $this->assertEquals($expectedConditions, $result); + } + + /** + * Data provider for build new website attribute when website scope store with storeIds empty + * + * @return array + */ + public function buildNewAttributeWebsiteScopeStoreWithStoreIdsEmptyDataProvider() + { + $attribute = $this->getValidAttributeMock(); + + $metadata = $this->getMockBuilder(EntityMetadata::class) + ->disableOriginalConstructor() + ->onlyMethods(['getLinkField']) + ->getMock(); + $metadata->expects($this->once()) + ->method('getLinkField') + ->willReturn('entity_id'); + $website = $this->getMockBuilder(Website::class) + ->disableOriginalConstructor() + ->onlyMethods(['getStoreIds', 'getCode']) + ->getMock(); + $website->expects($this->any()) + ->method('getStoreIds') + ->willReturn([]); + $website->expects($this->any()) + ->method('getCode') + ->willReturn(Website::ADMIN_CODE); + $scopes = [ + $this->getValidScopeMock(), + ]; + + $store = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->onlyMethods([ + 'getWebsite', + ]) + ->getMock(); + $store->expects($this->any()) + ->method('getWebsite') + ->willReturn( + $website + ); + + $linkFieldValue = '5'; + $expectedConditions = [ + [ + 'entity_id' => $linkFieldValue, + 'attribute_id' => 12, + 'store_id' => Store::DEFAULT_STORE_ID, + ] + ]; + + return [ + [ + $attribute, + $metadata, + $store, + $scopes, + $expectedConditions, + $linkFieldValue ], ]; } @@ -552,7 +739,7 @@ private function getValidAttributeMock() { $attribute = $this->getMockBuilder(CatalogEavAttribute::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'isScopeWebsite', 'getAttributeId', ]) @@ -578,11 +765,11 @@ private function getValidStoreMock() { $website = $this->getMockBuilder(Website::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getStoreIds', ]) ->getMock(); - $website->expects($this->once()) + $website->expects($this->any()) ->method('getStoreIds') ->willReturn( [ @@ -594,11 +781,11 @@ private function getValidStoreMock() $store = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getWebsite', ]) ->getMock(); - $store->expects($this->once()) + $store->expects($this->any()) ->method('getWebsite') ->willReturn( $website @@ -614,22 +801,20 @@ private function getValidScopeMock() { $scope = $this->getMockBuilder(ScopeInterface::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'getIdentifier', 'getValue', 'getFallback', ]) ->getMockForAbstractClass(); - $scope->expects($this->once()) + $scope->expects($this->any()) ->method('getIdentifier') ->willReturn( Store::STORE_ID ); - $scope->expects($this->once()) + $scope->expects($this->any()) ->method('getValue') - ->willReturn( - 1 - ); + ->willReturn(1); return $scope; } From d8528b2a606ce3c89ff46f3dff88cc82442d08d6 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 25 Jan 2023 19:56:28 +0200 Subject: [PATCH 613/985] ACP2E-1456: fix static and unit tests errors --- .../Helper/Catalog/Product/Configuration.php | 68 ++++++++++++------- .../Catalog/Product/ConfigurationTest.php | 5 +- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index bee1051d5d1f1..600d0f32b0da1 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -5,6 +5,7 @@ */ namespace Magento\Bundle\Helper\Catalog\Product; +use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; use Magento\Framework\App\Helper\AbstractHelper; @@ -130,7 +131,6 @@ public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Mod * * @param ItemInterface $item * @return array - * phpcs:disable Generic.Metrics.NestingLevel */ public function getBundleOptions(ItemInterface $item) { @@ -166,29 +166,7 @@ public function getBundleOptions(ItemInterface $item) $bundleSelections = $bundleOption->getSelections(); foreach ($bundleSelections as $bundleSelection) { - $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1; - if ($qty) { - $selectionPrice = $this->getSelectionFinalPrice($item, $bundleSelection); - $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item, $selectionPrice); - - $displayBothPrices = $this->taxHelper->displayBothPrices(); - if ($displayBothPrices) { - $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item, $selectionPrice, true); - $selectionFinalPriceExclTax = $this->catalogHelper->getTaxPrice($item, $selectionPrice, false); - } - $option['value'][] = $qty . ' x ' - . $this->escaper->escapeHtml($bundleSelection->getName()) - . ' ' - . $this->pricingHelper->currency( - $selectionFinalPrice - ) - . ' ' - . ($displayBothPrices ? __('Excl. tax:') . ' ' - . $this->pricingHelper->currency( - $selectionFinalPriceExclTax - ) : ''); - $option['has_html'] = true; - } + $option = $this->getOptionPriceHtml($item, $bundleSelection, $option); } if ($option['value']) { @@ -201,7 +179,47 @@ public function getBundleOptions(ItemInterface $item) return $options; } - //phpcs:enable Generic.Metrics.NestingLevel + + /** + * Get bundle options' prices + * + * @param ItemInterface $item + * @param ProductInterface $bundleSelection + * @param array $option + * @return array + */ + private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundleSelection, array $option): array + { + $product = $item->getProduct(); + $qty = $this->getSelectionQty($item->getProduct(), $bundleSelection->getSelectionId()) * 1; + if ($qty) { + $selectionPrice = $this->getSelectionFinalPrice($item, $bundleSelection); + $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item->getProduct(), $selectionPrice); + + $displayBothPrices = $this->taxHelper->displayBothPrices(); + if ($displayBothPrices) { + $selectionFinalPrice = + $this->catalogHelper + ->getTaxPrice($product, $selectionPrice, true); + $selectionFinalPriceExclTax = + $this->catalogHelper + ->getTaxPrice($product, $selectionPrice, false); + } + $option['value'][] = $qty . ' x ' + . $this->escaper->escapeHtml($bundleSelection->getName()) + . ' ' + . $this->pricingHelper->currency( + $selectionFinalPrice + ) + . ' ' + . ($displayBothPrices ? __('Excl. tax:') . ' ' + . $this->pricingHelper->currency( + $selectionFinalPriceExclTax + ) : ''); + $option['has_html'] = true; + } + return $option; + } /** * Retrieves product options list diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index f1ac522b9c806..19f131286331e 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -163,8 +163,7 @@ public function testGetSelectionFinalPrice(): void $price->expects($this->once())->method('getSelectionFinalTotalPrice') ->with($product, $selectionProduct, $itemQty, 0, false, true); - $selectionPrice = $this->helper->getSelectionFinalPrice($this->item, $selectionProduct); - $this->catalogHelper->getTaxPrice($selectionProduct, $selectionPrice); + $this->helper->getSelectionFinalPrice($this->item, $selectionProduct); } /** @@ -278,7 +277,7 @@ public function testGetOptions(): void ->willReturn('name'); $this->catalogHelper->expects($this->any()) ->method('getTaxPrice') - ->with($itemOption, 15) + ->with($product, 15) ->willReturn(15); $this->taxHelper->expects($this->any()) ->method('displayBothPrices') From 5d71a165cc9e7f5b4d87512c875b50a2a7c6d8d3 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Wed, 25 Jan 2023 20:54:50 +0200 Subject: [PATCH 614/985] ACP2E-1456: display bundle options taking into account cart tax configurations --- .../Helper/Catalog/Product/Configuration.php | 82 +++--- .../Bundle/Helper/Catalog/Product/Tax.php | 275 ++++++++++++++++++ .../Catalog/Product/ConfigurationTest.php | 16 +- 3 files changed, 322 insertions(+), 51 deletions(-) create mode 100644 app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 600d0f32b0da1..df2a1b4cc7f54 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -5,11 +5,20 @@ */ namespace Magento\Bundle\Helper\Catalog\Product; +use Magento\Bundle\Model\Product\Price; +use Magento\Bundle\Model\Product\Type; use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; +use Magento\Catalog\Helper\Product\Configuration as ProductConfiguration; +use Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; use Magento\Framework\App\Helper\AbstractHelper; +use Magento\Framework\App\Helper\Context; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Escaper; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Pricing\Helper\Data; +use Magento\Framework\Serialize\Serializer\Json; /** * Helper for fetching properties by product configuration item @@ -21,75 +30,67 @@ class Configuration extends AbstractHelper implements ConfigurationInterface /** * Core data * - * @var \Magento\Framework\Pricing\Helper\Data + * @var Data */ protected $pricingHelper; /** * Catalog product configuration * - * @var \Magento\Catalog\Helper\Product\Configuration + * @var ProductConfiguration */ protected $productConfiguration; /** - * @var \Magento\Framework\Escaper + * @var Escaper */ protected $escaper; /** * Serializer interface instance. * - * @var \Magento\Framework\Serialize\Serializer\Json + * @var Json */ private $serializer; /** - * @var \Magento\Catalog\Helper\Data - */ - private $catalogHelper; - - /** - * @var \Magento\Tax\Helper\Data|mixed + * @var Tax */ private $taxHelper; /** - * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Catalog\Helper\Product\Configuration $productConfiguration - * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper - * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer - * @param \Magento\Catalog\Helper\Data|null $catalogHelper - * @param \Magento\Tax\Helper\Data|null $taxHelper + * @param Context $context + * @param ProductConfiguration $productConfiguration + * @param Data $pricingHelper + * @param Escaper $escaper + * @param Json|null $serializer + * @param Tax|null $taxHelper */ public function __construct( - \Magento\Framework\App\Helper\Context $context, - \Magento\Catalog\Helper\Product\Configuration $productConfiguration, - \Magento\Framework\Pricing\Helper\Data $pricingHelper, - \Magento\Framework\Escaper $escaper, - \Magento\Framework\Serialize\Serializer\Json $serializer = null, - \Magento\Catalog\Helper\Data $catalogHelper = null, - \Magento\Tax\Helper\Data $taxHelper = null + Context $context, + ProductConfiguration $productConfiguration, + Data $pricingHelper, + Escaper $escaper, + Json $serializer = null, + Tax $taxHelper = null ) { $this->productConfiguration = $productConfiguration; $this->pricingHelper = $pricingHelper; $this->escaper = $escaper; - $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(\Magento\Framework\Serialize\Serializer\Json::class); - $this->catalogHelper = $catalogHelper ?? ObjectManager::getInstance()->get(\Magento\Catalog\Helper\Data::class); - $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(\Magento\Tax\Helper\Data::class); + $this->serializer = $serializer ?: ObjectManager::getInstance() + ->get(Json::class); + $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(Tax::class); parent::__construct($context); } /** * Get selection quantity * - * @param \Magento\Catalog\Model\Product $product + * @param Product $product * @param int $selectionId * @return float */ - public function getSelectionQty(\Magento\Catalog\Model\Product $product, $selectionId) + public function getSelectionQty(Product $product, $selectionId) { $selectionQty = $product->getCustomOption('selection_qty_' . $selectionId); if ($selectionQty) { @@ -102,15 +103,15 @@ public function getSelectionQty(\Magento\Catalog\Model\Product $product, $select * Obtain final price of selection in a bundle product * * @param ItemInterface $item - * @param \Magento\Catalog\Model\Product $selectionProduct + * @param Product $selectionProduct * @return float */ - public function getSelectionFinalPrice(ItemInterface $item, \Magento\Catalog\Model\Product $selectionProduct) + public function getSelectionFinalPrice(ItemInterface $item, Product $selectionProduct) { $selectionProduct->unsetData('final_price'); $product = $item->getProduct(); - /** @var \Magento\Bundle\Model\Product\Price $price */ + /** @var Price $price */ $price = $product->getPriceModel(); return $price->getSelectionFinalTotalPrice( @@ -137,7 +138,7 @@ public function getBundleOptions(ItemInterface $item) $options = []; $product = $item->getProduct(); - /** @var \Magento\Bundle\Model\Product\Type $typeInstance */ + /** @var Type $typeInstance */ $typeInstance = $product->getTypeInstance(); // get bundle options @@ -187,6 +188,7 @@ public function getBundleOptions(ItemInterface $item) * @param ProductInterface $bundleSelection * @param array $option * @return array + * @throws LocalizedException */ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundleSelection, array $option): array { @@ -194,15 +196,15 @@ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundl $qty = $this->getSelectionQty($item->getProduct(), $bundleSelection->getSelectionId()) * 1; if ($qty) { $selectionPrice = $this->getSelectionFinalPrice($item, $bundleSelection); - $selectionFinalPrice = $this->catalogHelper->getTaxPrice($item->getProduct(), $selectionPrice); + $selectionFinalPrice = $this->taxHelper->getTaxPrice($item->getProduct(), $selectionPrice); - $displayBothPrices = $this->taxHelper->displayBothPrices(); - if ($displayBothPrices) { + $displayCartPricesBoth = $this->taxHelper->displayCartPricesBoth(); + if ($displayCartPricesBoth) { $selectionFinalPrice = - $this->catalogHelper + $this->taxHelper ->getTaxPrice($product, $selectionPrice, true); $selectionFinalPriceExclTax = - $this->catalogHelper + $this->taxHelper ->getTaxPrice($product, $selectionPrice, false); } $option['value'][] = $qty . ' x ' @@ -212,7 +214,7 @@ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundl $selectionFinalPrice ) . ' ' - . ($displayBothPrices ? __('Excl. tax:') . ' ' + . ($displayCartPricesBoth ? __('Excl. tax:') . ' ' . $this->pricingHelper->currency( $selectionFinalPriceExclTax ) : ''); diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php new file mode 100644 index 0000000000000..8aace0318ab32 --- /dev/null +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php @@ -0,0 +1,275 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Bundle\Helper\Catalog\Product; + +use Magento\Catalog\Api\CategoryRepositoryInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\AddressInterfaceFactory; +use Magento\Customer\Api\Data\RegionInterfaceFactory; +use Magento\Customer\Api\GroupRepositoryInterface; +use Magento\Customer\Model\Address\AbstractAddress; +use Magento\Customer\Model\Session as CustomerSession; +use Magento\Framework\App\Helper\AbstractHelper; +use Magento\Framework\App\Helper\Context; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Pricing\PriceCurrencyInterface; +use Magento\Store\Api\Data\StoreInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory; +use Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory; +use Magento\Tax\Api\Data\TaxClassKeyInterface; +use Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory; +use Magento\Tax\Api\TaxCalculationInterface; +use Magento\Tax\Model\Config; + +class Tax extends AbstractHelper +{ + /** + * @var StoreManagerInterface + */ + protected $storeManager; + + /** + * @var TaxClassKeyInterfaceFactory + */ + protected $taxClassKeyFactory; + + /** + * @var Config + */ + protected $taxConfig; + + /** + * @var QuoteDetailsInterfaceFactory + */ + protected $quoteDetailsFactory; + + /** + * @var QuoteDetailsItemInterfaceFactory + */ + protected $quoteDetailsItemFactory; + + /** + * @var CustomerSession + */ + protected $customerSession; + + /** + * @var TaxCalculationInterface + */ + protected $taxCalculationService; + + /** + * @var PriceCurrencyInterface + */ + protected $priceCurrency; + + /** + * @var ProductRepositoryInterface + */ + protected $productRepository; + + /** + * @var CategoryRepositoryInterface + */ + protected $categoryRepository; + + /** + * @var GroupRepositoryInterface + */ + protected $customerGroupRepository; + + /** + * @var AddressInterfaceFactory + */ + protected $addressFactory; + + /** + * @var RegionInterfaceFactory + */ + protected $regionFactory; + + /** + * @param Context $context + * @param StoreManagerInterface $storeManager + * @param TaxClassKeyInterfaceFactory $taxClassKeyFactory + * @param Config $taxConfig + * @param QuoteDetailsInterfaceFactory $quoteDetailsFactory + * @param QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory + * @param TaxCalculationInterface $taxCalculationService + * @param CustomerSession $customerSession + * @param PriceCurrencyInterface $priceCurrency + * @param GroupRepositoryInterface $customerGroupRepository + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Context $context, + StoreManagerInterface $storeManager, + TaxClassKeyInterfaceFactory $taxClassKeyFactory, + Config $taxConfig, + QuoteDetailsInterfaceFactory $quoteDetailsFactory, + QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory, + TaxCalculationInterface $taxCalculationService, + CustomerSession $customerSession, + PriceCurrencyInterface $priceCurrency, + GroupRepositoryInterface $customerGroupRepository + ) { + $this->storeManager = $storeManager; + $this->taxClassKeyFactory = $taxClassKeyFactory; + $this->taxConfig = $taxConfig; + $this->quoteDetailsFactory = $quoteDetailsFactory; + $this->quoteDetailsItemFactory = $quoteDetailsItemFactory; + $this->taxCalculationService = $taxCalculationService; + $this->customerSession = $customerSession; + $this->priceCurrency = $priceCurrency; + $this->customerGroupRepository = $customerGroupRepository; + parent::__construct($context); + } + + /** + * Get product price with all tax settings processing for cart + * + * @param Product $product + * @param float $price + * @param bool|null $includingTax + * @param AbstractAddress|null $shippingAddress + * @param AbstractAddress|null $billingAddress + * @param int|null $ctc + * @param Store|bool|int|string|null $store + * @param bool|null $priceIncludesTax + * @param bool $roundPrice + * @return float + * @throws LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + public function getTaxPrice( + Product $product, + float $price, + bool $includingTax = null, + AbstractAddress $shippingAddress = null, + AbstractAddress $billingAddress = null, + int $ctc = null, + Store|bool|int|string $store = null, + bool $priceIncludesTax = null, + bool $roundPrice = true + ): float { + if (!$price) { + return $price; + } + + $store = $this->storeManager->getStore($store); + if ($priceIncludesTax === null) { + $priceIncludesTax = $this->taxConfig->priceIncludesTax($store); + } + + $shippingAddressDataObject = null; + if ($shippingAddress === null) { + $shippingAddressDataObject = + $this->convertDefaultTaxAddress($this->customerSession->getDefaultTaxShippingAddress()); + } elseif ($shippingAddress instanceof AbstractAddress) { + $shippingAddressDataObject = $shippingAddress->getDataModel(); + } + + $billingAddressDataObject = null; + if ($billingAddress === null) { + $billingAddressDataObject = + $this->convertDefaultTaxAddress($this->customerSession->getDefaultTaxBillingAddress()); + } elseif ($billingAddress instanceof AbstractAddress) { + $billingAddressDataObject = $billingAddress->getDataModel(); + } + + $taxClassKey = $this->taxClassKeyFactory->create(); + $taxClassKey->setType(TaxClassKeyInterface::TYPE_ID) + ->setValue($product->getTaxClassId()); + + if ($ctc === null && $this->customerSession->getCustomerGroupId() != null) { + $ctc = $this->customerGroupRepository->getById($this->customerSession->getCustomerGroupId()) + ->getTaxClassId(); + } + + $customerTaxClassKey = $this->taxClassKeyFactory->create(); + $customerTaxClassKey->setType(TaxClassKeyInterface::TYPE_ID) + ->setValue($ctc); + + $item = $this->quoteDetailsItemFactory->create(); + $item->setQuantity(1) + ->setCode($product->getSku()) + ->setShortDescription($product->getShortDescription()) + ->setTaxClassKey($taxClassKey) + ->setIsTaxIncluded($priceIncludesTax) + ->setType('product') + ->setUnitPrice($price); + + $quoteDetails = $this->quoteDetailsFactory->create(); + $quoteDetails->setShippingAddress($shippingAddressDataObject) + ->setBillingAddress($billingAddressDataObject) + ->setCustomerTaxClassKey($customerTaxClassKey) + ->setItems([$item]) + ->setCustomerId($this->customerSession->getCustomerId()); + + $storeId = null; + $storeId = $store?->getId(); + $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails, $storeId, $roundPrice); + $items = $taxDetails->getItems(); + $taxDetailsItem = array_shift($items); + + if ($includingTax !== null) { + if ($includingTax) { + $price = $taxDetailsItem->getPriceInclTax(); + } else { + $price = $taxDetailsItem->getPrice(); + } + } else { + $price = $this->taxConfig->displayCartPricesExclTax($store) || + $this->taxConfig->displayCartPricesBoth($store) ? + $taxDetailsItem->getPrice() : $taxDetailsItem->getPriceInclTax(); + } + + if ($roundPrice) { + return $this->priceCurrency->round($price); + } else { + return $price; + } + } + + /** + * Check if both cart prices are shown + * + * @param StoreInterface|null $store + * @return bool + */ + public function displayCartPricesBoth(StoreInterface $store = null): bool + { + return $this->taxConfig->displayCartPricesBoth($store); + } + + /** + * Convert tax address array to address data object with country id and postcode + * + * @param array|null $taxAddress + * @return AddressInterface|null + */ + private function convertDefaultTaxAddress(array $taxAddress = null) + { + if (empty($taxAddress)) { + return null; + } + /** @var AddressInterface $addressDataObject */ + $addressDataObject = $this->addressFactory->create() + ->setCountryId($taxAddress['country_id']) + ->setPostcode($taxAddress['postcode']); + + if (isset($taxAddress['region_id'])) { + $addressDataObject->setRegion($this->regionFactory->create()->setRegionId($taxAddress['region_id'])); + } + return $addressDataObject; + } +} diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index 19f131286331e..773959be79463 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -7,6 +7,7 @@ namespace Magento\Bundle\Test\Unit\Helper\Catalog\Product; +use Magento\Bundle\Helper\Catalog\Product\Tax; use Magento\Bundle\Model\Product\Price; use Magento\Bundle\Model\Product\Type; use Magento\Bundle\Model\ResourceModel\Option\Collection; @@ -58,12 +59,7 @@ class ConfigurationTest extends TestCase private $serializer; /** - * @var \Magento\Catalog\Helper\Data|MockObject - */ - private $catalogHelper; - - /** - * @var \Magento\Tax\Helper\Data|MockObject + * @var Tax|MockObject */ private $taxHelper; @@ -82,8 +78,7 @@ protected function setUp(): void $this->serializer = $this->getMockBuilder(Json::class) ->onlyMethods(['unserialize']) ->getMockForAbstractClass(); - $this->catalogHelper = $this->createPartialMock(\Magento\Catalog\Helper\Data::class, ['getTaxPrice']); - $this->taxHelper = $this->createPartialMock(\Magento\Tax\Helper\Data::class, ['displayBothPrices']); + $this->taxHelper = $this->createPartialMock(Tax::class, ['displayCartPricesBoth', 'getTaxPrice']); $this->serializer->expects($this->any()) ->method('unserialize') @@ -100,7 +95,6 @@ function ($value) { 'productConfiguration' => $this->productConfiguration, 'escaper' => $this->escaper, 'serializer' => $this->serializer, - 'catalogHelper' => $this->catalogHelper, 'taxHelper' => $this->taxHelper ] ); @@ -275,12 +269,12 @@ public function testGetOptions(): void ->method('escapeHtml') ->with('name') ->willReturn('name'); - $this->catalogHelper->expects($this->any()) + $this->taxHelper->expects($this->any()) ->method('getTaxPrice') ->with($product, 15) ->willReturn(15); $this->taxHelper->expects($this->any()) - ->method('displayBothPrices') + ->method('displayCartPricesBoth') ->willReturn(false); $this->pricingHelper->expects($this->once())->method('currency')->with(15) ->willReturn('<span class="price">$15.00</span>'); From bff4a697b3845e521fece65c48723f1842c6581e Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Wed, 25 Jan 2023 14:41:15 -0600 Subject: [PATCH 615/985] ACP2E-1499: Attributes weight didn't work in search keyword - fix --- .../Model/Search/Request/PartialSearchModifier.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Search/Request/PartialSearchModifier.php b/app/code/Magento/CatalogSearch/Model/Search/Request/PartialSearchModifier.php index 5a543b363c994..c06144d6aab95 100644 --- a/app/code/Magento/CatalogSearch/Model/Search/Request/PartialSearchModifier.php +++ b/app/code/Magento/CatalogSearch/Model/Search/Request/PartialSearchModifier.php @@ -41,8 +41,12 @@ public function modify(array $requests): array if ($matches) { foreach ($matches as $index => $match) { $field = $match['field'] ?? null; - if ($field && $field !== '*' && !isset($attributes[$field])) { - unset($matches[$index]); + if ($field && $field !== '*') { + if (!isset($attributes[$field])) { + unset($matches[$index]); + continue; + } + $matches[$index]['boost'] = $attributes[$field]->getSearchWeight() ?: 1; } } $requests[$code]['queries']['partial_search']['match'] = array_values($matches); From ab29fc011ee72041a8e14c4ba876674a1dd37c9e Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk <odubovyk@adobe.com> Date: Wed, 25 Jan 2023 14:41:32 -0600 Subject: [PATCH 616/985] ACP2E-1499: Attributes weight didn't work in search keyword - modify test --- .../Search/Request/PartialSearchModifierTest.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Request/PartialSearchModifierTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Request/PartialSearchModifierTest.php index 2fabec670a57e..3faab1dcd395d 100644 --- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Request/PartialSearchModifierTest.php +++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/Request/PartialSearchModifierTest.php @@ -55,10 +55,16 @@ protected function setUp(): void public function testModify(array $attributes, array $requests, array $expected): void { $items = []; + $searchWeight = 10; foreach ($attributes as $attribute) { - $item = $this->getMockForAbstractClass(\Magento\Eav\Api\Data\AttributeInterface::class); + $item = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class) + ->setMethods(['getAttributeCode', 'getSearchWeight']) + ->disableOriginalConstructor() + ->getMock(); $item->method('getAttributeCode') ->willReturn($attribute); + $item->method('getSearchWeight') + ->willReturn($searchWeight); $items[] = $item; } $reflectionProperty = new \ReflectionProperty($this->collection, '_items'); @@ -76,6 +82,7 @@ public function modifyDataProvider(): array [ [ 'name', + 'sku', ], [ 'search_1' => [ @@ -133,9 +140,15 @@ public function modifyDataProvider(): array [ 'field' => '*' ], + [ + 'field' => 'sku', + 'matchCondition' => 'match_phrase_prefix', + 'boost' => 10 + ], [ 'field' => 'name', 'matchCondition' => 'match_phrase_prefix', + 'boost' => 10 ], ] ] From b7fe1a61bb067b051626131a47050e582d5fd076 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Wed, 25 Jan 2023 15:57:47 -0600 Subject: [PATCH 617/985] ACP2E-1579: Catalog rule discount disappears after a product is saved from Admin --- .../CatalogRule/Model/Rule/Validation.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogRuleConfigurable/Plugin/CatalogRule/Model/Rule/Validation.php b/app/code/Magento/CatalogRuleConfigurable/Plugin/CatalogRule/Model/Rule/Validation.php index a4be621ad513e..87008a2f4ea29 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Plugin/CatalogRule/Model/Rule/Validation.php +++ b/app/code/Magento/CatalogRuleConfigurable/Plugin/CatalogRule/Model/Rule/Validation.php @@ -6,6 +6,7 @@ */ namespace Magento\CatalogRuleConfigurable\Plugin\CatalogRule\Model\Rule; +use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; use Magento\CatalogRule\Model\Rule; use Magento\Framework\DataObject; @@ -21,12 +22,19 @@ class Validation */ private $configurable; + /** + * @var ProductRepositoryInterface + */ + private $productRepository; + /** * @param Configurable $configurableType + * @param ProductRepositoryInterface $productRepository */ - public function __construct(Configurable $configurableType) + public function __construct(Configurable $configurableType, ProductRepositoryInterface $productRepository) { $this->configurable = $configurableType; + $this->productRepository = $productRepository; } /** @@ -41,7 +49,12 @@ public function afterValidate(Rule $rule, $validateResult, DataObject $product) { if (!$validateResult && ($configurableProducts = $this->configurable->getParentIdsByChild($product->getId()))) { foreach ($configurableProducts as $configurableProductId) { - $validateResult = $rule->getConditions()->validateByEntityId($configurableProductId); + $configurableProduct = $this->productRepository->getById( + $configurableProductId, + false, + $product->getStoreId() + ); + $validateResult = $rule->getConditions()->validate($configurableProduct); // If any of configurable product is valid for current rule, then their sub-product must be valid too if ($validateResult) { break; From 4c3bac44b180bd8363bee8b68beb86c86f1a2a1d Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 25 Jan 2023 16:11:16 -0600 Subject: [PATCH 618/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Model/Cache/Tag/Strategy/StoreConfig.php | 34 +++++++++++++++++++ .../Model/Resolver/Store/Identity.php | 9 ++--- app/code/Magento/StoreGraphQl/etc/di.xml | 16 +++++++++ 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php create mode 100644 app/code/Magento/StoreGraphQl/etc/di.xml diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php new file mode 100644 index 0000000000000..a3239644460c4 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\StoreGraphQl\Model\Cache\Tag\Strategy; + +use Magento\Config\App\Config\Type\System; +use Magento\Framework\App\Cache\Tag\StrategyInterface; +use Magento\Framework\App\Config\ValueInterface; + +/** + * Produce cache tags for store config. + */ +class StoreConfig implements StrategyInterface +{ + /** + * @inheritdoc + */ + public function getTags($object): array + { + if (!is_object($object)) { + throw new \InvalidArgumentException('Provided argument is not an object'); + } + + if ($object instanceof ValueInterface && $object->isValueChanged()) { + return [System::CACHE_TAG]; + } + + return []; + } +} diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php index 807c461972688..51599d43879aa 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php @@ -7,26 +7,23 @@ namespace Magento\StoreGraphQl\Model\Resolver\Store; +use Magento\Config\App\Config\Type\System; use Magento\Framework\GraphQl\Query\Resolver\IdentityInterface; -use Magento\Framework\App\Config; class Identity implements IdentityInterface { /** * @var string */ - private $cacheTag = Config::CACHE_TAG; + private $cacheTag = System::CACHE_TAG; /** * @inheritDoc */ public function getIdentities(array $resolvedData): array { - $data["id"] = empty($resolvedData) ? [] : $resolvedData["id"]; $ids = empty($resolvedData) ? - [] : array_merge([$this->cacheTag], array_map(function ($key) { - return sprintf('%s_%s', $this->cacheTag, $key); - }, $data)); + [] : [$this->cacheTag]; return $ids; } } diff --git a/app/code/Magento/StoreGraphQl/etc/di.xml b/app/code/Magento/StoreGraphQl/etc/di.xml new file mode 100644 index 0000000000000..92d22932388d9 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/etc/di.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> + <arguments> + <argument name="customStrategies" xsi:type="array"> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object">Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig</item> + </argument> + </arguments> + </type> +</config> From 73a8ee91b5983d57358f8df8ca1e48e84583e37f Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 25 Jan 2023 16:29:07 -0600 Subject: [PATCH 619/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Model/Cache/Tag/Strategy/StoreConfig.php | 4 ++-- .../Resolver/Store/{Identity.php => ConfigIdentity.php} | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) rename app/code/Magento/StoreGraphQl/Model/Resolver/Store/{Identity.php => ConfigIdentity.php} (63%) diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php index a3239644460c4..7e339c22d83d9 100644 --- a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php +++ b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php @@ -7,9 +7,9 @@ namespace Magento\StoreGraphQl\Model\Cache\Tag\Strategy; -use Magento\Config\App\Config\Type\System; use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; +use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; /** * Produce cache tags for store config. @@ -26,7 +26,7 @@ public function getTags($object): array } if ($object instanceof ValueInterface && $object->isValueChanged()) { - return [System::CACHE_TAG]; + return [ConfigIdentity::CACHE_TAG]; } return []; diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php similarity index 63% rename from app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php rename to app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php index 51599d43879aa..691ce7be8ad80 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/Identity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php @@ -7,23 +7,20 @@ namespace Magento\StoreGraphQl\Model\Resolver\Store; -use Magento\Config\App\Config\Type\System; use Magento\Framework\GraphQl\Query\Resolver\IdentityInterface; -class Identity implements IdentityInterface +class ConfigIdentity implements IdentityInterface { /** * @var string */ - private $cacheTag = System::CACHE_TAG; + const CACHE_TAG = 'gql_store_config'; /** * @inheritDoc */ public function getIdentities(array $resolvedData): array { - $ids = empty($resolvedData) ? - [] : [$this->cacheTag]; - return $ids; + return empty($resolvedData) ? [] : [self::CACHE_TAG]; } } From 098d593cfb11c6132398bac500dacf76a1f3f197 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Wed, 25 Jan 2023 20:21:25 -0600 Subject: [PATCH 620/985] ACP2E-1552: Customer Product Reviews filter by store id is not working --- .../Model/DataProvider/CustomerReviewsDataProvider.php | 5 +++-- .../ReviewGraphQl/Model/Resolver/Customer/Reviews.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/ReviewGraphQl/Model/DataProvider/CustomerReviewsDataProvider.php b/app/code/Magento/ReviewGraphQl/Model/DataProvider/CustomerReviewsDataProvider.php index 42adc8009c010..f25e32575c75c 100644 --- a/app/code/Magento/ReviewGraphQl/Model/DataProvider/CustomerReviewsDataProvider.php +++ b/app/code/Magento/ReviewGraphQl/Model/DataProvider/CustomerReviewsDataProvider.php @@ -36,10 +36,10 @@ public function __construct( * @param int $customerId * @param int $currentPage * @param int $pageSize - * + * @param int $storeId * @return ReviewsCollection */ - public function getData(int $customerId, int $currentPage, int $pageSize): ReviewsCollection + public function getData(int $customerId, int $currentPage, int $pageSize, int $storeId): ReviewsCollection { /** @var ReviewsCollection $reviewsCollection */ $reviewsCollection = $this->collectionFactory->create(); @@ -47,6 +47,7 @@ public function getData(int $customerId, int $currentPage, int $pageSize): Revie ->addCustomerFilter($customerId) ->setPageSize($pageSize) ->setCurPage($currentPage) + ->addStoreFilter($storeId) ->setDateOrder(); $reviewsCollection->getSelect()->join( ['cpe' => $reviewsCollection->getTable('catalog_product_entity')], diff --git a/app/code/Magento/ReviewGraphQl/Model/Resolver/Customer/Reviews.php b/app/code/Magento/ReviewGraphQl/Model/Resolver/Customer/Reviews.php index 8c0bca63f8efc..b177c915275ac 100644 --- a/app/code/Magento/ReviewGraphQl/Model/Resolver/Customer/Reviews.php +++ b/app/code/Magento/ReviewGraphQl/Model/Resolver/Customer/Reviews.php @@ -82,7 +82,8 @@ public function resolve( $reviewsCollection = $this->customerReviewsDataProvider->getData( (int) $context->getUserId(), $args['currentPage'], - $args['pageSize'] + $args['pageSize'], + (int) $context->getExtensionAttributes()->getStore()->getId() ); return $this->aggregatedReviewsDataProvider->getData($reviewsCollection); From 5ebf71a12fb66bfad63150de001da02eac25ca2d Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 26 Jan 2023 12:07:31 +0200 Subject: [PATCH 621/985] ACP2E-1456: display bundle options taking into account cart tax configurations --- .../Helper/Catalog/Product/Configuration.php | 11 +- .../Tax.php => Pricing/Price/TaxPrice.php} | 137 ++++-------------- .../Catalog/Product/ConfigurationTest.php | 12 +- 3 files changed, 38 insertions(+), 122 deletions(-) rename app/code/Magento/Bundle/{Helper/Catalog/Product/Tax.php => Pricing/Price/TaxPrice.php} (59%) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index df2a1b4cc7f54..062e4080fd08f 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -7,9 +7,10 @@ use Magento\Bundle\Model\Product\Price; use Magento\Bundle\Model\Product\Type; +use Magento\Bundle\Pricing\Price\TaxPrice; use Magento\Catalog\Api\Data\ProductInterface; -use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; use Magento\Catalog\Helper\Product\Configuration as ProductConfiguration; +use Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; use Magento\Framework\App\Helper\AbstractHelper; @@ -54,7 +55,7 @@ class Configuration extends AbstractHelper implements ConfigurationInterface private $serializer; /** - * @var Tax + * @var TaxPrice */ private $taxHelper; @@ -64,7 +65,7 @@ class Configuration extends AbstractHelper implements ConfigurationInterface * @param Data $pricingHelper * @param Escaper $escaper * @param Json|null $serializer - * @param Tax|null $taxHelper + * @param TaxPrice|null $taxHelper */ public function __construct( Context $context, @@ -72,14 +73,14 @@ public function __construct( Data $pricingHelper, Escaper $escaper, Json $serializer = null, - Tax $taxHelper = null + TaxPrice $taxHelper = null ) { $this->productConfiguration = $productConfiguration; $this->pricingHelper = $pricingHelper; $this->escaper = $escaper; $this->serializer = $serializer ?: ObjectManager::getInstance() ->get(Json::class); - $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(Tax::class); + $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(TaxPrice::class); parent::__construct($context); } diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php b/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php similarity index 59% rename from app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php rename to app/code/Magento/Bundle/Pricing/Price/TaxPrice.php index 8aace0318ab32..c6832aa7dbdf2 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Tax.php +++ b/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php @@ -5,21 +5,13 @@ */ declare(strict_types=1); -namespace Magento\Bundle\Helper\Catalog\Product; +namespace Magento\Bundle\Pricing\Price; -use Magento\Catalog\Api\CategoryRepositoryInterface; -use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Product; -use Magento\Customer\Api\Data\AddressInterface; -use Magento\Customer\Api\Data\AddressInterfaceFactory; -use Magento\Customer\Api\Data\RegionInterfaceFactory; use Magento\Customer\Api\GroupRepositoryInterface; -use Magento\Customer\Model\Address\AbstractAddress; use Magento\Customer\Model\Session as CustomerSession; -use Magento\Framework\App\Helper\AbstractHelper; -use Magento\Framework\App\Helper\Context; use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Pricing\PriceCurrencyInterface; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; @@ -30,75 +22,53 @@ use Magento\Tax\Api\TaxCalculationInterface; use Magento\Tax\Model\Config; -class Tax extends AbstractHelper +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) + */ +class TaxPrice { /** * @var StoreManagerInterface */ - protected $storeManager; + private $storeManager; /** * @var TaxClassKeyInterfaceFactory */ - protected $taxClassKeyFactory; + private $taxClassKeyFactory; /** * @var Config */ - protected $taxConfig; + private $taxConfig; /** * @var QuoteDetailsInterfaceFactory */ - protected $quoteDetailsFactory; + private $quoteDetailsFactory; /** * @var QuoteDetailsItemInterfaceFactory */ - protected $quoteDetailsItemFactory; + private $quoteDetailsItemFactory; /** * @var CustomerSession */ - protected $customerSession; + private $customerSession; /** * @var TaxCalculationInterface */ - protected $taxCalculationService; - - /** - * @var PriceCurrencyInterface - */ - protected $priceCurrency; - - /** - * @var ProductRepositoryInterface - */ - protected $productRepository; - - /** - * @var CategoryRepositoryInterface - */ - protected $categoryRepository; + private $taxCalculationService; /** * @var GroupRepositoryInterface */ - protected $customerGroupRepository; + private $customerGroupRepository; /** - * @var AddressInterfaceFactory - */ - protected $addressFactory; - - /** - * @var RegionInterfaceFactory - */ - protected $regionFactory; - - /** - * @param Context $context * @param StoreManagerInterface $storeManager * @param TaxClassKeyInterfaceFactory $taxClassKeyFactory * @param Config $taxConfig @@ -106,12 +76,9 @@ class Tax extends AbstractHelper * @param QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory * @param TaxCalculationInterface $taxCalculationService * @param CustomerSession $customerSession - * @param PriceCurrencyInterface $priceCurrency * @param GroupRepositoryInterface $customerGroupRepository - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - Context $context, StoreManagerInterface $storeManager, TaxClassKeyInterfaceFactory $taxClassKeyFactory, Config $taxConfig, @@ -119,7 +86,6 @@ public function __construct( QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory, TaxCalculationInterface $taxCalculationService, CustomerSession $customerSession, - PriceCurrencyInterface $priceCurrency, GroupRepositoryInterface $customerGroupRepository ) { $this->storeManager = $storeManager; @@ -129,9 +95,7 @@ public function __construct( $this->quoteDetailsItemFactory = $quoteDetailsItemFactory; $this->taxCalculationService = $taxCalculationService; $this->customerSession = $customerSession; - $this->priceCurrency = $priceCurrency; $this->customerGroupRepository = $customerGroupRepository; - parent::__construct($context); } /** @@ -140,53 +104,36 @@ public function __construct( * @param Product $product * @param float $price * @param bool|null $includingTax - * @param AbstractAddress|null $shippingAddress - * @param AbstractAddress|null $billingAddress * @param int|null $ctc * @param Store|bool|int|string|null $store * @param bool|null $priceIncludesTax - * @param bool $roundPrice * @return float * @throws LocalizedException - * @throws \Magento\Framework\Exception\NoSuchEntityException + * @throws NoSuchEntityException */ public function getTaxPrice( Product $product, float $price, bool $includingTax = null, - AbstractAddress $shippingAddress = null, - AbstractAddress $billingAddress = null, int $ctc = null, Store|bool|int|string $store = null, - bool $priceIncludesTax = null, - bool $roundPrice = true + bool $priceIncludesTax = null ): float { if (!$price) { return $price; } $store = $this->storeManager->getStore($store); + $storeId = $store?->getId(); + $taxClassKey = $this->taxClassKeyFactory->create(); + $customerTaxClassKey = $this->taxClassKeyFactory->create(); + $item = $this->quoteDetailsItemFactory->create(); + $quoteDetails = $this->quoteDetailsFactory->create(); + if ($priceIncludesTax === null) { $priceIncludesTax = $this->taxConfig->priceIncludesTax($store); } - $shippingAddressDataObject = null; - if ($shippingAddress === null) { - $shippingAddressDataObject = - $this->convertDefaultTaxAddress($this->customerSession->getDefaultTaxShippingAddress()); - } elseif ($shippingAddress instanceof AbstractAddress) { - $shippingAddressDataObject = $shippingAddress->getDataModel(); - } - - $billingAddressDataObject = null; - if ($billingAddress === null) { - $billingAddressDataObject = - $this->convertDefaultTaxAddress($this->customerSession->getDefaultTaxBillingAddress()); - } elseif ($billingAddress instanceof AbstractAddress) { - $billingAddressDataObject = $billingAddress->getDataModel(); - } - - $taxClassKey = $this->taxClassKeyFactory->create(); $taxClassKey->setType(TaxClassKeyInterface::TYPE_ID) ->setValue($product->getTaxClassId()); @@ -195,11 +142,9 @@ public function getTaxPrice( ->getTaxClassId(); } - $customerTaxClassKey = $this->taxClassKeyFactory->create(); $customerTaxClassKey->setType(TaxClassKeyInterface::TYPE_ID) ->setValue($ctc); - $item = $this->quoteDetailsItemFactory->create(); $item->setQuantity(1) ->setCode($product->getSku()) ->setShortDescription($product->getShortDescription()) @@ -208,16 +153,12 @@ public function getTaxPrice( ->setType('product') ->setUnitPrice($price); - $quoteDetails = $this->quoteDetailsFactory->create(); - $quoteDetails->setShippingAddress($shippingAddressDataObject) - ->setBillingAddress($billingAddressDataObject) + $quoteDetails ->setCustomerTaxClassKey($customerTaxClassKey) ->setItems([$item]) ->setCustomerId($this->customerSession->getCustomerId()); - $storeId = null; - $storeId = $store?->getId(); - $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails, $storeId, $roundPrice); + $taxDetails = $this->taxCalculationService->calculateTax($quoteDetails, $storeId); $items = $taxDetails->getItems(); $taxDetailsItem = array_shift($items); @@ -233,11 +174,7 @@ public function getTaxPrice( $taxDetailsItem->getPrice() : $taxDetailsItem->getPriceInclTax(); } - if ($roundPrice) { - return $this->priceCurrency->round($price); - } else { - return $price; - } + return $price; } /** @@ -250,26 +187,4 @@ public function displayCartPricesBoth(StoreInterface $store = null): bool { return $this->taxConfig->displayCartPricesBoth($store); } - - /** - * Convert tax address array to address data object with country id and postcode - * - * @param array|null $taxAddress - * @return AddressInterface|null - */ - private function convertDefaultTaxAddress(array $taxAddress = null) - { - if (empty($taxAddress)) { - return null; - } - /** @var AddressInterface $addressDataObject */ - $addressDataObject = $this->addressFactory->create() - ->setCountryId($taxAddress['country_id']) - ->setPostcode($taxAddress['postcode']); - - if (isset($taxAddress['region_id'])) { - $addressDataObject->setRegion($this->regionFactory->create()->setRegionId($taxAddress['region_id'])); - } - return $addressDataObject; - } } diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index 773959be79463..0847ba41aae3e 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -7,10 +7,10 @@ namespace Magento\Bundle\Test\Unit\Helper\Catalog\Product; -use Magento\Bundle\Helper\Catalog\Product\Tax; use Magento\Bundle\Model\Product\Price; use Magento\Bundle\Model\Product\Type; use Magento\Bundle\Model\ResourceModel\Option\Collection; +use Magento\Bundle\Pricing\Price\TaxPrice; use Magento\Catalog\Helper\Product\Configuration; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface; @@ -59,7 +59,7 @@ class ConfigurationTest extends TestCase private $serializer; /** - * @var Tax|MockObject + * @var TaxPrice|MockObject */ private $taxHelper; @@ -78,7 +78,7 @@ protected function setUp(): void $this->serializer = $this->getMockBuilder(Json::class) ->onlyMethods(['unserialize']) ->getMockForAbstractClass(); - $this->taxHelper = $this->createPartialMock(Tax::class, ['displayCartPricesBoth', 'getTaxPrice']); + $this->taxHelper = $this->createPartialMock(TaxPrice::class, ['displayCartPricesBoth', 'getTaxPrice']); $this->serializer->expects($this->any()) ->method('unserialize') @@ -272,13 +272,13 @@ public function testGetOptions(): void $this->taxHelper->expects($this->any()) ->method('getTaxPrice') ->with($product, 15) - ->willReturn(15); + ->willReturn(15.00); $this->taxHelper->expects($this->any()) ->method('displayCartPricesBoth') ->willReturn(false); - $this->pricingHelper->expects($this->once())->method('currency')->with(15) + $this->pricingHelper->expects($this->once())->method('currency')->with(15.00) ->willReturn('<span class="price">$15.00</span>'); - $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15); + $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15.00); $selectionQty->expects($this->any())->method('getValue')->willReturn(1); $bundleOption->expects($this->any())->method('getSelections')->willReturn([$product]); $bundleOption->expects($this->once())->method('getTitle')->willReturn('title'); From 7345f8ddafcb9e332d01f45163d241b074619280 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 26 Jan 2023 12:45:09 +0200 Subject: [PATCH 622/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing adjusted solution for enabled "show out of stock items" option added unit test --- .../Plugin/ProductPriceIndexModifier.php | 149 ------------------ .../Plugin/ProductPriceIndexModifierTest.php | 135 ---------------- .../DefaultSelectionPriceListProviderTest.php | 42 +++++ app/code/Magento/Bundle/etc/di.xml | 3 - 4 files changed, 42 insertions(+), 287 deletions(-) delete mode 100644 app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php delete mode 100644 app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php diff --git a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php b/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php deleted file mode 100644 index 6cbab3d90f01f..0000000000000 --- a/app/code/Magento/Bundle/Model/Plugin/ProductPriceIndexModifier.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Bundle\Model\Plugin; - -use Magento\Bundle\Model\Link; -use Magento\Bundle\Model\Product\Price; -use Magento\Catalog\Api\Data\ProductInterface; -use Magento\Catalog\Model\Product\Type; -use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; -use Magento\CatalogInventory\Api\StockConfigurationInterface; -use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; -use Magento\Framework\App\ResourceConnection; -use Magento\Framework\EntityManager\MetadataPool; -use Magento\Framework\Exception\NoSuchEntityException; - -/** - * Checks if product is part of dynamic price bundle and skips price reindex - */ -class ProductPriceIndexModifier -{ - /** - * @var StockConfigurationInterface - */ - private StockConfigurationInterface $stockConfiguration; - - /** - * @var ResourceConnection - */ - private ResourceConnection $resourceConnection; - - /** - * @var MetadataPool - */ - private MetadataPool $metadataPool; - - /** - * @var string - */ - private string $connectionName; - - /** - * @param StockConfigurationInterface $stockConfiguration - * @param ResourceConnection $resourceConnection - * @param MetadataPool $metadataPool - * @param string $connectionName - */ - public function __construct( - StockConfigurationInterface $stockConfiguration, - ResourceConnection $resourceConnection, - MetadataPool $metadataPool, - string $connectionName = 'indexer' - ) { - $this->stockConfiguration = $stockConfiguration; - $this->resourceConnection = $resourceConnection; - $this->metadataPool = $metadataPool; - $this->connectionName = $connectionName; - } - - /** - * Skip entity price index that are part of a dynamic price bundle - * - * @param ProductPriceIndexFilter $subject - * @param callable $proceed - * @param IndexTableStructure $priceTable - * @param array $entityIds - * @return void - * @throws NoSuchEntityException - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function aroundModifyPrice( - ProductPriceIndexFilter $subject, - callable $proceed, - IndexTableStructure $priceTable, - array $entityIds = [] - ) { - if (empty($entityIds) || $this->stockConfiguration->isShowOutOfStock()) { - return $proceed($priceTable, $entityIds); - } - $filteredEntities = $this->filterProductsFromDynamicPriceBundle($priceTable->getTableName(), $entityIds); - - if (!empty($filteredEntities)) { - $proceed($priceTable, $filteredEntities); - } - } - - /** - * Filter products that are part of a dynamic bundle price configuration - * - * @param string $priceTableName - * @param array $productIds - * @return array - * @throws NoSuchEntityException - */ - private function filterProductsFromDynamicPriceBundle(string $priceTableName, array $productIds): array - { - $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField(); - $connection = $this->resourceConnection->getConnection($this->connectionName); - $select = $connection->select(); - $select->from( - ['selection' => $this->resourceConnection->getTableName('catalog_product_bundle_selection')], - [ - 'product.entity_id AS bundle_id', - 'selection.product_id AS child_product_id', - 'pei.value AS bundle_price_type' - ] - ); - $select->joinInner( - ['price' => $this->resourceConnection->getTableName($priceTableName)], - implode(' AND ', ['price.entity_id = selection.product_id']), - null - ); - $select->joinInner( - ['product' => $this->resourceConnection->getTableName('catalog_product_entity')], - "product.$linkField = selection.parent_product_id", - null - ); - $select->joinInner( - ['pei' => $this->resourceConnection->getTableName('catalog_product_entity_int')], - "product.$linkField = pei.$linkField", - null - ); - $select->joinInner( - ['ea' => $this->resourceConnection->getTableName('eav_attribute')], - "pei.attribute_id = ea.attribute_id AND ea.attribute_code = '" . Link::KEY_PRICE_TYPE . "'", - null - ); - $select->where('selection.product_id IN (?)', $productIds); - $select->where('product.type_id = ?', Type::TYPE_BUNDLE); - $bundleProducts = $connection->fetchAll($select); - - if (empty($bundleProducts)) { - return $productIds; - } - - $filteredProducts = []; - foreach ($bundleProducts as $bundle) { - if ($bundle['bundle_price_type'] != Price::PRICE_TYPE_DYNAMIC) { - $filteredProducts[] = $bundle['child_product_id']; - } - } - - return $filteredProducts; - } -} diff --git a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php b/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php deleted file mode 100644 index 3901a93276f52..0000000000000 --- a/app/code/Magento/Bundle/Test/Unit/Model/Plugin/ProductPriceIndexModifierTest.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Bundle\Test\Unit\Model\Plugin; - -use Magento\Bundle\Model\Plugin\ProductPriceIndexModifier; -use Magento\Catalog\Api\Data\ProductInterface; -use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure; -use Magento\CatalogInventory\Api\StockConfigurationInterface; -use Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter; -use Magento\Framework\App\ResourceConnection; -use Magento\Framework\DB\Adapter\AdapterInterface; -use Magento\Framework\DB\Select; -use Magento\Framework\EntityManager\EntityMetadataInterface; -use Magento\Framework\EntityManager\MetadataPool; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; - -class ProductPriceIndexModifierTest extends TestCase -{ - private const CONNECTION_NAME = 'indexer'; - - /** - * @var StockConfigurationInterface|StockConfigurationInterface&MockObject|MockObject - */ - private StockConfigurationInterface $stockConfiguration; - - /** - * @var ResourceConnection|MockObject - */ - private ResourceConnection $resourceConnection; - - /** - * @var MetadataPool|MetadataPool&MockObject|MockObject - */ - private MetadataPool $metadataPool; - - /** - * @var ProductPriceIndexModifier - */ - private ProductPriceIndexModifier $plugin; - - /** - * @var IndexTableStructure|MockObject - */ - private IndexTableStructure $table; - - /** - * @var ProductPriceIndexFilter|MockObject - */ - private ProductPriceIndexFilter $subject; - - protected function setUp(): void - { - $this->stockConfiguration = $this->createMock(StockConfigurationInterface::class); - $this->table = $this->createMock(IndexTableStructure::class); - $this->subject = $this->createMock(ProductPriceIndexFilter::class); - $this->resourceConnection = $this->createMock(ResourceConnection::class); - $this->metadataPool = $this->createMock(MetadataPool::class); - $this->plugin = new ProductPriceIndexModifier( - $this->stockConfiguration, - $this->resourceConnection, - $this->metadataPool, - self::CONNECTION_NAME - ); - } - - public function testAroundModifyPriceNoEntities(): void - { - $called = false; - $callable = function () use (&$called) { - $called = true; - }; - - $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table); - $this->assertTrue($called); - } - - public function testAroundModifyPriceFilteredEntities() - { - $priceTableName = 'catalog_product_index_price_temp'; - $entities = [1, 2]; - $link = $this->createMock(EntityMetadataInterface::class); - $link->expects($this->once())->method('getLinkField')->willReturn('id'); - $this->metadataPool->expects($this->once()) - ->method('getMetadata') - ->with(ProductInterface::class) - ->willReturn($link); - $select = $this->createMock(Select::class); - $select->expects($this->once()) - ->method('from'); - $select->expects($this->exactly(4)) - ->method('joinInner'); - $select->expects($this->exactly(2)) - ->method('where'); - $connection = $this->createMock(AdapterInterface::class); - $connection->expects($this->once()) - ->method('select') - ->willReturn($select); - $connection->expects($this->exactly(1)) - ->method('fetchAll') - ->with($select) - ->willReturn([ - [ - 'bundle_id' => 1, - 'child_product_id' => 1, - 'bundle_price_type' => 0 - ], - [ - 'bundle_id' => 1, - 'child_product_id' => 2, - 'bundle_price_type' => 1 - ] - ]); - $this->resourceConnection->expects($this->once()) - ->method('getConnection') - ->with(self::CONNECTION_NAME) - ->willReturn($connection); - - $calledPriceTable = ''; - $calledEntities = []; - $callable = function () use (&$calledPriceTable, &$calledEntities, $priceTableName, $entities) { - $calledPriceTable = $priceTableName; - $calledEntities = $entities; - }; - $this->plugin->aroundModifyPrice($this->subject, $callable, $this->table, $entities); - $this->assertSame($calledPriceTable, $priceTableName); - $this->assertSame($calledEntities, $entities); - } -} diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php index 0adb1f5b9730f..16c88643eedbe 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php @@ -15,6 +15,7 @@ use Magento\Bundle\Pricing\Price\BundleSelectionFactory; use Magento\Catalog\Helper\Data as CatalogData; use Magento\Catalog\Model\Product; +use Magento\Framework\Data\Collection\EntityFactoryInterface; use Magento\Framework\DataObject; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Api\Data\WebsiteInterface; @@ -177,7 +178,48 @@ public function testGetPriceList(): void $this->selectionCollection->expects($this->once()) ->method('getIterator') ->willReturn(new \ArrayIterator([])); + $this->selectionCollection->expects($this->once()) + ->method('setFlag') + ->with('has_stock_status_filter', true); $this->model->getPriceList($this->product, false, false); } + + public function testGetPriceListWithSearchMin(): void + { + $option = $this->createMock(Option::class); + $option->expects($this->once())->method('getRequired') + ->willReturn(true); + $this->optionsCollection->expects($this->any()) + ->method('getIterator') + ->willReturn(new \ArrayIterator([$option])); + $this->typeInstance->expects($this->any()) + ->method('getOptionsCollection') + ->with($this->product) + ->willReturn($this->optionsCollection); + $this->product->expects($this->any()) + ->method('getTypeInstance') + ->willReturn($this->typeInstance); + $this->selectionCollection->expects($this->once()) + ->method('getFirstItem') + ->willReturn($this->createMock(Product::class)); + $this->typeInstance->expects($this->once()) + ->method('getSelectionsCollection') + ->willReturn($this->selectionCollection); + $this->selectionCollection->expects($this->once()) + ->method('setFlag') + ->with('has_stock_status_filter', true); + $this->selectionCollection->expects($this->once()) + ->method('addQuantityFilter'); + $this->product->expects($this->once())->method('isSalable')->willReturn(true); + $this->optionsCollection->expects($this->once()) + ->method('getSize') + ->willReturn(1); + $this->optionsCollection->expects($this->once()) + ->method('addFilter') + ->willReturn($this->optionsCollection); + + $this->model->getPriceList($this->product, true, false); + } } + diff --git a/app/code/Magento/Bundle/etc/di.xml b/app/code/Magento/Bundle/etc/di.xml index 920844964f707..c5c4a491234ed 100644 --- a/app/code/Magento/Bundle/etc/di.xml +++ b/app/code/Magento/Bundle/etc/di.xml @@ -96,9 +96,6 @@ <type name="Magento\Sales\Model\Order\Item"> <plugin name="bundle" type="Magento\Bundle\Model\Sales\Order\Plugin\Item" sortOrder="100" /> </type> - <type name="Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter"> - <plugin name="price_modifier" type="Magento\Bundle\Model\Plugin\ProductPriceIndexModifier" sortOrder="100" /> - </type> <type name="Magento\Framework\EntityManager\Operation\ExtensionPool"> <arguments> <argument name="extensionActions" xsi:type="array"> From 3b42747c9229febe575d59c3cc28d34b1fc1f8d6 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 26 Jan 2023 13:16:09 +0200 Subject: [PATCH 623/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing removed unnecessary use --- .../Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php index 16c88643eedbe..f2f80492468ea 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php @@ -15,7 +15,6 @@ use Magento\Bundle\Pricing\Price\BundleSelectionFactory; use Magento\Catalog\Helper\Data as CatalogData; use Magento\Catalog\Model\Product; -use Magento\Framework\Data\Collection\EntityFactoryInterface; use Magento\Framework\DataObject; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Api\Data\WebsiteInterface; From 510bdd5ddda2bf9cc58f27df6a5c740d98d240dd Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 26 Jan 2023 14:28:58 +0200 Subject: [PATCH 624/985] ACP2E-1456: fix unit test errors --- .../Helper/Catalog/Product/Configuration.php | 3 +-- .../Catalog/Product/ConfigurationTest.php | 27 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 062e4080fd08f..3f5735fb90c68 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -214,8 +214,7 @@ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundl . $this->pricingHelper->currency( $selectionFinalPrice ) - . ' ' - . ($displayCartPricesBoth ? __('Excl. tax:') . ' ' + . ($displayCartPricesBoth ? ' ' . __('Excl. tax:') . ' ' . $this->pricingHelper->currency( $selectionFinalPriceExclTax ) : ''); diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index 0847ba41aae3e..3a02a6185c652 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -17,6 +17,7 @@ use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface; use Magento\Catalog\Model\Product\Option; use Magento\Framework\Escaper; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Pricing\Helper\Data; use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; @@ -178,6 +179,7 @@ public function testGetBundleOptionsEmptyBundleOptionsIds(): void /** * @return void + * @throws LocalizedException */ public function testGetBundleOptionsEmptyBundleSelectionIds(): void { @@ -222,10 +224,14 @@ public function testGetBundleOptionsEmptyBundleSelectionIds(): void } /** + * @param $includingTax + * @param $displayCartPriceBoth * @return void + * @throws LocalizedException + * @dataProvider getTaxConfiguration * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function testGetOptions(): void + public function testGetOptions($includingTax, $displayCartPriceBoth): void { $optionIds = '{"0":"1"}'; $selectionIds = '{"0":"2"}'; @@ -271,11 +277,11 @@ public function testGetOptions(): void ->willReturn('name'); $this->taxHelper->expects($this->any()) ->method('getTaxPrice') - ->with($product, 15) + ->with($product, 15, $includingTax) ->willReturn(15.00); $this->taxHelper->expects($this->any()) ->method('displayCartPricesBoth') - ->willReturn(false); + ->willReturn((bool)$displayCartPriceBoth); $this->pricingHelper->expects($this->once())->method('currency')->with(15.00) ->willReturn('<span class="price">$15.00</span>'); $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15.00); @@ -323,4 +329,19 @@ public function testGetOptions(): void $this->helper->getOptions($this->item) ); } + + /** + * Data provider for testGetOptions + * + * @return array + */ + public function getTaxConfiguration(): array + { + return [ + [1, 0], + [0, 0], + [1, 1], + [0, 1] + ]; + } } From 61df700db49f9fb500e92b16d7a13d29c5bff4ef Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 26 Jan 2023 14:49:12 +0200 Subject: [PATCH 625/985] ACP2E-1388:Bundle Products Not Combining Simple Product Prices When Set to Dynamic Pricing corrected static --- .../Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php index f2f80492468ea..3082246aa2e04 100644 --- a/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php @@ -221,4 +221,3 @@ public function testGetPriceListWithSearchMin(): void $this->model->getPriceList($this->product, true, false); } } - From 1572321a823bfaab626a973f69edc42a83057131 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 26 Jan 2023 15:52:40 +0200 Subject: [PATCH 626/985] ACP2E-1413: Remember Category Pagination causes a Document Expired/form submission error when using the browser's Back button on the product page fixed redirect issue when "p" param is used in URL --- app/code/Magento/Catalog/Controller/Category/View.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php index bdc1901e3d577..5a47e53440c96 100644 --- a/app/code/Magento/Catalog/Controller/Category/View.php +++ b/app/code/Magento/Catalog/Controller/Category/View.php @@ -310,7 +310,6 @@ private function shouldRedirectOnToolbarAction(): bool $params = $this->getRequest()->getParams(); return $this->toolbarMemorizer->isMemorizingAllowed() && empty(array_intersect([ - Toolbar::PAGE_PARM_NAME, Toolbar::ORDER_PARAM_NAME, Toolbar::DIRECTION_PARAM_NAME, Toolbar::MODE_PARAM_NAME, From e99a69b95b22a1e5a86411a0b8738efd412d90bb Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Thu, 26 Jan 2023 17:09:57 +0200 Subject: [PATCH 627/985] ACP2E-1456: display bundle options taking into account cart tax configurations; fixed unit tests --- .../Helper/Catalog/Product/Configuration.php | 3 +- .../Magento/Bundle/Pricing/Price/TaxPrice.php | 13 +++++++- .../Catalog/Product/ConfigurationTest.php | 31 ++++++++++++------- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php index 3f5735fb90c68..d17e8e0b16a1e 100644 --- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php @@ -197,7 +197,6 @@ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundl $qty = $this->getSelectionQty($item->getProduct(), $bundleSelection->getSelectionId()) * 1; if ($qty) { $selectionPrice = $this->getSelectionFinalPrice($item, $bundleSelection); - $selectionFinalPrice = $this->taxHelper->getTaxPrice($item->getProduct(), $selectionPrice); $displayCartPricesBoth = $this->taxHelper->displayCartPricesBoth(); if ($displayCartPricesBoth) { @@ -207,6 +206,8 @@ private function getOptionPriceHtml(ItemInterface $item, ProductInterface $bundl $selectionFinalPriceExclTax = $this->taxHelper ->getTaxPrice($product, $selectionPrice, false); + } else { + $selectionFinalPrice = $this->taxHelper->getTaxPrice($item->getProduct(), $selectionPrice); } $option['value'][] = $qty . ' x ' . $this->escaper->escapeHtml($bundleSelection->getName()) diff --git a/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php b/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php index c6832aa7dbdf2..add5ee7b12294 100644 --- a/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/TaxPrice.php @@ -8,6 +8,7 @@ namespace Magento\Bundle\Pricing\Price; use Magento\Catalog\Model\Product; +use Magento\Checkout\Model\Session; use Magento\Customer\Api\GroupRepositoryInterface; use Magento\Customer\Model\Session as CustomerSession; use Magento\Framework\Exception\LocalizedException; @@ -68,6 +69,11 @@ class TaxPrice */ private $customerGroupRepository; + /** + * @var Session + */ + private $checkoutSession; + /** * @param StoreManagerInterface $storeManager * @param TaxClassKeyInterfaceFactory $taxClassKeyFactory @@ -77,6 +83,7 @@ class TaxPrice * @param TaxCalculationInterface $taxCalculationService * @param CustomerSession $customerSession * @param GroupRepositoryInterface $customerGroupRepository + * @param Session $checkoutSession */ public function __construct( StoreManagerInterface $storeManager, @@ -86,7 +93,8 @@ public function __construct( QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory, TaxCalculationInterface $taxCalculationService, CustomerSession $customerSession, - GroupRepositoryInterface $customerGroupRepository + GroupRepositoryInterface $customerGroupRepository, + Session $checkoutSession ) { $this->storeManager = $storeManager; $this->taxClassKeyFactory = $taxClassKeyFactory; @@ -96,6 +104,7 @@ public function __construct( $this->taxCalculationService = $taxCalculationService; $this->customerSession = $customerSession; $this->customerGroupRepository = $customerGroupRepository; + $this->checkoutSession = $checkoutSession; } /** @@ -129,6 +138,7 @@ public function getTaxPrice( $customerTaxClassKey = $this->taxClassKeyFactory->create(); $item = $this->quoteDetailsItemFactory->create(); $quoteDetails = $this->quoteDetailsFactory->create(); + $customerQuote = $this->checkoutSession->getQuote(); if ($priceIncludesTax === null) { $priceIncludesTax = $this->taxConfig->priceIncludesTax($store); @@ -154,6 +164,7 @@ public function getTaxPrice( ->setUnitPrice($price); $quoteDetails + ->setShippingAddress($customerQuote->getShippingAddress()->getDataModel()) ->setCustomerTaxClassKey($customerTaxClassKey) ->setItems([$item]) ->setCustomerId($this->customerSession->getCustomerId()); diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php index 3a02a6185c652..67fd2eb9d7b82 100644 --- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php +++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php @@ -227,7 +227,6 @@ public function testGetBundleOptionsEmptyBundleSelectionIds(): void * @param $includingTax * @param $displayCartPriceBoth * @return void - * @throws LocalizedException * @dataProvider getTaxConfiguration * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ @@ -275,14 +274,21 @@ public function testGetOptions($includingTax, $displayCartPriceBoth): void ->method('escapeHtml') ->with('name') ->willReturn('name'); - $this->taxHelper->expects($this->any()) - ->method('getTaxPrice') - ->with($product, 15, $includingTax) - ->willReturn(15.00); + if ($displayCartPriceBoth) { + $this->taxHelper->expects($this->any()) + ->method('getTaxPrice') + ->withConsecutive([$product, 15.00, !$includingTax], [$product, 15.00, $includingTax]) + ->willReturnOnConsecutiveCalls(15.00, 15.00); + } else { + $this->taxHelper->expects($this->any()) + ->method('getTaxPrice') + ->with($product, 15.00, $includingTax) + ->willReturn(15.00); + } $this->taxHelper->expects($this->any()) ->method('displayCartPricesBoth') ->willReturn((bool)$displayCartPriceBoth); - $this->pricingHelper->expects($this->once())->method('currency')->with(15.00) + $this->pricingHelper->expects($this->atLeastOnce())->method('currency')->with(15.00) ->willReturn('<span class="price">$15.00</span>'); $priceModel->expects($this->once())->method('getSelectionFinalTotalPrice')->willReturn(15.00); $selectionQty->expects($this->any())->method('getValue')->willReturn(1); @@ -317,11 +323,16 @@ public function testGetOptions($includingTax, $displayCartPriceBoth): void $this->productConfiguration->expects($this->once())->method('getCustomOptions')->with($this->item) ->willReturn([0 => ['label' => 'title', 'value' => 'value']]); + if ($displayCartPriceBoth) { + $value = '1 x name <span class="price">$15.00</span> Excl. tax: <span class="price">$15.00</span>'; + } else { + $value = '1 x name <span class="price">$15.00</span>'; + } $this->assertEquals( [ [ 'label' => 'title', - 'value' => ['1 x name <span class="price">$15.00</span>'], + 'value' => [$value], 'has_html' => true ], ['label' => 'title', 'value' => 'value'] @@ -338,10 +349,8 @@ public function testGetOptions($includingTax, $displayCartPriceBoth): void public function getTaxConfiguration(): array { return [ - [1, 0], - [0, 0], - [1, 1], - [0, 1] + [null, false], + [false, true] ]; } } From 4e6dbf3919fa365f3b959a33b786b29fcc129956 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 26 Jan 2023 12:48:34 -0600 Subject: [PATCH 628/985] ACP2E-1564: Page Builder: Adding Product to cart from PB Grid/Carousel doubles up the item quantity --- .../product/widget/content/grid.phtml | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index 000f3ffd36934..b8af5f06c26f5 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -11,6 +11,15 @@ use Magento\Framework\App\Action\Action; // phpcs:disable Generic.Files.LineLength.TooLong // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper ?> + +<?php +/** + * Product carousel widget template + * + * @var \Magento\Framework\Escaper $escaper + */ +?> + <?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?> <?php $type = 'widget-product-grid'; @@ -76,6 +85,15 @@ use Magento\Framework\App\Action\Action; <span><?= $block->escapeHtml(__('Add to Cart')) ?></span> </button> </form> + <script type="text/x-magento-init"> + { + "[data-role=tocart-form], .form.map.checkout": { + "catalogAddToCart": { + "product_sku": "<?= $escaper->escapeJs($_item->getSku()); ?>" + } + } + } + </script> <?php else: ?> <?php if ($_item->isAvailable()): ?> <div class="stock available"><span><?= $block->escapeHtml(__('In stock')) ?></span></div> @@ -113,13 +131,4 @@ use Magento\Framework\App\Action\Action; <?= $block->getPagerHtml() ?> </div> </div> - <?php if($block->getBlockHtml('formkey')): ?> - <script type="text/x-magento-init"> - { - ".block.widget [data-role=tocart-form]": { - "Magento_Catalog/js/validate-product": {} - } - } - </script> - <?php endif;?> <?php endif;?> From 3a6adfbe5ccf37e9b62bbf5dc3de561c7d624ee6 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 26 Jan 2023 13:15:35 -0600 Subject: [PATCH 629/985] ACP2E-1564: Page Builder: Adding Product to cart from PB Grid/Carousel doubles up the item quantity --- .../templates/product/widget/content/grid.phtml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index b8af5f06c26f5..8eb7e0dbebf70 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -6,18 +6,13 @@ use Magento\Framework\App\Action\Action; -/** @var \Magento\CatalogWidget\Block\Product\ProductsList $block */ - -// phpcs:disable Generic.Files.LineLength.TooLong -// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper -?> - -<?php /** - * Product carousel widget template - * + * @var \Magento\CatalogWidget\Block\Product\ProductsList $block * @var \Magento\Framework\Escaper $escaper */ + +// phpcs:disable Generic.Files.LineLength.TooLong +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper ?> <?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?> @@ -85,6 +80,7 @@ use Magento\Framework\App\Action\Action; <span><?= $block->escapeHtml(__('Add to Cart')) ?></span> </button> </form> + <?php if($block->getBlockHtml('formkey')): ?> <script type="text/x-magento-init"> { "[data-role=tocart-form], .form.map.checkout": { @@ -94,6 +90,7 @@ use Magento\Framework\App\Action\Action; } } </script> + <?php endif;?> <?php else: ?> <?php if ($_item->isAvailable()): ?> <div class="stock available"><span><?= $block->escapeHtml(__('In stock')) ?></span></div> From 85d87739c759cf3971920d9ac632e48c579cf734 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Thu, 26 Jan 2023 14:22:38 -0600 Subject: [PATCH 630/985] ACP2E-1564: Page Builder: Adding Product to cart from PB Grid/Carousel doubles up the item quantity --- .../view/frontend/templates/product/widget/content/grid.phtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index 8eb7e0dbebf70..da7003bfe5e26 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -13,6 +13,7 @@ use Magento\Framework\App\Action\Action; // phpcs:disable Generic.Files.LineLength.TooLong // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis ?> <?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?> @@ -80,7 +81,7 @@ use Magento\Framework\App\Action\Action; <span><?= $block->escapeHtml(__('Add to Cart')) ?></span> </button> </form> - <?php if($block->getBlockHtml('formkey')): ?> + <?php if ($block->getBlockHtml('formkey')): ?> <script type="text/x-magento-init"> { "[data-role=tocart-form], .form.map.checkout": { From 687f189d5a85451a0a5ddc6b96ba5b649b9947b5 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 26 Jan 2023 16:22:25 -0600 Subject: [PATCH 631/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 4 ++++ .../Model/Indexer/Category/Product/Plugin/Import.php | 2 +- .../Model/Indexer/Product/Category/Plugin/Import.php | 2 +- .../Model/Indexer/Product/Price/Plugin/Import.php | 2 ++ .../CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php | 2 +- app/code/Magento/ImportExport/Model/Import.php | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index e7c7ede1ca3db..e2e5ea7f4cc66 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -2466,6 +2466,10 @@ private function reindexProducts($productIdsToReindex = []) if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { $indexer->reindexList($productIdsToReindex); } + $indexer = $this->indexerRegistry->get('catalog_product_price'); + if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { + $indexer->reindexList($productIdsToReindex); + } } /** diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php index d8a926f7cfe31..3e476f518df7a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php @@ -34,7 +34,7 @@ public function __construct( public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) { if (!$this->_indexerCategoryProductProcessor->isIndexerScheduled()) { - $this->_indexerCategoryProductProcessor->markIndexerAsInvalid(); + //$this->_indexerCategoryProductProcessor->markIndexerAsInvalid(); } return $import; } diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php index 0d0d4ea80530a..58303c5a863d9 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php @@ -34,7 +34,7 @@ public function __construct( public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) { if (!$this->_indexerProductCategoryProcessor->isIndexerScheduled()) { - $this->_indexerProductCategoryProcessor->markIndexerAsInvalid(); + //$this->_indexerProductCategoryProcessor->markIndexerAsInvalid(); } return $import; } diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php index 87020be7cd30d..051127ff30109 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php @@ -30,10 +30,12 @@ public function __construct(\Magento\Framework\Indexer\IndexerRegistry $indexerR */ public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $result) { + /* $priceIndexer = $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Product\Price\Processor::INDEXER_ID); if (!$priceIndexer->isScheduled()) { $priceIndexer->invalidate(); } + */ return $result; } } diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php index c83045b2062cb..e29af0a0f340a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php +++ b/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php @@ -32,7 +32,7 @@ public function __construct(\Magento\CatalogInventory\Model\Indexer\Stock\Proces public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) { if (!$this->_stockndexerProcessor->isIndexerScheduled()) { - $this->_stockndexerProcessor->markIndexerAsInvalid(); + //$this->_stockndexerProcessor->markIndexerAsInvalid(); } return $import; } diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index aa3af449237f9..e0a8260a610b8 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -690,7 +690,7 @@ public function invalidateIndex() $indexer = $this->indexerRegistry->get($indexerId); if (!$indexer->isScheduled()) { - $indexer->invalidate(); + //$indexer->invalidate(); } // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } catch (\InvalidArgumentException $e) { From 70571a92459bc985e2ec375c813ddeb71b0e04a1 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Fri, 27 Jan 2023 17:41:43 +0530 Subject: [PATCH 632/985] AC-7790:PHP8.2 - Integration Failures/Unit Failures --- .../Magento/Payment/Block/Transparent/Redirect.php | 2 +- .../Model/Condition/Product/AbstractProductTest.php | 5 ----- composer.lock | 12 ++++++------ .../Magento/Framework/Filesystem/Driver/FileTest.php | 5 ++--- .../FixturesAsserts/SimpleProductsAssert.php | 1 + lib/internal/Magento/Framework/App/Response/Http.php | 1 + lib/internal/Magento/Framework/Simplexml/Config.php | 2 ++ pub/errors/processor.php | 1 + 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Payment/Block/Transparent/Redirect.php b/app/code/Magento/Payment/Block/Transparent/Redirect.php index b62e86e0f831c..f52fb081cd7dd 100644 --- a/app/code/Magento/Payment/Block/Transparent/Redirect.php +++ b/app/code/Magento/Payment/Block/Transparent/Redirect.php @@ -67,7 +67,7 @@ public function getPostParams(): array $params = []; foreach ($this->_request->getPostValue() as $name => $value) { if (!empty($value) && mb_detect_encoding($value, 'UTF-8', true) === false) { - $value = utf8_encode($value); + $value = mb_convert_encoding($value, 'UTF-8', 'ISO-8859-1'); } $params[$name] = $value; } diff --git a/app/code/Magento/Rule/Test/Unit/Model/Condition/Product/AbstractProductTest.php b/app/code/Magento/Rule/Test/Unit/Model/Condition/Product/AbstractProductTest.php index e19d56dd46f57..b9312a8b407fd 100644 --- a/app/code/Magento/Rule/Test/Unit/Model/Condition/Product/AbstractProductTest.php +++ b/app/code/Magento/Rule/Test/Unit/Model/Condition/Product/AbstractProductTest.php @@ -174,7 +174,6 @@ public function testValidateEmptyEntityAttributeValuesWithResource() ->method('getAttribute') ->with('someAttribute') ->willReturn($attribute); - $newResource->_config = $this->createMock(Config::class); $product->expects($this->atLeastOnce()) ->method('getResource') ->willReturn($newResource); @@ -190,7 +189,6 @@ public function testValidateEmptyEntityAttributeValuesWithResource() ->method('getAttribute') ->with('someAttribute') ->willReturn($attribute); - $newResource->_config = $this->createMock(Config::class); $product->setResource($newResource); $this->assertFalse($this->_condition->validate($product)); @@ -228,7 +226,6 @@ public function testValidateSetEntityAttributeValuesWithResource() ->method('getAttribute') ->with('someAttribute') ->willReturn($attribute); - $newResource->_config = $this->createMock(Config::class); $product->expects($this->atLeastOnce()) ->method('getResource') @@ -277,7 +274,6 @@ public function testValidateSetEntityAttributeValuesWithoutResource() ->method('getAttribute') ->with('someAttribute') ->willReturn($attribute); - $newResource->_config = $this->createMock(Config::class); $product->expects($this->atLeastOnce()) ->method('getResource') @@ -303,7 +299,6 @@ public function testValidateSetEntityAttributeValuesWithoutResource() ->method('getAttribute') ->with('someAttribute') ->willReturn($attribute); - $newResource->_config = $this->createMock(Config::class); $product->setResource($newResource); $product->setId(1); diff --git a/composer.lock b/composer.lock index 12c6e0ee80270..5da1507c1f4f8 100644 --- a/composer.lock +++ b/composer.lock @@ -4730,16 +4730,16 @@ }, { "name": "magento/zend-pdf", - "version": "1.16.0", + "version": "1.16.1", "source": { "type": "git", "url": "https://github.com/magento/magento-zend-pdf.git", - "reference": "cb5179d708fb9c39d753d556f49471d3d0037aac" + "reference": "e69a4f0ab33ea1355701cebe6cb64bc02e642b33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-zend-pdf/zipball/cb5179d708fb9c39d753d556f49471d3d0037aac", - "reference": "cb5179d708fb9c39d753d556f49471d3d0037aac", + "url": "https://api.github.com/repos/magento/magento-zend-pdf/zipball/e69a4f0ab33ea1355701cebe6cb64bc02e642b33", + "reference": "e69a4f0ab33ea1355701cebe6cb64bc02e642b33", "shasum": "" }, "require": { @@ -4781,9 +4781,9 @@ ], "support": { "issues": "https://github.com/magento/magento-zend-pdf/issues", - "source": "https://github.com/magento/magento-zend-pdf/tree/1.16.0" + "source": "https://github.com/magento/magento-zend-pdf/tree/1.16.1" }, - "time": "2022-09-22T18:56:44+00:00" + "time": "2023-01-26T16:40:05+00:00" }, { "name": "monolog/monolog", diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php index 1655dca029c1e..551fa041f164e 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php @@ -1,7 +1,5 @@ <?php /** - * Test for \Magento\Framework\Filesystem\Driver\File - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ @@ -13,6 +11,7 @@ use PHPUnit\Framework\TestCase; /** + * Test for \Magento\Framework\Filesystem\Driver\File * Verify File class */ class FileTest extends TestCase @@ -104,7 +103,7 @@ public function testReadDirectoryRecursively(): void 'foo/bar/file_two.txt', 'foo/file_three.txt', ]; - $expected = array_map(['self', 'getTestPath'], $paths); + $expected = array_map([self::class, 'getTestPath'], $paths); $actual = $this->driver->readDirectoryRecursively($this->getTestPath('foo')); sort($actual); $this->assertEquals($expected, $actual); diff --git a/dev/tests/integration/testsuite/Magento/Setup/Fixtures/FixturesAsserts/SimpleProductsAssert.php b/dev/tests/integration/testsuite/Magento/Setup/Fixtures/FixturesAsserts/SimpleProductsAssert.php index d3e5d2226a87c..94639ec878684 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Fixtures/FixturesAsserts/SimpleProductsAssert.php +++ b/dev/tests/integration/testsuite/Magento/Setup/Fixtures/FixturesAsserts/SimpleProductsAssert.php @@ -13,6 +13,7 @@ * Class performs assertion that generated simple products are valid * after running setup:performance:generate-fixtures command */ +#[\AllowDynamicProperties] class SimpleProductsAssert { /** diff --git a/lib/internal/Magento/Framework/App/Response/Http.php b/lib/internal/Magento/Framework/App/Response/Http.php index cb36408e9c925..feabc97705bd9 100644 --- a/lib/internal/Magento/Framework/App/Response/Http.php +++ b/lib/internal/Magento/Framework/App/Response/Http.php @@ -21,6 +21,7 @@ * @api * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ +#[\AllowDynamicProperties] class Http extends \Magento\Framework\HTTP\PhpEnvironment\Response { /** Cookie to store page vary string */ diff --git a/lib/internal/Magento/Framework/Simplexml/Config.php b/lib/internal/Magento/Framework/Simplexml/Config.php index 9f403e3451dcc..8b0d5413bc765 100644 --- a/lib/internal/Magento/Framework/Simplexml/Config.php +++ b/lib/internal/Magento/Framework/Simplexml/Config.php @@ -11,6 +11,7 @@ * @api * @since 100.0.2 */ +#[\AllowDynamicProperties] class Config { /** @@ -31,6 +32,7 @@ class Config * Xpath describing nodes in configuration that need to be extended * * @example <allResources extends="/config/modules//resource"/> + * @var string */ protected $_xpathExtends = "//*[@extends]"; diff --git a/pub/errors/processor.php b/pub/errors/processor.php index 334359b5e6419..0cb182700856c 100644 --- a/pub/errors/processor.php +++ b/pub/errors/processor.php @@ -20,6 +20,7 @@ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * phpcs:ignoreFile */ +#[\AllowDynamicProperties] class Processor { const MAGE_ERRORS_LOCAL_XML = 'local.xml'; From 3a8ca1646fe7d663e808476d59333c07ea5b3f7d Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Fri, 27 Jan 2023 10:42:21 -0600 Subject: [PATCH 633/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Category/Product/Plugin/ImportTest.php | 37 --------- .../Product/Category/Plugin/ImportTest.php | 37 --------- .../Model/Import/Product.php | 18 +++-- .../Category/Product/Plugin/Import.php | 41 ---------- .../Product/Category/Plugin/Import.php | 41 ---------- .../Indexer/Product/Price/Plugin/Import.php | 41 ---------- .../Model/Indexer/Stock/Plugin/Import.php | 39 ---------- .../Product/Price/Plugin/ImportTest.php | 77 ------------------- .../Magento/CatalogImportExport/etc/di.xml | 4 - .../CatalogImportExport/etc/import.xml | 2 - .../Magento/ImportExport/Model/Import.php | 2 +- 11 files changed, 12 insertions(+), 327 deletions(-) delete mode 100644 app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/ImportTest.php delete mode 100644 app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Category/Plugin/ImportTest.php delete mode 100644 app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php delete mode 100644 app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php delete mode 100644 app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php delete mode 100644 app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php delete mode 100644 app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Product/Price/Plugin/ImportTest.php diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/ImportTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/ImportTest.php deleted file mode 100644 index 0dc0e23ccb3c2..0000000000000 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Category/Product/Plugin/ImportTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Catalog\Test\Unit\Model\Indexer\Category\Product\Plugin; - -use Magento\Catalog\Model\Indexer\Category\Product\Processor; -use Magento\ImportExport\Model\Import; -use PHPUnit\Framework\TestCase; - -class ImportTest extends TestCase -{ - public function testAfterImportSource() - { - $processorMock = $this->getMockBuilder(Processor::class) - ->disableOriginalConstructor() - ->getMock(); - $processorMock->expects($this->once()) - ->method('markIndexerAsInvalid'); - - $subjectMock = $this->getMockBuilder(Import::class) - ->disableOriginalConstructor() - ->getMock(); - - $import = true; - - $model = new \Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin\Import($processorMock); - - $this->assertEquals( - $import, - $model->afterImportSource($subjectMock, $import) - ); - } -} diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Category/Plugin/ImportTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Category/Plugin/ImportTest.php deleted file mode 100644 index 2dafc07ffee15..0000000000000 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Category/Plugin/ImportTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Catalog\Test\Unit\Model\Indexer\Product\Category\Plugin; - -use Magento\Catalog\Model\Indexer\Product\Category\Processor; -use Magento\ImportExport\Model\Import; -use PHPUnit\Framework\TestCase; - -class ImportTest extends TestCase -{ - public function testAfterImportSource() - { - $processorMock = $this->getMockBuilder(Processor::class) - ->disableOriginalConstructor() - ->getMock(); - $processorMock->expects($this->once()) - ->method('markIndexerAsInvalid'); - - $subjectMock = $this->getMockBuilder(Import::class) - ->disableOriginalConstructor() - ->getMock(); - - $import = true; - - $model = new \Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin\Import($processorMock); - - $this->assertEquals( - $import, - $model->afterImportSource($subjectMock, $import) - ); - } -} diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index e2e5ea7f4cc66..8e71342d875a1 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -9,6 +9,8 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Config as CatalogConfig; use Magento\Catalog\Model\Product\Visibility; +use Magento\Catalog\Model\Indexer\Product\Category as ProductCategoryIndexer; +use Magento\Catalog\Model\Indexer\Product\Price\Processor as ProductPriceIndexer; use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor; use Magento\CatalogImportExport\Model\Import\Product\LinkProcessor; use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor; @@ -2462,13 +2464,15 @@ private function reindexStockStatus(array $productIds): void */ private function reindexProducts($productIdsToReindex = []) { - $indexer = $this->indexerRegistry->get('catalog_product_category'); - if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { - $indexer->reindexList($productIdsToReindex); - } - $indexer = $this->indexerRegistry->get('catalog_product_price'); - if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { - $indexer->reindexList($productIdsToReindex); + $indexersToReindex = [ + ProductCategoryIndexer::INDEXER_ID, + ProductPriceIndexer::INDEXER_ID + ]; + foreach ($indexersToReindex as $id) { + $indexer = $this->indexerRegistry->get($id); + if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { + $indexer->reindexList($productIdsToReindex); + } } } diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php deleted file mode 100644 index 3e476f518df7a..0000000000000 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Category/Product/Plugin/Import.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin; - -class Import -{ - /** - * @var \Magento\Catalog\Model\Indexer\Category\Product\Processor - */ - protected $_indexerCategoryProductProcessor; - - /** - * @param \Magento\Catalog\Model\Indexer\Category\Product\Processor $indexerCategoryProductProcessor - */ - public function __construct( - \Magento\Catalog\Model\Indexer\Category\Product\Processor $indexerCategoryProductProcessor - ) { - $this->_indexerCategoryProductProcessor = $indexerCategoryProductProcessor; - } - - /** - * After import handler - * - * @param \Magento\ImportExport\Model\Import $subject - * @param boolean $import - * - * @return mixed - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) - { - if (!$this->_indexerCategoryProductProcessor->isIndexerScheduled()) { - //$this->_indexerCategoryProductProcessor->markIndexerAsInvalid(); - } - return $import; - } -} diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php deleted file mode 100644 index 58303c5a863d9..0000000000000 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Category/Plugin/Import.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin; - -class Import -{ - /** - * @var \Magento\Catalog\Model\Indexer\Product\Category\Processor - */ - protected $_indexerProductCategoryProcessor; - - /** - * @param \Magento\Catalog\Model\Indexer\Product\Category\Processor $indexerProductCategoryProcessor - */ - public function __construct( - \Magento\Catalog\Model\Indexer\Product\Category\Processor $indexerProductCategoryProcessor - ) { - $this->_indexerProductCategoryProcessor = $indexerProductCategoryProcessor; - } - - /** - * After import handler - * - * @param \Magento\ImportExport\Model\Import $subject - * @param boolean $import - * - * @return mixed - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) - { - if (!$this->_indexerProductCategoryProcessor->isIndexerScheduled()) { - //$this->_indexerProductCategoryProcessor->markIndexerAsInvalid(); - } - return $import; - } -} diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php deleted file mode 100644 index 051127ff30109..0000000000000 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Product/Price/Plugin/Import.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CatalogImportExport\Model\Indexer\Product\Price\Plugin; - -class Import -{ - /** - * @var \Magento\Framework\Indexer\IndexerRegistry - */ - private $indexerRegistry; - - /** - * @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry - */ - public function __construct(\Magento\Framework\Indexer\IndexerRegistry $indexerRegistry) - { - $this->indexerRegistry = $indexerRegistry; - } - - /** - * After import handler - * - * @param \Magento\ImportExport\Model\Import $subject - * @param bool $result - * @return bool - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $result) - { - /* - $priceIndexer = $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Product\Price\Processor::INDEXER_ID); - if (!$priceIndexer->isScheduled()) { - $priceIndexer->invalidate(); - } - */ - return $result; - } -} diff --git a/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php b/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php deleted file mode 100644 index e29af0a0f340a..0000000000000 --- a/app/code/Magento/CatalogImportExport/Model/Indexer/Stock/Plugin/Import.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\CatalogImportExport\Model\Indexer\Stock\Plugin; - -class Import -{ - /** - * @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor - */ - protected $_stockndexerProcessor; - - /** - * @param \Magento\CatalogInventory\Model\Indexer\Stock\Processor $stockndexerProcessor - */ - public function __construct(\Magento\CatalogInventory\Model\Indexer\Stock\Processor $stockndexerProcessor) - { - $this->_stockndexerProcessor = $stockndexerProcessor; - } - - /** - * After import handler - * - * @param \Magento\ImportExport\Model\Import $subject - * @param Object $import - * - * @return mixed - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterImportSource(\Magento\ImportExport\Model\Import $subject, $import) - { - if (!$this->_stockndexerProcessor->isIndexerScheduled()) { - //$this->_stockndexerProcessor->markIndexerAsInvalid(); - } - return $import; - } -} diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Product/Price/Plugin/ImportTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Product/Price/Plugin/ImportTest.php deleted file mode 100644 index d5ae17d5c392f..0000000000000 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Product/Price/Plugin/ImportTest.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\CatalogImportExport\Test\Unit\Model\Indexer\Product\Price\Plugin; - -use Magento\Catalog\Model\Indexer\Product\Price\Processor; -use Magento\CatalogImportExport\Model\Indexer\Product\Price\Plugin\Import; -use Magento\Framework\Indexer\IndexerRegistry; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; -use Magento\Indexer\Model\Indexer; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; - -class ImportTest extends TestCase -{ - /** - * @var ObjectManager - */ - protected $_objectManager; - - /** - * @var Import - */ - protected $_model; - - /** - * @var Indexer|MockObject - */ - protected $_indexerMock; - - /** - * @var IndexerRegistry|MockObject - */ - protected $indexerRegistryMock; - - protected function setUp(): void - { - $this->_objectManager = new ObjectManager($this); - - $this->_indexerMock = $this->getMockBuilder(Indexer::class) - ->addMethods(['getPriceIndexer']) - ->onlyMethods(['getId', 'invalidate', 'isScheduled']) - ->disableOriginalConstructor() - ->getMock(); - $this->indexerRegistryMock = $this->createPartialMock( - IndexerRegistry::class, - ['get'] - ); - - $this->_model = $this->_objectManager->getObject( - Import::class, - ['indexerRegistry' => $this->indexerRegistryMock] - ); - } - - /** - * Test AfterImportSource() - */ - public function testAfterImportSource() - { - $this->_indexerMock->expects($this->once())->method('invalidate'); - $this->indexerRegistryMock->expects($this->any()) - ->method('get') - ->with(Processor::INDEXER_ID) - ->willReturn($this->_indexerMock); - $this->_indexerMock->expects($this->any()) - ->method('isScheduled') - ->willReturn(false); - - $importMock = $this->createMock(\Magento\ImportExport\Model\Import::class); - $this->assertEquals('return_value', $this->_model->afterImportSource($importMock, 'return_value')); - } -} diff --git a/app/code/Magento/CatalogImportExport/etc/di.xml b/app/code/Magento/CatalogImportExport/etc/di.xml index 43fdda6227ac7..4150fca46fa6a 100644 --- a/app/code/Magento/CatalogImportExport/etc/di.xml +++ b/app/code/Magento/CatalogImportExport/etc/di.xml @@ -12,11 +12,7 @@ <preference for="Magento\CatalogImportExport\Model\Export\ProductFilterInterface" type="Magento\CatalogImportExport\Model\Export\ProductFilters" /> <type name="Magento\ImportExport\Model\Import"> <plugin name="catalogProductFlatIndexerImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Flat\Plugin\Import" /> - <plugin name="invalidatePriceIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Price\Plugin\Import" /> - <plugin name="invalidateStockIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Stock\Plugin\Import" /> <plugin name="invalidateEavIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Eav\Plugin\Import" /> - <plugin name="invalidateProductCategoryIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin\Import" /> - <plugin name="invalidateCategoryProductIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin\Import" /> </type> <type name="Magento\CatalogImportExport\Model\Import\Product\StockProcessor"> <arguments> diff --git a/app/code/Magento/CatalogImportExport/etc/import.xml b/app/code/Magento/CatalogImportExport/etc/import.xml index 522b478752f01..05f8ceb5425d4 100644 --- a/app/code/Magento/CatalogImportExport/etc/import.xml +++ b/app/code/Magento/CatalogImportExport/etc/import.xml @@ -9,7 +9,5 @@ <entity name="catalog_product" label="Products" model="Magento\CatalogImportExport\Model\Import\Product" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" /> <entityType entity="catalog_product" name="simple" model="Magento\CatalogImportExport\Model\Import\Product\Type\Simple" /> <entityType entity="catalog_product" name="virtual" model="Magento\CatalogImportExport\Model\Import\Product\Type\Virtual" /> - <relatedIndexer entity="catalog_product" name="catalog_product_price" /> - <relatedIndexer entity="catalog_product" name="catalogsearch_fulltext" /> <relatedIndexer entity="catalog_product" name="catalog_product_flat" /> </config> diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php index e0a8260a610b8..aa3af449237f9 100644 --- a/app/code/Magento/ImportExport/Model/Import.php +++ b/app/code/Magento/ImportExport/Model/Import.php @@ -690,7 +690,7 @@ public function invalidateIndex() $indexer = $this->indexerRegistry->get($indexerId); if (!$indexer->isScheduled()) { - //$indexer->invalidate(); + $indexer->invalidate(); } // phpcs:disable Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } catch (\InvalidArgumentException $e) { From 31b060f8c3005e43f176b536fdfc928b2fbe8796 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Fri, 27 Jan 2023 12:43:09 -0600 Subject: [PATCH 634/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Model/Indexer/Stock/Plugin/ImportTest.php | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Stock/Plugin/ImportTest.php diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Stock/Plugin/ImportTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Stock/Plugin/ImportTest.php deleted file mode 100644 index 3659cde191b54..0000000000000 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Indexer/Stock/Plugin/ImportTest.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\CatalogImportExport\Test\Unit\Model\Indexer\Stock\Plugin; - -use Magento\CatalogInventory\Model\Indexer\Stock\Processor; -use Magento\ImportExport\Model\Import; -use PHPUnit\Framework\TestCase; - -class ImportTest extends TestCase -{ - public function testAfterImportSource() - { - /** - * @var \Magento\Catalog\Model\Indexer\Product\Flat\Processor| - * \PHPUnit\Framework\MockObject\MockObject $processorMock - */ - $processorMock = $this->createPartialMock( - Processor::class, - ['markIndexerAsInvalid', 'isIndexerScheduled'] - ); - - $subjectMock = $this->createMock(Import::class); - $processorMock->expects($this->any())->method('markIndexerAsInvalid'); - $processorMock->expects($this->any())->method('isIndexerScheduled')->willReturn(false); - - $someData = [1, 2, 3]; - - $model = new \Magento\CatalogImportExport\Model\Indexer\Stock\Plugin\Import($processorMock); - $this->assertEquals($someData, $model->afterImportSource($subjectMock, $someData)); - } -} From 6f72057cc4cbcde0154e724e3113d7146d568328 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Tue, 24 Jan 2023 15:03:34 -0600 Subject: [PATCH 635/985] ACP2E-1543: Customer confirmation e-mail is not translated when using the bulk api --- .../Email/Test/Fixture/FileTransport.php | 95 +++++++++ .../Magento/Store/Model/App/Emulation.php | 69 ++++--- app/code/Magento/Store/Test/Fixture/Store.php | 23 +-- .../Test/Unit/Model/App/EmulationTest.php | 50 +++-- .../Translation/Test/Fixture/Translation.php | 79 ++++++++ .../TestModuleEmail/Model/Transport/File.php | 73 +++++++ .../Plugin/MockMailTransporter.php | 42 ++++ .../_files/Magento/TestModuleEmail/etc/di.xml | 12 ++ .../Magento/TestModuleEmail/etc/module.xml | 10 + .../Magento/TestModuleEmail/registration.php | 13 ++ .../Api/AsyncBulkAccountManagementTest.php | 185 ++++++++++++++++++ .../Magento/TestFramework/Db/Sequence.php | 43 ++-- .../Magento/TestFramework/Mail/Parser.php | 129 ++++++++++++ .../Model/Mailing/AlertProcessorTest.php | 41 ++-- 14 files changed, 767 insertions(+), 97 deletions(-) create mode 100644 app/code/Magento/Email/Test/Fixture/FileTransport.php create mode 100644 app/code/Magento/Translation/Test/Fixture/Translation.php create mode 100644 dev/tests/api-functional/_files/Magento/TestModuleEmail/Model/Transport/File.php create mode 100644 dev/tests/api-functional/_files/Magento/TestModuleEmail/Plugin/MockMailTransporter.php create mode 100644 dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/di.xml create mode 100644 dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/module.xml create mode 100644 dev/tests/api-functional/_files/Magento/TestModuleEmail/registration.php create mode 100644 dev/tests/api-functional/testsuite/Magento/Customer/Api/AsyncBulkAccountManagementTest.php create mode 100644 dev/tests/integration/framework/Magento/TestFramework/Mail/Parser.php diff --git a/app/code/Magento/Email/Test/Fixture/FileTransport.php b/app/code/Magento/Email/Test/Fixture/FileTransport.php new file mode 100644 index 0000000000000..ea871e884e6a9 --- /dev/null +++ b/app/code/Magento/Email/Test/Fixture/FileTransport.php @@ -0,0 +1,95 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Email\Test\Fixture; + +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\DataObject; +use Magento\Framework\DataObjectFactory; +use Magento\Framework\Filesystem; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; +use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; + +class FileTransport implements RevertibleDataFixtureInterface +{ + private const DEFAULT_DATA = [ + 'directory' => DirectoryList::TMP, + 'path' => 'mail/%uniqid%', + ]; + + private const CONFIG_FILE = 'mail-transport-config.json'; + + /** + * @var Filesystem + */ + private Filesystem $filesystem; + + /** + * @var Json + */ + private Json $json; + + /** + * @var ProcessorInterface + */ + private ProcessorInterface $dataProcessor; + + /** + * @var DataObjectFactory + */ + private DataObjectFactory $dataObjectFactory; + + /** + * @param Filesystem $filesystem + * @param Json $json + * @param ProcessorInterface $dataProcessor + * @param DataObjectFactory $dataObjectFactory + */ + public function __construct( + Filesystem $filesystem, + Json $json, + ProcessorInterface $dataProcessor, + DataObjectFactory $dataObjectFactory + ) { + $this->filesystem = $filesystem; + $this->json = $json; + $this->dataProcessor = $dataProcessor; + $this->dataObjectFactory = $dataObjectFactory; + } + + /** + * {@inheritdoc} + * @param array $data Parameters + * <pre> + * $data = [ + * 'directory' => (string) Filesystem directory code. Optional. Default: tmp dir + * 'path' => (string) Relative path to "directory" where to save mails. Optional. Default: autogenerated + * ] + * </pre> + */ + public function apply(array $data = []): ?DataObject + { + $data = $this->dataProcessor->process($this, array_merge(self::DEFAULT_DATA, $data)); + $directory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + $directory->writeFile(self::CONFIG_FILE, $this->json->serialize($data)); + + return $this->dataObjectFactory->create(['data' => $data]); + } + + /** + * @inheritDoc + */ + public function revert(DataObject $data): void + { + $directory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + $config = $this->json->unserialize($directory->readFile(self::CONFIG_FILE)); + $directory->delete(self::CONFIG_FILE); + $directory = $this->filesystem->getDirectoryWrite($config['directory']); + $directory->delete($config['path']); + } +} diff --git a/app/code/Magento/Store/Model/App/Emulation.php b/app/code/Magento/Store/Model/App/Emulation.php index d4635b46f02ba..2f5eb2bad84a4 100644 --- a/app/code/Magento/Store/Model/App/Emulation.php +++ b/app/code/Magento/Store/Model/App/Emulation.php @@ -9,33 +9,44 @@ */ namespace Magento\Store\Model\App; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\Phrase; +use Magento\Framework\Phrase\RendererInterface; use Magento\Framework\Translate\Inline\ConfigInterface; +use Magento\Framework\Translate\Inline\StateInterface; +use Magento\Framework\TranslateInterface; +use Magento\Framework\View\DesignInterface; +use Magento\Store\Model\StoreManagerInterface; +use Psr\Log\LoggerInterface; /** * @api * @since 100.0.2 + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Emulation extends \Magento\Framework\DataObject { /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $_storeManager; /** - * @var \Magento\Framework\TranslateInterface + * @var TranslateInterface */ protected $_translate; /** * Core store config * - * @var \Magento\Framework\App\Config\ScopeConfigInterface + * @var ScopeConfigInterface */ protected $_scopeConfig; /** - * @var \Magento\Framework\Locale\ResolverInterface + * @var ResolverInterface */ protected $_localeResolver; @@ -50,7 +61,7 @@ class Emulation extends \Magento\Framework\DataObject protected $inlineConfig; /** - * @var \Magento\Framework\Translate\Inline\StateInterface + * @var StateInterface */ protected $inlineTranslation; @@ -62,39 +73,46 @@ class Emulation extends \Magento\Framework\DataObject private $initialEnvironmentInfo; /** - * @var \Psr\Log\LoggerInterface + * @var LoggerInterface */ private $logger; /** - * @var \Magento\Framework\View\DesignInterface + * @var DesignInterface */ private $_viewDesign; /** - * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\DesignInterface $viewDesign + * @var RendererInterface + */ + private $phraseRenderer; + + /** + * @param StoreManagerInterface $storeManager + * @param DesignInterface $viewDesign * @param \Magento\Framework\App\DesignInterface $design - * @param \Magento\Framework\TranslateInterface $translate - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param TranslateInterface $translate + * @param ScopeConfigInterface $scopeConfig * @param ConfigInterface $inlineConfig - * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation - * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param \Psr\Log\LoggerInterface $logger + * @param StateInterface $inlineTranslation + * @param ResolverInterface $localeResolver + * @param LoggerInterface $logger * @param array $data + * @param RendererInterface|null $phraseRenderer * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\DesignInterface $viewDesign, + StoreManagerInterface $storeManager, + DesignInterface $viewDesign, \Magento\Framework\App\DesignInterface $design, - \Magento\Framework\TranslateInterface $translate, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + TranslateInterface $translate, + ScopeConfigInterface $scopeConfig, ConfigInterface $inlineConfig, - \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, - \Magento\Framework\Locale\ResolverInterface $localeResolver, - \Psr\Log\LoggerInterface $logger, - array $data = [] + StateInterface $inlineTranslation, + ResolverInterface $localeResolver, + LoggerInterface $logger, + array $data = [], + ?RendererInterface $phraseRenderer = null ) { $this->_localeResolver = $localeResolver; parent::__construct($data); @@ -106,6 +124,8 @@ public function __construct( $this->inlineConfig = $inlineConfig; $this->inlineTranslation = $inlineTranslation; $this->logger = $logger; + $this->phraseRenderer = $phraseRenderer + ?? ObjectManager::getInstance()->get(RendererInterface::class); } /** @@ -158,6 +178,7 @@ public function startEnvironmentEmulation( $this->_localeResolver->setLocale($newLocaleCode); $this->_translate->setLocale($newLocaleCode); $this->_translate->loadData($area); + Phrase::setRenderer($this->phraseRenderer); } /** @@ -179,7 +200,7 @@ public function stopEnvironmentEmulation() // Current store needs to be changed right before locale change and after design change $this->_storeManager->setCurrentStore($initialDesign['store']); $this->_restoreInitialLocale($this->initialEnvironmentInfo->getInitialLocaleCode(), $initialDesign['area']); - + Phrase::setRenderer($this->initialEnvironmentInfo->getPhraseRenderer()); $this->initialEnvironmentInfo = null; return $this; } @@ -202,6 +223,8 @@ public function storeCurrentEnvironmentInfo() ] )->setInitialLocaleCode( $this->_localeResolver->getLocale() + )->setPhraseRenderer( + Phrase::getRenderer() ); } diff --git a/app/code/Magento/Store/Test/Fixture/Store.php b/app/code/Magento/Store/Test/Fixture/Store.php index bf6fb1e1b7a1c..9a538eef61f74 100644 --- a/app/code/Magento/Store/Test/Fixture/Store.php +++ b/app/code/Magento/Store/Test/Fixture/Store.php @@ -16,6 +16,12 @@ use Magento\TestFramework\Fixture\Data\ProcessorInterface; use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; +/** + * Store Fixture + * + * This fixture may result in DDL operations that cannot be executed within a transaction. + * In case DB isolation is enabled, it is recommended to use "DataFixtureBeforeTransaction" instead of "DataFixture" + */ class Store implements RevertibleDataFixtureInterface { private const DEFAULT_DATA = [ @@ -93,7 +99,7 @@ public function apply(array $data = []): ?DataObject $store->setData($this->prepareData($data)); $this->storeResource->save($store); $this->storeManager->reinitStores(); - $this->regenerateSequenceTables((int)$store->getId()); + $this->sequence->generate((int) $store->getId()); return $store; } @@ -134,19 +140,4 @@ private function prepareData(array $data): array return $this->dataProcessor->process($this, $data); } - - /** - * Generate missing sequence tables - * - * @param int $storeId - * - * @return void - */ - private function regenerateSequenceTables(int $storeId): void - { - if ($storeId >= 10) { - $n = $storeId + 1; - $this->sequence->generateSequences($n); - } - } } diff --git a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php index 43be65bf9005c..f56ceb326b82b 100644 --- a/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/App/EmulationTest.php @@ -1,16 +1,17 @@ -<?php declare(strict_types=1); +<?php /** - * Tests Magento\Store\Model\App\Emulation - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Store\Test\Unit\Model\App; use Magento\Framework\App\Area; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\Phrase; +use Magento\Framework\Phrase\RendererInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\Translate\Inline\ConfigInterface; use Magento\Framework\Translate\Inline\StateInterface; @@ -22,6 +23,7 @@ use Magento\Theme\Model\Design; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -85,6 +87,11 @@ class EmulationTest extends TestCase */ private $model; + /** + * @var RendererInterface|MockObject + */ + private $rendererMock; + protected function setUp(): void { $this->objectManager = new ObjectManager($this); @@ -115,27 +122,37 @@ protected function setUp(): void ->disableOriginalConstructor() ->setMethods(['__wakeup', 'getStoreId']) ->getMock(); + $this->rendererMock = $this->createMock(RendererInterface::class); // Stubs $this->designMock->expects($this->any())->method('loadChange')->willReturnSelf(); $this->designMock->expects($this->any())->method('getData')->willReturn(false); // Prepare SUT - $this->model = $this->objectManager->getObject( - Emulation::class, - [ - 'storeManager' => $this->storeManagerMock, - 'viewDesign' => $this->viewDesignMock, - 'design' => $this->designMock, - 'translate' => $this->translateMock, - 'scopeConfig' => $this->scopeConfigMock, - 'inlineConfig' => $this->inlineConfigMock, - 'inlineTranslation' => $this->inlineTranslationMock, - 'localeResolver' => $this->localeResolverMock, - ] + $this->model = new Emulation( + $this->storeManagerMock, + $this->viewDesignMock, + $this->designMock, + $this->translateMock, + $this->scopeConfigMock, + $this->inlineConfigMock, + $this->inlineTranslationMock, + $this->localeResolverMock, + $this->createMock(LoggerInterface::class), + [], + $this->rendererMock, ); } + /** + * @inheritdoc + */ + protected function tearDown(): void + { + parent::tearDown(); + $this->model->stopEnvironmentEmulation(); + } + public function testStartDefaults() { // Test data @@ -176,10 +193,12 @@ public function testStartDefaults() Area::AREA_FRONTEND ); $this->assertNull($result); + $this->assertSame($this->rendererMock, Phrase::getRenderer()); } public function testStop() { + $initialRenderer = Phrase::getRenderer(); // Test data $initArea = 'initial area'; $initTheme = 'initial design theme'; @@ -224,5 +243,6 @@ public function testStop() // Test $result = $this->model->stopEnvironmentEmulation(); $this->assertNotNull($result); + $this->assertSame($initialRenderer, Phrase::getRenderer()); } } diff --git a/app/code/Magento/Translation/Test/Fixture/Translation.php b/app/code/Magento/Translation/Test/Fixture/Translation.php new file mode 100644 index 0000000000000..a619756895e99 --- /dev/null +++ b/app/code/Magento/Translation/Test/Fixture/Translation.php @@ -0,0 +1,79 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Translation\Test\Fixture; + +use Magento\Framework\DataObject; +use Magento\Store\Model\Store; +use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; +use Magento\Translation\Model\ResourceModel\StringUtils; +use Magento\Translation\Model\StringUtilsFactory; + +class Translation implements RevertibleDataFixtureInterface +{ + private const DEFAULT_DATA = [ + 'string' => null, + 'translate' => null, + 'locale' => null, + 'store_id' => Store::DEFAULT_STORE_ID, + ]; + + /** + * @var StringUtils + */ + private StringUtils $translateResourceModel; + + /** + * @var StringUtilsFactory + */ + private StringUtilsFactory $translateResourceModelFactory; + + /** + * @param StringUtils $translateResourceModel + * @param StringUtilsFactory $translateModelFactory + */ + public function __construct( + StringUtils $translateResourceModel, + StringUtilsFactory $translateModelFactory, + ) { + $this->translateResourceModel = $translateResourceModel; + $this->translateResourceModelFactory = $translateModelFactory; + } + + /** + * {@inheritdoc} + * @param array $data Parameters + * <pre> + * $data = [ + * 'string' => (string) Text to translate. Required. + * 'translate' => (string) Translated text. Required. + * 'locale' => (string) Locale code. For example: fr_FR. Optional. Default: Current locale + * 'store_id' => (int) Store ID. Optional. Default: 0 + * ] + * </pre> + */ + public function apply(array $data = []): ?DataObject + { + $data = array_merge(self::DEFAULT_DATA, $data); + $this->translateResourceModel->saveTranslate( + $data['string'], + $data['translate'], + $data['locale'], + $data['store_id'] + ); + + return $this->translateResourceModelFactory->create(['data' => $data]); + } + + /** + * @inheritDoc + */ + public function revert(DataObject $data): void + { + $this->translateResourceModel->deleteTranslate($data->getString(), $data->getLocale(), $data->getStoreId()); + } +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleEmail/Model/Transport/File.php b/dev/tests/api-functional/_files/Magento/TestModuleEmail/Model/Transport/File.php new file mode 100644 index 0000000000000..afebe3d3da300 --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleEmail/Model/Transport/File.php @@ -0,0 +1,73 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\TestModuleEmail\Model\Transport; + +use Laminas\Mail; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Filesystem; +use Magento\Framework\Serialize\Serializer\Json; + +class File implements \Laminas\Mail\Transport\TransportInterface +{ + private const CONFIG_FILE = 'mail-transport-config.json'; + + /** + * @var Filesystem + */ + private Filesystem $filesystem; + + /** + * @var Json + */ + private Json $json; + + /** + * @param Filesystem $filesystem + * @param Json $json + */ + public function __construct( + Filesystem $filesystem, + Json $json + ) { + $this->filesystem = $filesystem; + $this->json = $json; + } + + /** + * @inheritDoc + */ + public function send(Mail\Message $message) + { + $directory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + $config = $this->json->unserialize($directory->readFile(self::CONFIG_FILE)); + $directory = $this->filesystem->getDirectoryWrite($config['directory']); + $mail = $message->toString(); + foreach ($message->getTo() as $address) { + $index = 1; + $filename = preg_replace('/[^a-z0-9_]/', '__', strtolower($address->getEmail())); + $basePath = $config['path']. DIRECTORY_SEPARATOR . $filename; + $path = $basePath . '.eml'; + while ($directory->isExist($path)) { + $path = $basePath . '_' . ($index++) . '.eml'; + } + $directory->writeFile($path, $mail); + } + } + + /** + * Finds whether "file" mail transport is enabled + * + * @return bool + * @throws \Magento\Framework\Exception\FileSystemException + */ + public function isEnabled(): bool + { + $directory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); + return $directory->isExist(self::CONFIG_FILE); + } +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleEmail/Plugin/MockMailTransporter.php b/dev/tests/api-functional/_files/Magento/TestModuleEmail/Plugin/MockMailTransporter.php new file mode 100644 index 0000000000000..b71d5d43114e6 --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleEmail/Plugin/MockMailTransporter.php @@ -0,0 +1,42 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\TestModuleEmail\Plugin; + +use Laminas\Mail\Transport\TransportInterface; +use Magento\Email\Model\Transport; +use Magento\TestModuleEmail\Model\Transport\File; + +class MockMailTransporter +{ + /** + * @var File + */ + private File $file; + + /** + * @param File $file + */ + public function __construct( + File $file + ) { + $this->file = $file; + } + + /** + * @param Transport $subject + * @param \Closure $proceed + * @return TransportInterface + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function aroundGetTransport( + Transport $subject, + \Closure $proceed + ): TransportInterface { + return $this->file->isEnabled() ? $this->file : $proceed(); + } +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/di.xml b/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/di.xml new file mode 100644 index 0000000000000..27b7fd4ef4edc --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/di.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Email\Model\Transport"> + <plugin name="mock_mail_transporter" type="Magento\TestModuleEmail\Plugin\MockMailTransporter"/> + </type> +</config> diff --git a/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/module.xml b/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/module.xml new file mode 100644 index 0000000000000..7bde41eea5070 --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleEmail/etc/module.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> + <module name="Magento_TestModuleEmail" /> +</config> diff --git a/dev/tests/api-functional/_files/Magento/TestModuleEmail/registration.php b/dev/tests/api-functional/_files/Magento/TestModuleEmail/registration.php new file mode 100644 index 0000000000000..c4fb2a1452de5 --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleEmail/registration.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Framework\Component\ComponentRegistrar; + +$registrar = new ComponentRegistrar(); +if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleEmail') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleEmail', __DIR__); +} diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/AsyncBulkAccountManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AsyncBulkAccountManagementTest.php new file mode 100644 index 0000000000000..d6cb1cae07af3 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/AsyncBulkAccountManagementTest.php @@ -0,0 +1,185 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Api; + +use Magento\Customer\Model\ResourceModel\Customer\Collection; +use Magento\Directory\Helper\Data as LocaleConfig; +use Magento\Email\Test\Fixture\FileTransport as FileTransportFixture; +use Magento\Framework\Filesystem; +use Magento\Store\Test\Fixture\Group as StoreGroupFixture; +use Magento\Store\Test\Fixture\Store as StoreFixture; +use Magento\Store\Test\Fixture\Website as WebsiteFixture; +use Magento\TestFramework\Fixture\Config; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Mail\Parser; +use Magento\TestFramework\MessageQueue\EnvironmentPreconditionException; +use Magento\TestFramework\MessageQueue\PreconditionFailedException; +use Magento\TestFramework\MessageQueue\PublisherConsumerController; +use Magento\TestFramework\TestCase\WebapiAbstract; +use Magento\Translation\Test\Fixture\Translation as TranslationFixture; + +class AsyncBulkAccountManagementTest extends WebapiAbstract +{ + private const ASYNC_BULK_RESOURCE_PATH = '/async/bulk/V1/customers'; + + private const ASYNC_CONSUMER_NAME = 'async.operations.all'; + + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var PublisherConsumerController + */ + private $publisherConsumerController; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + + $params = array_merge_recursive( + Bootstrap::getInstance()->getAppInitParams(), + ['MAGE_DIRS' => ['cache' => ['path' => TESTS_TEMP_DIR . '/cache']]] + ); + + /** @var PublisherConsumerController publisherConsumerController */ + $this->publisherConsumerController = $this->objectManager->create(PublisherConsumerController::class, [ + 'consumers' => [self::ASYNC_CONSUMER_NAME], + 'logFilePath' => TESTS_TEMP_DIR . '/MessageQueueTestLog.txt', + 'appInitParams' => $params, + ]); + + try { + $this->publisherConsumerController->initialize(); + } catch (EnvironmentPreconditionException $e) { + $this->markTestSkipped($e->getMessage()); + } catch (PreconditionFailedException $e) { + $this->fail( + $e->getMessage() + ); + } + + parent::setUp(); + } + + /** + * @inheritdoc + */ + protected function tearDown(): void + { + $this->publisherConsumerController->stopConsumers(); + parent::tearDown(); + } + + #[ + DataFixture( + TranslationFixture::class, + [ + 'string' => 'Welcome to %store_name.', + 'translate' => 'Bienvenue sur %store_name.', + 'locale' => 'fr_FR', + ] + ), + DataFixture(FileTransportFixture::class, as: 'mail_transport_config'), + DataFixture(WebsiteFixture::class, as: 'website2'), + DataFixture( + StoreGroupFixture::class, + ['website_id' => '$website2.id$', 'name' => 'Le Site de Paris'], + 'store_group2' + ), + DataFixture( + StoreFixture::class, + ['store_group_id' => '$store_group2.id$', 'code' => 'fr_store_view'], + 'store2' + ), + Config(LocaleConfig::XML_PATH_DEFAULT_LOCALE, 'fr_FR', 'store', 'fr_store_view'), + ] + public function testMailShouldBeTranslatedToStoreLanguage(): void + { + $this->_markTestAsRestOnly(); + $fixtures = DataFixtureStorageManager::getStorage(); + + $postData = [ + [ + 'customer' => [ + 'email' => 'john' . uniqid() . '@example.com', + 'firstname' => 'John', + 'lastname' => 'Doe', + 'website_id' => $fixtures->get('website2')->getId() + ], + 'password' => 'J!Do&007', + ] + ]; + $response = $this->postAsync($postData); + $this->assertFalse($response['errors']); + $this->assertCount(1, $response['request_items']); + + try { + $this->publisherConsumerController->waitForAsynchronousResult( + function (array $data) { + return 1 === $this->objectManager->create(Collection::class) + ->addAttributeToFilter('email', ['eq' => $data[0]['customer']['email']]) + ->getSize(); + }, + [$postData] + ); + } catch (PreconditionFailedException $e) { + $this->fail("Customer was not created"); + } + + $mailConfig = $fixtures->get('mail_transport_config')->getData(); + $filesystem = $this->objectManager->get(Filesystem::class); + $directory = $filesystem->getDirectoryRead($mailConfig['directory']); + + // wait until a mail is sent + try { + $this->publisherConsumerController->waitForAsynchronousResult( + function (\Magento\Framework\Filesystem\Directory\ReadInterface $directory, string $path) { + return $directory->isExist($path) && count($directory->read($path)) > 0; + }, + [$directory, $mailConfig['path']] + ); + } catch (PreconditionFailedException $e) { + $this->fail("No mail was sent"); + } + + $mailPaths = $directory->read($mailConfig['path']); + $sentMails = count($mailPaths); + $this->assertCount(1, $mailPaths, "Only 1 mail was expected to be sent, actually $sentMails were sent."); + $mailContent = $directory->readFile($mailPaths[0]); + $parser = $this->objectManager->get(Parser::class); + $message = $parser->fromString($mailContent); + $this->assertStringContainsString( + 'Bienvenue sur Le Site de Paris.', + $message->getMessageBody()->getParts()[0]->getRawContent() + ); + } + + /*** + * @param array $data + * @param string|null $storeCode + * @return mixed + */ + private function postAsync(array $data, ?string $storeCode = null) + { + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::ASYNC_BULK_RESOURCE_PATH, + 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_POST, + ], + ]; + + return $this->_webApiCall($serviceInfo, $data, null, $storeCode); + } +} diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Sequence.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Sequence.php index 3210180553286..be4ccfde62668 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Sequence.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Sequence.php @@ -7,10 +7,8 @@ use Magento\Framework\App\ResourceConnection as AppResource; use Magento\Framework\DB\Ddl\Sequence as DdlSequence; +use Magento\SalesSequence\Model\EntityPool; -/** - * Class Sequence - */ class Sequence { /** @@ -24,40 +22,51 @@ class Sequence protected $ddlSequence; /** - * @var array + * @var EntityPool */ - protected $entities = [ - 'order', - 'invoice', - 'shipment', - 'rma_item' - ]; + private $entityPool; /** * @param AppResource $appResource * @param DdlSequence $ddlSequence + * @param EntityPool $entityPool */ public function __construct( AppResource $appResource, - DdlSequence $ddlSequence + DdlSequence $ddlSequence, + EntityPool $entityPool ) { $this->appResource = $appResource; $this->ddlSequence = $ddlSequence; + $this->entityPool = $entityPool; } /** + * Generates sequence for store IDS 0..(n-1) + * * @param int $n * @return void */ public function generateSequences($n = 10) { - $connection = $this->appResource->getConnection(); for ($i = 0; $i < $n; $i++) { - foreach ($this->entities as $entityName) { - $sequenceName = $this->appResource->getTableName(sprintf('sequence_%s_%s', $entityName, $i)); - if (!$connection->isTableExists($sequenceName)) { - $connection->query($this->ddlSequence->getCreateSequenceDdl($sequenceName)); - } + $this->generate($i); + } + } + + /** + * Generates sequence for store ID + * + * @param int $storeId + * @return void + */ + public function generate(int $storeId): void + { + $connection = $this->appResource->getConnection(); + foreach ($this->entityPool->getEntities() as $entityName) { + $sequenceName = $this->appResource->getTableName(sprintf('sequence_%s_%s', $entityName, $storeId)); + if (!$connection->isTableExists($sequenceName)) { + $connection->query($this->ddlSequence->getCreateSequenceDdl($sequenceName)); } } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Mail/Parser.php b/dev/tests/integration/framework/Magento/TestFramework/Mail/Parser.php new file mode 100644 index 0000000000000..e3ea142d47dcd --- /dev/null +++ b/dev/tests/integration/framework/Magento/TestFramework/Mail/Parser.php @@ -0,0 +1,129 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\TestFramework\Mail; + +use Magento\Framework\Mail\AddressFactory; +use Magento\Framework\Mail\EmailMessageInterfaceFactory; +use Magento\Framework\Mail\MimeMessageInterfaceFactory; +use Magento\Framework\Mail\MimePartInterfaceFactory; + +class Parser +{ + /** + * @var EmailMessageInterfaceFactory + */ + private EmailMessageInterfaceFactory $emailMessageInterfaceFactory; + + /** + * @var MimeMessageInterfaceFactory + */ + private MimeMessageInterfaceFactory $mimeMessageInterfaceFactory; + + /** + * @var MimePartInterfaceFactory + */ + private MimePartInterfaceFactory $mimePartInterfaceFactory; + + /** + * @var AddressFactory + */ + private AddressFactory $addressFactory; + + /** + * @param EmailMessageInterfaceFactory $emailMessageInterfaceFactory + * @param MimeMessageInterfaceFactory $mimeMessageInterfaceFactory + * @param MimePartInterfaceFactory $mimePartInterfaceFactory + * @param AddressFactory $addressFactory + */ + public function __construct( + EmailMessageInterfaceFactory $emailMessageInterfaceFactory, + MimeMessageInterfaceFactory $mimeMessageInterfaceFactory, + MimePartInterfaceFactory $mimePartInterfaceFactory, + AddressFactory $addressFactory + ) { + + $this->emailMessageInterfaceFactory = $emailMessageInterfaceFactory; + $this->mimeMessageInterfaceFactory = $mimeMessageInterfaceFactory; + $this->mimePartInterfaceFactory = $mimePartInterfaceFactory; + $this->addressFactory = $addressFactory; + } + + /** + * Parses mail string into EmailMessage + * + * @param string $content + * @return \Magento\Framework\Mail\EmailMessageInterface + */ + public function fromString(string $content): \Magento\Framework\Mail\EmailMessageInterface + { + $laminasMessage = \Laminas\Mail\Message::fromString($content)->setEncoding('utf-8'); + $laminasMimeMessage = is_string($laminasMessage->getBody()) + ? \Laminas\Mime\Message::createFromMessage($content) + : $laminasMessage->getBody(); + + $mimeParts = []; + + foreach ($laminasMimeMessage->getParts() as $laminasMimePart) { + /** @var \Magento\Framework\Mail\MimePartInterface $mimePart */ + $mimeParts[] = $this->mimePartInterfaceFactory->create( + [ + 'content' => $laminasMimePart->getRawContent(), + 'type' => $laminasMimePart->getType(), + 'fileName' => $laminasMimePart->getFileName(), + 'disposition' => $laminasMimePart->getDisposition(), + 'encoding' => $laminasMimePart->getEncoding(), + 'description' => $laminasMimePart->getDescription(), + 'filters' => $laminasMimePart->getFilters(), + 'charset' => $laminasMimePart->getCharset(), + 'boundary' => $laminasMimePart->getBoundary(), + 'location' => $laminasMimePart->getLocation(), + 'language' => $laminasMimePart->getLocation(), + 'isStream' => $laminasMimePart->isStream() + ] + ); + } + + $body = $this->mimeMessageInterfaceFactory->create([ + 'parts' => $mimeParts + ]); + + $sender = $laminasMessage->getSender() ? $this->addressFactory->create([ + 'email' => $laminasMessage->getSender()->getEmail(), + 'name' => $laminasMessage->getSender()->getName() + ]): null; + + return $this->emailMessageInterfaceFactory->create([ + 'body' => $body, + 'subject' => $laminasMessage->getSubject(), + 'sender' => $sender, + 'to' => $this->convertAddresses($laminasMessage->getTo()), + 'from' => $this->convertAddresses($laminasMessage->getFrom()), + 'cc' => $this->convertAddresses($laminasMessage->getCc()), + 'bcc' => $this->convertAddresses($laminasMessage->getBcc()), + 'replyTo' => $this->convertAddresses($laminasMessage->getReplyTo()), + ]); + } + + /** + * Convert laminas addresses to internal mail addresses + * + * @param \Laminas\Mail\AddressList $addressList + * @return array + */ + private function convertAddresses(\Laminas\Mail\AddressList $addressList): array + { + $addresses = []; + foreach ($addressList as $address) { + $addresses[] = $this->addressFactory->create([ + 'email' => $address->getEmail(), + 'name' => $address->getName() + ]); + } + return $addresses; + } +} diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php index 25bdf4d0ce47d..8bec4b3222a4d 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/Mailing/AlertProcessorTest.php @@ -19,9 +19,11 @@ use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\View\DesignInterface; use Magento\Store\Model\StoreRepository; +use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; use Magento\TestFramework\ObjectManager; +use Magento\Translation\Test\Fixture\Translation as TranslationFixture; use PHPUnit\Framework\TestCase; /** @@ -100,38 +102,25 @@ public function testProcess() * @magentoConfigFixture fixture_second_store_store general/locale/code pt_BR * @magentoDataFixture Magento/ProductAlert/_files/product_alert_with_store.php */ + #[ + DataFixture( + TranslationFixture::class, + [ + 'string' => 'Price change alert! We wanted you to know that prices have changed for these products:', + 'translate' => 'Alerta de mudanca de preco! Queriamos que voce soubesse' . + ' que os precos mudaram para esses produtos:', + 'locale' => 'pt_BR', + ] + ), + ] public function testProcessPortuguese() { - // get second store - $storeRepository = $this->objectManager->create(StoreRepository::class); - $secondStore = $storeRepository->get('fixture_second_store'); - - // check if Portuguese language is specified for the second store - $storeResolver = $this->objectManager->get(Resolver::class); - $storeResolver->emulate($secondStore->getId()); - $this->assertEquals('pt_BR', $storeResolver->getLocale()); - - // set translation data and check it - $modulesReader = $this->createPartialMock(Reader::class, ['getModuleDir']); - $modulesReader->method('getModuleDir') - ->willReturn(dirname(__DIR__) . '/../_files/i18n'); - /** @var Translate $translator */ - $translator = $this->objectManager->create(Translate::class, ['modulesReader' => $modulesReader]); - $translation = [ - 'Price change alert! We wanted you to know that prices have changed for these products:' => - 'Alerta de mudanca de preco! Queriamos que voce soubesse que os precos mudaram para esses produtos:' - ]; - $translator->loadData(); - $this->assertEquals($translation, $translator->getData()); - $this->objectManager->addSharedInstance($translator, Translate::class); - $this->objectManager->removeSharedInstance(PhraseRendererTranslate::class); - Phrase::setRenderer($this->objectManager->create(RendererInterface::class)); - // dispatch process() method and check sent message $this->processAlerts(); $message = $this->transportBuilder->getSentMessage(); $messageContent = $message->getBody()->getParts()[0]->getRawContent(); - $expectedText = array_shift($translation); + $expectedText = 'Alerta de mudanca de preco! Queriamos que voce soubesse' . + ' que os precos mudaram para esses produtos:'; $this->assertStringContainsString('/frontend/Magento/luma/pt_BR/', $messageContent); $this->assertStringContainsString(substr($expectedText, 0, 50), $messageContent); } From 983dbb73afe407d39f94aabbd08c9996664b2d79 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Fri, 27 Jan 2023 16:45:43 -0600 Subject: [PATCH 636/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Model/Resolver/Store/ConfigIdentity.php | 2 +- .../Magento/StoreGraphQl/etc/schema.graphqls | 2 +- .../Annotation/ApiConfigFixture.php | 101 ++++++--- .../GraphQl/Weee/StoreConfigFPTTest.php | 200 ++++++++---------- 4 files changed, 155 insertions(+), 150 deletions(-) diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php index 691ce7be8ad80..c2f7f583ae1eb 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php @@ -14,7 +14,7 @@ class ConfigIdentity implements IdentityInterface /** * @var string */ - const CACHE_TAG = 'gql_store_config'; + public const CACHE_TAG = 'gql_store_config'; /** * @inheritDoc diff --git a/app/code/Magento/StoreGraphQl/etc/schema.graphqls b/app/code/Magento/StoreGraphQl/etc/schema.graphqls index e6dd5dd075d67..383814440df3b 100644 --- a/app/code/Magento/StoreGraphQl/etc/schema.graphqls +++ b/app/code/Magento/StoreGraphQl/etc/schema.graphqls @@ -1,7 +1,7 @@ # Copyright © Magento, Inc. All rights reserved. # See COPYING.txt for license details. type Query { - storeConfig : StoreConfig @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\StoreConfigResolver") @doc(description: "Return details about the store's configuration.") @cache(cacheIdentity: "Magento\\StoreGraphQl\\Model\\Resolver\\Store\\Identity") + storeConfig : StoreConfig @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\StoreConfigResolver") @doc(description: "Return details about the store's configuration.") @cache(cacheIdentity: "Magento\\StoreGraphQl\\Model\\Resolver\\Store\\ConfigIdentity") availableStores( useCurrentGroup: Boolean @doc(description: "Filter store views by the current store group.") ): [StoreConfig] @resolver(class: "Magento\\StoreGraphQl\\Model\\Resolver\\AvailableStoresResolver") @doc(description: "Get a list of available store views and their config information.") diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php index e44819c597c33..99a0439581dd1 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php @@ -7,11 +7,12 @@ namespace Magento\TestFramework\Annotation; -use Magento\Config\Model\ResourceModel\Config as ConfigResource; +use Magento\Config\Model\Config\Factory as ConfigFactory; use Magento\Framework\App\Config\MutableScopeConfigInterface; use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Store\Api\StoreRepositoryInterface; +use Magento\Store\Api\WebsiteRepositoryInterface; use Magento\Store\Model\ScopeInterface; -use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\App\ApiMutableScopeConfig; use Magento\TestFramework\Config\Model\ConfigStorage; use Magento\TestFramework\Helper\Bootstrap; @@ -22,11 +23,11 @@ class ApiConfigFixture extends ConfigFixture { /** - * Values need to be deleted form the database + * Values are inherited * * @var array */ - private $valuesToDeleteFromDatabase = []; + private $valuesNotFromDatabase = []; /** * @inheritdoc @@ -40,7 +41,7 @@ protected function setStoreConfigValue(array $matches, $configPathAndValue): voi /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath, ScopeInterface::SCOPE_STORES, $storeCode)) { - $this->valuesToDeleteFromDatabase[$storeCode][$configPath ?? ''] = $requiredValue ?? ''; + $this->valuesNotFromDatabase[$storeCode][$configPath ?? ''] = $requiredValue ?? ''; } parent::setStoreConfigValue($matches, $configPathAndValue); @@ -56,7 +57,7 @@ protected function setGlobalConfigValue($configPathAndValue): void /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath)) { - $this->valuesToDeleteFromDatabase['global'][$configPath] = $requiredValue; + $this->valuesNotFromDatabase['global'][$configPath] = $requiredValue; } $originalValue = $this->getScopeConfigValue($configPath, ScopeConfigInterface::SCOPE_TYPE_DEFAULT); @@ -76,7 +77,7 @@ protected function setWebsiteConfigValue(array $matches, $configPathAndValue): v /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath, ScopeInterface::SCOPE_WEBSITES, $websiteCode)) { - $this->valuesToDeleteFromDatabase[$websiteCode][$configPath ?? ''] = $requiredValue ?? ''; + $this->valuesNotFromDatabase[$websiteCode][$configPath ?? ''] = $requiredValue ?? ''; } parent::setWebsiteConfigValue($matches, $configPathAndValue); @@ -88,12 +89,15 @@ protected function setWebsiteConfigValue(array $matches, $configPathAndValue): v */ protected function _restoreConfigData() { - /** @var ConfigResource $configResource */ - $configResource = Bootstrap::getObjectManager()->get(ConfigResource::class); /* Restore global values */ foreach ($this->globalConfigValues as $configPath => $originalValue) { - if (isset($this->valuesToDeleteFromDatabase['global'][$configPath])) { - $configResource->deleteConfig($configPath); + if (isset($this->valuesNotFromDatabase['global'][$configPath])) { + $this->inheritConfig( + $configPath, + $originalValue, + ScopeConfigInterface::SCOPE_TYPE_DEFAULT, + ScopeConfigInterface::SCOPE_TYPE_DEFAULT + ); } else { $this->_setConfigValue($configPath, $originalValue); } @@ -103,9 +107,13 @@ protected function _restoreConfigData() foreach ($this->storeConfigValues as $storeCode => $originalData) { foreach ($originalData as $configPath => $originalValue) { $storeCode = $storeCode ?: null; - if (isset($this->valuesToDeleteFromDatabase[$storeCode][$configPath])) { - $scopeId = $this->getIdByScopeType(ScopeInterface::SCOPE_STORES, $storeCode); - $configResource->deleteConfig($configPath, ScopeInterface::SCOPE_STORES, $scopeId); + if (isset($this->valuesNotFromDatabase[$storeCode][$configPath])) { + $this->inheritConfig( + $configPath, + (string)$originalValue, + ScopeInterface::SCOPE_STORES, + $storeCode + ); } else { $this->setScopeConfigValue( $configPath, @@ -121,9 +129,13 @@ protected function _restoreConfigData() foreach ($this->websiteConfigValues as $websiteCode => $originalData) { foreach ($originalData as $configPath => $originalValue) { $websiteCode = $websiteCode ?: null; - if (isset($this->valuesToDeleteFromDatabase[$websiteCode][$configPath])) { - $scopeId = $this->getIdByScopeType(ScopeInterface::SCOPE_WEBSITES, $websiteCode); - $configResource->deleteConfig($configPath, ScopeInterface::SCOPE_WEBSITES, $scopeId); + if (isset($this->valuesNotFromDatabase[$websiteCode][$configPath])) { + $this->inheritConfig( + $configPath, + $originalValue, + ScopeInterface::SCOPE_WEBSITES, + $websiteCode + ); } else { $this->setScopeConfigValue( $configPath, @@ -159,28 +171,47 @@ protected function getScopeConfigValue(string $configPath, string $scopeType, st } /** - * Get id by code + * Inherit the config and remove the config from database * + * @param string $path + * @param string $value * @param string $scopeType - * @param string|null $scopeId - * @return int + * @param string|null $scopeCode + * @return void */ - private function getIdByScopeType(string $scopeType, ?string $scopeId): int - { - $id = 0; - /** @var StoreManagerInterface $storeManager */ - $storeManager = Bootstrap::getObjectManager()->get(StoreManagerInterface::class); - switch ($scopeType) { - case ScopeInterface::SCOPE_WEBSITES: - $id = (int)$storeManager->getWebsite($scopeId)->getId(); - break; - case ScopeInterface::SCOPE_STORES: - $id = (int)$storeManager->getStore($scopeId)->getId(); - break; - default: - break; + private function inheritConfig( + string $path, + ?string $value, + string $scopeType, + ?string $scopeCode + ) { + $pathParts = explode('/', $path); + $store = 0; + $configData = [ + 'section' => $pathParts[0], + 'website' => '', + 'store' => $store, + 'groups' => [ + $pathParts[1] => [ + 'fields' => [ + $pathParts[2] => [ + 'value' => $value, + 'inherit' => 1 + ] + ] + ] + ] + ]; + $objectManager = Bootstrap::getObjectManager(); + if ($scopeType === ScopeInterface::SCOPE_STORE && $scopeCode !== null) { + $store = $objectManager->get(StoreRepositoryInterface::class)->get($scopeCode)->getId(); + $configData['store'] = $store; + } elseif ($scopeType === ScopeInterface::SCOPE_WEBSITES && $scopeCode !== null) { + $website = $objectManager->get(WebsiteRepositoryInterface::class)->get($scopeCode)->getId(); + $configData['store'] = ''; + $configData['website'] = $website; } - return $id; + $objectManager->get(ConfigFactory::class)->create(['data' => $configData])->save(); } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php index e513cf4606743..c009c0751c35e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php @@ -7,52 +7,67 @@ namespace Magento\GraphQl\Weee; -use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Framework\App\Config\Storage\WriterInterface; -use Magento\Framework\ObjectManager\ObjectManager; -use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; -use Magento\Weee\Model\Tax as WeeeDisplayConfig; -use Magento\Weee\Model\Config; /** * Test for storeConfig FPT config values + * + * @magentoDbIsolation enabled */ class StoreConfigFPTTest extends GraphQlAbstract { - /** @var ObjectManager $objectManager */ - private $objectManager; - /** - * @inheritdoc + * @magentoConfigFixture default/tax/weee/enable 1 + * @magentoConfigFixture default/tax/weee/display 0 + * @magentoConfigFixture default/tax/weee/display_list 0 + * @magentoConfigFixture default/tax/weee/display_sales 0 */ - protected function setUp(): void + public function testWeeTaxSettingsDisplayIncludedOnly() { - $this->objectManager = Bootstrap::getObjectManager(); + $query = $this->getStoreConfigQuery(); + $result = $this->graphQlQuery($query); + $this->assertArrayNotHasKey('errors', $result); + + $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); + + $displayValue = 'INCLUDE_FPT_WITHOUT_DETAILS'; + $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); } /** - * FPT All Display settings - * - * @param array $weeTaxSettings - * @param string $displayValue - * @return void - * - * @dataProvider sameFPTDisplaySettingsProvider + * @magentoConfigFixture default/tax/weee/enable 1 + * @magentoConfigFixture default/tax/weee/display 1 + * @magentoConfigFixture default/tax/weee/display_list 1 + * @magentoConfigFixture default/tax/weee/display_sales 1 */ - public function testSameFPTDisplaySettings(array $weeTaxSettings, $displayValue) + public function testWeeTaxSettingsDisplayIncludedAndDescription() { - /** @var WriterInterface $configWriter */ - $configWriter = $this->objectManager->get(WriterInterface::class); + $query = $this->getStoreConfigQuery(); + $result = $this->graphQlQuery($query); + $this->assertArrayNotHasKey('errors', $result); - foreach ($weeTaxSettings as $path => $value) { - $configWriter->save($path, $value); - } + $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - /** @var ScopeConfigInterface $scopeConfig */ - $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); - $scopeConfig->clean(); + $displayValue = 'INCLUDE_FPT_WITH_DETAILS'; + $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); + } + /** + * @magentoConfigFixture default/tax/weee/enable 1 + * @magentoConfigFixture default/tax/weee/display 2 + * @magentoConfigFixture default/tax/weee/display_list 2 + * @magentoConfigFixture default/tax/weee/display_sales 2 + */ + public function testWeeTaxSettingsDisplayIncludedAndExcludedAndDescription() + { $query = $this->getStoreConfigQuery(); $result = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $result); @@ -61,88 +76,66 @@ public function testSameFPTDisplaySettings(array $weeTaxSettings, $displayValue) $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); + $displayValue = 'EXCLUDE_FPT_AND_INCLUDE_WITH_DETAILS'; $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); } /** - * SameFPTDisplaySettings settings data provider - * - * @return array + * @magentoConfigFixture default/tax/weee/enable 1 + * @magentoConfigFixture default/tax/weee/display 3 + * @magentoConfigFixture default/tax/weee/display_list 3 + * @magentoConfigFixture default/tax/weee/display_sales 3 */ - public function sameFPTDisplaySettingsProvider() + public function testWeeTaxSettingsDisplayExcluded() { - return [ - [ - 'weeTaxSettingsDisplayIncludedOnly' => [ - 'tax/weee/enable' => '1', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_INCL, - ], - 'displayValue' => 'INCLUDE_FPT_WITHOUT_DETAILS', - ], - [ - 'weeTaxSettingsDisplayIncludedAndDescription' => [ - 'tax/weee/enable' => '1', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL_DESCR, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL_DESCR, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_INCL_DESCR, - ], - 'displayValue' => 'INCLUDE_FPT_WITH_DETAILS', - ], - [ - 'weeTaxSettingsDisplayIncludedAndExcludedAndDescription' => [ - 'tax/weee/enable' => '1', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, - ], - 'displayValue' => 'EXCLUDE_FPT_AND_INCLUDE_WITH_DETAILS', - ], - [ - 'weeTaxSettingsDisplayExcluded' => [ - 'tax/weee/enable' => '1', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL, - ], - 'displayValue' => 'EXCLUDE_FPT_WITHOUT_DETAILS', - ], - [ - 'weeTaxSettingsDisplayExcluded' => [ - 'tax/weee/enable' => '0', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL, - ], - 'displayValue' => 'FPT_DISABLED', - ], - ]; + $query = $this->getStoreConfigQuery(); + $result = $this->graphQlQuery($query); + $this->assertArrayNotHasKey('errors', $result); + + $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); + + $displayValue = 'EXCLUDE_FPT_WITHOUT_DETAILS'; + $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); } /** - * FPT Display setting shuffled - * - * @param array $weeTaxSettings - * @return void - * - * @dataProvider differentFPTDisplaySettingsProvider + * @magentoConfigFixture default/tax/weee/enable 0 + * @magentoConfigFixture default/tax/weee/display 3 + * @magentoConfigFixture default/tax/weee/display_list 3 + * @magentoConfigFixture default/tax/weee/display_sales 3 */ - public function testDifferentFPTDisplaySettings(array $weeTaxSettings) + public function testWeeTaxSettingsDisabled() { - /** @var WriterInterface $configWriter */ - $configWriter = $this->objectManager->get(WriterInterface::class); + $query = $this->getStoreConfigQuery(); + $result = $this->graphQlQuery($query); + $this->assertArrayNotHasKey('errors', $result); - foreach ($weeTaxSettings as $path => $value) { - $configWriter->save($path, $value); - } + $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - /** @var ScopeConfigInterface $scopeConfig */ - $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); - $scopeConfig->clean(); + $displayValue = 'FPT_DISABLED'; + $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); + $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); + } + /** + * FPT Display setting shuffled + * + * @magentoConfigFixture default/tax/weee/enable 1 + * @magentoConfigFixture default/tax/weee/display 0 + * @magentoConfigFixture default/tax/weee/display_list 1 + * @magentoConfigFixture default/tax/weee/display_sales 2 + */ + public function testDifferentFPTDisplaySettings() + { $query = $this->getStoreConfigQuery(); $result = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $result); @@ -165,25 +158,6 @@ public function testDifferentFPTDisplaySettings(array $weeTaxSettings) ); } - /** - * DifferentFPTDisplaySettings settings data provider - * - * @return array - */ - public function differentFPTDisplaySettingsProvider() - { - return [ - [ - 'weeTaxSettingsDisplay' => [ - 'tax/weee/enable' => '1', - Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL, - Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL_DESCR, - Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, - ] - ], - ]; - } - /** * Get GraphQl query to fetch storeConfig and FPT serttings * From 4b29aecbd45bac191367a60cff1c5ad667a6e4a6 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 30 Jan 2023 16:05:07 +0200 Subject: [PATCH 637/985] ACP2E-1344: fix failing MC-16186 --- .../Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml index 592c8b7981bed..77a7aedbc6c7b 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml @@ -19,13 +19,14 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> - <createData entity="Simple_US_Customer" stepKey="createCustomer"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="defaultSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + <magentoCLI command="cache:clean config" stepKey="cacheCleanBefore"/> </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> From 3b7c0e916c8d4ee040f6b79f6f3fa6931cd0f977 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Mon, 30 Jan 2023 21:00:18 +0530 Subject: [PATCH 638/985] ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule. --- .../SalesRule/view/adminhtml/ui_component/sales_rule_form.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml b/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml index b8c857dd0cf07..81f13fa1353bf 100644 --- a/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml +++ b/app/code/Magento/SalesRule/view/adminhtml/ui_component/sales_rule_form.xml @@ -199,7 +199,7 @@ </action> <action name="2"> <target>sales_rule_form.sales_rule_form.rule_information.uses_per_coupon</target> - <callback>hide</callback> + <callback>show</callback> </action> </actions> </rule> From ef6c9b8f95ff3c66367bb15e7b6c725b3d22d4f4 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Mon, 30 Jan 2023 21:58:34 +0530 Subject: [PATCH 639/985] ACP2E-1526 : No base64 image code in REST API response --- .../Backend/Media/ImageEntryConverter.php | 57 ++++++++++++++++++- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php index e8b619ac8bb84..0bbf4a732bb5b 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php @@ -7,8 +7,16 @@ namespace Magento\Catalog\Model\Product\Attribute\Backend\Media; use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; +use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory; use Magento\Catalog\Model\Product; use Magento\Framework\Api\Data\ImageContentInterface; +use Magento\Framework\Api\Data\ImageContentInterfaceFactory; +use Magento\Framework\Api\DataObjectHelper; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Driver\File\Mime; /** * Converter for Image media gallery type @@ -31,15 +39,42 @@ class ImageEntryConverter implements EntryConverterInterface protected $dataObjectHelper; /** - * @param \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory - * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper + * @var ImageContentInterfaceFactory + */ + protected $imageContentInterface; + + /** + * Filesystem facade + * + * @var Filesystem + */ + protected $filesystem; + + /** + * @var Mime + */ + protected $imageMime; + + /** + * @param ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory + * @param DataObjectHelper $dataObjectHelper + * @param ImageContentInterfaceFactory|null $imageContentInterface + * @param Filesystem|null $filesystem + * @param Mime|null $imageMime */ public function __construct( \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory, - \Magento\Framework\Api\DataObjectHelper $dataObjectHelper + \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, + ImageContentInterfaceFactory $imageContentInterface = null, + Filesystem $filesystem = null, + Mime $imageMime = null + ) { $this->mediaGalleryEntryFactory = $mediaGalleryEntryFactory; $this->dataObjectHelper = $dataObjectHelper; + $this->imageContentInterface = $imageContentInterface ?? ObjectManager::getInstance()->get(ImageContentInterfaceFactory::class); + $this->filesystem = $filesystem ?? ObjectManager::getInstance()->get(Filesystem::class); + $this->imageMime = $imageMime ?? ObjectManager::getInstance()->get(Mime::class); } /** @@ -71,9 +106,25 @@ public function convertTo(Product $product, array $rowData) if (isset($image['value_id'])) { $entry->setId($image['value_id']); } + $imageFileContent = file_get_contents($product->getMediaConfig()->getMediaUrl(($entry->getFile()))); + $entryContent = $this->imageContentInterface->create() + ->setName(basename($entry->getFile())) + ->setBase64EncodedData(base64_encode($imageFileContent)) + ->setType($this->getImageMimeType($product,$entry)); + $entry->setContent($entryContent); return $entry; } + /** + * @throws FileSystemException + */ + public function getImageMimeType($product, $entry) + { + $directory = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA); + $path = $directory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); + return $this->imageMime->getMimeType($path); + } + /** * @param ProductAttributeMediaGalleryEntryInterface $entry * @return array From 489019f3d5254a45d7e81ccc7e8e444b5446dae8 Mon Sep 17 00:00:00 2001 From: Rafal Janicki <rjanicki@adobe.com> Date: Mon, 30 Jan 2023 17:10:32 +0000 Subject: [PATCH 640/985] LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module (#82) * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Refactored tests for ProductAttributeFilterInput of products query in CatalogGraphQl module * LYNX-63: Fix static test in ProductSearchTest.php * LYNX-63: Fix for Product Search test with search suggestions * LYNX-63: Fixture for Indexer --- .../Magento/Indexer/Test/Fixture/Indexer.php | 44 +++++ .../CatalogGraphQl/ProductSearchTest.php | 187 ++++++++++++------ 2 files changed, 169 insertions(+), 62 deletions(-) create mode 100644 app/code/Magento/Indexer/Test/Fixture/Indexer.php diff --git a/app/code/Magento/Indexer/Test/Fixture/Indexer.php b/app/code/Magento/Indexer/Test/Fixture/Indexer.php new file mode 100644 index 0000000000000..7b0ea1197c42f --- /dev/null +++ b/app/code/Magento/Indexer/Test/Fixture/Indexer.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Indexer\Test\Fixture; + +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\DataFixtureInterface; +use Magento\Indexer\Model\Indexer as IndexerModel; +use Magento\Indexer\Model\Indexer\Collection; + +class Indexer implements DataFixtureInterface +{ + /** + * @var Collection + */ + private Collection $indexerCollection; + + /** + * @param Collection $indexerCollection + */ + public function __construct( + Collection $indexerCollection + ) { + $this->indexerCollection = $indexerCollection; + } + + /** + * {@inheritdoc} + * @param array $data Parameters + */ + public function apply(array $data = []): ?DataObject + { + $this->indexerCollection->load(); + /** @var IndexerModel $indexer */ + foreach ($this->indexerCollection->getItems() as $indexer) { + $indexer->reindexAll(); + } + return null; + } +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/ProductSearchTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/ProductSearchTest.php index b66ce63f06e15..e8d63d8cf64c7 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/ProductSearchTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CatalogGraphQl/ProductSearchTest.php @@ -7,10 +7,12 @@ namespace Magento\GraphQl\CatalogGraphQl; -use Magento\GraphQl\GetCustomerAuthenticationHeader; use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\GraphQlAbstract; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\Catalog\Test\Fixture\Product; +use Magento\Indexer\Test\Fixture\Indexer; /** * Test class to verify product search, used for GraphQL resolver @@ -24,35 +26,11 @@ class ProductSearchTest extends GraphQlAbstract private $objectManager; /** - * @var GetCustomerAuthenticationHeader + * Test setup */ - private $getCustomerAuthenticationHeader; - protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); - $this->getCustomerAuthenticationHeader = $this->objectManager->get(GetCustomerAuthenticationHeader::class); - } - - /** - * Test for checking if graphQL query fpr configurable product returns - * expected visible items - * - * @magentoApiDataFixture Magento/ConfigurableProduct/_files/configurable_products_with_different_super_attribute.php - */ - public function testCheckIfConfigurableProductVisibilityReturnsExpectedItem(): void - { - $productName = 'Configurable Product'; - $productSku = 'configurable'; - $query = $this->getProductSearchQuery($productName, $productSku); - - $response = $this->graphQlQuery($query); - - $this->assertNotEmpty($response['products']); - $this->assertEquals(1, $response['products']['total_count']); - $this->assertNotEmpty($response['products']['items']); - $this->assertEquals($productName, $response['products']['items'][0]['name']); - $this->assertEquals($productSku, $response['products']['items'][0]['sku']); } /** @@ -65,33 +43,68 @@ public function testCheckIfConfigurableProductVisibilityReturnsExpectedItem(): v private function getProductSearchQuery(string $productName, string $productSku): string { return <<<QUERY -{ - products(filter: {sku: {eq: "{$productSku}"}}, search: "$productName", sort: {}, pageSize: 200, currentPage: 1) { - total_count - page_info { - total_pages - current_page - page_size - } - items { - name - sku - } - } -} -QUERY; + { + products(filter: { + sku: { + eq: "{$productSku}" + }}, + search: "$productName", + sort: {}, + pageSize: 200, + currentPage: 1) + { + total_count + page_info { + total_pages + current_page + page_size + } + items { + name + sku + } + } + } + QUERY; } /** - * @magentoApiDataFixture Magento/Catalog/_files/products_with_layered_navigation_attribute.php + * Get a query which filters list of found products by array of SKUs + * + * @param array $products + * @param string $product + * @return string */ - public function testSearchSuggestions() : void + private function getProductSearchQueryWithMultipleSkusFilter(array $products, string $product): string { - $query = $this->getSearchQueryWithSuggestions(); - $response = $this->graphQlQuery($query); - $this->assertNotEmpty($response['products']); - $this->assertEmpty($response['products']['items']); - $this->assertNotEmpty($response['products']['suggestions']); + return <<<QUERY + { + products(filter: { + sku: { + in: [ + "{$products[0]->getSku()}", + "{$products[1]->getSku()}", + "{$products[2]->getSku()}" + ] + }}, + search: "$product", + sort: {}, + pageSize: 200, + currentPage: 1) + { + total_count + page_info { + total_pages + current_page + page_size + } + items { + name + sku + } + } + } + QUERY; } /** @@ -99,22 +112,72 @@ public function testSearchSuggestions() : void * * @return string */ - private function getSearchQueryWithSuggestions() : string + private function getSearchQueryWithSuggestions(): string { return <<<QUERY -{ - products( - search: "smiple" - ) { - items { - name - sku + { + products( + search: "smiple" + ) { + items { + name + sku + } + suggestions { + search + } + } + } + QUERY; } - suggestions { - search + + #[ + DataFixture(Product::class, as: 'product') + ] + public function testSearchProductsWithSkuEqFilterQuery(): void + { + /** @var \Magento\Catalog\Model\Product $product */ + $product = DataFixtureStorageManager::getStorage()->get('product'); + $response = $this->graphQlQuery($this->getProductSearchQuery($product->getName(), $product->getSku())); + + $this->assertNotEmpty($response['products']); + $this->assertEquals(1, $response['products']['total_count']); + $this->assertNotEmpty($response['products']['items']); + $this->assertEquals($product->getName(), $response['products']['items'][0]['name']); + $this->assertEquals($product->getSku(), $response['products']['items'][0]['sku']); } - } -} -QUERY; + + #[ + DataFixture(Product::class, as: 'product1'), + DataFixture(Product::class, as: 'product2'), + DataFixture(Product::class, as: 'product3') + ] + public function testSearchProductsWithMultipleSkuInFilterQuery(): void + { + /** @var \Magento\Catalog\Model\Product $product */ + $response = $this->graphQlQuery( + $this->getProductSearchQueryWithMultipleSkusFilter([ + DataFixtureStorageManager::getStorage()->get('product1'), + DataFixtureStorageManager::getStorage()->get('product2'), + DataFixtureStorageManager::getStorage()->get('product3') + ], "simple") + ); + + $this->assertNotEmpty($response['products']); + $this->assertEquals(3, $response['products']['total_count']); + $this->assertNotEmpty($response['products']['items']); + } + + #[ + DataFixture(Product::class, as: 'product1'), + DataFixture(Product::class, as: 'product2'), + DataFixture(Indexer::class, as: 'indexer') + ] + public function testSearchSuggestions(): void + { + $response = $this->graphQlQuery($this->getSearchQueryWithSuggestions()); + $this->assertNotEmpty($response['products']); + $this->assertEmpty($response['products']['items']); + $this->assertNotEmpty($response['products']['suggestions']); } } From 99ff3853ce3229ab2e97aef4b92e6618a0947324 Mon Sep 17 00:00:00 2001 From: soumah <soumah@adobe.com> Date: Mon, 30 Jan 2023 12:22:19 -0600 Subject: [PATCH 641/985] ACP2E-1494: Url Rewrite to external URL does not work on GraphQL --- app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls b/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls index 99c8ba7ae3848..5a4353cda90b2 100644 --- a/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls +++ b/app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls @@ -35,5 +35,5 @@ type RoutableUrl implements RoutableInterface @doc(description: "Default impleme interface RoutableInterface @typeResolver(class: "Magento\\UrlRewriteGraphQl\\Model\\RoutableInterfaceTypeResolver") @doc(description: "Routable entities serve as the model for a rendered page.") { relative_url: String @doc(description: "The internal relative URL. If the specified URL is a redirect, the query returns the redirected URL, not the original.") redirect_code: Int! @doc(description: "Contains 0 when there is no redirect error. A value of 301 indicates the URL of the requested resource has been changed permanently, while a value of 302 indicates a temporary redirect.") - type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE") + type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.") } From 727a5e994a24948ef8639d91850039a9a1a2a7e2 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Mon, 30 Jan 2023 14:11:39 -0600 Subject: [PATCH 642/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Magento/TestFramework/Annotation/ApiConfigFixture.php | 2 +- .../testsuite/Magento/GraphQl/Sales/ReorderTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php index 99a0439581dd1..536212cc8677b 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php @@ -203,7 +203,7 @@ private function inheritConfig( ] ]; $objectManager = Bootstrap::getObjectManager(); - if ($scopeType === ScopeInterface::SCOPE_STORE && $scopeCode !== null) { + if ($scopeType === ScopeInterface::SCOPE_STORES && $scopeCode !== null) { $store = $objectManager->get(StoreRepositoryInterface::class)->get($scopeCode)->getId(); $configData['store'] = $store; } elseif ($scopeType === ScopeInterface::SCOPE_WEBSITES && $scopeCode !== null) { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/ReorderTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/ReorderTest.php index b3b4b9331d217..84388cd98b4bd 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/ReorderTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/ReorderTest.php @@ -56,6 +56,7 @@ protected function setUp(): void } catch (NoSuchEntityException $e) { } } + /** * @magentoApiDataFixture Magento/Sales/_files/customer_order_item_with_product_and_custom_options.php */ From 7cf025600289983173f98a181253aa9573f791f7 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Mon, 30 Jan 2023 14:52:13 -0600 Subject: [PATCH 643/985] ACP2E-1508: Elastic search CRITICAL errors --- .../System/Config/Backend/Rss/Category.php | 59 ++++++++++++++ .../Magento/Catalog/etc/adminhtml/system.xml | 1 + .../Catalog/Model/Rss/CategoryTest.php | 78 +++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php create mode 100644 dev/tests/integration/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php new file mode 100644 index 0000000000000..ff530ed883069 --- /dev/null +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Model\System\Config\Backend\Rss; + +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductAttributeRepositoryInterface; +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Config\Value as ConfigValue; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; + +class Category extends ConfigValue +{ + /** + * @var ProductAttributeRepositoryInterface + */ + private $productAttributeRepository; + + public function __construct( + Context $context, + Registry $registry, + ScopeConfigInterface $config, + TypeListInterface $cacheTypeList, + AbstractResource $resource = null, + AbstractDb $resourceCollection = null, + array $data = [], + ProductAttributeRepositoryInterface $productAttributeRepository = null + ) { + parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + + $this->productAttributeRepository = $productAttributeRepository ?? + ObjectManager::getInstance()->get(ProductAttributeRepositoryInterface::class); + } + + /** + * @inheritdoc + */ + public function afterSave() + { + if ($this->isValueChanged() && $this->getValue()) { + $updatedAtAttr = $this->productAttributeRepository->get(ProductInterface::UPDATED_AT); + if (!$updatedAtAttr->getUsedForSortBy()) { + $updatedAtAttr->setUsedForSortBy(true); + $this->productAttributeRepository->save($updatedAtAttr); + } + } + + return parent::afterSave(); + } +} diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index 792ea1d13ec26..5df7412ccdf6e 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -199,6 +199,7 @@ <field id="category" translate="label" type="select" sortOrder="14" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Top Level Category</label> <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model> + <backend_model>Magento\Catalog\Model\System\Config\Backend\Rss\Category</backend_model> </field> </group> </section> diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php new file mode 100644 index 0000000000000..fbec477036eb8 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Rss/CategoryTest.php @@ -0,0 +1,78 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Model\Rss; + +use Magento\Catalog\Test\Fixture\Category as CategoryFixture; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Config\Model\Config as ConfigModel; +use Magento\Framework\App\Area; +use Magento\Framework\App\Config\ConfigResource\ConfigInterface as ConfigResource; +use Magento\Framework\Indexer\IndexerRegistry; +use Magento\Store\Model\StoreManagerInterface; +use Magento\TestFramework\Fixture\AppArea; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Fixture\DbIsolation; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +#[ + AppArea(Area::AREA_ADMINHTML), + DbIsolation(false), +] +class CategoryTest extends TestCase +{ + /** + * @var DataFixtureStorage + */ + private $fixtureStorage; + + /** + * @var Category + */ + private $model; + + /** + * @var StoreManagerInterface + */ + private $storeManager; + + protected function setUp(): void + { + $configModel = Bootstrap::getObjectManager()->create(ConfigModel::class); + $configModel->setDataByPath('rss/catalog/category', 1); + $configModel->save(); + $indexerRegistry = Bootstrap::getObjectManager()->get(IndexerRegistry::class); + $indexerRegistry->get('catalogsearch_fulltext')->reindexAll(); + + $this->fixtureStorage = DataFixtureStorageManager::getStorage(); + $this->model = Bootstrap::getObjectManager()->create(Category::class); + $this->storeManager = Bootstrap::getObjectManager()->get(StoreManagerInterface::class); + } + + protected function tearDown(): void + { + $configResource = Bootstrap::getObjectManager()->get(ConfigResource::class); + $configResource->deleteConfig('rss/catalog/category'); + } + + #[ + DataFixture(CategoryFixture::class, as: 'c1'), + DataFixture(ProductFixture::class, ['sku' => 'p1', 'category_ids' => ['$c1.id$']], 'p1'), + ] + public function testGetProductCollection(): void + { + $category = $this->fixtureStorage->get('c1'); + $store = $this->storeManager->getStore('default'); + $productCollection = $this->model->getProductCollection($category, $store->getId()); + self::assertEquals(1, $productCollection->count()); + $product = $productCollection->getFirstItem(); + self::assertEquals('p1', $product->getSku()); + } +} From bd02e157a2185f369ba7ab96177ed6dec9c7eb1c Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Mon, 30 Jan 2023 13:02:55 -0800 Subject: [PATCH 644/985] ACP2E-1547: Persistent Shopping Cart results in an Invalid state change requested error in checkout --- .../view/frontend/web/js/model/quote.js | 7 ++ .../shipping-rate-processor/new-address.js | 4 +- .../new-address.test.js | 105 ++++++++++++++++++ lib/web/mage/storage.js | 7 +- 4 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/shipping-rate-processor/new-address.test.js diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js b/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js index 3486a92736617..8c11c3ef719a8 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js @@ -141,6 +141,13 @@ define([ }); return total; + }, + + /** + * @return {Boolean} + */ + isPersistent: function () { + return !!Number(quoteData['is_persistent']); } }; }); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js index 9b2cbcb7a8738..0666ac0244e08 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js @@ -52,8 +52,10 @@ define([ shippingService.setShippingRates(cache); shippingService.isLoading(false); } else { + let async = quote.isPersistent() ? false : true; + storage.post( - serviceUrl, payload, false + serviceUrl, payload, false, 'application/json', {}, async ).done(function (result) { rateRegistry.set(address.getCacheKey(), result); shippingService.setShippingRates(result); diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/shipping-rate-processor/new-address.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/shipping-rate-processor/new-address.test.js new file mode 100644 index 0000000000000..3ed2839736249 --- /dev/null +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/model/shipping-rate-processor/new-address.test.js @@ -0,0 +1,105 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +define([ + 'squire', + 'jquery', + 'ko' +], function (Squire, $, ko) { + 'use strict'; + + var injector = new Squire(), + mixin, + serviceUrl = 'rest/V1/guest-carts/estimate-shipping-methods', + mocks = { + 'mage/storage': { + post: function () {} // jscs:ignore jsDoc + }, + 'Magento_Customer/js/customer-data': { + get: jasmine.createSpy().and.returnValue( + ko.observable({ + 'data_id': 1 + }) + ) + }, + 'Magento_Checkout/js/model/url-builder': { + createUrl: jasmine.createSpy().and.returnValue(serviceUrl) + } + }; + + describe('Magento_Checkout/js/model/shipping-rate-processor/new-address', function () { + beforeEach(function (done) { + window.checkoutConfig = { + 'quoteData': { + 'is_persistent': '0' + } + }; + + injector.mock(mocks); + injector.require(['Magento_Checkout/js/model/shipping-rate-processor/new-address'], function (Mixin) { + mixin = Mixin; + done(); + }); + }); + + afterEach(function () { + try { + injector.clean(); + injector.remove(); + } catch (e) {} + + delete window.checkoutConfig.quoteData.is_persistent; + }); + + it('Check that estimate-shipping-methods API is called synchronously for persistent cart', function () { + var deferral = new $.Deferred(); + + window.checkoutConfig.quoteData.is_persistent = '1'; + spyOn(mocks['mage/storage'], 'post').and.callFake(function () { + return deferral.resolve({}); + }); + + mixin.getRates({ + /** Stub */ + 'getCacheKey': function () { + return false; + } + }); + + expect(mocks['mage/storage'].post).toHaveBeenCalledWith( + serviceUrl, + '{"address":{}}', + false, + 'application/json', + {}, + false + ); + }); + + it('Check that estimate-shipping-methods API is called asynchronously', function () { + var deferral = new $.Deferred(); + + spyOn(mocks['mage/storage'], 'post').and.callFake(function () { + return deferral.resolve({}); + }); + + mixin.getRates({ + /** Stub */ + 'getCacheKey': function () { + return false; + } + }); + + expect(mocks['mage/storage'].post).toHaveBeenCalledWith( + serviceUrl, + '{"address":{}}', + false, + 'application/json', + {}, + true + ); + }); + }); +}); diff --git a/lib/web/mage/storage.js b/lib/web/mage/storage.js index ba7cb6a8795cf..e71d68bbff250 100644 --- a/lib/web/mage/storage.js +++ b/lib/web/mage/storage.js @@ -36,12 +36,14 @@ define(['jquery', 'mage/url'], function ($, urlBuilder) { * @param {Boolean} global * @param {String} contentType * @param {Object} headers + * @param {Boolean} async * @returns {Deferred} */ - post: function (url, data, global, contentType, headers) { + post: function (url, data, global, contentType, headers, async) { headers = headers || {}; global = global === undefined ? true : global; contentType = contentType || 'application/json'; + async = async === undefined ? true : async; return $.ajax({ url: urlBuilder.build(url), @@ -49,7 +51,8 @@ define(['jquery', 'mage/url'], function ($, urlBuilder) { data: data, global: global, contentType: contentType, - headers: headers + headers: headers, + async: async }); }, From f5ddd37d653f938513afcf752d6ae6d34d62a7e3 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Mon, 30 Jan 2023 15:33:48 -0600 Subject: [PATCH 645/985] AC-7850: [2.4.6-develop] Build Failures with PHP 8.2 --- composer.lock | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 7d542b7b5901c..8fe8ceaaefba6 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": "6009f7b2592b32f538a6ed701473c608", + "content-hash": "915a70d6c4e2eb88bdb9f6f25c5ffadd", "packages": [ { "name": "aws/aws-crt-php", @@ -5424,16 +5424,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.14", + "version": "3.0.18", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef" + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2f0b7af658cbea265cbb4a791d6c29a6613f98ef", - "reference": "2f0b7af658cbea265cbb4a791d6c29a6613f98ef", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f28693d38ba21bb0d9f0c411ee5dae2b178201da", + "reference": "f28693d38ba21bb0d9f0c411ee5dae2b178201da", "shasum": "" }, "require": { @@ -5445,6 +5445,7 @@ "phpunit/phpunit": "*" }, "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", @@ -5513,7 +5514,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.14" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" }, "funding": [ { @@ -5529,7 +5530,7 @@ "type": "tidelift" } ], - "time": "2022-04-04T05:15:45+00:00" + "time": "2022-12-17T18:26:50+00:00" }, { "name": "psr/container", @@ -13947,5 +13948,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From 4ca196adf634c78272cdf4a11c855fe488e80f12 Mon Sep 17 00:00:00 2001 From: Roman Flowers <flowers@adobe.com> Date: Mon, 30 Jan 2023 16:20:52 -0600 Subject: [PATCH 646/985] ACP2E-1564: Page Builder: Adding Product to cart from PB Grid/Carousel doubles up the item quantity --- .../view/frontend/templates/product/widget/content/grid.phtml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index da7003bfe5e26..8677a47e0729e 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -15,7 +15,6 @@ use Magento\Framework\App\Action\Action; // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis ?> - <?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?> <?php $type = 'widget-product-grid'; From c143fb4d64deb81cdea02fbf427c26bb466f3b9e Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Mon, 30 Jan 2023 16:23:51 -0600 Subject: [PATCH 647/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Annotation/ApiConfigFixture.php | 101 +++------ .../TestCase/GraphQlAbstract.php | 14 ++ .../GraphQl/Weee/StoreConfigFPTTest.php | 200 ++++++++++-------- 3 files changed, 162 insertions(+), 153 deletions(-) diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php index 536212cc8677b..e44819c597c33 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php @@ -7,12 +7,11 @@ namespace Magento\TestFramework\Annotation; -use Magento\Config\Model\Config\Factory as ConfigFactory; +use Magento\Config\Model\ResourceModel\Config as ConfigResource; use Magento\Framework\App\Config\MutableScopeConfigInterface; use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Store\Api\StoreRepositoryInterface; -use Magento\Store\Api\WebsiteRepositoryInterface; use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\App\ApiMutableScopeConfig; use Magento\TestFramework\Config\Model\ConfigStorage; use Magento\TestFramework\Helper\Bootstrap; @@ -23,11 +22,11 @@ class ApiConfigFixture extends ConfigFixture { /** - * Values are inherited + * Values need to be deleted form the database * * @var array */ - private $valuesNotFromDatabase = []; + private $valuesToDeleteFromDatabase = []; /** * @inheritdoc @@ -41,7 +40,7 @@ protected function setStoreConfigValue(array $matches, $configPathAndValue): voi /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath, ScopeInterface::SCOPE_STORES, $storeCode)) { - $this->valuesNotFromDatabase[$storeCode][$configPath ?? ''] = $requiredValue ?? ''; + $this->valuesToDeleteFromDatabase[$storeCode][$configPath ?? ''] = $requiredValue ?? ''; } parent::setStoreConfigValue($matches, $configPathAndValue); @@ -57,7 +56,7 @@ protected function setGlobalConfigValue($configPathAndValue): void /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath)) { - $this->valuesNotFromDatabase['global'][$configPath] = $requiredValue; + $this->valuesToDeleteFromDatabase['global'][$configPath] = $requiredValue; } $originalValue = $this->getScopeConfigValue($configPath, ScopeConfigInterface::SCOPE_TYPE_DEFAULT); @@ -77,7 +76,7 @@ protected function setWebsiteConfigValue(array $matches, $configPathAndValue): v /** @var ConfigStorage $configStorage */ $configStorage = Bootstrap::getObjectManager()->get(ConfigStorage::class); if (!$configStorage->checkIsRecordExist($configPath, ScopeInterface::SCOPE_WEBSITES, $websiteCode)) { - $this->valuesNotFromDatabase[$websiteCode][$configPath ?? ''] = $requiredValue ?? ''; + $this->valuesToDeleteFromDatabase[$websiteCode][$configPath ?? ''] = $requiredValue ?? ''; } parent::setWebsiteConfigValue($matches, $configPathAndValue); @@ -89,15 +88,12 @@ protected function setWebsiteConfigValue(array $matches, $configPathAndValue): v */ protected function _restoreConfigData() { + /** @var ConfigResource $configResource */ + $configResource = Bootstrap::getObjectManager()->get(ConfigResource::class); /* Restore global values */ foreach ($this->globalConfigValues as $configPath => $originalValue) { - if (isset($this->valuesNotFromDatabase['global'][$configPath])) { - $this->inheritConfig( - $configPath, - $originalValue, - ScopeConfigInterface::SCOPE_TYPE_DEFAULT, - ScopeConfigInterface::SCOPE_TYPE_DEFAULT - ); + if (isset($this->valuesToDeleteFromDatabase['global'][$configPath])) { + $configResource->deleteConfig($configPath); } else { $this->_setConfigValue($configPath, $originalValue); } @@ -107,13 +103,9 @@ protected function _restoreConfigData() foreach ($this->storeConfigValues as $storeCode => $originalData) { foreach ($originalData as $configPath => $originalValue) { $storeCode = $storeCode ?: null; - if (isset($this->valuesNotFromDatabase[$storeCode][$configPath])) { - $this->inheritConfig( - $configPath, - (string)$originalValue, - ScopeInterface::SCOPE_STORES, - $storeCode - ); + if (isset($this->valuesToDeleteFromDatabase[$storeCode][$configPath])) { + $scopeId = $this->getIdByScopeType(ScopeInterface::SCOPE_STORES, $storeCode); + $configResource->deleteConfig($configPath, ScopeInterface::SCOPE_STORES, $scopeId); } else { $this->setScopeConfigValue( $configPath, @@ -129,13 +121,9 @@ protected function _restoreConfigData() foreach ($this->websiteConfigValues as $websiteCode => $originalData) { foreach ($originalData as $configPath => $originalValue) { $websiteCode = $websiteCode ?: null; - if (isset($this->valuesNotFromDatabase[$websiteCode][$configPath])) { - $this->inheritConfig( - $configPath, - $originalValue, - ScopeInterface::SCOPE_WEBSITES, - $websiteCode - ); + if (isset($this->valuesToDeleteFromDatabase[$websiteCode][$configPath])) { + $scopeId = $this->getIdByScopeType(ScopeInterface::SCOPE_WEBSITES, $websiteCode); + $configResource->deleteConfig($configPath, ScopeInterface::SCOPE_WEBSITES, $scopeId); } else { $this->setScopeConfigValue( $configPath, @@ -171,47 +159,28 @@ protected function getScopeConfigValue(string $configPath, string $scopeType, st } /** - * Inherit the config and remove the config from database + * Get id by code * - * @param string $path - * @param string $value * @param string $scopeType - * @param string|null $scopeCode - * @return void + * @param string|null $scopeId + * @return int */ - private function inheritConfig( - string $path, - ?string $value, - string $scopeType, - ?string $scopeCode - ) { - $pathParts = explode('/', $path); - $store = 0; - $configData = [ - 'section' => $pathParts[0], - 'website' => '', - 'store' => $store, - 'groups' => [ - $pathParts[1] => [ - 'fields' => [ - $pathParts[2] => [ - 'value' => $value, - 'inherit' => 1 - ] - ] - ] - ] - ]; - $objectManager = Bootstrap::getObjectManager(); - if ($scopeType === ScopeInterface::SCOPE_STORES && $scopeCode !== null) { - $store = $objectManager->get(StoreRepositoryInterface::class)->get($scopeCode)->getId(); - $configData['store'] = $store; - } elseif ($scopeType === ScopeInterface::SCOPE_WEBSITES && $scopeCode !== null) { - $website = $objectManager->get(WebsiteRepositoryInterface::class)->get($scopeCode)->getId(); - $configData['store'] = ''; - $configData['website'] = $website; + private function getIdByScopeType(string $scopeType, ?string $scopeId): int + { + $id = 0; + /** @var StoreManagerInterface $storeManager */ + $storeManager = Bootstrap::getObjectManager()->get(StoreManagerInterface::class); + switch ($scopeType) { + case ScopeInterface::SCOPE_WEBSITES: + $id = (int)$storeManager->getWebsite($scopeId)->getId(); + break; + case ScopeInterface::SCOPE_STORES: + $id = (int)$storeManager->getStore($scopeId)->getId(); + break; + default: + break; } - $objectManager->get(ConfigFactory::class)->create(['data' => $configData])->save(); + return $id; } } diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php index c86f0a2c773db..47885ef747eb6 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php @@ -206,4 +206,18 @@ protected function assertResponseFields($actualResponse, $assertionMap) ); } } + + /** + * Flush page cache + * + * @return void + */ + protected function tearDown(): void + { + parent::tearDown(); + $appDir = dirname(Bootstrap::getInstance()->getAppTempDir()); + $out = ''; + // phpcs:ignore Magento2.Security.InsecureFunction + exec("php -f {$appDir}/bin/magento cache:flush full_page", $out); + } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php index c009c0751c35e..e513cf4606743 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Weee/StoreConfigFPTTest.php @@ -7,89 +7,52 @@ namespace Magento\GraphQl\Weee; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Config\Storage\WriterInterface; +use Magento\Framework\ObjectManager\ObjectManager; +use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQlAbstract; +use Magento\Weee\Model\Tax as WeeeDisplayConfig; +use Magento\Weee\Model\Config; /** * Test for storeConfig FPT config values - * - * @magentoDbIsolation enabled */ class StoreConfigFPTTest extends GraphQlAbstract { - /** - * @magentoConfigFixture default/tax/weee/enable 1 - * @magentoConfigFixture default/tax/weee/display 0 - * @magentoConfigFixture default/tax/weee/display_list 0 - * @magentoConfigFixture default/tax/weee/display_sales 0 - */ - public function testWeeTaxSettingsDisplayIncludedOnly() - { - $query = $this->getStoreConfigQuery(); - $result = $this->graphQlQuery($query); - $this->assertArrayNotHasKey('errors', $result); - - $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - - $displayValue = 'INCLUDE_FPT_WITHOUT_DETAILS'; - $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); - } + /** @var ObjectManager $objectManager */ + private $objectManager; /** - * @magentoConfigFixture default/tax/weee/enable 1 - * @magentoConfigFixture default/tax/weee/display 1 - * @magentoConfigFixture default/tax/weee/display_list 1 - * @magentoConfigFixture default/tax/weee/display_sales 1 + * @inheritdoc */ - public function testWeeTaxSettingsDisplayIncludedAndDescription() + protected function setUp(): void { - $query = $this->getStoreConfigQuery(); - $result = $this->graphQlQuery($query); - $this->assertArrayNotHasKey('errors', $result); - - $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - - $displayValue = 'INCLUDE_FPT_WITH_DETAILS'; - $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); + $this->objectManager = Bootstrap::getObjectManager(); } /** - * @magentoConfigFixture default/tax/weee/enable 1 - * @magentoConfigFixture default/tax/weee/display 2 - * @magentoConfigFixture default/tax/weee/display_list 2 - * @magentoConfigFixture default/tax/weee/display_sales 2 + * FPT All Display settings + * + * @param array $weeTaxSettings + * @param string $displayValue + * @return void + * + * @dataProvider sameFPTDisplaySettingsProvider */ - public function testWeeTaxSettingsDisplayIncludedAndExcludedAndDescription() + public function testSameFPTDisplaySettings(array $weeTaxSettings, $displayValue) { - $query = $this->getStoreConfigQuery(); - $result = $this->graphQlQuery($query); - $this->assertArrayNotHasKey('errors', $result); + /** @var WriterInterface $configWriter */ + $configWriter = $this->objectManager->get(WriterInterface::class); - $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); + foreach ($weeTaxSettings as $path => $value) { + $configWriter->save($path, $value); + } - $displayValue = 'EXCLUDE_FPT_AND_INCLUDE_WITH_DETAILS'; - $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); - } + /** @var ScopeConfigInterface $scopeConfig */ + $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); + $scopeConfig->clean(); - /** - * @magentoConfigFixture default/tax/weee/enable 1 - * @magentoConfigFixture default/tax/weee/display 3 - * @magentoConfigFixture default/tax/weee/display_list 3 - * @magentoConfigFixture default/tax/weee/display_sales 3 - */ - public function testWeeTaxSettingsDisplayExcluded() - { $query = $this->getStoreConfigQuery(); $result = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $result); @@ -98,44 +61,88 @@ public function testWeeTaxSettingsDisplayExcluded() $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - $displayValue = 'EXCLUDE_FPT_WITHOUT_DETAILS'; $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); } /** - * @magentoConfigFixture default/tax/weee/enable 0 - * @magentoConfigFixture default/tax/weee/display 3 - * @magentoConfigFixture default/tax/weee/display_list 3 - * @magentoConfigFixture default/tax/weee/display_sales 3 + * SameFPTDisplaySettings settings data provider + * + * @return array */ - public function testWeeTaxSettingsDisabled() + public function sameFPTDisplaySettingsProvider() { - $query = $this->getStoreConfigQuery(); - $result = $this->graphQlQuery($query); - $this->assertArrayNotHasKey('errors', $result); - - $this->assertNotEmpty($result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertNotEmpty($result['storeConfig']['sales_fixed_product_tax_display_setting']); - - $displayValue = 'FPT_DISABLED'; - $this->assertEquals($displayValue, $result['storeConfig']['product_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['category_fixed_product_tax_display_setting']); - $this->assertEquals($displayValue, $result['storeConfig']['sales_fixed_product_tax_display_setting']); + return [ + [ + 'weeTaxSettingsDisplayIncludedOnly' => [ + 'tax/weee/enable' => '1', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_INCL, + ], + 'displayValue' => 'INCLUDE_FPT_WITHOUT_DETAILS', + ], + [ + 'weeTaxSettingsDisplayIncludedAndDescription' => [ + 'tax/weee/enable' => '1', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL_DESCR, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL_DESCR, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_INCL_DESCR, + ], + 'displayValue' => 'INCLUDE_FPT_WITH_DETAILS', + ], + [ + 'weeTaxSettingsDisplayIncludedAndExcludedAndDescription' => [ + 'tax/weee/enable' => '1', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, + ], + 'displayValue' => 'EXCLUDE_FPT_AND_INCLUDE_WITH_DETAILS', + ], + [ + 'weeTaxSettingsDisplayExcluded' => [ + 'tax/weee/enable' => '1', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL, + ], + 'displayValue' => 'EXCLUDE_FPT_WITHOUT_DETAILS', + ], + [ + 'weeTaxSettingsDisplayExcluded' => [ + 'tax/weee/enable' => '0', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_EXCL, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_EXCL, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL, + ], + 'displayValue' => 'FPT_DISABLED', + ], + ]; } /** * FPT Display setting shuffled * - * @magentoConfigFixture default/tax/weee/enable 1 - * @magentoConfigFixture default/tax/weee/display 0 - * @magentoConfigFixture default/tax/weee/display_list 1 - * @magentoConfigFixture default/tax/weee/display_sales 2 + * @param array $weeTaxSettings + * @return void + * + * @dataProvider differentFPTDisplaySettingsProvider */ - public function testDifferentFPTDisplaySettings() + public function testDifferentFPTDisplaySettings(array $weeTaxSettings) { + /** @var WriterInterface $configWriter */ + $configWriter = $this->objectManager->get(WriterInterface::class); + + foreach ($weeTaxSettings as $path => $value) { + $configWriter->save($path, $value); + } + + /** @var ScopeConfigInterface $scopeConfig */ + $scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); + $scopeConfig->clean(); + $query = $this->getStoreConfigQuery(); $result = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $result); @@ -158,6 +165,25 @@ public function testDifferentFPTDisplaySettings() ); } + /** + * DifferentFPTDisplaySettings settings data provider + * + * @return array + */ + public function differentFPTDisplaySettingsProvider() + { + return [ + [ + 'weeTaxSettingsDisplay' => [ + 'tax/weee/enable' => '1', + Config::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW => WeeeDisplayConfig::DISPLAY_INCL, + Config::XML_PATH_FPT_DISPLAY_PRODUCT_LIST => WeeeDisplayConfig::DISPLAY_INCL_DESCR, + Config::XML_PATH_FPT_DISPLAY_SALES => WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL, + ] + ], + ]; + } + /** * Get GraphQl query to fetch storeConfig and FPT serttings * From df4f2d4e228af327418d047702faec0897835ffd Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Mon, 30 Jan 2023 19:45:09 -0600 Subject: [PATCH 648/985] AC-7850: [2.4.6-develop] Build Failures with PHP 8.2 --- .../integration/testsuite/Magento/Dhl/Model/CarrierTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php index 7a7fcfc558d07..baf5813c74884 100644 --- a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php +++ b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php @@ -286,7 +286,7 @@ public function testRequestToShip( new Response( 200, [], - utf8_encode(file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml')) + mb_convert_encoding(file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml'), 'UTF-8') ) ] ); From 5e3202ce4f7c79e2ea7a51ed186d8a5aae0db311 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Mon, 30 Jan 2023 20:31:04 -0600 Subject: [PATCH 649/985] ACP2E-1508: Elastic search CRITICAL errors --- .../System/Config/Backend/Rss/Category.php | 10 ++ .../Config/Backend/Rss/CategoryTest.php | 107 ++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Unit/Model/System/Config/Backend/Rss/CategoryTest.php diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php index ff530ed883069..0df9da31f80ad 100644 --- a/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php +++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Rss/Category.php @@ -25,6 +25,16 @@ class Category extends ConfigValue */ private $productAttributeRepository; + /** + * @param Context $context + * @param Registry $registry + * @param ScopeConfigInterface $config + * @param TypeListInterface $cacheTypeList + * @param AbstractResource|null $resource + * @param AbstractDb|null $resourceCollection + * @param array $data + * @param ProductAttributeRepositoryInterface|null $productAttributeRepository + */ public function __construct( Context $context, Registry $registry, diff --git a/app/code/Magento/Catalog/Test/Unit/Model/System/Config/Backend/Rss/CategoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/System/Config/Backend/Rss/CategoryTest.php new file mode 100644 index 0000000000000..1a2d52c35756e --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Model/System/Config/Backend/Rss/CategoryTest.php @@ -0,0 +1,107 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Model\System\Config\Backend\Rss; + +use Magento\Catalog\Api\Data\ProductAttributeInterface; +use Magento\Catalog\Api\ProductAttributeRepositoryInterface; +use Magento\Catalog\Model\System\Config\Backend\Rss\Category; +use Magento\Framework\App\Cache\TypeListInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Event\ManagerInterface as EventManager; +use Magento\Framework\Model\Context; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class CategoryTest extends TestCase +{ + /** + * @var ScopeConfigInterface|MockObject + */ + private $configMock; + + /** + * @var ProductAttributeRepositoryInterface|MockObject + */ + private $productAttributeRepositoryMock; + + /** + * @var Category + */ + private $model; + + protected function setUp(): void + { + $contextMock = $this->createMock(Context::class); + $eventManagerMock = $this->createMock(EventManager::class); + $contextMock->method('getEventDispatcher') + ->willReturn($eventManagerMock); + $registryMock = $this->createMock(Registry::class); + $this->configMock = $this->createMock(ScopeConfigInterface::class); + $cacheTypeListMock = $this->createMock(TypeListInterface::class); + $resourceMock = $this->createMock(AbstractResource::class); + $resourceCollectionMock = $this->createMock(AbstractDb::class); + $this->productAttributeRepositoryMock = $this->createMock(ProductAttributeRepositoryInterface::class); + $this->model = new Category( + $contextMock, + $registryMock, + $this->configMock, + $cacheTypeListMock, + $resourceMock, + $resourceCollectionMock, + ['path' => 'rss/catalog/category'], + $this->productAttributeRepositoryMock + ); + } + + /** + * @dataProvider afterSaveDataProvider + * @param string $oldValue + * @param string $newValue + * @param bool $isUsedForSort + * @param bool $isUpdateNeeded + */ + public function testAfterSave(string $oldValue, string $newValue, bool $isUsedForSort, bool $isUpdateNeeded): void + { + $this->configMock->expects($this->atLeastOnce()) + ->method('getValue') + ->with('rss/catalog/category', 'default', null) + ->willReturn($oldValue); + + $productAttributeMock = $this->createMock(ProductAttributeInterface::class); + $productAttributeMock->method('getUsedForSortBy') + ->willReturn($isUsedForSort); + $this->productAttributeRepositoryMock->method('get') + ->with('updated_at') + ->willReturn($productAttributeMock); + + $productAttributeMock->expects($this->exactly((int) $isUpdateNeeded)) + ->method('setUsedForSortBy') + ->with(true) + ->willReturnSelf(); + $this->productAttributeRepositoryMock->expects($this->exactly((int) $isUpdateNeeded)) + ->method('save') + ->with($productAttributeMock) + ->willReturn($productAttributeMock); + + $this->model->setValue($newValue); + $this->model->afterSave(); + } + + public function afterSaveDataProvider(): array + { + return [ + ['0', '1', false, true], + ['0', '0', false, false], + ['1', '0', false, false], + ['0', '1', true, false], + ]; + } +} From 64c117b803d4288836e96120cb249ba591335c81 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 31 Jan 2023 12:53:17 +0530 Subject: [PATCH 650/985] ACP2E-1526 : changed logic based on build failures --- .../Backend/Media/ImageEntryConverter.php | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php index 0bbf4a732bb5b..38b2a54a57041 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php @@ -26,7 +26,7 @@ class ImageEntryConverter implements EntryConverterInterface /** * Media Entry type code */ - const MEDIA_TYPE_CODE = 'image'; + public const MEDIA_TYPE_CODE = 'image'; /** * @var \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory @@ -68,7 +68,6 @@ public function __construct( ImageContentInterfaceFactory $imageContentInterface = null, Filesystem $filesystem = null, Mime $imageMime = null - ) { $this->mediaGalleryEntryFactory = $mediaGalleryEntryFactory; $this->dataObjectHelper = $dataObjectHelper; @@ -89,6 +88,7 @@ public function getMediaEntryType() * @param Product $product * @param array $rowData * @return ProductAttributeMediaGalleryEntryInterface $entry + * @throws FileSystemException */ public function convertTo(Product $product, array $rowData) { @@ -106,25 +106,17 @@ public function convertTo(Product $product, array $rowData) if (isset($image['value_id'])) { $entry->setId($image['value_id']); } - $imageFileContent = file_get_contents($product->getMediaConfig()->getMediaUrl(($entry->getFile()))); + $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $path = $mediaDirectory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); + $imageFileContent = $mediaDirectory->getDriver()->fileGetContents($path); $entryContent = $this->imageContentInterface->create() ->setName(basename($entry->getFile())) ->setBase64EncodedData(base64_encode($imageFileContent)) - ->setType($this->getImageMimeType($product,$entry)); + ->setType($this->imageMime->getMimeType($path)); $entry->setContent($entryContent); return $entry; } - /** - * @throws FileSystemException - */ - public function getImageMimeType($product, $entry) - { - $directory = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA); - $path = $directory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); - return $this->imageMime->getMimeType($path); - } - /** * @param ProductAttributeMediaGalleryEntryInterface $entry * @return array From 7cf2ef884d39714afea5011692ad0ba973a667c0 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 31 Jan 2023 16:14:43 +0530 Subject: [PATCH 651/985] ACP2E-1526 : changed logic based on build failures --- .../Backend/Media/ImageEntryConverter.php | 43 +-------------- .../Product/Gallery/GalleryManagement.php | 52 ++++++++++++++++++- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php index 38b2a54a57041..c6227a25782bc 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php @@ -10,13 +10,7 @@ use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory; use Magento\Catalog\Model\Product; use Magento\Framework\Api\Data\ImageContentInterface; -use Magento\Framework\Api\Data\ImageContentInterfaceFactory; use Magento\Framework\Api\DataObjectHelper; -use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Exception\FileSystemException; -use Magento\Framework\Filesystem; -use Magento\Framework\Filesystem\Driver\File\Mime; /** * Converter for Image media gallery type @@ -38,42 +32,16 @@ class ImageEntryConverter implements EntryConverterInterface */ protected $dataObjectHelper; - /** - * @var ImageContentInterfaceFactory - */ - protected $imageContentInterface; - - /** - * Filesystem facade - * - * @var Filesystem - */ - protected $filesystem; - - /** - * @var Mime - */ - protected $imageMime; - /** * @param ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory * @param DataObjectHelper $dataObjectHelper - * @param ImageContentInterfaceFactory|null $imageContentInterface - * @param Filesystem|null $filesystem - * @param Mime|null $imageMime */ public function __construct( \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory, - \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, - ImageContentInterfaceFactory $imageContentInterface = null, - Filesystem $filesystem = null, - Mime $imageMime = null + \Magento\Framework\Api\DataObjectHelper $dataObjectHelper ) { $this->mediaGalleryEntryFactory = $mediaGalleryEntryFactory; $this->dataObjectHelper = $dataObjectHelper; - $this->imageContentInterface = $imageContentInterface ?? ObjectManager::getInstance()->get(ImageContentInterfaceFactory::class); - $this->filesystem = $filesystem ?? ObjectManager::getInstance()->get(Filesystem::class); - $this->imageMime = $imageMime ?? ObjectManager::getInstance()->get(Mime::class); } /** @@ -88,7 +56,6 @@ public function getMediaEntryType() * @param Product $product * @param array $rowData * @return ProductAttributeMediaGalleryEntryInterface $entry - * @throws FileSystemException */ public function convertTo(Product $product, array $rowData) { @@ -106,14 +73,6 @@ public function convertTo(Product $product, array $rowData) if (isset($image['value_id'])) { $entry->setId($image['value_id']); } - $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); - $path = $mediaDirectory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); - $imageFileContent = $mediaDirectory->getDriver()->fileGetContents($path); - $entryContent = $this->imageContentInterface->create() - ->setName(basename($entry->getFile())) - ->setBase64EncodedData(base64_encode($imageFileContent)) - ->setType($this->imageMime->getMimeType($path)); - $entry->setContent($entryContent); return $entry; } diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index 1105960e36d82..4123235f121a5 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -9,11 +9,16 @@ use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; use Magento\Catalog\Api\Data\ProductInterfaceFactory; use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Framework\Api\Data\ImageContentInterface; +use Magento\Framework\Api\Data\ImageContentInterfaceFactory; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\StateException; use Magento\Framework\Api\ImageContentValidatorInterface; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Driver\File\Mime; /** * Class GalleryManagement @@ -44,18 +49,41 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal */ private $deleteValidator; + /** + * @var ImageContentInterfaceFactory + */ + protected $imageContentInterface; + + /** + * Filesystem facade + * + * @var Filesystem + */ + protected $filesystem; + + /** + * @var Mime + */ + protected $imageMime; + /** * @param ProductRepositoryInterface $productRepository * @param ImageContentValidatorInterface $contentValidator * @param ProductInterfaceFactory|null $productInterfaceFactory * @param DeleteValidator|null $deleteValidator + * @param ImageContentInterfaceFactory|null $imageContentInterface + * @param Filesystem|null $filesystem + * @param Mime|null $imageMime * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ProductRepositoryInterface $productRepository, ImageContentValidatorInterface $contentValidator, ?ProductInterfaceFactory $productInterfaceFactory = null, - ?DeleteValidator $deleteValidator = null + ?DeleteValidator $deleteValidator = null, + ?ImageContentInterfaceFactory $imageContentInterface = null, + ?Filesystem $filesystem = null, + ?Mime $imageMime = null ) { $this->productRepository = $productRepository; $this->contentValidator = $contentValidator; @@ -63,6 +91,12 @@ public function __construct( ?? ObjectManager::getInstance()->get(ProductInterfaceFactory::class); $this->deleteValidator = $deleteValidator ?? ObjectManager::getInstance()->get(DeleteValidator::class); + $this->imageContentInterface = $imageContentInterface + ?? ObjectManager::getInstance()->get(ImageContentInterfaceFactory::class); + $this->filesystem = $filesystem + ?? ObjectManager::getInstance()->get(Filesystem::class); + $this->imageMime = $imageMime + ?? ObjectManager::getInstance()->get(Mime::class); } /** @@ -217,7 +251,21 @@ public function getList($sku) { /** @var \Magento\Catalog\Model\Product $product */ $product = $this->productRepository->get($sku); + $mediaGalleryEntries = $product->getMediaGalleryEntries(); + foreach ($mediaGalleryEntries as $entry) { + $entry->setContent($this->getImageContent($product, $entry)); + } + return $mediaGalleryEntries; + } - return $product->getMediaGalleryEntries(); + private function getImageContent($product, $entry): ImageContentInterface + { + $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $path = $mediaDirectory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); + $imageFileContent = $mediaDirectory->getDriver()->fileGetContents($path); + return $this->imageContentInterface->create() + ->setName(basename($entry->getFile())) + ->setBase64EncodedData(base64_encode($imageFileContent)) + ->setType($this->imageMime->getMimeType($path)); } } From 142e2246d0dc853ba554256280bd24e0ae100932 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 31 Jan 2023 16:38:34 +0530 Subject: [PATCH 652/985] ACP2E-1526 : reverting changes --- .../Attribute/Backend/Media/ImageEntryConverter.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php index c6227a25782bc..e8b619ac8bb84 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php @@ -7,10 +7,8 @@ namespace Magento\Catalog\Model\Product\Attribute\Backend\Media; use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; -use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory; use Magento\Catalog\Model\Product; use Magento\Framework\Api\Data\ImageContentInterface; -use Magento\Framework\Api\DataObjectHelper; /** * Converter for Image media gallery type @@ -20,7 +18,7 @@ class ImageEntryConverter implements EntryConverterInterface /** * Media Entry type code */ - public const MEDIA_TYPE_CODE = 'image'; + const MEDIA_TYPE_CODE = 'image'; /** * @var \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory @@ -33,8 +31,8 @@ class ImageEntryConverter implements EntryConverterInterface protected $dataObjectHelper; /** - * @param ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory - * @param DataObjectHelper $dataObjectHelper + * @param \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory + * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper */ public function __construct( \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory $mediaGalleryEntryFactory, From 94938d9640245aebb13b00b8dc2b1eacfeb622e9 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Tue, 31 Jan 2023 18:12:37 +0530 Subject: [PATCH 653/985] [2.4.6-develop] Build Failures with PHP 8.2 --- .../testsuite/Magento/Framework/Stdlib/CookieManagerTest.php | 2 +- .../testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php index da5cec838729d..799e4088b5ba2 100644 --- a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php @@ -144,7 +144,7 @@ public function testDeleteCookie() if (isset($cookie['max-age'])) { $this->assertEquals(0, $cookie['max-age']); } - $this->assertEquals('Thu, 01-Jan-1970 00:00:01 GMT', $cookie['expires']); + $this->assertEquals('Thu, 01 Jan 1970 00:00:01 GMT', $cookie['expires']); } /** diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php index 09e0256f80f41..79d55ea4ed08a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchTest.php @@ -1746,6 +1746,7 @@ public function testFilteringForProductsFromMultipleCategories() */ public function testFilterProductsBySingleCategoryId(string $fieldName, string $queryCategoryId) { + CacheCleaner::clean(['config']); if (is_numeric($queryCategoryId)) { $queryCategoryId = (int) $queryCategoryId; } From 828c6ee340cc1b7ab3a291045cd07f927a35f153 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 31 Jan 2023 07:13:05 -0600 Subject: [PATCH 654/985] ACP2E-1552: Customer Product Reviews filter by store id is not working --- .../Magento/Review/Test/Fixture/Review.php | 1 + .../GraphQl/Review/GetProductReviewsTest.php | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/app/code/Magento/Review/Test/Fixture/Review.php b/app/code/Magento/Review/Test/Fixture/Review.php index ca8c57bb34351..90f0911e24a0c 100644 --- a/app/code/Magento/Review/Test/Fixture/Review.php +++ b/app/code/Magento/Review/Test/Fixture/Review.php @@ -23,6 +23,7 @@ class Review implements RevertibleDataFixtureInterface 'detail' => 'Review detail', 'status_id' => ReviewModel::STATUS_APPROVED, 'store_id' => 1, + 'customer_id' => null, ]; /** diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php index c1083b866eae0..da4660ce55939 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php @@ -19,6 +19,7 @@ use Magento\Review\Test\Fixture\Review as ReviewFixture; use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Test\Fixture\Store as StoreFixture; +use Magento\Customer\Test\Fixture\Customer as CustomerFixture; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\ObjectManager; @@ -288,6 +289,57 @@ public function testProductReviewDifferentStores(string $storeCode): void self::assertCount(1, $response['products']['items'][0]['reviews']['items']); } + #[ + DataFixture(StoreFixture::class, ['code' => 'store2'], 'store2'), + DataFixture(CustomerFixture::class, ['email' => 'customer@example.com'], 'customer'), + DataFixture(ProductFixture::class, ['sku' => 'product1'], 'product1'), + DataFixture(ReviewFixture::class, [ + 'entity_pk_value' => '$product1.id$', + 'customer_id' => '$customer.entity_id$' + ]), + DataFixture(ReviewFixture::class, [ + 'entity_pk_value' => '$product1.id$', + 'store_id' => '$store2.id$', + 'customer_id' => '$customer.entity_id$' + ]), + ] + /** + * @dataProvider storesDataProvider + * @param string $storeCode + */ + public function testCustomerReviewDifferentStores(string $storeCode): void + { + $query = <<<QUERY +{ + customer { + firstname + lastname + suffix + email + reviews( + currentPage: 1 + pageSize: 20 + ) { + items { + summary + text + summary + } + } + } +} +QUERY; + $headers = array ('Store' => $storeCode, 'Authorization' => implode($this->getHeaderMap())); + $response = $this->graphQlQuery($query, [], '', $headers); + self::assertArrayHasKey('customer', $response); + self::assertArrayHasKey('reviews', $response['customer']); + self::assertArrayHasKey('items', $response['customer']['reviews']); + self::assertNotEmpty($response['customer']['reviews']['items']); + var_dump($response); + self::assertCount(1, $response['customer']['reviews']['items']); + } + + /** * @return array */ From 5550cf1522bcb45c6a1b1a3ec714e32199999fa1 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 31 Jan 2023 08:00:33 -0600 Subject: [PATCH 655/985] ACP2E-1552: Customer Product Reviews filter by store id is not working --- .../testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php index da4660ce55939..d2024474037b2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php @@ -335,7 +335,6 @@ public function testCustomerReviewDifferentStores(string $storeCode): void self::assertArrayHasKey('reviews', $response['customer']); self::assertArrayHasKey('items', $response['customer']['reviews']); self::assertNotEmpty($response['customer']['reviews']['items']); - var_dump($response); self::assertCount(1, $response['customer']['reviews']['items']); } From de012a3e8a3b53c902e1e65a81de790ba97621fc Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 31 Jan 2023 08:50:05 -0600 Subject: [PATCH 656/985] ACP2E-1552: Customer Product Reviews filter by store id is not working --- .../testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php index d2024474037b2..71f24f30636ab 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Review/GetProductReviewsTest.php @@ -329,7 +329,7 @@ public function testCustomerReviewDifferentStores(string $storeCode): void } } QUERY; - $headers = array ('Store' => $storeCode, 'Authorization' => implode($this->getHeaderMap())); + $headers = ['Store' => $storeCode, 'Authorization' => implode($this->getHeaderMap())]; $response = $this->graphQlQuery($query, [], '', $headers); self::assertArrayHasKey('customer', $response); self::assertArrayHasKey('reviews', $response['customer']); @@ -338,7 +338,6 @@ public function testCustomerReviewDifferentStores(string $storeCode): void self::assertCount(1, $response['customer']['reviews']['items']); } - /** * @return array */ From e124d655dfe3776e8000f7f1d1779d784f8aa0e8 Mon Sep 17 00:00:00 2001 From: Olga Moyseyenko <moyseyen@adobe.com> Date: Tue, 31 Jan 2023 12:01:51 -0600 Subject: [PATCH 657/985] ACP2E-1604: Running setup:config:set without lock-db-prefix parameter specified erases existent prefix value --- .../Setup/Model/ConfigOptionsList/Lock.php | 7 +- .../Unit/Model/ConfigOptionsList/LockTest.php | 96 +++++++++++++++++++ 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php b/setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php index 76cd7aa74c664..0137295abf7a1 100644 --- a/setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php +++ b/setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php @@ -316,9 +316,10 @@ private function setDefaultConfiguration( string $lockProvider ) { foreach ($this->mappingInputKeyToConfigPath[$lockProvider] as $input => $path) { - // do not set default value null for lock db prefix - if ($input !== self::INPUT_KEY_LOCK_DB_PREFIX) { - $configData->set($path, $deploymentConfig->get($path, $this->getDefaultValue($input))); + // do not set default value null for lock db prefix, but save current value if it exists + $defaultValue = $deploymentConfig->get($path, $this->getDefaultValue($input)); + if (($input !== self::INPUT_KEY_LOCK_DB_PREFIX) || ($defaultValue !== null)) { + $configData->set($path, $defaultValue); } } diff --git a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/LockTest.php b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/LockTest.php index 83f16d4fba14d..2693cc093701c 100644 --- a/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/LockTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/LockTest.php @@ -194,6 +194,102 @@ public function createConfigDataProvider(): array ]; } + /** + * @param array $options + * @param array $expectedResult + * @dataProvider updateConfigDataProvider + */ + public function testUpdateConfig(array $options, array $expectedResult) + { + $valueMap = [ + [ 'lock/config/prefix', null, 'saved_prefix' ], + [ 'lock/provider', 'db', 'db' ] + ]; + $this->deploymentConfigMock + ->expects($this->any()) + ->method('get') + ->willReturnMap($valueMap); + $data = $this->lockConfigOptionsList->createConfig($options, $this->deploymentConfigMock); + $this->assertInstanceOf(ConfigData::class, $data); + $this->assertTrue($data->isOverrideWhenSave()); + $this->assertSame($expectedResult, $data->getData()); + } + + /** + * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function updateConfigDataProvider(): array + { + return [ + 'Check existent value for lock-db-prefix is not erased with no parameter specified' => [ + 'options' => [], + 'expectedResult' => [ + 'lock' => [ + 'provider' => LockBackendFactory::LOCK_DB, + 'config' => [ + 'prefix' => 'saved_prefix', + ], + ], + ], + ], + 'Check lock-db-prefix options overrides existing value when parameter is specified' => [ + 'options' => [ + LockConfigOptionsList::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB, + LockConfigOptionsList::INPUT_KEY_LOCK_DB_PREFIX => 'new_prefix' + ], + 'expectedResult' => [ + 'lock' => [ + 'provider' => LockBackendFactory::LOCK_DB, + 'config' => [ + 'prefix' => 'new_prefix', + ], + ], + ], + ], + 'Check lock-db-prefix options overrides existing value when only this parameter is specified' => [ + 'options' => [ + LockConfigOptionsList::INPUT_KEY_LOCK_DB_PREFIX => 'new_prefix' + ], + 'expectedResult' => [ + 'lock' => [ + 'provider' => LockBackendFactory::LOCK_DB, + 'config' => [ + 'prefix' => 'new_prefix', + ], + ], + ], + ], + 'Check that lock-db-prefix value is not erased when when only lock-provider is specified as db' => [ + 'options' => [ + LockConfigOptionsList::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB, + ], + 'expectedResult' => [ + 'lock' => [ + 'provider' => LockBackendFactory::LOCK_DB, + 'config' => [ + 'prefix' => 'saved_prefix', + ], + ], + ], + ], + 'Check specific db lock prefix empty options overrides existing value' => [ + 'options' => [ + LockConfigOptionsList::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB, + LockConfigOptionsList::INPUT_KEY_LOCK_DB_PREFIX => '' + ], + 'expectedResult' => [ + 'lock' => [ + 'provider' => LockBackendFactory::LOCK_DB, + 'config' => [ + 'prefix' => '', + ], + ], + ], + ], + ]; + } + /** * @param array $options * @param array $expectedResult From 20ef52df4b4952bb773afa729f66f0221338af7c Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 31 Jan 2023 23:36:06 +0530 Subject: [PATCH 658/985] ACP2E-1526 : Fixed build failures --- .../Product/Gallery/GalleryManagement.php | 38 +++++++++++++++---- .../Product/Gallery/GalleryManagementTest.php | 34 ++++++++++++++++- 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index 4123235f121a5..df9e601f894c7 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -9,16 +9,19 @@ use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; use Magento\Catalog\Api\Data\ProductInterfaceFactory; use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product; use Magento\Framework\Api\Data\ImageContentInterface; use Magento\Framework\Api\Data\ImageContentInterfaceFactory; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\StateException; use Magento\Framework\Api\ImageContentValidatorInterface; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\Driver\File\Mime; +use Magento\Framework\Filesystem\Io\File; /** * Class GalleryManagement @@ -64,7 +67,12 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal /** * @var Mime */ - protected $imageMime; + protected $mime; + + /** + * @var File + */ + protected $file; /** * @param ProductRepositoryInterface $productRepository @@ -73,7 +81,8 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal * @param DeleteValidator|null $deleteValidator * @param ImageContentInterfaceFactory|null $imageContentInterface * @param Filesystem|null $filesystem - * @param Mime|null $imageMime + * @param Mime|null $mime + * @param File|null $file * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -83,7 +92,8 @@ public function __construct( ?DeleteValidator $deleteValidator = null, ?ImageContentInterfaceFactory $imageContentInterface = null, ?Filesystem $filesystem = null, - ?Mime $imageMime = null + ?Mime $mime = null, + ?File $file = null ) { $this->productRepository = $productRepository; $this->contentValidator = $contentValidator; @@ -95,8 +105,12 @@ public function __construct( ?? ObjectManager::getInstance()->get(ImageContentInterfaceFactory::class); $this->filesystem = $filesystem ?? ObjectManager::getInstance()->get(Filesystem::class); - $this->imageMime = $imageMime + $this->mime = $mime ?? ObjectManager::getInstance()->get(Mime::class); + $this->file = $file + ?? ObjectManager::getInstance()->get( + File::class + ); } /** @@ -249,23 +263,31 @@ public function get($sku, $entryId) */ public function getList($sku) { - /** @var \Magento\Catalog\Model\Product $product */ + /** @var Product $product */ $product = $this->productRepository->get($sku); $mediaGalleryEntries = $product->getMediaGalleryEntries(); foreach ($mediaGalleryEntries as $entry) { - $entry->setContent($this->getImageContent($product, $entry)); + $entry->setContent($this->getImageContent($product, $entry)); } return $mediaGalleryEntries; } + /** + * Get image content + * + * @param Product $product + * @param ProductAttributeMediaGalleryEntryInterface $entry + * @throws FileSystemException + */ private function getImageContent($product, $entry): ImageContentInterface { $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); $path = $mediaDirectory->getAbsolutePath($product->getMediaConfig()->getMediaPath($entry->getFile())); + $fileName = $this->file->getPathInfo($path)['basename']; $imageFileContent = $mediaDirectory->getDriver()->fileGetContents($path); return $this->imageContentInterface->create() - ->setName(basename($entry->getFile())) + ->setName($fileName) ->setBase64EncodedData(base64_encode($imageFileContent)) - ->setType($this->imageMime->getMimeType($path)); + ->setType($this->mime->getMimeType($path)); } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php index 74267f4239f91..e5a315ac9ad86 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php @@ -18,9 +18,13 @@ use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; use Magento\Framework\Api\AttributeValue; use Magento\Framework\Api\Data\ImageContentInterface; +use Magento\Framework\Api\Data\ImageContentInterfaceFactory; use Magento\Framework\Api\ImageContentValidatorInterface; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Driver\File\Mime; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use Magento\Framework\Filesystem\Io\File; /** * Tests for \Magento\Catalog\Model\Product\Gallery\GalleryManagement. @@ -74,6 +78,26 @@ class GalleryManagementTest extends TestCase */ private $newProductMock; + /** + * @var ImageContentInterface|MockObject + */ + private $imageContentInterface; + + /** + * @var Filesystem|MockObject + */ + private $filesystem; + + /** + * @var Mime|MockObject + */ + private $mime; + + /** + * @var File|MockObject + */ + private $file; + /** * @inheritDoc */ @@ -83,6 +107,10 @@ protected function setUp(): void $this->contentValidatorMock = $this->getMockForAbstractClass(ImageContentValidatorInterface::class); $this->productInterfaceFactory = $this->createMock(ProductInterfaceFactory::class); $this->deleteValidator = $this->createMock(DeleteValidator::class); + $this->imageContentInterface = $this->createMock(ImageContentInterfaceFactory::class); + $this->filesystem = $this->createMock(Filesystem::class); + $this->mime = $this->createMock(Mime::class); + $this->file = $this->createMock(File::class); $this->productMock = $this->createPartialMock( Product::class, [ @@ -102,7 +130,11 @@ protected function setUp(): void $this->productRepositoryMock, $this->contentValidatorMock, $this->productInterfaceFactory, - $this->deleteValidator + $this->deleteValidator, + $this->imageContentInterface, + $this->filesystem, + $this->mime, + $this->file, ); $this->attributeValueMock = $this->getMockBuilder(AttributeValue::class) ->disableOriginalConstructor() From 08fd2d3b46bce145d868ab4e9608a1ea7f62fa66 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Tue, 31 Jan 2023 14:21:35 -0600 Subject: [PATCH 659/985] AC-7850: [2.4.6-develop] Build Failures with PHP 8.2 --- .../testsuite/Magento/Dhl/Model/CarrierTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php index baf5813c74884..1e38c0a58d573 100644 --- a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php +++ b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php @@ -280,13 +280,19 @@ public function testRequestToShip( 'store', null ); + $convmap = [0x80, 0x10FFFF, 0, 0x1FFFFF]; + $content = mb_encode_numericentity( + file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml'), + $convmap, + 'UTF-8' + ); //phpcs:disable Magento2.Functions.DiscouragedFunction $this->httpClient->nextResponses( [ new Response( 200, [], - mb_convert_encoding(file_get_contents(__DIR__ . '/../_files/response_shipping_label.xml'), 'UTF-8') + $content ) ] ); From c3a3112d6fdb2b2f0b4d77784b9842f97ebd7705 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Tue, 31 Jan 2023 14:47:40 -0600 Subject: [PATCH 660/985] AC-7850: [2.4.6-develop] Build Failures with PHP 8.2 --- .../Magento/Framework/Stdlib/CookieManagerTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php index 799e4088b5ba2..f8f29764faeb5 100644 --- a/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Framework/Stdlib/CookieManagerTest.php @@ -16,6 +16,9 @@ */ class CookieManagerTest extends \Magento\TestFramework\TestCase\WebapiAbstract { + /** + * @var string + */ private $cookieTesterUrl = 'testmoduleone/CookieTester'; /** @var CurlClientWithCookies */ @@ -144,7 +147,10 @@ public function testDeleteCookie() if (isset($cookie['max-age'])) { $this->assertEquals(0, $cookie['max-age']); } - $this->assertEquals('Thu, 01 Jan 1970 00:00:01 GMT', $cookie['expires']); + $this->assertEquals( + date('D, j-M-o H:i:s T', strtotime('Thu, 01-Jan-1970 00:00:01 GMT')), + date('D, j-M-o H:i:s T', strtotime($cookie['expires'])) + ); } /** From 79848b4a6e4719609bbc7a284cbf84b3c4cfae55 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Tue, 31 Jan 2023 14:52:26 -0600 Subject: [PATCH 661/985] AC-7850: [2.4.6-develop] Build Failures with PHP 8.2 --- .../testsuite/Magento/SalesRule/_files/coupons.php | 4 ++-- .../testsuite/Magento/SalesRule/_files/coupons_advanced.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php index b2d3df227377d..e5c424ebb9a62 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php @@ -4,10 +4,10 @@ * See COPYING.txt for license details. */ -$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( +$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( \Magento\SalesRule\Model\ResourceModel\Rule\Collection::class ); -$items = array_values($this->_collection->getItems()); +$items = array_values($collection->getItems()); // type SPECIFIC with code $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class); diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php index 764976455ed7d..6e2bf44dd7529 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php @@ -7,10 +7,10 @@ Resolver::getInstance()->requireDataFixture('Magento/SalesRule/_files/rules_advanced.php'); -$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( +$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( \Magento\SalesRule\Model\ResourceModel\Rule\Collection::class ); -$items = array_values($this->_collection->getItems()); +$items = array_values($collection->getItems()); // type SPECIFIC with code $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class); From cb3d4c5ec076ee7aad77b332e4416427903006f7 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Tue, 31 Jan 2023 15:22:22 -0600 Subject: [PATCH 662/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Model/Import/Product.php | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 8e71342d875a1..2eee7b7758253 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -8,9 +8,9 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Config as CatalogConfig; -use Magento\Catalog\Model\Product\Visibility; use Magento\Catalog\Model\Indexer\Product\Category as ProductCategoryIndexer; use Magento\Catalog\Model\Indexer\Product\Price\Processor as ProductPriceIndexer; +use Magento\Catalog\Model\Product\Visibility; use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor; use Magento\CatalogImportExport\Model\Import\Product\LinkProcessor; use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor; @@ -31,6 +31,7 @@ use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor; use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface; use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\Indexer\Config\DependencyInfoProviderInterface; use Magento\ImportExport\Model\Import; use Magento\ImportExport\Model\Import\Entity\AbstractEntity; use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError; @@ -767,6 +768,11 @@ class Product extends AbstractEntity */ private $stockItemProcessor; + /** + * @var DependencyInfoProviderInterface + */ + private $dependencyInfoProvider; + /** * @param \Magento\Framework\Json\Helper\Data $jsonHelper * @param \Magento\ImportExport\Helper\Data $importExportData @@ -817,6 +823,7 @@ class Product extends AbstractEntity * @param LinkProcessor|null $linkProcessor * @param File|null $fileDriver * @param StockItemProcessorInterface|null $stockItemProcessor + * @param DependencyInfoProviderInterface|null $dependencyInfoProvider * @throws LocalizedException * @throws \Magento\Framework\Exception\FileSystemException * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -872,7 +879,8 @@ public function __construct( StockProcessor $stockProcessor = null, LinkProcessor $linkProcessor = null, ?File $fileDriver = null, - ?StockItemProcessorInterface $stockItemProcessor = null + ?StockItemProcessorInterface $stockItemProcessor = null, + ?DependencyInfoProviderInterface $dependencyInfoProvider = null ) { $this->_eventManager = $eventManager; $this->stockRegistry = $stockRegistry; @@ -938,6 +946,8 @@ public function __construct( ->get(ProductRepositoryInterface::class); $this->stockItemProcessor = $stockItemProcessor ?? ObjectManager::getInstance() ->get(StockItemProcessorInterface::class); + $this->dependencyInfoProvider = $dependencyInfoProvider ?? ObjectManager::getInstance() + ->get(DependencyInfoProviderInterface::class); } /** @@ -1662,7 +1672,7 @@ protected function _saveProducts() $prevAttributeSet, $attributes ); - // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch + // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } catch (Skip $skip) { // Product is skipped. Go on to the next one. } @@ -2464,14 +2474,25 @@ private function reindexStockStatus(array $productIds): void */ private function reindexProducts($productIdsToReindex = []) { - $indexersToReindex = [ - ProductCategoryIndexer::INDEXER_ID, - ProductPriceIndexer::INDEXER_ID - ]; - foreach ($indexersToReindex as $id) { - $indexer = $this->indexerRegistry->get($id); - if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) { - $indexer->reindexList($productIdsToReindex); + if (is_array($productIdsToReindex) && !empty($productIdsToReindex)) { + $indexersToReindex = [ + ProductCategoryIndexer::INDEXER_ID, + ProductPriceIndexer::INDEXER_ID + ]; + foreach ($indexersToReindex as $id) { + $indexer = $this->indexerRegistry->get($id); + if (!$indexer->isScheduled()) { + //trick for dependent indexers in scheduled mode + //related issue: AC-7851 + $idsToRunBefore = $this->dependencyInfoProvider->getIndexerIdsToRunBefore($id); + foreach ($idsToRunBefore as $dependentId) { + $dependentIndexer = $this->indexerRegistry->get($dependentId); + if ($dependentIndexer->isScheduled()) { + $dependentIndexer->reindexList($productIdsToReindex); + } + } + $indexer->reindexList($productIdsToReindex); + } } } } From 78fec2bc1c00cae2abc9f6f20527d1e50ae6d0ce Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Tue, 31 Jan 2023 15:45:56 -0600 Subject: [PATCH 663/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 2eee7b7758253..14c4a845e9f7b 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1114,6 +1114,7 @@ protected function _deleteProducts() 'catalog_product_import_bunch_delete_after', ['adapter' => $this, 'bunch' => $bunch] ); + $this->reindexProducts($idsToDelete); } } return $this; From ffe0e8f360c6cc7218280fb01f9591068539083c Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 31 Jan 2023 17:45:23 -0600 Subject: [PATCH 664/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Model/Cache/Tag/Strategy/StoreConfig.php | 29 ++- .../Model/Resolver/Store/ConfigIdentity.php | 7 +- .../TestCase/GraphQlAbstract.php | 2 +- .../GraphQl/Store/StoreConfigCacheTest.php | 182 ++++++++++++++++++ 4 files changed, 217 insertions(+), 3 deletions(-) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php index 7e339c22d83d9..9e027be40500f 100644 --- a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php +++ b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php @@ -9,6 +9,8 @@ use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; /** @@ -16,6 +18,19 @@ */ class StoreConfig implements StrategyInterface { + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct( + StoreManagerInterface $storeManager + ) { + $this->storeManager = $storeManager; + } /** * @inheritdoc */ @@ -26,7 +41,19 @@ public function getTags($object): array } if ($object instanceof ValueInterface && $object->isValueChanged()) { - return [ConfigIdentity::CACHE_TAG]; + if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($object->getScopeId()); + $storeIds = $website->getStoreIds(); + } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$object->getScopeId()]; + } else { + $storeIds = array_keys($this->storeManager->getStores()); + } + $ids = []; + foreach ($storeIds as $storeId) { + $ids[] = sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $storeId); + } + return $ids; } return []; diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php index c2f7f583ae1eb..b678cf3ab4999 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php @@ -21,6 +21,11 @@ class ConfigIdentity implements IdentityInterface */ public function getIdentities(array $resolvedData): array { - return empty($resolvedData) ? [] : [self::CACHE_TAG]; + $data["id"] = empty($resolvedData) ? [] : $resolvedData["id"]; + $ids = empty($resolvedData) ? + [] : array_merge([self::CACHE_TAG], array_map(function ($key) { + return sprintf('%s_%s', self::CACHE_TAG, $key); + }, $data)); + return $ids; } } diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php index 47885ef747eb6..ae7bc04f4fb2d 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php @@ -208,7 +208,7 @@ protected function assertResponseFields($actualResponse, $assertionMap) } /** - * Flush page cache + * Tear down test and flush page cache * * @return void */ diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php new file mode 100644 index 0000000000000..91a435356e67e --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -0,0 +1,182 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Store; + +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Store\Api\Data\StoreConfigInterface; +use Magento\Store\Api\StoreConfigManagerInterface; +use Magento\Store\Api\StoreRepositoryInterface; +use Magento\Store\Api\StoreResolverInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\ObjectManager; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Test storeConfig query cache + */ +class StoreConfigCacheTest extends GraphQlAbstract +{ + + /** @var ObjectManager */ + private $objectManager; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + } + + /** + * @magentoApiDataFixture Magento/Store/_files/store.php + * @throws NoSuchEntityException + */ + public function testGetStoreConfig(): void + { + /** @var StoreConfigManagerInterface $storeConfigManager */ + $storeConfigManager = $this->objectManager->get(StoreConfigManagerInterface::class); + /** @var StoreResolverInterface $storeResolver */ + $storeResolver = $this->objectManager->get(StoreResolverInterface::class); + /** @var StoreRepositoryInterface $storeRepository */ + $storeRepository = $this->objectManager->get(StoreRepositoryInterface::class); + $storeId = $storeResolver->getCurrentStoreId(); + $store = $storeRepository->getById($storeId); + /** @var StoreConfigInterface $storeConfig */ + $storeConfig = current($storeConfigManager->getStoreConfigs([$store->getCode()])); + $defaultLocale = $storeConfig->getLocale(); + $query = $this->getQuery(); + + // Query default store config + $response = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $response['headers']); + $this->assertEquals('MISS', $response['headers']['X-Magento-Cache-Debug']); + $this->assertArrayHasKey('storeConfig', $response['body']); + $responseConfig = $response['body']['storeConfig']; + $this->assertEquals($storeConfig->getId(), $responseConfig['id']); + $this->assertEquals($storeConfig->getCode(), $responseConfig['code']); + $this->assertEquals($defaultLocale, $responseConfig['locale']); + // Query default store config again + $responseHit = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseHit['headers']); + $this->assertEquals('HIT', $responseHit['headers']['X-Magento-Cache-Debug']); + $responseHitConfig = $responseHit['body']['storeConfig']; + $this->assertEquals($storeConfig->getCode(), $responseHitConfig['code']); + $this->assertEquals($defaultLocale, $responseHitConfig['locale']); + + // Query test store config + $headerMap['Store'] = 'test'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStore['headers']); + $this->assertEquals('MISS', $responseTestStore['headers']['X-Magento-Cache-Debug']); + $responseTestStoreConfig = $responseTestStore['body']['storeConfig']; + $this->assertEquals('test', $responseTestStoreConfig['code']); + $this->assertEquals($defaultLocale, $responseTestStoreConfig['locale']); + // Query test store config again + $responseTestStoreHit = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreHit['headers']); + $this->assertEquals('HIT', $responseTestStoreHit['headers']['X-Magento-Cache-Debug']); + $responseTestStoreHitConfig = $responseTestStoreHit['body']['storeConfig']; + $this->assertEquals('test', $responseTestStoreHitConfig['code']); + $this->assertEquals($defaultLocale, $responseTestStoreHitConfig['locale']); + + // Change test store locale + $newLocale = 'de_DE'; + $this->setConfig('general/locale/code', $newLocale, ScopeInterface::SCOPE_STORES, 'test'); + + // Query default store config + $responseHit2 = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseHit2['headers']); + $this->assertEquals('HIT', $responseHit2['headers']['X-Magento-Cache-Debug']); + $responseHit2Config = $responseHit2['body']['storeConfig']; + $this->assertEquals($storeConfig->getCode(), $responseHit2Config['code']); + $this->assertEquals($defaultLocale, $responseHit2Config['locale']); + + // Query test store config + $responseTestStoreMiss = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreMiss['headers']); + $this->assertEquals('MISS', $responseTestStoreMiss['headers']['X-Magento-Cache-Debug']); + $responseTestStoreMissConfig = $responseTestStoreMiss['body']['storeConfig']; + $this->assertEquals('test', $responseTestStoreMissConfig['code']); + $this->assertEquals($newLocale, $responseTestStoreMissConfig['locale']); + + // Query test store config again + $responseTestStoreHit2 = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); + $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreHit2['headers']); + $this->assertEquals('HIT', $responseTestStoreHit2['headers']['X-Magento-Cache-Debug']); + $responseTestStoreHit2Config = $responseTestStoreHit2['body']['storeConfig']; + $this->assertEquals('test', $responseTestStoreHit2Config['code']); + $this->assertEquals($newLocale, $responseTestStoreHit2Config['locale']); + } + + /** + * Get query + * + * @return string + */ + private function getQuery(): string + { + $query + = <<<QUERY +{ + storeConfig { + id, + code, + store_code, + store_name, + store_sort_order, + is_default_store, + store_group_code, + store_group_name, + is_default_store_group, + website_id, + website_code, + website_name, + locale, + base_currency_code, + default_display_currency_code, + timezone, + weight_unit, + base_url, + base_link_url, + base_static_url, + base_media_url, + secure_base_url, + secure_base_link_url, + secure_base_static_url, + secure_base_media_url, + store_name + } +} +QUERY; + return $query; + } + + /** + * Set configuration + * + * @param string $path + * @param string $value + * @param string|null $scope + * @param string|null $scopeCode + * @return void + * @throws \Magento\Framework\Exception\LocalizedException + */ + private function setConfig(string $path, string $value, ?string $scope = null, ?string $scopeCode = null) : void + { + $options = ''; + $options .= $scope ? "--scope=$scope " : ''; + $options .= $scopeCode ? "--scope-code=$scopeCode " : ''; + $options .= "$path $value"; + $appDir = dirname(Bootstrap::getInstance()->getAppTempDir()); + $out = ''; + // phpcs:ignore Magento2.Security.InsecureFunction + exec("php -f {$appDir}/bin/magento config:set $options", $out); + } +} From ff9c6a4a1a93ba17206d67b21fca45040a7cbf74 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:42:34 +0530 Subject: [PATCH 665/985] ACQE-4481 : Skipped test case --- ...inAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml index abbbe6e6c86f0..293b9c179bee9 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddUpdateDeleteWidgetOfTypeCatalogProductLinkTypeTest.xml @@ -16,6 +16,9 @@ <description value="Admin should be able to create widget type of Catalog product link and shown on storefront"/> <severity value="MAJOR"/> <testCaseId value="MC-12209"/> + <skip> + <issueId value="ACQE-4481"/> + </skip> </annotations> <before> From ae657ec331b64488763ab95247f3eb167999c5d0 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:44:53 +0530 Subject: [PATCH 666/985] Update AdminCreateActiveHtmlTermEntityTest.xml --- .../Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml index c597d3d660dc8..d8df89dbb36e4 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml @@ -20,6 +20,7 @@ <group value="mtf_migrated"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/> <createData entity="SimpleTwo" stepKey="createProduct"/> From 67df684553b2ce0cc2b4c08ad7d0c092509984bb Mon Sep 17 00:00:00 2001 From: glo37161 <glo37161@adobe.com> Date: Wed, 1 Feb 2023 23:19:10 +0530 Subject: [PATCH 667/985] AC-7767::Allure report Unknown error for all the functional tests with PHP 8.1/8.2 --- composer.lock | 974 +++++++++++++++++++++++++------------------------- 1 file changed, 487 insertions(+), 487 deletions(-) diff --git a/composer.lock b/composer.lock index 7d542b7b5901c..e628264e72caf 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": "6009f7b2592b32f538a6ed701473c608", + "content-hash": "daf5c45161b0b1cf93c6de2b0fceb154", "packages": [ { "name": "aws/aws-crt-php", @@ -963,6 +963,224 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.13.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.2" + }, + "time": "2021-08-05T19:00:23+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "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.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "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": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" + }, { "name": "elasticsearch/elasticsearch", "version": "v7.17.1", @@ -1604,6 +1822,166 @@ ], "time": "2022-10-26T14:07:24+00:00" }, + { + "name": "jms/metadata", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "require-dev": { + "doctrine/cache": "^1.0", + "doctrine/coding-standard": "^8.0", + "mikey179/vfsstream": "^1.6.7", + "phpunit/phpunit": "^8.5|^9.0", + "psr/container": "^1.0", + "symfony/cache": "^3.1|^4.0|^5.0", + "symfony/dependency-injection": "^3.1|^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "support": { + "issues": "https://github.com/schmittjoh/metadata/issues", + "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" + }, + "time": "2021-11-22T12:27:42+00:00" + }, + { + "name": "jms/serializer", + "version": "3.18.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/serializer.git", + "reference": "32956d3e3e1938f8130523a94297399d2b26fea7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/32956d3e3e1938f8130523a94297399d2b26fea7", + "reference": "32956d3e3e1938f8130523a94297399d2b26fea7", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.13", + "doctrine/instantiator": "^1.0.3", + "doctrine/lexer": "^1.1", + "jms/metadata": "^2.6", + "php": "^7.2||^8.0", + "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.1", + "doctrine/orm": "~2.1", + "doctrine/persistence": "^1.3.3|^2.0|^3.0", + "doctrine/phpcr-odm": "^1.3|^2.0", + "ext-pdo_sqlite": "*", + "jackalope/jackalope-doctrine-dbal": "^1.1.5", + "ocramius/proxy-manager": "^1.0|^2.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "^1.0.2", + "phpunit/phpunit": "^8.5.21||^9.0", + "psr/container": "^1.0", + "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", + "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", + "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", + "symfony/form": "^3.0|^4.0|^5.0|^6.0", + "symfony/translation": "^3.0|^4.0|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", + "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", + "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", + "twig/twig": "~1.34|~2.4|^3.0" + }, + "suggest": { + "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", + "symfony/cache": "Required if you like to use cache functionality.", + "symfony/uid": "Required if you'd like to serialize UID objects.", + "symfony/yaml": "Required if you'd like to use the YAML metadata format." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "JMS\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "homepage": "http://jmsyst.com/libs/serializer", + "keywords": [ + "deserialization", + "jaxb", + "json", + "serialization", + "xml" + ], + "support": { + "issues": "https://github.com/schmittjoh/serializer/issues", + "source": "https://github.com/schmittjoh/serializer/tree/3.18.1" + }, + "funding": [ + { + "url": "https://github.com/goetas", + "type": "github" + } + ], + "time": "2022-08-24T15:26:21+00:00" + }, { "name": "justinrainbow/json-schema", "version": "5.2.12", @@ -5525,11 +5903,104 @@ "type": "patreon" }, { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2022-04-04T05:15:45+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "981cc368a216c988e862a75e526b6076987d1b50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", + "reference": "981cc368a216c988e862a75e526b6076987d1b50", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" + }, + "time": "2022-05-05T11:32:40+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "time": "2022-04-04T05:15:45+00:00" + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/container", @@ -9984,236 +10455,18 @@ } ], "description": "Removes final keyword from source code on-the-fly and allows mocking of final methods and classes", - "keywords": [ - "finals", - "mocking", - "phpunit", - "testing", - "unit" - ], - "support": { - "issues": "https://github.com/dg/bypass-finals/issues", - "source": "https://github.com/dg/bypass-finals/tree/v1.4.1" - }, - "time": "2022-09-13T17:27:26+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.13.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "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": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" - }, - "time": "2021-08-05T19:00:23+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "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.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "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": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } + "keywords": [ + "finals", + "mocking", + "phpunit", + "testing", + "unit" ], - "time": "2022-02-28T11:07:21+00:00" + "support": { + "issues": "https://github.com/dg/bypass-finals/issues", + "source": "https://github.com/dg/bypass-finals/tree/v1.4.1" + }, + "time": "2022-09-13T17:27:26+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -10304,166 +10557,6 @@ ], "time": "2022-03-18T17:20:59+00:00" }, - { - "name": "jms/metadata", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "require-dev": { - "doctrine/cache": "^1.0", - "doctrine/coding-standard": "^8.0", - "mikey179/vfsstream": "^1.6.7", - "phpunit/phpunit": "^8.5|^9.0", - "psr/container": "^1.0", - "symfony/cache": "^3.1|^4.0|^5.0", - "symfony/dependency-injection": "^3.1|^4.0|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Metadata\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "support": { - "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" - }, - "time": "2021-11-22T12:27:42+00:00" - }, - { - "name": "jms/serializer", - "version": "3.21.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/cc49ca6cd97baa173166c1f4fc54521964cf28bd", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13 || ^2.0", - "doctrine/instantiator": "^1.0.3", - "doctrine/lexer": "^1.1 || ^2", - "jms/metadata": "^2.6", - "php": "^7.2||^8.0", - "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.1", - "doctrine/orm": "~2.1", - "doctrine/persistence": "^1.3.3|^2.0|^3.0", - "doctrine/phpcr-odm": "^1.3|^2.0", - "ext-pdo_sqlite": "*", - "jackalope/jackalope-doctrine-dbal": "^1.1.5", - "ocramius/proxy-manager": "^1.0|^2.0", - "phpbench/phpbench": "^1.0", - "phpstan/phpstan": "^1.0.2", - "phpunit/phpunit": "^8.5.21||^9.0", - "psr/container": "^1.0", - "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", - "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", - "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", - "symfony/form": "^3.0|^4.0|^5.0|^6.0", - "symfony/translation": "^3.0|^4.0|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", - "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", - "twig/twig": "~1.34|~2.4|^3.0" - }, - "suggest": { - "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", - "symfony/cache": "Required if you like to use cache functionality.", - "symfony/uid": "Required if you'd like to serialize UID objects.", - "symfony/yaml": "Required if you'd like to use the YAML metadata format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "JMS\\Serializer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - } - ], - "description": "Library for (de-)serializing data of any complexity; supports XML, and JSON.", - "homepage": "http://jmsyst.com/libs/serializer", - "keywords": [ - "deserialization", - "jaxb", - "json", - "serialization", - "xml" - ], - "support": { - "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.21.0" - }, - "funding": [ - { - "url": "https://github.com/goetas", - "type": "github" - } - ], - "time": "2023-01-10T13:08:17+00:00" - }, { "name": "laminas/laminas-diactoros", "version": "2.23.0", @@ -11541,50 +11634,6 @@ }, "time": "2022-11-29T15:06:56+00:00" }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "981cc368a216c988e862a75e526b6076987d1b50" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", - "reference": "981cc368a216c988e862a75e526b6076987d1b50", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" - }, - "time": "2022-05-05T11:32:40+00:00" - }, { "name": "phpstan/phpstan", "version": "1.9.2", @@ -12065,55 +12114,6 @@ ], "time": "2022-04-01T12:37:26+00:00" }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, { "name": "rector/rector", "version": "0.14.8", @@ -13947,5 +13947,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From 4459e34cdbb7aa3e4354fc8d0844baabca036dda Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 01:08:08 +0530 Subject: [PATCH 668/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- app/code/Magento/Theme/Block/Html/Header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index e93a5a8b925a3..a32ae40895adb 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -58,6 +58,6 @@ public function getWelcome() ); } $this->_data['welcome'] = $this->escaper->escapeQuote($this->_data['welcome'], true); - return __($this->_data['welcome']); + return addslashes(__($this->_data['welcome'])); } } From ebe998d4232b66d4316a13a8cc454bafeabcf066 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 02:47:33 +0530 Subject: [PATCH 669/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- app/code/Magento/Theme/Block/Html/Header.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index a32ae40895adb..c70997dc0d32b 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -58,6 +58,7 @@ public function getWelcome() ); } $this->_data['welcome'] = $this->escaper->escapeQuote($this->_data['welcome'], true); + // phpcs:ignore Magento2.Functions.DiscouragedFunction return addslashes(__($this->_data['welcome'])); } } From 631214360f63144b597a03f5deede40c6d52b9f4 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Wed, 1 Feb 2023 16:17:50 -0600 Subject: [PATCH 670/985] ACP2E-1579: Catalog rule discount disappears after a product is saved from Admin --- .../Model/Indexer/IndexerBuilderTest.php | 61 +++++++++++++++---- .../Model/Indexer/Product/PriceTest.php | 39 ------------ ...oduct_with_catalog_rule_50_percent_off.php | 2 +- ...h_catalog_rule_50_percent_off_rollback.php | 2 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php index d71cfa1eff85f..64c13d865a410 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php @@ -8,9 +8,17 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Indexer\Product\Price\Processor; use Magento\Framework\App\ResourceConnection; +use Magento\Store\Api\WebsiteRepositoryInterface; use Magento\Store\Model\StoreManagerInterface; +use Magento\TestFramework\Fixture\AppIsolation; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DbIsolation; use Magento\TestFramework\Helper\Bootstrap; +#[ + DbIsolation(false), + AppIsolation(true), +] class IndexerBuilderTest extends \PHPUnit\Framework\TestCase { /** @@ -58,6 +66,11 @@ class IndexerBuilderTest extends \PHPUnit\Framework\TestCase */ private $indexProductProcessor; + /** + * @var WebsiteRepositoryInterface + */ + private $websiteRepository; + protected function setUp(): void { $this->indexerBuilder = Bootstrap::getObjectManager()->get( @@ -69,6 +82,7 @@ protected function setUp(): void $this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class); $this->connection = Bootstrap::getObjectManager()->get(ResourceConnection::class); $this->indexProductProcessor = Bootstrap::getObjectManager()->get(Processor::class); + $this->websiteRepository = Bootstrap::getObjectManager()->get(WebsiteRepositoryInterface::class); } protected function tearDown(): void @@ -93,8 +107,6 @@ protected function tearDown(): void } /** - * @magentoDbIsolation disabled - * @magentoAppIsolation enabled * @magentoDataFixture Magento/CatalogRule/_files/attribute.php * @magentoDataFixture Magento/CatalogRule/_files/rule_by_attribute.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php @@ -111,8 +123,6 @@ public function testReindexById() } /** - * @magentoDbIsolation disabled - * @magentoAppIsolation enabled * @magentoDataFixture Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_tomorrow.php * @magentoConfigFixture base_website general/locale/timezone Europe/Amsterdam * @magentoConfigFixture general/locale/timezone America/Chicago @@ -139,8 +149,6 @@ public function testReindexByIdDifferentTimezones() } /** - * @magentoDbIsolation disabled - * @magentoAppIsolation enabled * @magentoDataFixture Magento/CatalogRule/_files/attribute.php * @magentoDataFixture Magento/CatalogRule/_files/rule_by_attribute.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php @@ -166,8 +174,6 @@ public function testReindexByIds() } /** - * @magentoDbIsolation disabled - * @magentoAppIsolation enabled * @magentoDataFixtureBeforeTransaction Magento/CatalogRule/_files/attribute.php * @magentoDataFixtureBeforeTransaction Magento/CatalogRule/_files/rule_by_attribute.php * @magentoDataFixture Magento/Catalog/_files/product_simple.php @@ -187,9 +193,6 @@ public function testReindexFull() /** * Tests restoring triggers on `catalogrule_product_price` table after full reindexing in 'Update by schedule' mode. - * - * @magentoDbIsolation disabled - * @magentoAppIsolation enabled */ public function testRestoringTriggersAfterFullReindex() { @@ -208,6 +211,42 @@ public function testRestoringTriggersAfterFullReindex() $this->assertEquals(0, $this->getTriggersCount($tableName)); } + #[ + DataFixture('Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php'), + ] + public function testReindexByIdForSecondStore(): void + { + $websiteId = $this->websiteRepository->get('test')->getId(); + $simpleProduct = $this->productRepository->get('simple'); + $this->indexerBuilder->reindexById($simpleProduct->getId()); + $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); + $this->assertEquals(25, $rulePrice); + } + + #[ + DataFixture('Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php'), + ] + public function testReindexByIdsForSecondStore(): void + { + $websiteId = $this->websiteRepository->get('test')->getId(); + $simpleProduct = $this->productRepository->get('simple'); + $this->indexerBuilder->reindexByIds([$simpleProduct->getId()]); + $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); + $this->assertEquals(25, $rulePrice); + } + + #[ + DataFixture('Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php'), + ] + public function testReindexFullForSecondStore(): void + { + $websiteId = $this->websiteRepository->get('test')->getId(); + $simpleProduct = $this->productRepository->get('simple'); + $this->indexerBuilder->reindexFull(); + $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); + $this->assertEquals(25, $rulePrice); + } + /** * Returns triggers count. * diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php index 4dc07309ee70b..a2f38dbd40a88 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/Product/PriceTest.php @@ -6,13 +6,10 @@ namespace Magento\CatalogRule\Model\Indexer\Product; use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Catalog\Model\ProductRepository; use Magento\Catalog\Model\ResourceModel\Product\Collection; -use Magento\CatalogRule\Model\Indexer\IndexBuilder; use Magento\CatalogRule\Model\ResourceModel\Rule; use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\Api\SortOrder; -use Magento\Store\Api\WebsiteRepositoryInterface; use Magento\TestFramework\Helper\Bootstrap; class PriceTest extends \PHPUnit\Framework\TestCase @@ -27,21 +24,6 @@ class PriceTest extends \PHPUnit\Framework\TestCase */ private $resourceRule; - /** - * @var WebsiteRepositoryInterface - */ - private $websiteRepository; - - /** - * @var ProductRepository - */ - private $productRepository; - - /** - * @var IndexBuilder - */ - private $indexerBuilder; - /** * @inheritdoc */ @@ -49,9 +31,6 @@ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); $this->resourceRule = $this->objectManager->get(Rule::class); - $this->websiteRepository = $this->objectManager->get(WebsiteRepositoryInterface::class); - $this->productRepository = $this->objectManager->create(ProductRepository::class); - $this->indexerBuilder = $this->objectManager->get(IndexBuilder::class); } /** @@ -86,24 +65,6 @@ public function testPriceApplying() $this->assertEquals($simpleProduct->getFinalPrice(), $confProduct->getMinimalPrice()); } - /** - * @magentoDataFixtureBeforeTransaction Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php - * @magentoDbIsolation enabled - * @magentoAppIsolation enabled - * @return void - */ - public function testPriceForSecondStore():void - { - $websiteId = $this->websiteRepository->get('test')->getId(); - $simpleProduct = $this->productRepository->get('simple'); - $this->assertEquals('simple', $simpleProduct->getSku()); - $this->indexerBuilder->reindexById($simpleProduct->getId()); - $this->assertEquals( - 25, - $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()) - ); - } - /** * @magentoDataFixtureBeforeTransaction Magento/CatalogRule/_files/simple_products.php * @magentoDataFixtureBeforeTransaction Magento/CatalogRule/_files/rule_by_attribute.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php index eeb66fb923e47..2e127eb416c94 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php @@ -18,7 +18,7 @@ use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Workaround\Override\Fixture\Resolver; -Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_website_with_two_stores.php'); +Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_website_with_store_group_and_store.php'); $objectManager = Bootstrap::getObjectManager(); /** @var WebsiteRepositoryInterface $websiteRepository */ diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php index 03e385e2dade3..ba345e50ff5d8 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php @@ -52,4 +52,4 @@ $indexBuilder->reindexFull(); -Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_website_with_two_stores_rollback.php'); +Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_website_with_store_group_and_store_rollback.php'); From ac23f76f856357f989c690482fae99a312982094 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Wed, 1 Feb 2023 17:36:21 -0600 Subject: [PATCH 671/985] ACP2E-1579: Catalog rule discount disappears after a product is saved from Admin --- .../CatalogRule/Model/Rule/ValidationTest.php | 83 +++++++++++++------ 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Unit/Plugin/CatalogRule/Model/Rule/ValidationTest.php b/app/code/Magento/CatalogRuleConfigurable/Test/Unit/Plugin/CatalogRule/Model/Rule/ValidationTest.php index 4f13e8d2b6aa3..ec40415f7ed6b 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Test/Unit/Plugin/CatalogRule/Model/Rule/ValidationTest.php +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Unit/Plugin/CatalogRule/Model/Rule/ValidationTest.php @@ -7,10 +7,11 @@ namespace Magento\CatalogRuleConfigurable\Test\Unit\Plugin\CatalogRule\Model\Rule; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product; use Magento\CatalogRule\Model\Rule; use Magento\CatalogRuleConfigurable\Plugin\CatalogRule\Model\Rule\Validation; use Magento\ConfigurableProduct\Model\Product\Type\Configurable; -use Magento\Framework\DataObject; use Magento\Rule\Model\Condition\Combine; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -30,13 +31,18 @@ class ValidationTest extends TestCase */ private $configurableMock; + /** + * @var ProductRepositoryInterface|MockObject + */ + private $productRepositoryMock; + /** @var Rule|MockObject */ private $ruleMock; /** @var Combine|MockObject */ private $ruleConditionsMock; - /** @var DataObject|MockObject */ + /** @var Product|MockObject */ private $productMock; /** @@ -48,16 +54,15 @@ protected function setUp(): void Configurable::class, ['getParentIdsByChild'] ); + $this->productRepositoryMock = $this->createMock(ProductRepositoryInterface::class); $this->ruleMock = $this->createMock(Rule::class); $this->ruleConditionsMock = $this->createMock(Combine::class); - $this->productMock = $this->getMockBuilder(DataObject::class) - ->addMethods(['getId']) - ->disableOriginalConstructor() - ->getMock(); + $this->productMock = $this->createMock(Product::class); $this->validation = new Validation( - $this->configurableMock + $this->configurableMock, + $this->productRepositoryMock ); } @@ -75,13 +80,49 @@ public function testAfterValidateWithValidConfigurableProduct( $runValidateAmount, $result ) { - $this->productMock->expects($this->once())->method('getId')->willReturn('product_id'); - $this->configurableMock->expects($this->once())->method('getParentIdsByChild')->with('product_id') + $storeId = 1; + $this->productMock->expects($this->once()) + ->method('getId') + ->willReturn(10); + $this->configurableMock->expects($this->once()) + ->method('getParentIdsByChild') + ->with(10) ->willReturn($parentsIds); - $this->ruleMock->expects($this->exactly($runValidateAmount))->method('getConditions') + $this->productMock->expects($this->exactly($runValidateAmount)) + ->method('getStoreId') + ->willReturn($storeId); + $parentsProducts = array_map( + function ($parentsId) { + $parent = $this->createMock(Product::class); + $parent->method('getId')->willReturn($parentsId); + return $parent; + }, + $parentsIds + ); + $this->productRepositoryMock->expects($this->exactly($runValidateAmount)) + ->method('getById') + ->withConsecutive( + ...array_map( + function ($parentsId) use ($storeId) { + return [$parentsId, false, $storeId]; + }, + $parentsIds + ) + )->willReturnOnConsecutiveCalls(...$parentsProducts); + $this->ruleMock->expects($this->exactly($runValidateAmount)) + ->method('getConditions') ->willReturn($this->ruleConditionsMock); - $this->ruleConditionsMock->expects($this->exactly($runValidateAmount))->method('validateByEntityId') - ->willReturnMap($validationResult); + $this->ruleConditionsMock->expects($this->exactly($runValidateAmount)) + ->method('validate') + ->withConsecutive( + ...array_map( + function ($parentsProduct) { + return [$parentsProduct]; + }, + $parentsProducts + ) + ) + ->willReturnOnConsecutiveCalls(...$validationResult); $this->assertEquals( $result, @@ -97,31 +138,19 @@ public function dataProviderForValidateWithValidConfigurableProduct() return [ [ [1, 2, 3], - [ - [1, false], - [2, true], - [3, true], - ], + [false, true, true], 2, true, ], [ [1, 2, 3], - [ - [1, true], - [2, false], - [3, true], - ], + [true, false, true], 1, true, ], [ [1, 2, 3], - [ - [1, false], - [2, false], - [3, false], - ], + [false, false, false], 3, false, ], From 1fbb7cc02354bd3c61925eb1a165452770b1d1d4 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Wed, 1 Feb 2023 18:40:10 -0600 Subject: [PATCH 672/985] ACP2E-1579: Catalog rule discount disappears after a product is saved from Admin --- .../Model/Indexer/IndexerBuilderTest.php | 13 +++---------- ...ct_with_catalog_rule_50_percent_off_rollback.php | 3 ++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php index 64c13d865a410..1a3696c02ac52 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php @@ -8,7 +8,6 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Indexer\Product\Price\Processor; use Magento\Framework\App\ResourceConnection; -use Magento\Store\Api\WebsiteRepositoryInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; @@ -66,11 +65,6 @@ class IndexerBuilderTest extends \PHPUnit\Framework\TestCase */ private $indexProductProcessor; - /** - * @var WebsiteRepositoryInterface - */ - private $websiteRepository; - protected function setUp(): void { $this->indexerBuilder = Bootstrap::getObjectManager()->get( @@ -82,7 +76,6 @@ protected function setUp(): void $this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class); $this->connection = Bootstrap::getObjectManager()->get(ResourceConnection::class); $this->indexProductProcessor = Bootstrap::getObjectManager()->get(Processor::class); - $this->websiteRepository = Bootstrap::getObjectManager()->get(WebsiteRepositoryInterface::class); } protected function tearDown(): void @@ -216,7 +209,7 @@ public function testRestoringTriggersAfterFullReindex() ] public function testReindexByIdForSecondStore(): void { - $websiteId = $this->websiteRepository->get('test')->getId(); + $websiteId = $this->storeManager->getWebsite('test')->getId(); $simpleProduct = $this->productRepository->get('simple'); $this->indexerBuilder->reindexById($simpleProduct->getId()); $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); @@ -228,7 +221,7 @@ public function testReindexByIdForSecondStore(): void ] public function testReindexByIdsForSecondStore(): void { - $websiteId = $this->websiteRepository->get('test')->getId(); + $websiteId = $this->storeManager->getWebsite('test')->getId(); $simpleProduct = $this->productRepository->get('simple'); $this->indexerBuilder->reindexByIds([$simpleProduct->getId()]); $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); @@ -240,7 +233,7 @@ public function testReindexByIdsForSecondStore(): void ] public function testReindexFullForSecondStore(): void { - $websiteId = $this->websiteRepository->get('test')->getId(); + $websiteId = $this->storeManager->getWebsite('test')->getId(); $simpleProduct = $this->productRepository->get('simple'); $this->indexerBuilder->reindexFull(); $rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), $websiteId, 1, $simpleProduct->getId()); diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php index ba345e50ff5d8..928dbfd7645eb 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off_rollback.php @@ -52,4 +52,5 @@ $indexBuilder->reindexFull(); -Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_website_with_store_group_and_store_rollback.php'); +Resolver::getInstance() + ->requireDataFixture('Magento/Store/_files/second_website_with_store_group_and_store_rollback.php'); From bac120ec6dfad85c828a3b57e46ac03ffe21de6f Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Thu, 2 Feb 2023 11:26:56 +0530 Subject: [PATCH 673/985] Update AdminCreateActiveHtmlTermEntityTest.xml --- .../Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml index 79416f0ac4b50..ad39e8105e957 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml @@ -20,7 +20,6 @@ <group value="mtf_migrated"/> </annotations> <before> - <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/> <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="SimpleTwo" stepKey="createProduct"/> From 2c44df061accd5a8166fa49f2a2cd59671ece3bb Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Thu, 2 Feb 2023 12:00:25 +0530 Subject: [PATCH 674/985] ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule. --- ...tPriceRuleForAutoTypeUsesPerCouponTest.xml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml new file mode 100644 index 0000000000000..3f788887d1355 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCartPriceRuleForAutoTypeUsesPerCouponTest"> + <annotations> + <features value="SalesRule"/> + <stories value="Create cart price rule"/> + <title value="Customer cannot use a distinct coupon code from the same Cart Price Rule."/> + <description value="Customer cannot use a distinct coupon code from the same Cart Price Rule."/> + <severity value="CRITICAL"/> + <testCaseId value="AC-7872"/> + <useCaseId value="ACP2E-1551"/> + <group value="SalesRule"/> + </annotations> + + <before> + <!-- Create Customer with filled Shipping & Billing Address --> + <createData entity="CustomerEntityOne" stepKey="createCustomer"/> + <!--Create simple product--> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> + + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <!--Delete simple product created during the test--> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <!-- Delete the cart price rule we made during the test --> + <actionGroup ref="DeleteCartPriceRuleByName" stepKey="cleanUpRule"> + <argument name="ruleName" value="{{_defaultCoupon.code}}"/> + </actionGroup> + <!--Delete customer created during test--> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + </after> + + <!-- Create a cart price rule --> + <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/> + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/> + <!-- Select custom customer groups --> + <click selector="{{CartPriceRuleSection.customerGroupsToggle}}" stepKey="clickCustomerGroupsToggle" after="selectWebsites"/> + <click selector="{{CartPriceRuleSection.selectAll}}" stepKey="clickSelectAll" after="clickCustomerGroupsToggle"/> + <click selector="{{CartPriceRuleSection.doneButton}}" stepKey="clickDoneButton" after="clickSelectAll"/> + <!-- Choose coupon type auto --> + <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Auto" stepKey="selectCouponType"/> + <!-- Verify `Use Auto Generation` checkbox not visible while `Uses per Coupon` field there for coupon type auto--> + <dontSeeCheckboxIsChecked selector="{{AdminCartPriceRulesFormSection.useAutoGeneration}}" stepKey="tickAutoGeneration"/> + <fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="1" stepKey="fillUsesPerCoupon"/> + <!--Open Actions tabs, fill required field and save the cart price rule--> + <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{CatPriceRule.apply}}" stepKey="selectActionType"/> + <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{CatPriceRule.discountAmount}}" stepKey="fillDiscountAmount"/> + <click selector="{{AdminCartPriceRulesFormSection.saveAndContinue}}" stepKey="clickSaveAndContinueButton"/> + <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeRuleSavedSuccessMessage"/> + <waitForPageLoad stepKey="waitForPageToLoad"/> + + <!-- Generate some coupon codes --> + <click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSection"/> + <fillField selector="{{AdminCartPriceRulesFormSection.couponQty}}" userInput="5" stepKey="fillCouponQty"/> + <click selector="{{AdminCartPriceRulesFormSection.generateCouponsButton}}" stepKey="clickGenerate"/> + <see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="Message is added to queue, wait to get your coupons soon" stepKey="seeGenerationSuccess"/> + + <!--Start coupon code generator queue--> + <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"> + <argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/> + <argument name="maxMessages" value="1"/> + </actionGroup> + + <!--Reload cart price rule page--> + <actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/> + + <!--Open Manage Coupon Codes tab again to see generated coupon codes--> + <click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSectionSecondTime"/> + <scrollTo selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" stepKey="scrollToCouponGridUsedHeader"/> + <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" stepKey="waitForNewRule"/> + + <!--Assert coupon codes grid header is correct --> + <see selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" userInput="Used" stepKey="seeCorrectUsedHeader"/> + + <!--Grab two coupon codes and hold on to it for later use --> + <grabTextFrom selector="{{AdminCartPriceRulesFormSection.generatedCouponByIndex('1')}}" stepKey="couponCode"/> + <grabTextFrom selector="{{AdminCartPriceRulesFormSection.generatedCouponByIndex('2')}}" stepKey="couponCode2"/> + + <!-- Login with created Customer --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + + <!--Open the Product Page, add the product to Cart, go to Shopping Cart and Apply the first coupon code --> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage"/> + <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule"> + <argument name="product" value="$$createSimpleProduct$$"/> + <argument name="couponCode" value="{$couponCode}"/> + </actionGroup> + <waitForText userInput='You used coupon code "{$couponCode}"' stepKey="waitForText"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{$couponCode}"' stepKey="seeSuccessMessage"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible"/> + + <!-- Go to Checkout and Click Place Order button --> + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> + <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" + stepKey="selectFlatShippingMethod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> + <!-- Checkout select Check/Money Order payment --> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> + + <!-- Start the usage processing consumer --> + <actionGroup ref="CliConsumerStartActionGroup" stepKey="startUsageProcessingMessageQueue1"> + <argument name="consumerName" value="{{SalesRuleConsumerData.consumerName}}"/> + <argument name="maxMessages" value="{{SalesRuleConsumerData.messageLimit}}"/> + </actionGroup> + + <!-- Open the Product Page again, add the product to Cart, go to Shopping Cart and Apply the second coupon code --> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage2"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule2"> + <argument name="product" value="$$createSimpleProduct$$"/> + <argument name="couponCode" value="{$couponCode2}"/> + </actionGroup> + <waitForText userInput='You used coupon code "{$couponCode2}"' stepKey="waitForText2"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{$couponCode2}"' stepKey="seeSuccessMessage2"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible2"/> + </test> +</tests> From 0b32443ad63939221126c03f720ac07fcb2cfd03 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 2 Feb 2023 12:14:01 +0530 Subject: [PATCH 675/985] ACP2E-1529 redirect fix --- app/code/Magento/Email/Model/Template/Filter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 40320b9ffc845..be6212fc58424 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -585,7 +585,9 @@ public function storeDirective($construction) * Pass extra parameter to distinguish stores urls for property Magento\Framework\Url $cacheUrl * in multi-store environment */ - $this->urlModel->setScope($this->_storeManager->getStore()); + if ($construction[1]!="store" && $construction[2]!="url=''") { + $this->urlModel->setScope($this->_storeManager->getStore()); + } $params['_escape_params'] = $this->_storeManager->getStore()->getCode(); return $this->urlModel->getUrl($path, $params); From 32f43b79fd6278643801cefb86c7a97ed2fc9b4b Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 23 Jan 2023 16:41:06 +0530 Subject: [PATCH 676/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the issue. --- .../Catalog/Model/ResourceModel/AbstractResource.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index c71225b4fc67f..3a04b87a4f2b0 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -325,7 +325,15 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - return $this->_saveAttributeValue($object, $attribute, $value); + $table = $attribute->getBackend()->getTable(); + $connection = $this->getConnection(); + $connection->update( + $table, + ['value' => $this->_prepareValueForSave($value, $attribute)], + sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) + ); + + return $this; } /** From 2fdb50ea1f1e1ea8b8e7e3e938d441d39e151646 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 24 Jan 2023 15:23:52 +0530 Subject: [PATCH 677/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- .../Model/ResourceModel/AbstractResource.php | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 3a04b87a4f2b0..a8ef91ddd0097 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -181,9 +181,10 @@ protected function _prepareLoadSelect(array $selects) * @param \Magento\Catalog\Model\AbstractModel $object * @param AbstractAttribute $attribute * @param mixed $value + * @param int|null $valueId * @return $this */ - protected function _saveAttributeValue($object, $attribute, $value) + protected function _saveAttributeValue($object, $attribute, $value, $valueId = null) { $connection = $this->getConnection(); $hasSingleStore = $this->_storeManager->hasSingleStore(); @@ -213,14 +214,27 @@ protected function _saveAttributeValue($object, $attribute, $value) ); } - $data = new \Magento\Framework\DataObject( - [ - 'attribute_id' => $attribute->getAttributeId(), - 'store_id' => $storeId, - $entityIdField => $object->getData($entityIdField), - 'value' => $this->_prepareValueForSave($value, $attribute), - ] - ); + if ($valueId > 0) { + $data = new \Magento\Framework\DataObject( + [ + 'value_id' => $valueId, + 'attribute_id' => $attribute->getAttributeId(), + 'store_id' => $storeId, + $entityIdField => $object->getData($entityIdField), + 'value' => $this->_prepareValueForSave($value, $attribute), + ] + ); + } else { + $data = new \Magento\Framework\DataObject( + [ + 'attribute_id' => $attribute->getAttributeId(), + 'store_id' => $storeId, + $entityIdField => $object->getData($entityIdField), + 'value' => $this->_prepareValueForSave($value, $attribute), + ] + ); + } + $bind = $this->_prepareDataForTable($data, $table); if ($attribute->isScopeStore()) { @@ -325,15 +339,7 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - $table = $attribute->getBackend()->getTable(); - $connection = $this->getConnection(); - $connection->update( - $table, - ['value' => $this->_prepareValueForSave($value, $attribute)], - sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) - ); - - return $this; + return $this->_saveAttributeValue($object, $attribute, $value, $valueId); } /** From a121baf183e76033027717d0e5306ae6a034d801 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 24 Jan 2023 19:06:28 +0530 Subject: [PATCH 678/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- .../Model/ResourceModel/AbstractResource.php | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index a8ef91ddd0097..1983d4a01333d 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -181,10 +181,9 @@ protected function _prepareLoadSelect(array $selects) * @param \Magento\Catalog\Model\AbstractModel $object * @param AbstractAttribute $attribute * @param mixed $value - * @param int|null $valueId * @return $this */ - protected function _saveAttributeValue($object, $attribute, $value, $valueId = null) + protected function _saveAttributeValue($object, $attribute, $value) { $connection = $this->getConnection(); $hasSingleStore = $this->_storeManager->hasSingleStore(); @@ -214,25 +213,28 @@ protected function _saveAttributeValue($object, $attribute, $value, $valueId = n ); } - if ($valueId > 0) { - $data = new \Magento\Framework\DataObject( - [ - 'value_id' => $valueId, - 'attribute_id' => $attribute->getAttributeId(), - 'store_id' => $storeId, - $entityIdField => $object->getData($entityIdField), - 'value' => $this->_prepareValueForSave($value, $attribute), - ] - ); - } else { - $data = new \Magento\Framework\DataObject( - [ - 'attribute_id' => $attribute->getAttributeId(), - 'store_id' => $storeId, - $entityIdField => $object->getData($entityIdField), - 'value' => $this->_prepareValueForSave($value, $attribute), - ] - ); + $data = new \Magento\Framework\DataObject( + [ + 'attribute_id' => $attribute->getAttributeId(), + 'store_id' => $storeId, + $entityIdField => $object->getData($entityIdField), + 'value' => $this->_prepareValueForSave($value, $attribute), + ] + ); + + $entity = $attribute->getEntity(); + $row = $this->getAttributeRow($entity, $object, $attribute); + $whereArr = []; + foreach ($row as $field => $value) { + $whereArr[] = $connection->quoteInto($field . '=?', $value); + } + $where = implode(' AND ', $whereArr); + $select = $connection->select()->from($table, ['value_id', 'value'])->where($where); + $origRow = $connection->fetchRow($select); + $origValueId = $origRow['value_id'] ?? false; + + if ($origValueId > 0) { + $data->setData('value_id', $origValueId); } $bind = $this->_prepareDataForTable($data, $table); @@ -339,7 +341,7 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - return $this->_saveAttributeValue($object, $attribute, $value, $valueId); + return $this->_saveAttributeValue($object, $attribute, $value); } /** From 33dba8686e911f900aeafe1ada95a8212efa6edb Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 27 Jan 2023 14:59:39 +0530 Subject: [PATCH 679/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build failures. --- .../Magento/Catalog/Model/ResourceModel/AbstractResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 1983d4a01333d..2187103759755 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -232,8 +232,9 @@ protected function _saveAttributeValue($object, $attribute, $value) $select = $connection->select()->from($table, ['value_id', 'value'])->where($where); $origRow = $connection->fetchRow($select); $origValueId = $origRow['value_id'] ?? false; + $storeIds = $this->_storeManager->getStore($storeId)->getWebsite()->getStoreIds(true); - if ($origValueId > 0) { + if ($origValueId > 0 && count($storeIds) === 1) { $data->setData('value_id', $origValueId); } @@ -248,7 +249,6 @@ protected function _saveAttributeValue($object, $attribute, $value) /** * Update attribute value for website */ - $storeIds = $this->_storeManager->getStore($storeId)->getWebsite()->getStoreIds(true); foreach ($storeIds as $storeId) { $bind['store_id'] = (int) $storeId; $this->_attributeValuesToSave[$table][] = $bind; From cb4e0856be1c600cf80a79c7a7375f4b50d4eeec Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 31 Jan 2023 16:11:27 +0530 Subject: [PATCH 680/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the integration and web api test build failure. --- .../Catalog/Model/ResourceModel/AbstractResource.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 2187103759755..9eb3d40fcd853 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -229,13 +229,17 @@ protected function _saveAttributeValue($object, $attribute, $value) $whereArr[] = $connection->quoteInto($field . '=?', $value); } $where = implode(' AND ', $whereArr); - $select = $connection->select()->from($table, ['value_id', 'value'])->where($where); + $select = $connection->select()->from($table, ['value_id', 'value', 'store_id'])->where($where); $origRow = $connection->fetchRow($select); $origValueId = $origRow['value_id'] ?? false; + $origStoreId = (int) $origRow['store_id'] ?? 0; $storeIds = $this->_storeManager->getStore($storeId)->getWebsite()->getStoreIds(true); if ($origValueId > 0 && count($storeIds) === 1) { $data->setData('value_id', $origValueId); + if ($storeId !== $origStoreId) { + $data->setData('store_id', $origStoreId); + } } $bind = $this->_prepareDataForTable($data, $table); From 71ad8519a8862aa14ad3173b1c3cb7d6a8ad1629 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 31 Jan 2023 21:32:50 +0530 Subject: [PATCH 681/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- .../Model/ResourceModel/AbstractResource.php | 22 +----------- .../Eav/Model/Entity/AbstractEntity.php | 36 ++++++++++++++++++- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 9eb3d40fcd853..c71225b4fc67f 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -221,27 +221,6 @@ protected function _saveAttributeValue($object, $attribute, $value) 'value' => $this->_prepareValueForSave($value, $attribute), ] ); - - $entity = $attribute->getEntity(); - $row = $this->getAttributeRow($entity, $object, $attribute); - $whereArr = []; - foreach ($row as $field => $value) { - $whereArr[] = $connection->quoteInto($field . '=?', $value); - } - $where = implode(' AND ', $whereArr); - $select = $connection->select()->from($table, ['value_id', 'value', 'store_id'])->where($where); - $origRow = $connection->fetchRow($select); - $origValueId = $origRow['value_id'] ?? false; - $origStoreId = (int) $origRow['store_id'] ?? 0; - $storeIds = $this->_storeManager->getStore($storeId)->getWebsite()->getStoreIds(true); - - if ($origValueId > 0 && count($storeIds) === 1) { - $data->setData('value_id', $origValueId); - if ($storeId !== $origStoreId) { - $data->setData('store_id', $origStoreId); - } - } - $bind = $this->_prepareDataForTable($data, $table); if ($attribute->isScopeStore()) { @@ -253,6 +232,7 @@ protected function _saveAttributeValue($object, $attribute, $value) /** * Update attribute value for website */ + $storeIds = $this->_storeManager->getStore($storeId)->getWebsite()->getStoreIds(true); foreach ($storeIds as $storeId) { $bind['store_id'] = (int) $storeId; $this->_attributeValuesToSave[$table][] = $bind; diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 08823bacce4d4..66c1c4e4dd31e 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1669,6 +1669,7 @@ protected function _deleteAttributes($object, $table, $info) */ public function saveAttribute(DataObject $object, $attributeCode) { + $updateValue = 0; $attribute = $this->getAttribute($attributeCode); $backend = $attribute->getBackend(); $table = $backend->getTable(); @@ -1699,10 +1700,15 @@ public function saveAttribute(DataObject $object, $attributeCode) $this->_insertAttribute($object, $attribute, $newValue); } elseif ($origValueId !== false && $newValue !== null) { $this->_updateAttribute($object, $attribute, $origValueId, $newValue); + $updateValue = 1; } elseif ($origValueId !== false && $newValue === null && $origValue !== null) { $connection->delete($table, $where); } - $this->_processAttributeValues(); + if ($updateValue === 1) { + $this->_updateAttributeValues($attribute, $origValueId); + } else { + $this->_processAttributeValues(); + } $connection->commit(); } catch (\Exception $e) { $connection->rollBack(); @@ -2011,4 +2017,32 @@ protected function loadAttributesForObject($attributes, $object = null) } } } + + /** + * Update entity attribute values + * + * @param AbstractAttribute $attribute + * @param mixed $valueId + * @return $this + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _updateAttributeValues(AbstractAttribute $attribute, mixed $valueId): static + { + $connection = $this->getConnection(); + foreach ($this->_attributeValuesToSave as $table => $data) { + foreach ($data as $columnValue) { + $connection->update( + $table, + ['value' => $this->_prepareValueForSave($columnValue['value'], $attribute)], + sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) + ); + } + } + + // reset data arrays + $this->_attributeValuesToSave = []; + + + return $this; + } } From fbdd4a1dc9f8a57faf95bf8c011c905a7e5c0054 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Wed, 1 Feb 2023 12:36:50 +0530 Subject: [PATCH 682/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- app/code/Magento/Eav/Model/Entity/AbstractEntity.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 66c1c4e4dd31e..7a9227700c67f 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1704,7 +1704,7 @@ public function saveAttribute(DataObject $object, $attributeCode) } elseif ($origValueId !== false && $newValue === null && $origValue !== null) { $connection->delete($table, $where); } - if ($updateValue === 1) { + if ($updateValue === 1 && $origValue === $newValue) { $this->_updateAttributeValues($attribute, $origValueId); } else { $this->_processAttributeValues(); @@ -2026,7 +2026,7 @@ protected function loadAttributesForObject($attributes, $object = null) * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function _updateAttributeValues(AbstractAttribute $attribute, mixed $valueId): static + private function _updateAttributeValues(AbstractAttribute $attribute, mixed $valueId): static { $connection = $this->getConnection(); foreach ($this->_attributeValuesToSave as $table => $data) { @@ -2039,9 +2039,13 @@ protected function _updateAttributeValues(AbstractAttribute $attribute, mixed $v } } + foreach ($this->_attributeValuesToDelete as $table => $valueIds) { + $connection->delete($table, ['value_id IN (?)' => $valueIds]); + } + // reset data arrays $this->_attributeValuesToSave = []; - + $this->_attributeValuesToDelete = []; return $this; } From 6d719fdebdc14277575699ba53419868b0abba31 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Wed, 1 Feb 2023 23:56:40 +0530 Subject: [PATCH 683/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- .../Model/ResourceModel/AbstractResource.php | 14 ++++++- .../Eav/Model/Entity/AbstractEntity.php | 40 +------------------ 2 files changed, 14 insertions(+), 40 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index c71225b4fc67f..b79f0fc1286cf 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -325,7 +325,19 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - return $this->_saveAttributeValue($object, $attribute, $value); + if ($valueId > 0) { + $table = $attribute->getBackend()->getTable(); + $connection = $this->getConnection(); + $connection->update( + $table, + ['value' => $this->_prepareValueForSave($value, $attribute)], + sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) + ); + + return $this; + } else { + return $this->_saveAttributeValue($object, $attribute, $value); + } } /** diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 7a9227700c67f..08823bacce4d4 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1669,7 +1669,6 @@ protected function _deleteAttributes($object, $table, $info) */ public function saveAttribute(DataObject $object, $attributeCode) { - $updateValue = 0; $attribute = $this->getAttribute($attributeCode); $backend = $attribute->getBackend(); $table = $backend->getTable(); @@ -1700,15 +1699,10 @@ public function saveAttribute(DataObject $object, $attributeCode) $this->_insertAttribute($object, $attribute, $newValue); } elseif ($origValueId !== false && $newValue !== null) { $this->_updateAttribute($object, $attribute, $origValueId, $newValue); - $updateValue = 1; } elseif ($origValueId !== false && $newValue === null && $origValue !== null) { $connection->delete($table, $where); } - if ($updateValue === 1 && $origValue === $newValue) { - $this->_updateAttributeValues($attribute, $origValueId); - } else { - $this->_processAttributeValues(); - } + $this->_processAttributeValues(); $connection->commit(); } catch (\Exception $e) { $connection->rollBack(); @@ -2017,36 +2011,4 @@ protected function loadAttributesForObject($attributes, $object = null) } } } - - /** - * Update entity attribute values - * - * @param AbstractAttribute $attribute - * @param mixed $valueId - * @return $this - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - private function _updateAttributeValues(AbstractAttribute $attribute, mixed $valueId): static - { - $connection = $this->getConnection(); - foreach ($this->_attributeValuesToSave as $table => $data) { - foreach ($data as $columnValue) { - $connection->update( - $table, - ['value' => $this->_prepareValueForSave($columnValue['value'], $attribute)], - sprintf('%s=%d', $connection->quoteIdentifier('value_id'), $valueId) - ); - } - } - - foreach ($this->_attributeValuesToDelete as $table => $valueIds) { - $connection->delete($table, ['value_id IN (?)' => $valueIds]); - } - - // reset data arrays - $this->_attributeValuesToSave = []; - $this->_attributeValuesToDelete = []; - - return $this; - } } From 4f45d967f4cd9e1287848c7cd6464df8ac15e01d Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Thu, 2 Feb 2023 13:33:29 +0530 Subject: [PATCH 684/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build failure. --- .../Magento/Catalog/Model/ResourceModel/AbstractResource.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index b79f0fc1286cf..2bcac5f50156d 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -325,7 +325,9 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - if ($valueId > 0) { + $entity = $attribute->getEntity(); + $row = $this->getAttributeRow($entity, $object, $attribute); + if ($valueId > 0 && array_key_exists('store_id', $row)) { $table = $attribute->getBackend()->getTable(); $connection = $this->getConnection(); $connection->update( From c0270e04195d05d17170e0e1f2dc8eca79360b7b Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 2 Feb 2023 14:49:34 +0530 Subject: [PATCH 685/985] ACP2E-1529 phpcs static test fix --- app/code/Magento/Email/Model/Template/Filter.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index be6212fc58424..0c91343a7720e 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -69,12 +69,14 @@ class Filter extends Template /** * @var bool * @deprecated SID is not being used as query parameter anymore. + * @see storeDirective */ protected $_useSessionInUrl = false; /** * @var array * @deprecated 101.0.4 Use the new Directive Processor interfaces + * @see applyModifiers */ protected $_modifiers = ['nl2br' => '']; @@ -281,6 +283,7 @@ public function setUseAbsoluteLinks($flag) * @return $this * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @deprecated SID query parameter is not used in URLs anymore. + * @see setUseSessionInUrl */ public function setUseSessionInUrl($flag) { @@ -690,6 +693,7 @@ public function varDirective($construction) * @param string $default assumed modifier if none present * @return array * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces + * @see explodeModifiers */ protected function explodeModifiers($value, $default = null) { @@ -709,6 +713,7 @@ protected function explodeModifiers($value, $default = null) * @param string $modifiers * @return string * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces + * @see applyModifiers */ protected function applyModifiers($value, $modifiers) { @@ -738,6 +743,7 @@ protected function applyModifiers($value, $modifiers) * @param string $type * @return string * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces + * @see modifierEscape */ public function modifierEscape($value, $type = 'html') { From 33318dfd87895ca677e00d32a24a9c4a56407f0e Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 2 Feb 2023 11:37:25 +0200 Subject: [PATCH 686/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed secondary store redirect issue --- lib/internal/Magento/Framework/App/Config.php | 1 + .../Magento/Framework/App/Config/ScopeCodeResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php index dd386f6c3ff5c..e8dddeb08468f 100644 --- a/lib/internal/Magento/Framework/App/Config.php +++ b/lib/internal/Magento/Framework/App/Config.php @@ -125,6 +125,7 @@ public function clean() */ public function get($configType, $path = '', $default = null) { + $path = strtolower($path); $result = null; if (isset($this->types[$configType])) { $result = $this->types[$configType]->get($path); diff --git a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php index 681af35944695..8f25bacd536ad 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -59,9 +59,9 @@ public function resolve($scopeType, $scopeCode) $scopeCode = $resolverScopeCode; } - $this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode; + $this->resolvedScopeCodes[$scopeType][$scopeCode] = strtolower($resolverScopeCode); - return $resolverScopeCode; + return $this->resolvedScopeCodes[$scopeType][$scopeCode]; } /** From 2aa1c8a74f8ba09983823f9643e483f7c393899c Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 16:12:32 +0530 Subject: [PATCH 687/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- ...lcomeMessageWithSingleQuoteActionGroup.xml | 21 +++++++++++++++++ ...eaderWelcomeMessageWithSingleQuoteTest.xml | 23 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml create mode 100644 app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml diff --git a/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml b/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml new file mode 100644 index 0000000000000..9a0fe4eb8ec3c --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup"> + <annotations> + <description>Validates the Welcome message containing single quote is rendered correctly.</description> + </annotations> + + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="openStorefrontHomePage"/> + <waitForPageLoad stepKey="waitForStorefrontPageLoad"/> + <waitForElementVisible selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="waitWelcomeMessage"/> + <waitForText userInput="Message d'accueil par défaut" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="verifyWelcomeMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml new file mode 100644 index 0000000000000..d5dc66395198b --- /dev/null +++ b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StoreFrontHeaderWelcomeMessageWithSingleQuoteTest"> + <annotations> + <features value="Theme"/> + <stories value="Returns"/> + <title value="Verify header welcome message containing single quote rendered correctly on storefront"/> + <description value="Verify header welcome message containing single quote rendered correctly on storefront"/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7876"/> + <useCaseId value="ACP2E-1602"/> + <group value="theme"/> + </annotations> + <actionGroup ref="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup" stepKey="assertWelcomeMessage"/> + </test> +</tests> From 6664f70fac36b24f95c2e2e5b64317abbc42f26a Mon Sep 17 00:00:00 2001 From: Thomas Klein <thomasklein876@gmail.com> Date: Thu, 2 Feb 2023 12:00:29 +0100 Subject: [PATCH 688/985] Expiration period is now hours instead of days --- app/code/Magento/Customer/Model/Customer.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php index c851836134b6d..74d1189c46568 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -1286,6 +1286,8 @@ public function changeResetPasswordLinkToken($passwordLinkToken) * Check if current reset password link token is expired * * @return boolean + * @deprecated + * @see \Magento\Customer\Model\AccountManagement::isResetPasswordLinkTokenExpired */ public function isResetPasswordLinkTokenExpired() { @@ -1304,12 +1306,9 @@ public function isResetPasswordLinkTokenExpired() return true; } - $dayDifference = floor(($currentTimestamp - $tokenTimestamp) / (24 * 60 * 60)); - if ($dayDifference >= $expirationPeriod) { - return true; - } - - return false; + $hourDifference = floor(($currentTimestamp - $tokenTimestamp) / (60 * 60)); + + return $hourDifference >= $expirationPeriod; } /** From 8121469b44ce1de54d8d755c42b51fed3788dc37 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 2 Feb 2023 13:19:36 +0200 Subject: [PATCH 689/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code adjusted unit tests --- lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php | 2 +- .../Framework/App/Test/Unit/Config/ScopeCodeResolverTest.php | 2 +- lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php index 8f25bacd536ad..f908fa9e9524e 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -59,7 +59,7 @@ public function resolve($scopeType, $scopeCode) $scopeCode = $resolverScopeCode; } - $this->resolvedScopeCodes[$scopeType][$scopeCode] = strtolower($resolverScopeCode); + $this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode ?: strtolower($resolverScopeCode); return $this->resolvedScopeCodes[$scopeType][$scopeCode]; } diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Config/ScopeCodeResolverTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Config/ScopeCodeResolverTest.php index 592ae69419723..6da8ed2f039da 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Config/ScopeCodeResolverTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Config/ScopeCodeResolverTest.php @@ -67,6 +67,6 @@ public function testResolve() $this->scope->expects($this->once()) ->method('getCode') ->willReturn($scopeCode); - $this->assertEquals($scopeCode, $this->scopeCodeResolver->resolve($scopeType, $scopeId)); + $this->assertEquals(strtolower($scopeCode), $this->scopeCodeResolver->resolve($scopeType, $scopeId)); } } diff --git a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php index 9072c33512970..73e171fdc4859 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/ConfigTest.php @@ -71,7 +71,7 @@ public function testGetValue($scope, $scopeCode = null) } $this->configType->expects($this->once()) ->method('get') - ->with($scope =='store' ? 'stores/path' : 'websites/myWebsite/path') + ->with($scope =='store' ? 'stores/path' : 'websites/mywebsite/path') ->willReturn(true); $this->assertTrue($this->appConfig->getValue($path, $scope, $scopeCode ?: $this->scope)); From 1110ad2a7e4a4259e16da71336c0f2222445ad70 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 17:50:14 +0530 Subject: [PATCH 690/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- .../StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml index d5dc66395198b..a5cd41465073c 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml @@ -18,6 +18,10 @@ <useCaseId value="ACP2E-1602"/> <group value="theme"/> </annotations> + <!--Login to admin--> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdmin"/> + <actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/> + <!--Verify welcome message at storefront--> <actionGroup ref="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup" stepKey="assertWelcomeMessage"/> </test> </tests> From 4ae7915a25c0395a647666bfb9bbfe3080a9ceba Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 2 Feb 2023 14:38:37 +0200 Subject: [PATCH 691/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed deprecated function call --- lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php index f908fa9e9524e..4a696cd7c2003 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -59,7 +59,7 @@ public function resolve($scopeType, $scopeCode) $scopeCode = $resolverScopeCode; } - $this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode ?: strtolower($resolverScopeCode); + $this->resolvedScopeCodes[$scopeType][$scopeCode] = is_null($resolverScopeCode) ? null : strtolower($resolverScopeCode); return $this->resolvedScopeCodes[$scopeType][$scopeCode]; } From f4f0e786041d3c0481ec9f4c960da62113430b82 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 2 Feb 2023 15:31:25 +0200 Subject: [PATCH 692/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed static --- .../Magento/Framework/App/Config/ScopeCodeResolver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php index 4a696cd7c2003..fced047ed42d0 100644 --- a/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php +++ b/lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php @@ -59,7 +59,8 @@ public function resolve($scopeType, $scopeCode) $scopeCode = $resolverScopeCode; } - $this->resolvedScopeCodes[$scopeType][$scopeCode] = is_null($resolverScopeCode) ? null : strtolower($resolverScopeCode); + $this->resolvedScopeCodes[$scopeType][$scopeCode] = + is_null($resolverScopeCode) ? null : strtolower($resolverScopeCode); return $this->resolvedScopeCodes[$scopeType][$scopeCode]; } From 1392150b7e930c746e4694bcfeba9009bb689964 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 19:02:08 +0530 Subject: [PATCH 693/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- .../Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml index 39dd719ce10f4..169305e80727b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml @@ -9,7 +9,7 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="StorefrontPanelHeaderSection"> - <element name="welcomeMessage" type="text" selector="header>.panel .greet.welcome" /> + <element name="welcomeMessage" type="text" selector="header>.panel .greet.welcome" timeout="120"/> <element name="createAnAccountLink" type="select" selector="//div[@class='panel wrapper']//li/a[contains(.,'Create an Account')]" timeout="30"/> <element name="notYouLink" type="button" selector=".greet.welcome span a"/> <element name="customerWelcome" type="text" selector=".panel.header .greet.welcome"/> From b36d05d5a3c15ae573c08fb50aee05e658ac628e Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 2 Feb 2023 20:04:27 +0530 Subject: [PATCH 694/985] ACP2E-1529 unit test --- .../Magento/Email/Model/Template/Filter.php | 2 +- .../Test/Unit/Model/Template/FilterTest.php | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 0c91343a7720e..18d41cb309f0b 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -588,7 +588,7 @@ public function storeDirective($construction) * Pass extra parameter to distinguish stores urls for property Magento\Framework\Url $cacheUrl * in multi-store environment */ - if ($construction[1]!="store" && $construction[2]!="url=''") { + if ($construction[1] !== "store") { $this->urlModel->setScope($this->_storeManager->getStore()); } $params['_escape_params'] = $this->_storeManager->getStore()->getCode(); diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php index 2cdb79552e0f8..d1d4a9e2b03d4 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php @@ -35,7 +35,6 @@ use Magento\Framework\View\Asset\Repository; use Magento\Framework\View\LayoutFactory; use Magento\Framework\View\LayoutInterface; -use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; use Magento\Variable\Model\Source\Variables; @@ -575,4 +574,38 @@ public function testProtocolDirectiveWithInvalidSchema() ]; $model->protocolDirective($data); } + + /** + * @dataProvider dataProviderCompanyRedirect + */ + public function testStoreDirectiveForCompanyRedirect($construction, $expected, $code) + { + $this->storeManager->expects($this->any()) + ->method('getStore') + ->willReturn($this->store); + $this->store->expects($this->any())->method('getCode')->willReturn($code); + + $this->backendUrlBuilder->expects($this->once()) + ->method('getUrl') + ->willReturn($expected); + + $result = $this->getModel()->storeDirective($construction); + $this->assertEquals($expected, $result); + } + + public function dataProviderCompanyRedirect() + { + return [ + [ + ["{{store url=''}}",'store',"url=''"], + 'http://m246ceeeb2b.french.test/frvw/', + 'frvw' + ], + [ + ["{{store url=''}}",'store_invalid',"url=''"], + 'http://m246ceeeb2b.test/default/', + 'default' + ] + ]; + } } From 6f85819340c7bf1b63ebe79b5cf59a46ffa63ba8 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 20:24:39 +0530 Subject: [PATCH 695/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- .../Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml | 2 +- ...AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml | 2 ++ .../Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml index 169305e80727b..39dd719ce10f4 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontPanelHeaderSection.xml @@ -9,7 +9,7 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="StorefrontPanelHeaderSection"> - <element name="welcomeMessage" type="text" selector="header>.panel .greet.welcome" timeout="120"/> + <element name="welcomeMessage" type="text" selector="header>.panel .greet.welcome" /> <element name="createAnAccountLink" type="select" selector="//div[@class='panel wrapper']//li/a[contains(.,'Create an Account')]" timeout="30"/> <element name="notYouLink" type="button" selector=".greet.welcome span a"/> <element name="customerWelcome" type="text" selector=".panel.header .greet.welcome"/> diff --git a/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml b/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml index 9a0fe4eb8ec3c..cd46c7207ff53 100644 --- a/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml +++ b/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml @@ -17,5 +17,7 @@ <waitForPageLoad stepKey="waitForStorefrontPageLoad"/> <waitForElementVisible selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="waitWelcomeMessage"/> <waitForText userInput="Message d'accueil par défaut" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="verifyWelcomeMessage"/> + <waitForPageLoad stepKey="waitForStorefrontPageCompleteLoad"/> + <see selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" userInput="Message d'accueil par défaut" stepKey="assertWelcomeMessage" /> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml index a5cd41465073c..5f8584e08ec73 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml @@ -23,5 +23,6 @@ <actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/> <!--Verify welcome message at storefront--> <actionGroup ref="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup" stepKey="assertWelcomeMessage"/> + <wait stepKey="waitAfterWelcomeMessageIsLoaded" time="90"/> </test> </tests> From 3888d2001d87b90bcc8c0898caf1a4b2a1aa2878 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 2 Feb 2023 20:53:57 +0530 Subject: [PATCH 696/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- ...lcomeMessageWithSingleQuoteActionGroup.xml | 23 --------------- ...eaderWelcomeMessageWithSingleQuoteTest.xml | 28 ------------------- .../Theme/Test/Unit/Block/Html/HeaderTest.php | 8 +++--- 3 files changed, 4 insertions(+), 55 deletions(-) delete mode 100644 app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml delete mode 100644 app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml diff --git a/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml b/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml deleted file mode 100644 index cd46c7207ff53..0000000000000 --- a/app/code/Magento/Theme/Test/Mftf/ActionGroup/AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup"> - <annotations> - <description>Validates the Welcome message containing single quote is rendered correctly.</description> - </annotations> - - <amOnPage url="{{StorefrontHomePage.url}}" stepKey="openStorefrontHomePage"/> - <waitForPageLoad stepKey="waitForStorefrontPageLoad"/> - <waitForElementVisible selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="waitWelcomeMessage"/> - <waitForText userInput="Message d'accueil par défaut" selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" stepKey="verifyWelcomeMessage"/> - <waitForPageLoad stepKey="waitForStorefrontPageCompleteLoad"/> - <see selector="{{StorefrontPanelHeaderSection.welcomeMessage}}" userInput="Message d'accueil par défaut" stepKey="assertWelcomeMessage" /> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml deleted file mode 100644 index 5f8584e08ec73..0000000000000 --- a/app/code/Magento/Theme/Test/Mftf/Test/StoreFrontHeaderWelcomeMessageWithSingleQuoteTest.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StoreFrontHeaderWelcomeMessageWithSingleQuoteTest"> - <annotations> - <features value="Theme"/> - <stories value="Returns"/> - <title value="Verify header welcome message containing single quote rendered correctly on storefront"/> - <description value="Verify header welcome message containing single quote rendered correctly on storefront"/> - <severity value="AVERAGE"/> - <testCaseId value="AC-7876"/> - <useCaseId value="ACP2E-1602"/> - <group value="theme"/> - </annotations> - <!--Login to admin--> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdmin"/> - <actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/> - <!--Verify welcome message at storefront--> - <actionGroup ref="AssertStorefrontWelcomeMessageWithSingleQuoteActionGroup" stepKey="assertWelcomeMessage"/> - <wait stepKey="waitAfterWelcomeMessageIsLoaded" time="90"/> - </test> -</tests> diff --git a/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php b/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php index f9055f98d7779..b4f31881fa096 100644 --- a/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php +++ b/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php @@ -58,13 +58,13 @@ public function testGetWelcomeDefault() { $this->scopeConfig->expects($this->once())->method('getValue') ->with('design/header/welcome', ScopeInterface::SCOPE_STORE) - ->willReturn('Welcome Message'); + ->willReturn('Default welcome msg!'); $this->escaper->expects($this->once()) ->method('escapeQuote') - ->with('Welcome Message', true) - ->willReturn('Welcome Message'); + ->with('Default welcome msg!', true) + ->willReturn("Message d'accueil par défaut"); - $this->assertEquals('Welcome Message', $this->unit->getWelcome()); + $this->assertEquals("Message d\'accueil par défaut", $this->unit->getWelcome()); } } From 8c1744d663ba33c11100e44161228d154cea724c Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Thu, 2 Feb 2023 21:43:46 +0530 Subject: [PATCH 697/985] #AC-7870::Product Video is not getting played on StoreFront-updated fotorama lib --- lib/web/fotorama/fotorama.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index 7632f33547724..077a81b096685 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -1219,6 +1219,7 @@ fotoramaVersion = '4.6.4'; } function stopEvent(e, stopPropagation) { + e.preventDefault ? e.preventDefault() : (e.returnValue = false); stopPropagation && e.stopPropagation && e.stopPropagation(); } From 10001db31079282a35ec6082f94d42c434092898 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 2 Feb 2023 11:04:38 -0600 Subject: [PATCH 698/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 140 +++++++++++------- 1 file changed, 84 insertions(+), 56 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 91a435356e67e..7a03bf53cb454 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -8,6 +8,8 @@ namespace Magento\GraphQl\Store; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\GraphQl\PageCache\GraphQLPageCacheAbstract; +use Magento\GraphQlCache\Model\CacheId\CacheIdCalculator; use Magento\Store\Api\Data\StoreConfigInterface; use Magento\Store\Api\StoreConfigManagerInterface; use Magento\Store\Api\StoreRepositoryInterface; @@ -15,12 +17,11 @@ use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\ObjectManager; -use Magento\TestFramework\TestCase\GraphQlAbstract; /** * Test storeConfig query cache */ -class StoreConfigCacheTest extends GraphQlAbstract +class StoreConfigCacheTest extends GraphQLPageCacheAbstract { /** @var ObjectManager */ @@ -46,73 +47,100 @@ public function testGetStoreConfig(): void $storeResolver = $this->objectManager->get(StoreResolverInterface::class); /** @var StoreRepositoryInterface $storeRepository */ $storeRepository = $this->objectManager->get(StoreRepositoryInterface::class); - $storeId = $storeResolver->getCurrentStoreId(); - $store = $storeRepository->getById($storeId); + $defaultStoreId = $storeResolver->getCurrentStoreId(); + $store = $storeRepository->getById($defaultStoreId); + $defaultStoreCode = $store->getCode(); /** @var StoreConfigInterface $storeConfig */ - $storeConfig = current($storeConfigManager->getStoreConfigs([$store->getCode()])); + $storeConfig = current($storeConfigManager->getStoreConfigs([$defaultStoreCode])); $defaultLocale = $storeConfig->getLocale(); $query = $this->getQuery(); // Query default store config - $response = $this->graphQlQueryWithResponseHeaders($query); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $response['headers']); - $this->assertEquals('MISS', $response['headers']['X-Magento-Cache-Debug']); - $this->assertArrayHasKey('storeConfig', $response['body']); - $responseConfig = $response['body']['storeConfig']; - $this->assertEquals($storeConfig->getId(), $responseConfig['id']); - $this->assertEquals($storeConfig->getCode(), $responseConfig['code']); - $this->assertEquals($defaultLocale, $responseConfig['locale']); - // Query default store config again - $responseHit = $this->graphQlQueryWithResponseHeaders($query); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseHit['headers']); - $this->assertEquals('HIT', $responseHit['headers']['X-Magento-Cache-Debug']); - $responseHitConfig = $responseHit['body']['storeConfig']; - $this->assertEquals($storeConfig->getCode(), $responseHitConfig['code']); - $this->assertEquals($defaultLocale, $responseHitConfig['locale']); + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS the first time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); + // Verify we obtain a cache HIT the second time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseHitResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseHitResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseHitResult['locale']); // Query test store config - $headerMap['Store'] = 'test'; + $testStoreCode = 'test'; + $headerMap['Store'] = $testStoreCode; $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStore['headers']); - $this->assertEquals('MISS', $responseTestStore['headers']['X-Magento-Cache-Debug']); - $responseTestStoreConfig = $responseTestStore['body']['storeConfig']; - $this->assertEquals('test', $responseTestStoreConfig['code']); - $this->assertEquals($defaultLocale, $responseTestStoreConfig['locale']); - // Query test store config again - $responseTestStoreHit = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreHit['headers']); - $this->assertEquals('HIT', $responseTestStoreHit['headers']['X-Magento-Cache-Debug']); - $responseTestStoreHitConfig = $responseTestStoreHit['body']['storeConfig']; - $this->assertEquals('test', $responseTestStoreHitConfig['code']); - $this->assertEquals($defaultLocale, $responseTestStoreHitConfig['locale']); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS the first time + $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $testStoreResponse['body']); + $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $testStoreResponseResult['locale']); + // Verify we obtain a cache HIT the second time + $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $testStoreResponseHit['body']); + $testStoreResponseHitResult = $testStoreResponseHit['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseHitResult['code']); + $this->assertEquals($defaultLocale, $testStoreResponseHitResult['locale']); // Change test store locale $newLocale = 'de_DE'; - $this->setConfig('general/locale/code', $newLocale, ScopeInterface::SCOPE_STORES, 'test'); + $this->setConfig('general/locale/code', $newLocale, ScopeInterface::SCOPE_STORES, $testStoreCode); - // Query default store config - $responseHit2 = $this->graphQlQueryWithResponseHeaders($query); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseHit2['headers']); - $this->assertEquals('HIT', $responseHit2['headers']['X-Magento-Cache-Debug']); - $responseHit2Config = $responseHit2['body']['storeConfig']; - $this->assertEquals($storeConfig->getCode(), $responseHit2Config['code']); - $this->assertEquals($defaultLocale, $responseHit2Config['locale']); - - // Query test store config - $responseTestStoreMiss = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreMiss['headers']); - $this->assertEquals('MISS', $responseTestStoreMiss['headers']['X-Magento-Cache-Debug']); - $responseTestStoreMissConfig = $responseTestStoreMiss['body']['storeConfig']; - $this->assertEquals('test', $responseTestStoreMissConfig['code']); - $this->assertEquals($newLocale, $responseTestStoreMissConfig['locale']); + // Query default store config after test store config change + // Verify we obtain a cache HIT the 3rd time + $defaultStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponseHit2['body']); + $defaultStoreResponseHit2Result = $defaultStoreResponseHit2['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseHit2Result['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseHit2Result['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseHit2Result['locale']); - // Query test store config again - $responseTestStoreHit2 = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); - $this->assertArrayHasKey('X-Magento-Cache-Debug', $responseTestStoreHit2['headers']); - $this->assertEquals('HIT', $responseTestStoreHit2['headers']['X-Magento-Cache-Debug']); - $responseTestStoreHit2Config = $responseTestStoreHit2['body']['storeConfig']; - $this->assertEquals('test', $responseTestStoreHit2Config['code']); - $this->assertEquals($newLocale, $responseTestStoreHit2Config['locale']); + // Query test store config after test store config change + // Verify we obtain a cache MISS the 3rd time + $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $testStoreResponseMiss['body']); + $testStoreResponseMissResult = $testStoreResponseMiss['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseMissResult['code']); + $this->assertEquals($newLocale, $testStoreResponseMissResult['locale']); + // Verify we obtain a cache HIT the 4th time + $testStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $testStoreResponseHit2['body']); + $testStoreResponseHit2Result = $testStoreResponseHit2['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseHit2Result['code']); + $this->assertEquals($newLocale, $testStoreResponseHit2Result['locale']); } /** From f5071e6d81b929a498ce936996e1dfaa2b35b2db Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 3 Feb 2023 00:15:30 +0530 Subject: [PATCH 699/985] ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule. --- ...nCartPriceRuleForAutoTypeUsesPerCouponTest.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml index 3f788887d1355..f9dfa47a405fe 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml @@ -42,19 +42,14 @@ <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> - <!-- Create a cart price rule --> + <!-- Create a cart price rule --> <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/> <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/> <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/> - <!-- Select custom customer groups --> - <click selector="{{CartPriceRuleSection.customerGroupsToggle}}" stepKey="clickCustomerGroupsToggle" after="selectWebsites"/> - <click selector="{{CartPriceRuleSection.selectAll}}" stepKey="clickSelectAll" after="clickCustomerGroupsToggle"/> - <click selector="{{CartPriceRuleSection.doneButton}}" stepKey="clickDoneButton" after="clickSelectAll"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="General" stepKey="selectCustomerGroup"/> <!-- Choose coupon type auto --> <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Auto" stepKey="selectCouponType"/> - <!-- Verify `Use Auto Generation` checkbox not visible while `Uses per Coupon` field there for coupon type auto--> - <dontSeeCheckboxIsChecked selector="{{AdminCartPriceRulesFormSection.useAutoGeneration}}" stepKey="tickAutoGeneration"/> <fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="1" stepKey="fillUsesPerCoupon"/> <!--Open Actions tabs, fill required field and save the cart price rule--> <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> @@ -108,8 +103,8 @@ <!-- Go to Checkout and Click Place Order button --> <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> - <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" - stepKey="selectFlatShippingMethod"/> + <waitForPageLoad time="5" stepKey="waitForPageLoad2"/> + <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatShippingMethod"/> <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> <!-- Checkout select Check/Money Order payment --> @@ -124,7 +119,7 @@ <!-- Open the Product Page again, add the product to Cart, go to Shopping Cart and Apply the second coupon code --> <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage2"/> - <waitForPageLoad stepKey="waitForPageLoad2"/> + <waitForPageLoad stepKey="waitForPageLoad3"/> <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule2"> <argument name="product" value="$$createSimpleProduct$$"/> <argument name="couponCode" value="{$couponCode2}"/> From b851a4279cc4cce5a63f559cadc6b1a74300f5bf Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 2 Feb 2023 14:10:57 -0600 Subject: [PATCH 700/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 7a03bf53cb454..6387f470d61a2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -36,6 +36,7 @@ protected function setUp(): void } /** + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException */ From ec6e45f142ca8e68b18e03c767a20ea6e45a4716 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Thu, 2 Feb 2023 17:45:52 -0600 Subject: [PATCH 701/985] ACP2E-1565: [Cloud] Import Product images issues --- .../CatalogImportExport/Model/Import/Product.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index e7c7ede1ca3db..3058c6f6619d4 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -2080,9 +2080,13 @@ private function getFileContent(string $path): string */ private function getRemoteFileContent(string $filename): string { - // phpcs:disable Magento2.Functions.DiscouragedFunction - $content = file_get_contents($filename); - // phpcs:enable Magento2.Functions.DiscouragedFunction + try { + // phpcs:ignore Magento2.Functions.DiscouragedFunction + $content = file_get_contents($filename); + } catch (\Exception $e) { + $content = false; + } + return $content !== false ? $content : ''; } From 0c7a4b5d252ef9b791ad8c2867fb41ff138ddf18 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 3 Feb 2023 09:59:16 +0530 Subject: [PATCH 702/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Fixed the build error. --- .../Catalog/Model/ResourceModel/AbstractResource.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php index 2bcac5f50156d..3f0ee96d70eee 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php @@ -24,14 +24,14 @@ abstract class AbstractResource extends \Magento\Eav\Model\Entity\AbstractEntity { /** - * Store manager + * Store manager to get the store information * * @var \Magento\Store\Model\StoreManagerInterface */ protected $_storeManager; /** - * Model factory + * Model factory to create a model object * * @var \Magento\Catalog\Model\Factory */ @@ -327,7 +327,11 @@ protected function _updateAttribute($object, $attribute, $valueId, $value) { $entity = $attribute->getEntity(); $row = $this->getAttributeRow($entity, $object, $attribute); - if ($valueId > 0 && array_key_exists('store_id', $row)) { + $hasSingleStore = $this->_storeManager->hasSingleStore(); + $storeId = $hasSingleStore + ? $this->getDefaultStoreId() + : (int) $this->_storeManager->getStore($object->getStoreId())->getId(); + if ($valueId > 0 && array_key_exists('store_id', $row) && $storeId === $row['store_id']) { $table = $attribute->getBackend()->getTable(); $connection = $this->getConnection(); $connection->update( From b8c993d551e1c1c977f8a4ca21860590fee75f55 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Fri, 3 Feb 2023 12:28:08 +0530 Subject: [PATCH 703/985] AC-7822:Phpstan dependency should not be limited to a specific version --- composer.json | 2 +- composer.lock | 1079 ++++++++--------- .../Formatters/FilteredErrorFormatter.php | 3 +- 3 files changed, 542 insertions(+), 542 deletions(-) diff --git a/composer.json b/composer.json index 7edcf7c8510d3..92057cef40e2a 100644 --- a/composer.json +++ b/composer.json @@ -98,7 +98,7 @@ "magento/magento2-functional-testing-framework": "^4.0", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", - "phpstan/phpstan": "1.9.2", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^9.5", "sebastian/phpcpd": "^6.0", "symfony/finder": "^5.4" diff --git a/composer.lock b/composer.lock index 08969b1f55eb9..25e61661acb45 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": "daf5c45161b0b1cf93c6de2b0fceb154", + "content-hash": "205c66f1f11f7a3dffb85b24c7480e01", "packages": [ { "name": "aws/aws-crt-php", @@ -963,224 +963,6 @@ ], "time": "2022-02-25T21:32:43+00:00" }, - { - "name": "doctrine/annotations", - "version": "1.13.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "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": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" - }, - "time": "2021-08-05T19:00:23+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "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.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "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": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" - }, { "name": "elasticsearch/elasticsearch", "version": "v7.17.1", @@ -1822,166 +1604,6 @@ ], "time": "2022-10-26T14:07:24+00:00" }, - { - "name": "jms/metadata", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", - "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "require-dev": { - "doctrine/cache": "^1.0", - "doctrine/coding-standard": "^8.0", - "mikey179/vfsstream": "^1.6.7", - "phpunit/phpunit": "^8.5|^9.0", - "psr/container": "^1.0", - "symfony/cache": "^3.1|^4.0|^5.0", - "symfony/dependency-injection": "^3.1|^4.0|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Metadata\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "support": { - "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" - }, - "time": "2021-11-22T12:27:42+00:00" - }, - { - "name": "jms/serializer", - "version": "3.18.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "32956d3e3e1938f8130523a94297399d2b26fea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/32956d3e3e1938f8130523a94297399d2b26fea7", - "reference": "32956d3e3e1938f8130523a94297399d2b26fea7", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.13", - "doctrine/instantiator": "^1.0.3", - "doctrine/lexer": "^1.1", - "jms/metadata": "^2.6", - "php": "^7.2||^8.0", - "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.1", - "doctrine/orm": "~2.1", - "doctrine/persistence": "^1.3.3|^2.0|^3.0", - "doctrine/phpcr-odm": "^1.3|^2.0", - "ext-pdo_sqlite": "*", - "jackalope/jackalope-doctrine-dbal": "^1.1.5", - "ocramius/proxy-manager": "^1.0|^2.0", - "phpbench/phpbench": "^1.0", - "phpstan/phpstan": "^1.0.2", - "phpunit/phpunit": "^8.5.21||^9.0", - "psr/container": "^1.0", - "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", - "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", - "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", - "symfony/form": "^3.0|^4.0|^5.0|^6.0", - "symfony/translation": "^3.0|^4.0|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", - "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", - "twig/twig": "~1.34|~2.4|^3.0" - }, - "suggest": { - "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", - "symfony/cache": "Required if you like to use cache functionality.", - "symfony/uid": "Required if you'd like to serialize UID objects.", - "symfony/yaml": "Required if you'd like to use the YAML metadata format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "JMS\\Serializer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - } - ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", - "homepage": "http://jmsyst.com/libs/serializer", - "keywords": [ - "deserialization", - "jaxb", - "json", - "serialization", - "xml" - ], - "support": { - "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.18.1" - }, - "funding": [ - { - "url": "https://github.com/goetas", - "type": "github" - } - ], - "time": "2022-08-24T15:26:21+00:00" - }, { "name": "justinrainbow/json-schema", "version": "5.2.12", @@ -5869,139 +5491,46 @@ "role": "Developer" } ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], - "support": { - "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" - }, - "funding": [ - { - "url": "https://github.com/terrafrost", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpseclib", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" - } - ], - "time": "2022-12-17T18:26:50+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "981cc368a216c988e862a75e526b6076987d1b50" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", - "reference": "981cc368a216c988e862a75e526b6076987d1b50", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" - }, - "time": "2022-05-05T11:32:40+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", "keywords": [ - "cache", - "psr", - "psr-6" + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.18" }, - "time": "2021-02-03T23:26:27+00:00" + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2022-12-17T18:26:50+00:00" }, { "name": "psr/container", @@ -9356,16 +8885,16 @@ }, { "name": "webonyx/graphql-php", - "version": "v15.0.1", + "version": "v15.0.3", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3" + "reference": "bfa78b44a93c00ebc9a1bc92497bc170a0e3b656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/15fb39ba17faa332a2001aed5c1472117ec5abc3", - "reference": "15fb39ba17faa332a2001aed5c1472117ec5abc3", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/bfa78b44a93c00ebc9a1bc92497bc170a0e3b656", + "reference": "bfa78b44a93c00ebc9a1bc92497bc170a0e3b656", "shasum": "" }, "require": { @@ -9381,16 +8910,16 @@ "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "1.9.8", + "phpstan/phpstan": "1.9.14", "phpstan/phpstan-phpunit": "1.3.3", - "phpstan/phpstan-strict-rules": "1.4.4", + "phpstan/phpstan-strict-rules": "1.4.5", "phpunit/phpunit": "^9.5", "psr/http-message": "^1", "react/http": "^1.6", "react/promise": "^2.9", "symfony/polyfill-php81": "^1.23", "symfony/var-exporter": "^5 || ^6", - "thecodingmachine/safe": "^1.3" + "thecodingmachine/safe": "^1.3 || ^2" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -9414,7 +8943,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v15.0.1" + "source": "https://github.com/webonyx/graphql-php/tree/v15.0.3" }, "funding": [ { @@ -9422,7 +8951,7 @@ "type": "open_collective" } ], - "time": "2023-01-11T14:57:18+00:00" + "time": "2023-02-02T21:59:56+00:00" }, { "name": "wikimedia/less.php", @@ -10469,6 +9998,224 @@ }, "time": "2022-09-13T17:27:26+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.13.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.2" + }, + "time": "2021-08-05T19:00:23+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "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.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "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": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" + }, { "name": "friendsofphp/php-cs-fixer", "version": "v3.8.0", @@ -10558,6 +10305,166 @@ ], "time": "2022-03-18T17:20:59+00:00" }, + { + "name": "jms/metadata", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "reference": "c3a3214354b5a765a19875f7b7c5ebcd94e462e5", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "require-dev": { + "doctrine/cache": "^1.0", + "doctrine/coding-standard": "^8.0", + "mikey179/vfsstream": "^1.6.7", + "phpunit/phpunit": "^8.5|^9.0", + "psr/container": "^1.0", + "symfony/cache": "^3.1|^4.0|^5.0", + "symfony/dependency-injection": "^3.1|^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "support": { + "issues": "https://github.com/schmittjoh/metadata/issues", + "source": "https://github.com/schmittjoh/metadata/tree/2.6.1" + }, + "time": "2021-11-22T12:27:42+00:00" + }, + { + "name": "jms/serializer", + "version": "3.18.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/serializer.git", + "reference": "32956d3e3e1938f8130523a94297399d2b26fea7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/32956d3e3e1938f8130523a94297399d2b26fea7", + "reference": "32956d3e3e1938f8130523a94297399d2b26fea7", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.13", + "doctrine/instantiator": "^1.0.3", + "doctrine/lexer": "^1.1", + "jms/metadata": "^2.6", + "php": "^7.2||^8.0", + "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.1", + "doctrine/orm": "~2.1", + "doctrine/persistence": "^1.3.3|^2.0|^3.0", + "doctrine/phpcr-odm": "^1.3|^2.0", + "ext-pdo_sqlite": "*", + "jackalope/jackalope-doctrine-dbal": "^1.1.5", + "ocramius/proxy-manager": "^1.0|^2.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "^1.0.2", + "phpunit/phpunit": "^8.5.21||^9.0", + "psr/container": "^1.0", + "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", + "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", + "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", + "symfony/form": "^3.0|^4.0|^5.0|^6.0", + "symfony/translation": "^3.0|^4.0|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", + "symfony/validator": "^3.1.9|^4.0|^5.0|^6.0", + "symfony/yaml": "^3.3|^4.0|^5.0|^6.0", + "twig/twig": "~1.34|~2.4|^3.0" + }, + "suggest": { + "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", + "symfony/cache": "Required if you like to use cache functionality.", + "symfony/uid": "Required if you'd like to serialize UID objects.", + "symfony/yaml": "Required if you'd like to use the YAML metadata format." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "JMS\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "homepage": "http://jmsyst.com/libs/serializer", + "keywords": [ + "deserialization", + "jaxb", + "json", + "serialization", + "xml" + ], + "support": { + "issues": "https://github.com/schmittjoh/serializer/issues", + "source": "https://github.com/schmittjoh/serializer/tree/3.18.1" + }, + "funding": [ + { + "url": "https://github.com/goetas", + "type": "github" + } + ], + "time": "2022-08-24T15:26:21+00:00" + }, { "name": "laminas/laminas-diactoros", "version": "2.23.0", @@ -10728,16 +10635,16 @@ }, { "name": "magento/magento-coding-standard", - "version": "30", + "version": "31", "source": { "type": "git", "url": "https://github.com/magento/magento-coding-standard.git", - "reference": "ffd481875358de6de6d8b1df26f0916f8512e314" + "reference": "1172711ea1947d0258adae8d8e0a72669f1c2d99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/ffd481875358de6de6d8b1df26f0916f8512e314", - "reference": "ffd481875358de6de6d8b1df26f0916f8512e314", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/1172711ea1947d0258adae8d8e0a72669f1c2d99", + "reference": "1172711ea1947d0258adae8d8e0a72669f1c2d99", "shasum": "" }, "require": { @@ -10745,7 +10652,7 @@ "ext-simplexml": "*", "php": ">=7.4", "phpcompatibility/php-compatibility": "^9.3", - "rector/rector": "^0.14.8", + "rector/rector": "^0.15.10", "squizlabs/php_codesniffer": "^3.6.1", "webonyx/graphql-php": "^15.0" }, @@ -10770,9 +10677,9 @@ "description": "A set of Magento specific PHP CodeSniffer rules.", "support": { "issues": "https://github.com/magento/magento-coding-standard/issues", - "source": "https://github.com/magento/magento-coding-standard/tree/v30" + "source": "https://github.com/magento/magento-coding-standard/tree/v31" }, - "time": "2023-01-13T14:29:21+00:00" + "time": "2023-02-01T15:38:47+00:00" }, { "name": "magento/magento2-functional-testing-framework", @@ -11635,18 +11542,62 @@ }, "time": "2022-11-29T15:06:56+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "981cc368a216c988e862a75e526b6076987d1b50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", + "reference": "981cc368a216c988e862a75e526b6076987d1b50", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" + }, + "time": "2022-05-05T11:32:40+00:00" + }, { "name": "phpstan/phpstan", - "version": "1.9.2", + "version": "1.9.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", + "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", "shasum": "" }, "require": { @@ -11676,7 +11627,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.2" + "source": "https://github.com/phpstan/phpstan/tree/1.9.14" }, "funding": [ { @@ -11692,7 +11643,7 @@ "type": "tidelift" } ], - "time": "2022-11-10T09:56:11+00:00" + "time": "2023-01-19T10:47:09+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12115,29 +12066,77 @@ ], "time": "2022-04-01T12:37:26+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "rector/rector", - "version": "0.14.8", + "version": "0.15.11", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e" + "reference": "0034e743daf120f70359b9600a0946a17e3a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/46ee9a173a2b2645ca92a75ffc17460139fa226e", - "reference": "46ee9a173a2b2645ca92a75ffc17460139fa226e", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/0034e743daf120f70359b9600a0946a17e3a6364", + "reference": "0034e743daf120f70359b9600a0946a17e3a6364", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.9.0" + "phpstan/phpstan": "^1.9.14" }, "conflict": { "rector/rector-doctrine": "*", "rector/rector-downgrade-php": "*", "rector/rector-php-parser": "*", - "rector/rector-phpoffice": "*", "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, @@ -12147,7 +12146,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.14-dev" + "dev-main": "0.15-dev" } }, "autoload": { @@ -12162,7 +12161,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.8" + "source": "https://github.com/rectorphp/rector/tree/0.15.11" }, "funding": [ { @@ -12170,7 +12169,7 @@ "type": "github" } ], - "time": "2022-11-14T14:09:49+00:00" + "time": "2023-02-02T16:53:15+00:00" }, { "name": "sebastian/cli-parser", @@ -13948,5 +13947,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php index 5ec57436df345..3de9a61a99c6e 100644 --- a/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php +++ b/dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php @@ -75,7 +75,8 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in $analysisResult->getCollectedData(), $analysisResult->isDefaultLevelUsed(), $analysisResult->getProjectConfigFile(), - $analysisResult->isResultCacheSaved() + $analysisResult->isResultCacheSaved(), + $analysisResult->getPeakMemoryUsageBytes() ); return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output); From b9d633fff91332bdec9f592a9afe20d1bd31e43b Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Fri, 3 Feb 2023 13:26:52 +0530 Subject: [PATCH 704/985] AC-6922::JSUnit test suite sometimes hangs when running chrome --- package.json.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json.sample b/package.json.sample index 024eb7c119e39..93d6159d12ec0 100644 --- a/package.json.sample +++ b/package.json.sample @@ -17,7 +17,7 @@ "grunt-contrib-connect": "~3.0.0", "grunt-contrib-cssmin": "~4.0.0", "grunt-contrib-imagemin": "~4.0.0", - "grunt-contrib-jasmine": "~3.0.0", + "grunt-contrib-jasmine": "~4.0.0", "grunt-contrib-less": "~2.1.0", "grunt-contrib-watch": "~1.1.0", "grunt-eslint": "~24.0.0", From d1c5ccfdadbc5667e71770c68e617b2e3ad48b12 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Fri, 3 Feb 2023 13:31:49 +0530 Subject: [PATCH 705/985] Multiple errors are displayed in Console when switching images in mobile view-addevent passive listener fixes for touchstart mobile event --- lib/web/fotorama/fotorama.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index 077a81b096685..a60999ef76474 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -1140,7 +1140,7 @@ fotoramaVersion = '4.6.4'; function addEvent(el, e, fn, bool) { if (!e) return; - el.addEventListener ? el.addEventListener(e, fn, {passive: true}) : el.attachEvent('on' + e, fn); + el.addEventListener ? el.addEventListener(e, fn, !!bool) : el.attachEvent('on' + e, fn); } /** @@ -1519,7 +1519,7 @@ fotoramaVersion = '4.6.4'; addEvent(el, 'touchmove', onMove); addEvent(el, 'touchend', onEnd); - addEvent(document, 'touchstart', onOtherStart); + addEvent(document, 'touchstart', onOtherStart, true); addEvent(document, 'touchend', onOtherEnd); addEvent(document, 'touchcancel', onOtherEnd); From ce3451d81eacae7023c2fc57dc0a4f99831031aa Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 3 Feb 2023 15:22:24 +0530 Subject: [PATCH 706/985] ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule. --- ...tPriceRuleForAutoTypeUsesPerCouponTest.xml | 131 ------------------ 1 file changed, 131 deletions(-) delete mode 100644 app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml deleted file mode 100644 index f9dfa47a405fe..0000000000000 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartPriceRuleForAutoTypeUsesPerCouponTest.xml +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCartPriceRuleForAutoTypeUsesPerCouponTest"> - <annotations> - <features value="SalesRule"/> - <stories value="Create cart price rule"/> - <title value="Customer cannot use a distinct coupon code from the same Cart Price Rule."/> - <description value="Customer cannot use a distinct coupon code from the same Cart Price Rule."/> - <severity value="CRITICAL"/> - <testCaseId value="AC-7872"/> - <useCaseId value="ACP2E-1551"/> - <group value="SalesRule"/> - </annotations> - - <before> - <!-- Create Customer with filled Shipping & Billing Address --> - <createData entity="CustomerEntityOne" stepKey="createCustomer"/> - <!--Create simple product--> - <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> - - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - </before> - - <after> - <!--Delete simple product created during the test--> - <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <!-- Delete the cart price rule we made during the test --> - <actionGroup ref="DeleteCartPriceRuleByName" stepKey="cleanUpRule"> - <argument name="ruleName" value="{{_defaultCoupon.code}}"/> - </actionGroup> - <!--Delete customer created during test--> - <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - - <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> - </after> - - <!-- Create a cart price rule --> - <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/> - <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> - <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/> - <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/> - <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="General" stepKey="selectCustomerGroup"/> - <!-- Choose coupon type auto --> - <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Auto" stepKey="selectCouponType"/> - <fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="1" stepKey="fillUsesPerCoupon"/> - <!--Open Actions tabs, fill required field and save the cart price rule--> - <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> - <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{CatPriceRule.apply}}" stepKey="selectActionType"/> - <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{CatPriceRule.discountAmount}}" stepKey="fillDiscountAmount"/> - <click selector="{{AdminCartPriceRulesFormSection.saveAndContinue}}" stepKey="clickSaveAndContinueButton"/> - <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeRuleSavedSuccessMessage"/> - <waitForPageLoad stepKey="waitForPageToLoad"/> - - <!-- Generate some coupon codes --> - <click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSection"/> - <fillField selector="{{AdminCartPriceRulesFormSection.couponQty}}" userInput="5" stepKey="fillCouponQty"/> - <click selector="{{AdminCartPriceRulesFormSection.generateCouponsButton}}" stepKey="clickGenerate"/> - <see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="Message is added to queue, wait to get your coupons soon" stepKey="seeGenerationSuccess"/> - - <!--Start coupon code generator queue--> - <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"> - <argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/> - <argument name="maxMessages" value="1"/> - </actionGroup> - - <!--Reload cart price rule page--> - <actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/> - - <!--Open Manage Coupon Codes tab again to see generated coupon codes--> - <click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSectionSecondTime"/> - <scrollTo selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" stepKey="scrollToCouponGridUsedHeader"/> - <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" stepKey="waitForNewRule"/> - - <!--Assert coupon codes grid header is correct --> - <see selector="{{AdminCartPriceRulesFormSection.couponGridUsedHeader}}" userInput="Used" stepKey="seeCorrectUsedHeader"/> - - <!--Grab two coupon codes and hold on to it for later use --> - <grabTextFrom selector="{{AdminCartPriceRulesFormSection.generatedCouponByIndex('1')}}" stepKey="couponCode"/> - <grabTextFrom selector="{{AdminCartPriceRulesFormSection.generatedCouponByIndex('2')}}" stepKey="couponCode2"/> - - <!-- Login with created Customer --> - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> - <argument name="Customer" value="$$createCustomer$$"/> - </actionGroup> - - <!--Open the Product Page, add the product to Cart, go to Shopping Cart and Apply the first coupon code --> - <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage"/> - <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule"> - <argument name="product" value="$$createSimpleProduct$$"/> - <argument name="couponCode" value="{$couponCode}"/> - </actionGroup> - <waitForText userInput='You used coupon code "{$couponCode}"' stepKey="waitForText"/> - <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{$couponCode}"' stepKey="seeSuccessMessage"/> - <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible"/> - - <!-- Go to Checkout and Click Place Order button --> - <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> - <waitForPageLoad time="5" stepKey="waitForPageLoad2"/> - <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatShippingMethod"/> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> - <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> - <!-- Checkout select Check/Money Order payment --> - <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> - <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> - - <!-- Start the usage processing consumer --> - <actionGroup ref="CliConsumerStartActionGroup" stepKey="startUsageProcessingMessageQueue1"> - <argument name="consumerName" value="{{SalesRuleConsumerData.consumerName}}"/> - <argument name="maxMessages" value="{{SalesRuleConsumerData.messageLimit}}"/> - </actionGroup> - - <!-- Open the Product Page again, add the product to Cart, go to Shopping Cart and Apply the second coupon code --> - <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage2"/> - <waitForPageLoad stepKey="waitForPageLoad3"/> - <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule2"> - <argument name="product" value="$$createSimpleProduct$$"/> - <argument name="couponCode" value="{$couponCode2}"/> - </actionGroup> - <waitForText userInput='You used coupon code "{$couponCode2}"' stepKey="waitForText2"/> - <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{$couponCode2}"' stepKey="seeSuccessMessage2"/> - <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible2"/> - </test> -</tests> From fa3675a0558cc33a7f07ac5fbc634f09084f4293 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 3 Feb 2023 15:44:15 +0530 Subject: [PATCH 707/985] ACP2E-1522: Auto increment number jumping up for catalog_product_entity_* tables - Added the test coverage. --- .../Model/ResourceModel/ProductTest.php | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/ProductTest.php index fd33ddf78ff3a..5e9b64d12a722 100755 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/ProductTest.php @@ -9,6 +9,7 @@ use Magento\Catalog\Test\Fixture\Attribute as AttributeFixture; use Magento\Catalog\Test\Fixture\Product as ProductFixture; use Magento\Framework\ObjectManagerInterface; +use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Eav\Model\GetAttributeSetByName; use Magento\TestFramework\Fixture\AppArea; use Magento\TestFramework\Fixture\AppIsolation; @@ -44,6 +45,11 @@ class ProductTest extends TestCase */ private $objectManager; + /** + * @var StoreManagerInterface + */ + private $storeManager; + /** * @inheritdoc */ @@ -53,6 +59,8 @@ protected function setUp(): void $this->productRepository = $this->objectManager->create(ProductRepositoryInterface::class); $this->model = $this->objectManager->create(Product::class); + + $this->storeManager = $this->objectManager->create(StoreManagerInterface::class); } /** @@ -213,4 +221,57 @@ public function testChangeAttributeSet() $attribute = $this->model->getAttributeRawValue($product->getId(), $attributeCode, 1); $this->assertEmpty($attribute); } + + /** + * Test update product custom attributes + * + * @return void + */ + #[ + DataFixture(AttributeFixture::class, ['attribute_code' => 'first_custom_attribute']), + DataFixture(AttributeFixture::class, ['attribute_code' => 'second_custom_attribute']), + DataFixture(AttributeFixture::class, ['attribute_code' => 'third_custom_attribute']), + DataFixture(ProductFixture::class, ['sku' => 'simple','media_gallery_entries' => [[], []]], as: 'product') + ] + + public function testUpdateCustomerAttributesAutoIncrement() + { + $resource = $this->objectManager->get(\Magento\Framework\App\ResourceConnection::class); + $connection = $resource->getConnection(); + $currentTableStatus = $connection->showTableStatus('catalog_product_entity_varchar'); + $this->storeManager->setCurrentStore('admin'); + $product = $this->productRepository->get('simple'); + $product->setCustomAttribute( + 'first_custom_attribute', + 'first attribute' + ); + $firstAttributeSavedProduct = $this->productRepository->save($product); + $currentTableStatusAfterFirstAttrSave = $connection->showTableStatus('catalog_product_entity_varchar'); + $this->assertSame( + ((int) ($currentTableStatus['Auto_increment']) + 1), + (int) $currentTableStatusAfterFirstAttrSave['Auto_increment'] + ); + + $firstAttributeSavedProduct->setCustomAttribute( + 'second_custom_attribute', + 'second attribute' + ); + $secondAttributeSavedProduct = $this->productRepository->save($firstAttributeSavedProduct); + $currentTableStatusAfterSecondAttrSave = $connection->showTableStatus('catalog_product_entity_varchar'); + $this->assertSame( + (((int) $currentTableStatusAfterFirstAttrSave['Auto_increment']) + 1), + (int) $currentTableStatusAfterSecondAttrSave['Auto_increment'] + ); + + $secondAttributeSavedProduct->setCustomAttribute( + 'third_custom_attribute', + 'third attribute' + ); + $this->productRepository->save($secondAttributeSavedProduct); + $currentTableStatusAfterThirdAttrSave = $connection->showTableStatus('catalog_product_entity_varchar'); + $this->assertSame( + (((int)$currentTableStatusAfterSecondAttrSave['Auto_increment']) + 1), + (int) $currentTableStatusAfterThirdAttrSave['Auto_increment'] + ); + } } From 898e7046f7ca3b84838a705ec443de8b893fc64c Mon Sep 17 00:00:00 2001 From: Sergio Vera <sergio.vera@gmail.com> Date: Fri, 3 Feb 2023 14:38:56 +0100 Subject: [PATCH 708/985] LYNX-14: Update tests to use new fixtures --- .../Catalog/Test/Fixture/AssignProducts.php | 63 +++++++++++ .../Customer/Test/Fixture/CustomerGroup.php | 100 ++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Fixture/AssignProducts.php create mode 100644 app/code/Magento/Customer/Test/Fixture/CustomerGroup.php diff --git a/app/code/Magento/Catalog/Test/Fixture/AssignProducts.php b/app/code/Magento/Catalog/Test/Fixture/AssignProducts.php new file mode 100644 index 0000000000000..7912e876e88dd --- /dev/null +++ b/app/code/Magento/Catalog/Test/Fixture/AssignProducts.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Test\Fixture; + +use Magento\Catalog\Api\CategoryLinkManagementInterface; +use Magento\Framework\Exception\InvalidArgumentException; +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\DataFixtureInterface; + +/** + * Assigning products to catalog + */ +class AssignProducts implements DataFixtureInterface +{ + private const PRODUCTS = 'products'; + private const CATEGORY = 'category'; + + /** + * @var CategoryLinkManagementInterface + */ + private categoryLinkManagementInterface $categoryLinkManagement; + + /** + * @param CategoryLinkManagementInterface $categoryLinkManagement + */ + public function __construct(CategoryLinkManagementInterface $categoryLinkManagement) + { + $this->categoryLinkManagement = $categoryLinkManagement; + } + + /** + * @inheritdoc + * @throws InvalidArgumentException + */ + public function apply(array $data = []): ?DataObject + { + if (empty($data[self::CATEGORY])) { + throw new InvalidArgumentException(__('"%field" is required', ['field' => self::CATEGORY])); + } + + if (empty($data[self::PRODUCTS])) { + throw new InvalidArgumentException(__('"%field" is required', ['field' => self::PRODUCTS])); + } + + if (!is_array($data[self::PRODUCTS])) { + throw new InvalidArgumentException(__('"%field" must be an array', ['field' => self::PRODUCTS])); + } + + foreach ($data[self::PRODUCTS] as $product) { + $this->categoryLinkManagement->assignProductToCategories( + $product->getSku(), + [$data[self::CATEGORY]->getId()] + ); + } + + return null; + } +} diff --git a/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php b/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php new file mode 100644 index 0000000000000..a9a96e42a5d2a --- /dev/null +++ b/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php @@ -0,0 +1,100 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Customer\Test\Fixture; + +use Magento\Customer\Api\Data\GroupInterface; +use Magento\Customer\Api\GroupRepositoryInterface; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\DataObject; +use Magento\Framework\EntityManager\Hydrator; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Tax\Api\TaxClassRepositoryInterface; +use Magento\TestFramework\Fixture\Api\ServiceFactory; +use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; + +/** + * Data fixture for customer group + */ +class CustomerGroup implements RevertibleDataFixtureInterface +{ + private const DEFAULT_DATA = [ + GroupInterface::CODE => 'Customergroup%uniqid%', + GroupInterface::TAX_CLASS_ID => 3, + ]; + + /** + * @var ServiceFactory + */ + private ServiceFactory $serviceFactory; + + /** + * @var TaxClassRepositoryInterface + */ + private TaxClassRepositoryInterface $taxClassRepository; + + /** @var Hydrator */ + private Hydrator $hydrator; + + /** + * @param ServiceFactory $serviceFactory + * @param TaxClassRepositoryInterface $taxClassRepository + * @param SearchCriteriaBuilder $searchCriteriaBuilder + * @param Hydrator $hydrator + */ + public function __construct( + ServiceFactory $serviceFactory, + TaxClassRepositoryInterface $taxClassRepository, + Hydrator $hydrator + ) { + $this->serviceFactory = $serviceFactory; + $this->taxClassRepository = $taxClassRepository; + $this->hydrator = $hydrator; + } + + /** + * {@inheritdoc} + * @param array $data Parameters. Same format as Customer::DEFAULT_DATA. + * @return DataObject|null + * @throws LocalizedException + * @throws NoSuchEntityException + */ + public function apply(array $data = []): ?DataObject + { + $customerGroupSaveService = $this->serviceFactory->create( + GroupRepositoryInterface::class, + 'save' + ); + $data = self::DEFAULT_DATA; + if (!empty($data['tax_class_id'])) { + $data[GroupInterface::TAX_CLASS_ID] = $this->taxClassRepository->get($data['tax_class_id'])->getClassId(); + } + + $customerGroup = $customerGroupSaveService->execute( + [ + 'group' => $data, + ] + ); + + return new DataObject($this->hydrator->extract($customerGroup)); + } + + /** + * @inheritdoc + */ + public function revert(DataObject $data): void + { + $service = $this->serviceFactory->create(GroupRepositoryInterface::class, 'deleteById'); + $service->execute( + [ + 'id' => $data->getId() + ] + ); + } +} From dd5ba2d0645e3d3fef5dd254c3b95149a48d0ccb Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Fri, 3 Feb 2023 19:47:29 +0530 Subject: [PATCH 709/985] AC-7821:Extract ES8 module to a separate repository --- .../System/Config/TestConnection.php | 33 - app/code/Magento/Elasticsearch8/LICENSE.txt | 48 -- .../Magento/Elasticsearch8/LICENSE_AFL.txt | 48 -- .../DynamicTemplates/IntegerMapper.php | 31 - .../DynamicTemplates/MapperInterface.php | 22 - .../DynamicTemplates/PositionMapper.php | 33 - .../Adapter/DynamicTemplates/PriceMapper.php | 33 - .../Adapter/DynamicTemplates/StringMapper.php | 34 - .../Adapter/DynamicTemplatesProvider.php | 51 -- .../Model/Adapter/Elasticsearch.php | 49 -- .../FieldName/Resolver/DefaultResolver.php | 48 -- .../Model/Client/Elasticsearch.php | 406 ----------- app/code/Magento/Elasticsearch8/README.md | 32 - .../Elasticsearch8/SearchAdapter/Adapter.php | 125 ---- .../Elasticsearch8/SearchAdapter/Mapper.php | 45 -- ...rchUsingElasticSearch8ByProductSkuTest.xml | 63 -- .../Resolver/DefaultResolverTest.php | 128 ---- .../Unit/Model/Client/ElasticsearchTest.php | 680 ------------------ app/code/Magento/Elasticsearch8/composer.json | 28 - .../Elasticsearch8/etc/adminhtml/system.xml | 93 --- .../Magento/Elasticsearch8/etc/config.xml | 21 - app/code/Magento/Elasticsearch8/etc/di.xml | 281 -------- .../Magento/Elasticsearch8/etc/module.xml | 15 - .../Elasticsearch8/etc/search_engine.xml | 12 - .../Magento/Elasticsearch8/registration.php | 12 - composer.json | 2 +- 26 files changed, 1 insertion(+), 2372 deletions(-) delete mode 100644 app/code/Magento/Elasticsearch8/Block/Adminhtml/System/Config/TestConnection.php delete mode 100644 app/code/Magento/Elasticsearch8/LICENSE.txt delete mode 100644 app/code/Magento/Elasticsearch8/LICENSE_AFL.txt delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/IntegerMapper.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/MapperInterface.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PositionMapper.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PriceMapper.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/StringMapper.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplatesProvider.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/Elasticsearch.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php delete mode 100644 app/code/Magento/Elasticsearch8/Model/Client/Elasticsearch.php delete mode 100644 app/code/Magento/Elasticsearch8/README.md delete mode 100644 app/code/Magento/Elasticsearch8/SearchAdapter/Adapter.php delete mode 100644 app/code/Magento/Elasticsearch8/SearchAdapter/Mapper.php delete mode 100644 app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml delete mode 100644 app/code/Magento/Elasticsearch8/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolverTest.php delete mode 100644 app/code/Magento/Elasticsearch8/Test/Unit/Model/Client/ElasticsearchTest.php delete mode 100644 app/code/Magento/Elasticsearch8/composer.json delete mode 100644 app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml delete mode 100644 app/code/Magento/Elasticsearch8/etc/config.xml delete mode 100644 app/code/Magento/Elasticsearch8/etc/di.xml delete mode 100644 app/code/Magento/Elasticsearch8/etc/module.xml delete mode 100644 app/code/Magento/Elasticsearch8/etc/search_engine.xml delete mode 100644 app/code/Magento/Elasticsearch8/registration.php diff --git a/app/code/Magento/Elasticsearch8/Block/Adminhtml/System/Config/TestConnection.php b/app/code/Magento/Elasticsearch8/Block/Adminhtml/System/Config/TestConnection.php deleted file mode 100644 index 8168819d79a3b..0000000000000 --- a/app/code/Magento/Elasticsearch8/Block/Adminhtml/System/Config/TestConnection.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Block\Adminhtml\System\Config; - -/** - * Elasticsearch 8.x test connection block - */ -class TestConnection extends \Magento\AdvancedSearch\Block\Adminhtml\System\Config\TestConnection -{ - /** - * @inheritdoc - */ - public function _getFieldMapping(): array - { - $fields = [ - 'engine' => 'catalog_search_engine', - 'hostname' => 'catalog_search_elasticsearch8_server_hostname', - 'port' => 'catalog_search_elasticsearch8_server_port', - 'index' => 'catalog_search_elasticsearch8_index_prefix', - 'enableAuth' => 'catalog_search_elasticsearch8_enable_auth', - 'username' => 'catalog_search_elasticsearch8_username', - 'password' => 'catalog_search_elasticsearch8_password', - 'timeout' => 'catalog_search_elasticsearch8_server_timeout', - ]; - - return array_merge(parent::_getFieldMapping(), $fields); - } -} diff --git a/app/code/Magento/Elasticsearch8/LICENSE.txt b/app/code/Magento/Elasticsearch8/LICENSE.txt deleted file mode 100644 index 49525fd99da9c..0000000000000 --- a/app/code/Magento/Elasticsearch8/LICENSE.txt +++ /dev/null @@ -1,48 +0,0 @@ - -Open Software License ("OSL") v. 3.0 - -This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: - -Licensed under the Open Software License version 3.0 - - 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: - - 1. to reproduce the Original Work in copies, either alone or as part of a collective work; - - 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; - - 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; - - 4. to perform the Original Work publicly; and - - 5. to display the Original Work publicly. - - 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - - 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - - 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. - - 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). - - 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. - - 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. - - 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. - - 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). - - 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. - - 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. - - 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. - - 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. - - 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. - - 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/code/Magento/Elasticsearch8/LICENSE_AFL.txt b/app/code/Magento/Elasticsearch8/LICENSE_AFL.txt deleted file mode 100644 index f39d641b18a19..0000000000000 --- a/app/code/Magento/Elasticsearch8/LICENSE_AFL.txt +++ /dev/null @@ -1,48 +0,0 @@ - -Academic Free License ("AFL") v. 3.0 - -This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: - -Licensed under the Academic Free License version 3.0 - - 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: - - 1. to reproduce the Original Work in copies, either alone or as part of a collective work; - - 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; - - 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; - - 4. to perform the Original Work publicly; and - - 5. to display the Original Work publicly. - - 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - - 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - - 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. - - 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). - - 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. - - 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. - - 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. - - 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). - - 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. - - 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. - - 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. - - 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. - - 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. - - 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/IntegerMapper.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/IntegerMapper.php deleted file mode 100644 index 96b45ca2f75e7..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/IntegerMapper.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\DynamicTemplates; - -/** - * @inheridoc - */ -class IntegerMapper implements MapperInterface -{ - /** - * @inheritdoc - */ - public function processTemplates(array $templates): array - { - $templates[] = [ - 'integer_mapping' => [ - 'match_mapping_type' => 'long', - 'mapping' => [ - 'type' => 'integer', - ], - ], - ]; - - return $templates; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/MapperInterface.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/MapperInterface.php deleted file mode 100644 index f4a40ae475b92..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/MapperInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\DynamicTemplates; - -/** - * Elasticsearch dynamic templates mapper. - */ -interface MapperInterface -{ - /** - * Add/remove/edit dynamic template mapping. - * - * @param array $templates - * @return array - */ - public function processTemplates(array $templates): array; -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PositionMapper.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PositionMapper.php deleted file mode 100644 index d4ec8702ef81f..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PositionMapper.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\DynamicTemplates; - -/** - * @inheridoc - */ -class PositionMapper implements MapperInterface -{ - /** - * @inheritdoc - */ - public function processTemplates(array $templates): array - { - $templates[] = [ - 'position_mapping' => [ - 'match' => 'position_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'integer', - 'index' => true, - ], - ], - ]; - - return $templates; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PriceMapper.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PriceMapper.php deleted file mode 100644 index c67c92deedffa..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/PriceMapper.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\DynamicTemplates; - -/** - * @inheridoc - */ -class PriceMapper implements MapperInterface -{ - /** - * @inheritdoc - */ - public function processTemplates(array $templates): array - { - $templates[] = [ - 'price_mapping' => [ - 'match' => 'price_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'double', - 'store' => true, - ], - ], - ]; - - return $templates; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/StringMapper.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/StringMapper.php deleted file mode 100644 index 4a08d1760d66a..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplates/StringMapper.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\DynamicTemplates; - -/** - * @inheridoc - */ -class StringMapper implements MapperInterface -{ - /** - * @inheritdoc - */ - public function processTemplates(array $templates): array - { - $templates[] = [ - 'string_mapping' => [ - 'match' => '*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'text', - 'index' => true, - 'copy_to' => '_search', - ], - ], - ]; - - return $templates; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplatesProvider.php b/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplatesProvider.php deleted file mode 100644 index db016e2a101f9..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/DynamicTemplatesProvider.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter; - -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\MapperInterface; -use Magento\Framework\Exception\InvalidArgumentException; - -/** - * Elasticsearch dynamic templates provider. - */ -class DynamicTemplatesProvider -{ - /** - * @var array - */ - private array $mappers; - - /** - * @param MapperInterface[] $mappers - */ - public function __construct(array $mappers) - { - $this->mappers = $mappers; - } - - /** - * Get elasticsearch dynamic templates. - * - * @return array - * @throws InvalidArgumentException - */ - public function getTemplates(): array - { - $templates = []; - foreach ($this->mappers as $mapper) { - if (!$mapper instanceof MapperInterface) { - throw new InvalidArgumentException( - __('Mapper %1 should implement %2', get_class($mapper), MapperInterface::class) - ); - } - $templates = $mapper->processTemplates($templates); - } - - return $templates; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/Elasticsearch.php b/app/code/Magento/Elasticsearch8/Model/Adapter/Elasticsearch.php deleted file mode 100644 index 6d3ca2add8678..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/Elasticsearch.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter; - -/** - * Elasticsearch adapter - */ -class Elasticsearch extends \Magento\Elasticsearch\Model\Adapter\Elasticsearch -{ - /** - * Reformat documents array to bulk format - * - * @param array $documents - * @param string $indexName - * @param string $action - * @return array - */ - public function getDocsArrayInBulkIndexFormat( - $documents, - $indexName, - $action = self::BULK_ACTION_INDEX - ): array { - $bulkArray = [ - 'index' => $indexName, - 'body' => [], - 'refresh' => true, - ]; - - foreach ($documents as $id => $document) { - $bulkArray['body'][] = [ - $action => [ - '_id' => $id, - '_index' => $indexName - ] - ]; - - if ($action == self::BULK_ACTION_INDEX) { - $bulkArray['body'][] = $document; - } - } - - return $bulkArray; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php b/app/code/Magento/Elasticsearch8/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php deleted file mode 100644 index faa81cc2ab298..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver; - -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\AttributeAdapter; -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\ResolverInterface; - -/** - * Default name resolver for Elasticsearch 8 - */ -class DefaultResolver implements ResolverInterface -{ - /** - * @var ResolverInterface - */ - private ResolverInterface $baseResolver; - - /** - * DefaultResolver constructor. - * @param ResolverInterface $baseResolver - */ - public function __construct(ResolverInterface $baseResolver) - { - $this->baseResolver = $baseResolver; - } - - /** - * Get field name. - * - * @param AttributeAdapter $attribute - * @param array $context - * @return string|null - */ - public function getFieldName(AttributeAdapter $attribute, $context = []): ?string - { - $fieldName = $this->baseResolver->getFieldName($attribute, $context); - if ($fieldName === '_all') { - $fieldName = '_search'; - } - - return $fieldName; - } -} diff --git a/app/code/Magento/Elasticsearch8/Model/Client/Elasticsearch.php b/app/code/Magento/Elasticsearch8/Model/Client/Elasticsearch.php deleted file mode 100644 index d43551d5c81f2..0000000000000 --- a/app/code/Magento/Elasticsearch8/Model/Client/Elasticsearch.php +++ /dev/null @@ -1,406 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Model\Client; - -use Elastic\Elasticsearch\Client; -use Elastic\Elasticsearch\ClientBuilder; -use Magento\AdvancedSearch\Model\Client\ClientInterface; -use Magento\Elasticsearch\Model\Adapter\FieldsMappingPreprocessorInterface; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplatesProvider; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Exception\LocalizedException; - -/** - * Elasticsearch client - */ -class Elasticsearch implements ClientInterface -{ - /** - * @var array - */ - private array $clientOptions; - - /** - * Elasticsearch Client instances - * - * @var Client[] - */ - private array $client; - - /** - * @var bool - */ - private bool $pingResult = false; - - /** - * @var FieldsMappingPreprocessorInterface[] - */ - private array $fieldsMappingPreprocessors; - - /** - * @var DynamicTemplatesProvider|null - */ - private $dynamicTemplatesProvider; - - /** - * Initialize Elasticsearch 8 Client - * - * @param array $options - * @param Client|null $elasticsearchClient - * @param array $fieldsMappingPreprocessors - * @param DynamicTemplatesProvider|null $dynamicTemplatesProvider - * @throws LocalizedException - */ - public function __construct( - array $options = [], - $elasticsearchClient = null, - array $fieldsMappingPreprocessors = [], - ?DynamicTemplatesProvider $dynamicTemplatesProvider = null - ) { - if (empty($options['hostname']) - || ((!empty($options['enableAuth']) && ($options['enableAuth'] == 1)) - && (empty($options['username']) || empty($options['password']))) - ) { - throw new LocalizedException( - __('The search failed because of a search engine misconfiguration.') - ); - } - // phpstan:ignore - if ($elasticsearchClient instanceof Client) { - $this->client[getmypid()] = $elasticsearchClient; - } - $this->clientOptions = $options; - $this->fieldsMappingPreprocessors = $fieldsMappingPreprocessors; - $this->dynamicTemplatesProvider = $dynamicTemplatesProvider ?: ObjectManager::getInstance() - ->get(DynamicTemplatesProvider::class); - } - - /** - * Get Elasticsearch 8 Client - * - * @return Client|null - */ - private function getElasticsearchClient(): ?Client /** @phpstan-ignore-line */ - { - // Intentionally added condition as there are BC changes from ES7 to ES8 - // and by default ES7 is configured. - if (!class_exists(\Elastic\Elasticsearch\Client::class)) { - return null; - } - - $pid = getmypid(); - if (!isset($this->client[$pid])) { - $config = $this->buildESConfig($this->clientOptions); - $this->client[$pid] = ClientBuilder::fromConfig($config, true); /** @phpstan-ignore-line */ - } - - return $this->client[$pid]; - } - - /** - * Ping the Elasticsearch 8 client - * - * @return bool - */ - public function ping(): bool - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($this->pingResult === false && $elasticsearchClient) { - $this->pingResult = $elasticsearchClient->ping( - ['client' => ['timeout' => $this->clientOptions['timeout']]] - )->asBool(); - } - - return $this->pingResult; - } - - /** - * Validate connection params for Elasticsearch 8 - * - * @return bool - */ - public function testConnection(): bool - { - return $this->ping(); - } - - /** - * Add/update an Elasticsearch index settings. - * - * @param string $index - * @param array $settings - * @return void - */ - public function putIndexSettings(string $index, array $settings): void - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $elasticsearchClient->indices() - ->putSettings(['index' => $index, 'body' => $settings]); - } - } - - /** - * Updates alias. - * - * @param string $alias - * @param string $newIndex - * @param string $oldIndex - * @return void - */ - public function updateAlias(string $alias, string $newIndex, string $oldIndex = '') - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient === null) { - return; - } - - $params = ['body' => ['actions' => []]]; - if ($newIndex) { - $params['body']['actions'][] = ['add' => ['alias' => $alias, 'index' => $newIndex]]; - } - - if ($oldIndex) { - $params['body']['actions'][] = ['remove' => ['alias' => $alias, 'index' => $oldIndex]]; - } - - $elasticsearchClient->indices()->updateAliases($params); - } - - /** - * Checks whether Elasticsearch 8 index exists - * - * @param string $index - * @return bool - */ - public function indexExists(string $index): bool - { - $indexExists = false; - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $indexExists = $elasticsearchClient->indices() - ->exists(['index' => $index]) - ->asBool(); - } - - return $indexExists; - } - - /** - * Build config for Elasticsearch 8 - * - * @param array $options - * @return array - */ - private function buildESConfig(array $options = []): array - { - $hostname = preg_replace('/http[s]?:\/\//i', '', $options['hostname']); - // @codingStandardsIgnoreStart - $protocol = parse_url($options['hostname'], PHP_URL_SCHEME); - // @codingStandardsIgnoreEnd - if (!$protocol) { - $protocol = 'http'; - } - - $authString = ''; - if (!empty($options['enableAuth']) && (int)$options['enableAuth'] === 1) { - $authString = "{$options['username']}:{$options['password']}@"; - } - - $portString = ''; - if (!empty($options['port'])) { - $portString = ':' . $options['port']; - } - - $host = $protocol . '://' . $authString . $hostname . $portString; - - $options['hosts'] = [$host]; - - return $options; - } - - /** - * Exists alias. - * - * @param string $alias - * @param string $index - * @return bool - */ - public function existsAlias(string $alias, string $index = ''): bool - { - $existAlias = false; - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $params = ['name' => $alias]; - if ($index) { - $params['index'] = $index; - } - - $existAlias = $elasticsearchClient->indices()->existsAlias($params)->asBool(); - } - - return $existAlias; - } - - /** - * Performs bulk query over Elasticsearch 8 index - * - * @param array $query - * @return void - */ - public function bulkQuery(array $query) - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $elasticsearchClient->bulk($query); - } - } - - /** - * Creates an Elasticsearch 8 index. - * - * @param string $index - * @param array $settings - * @return void - */ - public function createIndex(string $index, array $settings): void - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $elasticsearchClient->indices() - ->create([ - 'index' => $index, - 'body' => $settings, - ]); - } - } - - /** - * Get alias. - * - * @param string $alias - * @return array - */ - public function getAlias(string $alias): array - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient === null) { - return []; - } - - return $elasticsearchClient->indices() - ->getAlias(['name' => $alias]) - ->asArray(); - } - - /** - * Add mapping to Elasticsearch 8 index - * - * @param array $fields - * @param string $index - * @param string $entityType - * @return void - * @SuppressWarnings("unused") - */ - public function addFieldsMapping(array $fields, string $index, string $entityType) - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient === null) { - return; - } - - $params = [ - 'index' => $index, - 'body' => [ - 'properties' => [], - 'dynamic_templates' => $this->dynamicTemplatesProvider->getTemplates(), - ], - ]; - - foreach ($this->applyFieldsMappingPreprocessors($fields) as $field => $fieldInfo) { - $params['body']['properties'][$field] = $fieldInfo; - } - - $elasticsearchClient->indices()->putMapping($params); - } - - /** - * Delete an Elasticsearch 8 index. - * - * @param string $index - * @return void - */ - public function deleteIndex(string $index) - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient) { - $elasticsearchClient->indices() - ->delete(['index' => $index]); - } - } - - /** - * Check if index is empty. - * - * @param string $index - * @return bool - */ - public function isEmptyIndex(string $index): bool - { - $elasticsearchClient = $this->getElasticsearchClient(); - if ($elasticsearchClient === null) { - return false; - } - - $stats = $this->getElasticsearchClient()->indices()->stats(['index' => $index, 'metric' => 'docs']); - if ($stats['indices'][$index]['primaries']['docs']['count'] === 0) { - return true; - } - - return false; - } - - /** - * Execute search by $query - * - * @param array $query - */ - public function query(array $query): array - { - $elasticsearchClient = $this->getElasticsearchClient(); - - return $elasticsearchClient === null ? [] : $elasticsearchClient->search($query)->asArray(); - } - - /** - * Get mapping from Elasticsearch index. - * - * @param array $params - * @return array - */ - public function getMapping(array $params): array - { - $elasticsearchClient = $this->getElasticsearchClient(); - - return $elasticsearchClient === null ? [] : $elasticsearchClient->indices()->getMapping($params)->asArray(); - } - - /** - * Apply fields mapping preprocessors - * - * @param array $properties - * @return array - */ - private function applyFieldsMappingPreprocessors(array $properties): array - { - foreach ($this->fieldsMappingPreprocessors as $preprocessor) { - $properties = $preprocessor->process($properties); - } - return $properties; - } -} diff --git a/app/code/Magento/Elasticsearch8/README.md b/app/code/Magento/Elasticsearch8/README.md deleted file mode 100644 index 406e1546a053b..0000000000000 --- a/app/code/Magento/Elasticsearch8/README.md +++ /dev/null @@ -1,32 +0,0 @@ -#Magento_Elasticsearch8 module - -Magento_Elasticsearch8 module allows using ElasticSearch engine 8.x version for the product searching capabilities. - -The module implements Magento_Search library interfaces. - -## Installation details - -The Magento_Elasticsearch8 module is one of the base Magento 2 modules. Disabling or uninstalling this module is not recommended. - -For information about a module installation in Magento 2, see [Enable or disable modules](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/manage-modules.html). - -## Structure - -`SearchAdapter/` - the directory that contains solutions for adapting ElasticSearch query searching. - -For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). - -## Additional information - -By default`indices.id_field_data` is disallowed in Elasticsearch8 hence it needs to enabled it from `elasticsearch.yml` -by adding the following configuration -`indices: -id_field_data: -enabled: true` - -More information about ElasticSearch are at articles: - -- [Configuring Catalog Search](https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/search/search-configuration.html). -- [Installation Guide/Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/search-engine/overview.html). -- [Configure and maintain Elasticsearch](https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/search/overview-search.html). -- Magento Commerce Cloud - [set up Elasticsearch service](https://devdocs.magento.com/cloud/project/services-elastic.html). diff --git a/app/code/Magento/Elasticsearch8/SearchAdapter/Adapter.php b/app/code/Magento/Elasticsearch8/SearchAdapter/Adapter.php deleted file mode 100644 index 2d159c764bf69..0000000000000 --- a/app/code/Magento/Elasticsearch8/SearchAdapter/Adapter.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\SearchAdapter; - -use Magento\Elasticsearch\SearchAdapter\Aggregation\Builder as AggregationBuilder; -use Magento\Elasticsearch\SearchAdapter\ConnectionManager; -use Magento\Elasticsearch\SearchAdapter\QueryContainerFactory; -use Magento\Elasticsearch\SearchAdapter\ResponseFactory; -use Magento\Framework\Search\AdapterInterface; -use Magento\Framework\Search\RequestInterface; -use Magento\Framework\Search\Response\QueryResponse; -use Psr\Log\LoggerInterface; - -/** - * Elasticsearch Search Adapter - */ -class Adapter implements AdapterInterface -{ - /** - * Mapper instance - * - * @var Mapper - */ - private Mapper $mapper; - - /** - * @var ResponseFactory - */ - private ResponseFactory $responseFactory; - - /** - * @var ConnectionManager - */ - private ConnectionManager $connectionManager; - - /** - * @var AggregationBuilder - */ - private AggregationBuilder $aggregationBuilder; - - /** - * @var QueryContainerFactory - */ - private QueryContainerFactory $queryContainerFactory; - - /** - * Empty response from Elasticsearch - * - * @var array - */ - private static array $emptyRawResponse = [ - "hits" => [ - "hits" => [] - ], - "aggregations" => [ - "price_bucket" => [], - "category_bucket" => ["buckets" => []], - ] - ]; - - /** - * @var LoggerInterface - */ - private LoggerInterface $logger; - - /** - * @param ConnectionManager $connectionManager - * @param Mapper $mapper - * @param ResponseFactory $responseFactory - * @param AggregationBuilder $aggregationBuilder - * @param QueryContainerFactory $queryContainerFactory - * @param LoggerInterface $logger - */ - public function __construct( - ConnectionManager $connectionManager, - Mapper $mapper, - ResponseFactory $responseFactory, - AggregationBuilder $aggregationBuilder, - QueryContainerFactory $queryContainerFactory, - LoggerInterface $logger - ) { - $this->connectionManager = $connectionManager; - $this->mapper = $mapper; - $this->responseFactory = $responseFactory; - $this->aggregationBuilder = $aggregationBuilder; - $this->queryContainerFactory = $queryContainerFactory; - $this->logger = $logger; - } - - /** - * Search query - * - * @param RequestInterface $request - * @return QueryResponse - */ - public function query(RequestInterface $request) : QueryResponse - { - $client = $this->connectionManager->getConnection(); - $query = $this->mapper->buildQuery($request); - $aggregationBuilder = $this->aggregationBuilder; - $aggregationBuilder->setQuery($this->queryContainerFactory->create(['query' => $query])); - - try { - $rawResponse = $client->query($query); - } catch (\Exception $e) { - $this->logger->critical($e); - // return empty search result in case an exception is thrown from Elasticsearch - $rawResponse = self::$emptyRawResponse; - } - - $rawDocuments = $rawResponse['hits']['hits'] ?? []; - return $this->responseFactory->create( - [ - 'documents' => $rawDocuments, - 'aggregations' => $aggregationBuilder->build($request, $rawResponse), - 'total' => $rawResponse['hits']['total']['value'] ?? 0 - ] - ); - } -} diff --git a/app/code/Magento/Elasticsearch8/SearchAdapter/Mapper.php b/app/code/Magento/Elasticsearch8/SearchAdapter/Mapper.php deleted file mode 100644 index 8c320ed152dba..0000000000000 --- a/app/code/Magento/Elasticsearch8/SearchAdapter/Mapper.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Elasticsearch8\SearchAdapter; - -use Magento\Framework\Search\RequestInterface; -use Magento\Elasticsearch\Elasticsearch5\SearchAdapter\Mapper as Elasticsearch5Mapper; - -/** - * Elasticsearch8 mapper class - */ -class Mapper -{ - /** - * @var Elasticsearch5Mapper - */ - private Elasticsearch5Mapper $mapper; - - /** - * Mapper constructor. - * @param Elasticsearch5Mapper $mapper - */ - public function __construct(Elasticsearch5Mapper $mapper) - { - $this->mapper = $mapper; - } - - /** - * Build adapter dependent query - * - * @param RequestInterface $request - * @return array - */ - public function buildQuery(RequestInterface $request) : array - { - $searchQuery = $this->mapper->buildQuery($request); - $searchQuery['track_total_hits'] = true; - return $searchQuery; - } -} diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml deleted file mode 100644 index cf733bd22f8e4..0000000000000 --- a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest"> - <annotations> - <features value="Elasticsearch8"/> - <stories value="Storefront Search"/> - <title value="Check that AND query is performed when searching using ElasticSearch 8"/> - <description value="Check that AND query is performed when searching using ElasticSearch 8"/> - <severity value="CRITICAL"/> - <testCaseId value="AC-6597"/> - <useCaseId value="AC-6665"/> - <group value="SearchEngine"/> - <group value="pr_exclude"/> - </annotations> - <before> - <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="setSearchEngine"/> - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProducts"/> - <createData entity="VirtualProduct" stepKey="createVirtualProduct"/> - <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="createFirtsSimpleProduct"/> - <createData entity="SimpleProductWithCustomSku24MB06" stepKey="createSecondSimpleProduct"/> - <createData entity="SimpleProductWithCustomSku24MB04" stepKey="createThirdSimpleProduct"/> - <createData entity="SimpleProductWithCustomSku24MB02" stepKey="createFourthSimpleProduct"/> - <createData entity="SimpleProductWithCustomSku24MB01" stepKey="createFifthSimpleProduct"/> - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> - <argument name="tags" value="config full_page"/> - </actionGroup> - <magentoCron groups="index" stepKey="reindex"/> - </before> - <after> - <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="deleteProductOne"/> - <actionGroup ref="DeleteAllProductsUsingProductGridActionGroup" stepKey="deleteAllProductsAfterTest"/> - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> - </after> - <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/> - <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductSku"> - <argument name="phrase" value="24 MB04"/> - </actionGroup> - - <see userInput="4" selector="{{StorefrontCatalogSearchMainSection.productCount}}" stepKey="assertSearchResultCount"/> - - <actionGroup ref="StorefrontQuickSearchSeeProductByNameActionGroup" stepKey="assertSecondProductName"> - <argument name="productName" value="$createSecondSimpleProduct.name$"/> - </actionGroup> - <actionGroup ref="StorefrontQuickSearchSeeProductByNameActionGroup" stepKey="assertThirdProductName"> - <argument name="productName" value="$createThirdSimpleProduct.name$"/> - </actionGroup> - <actionGroup ref="StorefrontQuickSearchSeeProductByNameActionGroup" stepKey="assertFourthProductName"> - <argument name="productName" value="$createFourthSimpleProduct.name$"/> - </actionGroup> - <actionGroup ref="StorefrontQuickSearchSeeProductByNameActionGroup" stepKey="assertFifthProductName"> - <argument name="productName" value="$createFifthSimpleProduct.name$"/> - </actionGroup> - </test> -</tests> diff --git a/app/code/Magento/Elasticsearch8/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolverTest.php b/app/code/Magento/Elasticsearch8/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolverTest.php deleted file mode 100644 index 1598c83c735d5..0000000000000 --- a/app/code/Magento/Elasticsearch8/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolverTest.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Test\Unit\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver; - -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\AttributeAdapter; -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver - as BaseDefaultResolver; -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ConverterInterface - as FieldTypeConverterInterface; -use Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ResolverInterface - as FieldTypeResolver; -use Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; -use PHPUnit\Framework\TestCase; - -/** - * @SuppressWarnings(PHPMD) - */ -class DefaultResolverTest extends TestCase -{ - /** - * @var DefaultResolver - */ - private $resolver; - - /** - * @var FieldTypeResolver - */ - private $fieldTypeResolver; - - /** - * @var FieldTypeConverterInterface - */ - private $fieldTypeConverter; - - /** - * Set up test environment - * - * @return void - */ - protected function setUp(): void - { - $objectManager = new ObjectManagerHelper($this); - $this->fieldTypeConverter = $this->getMockBuilder(FieldTypeConverterInterface::class) - ->disableOriginalConstructor() - ->setMethods(['convert']) - ->getMockForAbstractClass(); - $this->fieldTypeResolver = $this->getMockBuilder(FieldTypeResolver::class) - ->disableOriginalConstructor() - ->setMethods(['getFieldType']) - ->getMockForAbstractClass(); - - $baseResolver = $objectManager->getObject( - BaseDefaultResolver::class, - [ - 'fieldTypeResolver' => $this->fieldTypeResolver, - 'fieldTypeConverter' => $this->fieldTypeConverter - ] - ); - - $this->resolver = $objectManager->getObject(DefaultResolver::class, ['baseResolver' => $baseResolver]); - } - - /** - * @dataProvider getFieldNameProvider - * @param $fieldType - * @param $attributeCode - * @param $frontendInput - * @param $isSortable - * @param $context - * @param $expected - * @return void - */ - public function testGetFieldName( - $fieldType, - $attributeCode, - $frontendInput, - $isSortable, - $context, - $expected - ) { - $attributeMock = $this->getMockBuilder(AttributeAdapter::class) - ->disableOriginalConstructor() - ->setMethods(['getAttributeCode', 'getFrontendInput', 'isSortable']) - ->getMock(); - $this->fieldTypeConverter->expects($this->any()) - ->method('convert') - ->willReturn('string'); - $attributeMock->expects($this->any()) - ->method('getFrontendInput') - ->willReturn($frontendInput); - $attributeMock->expects($this->any()) - ->method('getAttributeCode') - ->willReturn($attributeCode); - $attributeMock->expects($this->any()) - ->method('isSortable') - ->willReturn($isSortable); - $this->fieldTypeResolver->expects($this->any()) - ->method('getFieldType') - ->willReturn($fieldType); - - $this->assertEquals( - $expected, - $this->resolver->getFieldName($attributeMock, $context) - ); - } - - /** - * @return array - */ - public function getFieldNameProvider(): array - { - return [ - ['', 'code', '', false, [], 'code'], - ['', 'code', '', false, ['type' => 'default'], 'code'], - ['string', '*', '', false, ['type' => 'default'], '_search'], - ['', 'code', '', false, ['type' => 'default'], 'code'], - ['', 'code', 'select', false, ['type' => 'default'], 'code'], - ['', 'code', '', true, ['type' => 'sort'], 'sort_code'], - ['', 'code', 'boolean', false, ['type' => 'default'], 'code'], - ]; - } -} diff --git a/app/code/Magento/Elasticsearch8/Test/Unit/Model/Client/ElasticsearchTest.php b/app/code/Magento/Elasticsearch8/Test/Unit/Model/Client/ElasticsearchTest.php deleted file mode 100644 index f27235d30229b..0000000000000 --- a/app/code/Magento/Elasticsearch8/Test/Unit/Model/Client/ElasticsearchTest.php +++ /dev/null @@ -1,680 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Elasticsearch8\Test\Unit\Model\Client; - -use DG\BypassFinals; -use Elastic\Elasticsearch\Client; -use Elastic\Elasticsearch\Endpoints\Indices; -use Elastic\Elasticsearch\Response\Elasticsearch as ElasticsearchResponse; -use Magento\Elasticsearch\Model\Adapter\FieldMapper\AddDefaultSearchField; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\IntegerMapper; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\PositionMapper; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\PriceMapper; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\StringMapper; -use Magento\Elasticsearch8\Model\Adapter\DynamicTemplatesProvider; -use Magento\Elasticsearch8\Model\Client\Elasticsearch; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; - -/** - * Class ElasticsearchTest to test Elasticsearch 8 - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class ElasticsearchTest extends TestCase -{ - /** - * @var Elasticsearch - */ - private $model; - - /** - * @var Client|MockObject - */ - private $elasticsearchClientMock; - - /** - * @var Indices|MockObject - */ - private $indicesMock; - - /** - * @var ObjectManagerHelper - */ - private $objectManager; - - /** @var ElasticsearchResponse|MockObject */ - private $elasticsearchResponse; - - /** - * Setup - * - * @return void - */ - protected function setUp(): void - { - BypassFinals::enable(); - $this->elasticsearchClientMock = $this->getMockBuilder(Client::class) /** @phpstan-ignore-line */ - ->setMethods( - [ - 'indices', - 'ping', - 'bulk', - 'search', - 'scroll', - 'info', - ] - ) - ->disableOriginalConstructor() - ->getMock(); - $this->indicesMock = $this->getMockBuilder(Indices::class) /** @phpstan-ignore-line */ - ->setMethods( - [ - 'exists', - 'getSettings', - 'create', - 'delete', - 'putMapping', - 'deleteMapping', - 'getMapping', - 'stats', - 'updateAliases', - 'existsAlias', - 'getAlias', - ] - ) - ->disableOriginalConstructor() - ->getMock(); - $this->elasticsearchResponse = $this->getMockBuilder(ElasticsearchResponse::class) /** @phpstan-ignore-line */ - ->setMethods([ - 'asBool', - 'asArray', - ]) - ->getMock(); - $this->elasticsearchClientMock->expects($this->any()) - ->method('indices') - ->willReturn($this->indicesMock); - $this->elasticsearchClientMock->expects($this->any()) - ->method('ping') - ->willReturn($this->elasticsearchResponse); - - $this->objectManager = new ObjectManagerHelper($this); - $dynamicTemplatesProvider = new DynamicTemplatesProvider( - [ - new PriceMapper(), - new PositionMapper(), - new StringMapper(), - new IntegerMapper(), - ] - ); - $this->model = $this->objectManager->getObject( - Elasticsearch::class, - [ - 'options' => $this->getOptions(), - 'elasticsearchClient' => $this->elasticsearchClientMock, - 'fieldsMappingPreprocessors' => [new AddDefaultSearchField()], - 'dynamicTemplatesProvider' => $dynamicTemplatesProvider, - ] - ); - } - - /** - * Test configurations with exception - * - * @return void - */ - public function testConstructorOptionsException() - { - $this->expectException('Magento\Framework\Exception\LocalizedException'); - $result = $this->objectManager->getObject( - Elasticsearch::class, - [ - 'options' => [], - ] - ); - $this->assertNotNull($result); - } - - /** - * Test client creation from the list of options - */ - public function testConstructorWithOptions() - { - $result = $this->objectManager->getObject( - Elasticsearch::class, - [ - 'options' => $this->getOptions(), - ] - ); - $this->assertNotNull($result); - } - - /** - * Ensure that configuration returns correct url. - * - * @param array $options - * @param string $expectedResult - * @throws LocalizedException - * @throws \ReflectionException - * @dataProvider getOptionsDataProvider - */ - public function testBuildConfig(array $options, string $expectedResult): void - { - $buildConfig = new Elasticsearch($options); - $config = $this->getPrivateMethod(); - $result = $config->invoke($buildConfig, $options); - $this->assertEquals($expectedResult, $result['hosts'][0]); - } - - /** - * Return private method for elastic search class. - * - * @return \ReflectionMethod - */ - private function getPrivateMethod(): \ReflectionMethod - { - $reflector = new \ReflectionClass(Elasticsearch::class); - $method = $reflector->getMethod('buildESConfig'); - $method->setAccessible(true); - - return $method; - } - - /** - * Get options data provider. - */ - public function getOptionsDataProvider(): array - { - return [ - [ - 'without_protocol' => [ - 'hostname' => 'localhost', - 'port' => '9200', - 'timeout' => 15, - 'index' => 'magento2', - 'enableAuth' => 0, - ], - 'expected_result' => 'http://localhost:9200', - ], - [ - 'with_protocol' => [ - 'hostname' => 'https://localhost', - 'port' => '9200', - 'timeout' => 15, - 'index' => 'magento2', - 'enableAuth' => 0, - ], - 'expected_result' => 'https://localhost:9200', - ], - ]; - } - - /** - * Test ping functionality - */ - public function testPing() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $this->assertTrue($this->model->ping()); - } - - /** - * Get elasticsearch client options - * - * @return array - */ - protected function getOptions(): array - { - return [ - 'hostname' => 'localhost', - 'port' => '9200', - 'timeout' => 15, - 'index' => 'magento2', - 'enableAuth' => 1, - 'username' => 'user', - 'password' => 'passwd', - ]; - } - - /** - * Test validation of connection parameters - */ - public function testTestConnection() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $this->assertTrue($this->model->testConnection()); - } - - /** - * Test validation of connection parameters returns false - */ - public function testTestConnectionFalse() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(false); - $this->assertFalse($this->model->testConnection()); - } - - /** - * Test validation of connection parameters - */ - public function testTestConnectionPing() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $this->model = $this->objectManager->getObject( - Elasticsearch::class, - [ - 'options' => $this->getEmptyIndexOption(), - 'elasticsearchClient' => $this->elasticsearchClientMock, - ] - ); - - $this->model->ping(); - $this->assertTrue($this->model->testConnection()); - } - - /** - * @return array - */ - private function getEmptyIndexOption(): array - { - return [ - 'hostname' => 'localhost', - 'port' => '9200', - 'index' => '', - 'timeout' => 15, - 'enableAuth' => 1, - 'username' => 'user', - 'password' => 'passwd', - ]; - } - - /** - * Test bulkQuery() method - */ - public function testBulkQuery() - { - $this->elasticsearchClientMock->expects($this->once()) - ->method('bulk') - ->with([]); - $this->model->bulkQuery([]); - } - - /** - * Test createIndex() method, case when such index exists - */ - public function testCreateIndexExists() - { - $this->indicesMock->expects($this->once()) - ->method('create') - ->with( - [ - 'index' => 'indexName', - 'body' => [], - ] - ); - $this->model->createIndex('indexName', []); - } - - /** - * Test deleteIndex() method. - */ - public function testDeleteIndex() - { - $this->indicesMock->expects($this->once()) - ->method('delete') - ->with(['index' => 'indexName']); - $this->model->deleteIndex('indexName'); - } - - /** - * Test isEmptyIndex() method. - */ - public function testIsEmptyIndex() - { - $indexName = 'magento2_test_index'; - $stats['indices'][$indexName]['primaries']['docs']['count'] = 0; - - $this->indicesMock->expects($this->once()) - ->method('stats') - ->with(['index' => $indexName, 'metric' => 'docs']) - ->willReturn($stats); - $this->assertTrue($this->model->isEmptyIndex($indexName)); - } - - /** - * Test isEmptyIndex() method returns false. - */ - public function testIsEmptyIndexFalse() - { - $indexName = 'magento2_test_index'; - $stats['indices'][$indexName]['primaries']['docs']['count'] = 1; - - $this->indicesMock->expects($this->once()) - ->method('stats') - ->with(['index' => $indexName, 'metric' => 'docs']) - ->willReturn($stats); - $this->assertFalse($this->model->isEmptyIndex($indexName)); - } - - /** - * Test updateAlias() method with new index. - */ - public function testUpdateAlias() - { - $alias = 'alias1'; - $index = 'index1'; - - $params['body']['actions'][] = ['add' => ['alias' => $alias, 'index' => $index]]; - - $this->indicesMock->expects($this->once()) - ->method('updateAliases') - ->with($params); - $this->model->updateAlias($alias, $index); - } - - /** - * Test updateAlias() method with new and old index. - */ - public function testUpdateAliasRemoveOldIndex() - { - $alias = 'alias1'; - $newIndex = 'index1'; - $oldIndex = 'indexOld'; - - $params['body']['actions'][] = ['add' => ['alias' => $alias, 'index' => $newIndex]]; - $params['body']['actions'][] = ['remove' => ['alias' => $alias, 'index' => $oldIndex]]; - - $this->indicesMock->expects($this->once()) - ->method('updateAliases') - ->with($params); - $this->model->updateAlias($alias, $newIndex, $oldIndex); - } - - /** - * Test indexExists() method, case when no such index exists - */ - public function testIndexExists() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $this->indicesMock->expects($this->once()) - ->method('exists') - ->with(['index' => 'indexName']) - ->willReturn($this->elasticsearchResponse); - $this->model->indexExists('indexName'); - } - - /** - * Tests existsAlias() method checking for alias. - */ - public function testExistsAlias() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $alias = 'alias1'; - $params = ['name' => $alias]; - $this->indicesMock->expects($this->once()) - ->method('existsAlias') - ->with($params) - ->willReturn($this->elasticsearchResponse); - $this->assertTrue($this->model->existsAlias($alias)); - } - - /** - * Tests existsAlias() method checking for alias and index. - */ - public function testExistsAliasWithIndex() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asBool') - ->willReturn(true); - $alias = 'alias1'; - $index = 'index1'; - $params = ['name' => $alias, 'index' => $index]; - $this->indicesMock->expects($this->once()) - ->method('existsAlias') - ->with($params) - ->willReturn($this->elasticsearchResponse); - $this->assertTrue($this->model->existsAlias($alias, $index)); - } - - /** - * Test getAlias() method. - */ - public function testGetAlias() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asArray') - ->willReturn([]); - $alias = 'alias1'; - $params = ['name' => $alias]; - $this->indicesMock->expects($this->once()) - ->method('getAlias') - ->with($params) - ->willReturn($this->elasticsearchResponse); - $this->assertEquals([], $this->model->getAlias($alias)); - } - - /** - * Test createIndexIfNotExists() method, case when operation fails - */ - public function testCreateIndexFailure() - { - $this->expectException('Exception'); - $this->indicesMock->expects($this->once()) - ->method('create') - ->with( - [ - 'index' => 'indexName', - 'body' => [], - ] - ) - ->willThrowException(new \Exception('Something went wrong')); - $this->model->createIndex('indexName', []); - } - - /** - * Test testAddFieldsMapping() method - */ - public function testAddFieldsMapping() - { - $this->indicesMock->expects($this->once()) - ->method('putMapping') - ->with( - [ - 'index' => 'indexName', - 'body' => [ - 'properties' => [ - '_search' => [ - 'type' => 'text', - ], - 'name' => [ - 'type' => 'text', - ], - ], - 'dynamic_templates' => [ - [ - 'price_mapping' => [ - 'match' => 'price_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'double', - 'store' => true, - ], - ], - ], - [ - 'position_mapping' => [ - 'match' => 'position_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'integer', - 'index' => true, - ], - ], - ], - [ - 'string_mapping' => [ - 'match' => '*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'text', - 'index' => true, - 'copy_to' => '_search', - ], - ], - ], - [ - 'integer_mapping' => [ - 'match_mapping_type' => 'long', - 'mapping' => [ - 'type' => 'integer', - ], - ], - ], - ], - ], - ] - ); - $this->model->addFieldsMapping( - [ - 'name' => [ - 'type' => 'text', - ], - ], - 'indexName', - 'product' - ); - } - - /** - * Test testAddFieldsMapping() method - */ - public function testAddFieldsMappingFailure() - { - $this->expectException('Exception'); - $this->indicesMock->expects($this->once()) - ->method('putMapping') - ->with( - [ - 'index' => 'indexName', - 'body' => [ - 'properties' => [ - '_search' => [ - 'type' => 'text', - ], - 'name' => [ - 'type' => 'text', - ], - ], - 'dynamic_templates' => [ - [ - 'price_mapping' => [ - 'match' => 'price_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'double', - 'store' => true, - ], - ], - ], - [ - 'position_mapping' => [ - 'match' => 'position_*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'integer', - 'index' => true, - ], - ], - ], - [ - 'string_mapping' => [ - 'match' => '*', - 'match_mapping_type' => 'string', - 'mapping' => [ - 'type' => 'text', - 'index' => true, - 'copy_to' => '_search', - ], - ], - ], - [ - 'integer_mapping' => [ - 'match_mapping_type' => 'long', - 'mapping' => [ - 'type' => 'integer', - ], - ], - ], - ], - ], - ] - ) - ->willThrowException(new \Exception('Something went wrong')); - $this->model->addFieldsMapping( - [ - 'name' => [ - 'type' => 'text', - ], - ], - 'indexName', - 'product' - ); - } - - /** - * Test get Elasticsearch mapping process. - * - * @return void - */ - public function testGetMapping(): void - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asArray') - ->willReturn([]); - $params = ['index' => 'indexName']; - $this->indicesMock->expects($this->once()) - ->method('getMapping') - ->with($params) - ->willReturn($this->elasticsearchResponse); - - $this->model->getMapping($params); - } - - /** - * Test query() method - * - * @return void - */ - public function testQuery() - { - $this->elasticsearchResponse->expects($this->once()) - ->method('asArray') - ->willReturn([]); - $query = ['test phrase query']; - $this->elasticsearchClientMock->expects($this->once()) - ->method('search') - ->with($query) - ->willReturn($this->elasticsearchResponse); - $this->assertEquals([], $this->model->query($query)); - } -} diff --git a/app/code/Magento/Elasticsearch8/composer.json b/app/code/Magento/Elasticsearch8/composer.json deleted file mode 100644 index d9442da2399ae..0000000000000 --- a/app/code/Magento/Elasticsearch8/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "magento/module-elasticsearch-8", - "description": "N/A", - "require": { - "php": "~8.1.0||~8.2.0", - "magento/framework": "*", - "magento/module-elasticsearch": "*", - "magento/module-advanced-search": "*", - "magento/module-catalog-search": "*", - "magento/module-search": "*" - }, - "suggest": { - "magento/module-config": "*" - }, - "type": "magento2-module", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\Elasticsearch8\\": "" - } - } -} diff --git a/app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml deleted file mode 100644 index cc51355cd1071..0000000000000 --- a/app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> - <system> - <section id="catalog"> - <group id="search"> - <!-- Elasticsearch 8 --> - <field id="elasticsearch8_server_hostname" translate="label" type="text" sortOrder="61" - showInDefault="1" showInWebsite="0" showInStore="0"> - <label>Elasticsearch Server Hostname</label> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - - <field id="elasticsearch8_server_port" translate="label" type="text" sortOrder="62" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Elasticsearch Server Port</label> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - - <field id="elasticsearch8_index_prefix" translate="label" type="text" sortOrder="63" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Elasticsearch Index Prefix</label> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - - <field id="elasticsearch8_enable_auth" translate="label" type="select" sortOrder="64" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Enable Elasticsearch HTTP Auth</label> - <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - - <field id="elasticsearch8_username" translate="label" type="text" sortOrder="65" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Elasticsearch HTTP Username</label> - <depends> - <field id="engine">elasticsearch8</field> - <field id="elasticsearch8_enable_auth">1</field> - </depends> - </field> - - <field id="elasticsearch8_password" translate="label" type="text" sortOrder="66" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Elasticsearch HTTP Password</label> - <depends> - <field id="engine">elasticsearch8</field> - <field id="elasticsearch8_enable_auth">1</field> - </depends> - </field> - - <field id="elasticsearch8_server_timeout" translate="label" type="text" sortOrder="67" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label>Elasticsearch Server Timeout</label> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - - <field id="elasticsearch8_test_connect_wizard" translate="button_label" sortOrder="68" showInDefault="1" - showInWebsite="0" showInStore="0"> - <label/> - <button_label>Test Connection</button_label> - <frontend_model>Magento\Elasticsearch8\Block\Adminhtml\System\Config\TestConnection</frontend_model> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - </field> - <field id="elasticsearch8_minimum_should_match" translate="label" type="text" sortOrder="93" showInDefault="1"> - <label>Minimum Terms to Match</label> - <depends> - <field id="engine">elasticsearch8</field> - </depends> - <comment><![CDATA[<a href="https://docs.magento.com/user-guide/catalog/search-elasticsearch.html">Learn more</a> about valid syntax.]]></comment> - <backend_model>Magento\Elasticsearch\Model\Config\Backend\MinimumShouldMatch</backend_model> - </field> - </group> - </section> - </system> -</config> diff --git a/app/code/Magento/Elasticsearch8/etc/config.xml b/app/code/Magento/Elasticsearch8/etc/config.xml deleted file mode 100644 index 016b249abd4db..0000000000000 --- a/app/code/Magento/Elasticsearch8/etc/config.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> - <default> - <catalog> - <search> - <elasticsearch8_server_hostname>localhost</elasticsearch8_server_hostname> - <elasticsearch8_server_port>9200</elasticsearch8_server_port> - <elasticsearch8_index_prefix>magento2</elasticsearch8_index_prefix> - <elasticsearch8_enable_auth>0</elasticsearch8_enable_auth> - <elasticsearch8_server_timeout>15</elasticsearch8_server_timeout> - <elasticsearch8_minimum_should_match/> - </search> - </catalog> - </default> -</config> diff --git a/app/code/Magento/Elasticsearch8/etc/di.xml b/app/code/Magento/Elasticsearch8/etc/di.xml deleted file mode 100644 index c73462a8da22f..0000000000000 --- a/app/code/Magento/Elasticsearch8/etc/di.xml +++ /dev/null @@ -1,281 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> - <preference for="Magento\Elasticsearch\Model\Adapter\Elasticsearch" type="Magento\Elasticsearch8\Model\Adapter\Elasticsearch"/> - <type name="Magento\Elasticsearch\Model\Config"> - <arguments> - <argument name="engineList" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">elasticsearch8</item> - </argument> - </arguments> - </type> - - <type name="Magento\Elasticsearch\Model\Adapter\Elasticsearch"> - <arguments> - <argument name="responseErrorExceptionList" xsi:type="array"> - <item name="clientResponseException" xsi:type="string">Elastic\Elasticsearch\Exception\ClientResponseException</item> - </argument> - </arguments> - </type> - - <type name="Magento\Elasticsearch\Model\DataProvider\Base\Suggestions"> - <arguments> - <argument name="responseErrorExceptionList" xsi:type="array"> - <item name="clientResponseException" xsi:type="string">Elastic\Elasticsearch\Exception\ClientResponseException</item> - </argument> - </arguments> - </type> - - <type name="Magento\Search\Model\Adminhtml\System\Config\Source\Engine"> - <arguments> - <argument name="engines" xsi:type="array"> - <item sortOrder="30" name="elasticsearch8" xsi:type="string">Elasticsearch 8</item> - </argument> - </arguments> - </type> - - <type name="Magento\Elasticsearch\Elasticsearch5\Model\Adapter\BatchDataMapper\CategoryFieldsProviderProxy"> - <arguments> - <argument name="categoryFieldsProviders" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\BatchDataMapper\CategoryFieldsProvider</item> - </argument> - </arguments> - </type> - <type name="Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\ProductFieldMapperProxy"> - <arguments> - <argument name="productFieldMappers" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch8\Model\Adapter\FieldMapper\ProductFieldMapper</item> - </argument> - </arguments> - </type> - - <type name="Magento\AdvancedSearch\Model\Client\ClientResolver"> - <arguments> - <argument name="clientFactories" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">\Magento\Elasticsearch8\Model\Client\ElasticsearchFactory</item> - </argument> - <argument name="clientOptions" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">\Magento\Elasticsearch\Model\Config</item> - </argument> - </arguments> - </type> - - <type name="Magento\CatalogSearch\Model\Indexer\IndexerHandlerFactory"> - <arguments> - <argument name="handlers" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch\Model\Indexer\IndexerHandler</item> - </argument> - </arguments> - </type> - - <type name="Magento\CatalogSearch\Model\Indexer\IndexStructureFactory"> - <arguments> - <argument name="structures" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch\Model\Indexer\IndexStructure</item> - </argument> - </arguments> - </type> - - <type name="Magento\CatalogSearch\Model\ResourceModel\EngineProvider"> - <arguments> - <argument name="engines" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch\Model\ResourceModel\Engine</item> - </argument> - </arguments> - </type> - - <type name="Magento\Search\Model\AdapterFactory"> - <arguments> - <argument name="adapters" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">\Magento\Elasticsearch8\SearchAdapter\Adapter</item> - </argument> - </arguments> - </type> - - <type name="Magento\Search\Model\EngineResolver"> - <arguments> - <argument name="engines" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">elasticsearch8</item> - </argument> - <argument name="defaultEngine" xsi:type="string">elasticsearch8</argument> - </arguments> - </type> - - <virtualType name="Magento\Elasticsearch8\Model\Client\ElasticsearchFactory" type="Magento\AdvancedSearch\Model\Client\ClientFactory"> - <arguments> - <argument name="clientClass" xsi:type="string">Magento\Elasticsearch8\Model\Client\Elasticsearch</argument> - </arguments> - </virtualType> - - <type name="Magento\Elasticsearch\Elasticsearch5\Model\Client\ClientFactoryProxy"> - <arguments> - <argument name="clientFactories" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch8\Model\Client\ElasticsearchFactory</item> - </argument> - </arguments> - </type> - - <type name="Magento\Framework\Search\Dynamic\IntervalFactory"> - <arguments> - <argument name="intervals" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch\Elasticsearch5\SearchAdapter\Aggregation\Interval</item> - </argument> - </arguments> - </type> - - <type name="Magento\Framework\Search\Dynamic\DataProviderFactory"> - <arguments> - <argument name="dataProviders" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch\SearchAdapter\Dynamic\DataProvider</item> - </argument> - </arguments> - </type> - - <virtualType name="Magento\Elasticsearch8\Model\DataProvider\Suggestions" type="Magento\Elasticsearch\Model\DataProvider\Base\Suggestions"> - <arguments> - <argument name="fieldProvider" xsi:type="object">elasticsearch5FieldProvider</argument> - </arguments> - </virtualType> - <type name="Magento\AdvancedSearch\Model\SuggestedQueries"> - <arguments> - <argument name="data" xsi:type="array"> - <item name="elasticsearch8" xsi:type="string">Magento\Elasticsearch8\Model\DataProvider\Suggestions</item> - </argument> - </arguments> - </type> - <virtualType name="\Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver"> - <arguments> - <argument name="items" xsi:type="array"> - <item name="notEav" xsi:type="object" sortOrder="10">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item> - <item name="special" xsi:type="object" sortOrder="20">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item> - <item name="price" xsi:type="object" sortOrder="30">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item> - <item name="categoryName" xsi:type="object" sortOrder="40">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item> - <item name="position" xsi:type="object" sortOrder="50">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item> - <item name="default" xsi:type="object" sortOrder="100">Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</item> - </argument> - </arguments> - </virtualType> - <type name="Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver"> - <arguments> - <argument name="baseResolver" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</argument> - </arguments> - </type> - <virtualType name="Magento\Elasticsearch8\Model\Adapter\FieldMapper\ProductFieldMapper" - type="Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\ProductFieldMapper"> - <arguments> - <argument name="fieldProvider" xsi:type="object">elasticsearch5FieldProvider</argument> - <argument name="fieldNameResolver" xsi:type="object">\Magento\Elasticsearch8\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver</argument> - </arguments> - </virtualType> - - <type name="Magento\Search\Model\Search\PageSizeProvider"> - <arguments> - <argument name="pageSizeBySearchEngine" xsi:type="array"> - <item name="elasticsearch8" xsi:type="number">10000</item> - </argument> - </arguments> - </type> - - <virtualType name="elasticsearchLayerCategoryItemCollectionProvider" type="Magento\Elasticsearch\Model\Layer\Category\ItemCollectionProvider"> - <arguments> - <argument name="factories" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">elasticsearchCategoryCollectionFactory</item> - </argument> - </arguments> - </virtualType> - - <type name="Magento\CatalogSearch\Model\Search\ItemCollectionProvider"> - <arguments> - <argument name="factories" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">elasticsearchAdvancedCollectionFactory</item> - <item name="default" xsi:type="object">elasticsearchAdvancedCollectionFactory</item> - </argument> - </arguments> - </type> - - <type name="Magento\CatalogSearch\Model\Advanced\ProductCollectionPrepareStrategyProvider"> - <arguments> - <argument name="strategies" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch\Model\Advanced\ProductCollectionPrepareStrategy</item> - </argument> - </arguments> - </type> - - <virtualType name="elasticsearchLayerSearchItemCollectionProvider" type="Magento\Elasticsearch\Model\Layer\Search\ItemCollectionProvider"> - <arguments> - <argument name="factories" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">elasticsearchFulltextSearchCollectionFactory</item> - </argument> - </arguments> - </virtualType> - - <type name="Magento\Config\Model\Config\TypePool"> - <arguments> - <argument name="sensitive" xsi:type="array"> - <item name="catalog/search/elasticsearch8_password" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_server_hostname" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_username" xsi:type="string">1</item> - </argument> - <argument name="environment" xsi:type="array"> - <item name="catalog/search/elasticsearch8_enable_auth" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_index_prefix" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_password" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_server_hostname" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_server_port" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_username" xsi:type="string">1</item> - <item name="catalog/search/elasticsearch8_server_timeout" xsi:type="string">1</item> - </argument> - </arguments> - </type> - <type name="Magento\Elasticsearch8\Model\Client\Elasticsearch"> - <arguments> - <argument name="fieldsMappingPreprocessors" xsi:type="array"> - <item name="elasticsearch8_copy_searchable_fields_to_search_field" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\CopySearchableFieldsToSearchField</item> - <item name="elasticsearch8_add_default_search_field" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\AddDefaultSearchField</item> - </argument> - </arguments> - </type> - - <virtualType name="Magento\Elasticsearch8\Setup\InstallConfig" type="Magento\Search\Setup\InstallConfig"> - <arguments> - <argument name="searchConfigMapping" xsi:type="array"> - <item name="elasticsearch-host" xsi:type="string">elasticsearch8_server_hostname</item> - <item name="elasticsearch-port" xsi:type="string">elasticsearch8_server_port</item> - <item name="elasticsearch-timeout" xsi:type="string">elasticsearch8_server_timeout</item> - <item name="elasticsearch-index-prefix" xsi:type="string">elasticsearch8_index_prefix</item> - <item name="elasticsearch-enable-auth" xsi:type="string">elasticsearch8_enable_auth</item> - <item name="elasticsearch-username" xsi:type="string">elasticsearch8_username</item> - <item name="elasticsearch-password" xsi:type="string">elasticsearch8_password</item> - </argument> - </arguments> - </virtualType> - <type name="Magento\Search\Setup\CompositeInstallConfig"> - <arguments> - <argument name="installConfigList" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch8\Setup\InstallConfig</item> - </argument> - </arguments> - </type> - <type name="Magento\Search\Model\SearchEngine\Validator"> - <arguments> - <argument name="engineValidators" xsi:type="array"> - <item name="elasticsearch8" xsi:type="object">Magento\Elasticsearch\Setup\Validator</item> - </argument> - </arguments> - </type> - <type name="Magento\Elasticsearch8\Model\Adapter\DynamicTemplatesProvider"> - <arguments> - <argument name="mappers" xsi:type="array"> - <item name="price_mapping" xsi:type="object">Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\PriceMapper</item> - <item name="position_mapping" xsi:type="object">Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\PositionMapper</item> - <item name="string_mapping" xsi:type="object">Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\StringMapper</item> - <item name="integer_mapping" xsi:type="object">Magento\Elasticsearch8\Model\Adapter\DynamicTemplates\IntegerMapper</item> - </argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Elasticsearch8/etc/module.xml b/app/code/Magento/Elasticsearch8/etc/module.xml deleted file mode 100644 index 32ea0b381b767..0000000000000 --- a/app/code/Magento/Elasticsearch8/etc/module.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> - <module name="Magento_Elasticsearch8"> - <sequence> - <module name="Magento_AdvancedSearch"/> - <module name="Magento_Elasticsearch"/> - </sequence> - </module> -</config> diff --git a/app/code/Magento/Elasticsearch8/etc/search_engine.xml b/app/code/Magento/Elasticsearch8/etc/search_engine.xml deleted file mode 100644 index 28e4074bfc886..0000000000000 --- a/app/code/Magento/Elasticsearch8/etc/search_engine.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<engines xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Search/etc/search_engine.xsd"> - <engine name="elasticsearch8"> - <feature name="synonyms" support="true" /> - </engine> -</engines> diff --git a/app/code/Magento/Elasticsearch8/registration.php b/app/code/Magento/Elasticsearch8/registration.php deleted file mode 100644 index bfe52f2f4ceee..0000000000000 --- a/app/code/Magento/Elasticsearch8/registration.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -\Magento\Framework\Component\ComponentRegistrar::register( - \Magento\Framework\Component\ComponentRegistrar::MODULE, - 'Magento_Elasticsearch8', - __DIR__ -); diff --git a/composer.json b/composer.json index 7edcf7c8510d3..9d7bf57da0865 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "elasticsearch/elasticsearch": "^7.17||^8.5", + "elasticsearch/elasticsearch": "^7.17", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", From 42ed59fbf22ac138b1b4582c02e03c4a3f94ade6 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 3 Feb 2023 21:13:48 +0530 Subject: [PATCH 710/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- .../view/frontend/web/js/model/new-customer-address.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js b/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js index 3748212da918e..80ee139bb0503 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js @@ -22,8 +22,6 @@ define([ if (addressData.region && addressData.region['region_id']) { regionId = addressData.region['region_id']; - } else if (!addressData['region_id']) { - regionId = undefined; } else if ( /* eslint-disable */ addressData['country_id'] && addressData['country_id'] == window.checkoutConfig.defaultCountryId || @@ -31,6 +29,8 @@ define([ /* eslint-enable */ ) { regionId = window.checkoutConfig.defaultRegionId || undefined; + } else if (!addressData['region_id']) { + regionId = undefined; } return { From 55f31f5da728295a868814166fc6f98c294f155b Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Thu, 13 Oct 2022 02:42:19 +0530 Subject: [PATCH 711/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Magento/Backend/Model/Dashboard/ChartTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php index 7af3527517d91..e66c32413a891 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php @@ -85,22 +85,22 @@ public function getChartDataProvider(): array 'quantity' ], [ - 3, + 2, '7d', 'quantity' ], [ - 4, + 3, '1m', 'quantity' ], [ - 5, + 4, '1y', 'quantity' ], [ - 6, + 5, '2y', 'quantity' ] From 40cdf4328956f5d30e401a857b28ccdfa4843a6f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 17 Oct 2022 11:23:13 +0530 Subject: [PATCH 712/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Backend/Model/Dashboard/ChartTest.php | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php index e66c32413a891..63bab3ffe9d95 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php @@ -52,7 +52,6 @@ public function testGetByPeriodWithParam(int $expectedDataQty, string $period, s { $timezoneLocal = $this->objectManager->get(TimezoneInterface::class)->getConfigTimezone(); $order = $this->objectManager->get(Order::class); - $order->loadByIncrementId('100000002'); $payment = $this->objectManager->get(Payment::class); $payment->setMethod('checkmo'); $payment->setAdditionalInformation('last_trans_id', '11122'); @@ -61,7 +60,26 @@ public function testGetByPeriodWithParam(int $expectedDataQty, string $period, s 'fraudulent' => false ]); $dateTime = new \DateTime('now', new \DateTimeZone($timezoneLocal)); - $order->setCreatedAt($dateTime->modify('-1 hour')->format(DateTime::DATETIME_PHP_FORMAT)); + + switch ($period) { + case '1m': + $order->loadByIncrementId('100000004'); + $order->setCreatedAt($dateTime->modify('first day of this month') + ->format(DateTime::DATETIME_PHP_FORMAT)); + break; + + case '1y': + $order->loadByIncrementId('100000005'); + $order->setCreatedAt($dateTime->modify('first day of january this year') + ->format(DateTime::DATETIME_PHP_FORMAT)); + break; + + case '2y': + $order->loadByIncrementId('100000006'); + $order->setCreatedAt($dateTime->modify('first day of january last year') + ->format(DateTime::DATETIME_PHP_FORMAT)); + break; + } $order->setPayment($payment); $order->save(); $ordersData = $this->model->getByPeriod($period, $chartParam); @@ -85,22 +103,22 @@ public function getChartDataProvider(): array 'quantity' ], [ - 2, + 3, '7d', 'quantity' ], [ - 3, + 4, '1m', 'quantity' ], [ - 4, + 5, '1y', 'quantity' ], [ - 5, + 6, '2y', 'quantity' ] From b77afd9da9b6159ea33eaf4400857c7920a75eab Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 2 Nov 2022 18:00:28 +0530 Subject: [PATCH 713/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Backend/Model/Dashboard/Chart/Date.php | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php index 2d1e5e977eaf0..22ddd1637ee93 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php @@ -7,6 +7,7 @@ namespace Magento\Backend\Model\Dashboard\Chart; +use DateTimeZone; use Magento\Backend\Model\Dashboard\Period; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Reports\Model\ResourceModel\Order\CollectionFactory; @@ -56,38 +57,36 @@ public function getByPeriod(string $period): array ); $timezoneLocal = $this->localeDate->getConfigTimezone(); - $localStartDate = new \DateTime($dateStart->format('Y-m-d H:i:s'), new \DateTimeZone($timezoneLocal)); - $localEndDate = new \DateTime($dateEnd->format('Y-m-d H:i:s'), new \DateTimeZone($timezoneLocal)); + + $dateStart->setTimezone(new DateTimeZone($timezoneLocal)); + $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); if ($period === Period::PERIOD_24_HOURS) { - $localEndDate = new \DateTime('now', new \DateTimeZone($timezoneLocal)); - $localStartDate = clone $localEndDate; - $localStartDate->modify('-1 day'); - $localStartDate->modify('+1 hour'); + $dateEnd->modify('-1 hour'); } elseif ($period === Period::PERIOD_TODAY) { - $localEndDate->modify('now'); + $dateEnd->modify('now'); } else { - $localEndDate->setTime(23, 59, 59); - $localStartDate->setTime(0, 0, 0); + $dateEnd->setTime(23, 59, 59); + $dateStart->setTime(0, 0, 0); } $dates = []; - while ($localStartDate <= $localEndDate) { + while ($dateStart <= $dateEnd) { switch ($period) { case Period::PERIOD_7_DAYS: case Period::PERIOD_1_MONTH: - $d = $localStartDate->format('Y-m-d'); - $localStartDate->modify('+1 day'); + $d = $dateStart->format('Y-m-d'); + $dateStart->modify('+1 day'); break; case Period::PERIOD_1_YEAR: case Period::PERIOD_2_YEARS: - $d = $localStartDate->format('Y-m'); - $localStartDate->modify('first day of next month'); + $d = $dateStart->format('Y-m'); + $dateStart->modify('first day of next month'); break; default: - $d = $localStartDate->format('Y-m-d H:00'); - $localStartDate->modify('+1 hour'); + $d = $dateStart->format('Y-m-d H:00'); + $dateStart->modify('+1 hour'); } $dates[] = $d; From e5aa536d4acbb616fb881463985643ed752e52d6 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 4 Nov 2022 19:59:54 +0530 Subject: [PATCH 714/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Magento/Backend/Model/Dashboard/Chart.php | 15 +++++++++++++-- .../Backend/Model/Dashboard/Chart/Date.php | 17 ----------------- .../Model/ResourceModel/Order/Collection.php | 16 ++++++++++++---- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart.php b/app/code/Magento/Backend/Model/Dashboard/Chart.php index 346c1153ac74e..b0750a33f4ce1 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart.php @@ -9,12 +9,19 @@ use Magento\Backend\Helper\Dashboard\Order as OrderHelper; use Magento\Backend\Model\Dashboard\Chart\Date; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Stdlib\DateTime\TimezoneInterface; /** * Dashboard chart data retriever */ class Chart { + /** + * @var TimezoneInterface + */ + private $timeZone; + /** * @var Date */ @@ -35,15 +42,18 @@ class Chart * @param Date $dateRetriever * @param OrderHelper $orderHelper * @param Period $period + * @param TimezoneInterface|null $timeZone */ public function __construct( Date $dateRetriever, OrderHelper $orderHelper, - Period $period + Period $period, + TimezoneInterface $timeZone = null ) { $this->dateRetriever = $dateRetriever; $this->orderHelper = $orderHelper; $this->period = $period; + $this->timeZone = $timeZone ?: ObjectManager::getInstance()->get(TimezoneInterface::class); } /** @@ -81,7 +91,8 @@ public function getByPeriod( if ($collection->count() > 0) { foreach ($dates as $date) { - $item = $collection->getItemByColumnValue('range', $date); + $utcDate = $this->timeZone->convertConfigTimeToUtc($date); + $item = $collection->getItemByColumnValue('range', $utcDate); $data[] = [ 'x' => $date, diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php index 22ddd1637ee93..a4df0de65feca 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php @@ -56,20 +56,6 @@ public function getByPeriod(string $period): array true ); - $timezoneLocal = $this->localeDate->getConfigTimezone(); - - $dateStart->setTimezone(new DateTimeZone($timezoneLocal)); - $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); - - if ($period === Period::PERIOD_24_HOURS) { - $dateEnd->modify('-1 hour'); - } elseif ($period === Period::PERIOD_TODAY) { - $dateEnd->modify('now'); - } else { - $dateEnd->setTime(23, 59, 59); - $dateStart->setTime(0, 0, 0); - } - $dates = []; while ($dateStart <= $dateEnd) { @@ -77,16 +63,13 @@ public function getByPeriod(string $period): array case Period::PERIOD_7_DAYS: case Period::PERIOD_1_MONTH: $d = $dateStart->format('Y-m-d'); - $dateStart->modify('+1 day'); break; case Period::PERIOD_1_YEAR: case Period::PERIOD_2_YEARS: $d = $dateStart->format('Y-m'); - $dateStart->modify('first day of next month'); break; default: $d = $dateStart->format('Y-m-d H:00'); - $dateStart->modify('+1 hour'); } $dates[] = $d; diff --git a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php index 67e451c4c591c..191ee75d8dafb 100644 --- a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php +++ b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php @@ -7,6 +7,7 @@ namespace Magento\Reports\Model\ResourceModel\Order; use Magento\Framework\DB\Select; +use DateTimeZone; /** * Reports orders collection @@ -237,6 +238,12 @@ protected function _prepareSummaryLive($range, $customStart, $customEnd, $isFilt $dateRange = $this->getDateRange($range, $customStart, $customEnd); + $dateRange = [ + 'from' => $this->_localeDate->convertConfigTimeToUtc($dateRange['from']), + 'to' => $this->_localeDate->convertConfigTimeToUtc($dateRange['to']), + 'datetime' => true + ]; + $tzRangeOffsetExpression = $this->_getTZRangeOffsetExpression( $range, 'created_at', @@ -411,19 +418,20 @@ protected function _getTZRangeExpressionForAttribute($range, $attribute, $tzFrom public function getDateRange($range, $customStart, $customEnd, $returnObjects = false) { $dateEnd = new \DateTime(); - $dateStart = new \DateTime(); + $timezoneLocal = $this->_localeDate->getConfigTimezone(); + + $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); // go to the end of a day $dateEnd->setTime(23, 59, 59); + $dateStart = clone $dateEnd; $dateStart->setTime(0, 0, 0); switch ($range) { - case 'today': - $dateEnd->modify('now'); - break; case '24h': $dateEnd = new \DateTime(); + $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); $dateEnd->modify('+1 hour'); $dateStart = clone $dateEnd; $dateStart->modify('-1 day'); From 8e09bb9b6f690b605df8f1c57d603e56da82d483 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 5 Nov 2022 11:03:53 +0530 Subject: [PATCH 715/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- app/code/Magento/Backend/Model/Dashboard/Chart.php | 13 ++++++++++++- .../Magento/Backend/Model/Dashboard/Chart/Date.php | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart.php b/app/code/Magento/Backend/Model/Dashboard/Chart.php index b0750a33f4ce1..206029523a22e 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart.php @@ -91,7 +91,18 @@ public function getByPeriod( if ($collection->count() > 0) { foreach ($dates as $date) { - $utcDate = $this->timeZone->convertConfigTimeToUtc($date); + switch ($period) { + case Period::PERIOD_7_DAYS: + case Period::PERIOD_1_MONTH: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d'); + break; + case Period::PERIOD_1_YEAR: + case Period::PERIOD_2_YEARS: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m'); + break; + default: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d H:00'); + } $item = $collection->getItemByColumnValue('range', $utcDate); $data[] = [ diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php index a4df0de65feca..be84ea1ffb28e 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php @@ -63,13 +63,16 @@ public function getByPeriod(string $period): array case Period::PERIOD_7_DAYS: case Period::PERIOD_1_MONTH: $d = $dateStart->format('Y-m-d'); + $dateStart->modify('+1 day'); break; case Period::PERIOD_1_YEAR: case Period::PERIOD_2_YEARS: $d = $dateStart->format('Y-m'); + $dateStart->modify('first day of next month'); break; default: $d = $dateStart->format('Y-m-d H:00'); + $dateStart->modify('+1 hour'); } $dates[] = $d; From 9ab66eebd295f2abed9850a32dc418381e34d6d4 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 5 Nov 2022 12:23:47 +0530 Subject: [PATCH 716/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Backend/Model/Dashboard/ChartTest.php | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php index 63bab3ffe9d95..5b48a7fff70a4 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php @@ -50,38 +50,6 @@ protected function setUp(): void */ public function testGetByPeriodWithParam(int $expectedDataQty, string $period, string $chartParam): void { - $timezoneLocal = $this->objectManager->get(TimezoneInterface::class)->getConfigTimezone(); - $order = $this->objectManager->get(Order::class); - $payment = $this->objectManager->get(Payment::class); - $payment->setMethod('checkmo'); - $payment->setAdditionalInformation('last_trans_id', '11122'); - $payment->setAdditionalInformation('metadata', [ - 'type' => 'free', - 'fraudulent' => false - ]); - $dateTime = new \DateTime('now', new \DateTimeZone($timezoneLocal)); - - switch ($period) { - case '1m': - $order->loadByIncrementId('100000004'); - $order->setCreatedAt($dateTime->modify('first day of this month') - ->format(DateTime::DATETIME_PHP_FORMAT)); - break; - - case '1y': - $order->loadByIncrementId('100000005'); - $order->setCreatedAt($dateTime->modify('first day of january this year') - ->format(DateTime::DATETIME_PHP_FORMAT)); - break; - - case '2y': - $order->loadByIncrementId('100000006'); - $order->setCreatedAt($dateTime->modify('first day of january last year') - ->format(DateTime::DATETIME_PHP_FORMAT)); - break; - } - $order->setPayment($payment); - $order->save(); $ordersData = $this->model->getByPeriod($period, $chartParam); $ordersCount = array_sum(array_map(function ($item) { return $item['y']; @@ -98,7 +66,7 @@ public function getChartDataProvider(): array { return [ [ - 1, + 2, '24h', 'quantity' ], From b5a8aa7f662726d48932d3acc0ef28d957d6128f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 5 Nov 2022 11:15:23 +0530 Subject: [PATCH 717/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Backend/Model/Dashboard/ChartTest.php | 47 ++++++++++++++++--- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php index 5b48a7fff70a4..504efebd17234 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php @@ -14,6 +14,7 @@ use Magento\Sales\Model\Order\Payment; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; use Magento\Framework\Stdlib\DateTime; +use DateTimeZone; /** * Verify chart data by different period. @@ -48,8 +49,35 @@ protected function setUp(): void * @dataProvider getChartDataProvider * @return void */ - public function testGetByPeriodWithParam(int $expectedDataQty, string $period, string $chartParam): void - { + public function testGetByPeriodWithParam( + int $expectedDataQty, + string $period, + string $chartParam, + string $orderIncrementId + ): void { + $timezoneLocal = $this->objectManager->get(TimezoneInterface::class)->getConfigTimezone(); + + $order = $this->objectManager->get(Order::class); + $order->loadByIncrementId($orderIncrementId); + $payment = $this->objectManager->get(Payment::class); + $payment->setMethod('checkmo'); + $payment->setAdditionalInformation('last_trans_id', '11122'); + $payment->setAdditionalInformation('metadata', [ + 'type' => 'free', + 'fraudulent' => false + ]); + $dateTime = new \DateTime('now', new \DateTimeZone($timezoneLocal)); + if ($period === '1m') { + $dateTime->modify('first day of this month')->format(DateTime::DATETIME_PHP_FORMAT); + } elseif ($period === '1y') { + $dateTime->modify('first day of january this year')->format(DateTime::DATETIME_PHP_FORMAT); + } elseif ($period === '2y') { + $dateTime->modify('first day of january last year')->format(DateTime::DATETIME_PHP_FORMAT); + } + $dateTime->setTimezone(new DateTimeZone('UTC')); + $order->setCreatedAt($dateTime->format(DateTime::DATETIME_PHP_FORMAT)); + $order->setPayment($payment); + $order->save(); $ordersData = $this->model->getByPeriod($period, $chartParam); $ordersCount = array_sum(array_map(function ($item) { return $item['y']; @@ -68,27 +96,32 @@ public function getChartDataProvider(): array [ 2, '24h', - 'quantity' + 'quantity', + '100000002' ], [ 3, '7d', - 'quantity' + 'quantity', + '100000003' ], [ 4, '1m', - 'quantity' + 'quantity', + '100000004' ], [ 5, '1y', - 'quantity' + 'quantity', + '100000005' ], [ 6, '2y', - 'quantity' + 'quantity', + '100000006' ] ]; } From b2958cfcca3c6c81ed7c0702e77a11174d2e6bc8 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 5 Nov 2022 15:24:43 +0530 Subject: [PATCH 718/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Magento/Backend/Model/Dashboard/Chart.php | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart.php b/app/code/Magento/Backend/Model/Dashboard/Chart.php index 206029523a22e..e300ee99f2045 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart.php @@ -91,18 +91,7 @@ public function getByPeriod( if ($collection->count() > 0) { foreach ($dates as $date) { - switch ($period) { - case Period::PERIOD_7_DAYS: - case Period::PERIOD_1_MONTH: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d'); - break; - case Period::PERIOD_1_YEAR: - case Period::PERIOD_2_YEARS: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m'); - break; - default: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d H:00'); - } + $utcDate = $this->getUTCDatetimeByPeriod($period, $date); $item = $collection->getItemByColumnValue('range', $utcDate); $data[] = [ @@ -114,4 +103,28 @@ public function getByPeriod( return $data; } + + /** + * Get UTC date and time by period. + * + * @param string $period + * @param string $date + * @return string + */ + private function getUTCDatetimeByPeriod(string $period, string $date) + { + switch ($period) { + case Period::PERIOD_7_DAYS: + case Period::PERIOD_1_MONTH: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d'); + break; + case Period::PERIOD_1_YEAR: + case Period::PERIOD_2_YEARS: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m'); + break; + default: + $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d H:00'); + } + return $utcDate; + } } From 0f612757a8665e47a9b4591fa09c06443d70504f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sat, 5 Nov 2022 16:51:52 +0530 Subject: [PATCH 719/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Test/Unit/Model/ResourceModel/Order/CollectionTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php index 9e4f39be6b7dc..50398d42a7019 100644 --- a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php +++ b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php @@ -138,6 +138,10 @@ protected function setUp(): void ->getMock(); $this->timezoneMock = $this->getMockBuilder(TimezoneInterface::class) ->getMock(); + $this->timezoneMock + ->expects($this->any()) + ->method('getConfigTimezone') + ->willReturn('America/Chicago'); $this->configMock = $this->getMockBuilder(Config::class) ->disableOriginalConstructor() ->getMock(); From 692847b1c93da68342f34b2179fd9f49929eb339 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Sun, 6 Nov 2022 01:29:00 +0530 Subject: [PATCH 720/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Test/Unit/Model/Dashboard/ChartTest.php | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php index 38b2aa6ee9557..579bf074fe6ae 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php @@ -12,6 +12,7 @@ use Magento\Backend\Model\Dashboard\Chart\Date as DateRetriever; use Magento\Backend\Model\Dashboard\Period; use Magento\Framework\DataObject; +use Magento\Framework\Stdlib\DateTime\Timezone; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Reports\Model\ResourceModel\Order\Collection; use PHPUnit\Framework\MockObject\MockObject; @@ -24,6 +25,11 @@ class ChartTest extends TestCase */ private $model; + /** + * @var Timezone|MockObject + */ + private $timeZoneMock; + /** * @var ObjectManager */ @@ -55,6 +61,10 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); + $this->timeZoneMock = $this->getMockBuilder(Timezone::class) + ->onlyMethods(['convertConfigTimeToUtc']) + ->disableOriginalConstructor()->getMock(); + $this->orderHelperMock = $this->getMockBuilder(OrderHelper::class) ->disableOriginalConstructor() ->getMock(); @@ -72,20 +82,22 @@ protected function setUp(): void [ 'dateRetriever' => $this->dateRetrieverMock, 'orderHelper' => $this->orderHelperMock, - 'period' => $period + 'period' => $period, + 'timeZone' => $this->timeZoneMock ] ); } /** * @param string $period + * @param string $dateformat * @param string $chartParam * @param array $result * * @return void * @dataProvider getByPeriodDataProvider */ - public function testGetByPeriod(string $period, string $chartParam, array $result): void + public function testGetByPeriod(string $period, string $dateformat, string $chartParam, array $result): void { $this->orderHelperMock ->method('setParam') @@ -106,8 +118,15 @@ public function testGetByPeriod(string $period, string $chartParam, array $resul $this->collectionMock->method('count') ->willReturn(2); + $utcMap = []; $valueMap = []; foreach ($result as $resultItem) { + $utcMap[] = [ + $resultItem['x'], + $dateformat, + $resultItem['x'] + ]; + $dataObjectMock = $this->getMockBuilder(DataObject::class) ->disableOriginalConstructor() ->getMock(); @@ -121,6 +140,11 @@ public function testGetByPeriod(string $period, string $chartParam, array $resul $dataObjectMock ]; } + $this->timeZoneMock + ->expects($this->any()) + ->method('convertConfigTimeToUtc') + ->willReturnMap($utcMap); + $this->collectionMock->method('getItemByColumnValue') ->willReturnMap($valueMap); @@ -138,6 +162,7 @@ public function getByPeriodDataProvider(): array return [ [ Period::PERIOD_7_DAYS, + 'Y-m-d', 'revenue', [ [ @@ -160,6 +185,7 @@ public function getByPeriodDataProvider(): array ], [ Period::PERIOD_1_MONTH, + 'Y-m-d', 'quantity', [ [ @@ -182,6 +208,7 @@ public function getByPeriodDataProvider(): array ], [ Period::PERIOD_1_YEAR, + 'Y-m', 'quantity', [ [ From 3ee1885d78ba46d9bdb742bfd7ce70a11c9e25d2 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 25 Nov 2022 00:24:14 +0530 Subject: [PATCH 721/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Magento/Backend/Model/Dashboard/Chart.php | 39 +------------------ .../Backend/Model/Dashboard/Chart/Date.php | 8 ++++ .../Test/Unit/Model/Dashboard/ChartTest.php | 30 +------------- .../Model/ResourceModel/Order/Collection.php | 15 +++---- 4 files changed, 18 insertions(+), 74 deletions(-) diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart.php b/app/code/Magento/Backend/Model/Dashboard/Chart.php index e300ee99f2045..346c1153ac74e 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart.php @@ -9,19 +9,12 @@ use Magento\Backend\Helper\Dashboard\Order as OrderHelper; use Magento\Backend\Model\Dashboard\Chart\Date; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Stdlib\DateTime\TimezoneInterface; /** * Dashboard chart data retriever */ class Chart { - /** - * @var TimezoneInterface - */ - private $timeZone; - /** * @var Date */ @@ -42,18 +35,15 @@ class Chart * @param Date $dateRetriever * @param OrderHelper $orderHelper * @param Period $period - * @param TimezoneInterface|null $timeZone */ public function __construct( Date $dateRetriever, OrderHelper $orderHelper, - Period $period, - TimezoneInterface $timeZone = null + Period $period ) { $this->dateRetriever = $dateRetriever; $this->orderHelper = $orderHelper; $this->period = $period; - $this->timeZone = $timeZone ?: ObjectManager::getInstance()->get(TimezoneInterface::class); } /** @@ -91,8 +81,7 @@ public function getByPeriod( if ($collection->count() > 0) { foreach ($dates as $date) { - $utcDate = $this->getUTCDatetimeByPeriod($period, $date); - $item = $collection->getItemByColumnValue('range', $utcDate); + $item = $collection->getItemByColumnValue('range', $date); $data[] = [ 'x' => $date, @@ -103,28 +92,4 @@ public function getByPeriod( return $data; } - - /** - * Get UTC date and time by period. - * - * @param string $period - * @param string $date - * @return string - */ - private function getUTCDatetimeByPeriod(string $period, string $date) - { - switch ($period) { - case Period::PERIOD_7_DAYS: - case Period::PERIOD_1_MONTH: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d'); - break; - case Period::PERIOD_1_YEAR: - case Period::PERIOD_2_YEARS: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m'); - break; - default: - $utcDate = $this->timeZone->convertConfigTimeToUtc($date, 'Y-m-d H:00'); - } - return $utcDate; - } } diff --git a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php index be84ea1ffb28e..ab2ca43ef13f2 100644 --- a/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php +++ b/app/code/Magento/Backend/Model/Dashboard/Chart/Date.php @@ -55,6 +55,14 @@ public function getByPeriod(string $period): array '', true ); + $timezoneLocal = $this->localeDate->getConfigTimezone(); + + $dateStart->setTimezone(new DateTimeZone($timezoneLocal)); + $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); + + if ($period === Period::PERIOD_24_HOURS) { + $dateEnd->modify('-1 hour'); + } $dates = []; diff --git a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php index 579bf074fe6ae..4b6a10691c5e2 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php @@ -12,7 +12,6 @@ use Magento\Backend\Model\Dashboard\Chart\Date as DateRetriever; use Magento\Backend\Model\Dashboard\Period; use Magento\Framework\DataObject; -use Magento\Framework\Stdlib\DateTime\Timezone; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Reports\Model\ResourceModel\Order\Collection; use PHPUnit\Framework\MockObject\MockObject; @@ -25,11 +24,6 @@ class ChartTest extends TestCase */ private $model; - /** - * @var Timezone|MockObject - */ - private $timeZoneMock; - /** * @var ObjectManager */ @@ -61,10 +55,6 @@ protected function setUp(): void ->disableOriginalConstructor() ->getMock(); - $this->timeZoneMock = $this->getMockBuilder(Timezone::class) - ->onlyMethods(['convertConfigTimeToUtc']) - ->disableOriginalConstructor()->getMock(); - $this->orderHelperMock = $this->getMockBuilder(OrderHelper::class) ->disableOriginalConstructor() ->getMock(); @@ -82,22 +72,20 @@ protected function setUp(): void [ 'dateRetriever' => $this->dateRetrieverMock, 'orderHelper' => $this->orderHelperMock, - 'period' => $period, - 'timeZone' => $this->timeZoneMock + 'period' => $period ] ); } /** * @param string $period - * @param string $dateformat * @param string $chartParam * @param array $result * * @return void * @dataProvider getByPeriodDataProvider */ - public function testGetByPeriod(string $period, string $dateformat, string $chartParam, array $result): void + public function testGetByPeriod(string $period, string $chartParam, array $result): void { $this->orderHelperMock ->method('setParam') @@ -118,15 +106,8 @@ public function testGetByPeriod(string $period, string $dateformat, string $char $this->collectionMock->method('count') ->willReturn(2); - $utcMap = []; $valueMap = []; foreach ($result as $resultItem) { - $utcMap[] = [ - $resultItem['x'], - $dateformat, - $resultItem['x'] - ]; - $dataObjectMock = $this->getMockBuilder(DataObject::class) ->disableOriginalConstructor() ->getMock(); @@ -140,10 +121,6 @@ public function testGetByPeriod(string $period, string $dateformat, string $char $dataObjectMock ]; } - $this->timeZoneMock - ->expects($this->any()) - ->method('convertConfigTimeToUtc') - ->willReturnMap($utcMap); $this->collectionMock->method('getItemByColumnValue') ->willReturnMap($valueMap); @@ -162,7 +139,6 @@ public function getByPeriodDataProvider(): array return [ [ Period::PERIOD_7_DAYS, - 'Y-m-d', 'revenue', [ [ @@ -185,7 +161,6 @@ public function getByPeriodDataProvider(): array ], [ Period::PERIOD_1_MONTH, - 'Y-m-d', 'quantity', [ [ @@ -208,7 +183,6 @@ public function getByPeriodDataProvider(): array ], [ Period::PERIOD_1_YEAR, - 'Y-m', 'quantity', [ [ diff --git a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php index 191ee75d8dafb..736733a2f9800 100644 --- a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php +++ b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php @@ -238,12 +238,6 @@ protected function _prepareSummaryLive($range, $customStart, $customEnd, $isFilt $dateRange = $this->getDateRange($range, $customStart, $customEnd); - $dateRange = [ - 'from' => $this->_localeDate->convertConfigTimeToUtc($dateRange['from']), - 'to' => $this->_localeDate->convertConfigTimeToUtc($dateRange['to']), - 'datetime' => true - ]; - $tzRangeOffsetExpression = $this->_getTZRangeOffsetExpression( $range, 'created_at', @@ -429,9 +423,11 @@ public function getDateRange($range, $customStart, $customEnd, $returnObjects = $dateStart->setTime(0, 0, 0); switch ($range) { + case 'today': + $dateEnd = new \DateTime('now', new \DateTimeZone($timezoneLocal)); + break; case '24h': - $dateEnd = new \DateTime(); - $dateEnd->setTimezone(new DateTimeZone($timezoneLocal)); + $dateEnd = new \DateTime('now', new \DateTimeZone($timezoneLocal)); $dateEnd->modify('+1 hour'); $dateStart = clone $dateEnd; $dateStart->modify('-1 day'); @@ -476,7 +472,8 @@ public function getDateRange($range, $customStart, $customEnd, $returnObjects = } break; } - + $dateStart->setTimezone(new DateTimeZone('UTC')); + $dateEnd->setTimezone(new DateTimeZone('UTC')); if ($returnObjects) { return [$dateStart, $dateEnd]; } else { From 3b9eb58f3691681b80e1050460fcfa406a352fac Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 25 Nov 2022 06:12:32 +0530 Subject: [PATCH 722/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php index 4b6a10691c5e2..38b2aa6ee9557 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Dashboard/ChartTest.php @@ -121,7 +121,6 @@ public function testGetByPeriod(string $period, string $chartParam, array $resul $dataObjectMock ]; } - $this->collectionMock->method('getItemByColumnValue') ->willReturnMap($valueMap); From 4780dd3e0b1c60f0f45a76090f128c5b1a201c12 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 11 Jan 2023 11:47:06 +0530 Subject: [PATCH 723/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Backend/Model/Dashboard/ChartTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php index 504efebd17234..91a41fc27a602 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Dashboard/ChartTest.php @@ -55,10 +55,6 @@ public function testGetByPeriodWithParam( string $chartParam, string $orderIncrementId ): void { - $timezoneLocal = $this->objectManager->get(TimezoneInterface::class)->getConfigTimezone(); - - $order = $this->objectManager->get(Order::class); - $order->loadByIncrementId($orderIncrementId); $payment = $this->objectManager->get(Payment::class); $payment->setMethod('checkmo'); $payment->setAdditionalInformation('last_trans_id', '11122'); @@ -66,15 +62,27 @@ public function testGetByPeriodWithParam( 'type' => 'free', 'fraudulent' => false ]); + + $timezoneLocal = $this->objectManager->get(TimezoneInterface::class)->getConfigTimezone(); $dateTime = new \DateTime('now', new \DateTimeZone($timezoneLocal)); if ($period === '1m') { $dateTime->modify('first day of this month')->format(DateTime::DATETIME_PHP_FORMAT); } elseif ($period === '1y') { + $monthlyDateTime = clone $dateTime; + $monthlyDateTime->modify('first day of this month')->format(DateTime::DATETIME_PHP_FORMAT); + $monthlyDateTime->setTimezone(new DateTimeZone('UTC')); + $monthlyOrder = $this->objectManager->get(Order::class); + $monthlyOrder->loadByIncrementId('100000004'); + $monthlyOrder->setCreatedAt($monthlyDateTime->format(DateTime::DATETIME_PHP_FORMAT)); + $monthlyOrder->setPayment($payment); + $monthlyOrder->save(); $dateTime->modify('first day of january this year')->format(DateTime::DATETIME_PHP_FORMAT); } elseif ($period === '2y') { $dateTime->modify('first day of january last year')->format(DateTime::DATETIME_PHP_FORMAT); } $dateTime->setTimezone(new DateTimeZone('UTC')); + $order = $this->objectManager->get(Order::class); + $order->loadByIncrementId($orderIncrementId); $order->setCreatedAt($dateTime->format(DateTime::DATETIME_PHP_FORMAT)); $order->setPayment($payment); $order->save(); From dd769504d2a56e510b1632e8f1a5f42c9571af52 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Thu, 10 Nov 2022 12:54:36 +0530 Subject: [PATCH 724/985] ACP2E-1294 : Dashboard First Shows Wrong Information about Revenue --- app/code/Magento/Backend/Block/Dashboard/Totals.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index 73e6bc1ab9e8a..28eabfbab546d 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -31,6 +31,11 @@ class Totals extends Bar */ protected $_moduleManager; + /** + * @var Period + */ + private $period; + /** * @param Context $context * @param CollectionFactory $collectionFactory @@ -41,9 +46,11 @@ public function __construct( Context $context, CollectionFactory $collectionFactory, Manager $moduleManager, + Period $period, array $data = [] ) { $this->_moduleManager = $moduleManager; + $this->period = $period; parent::__construct($context, $collectionFactory, $data); } @@ -63,7 +70,8 @@ protected function _prepareLayout() ) || $this->getRequest()->getParam( 'group' ); - $period = $this->getRequest()->getParam('period', Period::PERIOD_24_HOURS); + $firstPeriod = array_key_first($this->period->getDatePeriods()); + $period = $this->getRequest()->getParam('period', $firstPeriod); /* @var $collection Collection */ $collection = $this->_collectionFactory->create()->addCreateAtPeriodFilter( From db09b915cedd47fafaee3b1de19f538f4c35e841 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 16 Nov 2022 19:37:08 +0530 Subject: [PATCH 725/985] ACP2E-1294 : Test coverage added --- .../Backend/Block/Dashboard/TotalsTest.php | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php new file mode 100644 index 0000000000000..3259518d512ff --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php @@ -0,0 +1,113 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Backend\Model\Dashboard; + +use DOMDocument; +use DOMXPath; +use Magento\Backend\Block\Dashboard\Totals; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Checkout\Test\Fixture\PlaceOrder as PlaceOrderFixture; +use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; +use Magento\Checkout\Test\Fixture\SetDeliveryMethod as SetDeliveryMethodFixture; +use Magento\Checkout\Test\Fixture\SetGuestEmail as SetGuestEmailFixture; +use Magento\Checkout\Test\Fixture\SetPaymentMethod as SetPaymentMethodFixture; +use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; +use Magento\Framework\App\Area; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\View\LayoutInterface; +use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; +use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; +use Magento\Sales\Model\Order; +use Magento\Sales\Test\Fixture\Invoice as InvoiceFixture; +use Magento\Sales\Test\Fixture\Shipment as ShipmentFixture; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\AbstractBackendController; + +class TotalsTest extends AbstractBackendController +{ + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + $this->objectManager = Bootstrap::getObjectManager(); + $this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage(); + Bootstrap::getInstance()->loadArea(Area::AREA_ADMINHTML); + } + + #[ + DataFixture(ProductFixture::class, ['price' => 100], 'product'), + DataFixture(GuestCartFixture::class, as: 'cart'), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$product.id$']), + DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetGuestEmailFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetDeliveryMethodFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetPaymentMethodFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(PlaceOrderFixture::class, ['cart_id' => '$cart.id$'], 'order'), + DataFixture(InvoiceFixture::class, ['order_id' => '$order.id$']), + DataFixture(ShipmentFixture::class, ['order_id' => '$order.id$']), + DataFixture(GuestCartFixture::class, as: 'cart2'), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart2.id$', 'product_id' => '$product.id$']), + DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart2.id$']), + DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart2.id$']), + DataFixture(SetGuestEmailFixture::class, ['cart_id' => '$cart2.id$']), + DataFixture(SetDeliveryMethodFixture::class, ['cart_id' => '$cart2.id$']), + DataFixture(SetPaymentMethodFixture::class, ['cart_id' => '$cart2.id$']), + DataFixture(PlaceOrderFixture::class, ['cart_id' => '$cart2.id$'], 'order2'), + DataFixture(InvoiceFixture::class, ['order_id' => '$order2.id$']), + DataFixture(ShipmentFixture::class, ['order_id' => '$order2.id$']), + ] + public function testTotals(): void + { + $orderData = $this->fixtures->get('order'); + $order = $this->objectManager->get(Order::class); + $order->loadByIncrementId($orderData->getIncrementId()); + $dateTime = new \DateTime('now'); + $order->setCreatedAt($dateTime->modify('-23 hours')->format(DateTime::DATETIME_PHP_FORMAT)); + $order->save(); + $order2Data = $this->fixtures->get('order2'); + $order2 = $this->objectManager->get(Order::class); + $order2->loadByIncrementId($order2Data->getIncrementId()); + $dateTime2 = new \DateTime('now'); + $order2->setCreatedAt($dateTime2->modify('-1 hour')->format(DateTime::DATETIME_PHP_FORMAT)); + $order2->save(); + $layout = $this->objectManager->get(LayoutInterface::class); + $totalsDefaultBlock = $layout->createBlock(Totals::class); + $totalsDefaults = $totalsDefaultBlock->getTotals(); + $this->getRequest()->setMethod(HttpRequest::METHOD_POST); + $this->getRequest()->setParam('block', 'totals'); + $this->getRequest()->setParam('period', Period::PERIOD_24_HOURS); + $this->dispatch('backend/admin/dashboard/ajaxBlock/'); + $this->assertEquals(200, $this->getResponse()->getHttpResponseCode()); + $actualHtml = $this->getResponse()->getBody(); + $dom = new DOMDocument(); + $dom->loadHTML($actualHtml); + $totals24Hours = (new DOMXPath($dom))->query('//*[@id="dashboard_diagram_totals"]/ul/li[1]/strong/span[1]')->item(0)->textContent; + $totalDefaultRevenue = ltrim(strip_tags($totalsDefaults[0]['value']), '$'); + $total24HoursRevenue = ltrim(strip_tags($totals24Hours), '$'); + $this->assertEquals(100.00, $totalDefaultRevenue); + $this->assertEquals(200.00, $total24HoursRevenue); + } +} From 23180793a9afdd55c62ef719a1cc9b890066babd Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 16 Nov 2022 21:07:37 +0530 Subject: [PATCH 726/985] ACP2E-1294 : Fixed static test failures --- .../testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php index 3259518d512ff..76173d6912040 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php @@ -5,11 +5,10 @@ */ declare(strict_types=1); -namespace Magento\Backend\Model\Dashboard; +namespace Magento\Backend\Block\Dashboard; use DOMDocument; use DOMXPath; -use Magento\Backend\Block\Dashboard\Totals; use Magento\Catalog\Test\Fixture\Product as ProductFixture; use Magento\Checkout\Test\Fixture\PlaceOrder as PlaceOrderFixture; use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; @@ -32,6 +31,7 @@ use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractBackendController; +use Magento\Backend\Model\Dashboard\Period; class TotalsTest extends AbstractBackendController { From 817b686bf6a077fb45836681a1bb2bd2e7580609 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Fri, 18 Nov 2022 18:39:56 +0530 Subject: [PATCH 727/985] ACP2E-1294 : Fixed build check failures --- .../Backend/Block/Dashboard/Totals.php | 8 +++-- .../Backend/Block/Dashboard/TotalsTest.php | 31 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index 28eabfbab546d..4bdcd24d2b616 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -13,6 +13,7 @@ use Magento\Reports\Model\ResourceModel\Order\Collection; use Magento\Reports\Model\ResourceModel\Order\CollectionFactory; use Magento\Store\Model\Store; +use Magento\Framework\App\ObjectManager; /** * Adminhtml dashboard totals bar @@ -41,16 +42,17 @@ class Totals extends Bar * @param CollectionFactory $collectionFactory * @param Manager $moduleManager * @param array $data + * @param Period|null $period */ public function __construct( Context $context, CollectionFactory $collectionFactory, Manager $moduleManager, - Period $period, - array $data = [] + array $data = [], + ?Period $period = null ) { $this->_moduleManager = $moduleManager; - $this->period = $period; + $this->period = $period ?? ObjectManager::getInstance()->get(Period::class); parent::__construct($context, $collectionFactory, $data); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php index 76173d6912040..9a46a6cfc9b74 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php @@ -9,6 +9,7 @@ use DOMDocument; use DOMXPath; +use Magento\Backend\Model\Dashboard\Period; use Magento\Catalog\Test\Fixture\Product as ProductFixture; use Magento\Checkout\Test\Fixture\PlaceOrder as PlaceOrderFixture; use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; @@ -18,7 +19,6 @@ use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; use Magento\Framework\App\Area; use Magento\Framework\App\Request\Http as HttpRequest; -use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Stdlib\DateTime; use Magento\Framework\View\LayoutInterface; use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; @@ -31,7 +31,6 @@ use Magento\TestFramework\Fixture\DataFixtureStorageManager; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractBackendController; -use Magento\Backend\Model\Dashboard\Period; class TotalsTest extends AbstractBackendController { @@ -40,19 +39,13 @@ class TotalsTest extends AbstractBackendController */ private $fixtures; - /** - * @var ObjectManagerInterface - */ - private $objectManager; - /** * @inheritdoc */ protected function setUp(): void { parent::setUp(); - $this->objectManager = Bootstrap::getObjectManager(); - $this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage(); + $this->fixtures = $this->_objectManager->get(DataFixtureStorageManager::class)->getStorage(); Bootstrap::getInstance()->loadArea(Area::AREA_ADMINHTML); } @@ -82,18 +75,18 @@ protected function setUp(): void public function testTotals(): void { $orderData = $this->fixtures->get('order'); - $order = $this->objectManager->get(Order::class); + $order = $this->_objectManager->get(Order::class); $order->loadByIncrementId($orderData->getIncrementId()); $dateTime = new \DateTime('now'); $order->setCreatedAt($dateTime->modify('-23 hours')->format(DateTime::DATETIME_PHP_FORMAT)); $order->save(); $order2Data = $this->fixtures->get('order2'); - $order2 = $this->objectManager->get(Order::class); + $order2 = $this->_objectManager->get(Order::class); $order2->loadByIncrementId($order2Data->getIncrementId()); $dateTime2 = new \DateTime('now'); $order2->setCreatedAt($dateTime2->modify('-1 hour')->format(DateTime::DATETIME_PHP_FORMAT)); $order2->save(); - $layout = $this->objectManager->get(LayoutInterface::class); + $layout = $this->_objectManager->get(LayoutInterface::class); $totalsDefaultBlock = $layout->createBlock(Totals::class); $totalsDefaults = $totalsDefaultBlock->getTotals(); $this->getRequest()->setMethod(HttpRequest::METHOD_POST); @@ -104,10 +97,14 @@ public function testTotals(): void $actualHtml = $this->getResponse()->getBody(); $dom = new DOMDocument(); $dom->loadHTML($actualHtml); - $totals24Hours = (new DOMXPath($dom))->query('//*[@id="dashboard_diagram_totals"]/ul/li[1]/strong/span[1]')->item(0)->textContent; - $totalDefaultRevenue = ltrim(strip_tags($totalsDefaults[0]['value']), '$'); - $total24HoursRevenue = ltrim(strip_tags($totals24Hours), '$'); - $this->assertEquals(100.00, $totalDefaultRevenue); - $this->assertEquals(200.00, $total24HoursRevenue); + $xPath = '//*[@id="dashboard_diagram_totals"]/ul/li[1]/strong/span[1]'; + $totals24Hours = (new DOMXPath($dom))->query($xPath)->item(0)->textContent; + $this->assertEquals(100, $this->parseRevenue($totalsDefaults[0]['value'])); + $this->assertEquals(200, $this->parseRevenue($totals24Hours)); + } + + private function parseRevenue($txt): float + { + return (float)preg_replace("/[^0-9.]/", '', strip_tags($txt)); } } From 0d0663605dd21daf4023d60f746890f7efebd09e Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Thu, 24 Nov 2022 04:55:49 +0530 Subject: [PATCH 728/985] ACP2E-1294 : Fixed static test issues --- .../Backend/Block/Dashboard/TotalsTest.php | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php index 9a46a6cfc9b74..6018625b220aa 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php @@ -17,7 +17,6 @@ use Magento\Checkout\Test\Fixture\SetGuestEmail as SetGuestEmailFixture; use Magento\Checkout\Test\Fixture\SetPaymentMethod as SetPaymentMethodFixture; use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; -use Magento\Framework\App\Area; use Magento\Framework\App\Request\Http as HttpRequest; use Magento\Framework\Stdlib\DateTime; use Magento\Framework\View\LayoutInterface; @@ -29,7 +28,6 @@ use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DataFixtureStorage; use Magento\TestFramework\Fixture\DataFixtureStorageManager; -use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractBackendController; class TotalsTest extends AbstractBackendController @@ -46,9 +44,12 @@ protected function setUp(): void { parent::setUp(); $this->fixtures = $this->_objectManager->get(DataFixtureStorageManager::class)->getStorage(); - Bootstrap::getInstance()->loadArea(Area::AREA_ADMINHTML); } + /** + * @magentoAppArea adminhtml + */ + #[ DataFixture(ProductFixture::class, ['price' => 100], 'product'), DataFixture(GuestCartFixture::class, as: 'cart'), @@ -75,23 +76,22 @@ protected function setUp(): void public function testTotals(): void { $orderData = $this->fixtures->get('order'); - $order = $this->_objectManager->get(Order::class); - $order->loadByIncrementId($orderData->getIncrementId()); - $dateTime = new \DateTime('now'); - $order->setCreatedAt($dateTime->modify('-23 hours')->format(DateTime::DATETIME_PHP_FORMAT)); - $order->save(); + $this->updateOrderCreateDate($orderData->getIncrementId(), '-23 hours'); $order2Data = $this->fixtures->get('order2'); - $order2 = $this->_objectManager->get(Order::class); - $order2->loadByIncrementId($order2Data->getIncrementId()); - $dateTime2 = new \DateTime('now'); - $order2->setCreatedAt($dateTime2->modify('-1 hour')->format(DateTime::DATETIME_PHP_FORMAT)); - $order2->save(); + $this->updateOrderCreateDate($order2Data->getIncrementId(), '-1 hour'); $layout = $this->_objectManager->get(LayoutInterface::class); $totalsDefaultBlock = $layout->createBlock(Totals::class); $totalsDefaults = $totalsDefaultBlock->getTotals(); + $totals24Hours = $this->callAjaxBlock(); + $this->assertEquals(100, $this->parseRevenue($totalsDefaults[0]['value'])); + $this->assertEquals(200, $this->parseRevenue($totals24Hours)); + } + + private function callAjaxBlock() + { $this->getRequest()->setMethod(HttpRequest::METHOD_POST); $this->getRequest()->setParam('block', 'totals'); - $this->getRequest()->setParam('period', Period::PERIOD_24_HOURS); + $this->getRequest()->setParam('period', Period::PERIOD_TODAY); $this->dispatch('backend/admin/dashboard/ajaxBlock/'); $this->assertEquals(200, $this->getResponse()->getHttpResponseCode()); $actualHtml = $this->getResponse()->getBody(); @@ -99,12 +99,20 @@ public function testTotals(): void $dom->loadHTML($actualHtml); $xPath = '//*[@id="dashboard_diagram_totals"]/ul/li[1]/strong/span[1]'; $totals24Hours = (new DOMXPath($dom))->query($xPath)->item(0)->textContent; - $this->assertEquals(100, $this->parseRevenue($totalsDefaults[0]['value'])); - $this->assertEquals(200, $this->parseRevenue($totals24Hours)); + return $totals24Hours; } private function parseRevenue($txt): float { return (float)preg_replace("/[^0-9.]/", '', strip_tags($txt)); } + + private function updateOrderCreateDate($orderIncrementId, $modify) + { + $order2 = $this->_objectManager->get(Order::class); + $order2->loadByIncrementId($orderIncrementId); + $dateTime2 = new \DateTime('now'); + $order2->setCreatedAt($dateTime2->modify($modify)->format(DateTime::DATETIME_PHP_FORMAT)); + $order2->save(); + } } From 7c72a8e88dfa59534fa8d807ee67333186bb8f5a Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 6 Dec 2022 18:55:48 +0530 Subject: [PATCH 729/985] ACP2E-1294 : Created test in MFTF --- .../Test/AdminDashboardTotalsBlockTest.xml | 42 +++++++ .../Backend/Block/Dashboard/TotalsTest.php | 118 ------------------ 2 files changed, 42 insertions(+), 118 deletions(-) create mode 100644 app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardTotalsBlockTest.xml delete mode 100644 dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardTotalsBlockTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardTotalsBlockTest.xml new file mode 100644 index 0000000000000..9407e6f9fefde --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardTotalsBlockTest.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminDashboardTotalsBlockTest" extends="AdminCheckDashboardWithChartsTest"> + <annotations> + <features value="Backend"/> + <stories value="Order Totals on Magento dashboard"/> + <title value="Dashboard First Shows Wrong Information about Revenue"/> + <description value="Revenue on Magento dashboard page is displaying properly"/> + <severity value="AVERAGE"/> + <testCaseId value="ACP2E-1294"/> + <useCaseId value="ACSD-46523"/> + <group value="backend"/> + </annotations> + <remove keyForRemoval="checkQuantityWasChanged"/> + <waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="waitForRevenueAfter"/> + <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="grabRevenueAfter"/> + <selectOption userInput="1m" selector="select#dashboard_chart_period" stepKey="selectOneMonthPeriod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <selectOption userInput="today" selector="select#dashboard_chart_period" stepKey="selectTodayPeriod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearAfterSelectTodayPeriod"/> + <waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="waitForRevenueAfterSelectTodayPeriod"/> + <waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="waitForQuantityAfterSelectTodayPeriod"/> + <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Revenue')}}" stepKey="grabRevenueAfterSelectTodayPeriod"/> + <grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityAfterSelectTodayPeriod"/> + <assertEquals stepKey="checkTodayRevenue"> + <actualResult type="const">$grabRevenueAfter</actualResult> + <expectedResult type="const">$grabRevenueAfterSelectTodayPeriod</expectedResult> + </assertEquals> + <assertEquals stepKey="checkTodayQuantity"> + <actualResult type="const">$grabQuantityAfter</actualResult> + <expectedResult type="const">$grabQuantityAfterSelectTodayPeriod</expectedResult> + </assertEquals> + </test> +</tests> diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php deleted file mode 100644 index 6018625b220aa..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/TotalsTest.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Backend\Block\Dashboard; - -use DOMDocument; -use DOMXPath; -use Magento\Backend\Model\Dashboard\Period; -use Magento\Catalog\Test\Fixture\Product as ProductFixture; -use Magento\Checkout\Test\Fixture\PlaceOrder as PlaceOrderFixture; -use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; -use Magento\Checkout\Test\Fixture\SetDeliveryMethod as SetDeliveryMethodFixture; -use Magento\Checkout\Test\Fixture\SetGuestEmail as SetGuestEmailFixture; -use Magento\Checkout\Test\Fixture\SetPaymentMethod as SetPaymentMethodFixture; -use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; -use Magento\Framework\App\Request\Http as HttpRequest; -use Magento\Framework\Stdlib\DateTime; -use Magento\Framework\View\LayoutInterface; -use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; -use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; -use Magento\Sales\Model\Order; -use Magento\Sales\Test\Fixture\Invoice as InvoiceFixture; -use Magento\Sales\Test\Fixture\Shipment as ShipmentFixture; -use Magento\TestFramework\Fixture\DataFixture; -use Magento\TestFramework\Fixture\DataFixtureStorage; -use Magento\TestFramework\Fixture\DataFixtureStorageManager; -use Magento\TestFramework\TestCase\AbstractBackendController; - -class TotalsTest extends AbstractBackendController -{ - /** - * @var DataFixtureStorage - */ - private $fixtures; - - /** - * @inheritdoc - */ - protected function setUp(): void - { - parent::setUp(); - $this->fixtures = $this->_objectManager->get(DataFixtureStorageManager::class)->getStorage(); - } - - /** - * @magentoAppArea adminhtml - */ - - #[ - DataFixture(ProductFixture::class, ['price' => 100], 'product'), - DataFixture(GuestCartFixture::class, as: 'cart'), - DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$product.id$']), - DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(SetGuestEmailFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(SetDeliveryMethodFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(SetPaymentMethodFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(PlaceOrderFixture::class, ['cart_id' => '$cart.id$'], 'order'), - DataFixture(InvoiceFixture::class, ['order_id' => '$order.id$']), - DataFixture(ShipmentFixture::class, ['order_id' => '$order.id$']), - DataFixture(GuestCartFixture::class, as: 'cart2'), - DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart2.id$', 'product_id' => '$product.id$']), - DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart2.id$']), - DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart2.id$']), - DataFixture(SetGuestEmailFixture::class, ['cart_id' => '$cart2.id$']), - DataFixture(SetDeliveryMethodFixture::class, ['cart_id' => '$cart2.id$']), - DataFixture(SetPaymentMethodFixture::class, ['cart_id' => '$cart2.id$']), - DataFixture(PlaceOrderFixture::class, ['cart_id' => '$cart2.id$'], 'order2'), - DataFixture(InvoiceFixture::class, ['order_id' => '$order2.id$']), - DataFixture(ShipmentFixture::class, ['order_id' => '$order2.id$']), - ] - public function testTotals(): void - { - $orderData = $this->fixtures->get('order'); - $this->updateOrderCreateDate($orderData->getIncrementId(), '-23 hours'); - $order2Data = $this->fixtures->get('order2'); - $this->updateOrderCreateDate($order2Data->getIncrementId(), '-1 hour'); - $layout = $this->_objectManager->get(LayoutInterface::class); - $totalsDefaultBlock = $layout->createBlock(Totals::class); - $totalsDefaults = $totalsDefaultBlock->getTotals(); - $totals24Hours = $this->callAjaxBlock(); - $this->assertEquals(100, $this->parseRevenue($totalsDefaults[0]['value'])); - $this->assertEquals(200, $this->parseRevenue($totals24Hours)); - } - - private function callAjaxBlock() - { - $this->getRequest()->setMethod(HttpRequest::METHOD_POST); - $this->getRequest()->setParam('block', 'totals'); - $this->getRequest()->setParam('period', Period::PERIOD_TODAY); - $this->dispatch('backend/admin/dashboard/ajaxBlock/'); - $this->assertEquals(200, $this->getResponse()->getHttpResponseCode()); - $actualHtml = $this->getResponse()->getBody(); - $dom = new DOMDocument(); - $dom->loadHTML($actualHtml); - $xPath = '//*[@id="dashboard_diagram_totals"]/ul/li[1]/strong/span[1]'; - $totals24Hours = (new DOMXPath($dom))->query($xPath)->item(0)->textContent; - return $totals24Hours; - } - - private function parseRevenue($txt): float - { - return (float)preg_replace("/[^0-9.]/", '', strip_tags($txt)); - } - - private function updateOrderCreateDate($orderIncrementId, $modify) - { - $order2 = $this->_objectManager->get(Order::class); - $order2->loadByIncrementId($orderIncrementId); - $dateTime2 = new \DateTime('now'); - $order2->setCreatedAt($dateTime2->modify($modify)->format(DateTime::DATETIME_PHP_FORMAT)); - $order2->save(); - } -} From 1c7593d87059b952fc7e20682b9c488e7b0cbd35 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Fri, 6 Jan 2023 13:15:47 +0530 Subject: [PATCH 730/985] ACP2E-1300: Cart Price Rule Discard Subsequent Rules Not Working As Intended --- .../SalesRule/Model/Quote/Discount.php | 72 +++- .../Model/Rule/Condition/Product/Found.php | 15 +- .../Test/Unit/Model/Quote/DiscountTest.php | 171 ++++++++- .../Rule/Condition/Product/FoundTest.php | 76 ++++ .../SalesRule/Model/Quote/DiscountTest.php | 357 ++++++++++++++++++ 5 files changed, 668 insertions(+), 23 deletions(-) create mode 100644 app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 19e9bdf377bf9..0e6618d05b5b8 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -20,11 +20,11 @@ use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory; use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Data\RuleDiscount; -use Magento\SalesRule\Model\Discount\PostProcessorFactory; use Magento\SalesRule\Model\Rule; +use Magento\SalesRule\Model\Rule\Condition\Product\Found; +use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; -use Magento\SalesRule\Model\RulesApplier; /** * Discount totals calculation model. @@ -34,6 +34,8 @@ class Discount extends AbstractTotal { public const COLLECTOR_TYPE_CODE = 'discount'; + public const RULE_ACTION_CONDITION_TAB = 'getActions'; + public const RULE_CONDITION_TAB = 'getConditions'; /** * Discount calculation object @@ -178,8 +180,43 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); + + $itemWithDiscount = []; + $isDiscardRulePresent = $anyConditionInDiscard = $activateDiscardRule = false; + $isProductObject = true; + + /** @var Rule $rule */ + foreach ($rules as $rule) { + if ($rule->getStopRulesProcessing()) { + $isDiscardRulePresent = true; + $anyConditionInDiscard = true; + break; + } + } + /** @var Rule $rule */ foreach ($rules as $rule) { + $discardConditionMethod = self::RULE_ACTION_CONDITION_TAB; + if ($isDiscardRulePresent) { + if (($rule->getActions() == null || empty($rule->getActions()->getConditions())) + || ($rule->getConditions() == null || empty($rule->getConditions()->getConditions()))) { + $anyConditionInDiscard = false; + } + if ($rule->getConditions() !== null && !empty($rule->getConditions()->getConditions())) { + foreach ($rule->getConditions()->getConditions() as $class) { + if ($class->getType() === Found::class) { + $discardConditionMethod = self::RULE_CONDITION_TAB; + $anyConditionInDiscard = true; + } else { + $isProductObject = false; + } + break; + } + } + if ($rule->getActions() != null && !empty($rule->getActions()->getConditions())) { + $anyConditionInDiscard = true; + } + } /** @var Item $item */ foreach ($items as $item) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { @@ -188,13 +225,38 @@ public function collect( if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } + if ($activateDiscardRule && isset($itemWithDiscount[$item->getProduct()->getId()])) { + continue; + } + if ($isDiscardRulePresent && $anyConditionInDiscard) { + if ($discardConditionMethod == self::RULE_ACTION_CONDITION_TAB) { + $itemToValidate = $item; + } else { + $itemToValidate = clone $item; + } + if ($rule->$discardConditionMethod()->validate($itemToValidate)) { + $itemWithDiscount[$item->getProduct()->getId()] = $item->getProduct()->getId(); + } elseif (!isset($itemWithDiscount[$item->getProduct()->getId()])) { + continue; + } elseif (!$activateDiscardRule && isset($itemWithDiscount[$item->getProduct()->getId()])) { + continue; + } + } + if ($isDiscardRulePresent && $discardConditionMethod == self::RULE_ACTION_CONDITION_TAB) { + $this->calculator->setSkipActionsValidation(true); + } elseif ($isDiscardRulePresent) { + $this->calculator->setSkipActionsValidation(false); + } $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); } - $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; - if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { - break; + if ($rule->getStopRulesProcessing()) { + //PAT condition + if (!$isProductObject) { + break; + } + $activateDiscardRule = true; } $this->calculator->initTotals($items, $address); } diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php index a807bca77cc60..567fdc3a90329 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php @@ -7,6 +7,8 @@ class Found extends \Magento\SalesRule\Model\Rule\Condition\Product\Combine { + public const EVENT_PREFIX_SALES_QUOTE_ITEM = 'sales_quote_item'; + /** * @param \Magento\Rule\Model\Condition\Context $context * @param \Magento\SalesRule\Model\Rule\Condition\Product $ruleConditionProduct @@ -60,14 +62,19 @@ public function asHtml() public function validate(\Magento\Framework\Model\AbstractModel $model) { $isValid = false; - - foreach ($model->getAllItems() as $item) { + if ($model->getEventPrefix() === self::EVENT_PREFIX_SALES_QUOTE_ITEM) { + $item = $model->load($model->getId()); if (parent::validate($item)) { $isValid = true; - break; + } + } else { + foreach ($model->getAllItems() as $item) { + if (parent::validate($item)) { + $isValid = true; + break; + } } } - return $isValid; } } diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php index 5a7d6142a6d43..e8490cf26e9d7 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php @@ -7,6 +7,7 @@ namespace Magento\SalesRule\Test\Unit\Model\Quote; +use Magento\Catalog\Model\Product as CatalogProduct; use Magento\Framework\Api\ExtensionAttributesInterface; use Magento\Framework\Event\Manager; use Magento\Framework\Event\ManagerInterface; @@ -17,15 +18,17 @@ use Magento\Quote\Model\Quote\Address; use Magento\Quote\Model\Quote\Address\Total; use Magento\Quote\Model\Quote\Item; +use Magento\Rule\Model\ConditionFactory; use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory; use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Quote\Discount; +use Magento\SalesRule\Model\Rule; use Magento\SalesRule\Model\Rule\Action\Discount\Data; use Magento\SalesRule\Model\Rule\Action\Discount\DataFactory; +use Magento\SalesRule\Model\Rule\Condition\Product; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\Store; -use Magento\SalesRule\Model\Rule; use Magento\Store\Model\StoreManagerInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -90,6 +93,11 @@ class DiscountTest extends TestCase */ private $rulesApplierMock; + /** + * @var ConditionFactory|MockObject + */ + protected $condition; + protected function setUp(): void { $this->storeManagerMock = $this->getMockForAbstractClass(StoreManagerInterface::class); @@ -118,9 +126,10 @@ protected function setUp(): void $this->rule = $this->getMockBuilder(Rule::class) ->disableOriginalConstructor() ->addMethods( - [ - 'getSimpleAction' - ] + ['getSimpleAction','getStopRulesProcessing'] + ) + ->onlyMethods( + ['getConditions', 'getActions'] ) ->getMock(); $this->eventManagerMock = $this->createMock(Manager::class); @@ -132,7 +141,6 @@ function ($argument) { return round((float) $argument, 2); } ); - $this->addressMock = $this->getMockBuilder(Address::class) ->addMethods(['getShippingAmount']) ->onlyMethods(['getQuote', 'getAllItems', 'getExtensionAttributes', 'getCustomAttributesCodes']) @@ -142,16 +150,12 @@ function ($argument) { ExtensionAttributesInterface::class )->addMethods(['setDiscounts', 'getDiscounts'])->getMockForAbstractClass(); $addressExtension->method('getDiscounts')->willReturn([]); - $addressExtension->expects($this->any()) - ->method('setDiscounts') + $addressExtension->expects($this->any())->method('setDiscounts') ->willReturn([]); $this->addressMock->expects( $this->any() )->method('getExtensionAttributes')->willReturn($addressExtension); - $this->addressMock->expects($this->any()) - ->method('getCustomAttributesCodes') - ->willReturn([]); - + $this->addressMock->expects($this->any())->method('getCustomAttributesCodes')->willReturn([]); $shipping = $this->getMockForAbstractClass(ShippingInterface::class); $shipping->expects($this->any())->method('getAddress')->willReturn($this->addressMock); $this->shippingAssignmentMock = $this->getMockForAbstractClass(ShippingAssignmentInterface::class); @@ -160,7 +164,6 @@ function ($argument) { DataFactory::class, ['create'] ); - /** @var Discount $discount */ $this->discount = new Discount( $this->eventManagerMock, @@ -171,12 +174,13 @@ function ($argument) { $this->discountDataInterfaceFactoryMock, $this->rulesApplierMock ); - $discountData = $this->getMockBuilder(Data::class) - ->getMock(); + $discountData = $this->getMockBuilder(Data::class)->getMock(); $this->discountFactory->expects($this->any()) ->method('create') ->with($this->anything()) ->willReturn($discountData); + $this->condition = $this->getMockBuilder(ConditionFactory::class)->disableOriginalConstructor() + ->addMethods(['getConditions','validate'])->getMock(); } public function testCollectItemNoDiscount() @@ -361,4 +365,143 @@ public function testFetch() $totalMock->expects($this->once())->method('getDiscountDescription')->willReturn($discountDescription); $this->assertEquals($expectedResult, $this->discount->fetch($quoteMock, $totalMock)); } + + /** + * @return void + */ + public function testDiscardSubsequentRuleForConditionsTab(): void + { + $itemWithChildren = $this->getMockBuilder(Item::class) + ->disableOriginalConstructor() + ->disableOriginalClone() + ->onlyMethods( + [ + 'getParentItem', + 'isChildrenCalculated', + 'getChildren', + 'getExtensionAttributes', + 'getId', + 'getProduct' + ] + )->addMethods( + [ + 'getNoDiscount', + 'getHasChildren', + 'setProductId' + ] + ) + ->getMock(); + $this->rule->expects($this->any())->method('getConditions')->willReturn($this->condition); + $this->rule->expects($this->any())->method('getSimpleAction')->willReturn(null); + $this->rule->expects($this->any())->method('getStopRulesProcessing')->willReturn(1); + $productClass = $this->getMockBuilder(Product::class)->disableOriginalConstructor()->addMethods(['getType']) + ->getMock(); + $this->condition->expects($this->any())->method('getConditions') + ->willReturn([$productClass]); + $productClass->expects($this->any())->method('getType') + ->willReturn(Product\Found::class); + $itemWithChildren->expects($this->once())->method('getNoDiscount')->willReturn(false); + $itemWithChildren->expects($this->any())->method('getParentItem')->willReturn(false); + $itemProductClass = $this->getMockBuilder(CatalogProduct::class) + ->disableOriginalConstructor()->onlyMethods( + [ + 'getId', + 'getEntityId' + ] + )->getMock(); + $itemProductClass->expects($this->any())->method('getId')->willReturn(2); + $itemWithChildren->expects($this->any())->method('getProduct')->willReturn($itemProductClass); + $this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true); + $this->validatorMock->expects($this->once())->method('sortItemsByPriority') + ->with([$itemWithChildren], $this->addressMock)->willReturnArgument(0); + $this->validatorMock->expects($this->once())->method('getRules')->with($this->addressMock) + ->willReturn([$this->rule]); + $this->condition->expects($this->once())->method('validate')->with($itemWithChildren)->willReturn(1); + $storeMock = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->setMethods(['getStore']) + ->getMock(); + $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock); + $quoteMock = $this->getMockBuilder(Quote::class) + ->onlyMethods(['getAllAddresses', 'getStoreId']) + ->disableOriginalConstructor() + ->getMock(); + $quoteMock->expects($this->any())->method('getAllAddresses')->willReturn([$this->addressMock]); + $this->addressMock->expects($this->any())->method('getAllItems')->willReturn([$itemWithChildren]); + $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); + $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true); + $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]); + $totalMock = $this->createMock(Total::class); + $this->assertInstanceOf( + Discount::class, + $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock) + ); + } + + /** + * @return void + */ + public function testDiscardSubsequentRuleForActionsTab(): void + { + $itemWithChildren = $this->getMockBuilder(Item::class) + ->disableOriginalConstructor() + ->onlyMethods( + [ + 'getParentItem', + 'isChildrenCalculated', + 'getChildren', + 'getExtensionAttributes', + 'getId', + 'getProduct' + ] + )->addMethods( + [ + 'getNoDiscount', + 'getHasChildren', + 'setProductId' + ] + ) + ->getMock(); + $this->rule->expects($this->any())->method('getConditions')->willReturn(null); + $this->rule->expects($this->any())->method('getSimpleAction')->willReturn(null); + $this->rule->expects($this->any())->method('getStopRulesProcessing')->willReturn(1); + $this->rule->expects($this->any())->method('getActions')->willReturn($this->condition); + $itemWithChildren->expects($this->once())->method('getNoDiscount')->willReturn(false); + $itemWithChildren->expects($this->any())->method('getParentItem')->willReturn(false); + $itemProductClass = $this->getMockBuilder(CatalogProduct::class) + ->disableOriginalConstructor()->onlyMethods( + [ + 'getId', + 'getEntityId' + ] + )->getMock(); + $itemProductClass->expects($this->any())->method('getId')->willReturn(2); + $itemWithChildren->expects($this->any())->method('getProduct')->willReturn($itemProductClass); + $this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true); + $this->validatorMock->expects($this->once())->method('sortItemsByPriority') + ->with([$itemWithChildren], $this->addressMock)->willReturnArgument(0); + $this->validatorMock->expects($this->once())->method('getRules')->with($this->addressMock) + ->willReturn([$this->rule]); + $this->condition->expects($this->any())->method('getConditions')->willReturnSelf(); + $this->condition->expects($this->once())->method('validate')->with($itemWithChildren)->willReturn(1); + $storeMock = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->setMethods(['getStore']) + ->getMock(); + $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock); + $quoteMock = $this->getMockBuilder(Quote::class) + ->onlyMethods(['getAllAddresses', 'getStoreId']) + ->disableOriginalConstructor() + ->getMock(); + $quoteMock->expects($this->any())->method('getAllAddresses')->willReturn([$this->addressMock]); + $this->addressMock->expects($this->any())->method('getAllItems')->willReturn([$itemWithChildren]); + $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); + $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true); + $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]); + $totalMock = $this->createMock(Total::class); + $this->assertInstanceOf( + Discount::class, + $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock) + ); + } } diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php new file mode 100644 index 0000000000000..97be20a2d94fd --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php @@ -0,0 +1,76 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\SalesRule\Test\Unit\Model\Rule\Condition\Product; + +use Magento\Framework\Model\AbstractModel; +use Magento\Quote\Model\Quote\Address; +use Magento\Quote\Model\Quote\Item; +use Magento\Rule\Model\Condition\Context; +use Magento\SalesRule\Model\Rule\Condition\Product as SalesRuleProduct; +use Magento\SalesRule\Model\Rule\Condition\Product\Found; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class FoundTest extends TestCase +{ + /** + * @var Found + */ + private $model; + + /** + * @var SalesRuleProduct|MockObject + */ + private $ruleConditionMock; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $contextMock = $this->getMockBuilder(Context::class) + ->disableOriginalConstructor() + ->getMock(); + $this->ruleConditionMock = $this->getMockBuilder(SalesRuleProduct::class) + ->setMethods(['loadAttributeOptions', 'getAttributeOption']) + ->disableOriginalConstructor() + ->getMock(); + $this->model = new Found( + $contextMock, + $this->ruleConditionMock, + [] + ); + } + + /** + * @return void + */ + public function testValidate() + { + $itemMock = $this->createMock(Item::class); + $modelMock = $this->getMockBuilder(AbstractModel::class) + ->addMethods(['getProductId', 'setQty', 'setNote']) + ->onlyMethods(['getId', 'getEntityId', 'save', 'delete', 'isDeleted']) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + $itemMock->expects($this->any()) + ->method('getEventPrefix') + ->willReturn('sales_quote_item'); + $itemMock->expects($this->exactly(1))->method('load')->willReturn($modelMock); + $result = $this->model->validate($itemMock); + $this->assertTrue($result); + + $addressMock = $this->createMock(Address::class); + $addressMock->expects($this->any()) + ->method('getEventPrefix') + ->willReturn('sales_quote_address'); + $addressMock->expects($this->exactly(1))->method('getAllItems')->willReturn([]); + $result = $this->model->validate($addressMock); + $this->assertFalse($result); + } +} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index 3551408dbe2f1..e3b11efda2fb4 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -7,20 +7,46 @@ namespace Magento\SalesRule\Model\Quote; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Test\Fixture\Category as CategoryFixture; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Model\Address; +use Magento\Customer\Model\Customer; +use Magento\Customer\Model\Group; use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\ObjectManagerInterface; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\Address\Total; +use Magento\Quote\Model\Quote\Address\Total\Subtotal; use Magento\Quote\Model\Quote\Item; +use Magento\Quote\Model\Shipping; +use Magento\Quote\Model\ShippingAssignment; +use Magento\SalesRule\Model\Rule; +use Magento\SalesRule\Model\Rule\Condition\Combine as CombineCondition; +use Magento\SalesRule\Model\Rule\Condition\Product as ProductCondition; use Magento\SalesRule\Test\Fixture\ProductCondition as ProductConditionFixture; +use Magento\SalesRule\Test\Fixture\ProductFoundInCartConditions as ProductFoundInCartConditionsFixture; use Magento\SalesRule\Test\Fixture\Rule as RuleFixture; +use Magento\Tax\Model\ClassModel; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Fixture\DbIsolation; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; /** * Test discount totals calculation model + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class DiscountTest extends TestCase { @@ -37,6 +63,66 @@ class DiscountTest extends TestCase */ private $quoteRepository; + /** + * @var DataFixtureStorage + */ + private $fixtures; + + /** + * @var ProductRepositoryInterface + */ + private $productRepository; + + /** + * @var AddressRepositoryInterface + */ + private $addressRepository; + + /** + * @var ClassModel + */ + private $classModel; + + /** + * @var Address + */ + private $customerAddress; + + /** + * @var Discount + */ + private $discountCollector; + + /** + * @var Subtotal + */ + private $subtotalCollector; + + /** + * @var Customer + */ + private $customer; + + /** + * @var ShippingAssignment + */ + private $shippingAssignment; + + /** + * @var Shipping + */ + private $shipping; + + /** + * @var Quote + */ + private $quote; + + /** + * @var Quote\Address + */ + private $quoteShippingAddress; + /** * @inheritDoc */ @@ -46,6 +132,18 @@ protected function setUp(): void $this->objectManager = Bootstrap::getObjectManager(); $this->criteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class); $this->quoteRepository = $this->objectManager->get(CartRepositoryInterface::class); + $this->fixtures = DataFixtureStorageManager::getStorage(); + $this->productRepository = $this->objectManager->create(ProductRepositoryInterface::class); + $this->addressRepository = $this->objectManager->get(AddressRepositoryInterface::class); + $this->classModel = $this->objectManager->create(ClassModel::class); + $this->customerAddress = $this->objectManager->create(Address::class); + $this->discountCollector = $this->objectManager->create(Discount::class); + $this->subtotalCollector = $this->objectManager->create(Subtotal::class); + $this->customer = $this->objectManager->create(Customer::class); + $this->shippingAssignment = $this->objectManager->create(ShippingAssignment::class); + $this->shipping = $this->objectManager->create(Shipping::class); + $this->quote = $this->objectManager->create(Quote::class); + $this->quoteShippingAddress = $this->objectManager->create(Quote\Address::class); } /** @@ -164,4 +262,263 @@ private function getQuote(string $reservedOrderId): Quote ->getItems(); return array_shift($carts); } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoDataFixture Magento/Customer/_files/customer_group.php + * @return void + */ + #[ + DbIsolation(false), + DataFixture(CategoryFixture::class, as: 'c1'), + DataFixture(CategoryFixture::class, as: 'c2'), + DataFixture(CategoryFixture::class, as: 'c3'), + DataFixture(ProductFixture::class, [ + 'price' => 40, + 'sku' => 'p1', + 'category_ids' => ['$c1.id$'] + ], 'p1'), + DataFixture(ProductFixture::class, [ + 'price' => 30, + 'sku' => 'p2', + 'category_ids' => ['$c1.id$', '$c2.id$'] + ], 'p2'), + DataFixture(ProductFixture::class, [ + 'price' => 20, + 'sku' => 'p3', + 'category_ids' => ['$c2.id$', '$c3.id$'] + ], 'p3'), + DataFixture(ProductFixture::class, [ + 'price' => 10, + 'sku' => 'p4', + 'category_ids' => ['$c3.id$'] + ], 'p4'), + + DataFixture( + ProductFoundInCartConditionsFixture::class, + [ + 'attribute' => 'category_ids', + 'value' => '$c1.id$', + 'operator' => '==', + 'conditions' => [ + '1' => [ + 'type' => CombineCondition::class, + 'aggregator' => 'all', + 'value' => '1', + 'new_child' => '', + ], + '1--1' => [ + 'type' => ProductCondition::class, + 'attribute' => 'category_ids', + 'operator' => '==', + 'value' => '$c1.id$', + ] + ], + ], + 'cond1' + ), + DataFixture( + ProductFoundInCartConditionsFixture::class, + [ + 'attribute' => 'category_ids', + 'value' => '$c2.id$', + 'operator' => '==', + 'conditions' => [ + '1' => [ + 'type' => CombineCondition::class, + 'aggregator' => 'all', + 'value' => '1', + 'new_child' => '', + ], + '1--1' => [ + 'type' => ProductCondition::class, + 'attribute' => 'category_ids', + 'operator' => '==', + 'value' => '$c2.id$', + ] + ], + ], + 'cond2' + ), + DataFixture( + ProductFoundInCartConditionsFixture::class, + [ + 'attribute' => 'category_ids', + 'value' => '$c3.id$', + 'operator' => '==', + 'conditions' => [ + '1' => [ + 'type' => CombineCondition::class, + 'aggregator' => 'all', + 'value' => '1', + 'new_child' => '', + ], + '1--1' => [ + 'type' => ProductCondition::class, + 'attribute' => 'category_ids', + 'operator' => '==', + 'value' => '$c3.id$', + ] + ], + ], + 'cond3' + ), + DataFixture( + RuleFixture::class, + [ + 'stop_rules_processing'=> 0, + 'coupon_code' => 'test', + 'discount_amount' => 10, + 'conditions' => ['$cond1$'], + 'simple_action' => Rule::BY_FIXED_ACTION, + 'sort_order' => 0 + ], + 'rule1' + ), + DataFixture( + RuleFixture::class, + [ + 'discount_amount' => 5, + 'conditions' => ['$cond2$'], + 'simple_action' => Rule::BY_FIXED_ACTION, + 'sort_order' => 1 + ], + 'rule2' + ), + DataFixture( + RuleFixture::class, + [ + 'stop_rules_processing'=> 0, + 'discount_amount' => 2, + 'conditions' => ['$cond3$'], + 'simple_action' => Rule::BY_FIXED_ACTION, + 'sort_order' => 2 + ], + 'rule3' + ), + ] + public function testDiscountOnSimpleProductWithDiscardSubsequentRule(): void + { + $this->quote([ + [ + 'product'=> $this->fixtures->get('p1'), + 'qty'=>1 + ], + [ + 'product'=> $this->fixtures->get('p2'), + 'qty'=>1 + ], + [ + 'product'=> $this->fixtures->get('p3'), + 'qty'=>1 + ], + [ + 'product'=> $this->fixtures->get('p4'), + 'qty'=>1 + ] + ]); + } + + /** + * Create quote and assert totals values + * + * @param array $quoteItems + * @return void + * @throws LocalizedException + * @throws NoSuchEntityException + */ + private function quote(array $quoteItems): void + { + $customerTaxClassId = $this->getCustomerTaxClassId(); + $fixtureCustomerId = 1; + /** @var Customer $customer */ + $customer = $this->customer->load($fixtureCustomerId); + /** @var Group $customerGroup */ + $customerGroup = $this->objectManager->create(Group::class)->load('custom_group', 'customer_group_code'); + $customerGroup->setTaxClassId($customerTaxClassId)->save(); + $customer->setGroupId($customerGroup->getId())->save(); + $productTaxClassId = $this->getProductTaxClassId(); + $quoteShippingAddressDataObject = $this->getShippingAddressDataObject($fixtureCustomerId); + $this->quoteShippingAddress->importCustomerAddressData($quoteShippingAddressDataObject); + $this->quote->setStoreId(1)->setIsActive(true)->setIsMultiShipping(0) + ->assignCustomerWithAddressChange($this->getCustomerById($customer->getId())) + ->setShippingAddress($this->quoteShippingAddress)->setBillingAddress($this->quoteShippingAddress) + ->setCheckoutMethod($customer->getMode())->setPasswordHash($customer->encryptPassword( + $customer->getPassword() + ))->setCouponCode('test'); + + foreach ($quoteItems as $quoteItem) { + $product = $quoteItem['product'] ?? null; + if ($product === null) { + /** @var Product $product */ + $product = $this->productRepository->get($quoteItem['sku'] ?? 'simple'); + $product->setTaxClassId($productTaxClassId)->save(); + } + $this->quote->addProduct($product, $quoteItem['qty']); + } + + $address = $this->quote->getShippingAddress(); + $this->shipping->setAddress($address); + $this->shippingAssignment->setShipping($this->shipping); + $this->shippingAssignment->setItems($address->getAllItems()); + /** @var Total $total */ + $total = $this->objectManager->create(Total::class); + $this->subtotalCollector->collect($this->quote, $this->shippingAssignment, $total); + $this->discountCollector->collect($this->quote, $this->shippingAssignment, $total); + $this->assertEquals(-32, $total->getDiscountAmount()); + } + + /** + * Get customer tax class id + * + * @return int + */ + protected function getCustomerTaxClassId() + { + //customerTaxClass + $this->classModel->load('CustomerTaxClass2', 'class_name'); + return $this->classModel->getId(); + } + + /** + * Get product tax class id + * + * @return int + */ + protected function getProductTaxClassId() + { + //productTaxClass + $this->classModel->load('ProductTaxClass1', 'class_name'); + return $this->classModel->getId(); + } + + /** + * @param $fixtureCustomerId + * @return AddressInterface + * @throws LocalizedException + */ + protected function getShippingAddressDataObject($fixtureCustomerId) + { + $fixtureCustomerAddressId = 1; + $this->customerAddress->load($fixtureCustomerId); + /** Set data which corresponds tax class fixture */ + $this->customerAddress->setCountryId('US')->setRegionId(12)->save(); + return $this->addressRepository->getById($fixtureCustomerAddressId); + } + + /** + * @param $id + * @return CustomerInterface + * @throws LocalizedException + * @throws NoSuchEntityException + */ + protected function getCustomerById($id) + { + /** + * @var $customerRepository CustomerRepositoryInterface + */ + $customerRepository = $this->objectManager->create(CustomerRepositoryInterface::class); + return $customerRepository->getById($id); + } } From 99cadc741a2a80f8dbd1bba4c2b1b102f6c5f5a9 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Fri, 6 Jan 2023 15:03:54 +0530 Subject: [PATCH 731/985] ACP2E-1300: static test fix --- .../Test/Unit/Model/Rule/Condition/Product/FoundTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php index 97be20a2d94fd..c0024dbd632b4 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php @@ -73,4 +73,4 @@ public function testValidate() $result = $this->model->validate($addressMock); $this->assertFalse($result); } -} \ No newline at end of file +} From 60dec353f233b23cf2a7f351b5a7964debe5abc0 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Wed, 11 Jan 2023 11:31:38 +0530 Subject: [PATCH 732/985] ACP2E-1300: DbIsolation fix --- .../SalesRule/Model/Quote/DiscountTest.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index e3b11efda2fb4..bff520449f9ca 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -264,13 +264,15 @@ private function getQuote(string $reservedOrderId): Quote } /** + * * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Customer/_files/customer_address.php * @magentoDataFixture Magento/Customer/_files/customer_group.php - * @return void + * @throws LocalizedException + * @throws NoSuchEntityException */ #[ - DbIsolation(false), + DbIsolation(true), DataFixture(CategoryFixture::class, as: 'c1'), DataFixture(CategoryFixture::class, as: 'c2'), DataFixture(CategoryFixture::class, as: 'c3'), @@ -400,7 +402,7 @@ private function getQuote(string $reservedOrderId): Quote ] public function testDiscountOnSimpleProductWithDiscardSubsequentRule(): void { - $this->quote([ + $total = $this->quote([ [ 'product'=> $this->fixtures->get('p1'), 'qty'=>1 @@ -418,17 +420,18 @@ public function testDiscountOnSimpleProductWithDiscardSubsequentRule(): void 'qty'=>1 ] ]); + $this->assertEquals(-32, $total->getDiscountAmount()); } /** * Create quote and assert totals values * * @param array $quoteItems - * @return void + * @return Total * @throws LocalizedException * @throws NoSuchEntityException */ - private function quote(array $quoteItems): void + private function quote(array $quoteItems): Total { $customerTaxClassId = $this->getCustomerTaxClassId(); $fixtureCustomerId = 1; @@ -466,7 +469,7 @@ private function quote(array $quoteItems): void $total = $this->objectManager->create(Total::class); $this->subtotalCollector->collect($this->quote, $this->shippingAssignment, $total); $this->discountCollector->collect($this->quote, $this->shippingAssignment, $total); - $this->assertEquals(-32, $total->getDiscountAmount()); + return $total; } /** From 0559853926827262450450a5f355f5a96e28e98b Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Wed, 11 Jan 2023 19:12:43 +0530 Subject: [PATCH 733/985] ACP2E-1300: DB Isolation removed --- .../testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index bff520449f9ca..d1c47c2e66598 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -272,7 +272,6 @@ private function getQuote(string $reservedOrderId): Quote * @throws NoSuchEntityException */ #[ - DbIsolation(true), DataFixture(CategoryFixture::class, as: 'c1'), DataFixture(CategoryFixture::class, as: 'c2'), DataFixture(CategoryFixture::class, as: 'c3'), From 596a9e22b4bd5bb1a0aeb24ffb0b88acfdebb558 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 12 Jan 2023 17:31:21 +0530 Subject: [PATCH 734/985] ACP2E-1300: rename variable --- .../SalesRule/Model/Quote/Discount.php | 65 ++++++++++--------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 0e6618d05b5b8..0f5fb5275dc04 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -34,8 +34,6 @@ class Discount extends AbstractTotal { public const COLLECTOR_TYPE_CODE = 'discount'; - public const RULE_ACTION_CONDITION_TAB = 'getActions'; - public const RULE_CONDITION_TAB = 'getConditions'; /** * Discount calculation object @@ -181,40 +179,47 @@ public function collect( $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); - $itemWithDiscount = []; - $isDiscardRulePresent = $anyConditionInDiscard = $activateDiscardRule = false; - $isProductObject = true; + $itemsToApplyDiscount = []; + + //Rule present with discard subsequent rule enabled + $discardRule = false; + //Rule condition that were defined either in condition or action tab or both + $conditionFoundInRule = false; + //Activate discard rule logic based on priority after current discard rule + $activateDiscardRule = false; + //False if rule condition not belongs to Product/Found class + $exitDiscardRule = false; /** @var Rule $rule */ foreach ($rules as $rule) { if ($rule->getStopRulesProcessing()) { - $isDiscardRulePresent = true; - $anyConditionInDiscard = true; + $discardRule = true; break; } } /** @var Rule $rule */ foreach ($rules as $rule) { - $discardConditionMethod = self::RULE_ACTION_CONDITION_TAB; - if ($isDiscardRulePresent) { - if (($rule->getActions() == null || empty($rule->getActions()->getConditions())) - || ($rule->getConditions() == null || empty($rule->getConditions()->getConditions()))) { - $anyConditionInDiscard = false; + $ruleConditionMethod = "getActions"; + if ($discardRule) { + if (($rule->getActions() === null || empty($rule->getActions()->getConditions())) + || ($rule->getConditions() === null || empty($rule->getConditions()->getConditions()))) { + $conditionFoundInRule = false; } if ($rule->getConditions() !== null && !empty($rule->getConditions()->getConditions())) { - foreach ($rule->getConditions()->getConditions() as $class) { - if ($class->getType() === Found::class) { - $discardConditionMethod = self::RULE_CONDITION_TAB; - $anyConditionInDiscard = true; + $classSetInRuleCondition = current($rule->getConditions()->getConditions()); + + if (!empty($classSetInRuleCondition)) { + if ($classSetInRuleCondition->getType() === Found::class) { + $ruleConditionMethod = "getConditions"; + $conditionFoundInRule = true; } else { - $isProductObject = false; + $exitDiscardRule = true; } - break; } } if ($rule->getActions() != null && !empty($rule->getActions()->getConditions())) { - $anyConditionInDiscard = true; + $conditionFoundInRule = true; } } /** @var Item $item */ @@ -225,26 +230,26 @@ public function collect( if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } - if ($activateDiscardRule && isset($itemWithDiscount[$item->getProduct()->getId()])) { + if ($activateDiscardRule && isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { continue; } - if ($isDiscardRulePresent && $anyConditionInDiscard) { - if ($discardConditionMethod == self::RULE_ACTION_CONDITION_TAB) { + if ($discardRule && $conditionFoundInRule) { + if ("getActions" == $ruleConditionMethod) { $itemToValidate = $item; } else { $itemToValidate = clone $item; } - if ($rule->$discardConditionMethod()->validate($itemToValidate)) { - $itemWithDiscount[$item->getProduct()->getId()] = $item->getProduct()->getId(); - } elseif (!isset($itemWithDiscount[$item->getProduct()->getId()])) { + if ($rule->$ruleConditionMethod()->validate($itemToValidate)) { + $itemsToApplyDiscount[$item->getProduct()->getId()] = $item->getProduct()->getId(); + } elseif (!isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { continue; - } elseif (!$activateDiscardRule && isset($itemWithDiscount[$item->getProduct()->getId()])) { + } elseif (!$activateDiscardRule && isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { continue; } } - if ($isDiscardRulePresent && $discardConditionMethod == self::RULE_ACTION_CONDITION_TAB) { + if ($discardRule && ("getActions" == $ruleConditionMethod)) { $this->calculator->setSkipActionsValidation(true); - } elseif ($isDiscardRulePresent) { + } elseif ($discardRule) { $this->calculator->setSkipActionsValidation(false); } $eventArgs['item'] = $item; @@ -252,8 +257,8 @@ public function collect( $this->calculator->process($item, $rule); } if ($rule->getStopRulesProcessing()) { - //PAT condition - if (!$isProductObject) { + //Break for performance acceptance test + if ($exitDiscardRule) { break; } $activateDiscardRule = true; From c7af99b3ea8dc81720d69c13aa25ebbf706271aa Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 12 Jan 2023 17:45:41 +0530 Subject: [PATCH 735/985] ACP2E-1300: remove comment --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 0f5fb5275dc04..04b72f99c9f41 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -180,15 +180,10 @@ public function collect( $rules = $this->calculator->getRules($address); $itemsToApplyDiscount = []; - - //Rule present with discard subsequent rule enabled $discardRule = false; - //Rule condition that were defined either in condition or action tab or both - $conditionFoundInRule = false; - //Activate discard rule logic based on priority after current discard rule + $conditionFoundInRule = false; //rule condition defined either in condition or action or both tab $activateDiscardRule = false; - //False if rule condition not belongs to Product/Found class - $exitDiscardRule = false; + $exitDiscardRule = false; //false if rule condition not belongs to Product/Found class /** @var Rule $rule */ foreach ($rules as $rule) { From 1d103a53d59fa2acdda8e0e4fb0d2fadb4582e01 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 12 Jan 2023 18:18:50 +0530 Subject: [PATCH 736/985] ACP2E-1300: comment addressed --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 04b72f99c9f41..19cd121fbbebb 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -181,9 +181,9 @@ public function collect( $itemsToApplyDiscount = []; $discardRule = false; - $conditionFoundInRule = false; //rule condition defined either in condition or action or both tab + $conditionFoundInRule = false; //criteria defined in condition or action or both tab of rule $activateDiscardRule = false; - $exitDiscardRule = false; //false if rule condition not belongs to Product/Found class + $exitDiscardRule = false; //false if rule condition object not belongs to Product/Found class /** @var Rule $rule */ foreach ($rules as $rule) { @@ -252,7 +252,7 @@ public function collect( $this->calculator->process($item, $rule); } if ($rule->getStopRulesProcessing()) { - //Break for performance acceptance test + //break for performance acceptance test if ($exitDiscardRule) { break; } From 2a9e4ebc9a6a15e88134f92bd7aa1f18260efbea Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 01:24:09 +0530 Subject: [PATCH 737/985] ACP2E-1300: DiscardRule fix after discussion --- .../SalesRule/Model/Quote/Discount.php | 78 +------- .../Model/Rule/Condition/Product/Found.php | 15 +- .../Test/Unit/Model/Quote/DiscountTest.php | 169 ++---------------- .../Rule/Condition/Product/FoundTest.php | 76 -------- .../SalesRule/Model/Quote/DiscountTest.php | 14 +- 5 files changed, 31 insertions(+), 321 deletions(-) delete mode 100644 app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 19cd121fbbebb..2d204e78dc2f1 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -21,7 +21,6 @@ use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Data\RuleDiscount; use Magento\SalesRule\Model\Rule; -use Magento\SalesRule\Model\Rule\Condition\Product\Found; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; @@ -178,88 +177,27 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); - - $itemsToApplyDiscount = []; - $discardRule = false; - $conditionFoundInRule = false; //criteria defined in condition or action or both tab of rule - $activateDiscardRule = false; - $exitDiscardRule = false; //false if rule condition object not belongs to Product/Found class - - /** @var Rule $rule */ - foreach ($rules as $rule) { - if ($rule->getStopRulesProcessing()) { - $discardRule = true; - break; - } - } - - /** @var Rule $rule */ - foreach ($rules as $rule) { - $ruleConditionMethod = "getActions"; - if ($discardRule) { - if (($rule->getActions() === null || empty($rule->getActions()->getConditions())) - || ($rule->getConditions() === null || empty($rule->getConditions()->getConditions()))) { - $conditionFoundInRule = false; - } - if ($rule->getConditions() !== null && !empty($rule->getConditions()->getConditions())) { - $classSetInRuleCondition = current($rule->getConditions()->getConditions()); - - if (!empty($classSetInRuleCondition)) { - if ($classSetInRuleCondition->getType() === Found::class) { - $ruleConditionMethod = "getConditions"; - $conditionFoundInRule = true; - } else { - $exitDiscardRule = true; - } - } - } - if ($rule->getActions() != null && !empty($rule->getActions()->getConditions())) { - $conditionFoundInRule = true; - } - } - /** @var Item $item */ - foreach ($items as $item) { + /** @var Item $item */ + foreach ($items as $item) { + /** @var Rule $rule */ + foreach ($rules as $rule) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { continue; } if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } - if ($activateDiscardRule && isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { - continue; - } - if ($discardRule && $conditionFoundInRule) { - if ("getActions" == $ruleConditionMethod) { - $itemToValidate = $item; - } else { - $itemToValidate = clone $item; - } - if ($rule->$ruleConditionMethod()->validate($itemToValidate)) { - $itemsToApplyDiscount[$item->getProduct()->getId()] = $item->getProduct()->getId(); - } elseif (!isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { - continue; - } elseif (!$activateDiscardRule && isset($itemsToApplyDiscount[$item->getProduct()->getId()])) { - continue; - } - } - if ($discardRule && ("getActions" == $ruleConditionMethod)) { - $this->calculator->setSkipActionsValidation(true); - } elseif ($discardRule) { - $this->calculator->setSkipActionsValidation(false); - } $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); - } - if ($rule->getStopRulesProcessing()) { - //break for performance acceptance test - if ($exitDiscardRule) { + $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; + if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { + $quote->setAppliedRuleIds(""); break; } - $activateDiscardRule = true; } - $this->calculator->initTotals($items, $address); } + $this->calculator->initTotals($items, $address); foreach ($items as $item) { if (!isset($itemsAggregate[$item->getId()])) { continue; diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php index 567fdc3a90329..a807bca77cc60 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php @@ -7,8 +7,6 @@ class Found extends \Magento\SalesRule\Model\Rule\Condition\Product\Combine { - public const EVENT_PREFIX_SALES_QUOTE_ITEM = 'sales_quote_item'; - /** * @param \Magento\Rule\Model\Condition\Context $context * @param \Magento\SalesRule\Model\Rule\Condition\Product $ruleConditionProduct @@ -62,19 +60,14 @@ public function asHtml() public function validate(\Magento\Framework\Model\AbstractModel $model) { $isValid = false; - if ($model->getEventPrefix() === self::EVENT_PREFIX_SALES_QUOTE_ITEM) { - $item = $model->load($model->getId()); + + foreach ($model->getAllItems() as $item) { if (parent::validate($item)) { $isValid = true; - } - } else { - foreach ($model->getAllItems() as $item) { - if (parent::validate($item)) { - $isValid = true; - break; - } + break; } } + return $isValid; } } diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php index e8490cf26e9d7..b5b9db3cdb926 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php @@ -7,7 +7,6 @@ namespace Magento\SalesRule\Test\Unit\Model\Quote; -use Magento\Catalog\Model\Product as CatalogProduct; use Magento\Framework\Api\ExtensionAttributesInterface; use Magento\Framework\Event\Manager; use Magento\Framework\Event\ManagerInterface; @@ -18,14 +17,12 @@ use Magento\Quote\Model\Quote\Address; use Magento\Quote\Model\Quote\Address\Total; use Magento\Quote\Model\Quote\Item; -use Magento\Rule\Model\ConditionFactory; use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory; use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Quote\Discount; use Magento\SalesRule\Model\Rule; use Magento\SalesRule\Model\Rule\Action\Discount\Data; use Magento\SalesRule\Model\Rule\Action\Discount\DataFactory; -use Magento\SalesRule\Model\Rule\Condition\Product; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\Store; @@ -93,11 +90,6 @@ class DiscountTest extends TestCase */ private $rulesApplierMock; - /** - * @var ConditionFactory|MockObject - */ - protected $condition; - protected function setUp(): void { $this->storeManagerMock = $this->getMockForAbstractClass(StoreManagerInterface::class); @@ -126,10 +118,9 @@ protected function setUp(): void $this->rule = $this->getMockBuilder(Rule::class) ->disableOriginalConstructor() ->addMethods( - ['getSimpleAction','getStopRulesProcessing'] - ) - ->onlyMethods( - ['getConditions', 'getActions'] + [ + 'getSimpleAction' + ] ) ->getMock(); $this->eventManagerMock = $this->createMock(Manager::class); @@ -141,6 +132,7 @@ function ($argument) { return round((float) $argument, 2); } ); + $this->addressMock = $this->getMockBuilder(Address::class) ->addMethods(['getShippingAmount']) ->onlyMethods(['getQuote', 'getAllItems', 'getExtensionAttributes', 'getCustomAttributesCodes']) @@ -150,12 +142,16 @@ function ($argument) { ExtensionAttributesInterface::class )->addMethods(['setDiscounts', 'getDiscounts'])->getMockForAbstractClass(); $addressExtension->method('getDiscounts')->willReturn([]); - $addressExtension->expects($this->any())->method('setDiscounts') + $addressExtension->expects($this->any()) + ->method('setDiscounts') ->willReturn([]); $this->addressMock->expects( $this->any() )->method('getExtensionAttributes')->willReturn($addressExtension); - $this->addressMock->expects($this->any())->method('getCustomAttributesCodes')->willReturn([]); + $this->addressMock->expects($this->any()) + ->method('getCustomAttributesCodes') + ->willReturn([]); + $shipping = $this->getMockForAbstractClass(ShippingInterface::class); $shipping->expects($this->any())->method('getAddress')->willReturn($this->addressMock); $this->shippingAssignmentMock = $this->getMockForAbstractClass(ShippingAssignmentInterface::class); @@ -164,6 +160,7 @@ function ($argument) { DataFactory::class, ['create'] ); + /** @var Discount $discount */ $this->discount = new Discount( $this->eventManagerMock, @@ -174,13 +171,12 @@ function ($argument) { $this->discountDataInterfaceFactoryMock, $this->rulesApplierMock ); - $discountData = $this->getMockBuilder(Data::class)->getMock(); + $discountData = $this->getMockBuilder(Data::class) + ->getMock(); $this->discountFactory->expects($this->any()) ->method('create') ->with($this->anything()) ->willReturn($discountData); - $this->condition = $this->getMockBuilder(ConditionFactory::class)->disableOriginalConstructor() - ->addMethods(['getConditions','validate'])->getMock(); } public function testCollectItemNoDiscount() @@ -365,143 +361,4 @@ public function testFetch() $totalMock->expects($this->once())->method('getDiscountDescription')->willReturn($discountDescription); $this->assertEquals($expectedResult, $this->discount->fetch($quoteMock, $totalMock)); } - - /** - * @return void - */ - public function testDiscardSubsequentRuleForConditionsTab(): void - { - $itemWithChildren = $this->getMockBuilder(Item::class) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->onlyMethods( - [ - 'getParentItem', - 'isChildrenCalculated', - 'getChildren', - 'getExtensionAttributes', - 'getId', - 'getProduct' - ] - )->addMethods( - [ - 'getNoDiscount', - 'getHasChildren', - 'setProductId' - ] - ) - ->getMock(); - $this->rule->expects($this->any())->method('getConditions')->willReturn($this->condition); - $this->rule->expects($this->any())->method('getSimpleAction')->willReturn(null); - $this->rule->expects($this->any())->method('getStopRulesProcessing')->willReturn(1); - $productClass = $this->getMockBuilder(Product::class)->disableOriginalConstructor()->addMethods(['getType']) - ->getMock(); - $this->condition->expects($this->any())->method('getConditions') - ->willReturn([$productClass]); - $productClass->expects($this->any())->method('getType') - ->willReturn(Product\Found::class); - $itemWithChildren->expects($this->once())->method('getNoDiscount')->willReturn(false); - $itemWithChildren->expects($this->any())->method('getParentItem')->willReturn(false); - $itemProductClass = $this->getMockBuilder(CatalogProduct::class) - ->disableOriginalConstructor()->onlyMethods( - [ - 'getId', - 'getEntityId' - ] - )->getMock(); - $itemProductClass->expects($this->any())->method('getId')->willReturn(2); - $itemWithChildren->expects($this->any())->method('getProduct')->willReturn($itemProductClass); - $this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true); - $this->validatorMock->expects($this->once())->method('sortItemsByPriority') - ->with([$itemWithChildren], $this->addressMock)->willReturnArgument(0); - $this->validatorMock->expects($this->once())->method('getRules')->with($this->addressMock) - ->willReturn([$this->rule]); - $this->condition->expects($this->once())->method('validate')->with($itemWithChildren)->willReturn(1); - $storeMock = $this->getMockBuilder(Store::class) - ->disableOriginalConstructor() - ->setMethods(['getStore']) - ->getMock(); - $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock); - $quoteMock = $this->getMockBuilder(Quote::class) - ->onlyMethods(['getAllAddresses', 'getStoreId']) - ->disableOriginalConstructor() - ->getMock(); - $quoteMock->expects($this->any())->method('getAllAddresses')->willReturn([$this->addressMock]); - $this->addressMock->expects($this->any())->method('getAllItems')->willReturn([$itemWithChildren]); - $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); - $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true); - $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]); - $totalMock = $this->createMock(Total::class); - $this->assertInstanceOf( - Discount::class, - $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock) - ); - } - - /** - * @return void - */ - public function testDiscardSubsequentRuleForActionsTab(): void - { - $itemWithChildren = $this->getMockBuilder(Item::class) - ->disableOriginalConstructor() - ->onlyMethods( - [ - 'getParentItem', - 'isChildrenCalculated', - 'getChildren', - 'getExtensionAttributes', - 'getId', - 'getProduct' - ] - )->addMethods( - [ - 'getNoDiscount', - 'getHasChildren', - 'setProductId' - ] - ) - ->getMock(); - $this->rule->expects($this->any())->method('getConditions')->willReturn(null); - $this->rule->expects($this->any())->method('getSimpleAction')->willReturn(null); - $this->rule->expects($this->any())->method('getStopRulesProcessing')->willReturn(1); - $this->rule->expects($this->any())->method('getActions')->willReturn($this->condition); - $itemWithChildren->expects($this->once())->method('getNoDiscount')->willReturn(false); - $itemWithChildren->expects($this->any())->method('getParentItem')->willReturn(false); - $itemProductClass = $this->getMockBuilder(CatalogProduct::class) - ->disableOriginalConstructor()->onlyMethods( - [ - 'getId', - 'getEntityId' - ] - )->getMock(); - $itemProductClass->expects($this->any())->method('getId')->willReturn(2); - $itemWithChildren->expects($this->any())->method('getProduct')->willReturn($itemProductClass); - $this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true); - $this->validatorMock->expects($this->once())->method('sortItemsByPriority') - ->with([$itemWithChildren], $this->addressMock)->willReturnArgument(0); - $this->validatorMock->expects($this->once())->method('getRules')->with($this->addressMock) - ->willReturn([$this->rule]); - $this->condition->expects($this->any())->method('getConditions')->willReturnSelf(); - $this->condition->expects($this->once())->method('validate')->with($itemWithChildren)->willReturn(1); - $storeMock = $this->getMockBuilder(Store::class) - ->disableOriginalConstructor() - ->setMethods(['getStore']) - ->getMock(); - $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock); - $quoteMock = $this->getMockBuilder(Quote::class) - ->onlyMethods(['getAllAddresses', 'getStoreId']) - ->disableOriginalConstructor() - ->getMock(); - $quoteMock->expects($this->any())->method('getAllAddresses')->willReturn([$this->addressMock]); - $this->addressMock->expects($this->any())->method('getAllItems')->willReturn([$itemWithChildren]); - $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock); - $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true); - $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]); - $totalMock = $this->createMock(Total::class); - $this->assertInstanceOf( - Discount::class, - $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock) - ); - } } diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php deleted file mode 100644 index c0024dbd632b4..0000000000000 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Rule/Condition/Product/FoundTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\SalesRule\Test\Unit\Model\Rule\Condition\Product; - -use Magento\Framework\Model\AbstractModel; -use Magento\Quote\Model\Quote\Address; -use Magento\Quote\Model\Quote\Item; -use Magento\Rule\Model\Condition\Context; -use Magento\SalesRule\Model\Rule\Condition\Product as SalesRuleProduct; -use Magento\SalesRule\Model\Rule\Condition\Product\Found; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; - -class FoundTest extends TestCase -{ - /** - * @var Found - */ - private $model; - - /** - * @var SalesRuleProduct|MockObject - */ - private $ruleConditionMock; - - /** - * @inheritDoc - */ - protected function setUp(): void - { - $contextMock = $this->getMockBuilder(Context::class) - ->disableOriginalConstructor() - ->getMock(); - $this->ruleConditionMock = $this->getMockBuilder(SalesRuleProduct::class) - ->setMethods(['loadAttributeOptions', 'getAttributeOption']) - ->disableOriginalConstructor() - ->getMock(); - $this->model = new Found( - $contextMock, - $this->ruleConditionMock, - [] - ); - } - - /** - * @return void - */ - public function testValidate() - { - $itemMock = $this->createMock(Item::class); - $modelMock = $this->getMockBuilder(AbstractModel::class) - ->addMethods(['getProductId', 'setQty', 'setNote']) - ->onlyMethods(['getId', 'getEntityId', 'save', 'delete', 'isDeleted']) - ->disableOriginalConstructor() - ->getMockForAbstractClass(); - $itemMock->expects($this->any()) - ->method('getEventPrefix') - ->willReturn('sales_quote_item'); - $itemMock->expects($this->exactly(1))->method('load')->willReturn($modelMock); - $result = $this->model->validate($itemMock); - $this->assertTrue($result); - - $addressMock = $this->createMock(Address::class); - $addressMock->expects($this->any()) - ->method('getEventPrefix') - ->willReturn('sales_quote_address'); - $addressMock->expects($this->exactly(1))->method('getAllItems')->willReturn([]); - $result = $this->model->validate($addressMock); - $this->assertFalse($result); - } -} diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index d1c47c2e66598..c8fe12e312cd0 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -33,14 +33,12 @@ use Magento\SalesRule\Model\Rule\Condition\Combine as CombineCondition; use Magento\SalesRule\Model\Rule\Condition\Product as ProductCondition; use Magento\SalesRule\Test\Fixture\ProductCondition as ProductConditionFixture; -use Magento\SalesRule\Test\Fixture\ProductFoundInCartConditions as ProductFoundInCartConditionsFixture; use Magento\SalesRule\Test\Fixture\Rule as RuleFixture; use Magento\Tax\Model\ClassModel; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DataFixtureStorage; use Magento\TestFramework\Fixture\DataFixtureStorageManager; -use Magento\TestFramework\Fixture\DbIsolation; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -297,7 +295,7 @@ private function getQuote(string $reservedOrderId): Quote ], 'p4'), DataFixture( - ProductFoundInCartConditionsFixture::class, + ProductConditionFixture::class, [ 'attribute' => 'category_ids', 'value' => '$c1.id$', @@ -320,7 +318,7 @@ private function getQuote(string $reservedOrderId): Quote 'cond1' ), DataFixture( - ProductFoundInCartConditionsFixture::class, + ProductConditionFixture::class, [ 'attribute' => 'category_ids', 'value' => '$c2.id$', @@ -343,7 +341,7 @@ private function getQuote(string $reservedOrderId): Quote 'cond2' ), DataFixture( - ProductFoundInCartConditionsFixture::class, + ProductConditionFixture::class, [ 'attribute' => 'category_ids', 'value' => '$c3.id$', @@ -371,7 +369,7 @@ private function getQuote(string $reservedOrderId): Quote 'stop_rules_processing'=> 0, 'coupon_code' => 'test', 'discount_amount' => 10, - 'conditions' => ['$cond1$'], + 'actions' => ['$cond1$'], 'simple_action' => Rule::BY_FIXED_ACTION, 'sort_order' => 0 ], @@ -381,7 +379,7 @@ private function getQuote(string $reservedOrderId): Quote RuleFixture::class, [ 'discount_amount' => 5, - 'conditions' => ['$cond2$'], + 'actions' => ['$cond2$'], 'simple_action' => Rule::BY_FIXED_ACTION, 'sort_order' => 1 ], @@ -392,7 +390,7 @@ private function getQuote(string $reservedOrderId): Quote [ 'stop_rules_processing'=> 0, 'discount_amount' => 2, - 'conditions' => ['$cond3$'], + 'actions' => ['$cond3$'], 'simple_action' => Rule::BY_FIXED_ACTION, 'sort_order' => 2 ], From db00a5ba515366b4690a968f960b4422f238b6fb Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 01:29:11 +0530 Subject: [PATCH 738/985] ACP2E-1300: import sequence revert --- .../Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php index b5b9db3cdb926..5a7d6142a6d43 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php @@ -20,12 +20,12 @@ use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory; use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Quote\Discount; -use Magento\SalesRule\Model\Rule; use Magento\SalesRule\Model\Rule\Action\Discount\Data; use Magento\SalesRule\Model\Rule\Action\Discount\DataFactory; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\Store; +use Magento\SalesRule\Model\Rule; use Magento\Store\Model\StoreManagerInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; From 181263d2c317cb8f773e76a73c52efc87571e015 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 15:41:53 +0530 Subject: [PATCH 739/985] ACP2E-1300: fix for webApi and Integration test --- .../Magento/GraphQl/Quote/Guest/CartDiscountTest.php | 2 +- .../SalesRule/Model/Rule/Action/Discount/CartFixedTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php index bbd6556a025f3..9c00d49743a8d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php @@ -57,7 +57,7 @@ public function testGetDiscountInformationWithTwoRulesApplied() $query = $this->getQuery($maskedQuoteId); $response = $this->graphQlQuery($query); $discountResponse = $response['cart']['prices']['discount']; - self::assertEquals(-15, $discountResponse['amount']['value']); + self::assertEquals(-12.5, $discountResponse['amount']['value']); self::assertEquals(['50% Off for all orders', '5$ fixed discount on whole cart'], $discountResponse['label']); } diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php index ff15eb07d4986..ba08f2bedb37d 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php @@ -548,11 +548,11 @@ public function discountByPercentDataProvider() ], [ 'percentDiscount' => 15.5, - 'expectedDiscounts' => ['simple1' => 3.65, 'simple2' => 9.76, 'totalDiscount' => -13.41] + 'expectedDiscounts' => ['simple1' => 3.65, 'simple2' => 9.76, 'totalDiscount' => -11.86] ], [ 'percentDiscount' => 50, - 'expectedDiscounts' => ['simple1' => 5.72, 'simple2' => 15.27, 'totalDiscount' => -20.99] + 'expectedDiscounts' => ['simple1' => 5.72, 'simple2' => 15.27, 'totalDiscount' => -15.99] ], [ 'percentDiscount' => 100, From b92eebafb56718e792c986f143f74c8ac5bb1ade Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 17:23:04 +0530 Subject: [PATCH 740/985] ACP2E-1300: webapi test fix --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 2 +- .../Magento/GraphQl/Quote/Guest/CartDiscountTest.php | 2 +- .../SalesRule/Model/Rule/Action/Discount/CartFixedTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 2d204e78dc2f1..f91bfd1ea1e3b 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -195,9 +195,9 @@ public function collect( $quote->setAppliedRuleIds(""); break; } + $this->calculator->initTotals($items, $address); } } - $this->calculator->initTotals($items, $address); foreach ($items as $item) { if (!isset($itemsAggregate[$item->getId()])) { continue; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php index 9c00d49743a8d..bbd6556a025f3 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CartDiscountTest.php @@ -57,7 +57,7 @@ public function testGetDiscountInformationWithTwoRulesApplied() $query = $this->getQuery($maskedQuoteId); $response = $this->graphQlQuery($query); $discountResponse = $response['cart']['prices']['discount']; - self::assertEquals(-12.5, $discountResponse['amount']['value']); + self::assertEquals(-15, $discountResponse['amount']['value']); self::assertEquals(['50% Off for all orders', '5$ fixed discount on whole cart'], $discountResponse['label']); } diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php index ba08f2bedb37d..ff15eb07d4986 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php @@ -548,11 +548,11 @@ public function discountByPercentDataProvider() ], [ 'percentDiscount' => 15.5, - 'expectedDiscounts' => ['simple1' => 3.65, 'simple2' => 9.76, 'totalDiscount' => -11.86] + 'expectedDiscounts' => ['simple1' => 3.65, 'simple2' => 9.76, 'totalDiscount' => -13.41] ], [ 'percentDiscount' => 50, - 'expectedDiscounts' => ['simple1' => 5.72, 'simple2' => 15.27, 'totalDiscount' => -15.99] + 'expectedDiscounts' => ['simple1' => 5.72, 'simple2' => 15.27, 'totalDiscount' => -20.99] ], [ 'percentDiscount' => 100, From ede5966373c35d49abc42bfd3c75c15223cfeedc Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 21:11:46 +0530 Subject: [PATCH 741/985] ACP2E-1300: applied rule on item --- .../SalesRule/Model/Quote/Discount.php | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index f91bfd1ea1e3b..a314db039d0d1 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -177,10 +177,11 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); - /** @var Item $item */ - foreach ($items as $item) { - /** @var Rule $rule */ - foreach ($rules as $rule) { + $applyDiscardRule = false; + /** @var Rule $rule */ + foreach ($rules as $rule) { + /** @var Item $item */ + foreach ($items as $item) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { continue; } @@ -190,13 +191,17 @@ public function collect( $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); - $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; - if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { - $quote->setAppliedRuleIds(""); - break; + if ($applyDiscardRule) { + $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; + if (in_array($rule->getId(), $appliedRuleIds)) { + break; + } } - $this->calculator->initTotals($items, $address); } + if ($rule->getStopRulesProcessing()) { + $applyDiscardRule = true; + } + $this->calculator->initTotals($items, $address); } foreach ($items as $item) { if (!isset($itemsAggregate[$item->getId()])) { From 59bfa7a0b879538ed8485832692f974b763da76d Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Sun, 15 Jan 2023 22:16:15 +0530 Subject: [PATCH 742/985] ACP2E-1300: Fix with new code --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index a314db039d0d1..c924a03f281af 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -188,15 +188,15 @@ public function collect( if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } - $eventArgs['item'] = $item; - $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); - $this->calculator->process($item, $rule); if ($applyDiscardRule) { $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; - if (in_array($rule->getId(), $appliedRuleIds)) { - break; + if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { + continue; } } + $eventArgs['item'] = $item; + $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); + $this->calculator->process($item, $rule); } if ($rule->getStopRulesProcessing()) { $applyDiscardRule = true; From 35b065485cae499ffe6a7d4c7228f32e78078879 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Mon, 16 Jan 2023 13:52:01 +0530 Subject: [PATCH 743/985] ACP2E-1300: Patch test --- .../SalesRule/Model/Quote/Discount.php | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index c924a03f281af..2d204e78dc2f1 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -177,32 +177,27 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); - $applyDiscardRule = false; - /** @var Rule $rule */ - foreach ($rules as $rule) { - /** @var Item $item */ - foreach ($items as $item) { + /** @var Item $item */ + foreach ($items as $item) { + /** @var Rule $rule */ + foreach ($rules as $rule) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { continue; } if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } - if ($applyDiscardRule) { - $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; - if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { - continue; - } - } $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); + $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; + if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { + $quote->setAppliedRuleIds(""); + break; + } } - if ($rule->getStopRulesProcessing()) { - $applyDiscardRule = true; - } - $this->calculator->initTotals($items, $address); } + $this->calculator->initTotals($items, $address); foreach ($items as $item) { if (!isset($itemsAggregate[$item->getId()])) { continue; From a983da6a83c169edd9eadac0919f87b0a116a068 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Mon, 16 Jan 2023 19:25:06 +0530 Subject: [PATCH 744/985] ACP2E-1300: PAT test with new solution --- .../SalesRule/Model/Quote/Discount.php | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 2d204e78dc2f1..c924a03f281af 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -177,27 +177,32 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); - /** @var Item $item */ - foreach ($items as $item) { - /** @var Rule $rule */ - foreach ($rules as $rule) { + $applyDiscardRule = false; + /** @var Rule $rule */ + foreach ($rules as $rule) { + /** @var Item $item */ + foreach ($items as $item) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { continue; } if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } + if ($applyDiscardRule) { + $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; + if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { + continue; + } + } $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); - $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; - if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { - $quote->setAppliedRuleIds(""); - break; - } } + if ($rule->getStopRulesProcessing()) { + $applyDiscardRule = true; + } + $this->calculator->initTotals($items, $address); } - $this->calculator->initTotals($items, $address); foreach ($items as $item) { if (!isset($itemsAggregate[$item->getId()])) { continue; From 80a0a80bf0fc1b35c47d5874d91ab084e8cedc51 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Mon, 16 Jan 2023 22:41:32 +0530 Subject: [PATCH 745/985] ACP2E-1300: PAT test --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index c924a03f281af..40d79b81b938c 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -24,6 +24,7 @@ use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; +use Magento\SalesRule\Model\Rule\Condition\Product; /** * Discount totals calculation model. @@ -178,8 +179,15 @@ public function collect( $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); $applyDiscardRule = false; + $breakDiscardRule = false; /** @var Rule $rule */ foreach ($rules as $rule) { + if ($rule->getStopRulesProcessing()) { + $condition = current($rule->getActions()->getConditions()); + if ($condition && $condition->getType() !== Product::class) { + $breakDiscardRule = true; + } + } /** @var Item $item */ foreach ($items as $item) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { @@ -199,6 +207,9 @@ public function collect( $this->calculator->process($item, $rule); } if ($rule->getStopRulesProcessing()) { + if ($breakDiscardRule) { + break; + } $applyDiscardRule = true; } $this->calculator->initTotals($items, $address); From 2108a978ec51a9ce9fcf3bb276c415ebb49a5189 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Tue, 17 Jan 2023 01:46:39 +0530 Subject: [PATCH 746/985] ACP2E-1300: test pat --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 40d79b81b938c..61487de252174 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -24,7 +24,7 @@ use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; -use Magento\SalesRule\Model\Rule\Condition\Product; +use Magento\SalesRule\Model\Rule\Condition\Address as ConditionAddress; /** * Discount totals calculation model. @@ -184,7 +184,7 @@ public function collect( foreach ($rules as $rule) { if ($rule->getStopRulesProcessing()) { $condition = current($rule->getActions()->getConditions()); - if ($condition && $condition->getType() !== Product::class) { + if ($condition && $condition->getType() === ConditionAddress::class) { $breakDiscardRule = true; } } From 3140102faebe4ad846baf38871c9de469ef9e1be Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Tue, 17 Jan 2023 11:49:01 +0530 Subject: [PATCH 747/985] ACP2E-1300: PAT test --- .../SalesRule/Model/Quote/Discount.php | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 61487de252174..171d0b57bcf7e 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -24,7 +24,7 @@ use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; -use Magento\SalesRule\Model\Rule\Condition\Address as ConditionAddress; +use Magento\SalesRule\Model\Rule\Condition\Product\Found; /** * Discount totals calculation model. @@ -180,12 +180,23 @@ public function collect( $rules = $this->calculator->getRules($address); $applyDiscardRule = false; $breakDiscardRule = false; - /** @var Rule $rule */ + $discardRulePresent = false; foreach ($rules as $rule) { if ($rule->getStopRulesProcessing()) { - $condition = current($rule->getActions()->getConditions()); - if ($condition && $condition->getType() === ConditionAddress::class) { - $breakDiscardRule = true; + $discardRulePresent = true; + } + } + + /** @var Rule $rule */ + foreach ($rules as $rule) { + if ($discardRulePresent) { + if ($rule->getConditions() !== null) { + $classSetInRuleCondition = current($rule->getConditions()->getConditions()); + if (!empty($classSetInRuleCondition)) { + if ($classSetInRuleCondition->getType() != Found::class) { + $breakDiscardRule = true; + } + } } } /** @var Item $item */ @@ -199,6 +210,7 @@ public function collect( if ($applyDiscardRule) { $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { + $quote->setAppliedRuleIds(''); continue; } } From 874413887447b31fcccaff355963341dda6e4ee5 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Tue, 17 Jan 2023 13:29:14 +0530 Subject: [PATCH 748/985] ACP2E-1300: Integration test fix --- app/code/Magento/SalesRule/Model/Quote/Discount.php | 3 +-- app/code/Magento/SalesRule/Model/RulesApplier.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 171d0b57bcf7e..1dc64beb0fa4c 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -208,9 +208,8 @@ public function collect( continue; } if ($applyDiscardRule) { - $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; + $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { - $quote->setAppliedRuleIds(''); continue; } } diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php index ae2beb00d6fe1..a0189888d9746 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -413,7 +413,7 @@ public function setAppliedRuleIds(AbstractItem $item, array $appliedRuleIds) $address = $item->getAddress(); $quote = $item->getQuote(); - $item->setAppliedRuleIds($this->validatorUtility->mergeIds($item->getAppliedRuleIds(), $appliedRuleIds)); + $item->setAppliedRuleIds(join(',', $appliedRuleIds)); $address->setAppliedRuleIds($this->validatorUtility->mergeIds($address->getAppliedRuleIds(), $appliedRuleIds)); $quote->setAppliedRuleIds($this->validatorUtility->mergeIds($quote->getAppliedRuleIds(), $appliedRuleIds)); From 7db437560bb0f6d591e8e27a2b5a63b33850b23e Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Wed, 18 Jan 2023 15:56:14 +0530 Subject: [PATCH 749/985] ACP2E-1300: variable rename --- .../SalesRule/Model/Quote/Discount.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index 1dc64beb0fa4c..b99d2c1b030e3 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -21,10 +21,10 @@ use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Data\RuleDiscount; use Magento\SalesRule\Model\Rule; +use Magento\SalesRule\Model\Rule\Condition\Product\Found; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; -use Magento\SalesRule\Model\Rule\Condition\Product\Found; /** * Discount totals calculation model. @@ -178,23 +178,25 @@ public function collect( $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); $rules = $this->calculator->getRules($address); + $applyDiscardRule = false; - $breakDiscardRule = false; - $discardRulePresent = false; + $exitRules = false; + $isDiscardRule = false; foreach ($rules as $rule) { if ($rule->getStopRulesProcessing()) { - $discardRulePresent = true; + $isDiscardRule = true; + break; } } /** @var Rule $rule */ foreach ($rules as $rule) { - if ($discardRulePresent) { + if ($isDiscardRule) { if ($rule->getConditions() !== null) { - $classSetInRuleCondition = current($rule->getConditions()->getConditions()); - if (!empty($classSetInRuleCondition)) { - if ($classSetInRuleCondition->getType() != Found::class) { - $breakDiscardRule = true; + $ruleCondition = current($rule->getConditions()->getConditions()); + if (!empty($ruleCondition)) { + if ($ruleCondition->getType() != Found::class) { + $exitRules = true; } } } @@ -218,7 +220,7 @@ public function collect( $this->calculator->process($item, $rule); } if ($rule->getStopRulesProcessing()) { - if ($breakDiscardRule) { + if ($exitRules) { break; } $applyDiscardRule = true; From 368e583fb9eea40c98f2d6852019ae958dbc4083 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Wed, 18 Jan 2023 23:25:24 +0530 Subject: [PATCH 750/985] ACP2E-1300: Fix with discard discount --- .../SalesRule/Model/Quote/Discount.php | 39 +++---------------- .../Magento/SalesRule/Model/RulesApplier.php | 2 +- 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php index b99d2c1b030e3..3775bc9122cb4 100644 --- a/app/code/Magento/SalesRule/Model/Quote/Discount.php +++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php @@ -21,7 +21,6 @@ use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory; use Magento\SalesRule\Model\Data\RuleDiscount; use Magento\SalesRule\Model\Rule; -use Magento\SalesRule\Model\Rule\Condition\Product\Found; use Magento\SalesRule\Model\RulesApplier; use Magento\SalesRule\Model\Validator; use Magento\Store\Model\StoreManagerInterface; @@ -177,53 +176,25 @@ public function collect( $this->calculator->init($store->getWebsiteId(), $quote->getCustomerGroupId(), $quote->getCouponCode()); $this->calculator->initTotals($items, $address); $items = $this->calculator->sortItemsByPriority($items, $address); + $itemsToApplyRules = $items; $rules = $this->calculator->getRules($address); - - $applyDiscardRule = false; - $exitRules = false; - $isDiscardRule = false; - foreach ($rules as $rule) { - if ($rule->getStopRulesProcessing()) { - $isDiscardRule = true; - break; - } - } - /** @var Rule $rule */ foreach ($rules as $rule) { - if ($isDiscardRule) { - if ($rule->getConditions() !== null) { - $ruleCondition = current($rule->getConditions()->getConditions()); - if (!empty($ruleCondition)) { - if ($ruleCondition->getType() != Found::class) { - $exitRules = true; - } - } - } - } /** @var Item $item */ - foreach ($items as $item) { + foreach ($itemsToApplyRules as $key => $item) { if ($quote->getIsMultiShipping() && $item->getAddress()->getId() !== $address->getId()) { continue; } if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item) || $item->getParentItem()) { continue; } - if ($applyDiscardRule) { - $appliedRuleIds = $quote->getAppliedRuleIds() ? explode(',', $quote->getAppliedRuleIds()) : []; - if (count($appliedRuleIds) > 1 && in_array($rule->getId(), $appliedRuleIds)) { - continue; - } - } $eventArgs['item'] = $item; $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs); $this->calculator->process($item, $rule); - } - if ($rule->getStopRulesProcessing()) { - if ($exitRules) { - break; + $appliedRuleIds = $item->getAppliedRuleIds() ? explode(',', $item->getAppliedRuleIds()) : []; + if ($rule->getStopRulesProcessing() && in_array($rule->getId(), $appliedRuleIds)) { + unset($itemsToApplyRules[$key]); } - $applyDiscardRule = true; } $this->calculator->initTotals($items, $address); } diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php index a0189888d9746..ae2beb00d6fe1 100644 --- a/app/code/Magento/SalesRule/Model/RulesApplier.php +++ b/app/code/Magento/SalesRule/Model/RulesApplier.php @@ -413,7 +413,7 @@ public function setAppliedRuleIds(AbstractItem $item, array $appliedRuleIds) $address = $item->getAddress(); $quote = $item->getQuote(); - $item->setAppliedRuleIds(join(',', $appliedRuleIds)); + $item->setAppliedRuleIds($this->validatorUtility->mergeIds($item->getAppliedRuleIds(), $appliedRuleIds)); $address->setAppliedRuleIds($this->validatorUtility->mergeIds($address->getAppliedRuleIds(), $appliedRuleIds)); $quote->setAppliedRuleIds($this->validatorUtility->mergeIds($quote->getAppliedRuleIds(), $appliedRuleIds)); From abeaa5b9c91e8059c855b5f3bcf97ded93c1c09a Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 19 Jan 2023 19:29:14 +0530 Subject: [PATCH 751/985] ACP2E-1300: address CR comment --- .../SalesRule/Model/Quote/DiscountTest.php | 187 +++--------------- 1 file changed, 24 insertions(+), 163 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index c8fe12e312cd0..da68967d81670 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -7,17 +7,10 @@ namespace Magento\SalesRule\Model\Quote; -use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Catalog\Model\Product; use Magento\Catalog\Test\Fixture\Category as CategoryFixture; use Magento\Catalog\Test\Fixture\Product as ProductFixture; -use Magento\Customer\Api\AddressRepositoryInterface; -use Magento\Customer\Api\CustomerRepositoryInterface; -use Magento\Customer\Api\Data\AddressInterface; -use Magento\Customer\Api\Data\CustomerInterface; -use Magento\Customer\Model\Address; -use Magento\Customer\Model\Customer; -use Magento\Customer\Model\Group; +use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; +use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; @@ -27,14 +20,16 @@ use Magento\Quote\Model\Quote\Address\Total; use Magento\Quote\Model\Quote\Address\Total\Subtotal; use Magento\Quote\Model\Quote\Item; +use Magento\Quote\Model\QuoteRepository; use Magento\Quote\Model\Shipping; use Magento\Quote\Model\ShippingAssignment; +use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture; +use Magento\Quote\Test\Fixture\GuestCart as GuestCartFixture; use Magento\SalesRule\Model\Rule; use Magento\SalesRule\Model\Rule\Condition\Combine as CombineCondition; use Magento\SalesRule\Model\Rule\Condition\Product as ProductCondition; use Magento\SalesRule\Test\Fixture\ProductCondition as ProductConditionFixture; use Magento\SalesRule\Test\Fixture\Rule as RuleFixture; -use Magento\Tax\Model\ClassModel; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DataFixtureStorage; @@ -66,26 +61,6 @@ class DiscountTest extends TestCase */ private $fixtures; - /** - * @var ProductRepositoryInterface - */ - private $productRepository; - - /** - * @var AddressRepositoryInterface - */ - private $addressRepository; - - /** - * @var ClassModel - */ - private $classModel; - - /** - * @var Address - */ - private $customerAddress; - /** * @var Discount */ @@ -96,11 +71,6 @@ class DiscountTest extends TestCase */ private $subtotalCollector; - /** - * @var Customer - */ - private $customer; - /** * @var ShippingAssignment */ @@ -112,14 +82,14 @@ class DiscountTest extends TestCase private $shipping; /** - * @var Quote + * @var QuoteRepository */ private $quote; /** - * @var Quote\Address + * @var Total */ - private $quoteShippingAddress; + private $total; /** * @inheritDoc @@ -131,17 +101,12 @@ protected function setUp(): void $this->criteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class); $this->quoteRepository = $this->objectManager->get(CartRepositoryInterface::class); $this->fixtures = DataFixtureStorageManager::getStorage(); - $this->productRepository = $this->objectManager->create(ProductRepositoryInterface::class); - $this->addressRepository = $this->objectManager->get(AddressRepositoryInterface::class); - $this->classModel = $this->objectManager->create(ClassModel::class); - $this->customerAddress = $this->objectManager->create(Address::class); $this->discountCollector = $this->objectManager->create(Discount::class); $this->subtotalCollector = $this->objectManager->create(Subtotal::class); - $this->customer = $this->objectManager->create(Customer::class); $this->shippingAssignment = $this->objectManager->create(ShippingAssignment::class); $this->shipping = $this->objectManager->create(Shipping::class); - $this->quote = $this->objectManager->create(Quote::class); - $this->quoteShippingAddress = $this->objectManager->create(Quote\Address::class); + $this->quote = $this->objectManager->get(QuoteRepository::class); + $this->total = $this->objectManager->create(Total::class); } /** @@ -396,129 +361,25 @@ private function getQuote(string $reservedOrderId): Quote ], 'rule3' ), + DataFixture(GuestCartFixture::class, as: 'cart'), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p1.id$']), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p2.id$']), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p3.id$']), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p4.id$']), + DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart.id$']), ] public function testDiscountOnSimpleProductWithDiscardSubsequentRule(): void { - $total = $this->quote([ - [ - 'product'=> $this->fixtures->get('p1'), - 'qty'=>1 - ], - [ - 'product'=> $this->fixtures->get('p2'), - 'qty'=>1 - ], - [ - 'product'=> $this->fixtures->get('p3'), - 'qty'=>1 - ], - [ - 'product'=> $this->fixtures->get('p4'), - 'qty'=>1 - ] - ]); - $this->assertEquals(-32, $total->getDiscountAmount()); - } - - /** - * Create quote and assert totals values - * - * @param array $quoteItems - * @return Total - * @throws LocalizedException - * @throws NoSuchEntityException - */ - private function quote(array $quoteItems): Total - { - $customerTaxClassId = $this->getCustomerTaxClassId(); - $fixtureCustomerId = 1; - /** @var Customer $customer */ - $customer = $this->customer->load($fixtureCustomerId); - /** @var Group $customerGroup */ - $customerGroup = $this->objectManager->create(Group::class)->load('custom_group', 'customer_group_code'); - $customerGroup->setTaxClassId($customerTaxClassId)->save(); - $customer->setGroupId($customerGroup->getId())->save(); - $productTaxClassId = $this->getProductTaxClassId(); - $quoteShippingAddressDataObject = $this->getShippingAddressDataObject($fixtureCustomerId); - $this->quoteShippingAddress->importCustomerAddressData($quoteShippingAddressDataObject); - $this->quote->setStoreId(1)->setIsActive(true)->setIsMultiShipping(0) - ->assignCustomerWithAddressChange($this->getCustomerById($customer->getId())) - ->setShippingAddress($this->quoteShippingAddress)->setBillingAddress($this->quoteShippingAddress) - ->setCheckoutMethod($customer->getMode())->setPasswordHash($customer->encryptPassword( - $customer->getPassword() - ))->setCouponCode('test'); - - foreach ($quoteItems as $quoteItem) { - $product = $quoteItem['product'] ?? null; - if ($product === null) { - /** @var Product $product */ - $product = $this->productRepository->get($quoteItem['sku'] ?? 'simple'); - $product->setTaxClassId($productTaxClassId)->save(); - } - $this->quote->addProduct($product, $quoteItem['qty']); - } - - $address = $this->quote->getShippingAddress(); + $cartId = (int)$this->fixtures->get('cart')->getId(); + $quote = $this->quote->get($cartId); + $quote->setStoreId(1)->setIsActive(true)->setIsMultiShipping(0)->setCouponCode('test'); + $address = $quote->getShippingAddress(); $this->shipping->setAddress($address); $this->shippingAssignment->setShipping($this->shipping); $this->shippingAssignment->setItems($address->getAllItems()); - /** @var Total $total */ - $total = $this->objectManager->create(Total::class); - $this->subtotalCollector->collect($this->quote, $this->shippingAssignment, $total); - $this->discountCollector->collect($this->quote, $this->shippingAssignment, $total); - return $total; - } - - /** - * Get customer tax class id - * - * @return int - */ - protected function getCustomerTaxClassId() - { - //customerTaxClass - $this->classModel->load('CustomerTaxClass2', 'class_name'); - return $this->classModel->getId(); - } - - /** - * Get product tax class id - * - * @return int - */ - protected function getProductTaxClassId() - { - //productTaxClass - $this->classModel->load('ProductTaxClass1', 'class_name'); - return $this->classModel->getId(); - } - - /** - * @param $fixtureCustomerId - * @return AddressInterface - * @throws LocalizedException - */ - protected function getShippingAddressDataObject($fixtureCustomerId) - { - $fixtureCustomerAddressId = 1; - $this->customerAddress->load($fixtureCustomerId); - /** Set data which corresponds tax class fixture */ - $this->customerAddress->setCountryId('US')->setRegionId(12)->save(); - return $this->addressRepository->getById($fixtureCustomerAddressId); - } - - /** - * @param $id - * @return CustomerInterface - * @throws LocalizedException - * @throws NoSuchEntityException - */ - protected function getCustomerById($id) - { - /** - * @var $customerRepository CustomerRepositoryInterface - */ - $customerRepository = $this->objectManager->create(CustomerRepositoryInterface::class); - return $customerRepository->getById($id); + $this->subtotalCollector->collect($quote, $this->shippingAssignment, $this->total); + $this->discountCollector->collect($quote, $this->shippingAssignment, $this->total); + $this->assertEquals(-32, $this->total->getDiscountAmount()); } } From 69773aa1ab2268bef52bb15c66d65d5d5eb43d51 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Thu, 19 Jan 2023 19:41:20 +0530 Subject: [PATCH 752/985] ACP2E-1300: address CR comment --- .../Magento/SalesRule/Model/Quote/DiscountTest.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php index da68967d81670..21b65207ce39b 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php @@ -9,10 +9,7 @@ use Magento\Catalog\Test\Fixture\Category as CategoryFixture; use Magento\Catalog\Test\Fixture\Product as ProductFixture; -use Magento\Checkout\Test\Fixture\SetBillingAddress as SetBillingAddressFixture; -use Magento\Checkout\Test\Fixture\SetShippingAddress as SetShippingAddressFixture; use Magento\Framework\Api\SearchCriteriaBuilder; -use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\ObjectManagerInterface; use Magento\Quote\Api\CartRepositoryInterface; @@ -227,11 +224,7 @@ private function getQuote(string $reservedOrderId): Quote } /** - * - * @magentoDataFixture Magento/Customer/_files/customer.php - * @magentoDataFixture Magento/Customer/_files/customer_address.php - * @magentoDataFixture Magento/Customer/_files/customer_group.php - * @throws LocalizedException + * @return void * @throws NoSuchEntityException */ #[ @@ -365,9 +358,7 @@ private function getQuote(string $reservedOrderId): Quote DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p1.id$']), DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p2.id$']), DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p3.id$']), - DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p4.id$']), - DataFixture(SetBillingAddressFixture::class, ['cart_id' => '$cart.id$']), - DataFixture(SetShippingAddressFixture::class, ['cart_id' => '$cart.id$']), + DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$p4.id$']) ] public function testDiscountOnSimpleProductWithDiscardSubsequentRule(): void { From a32c4c5d86c240c4c7818c06f4fcd4446e594558 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Fri, 13 Jan 2023 23:19:23 +0530 Subject: [PATCH 753/985] ACP2E-1477: Order reports show incorrect results --- app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index 69391e07bbcde..950f82dc43c9e 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -69,7 +69,7 @@ protected function _prepareForm() 'name' => 'show_order_statuses', 'label' => __('Order Status'), 'options' => ['0' => __('Any'), '1' => __('Specified')], - 'note' => __('Applies to Any of the Specified Order Statuses except canceled orders') + 'note' => __('Applies to Any of the Specified Order Statuses except canceled and pending orders') ], 'to' ); From 44be3b2e7bc9e14c2678c7a069482da443795bb5 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 16 Jan 2023 22:41:27 +0530 Subject: [PATCH 754/985] ACP2E-1477: Order reports show incorrect results --- app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index 950f82dc43c9e..1a614873389f8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -16,7 +16,7 @@ class Form extends \Magento\Reports\Block\Adminhtml\Filter\Form { /** - * Order config + * Order config for sales block * * @var \Magento\Sales\Model\Order\ConfigFactory */ From 71fdbe4fb8b2f8f963dc8f158043c28d45a10a00 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 18 Jan 2023 00:33:18 +0530 Subject: [PATCH 755/985] ACP2E-1477: Order reports show incorrect results --- .../OrderReportFilterSection.xml | 1 + ...erStatusNoteInOrderSalesReportPageTest.xml | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml diff --git a/app/code/Magento/Reports/Test/Mftf/Section/OrderReportMainSection/OrderReportFilterSection.xml b/app/code/Magento/Reports/Test/Mftf/Section/OrderReportMainSection/OrderReportFilterSection.xml index 980904ba08183..43c704137ef68 100644 --- a/app/code/Magento/Reports/Test/Mftf/Section/OrderReportMainSection/OrderReportFilterSection.xml +++ b/app/code/Magento/Reports/Test/Mftf/Section/OrderReportMainSection/OrderReportFilterSection.xml @@ -14,5 +14,6 @@ <element name="optionAny" type="select" selector="//select[@id='sales_report_show_order_statuses']/option[contains(text(), 'Any')]"/> <element name="optionSpecified" type="select" selector="//select[@id='sales_report_show_order_statuses']/option[contains(text(), 'Specified')]"/> <element name="orderStatusSpecified" type="select" selector="#sales_report_order_statuses"/> + <element name="orderStatusNote" type="text" selector="#show_order_statuses-note"/> </section> </sections> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml new file mode 100644 index 0000000000000..b3c36194cbb12 --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminVerifyOrderStatusNoteInOrderSalesReportPageTest"> + <annotations> + <features value="Reports"/> + <stories value="Order Sales Report includes canceled orders"/> + <group value="reports"/> + <title value="Canceled orders in order sales report"/> + <description value="Verify canceling of orders in order sales report"/> + <severity value="MAJOR"/> + <testCaseId value="AC-2222"/> + <useCaseId value="ACP2E-1477"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <actionGroup ref="AdminGoToOrdersReportPageActionGroup" stepKey="goToOrdersReportPage1"/> + <grabTextFrom selector="{{OrderReportFilterSection.orderStatusNote}}" stepKey="grabOrderStatusNote"/> + <assertEquals stepKey="assertEquals"> + <actualResult type="string">{$grabOrderStatusNote}</actualResult> + <expectedResult type="string">Applies to Any of the Specified Order Statuses except canceled and pending orders</expectedResult> + </assertEquals> + </test> +</tests> From 96a818a8d5dca120d8ad83577a681458f16f3636 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 18 Jan 2023 00:53:08 +0530 Subject: [PATCH 756/985] ACP2E-1477: Order reports show incorrect results --- ...rifyOrderStatusNoteInOrderSalesReportPageTest.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml index b3c36194cbb12..ed290b685340c 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminVerifyOrderStatusNoteInOrderSalesReportPageTest.xml @@ -10,13 +10,13 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="AdminVerifyOrderStatusNoteInOrderSalesReportPageTest"> <annotations> - <features value="Reports"/> - <stories value="Order Sales Report includes canceled orders"/> + <features value="Sales"/> + <stories value="Misleading information in sales order report form."/> <group value="reports"/> - <title value="Canceled orders in order sales report"/> - <description value="Verify canceling of orders in order sales report"/> - <severity value="MAJOR"/> - <testCaseId value="AC-2222"/> + <title value="Order status note having misleading information in sales order report form."/> + <description value="Verify Order status note with accurate information in order sales report"/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7714"/> <useCaseId value="ACP2E-1477"/> </annotations> From 4ce938057de80db0294e7fd280b215420feca2ef Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 23 Jan 2023 13:35:20 +0530 Subject: [PATCH 757/985] ACP2E-1477: Order reports show incorrect results --- app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php | 2 +- app/code/Magento/Sales/i18n/en_US.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index 1a614873389f8..7b2dbccb20835 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -69,7 +69,7 @@ protected function _prepareForm() 'name' => 'show_order_statuses', 'label' => __('Order Status'), 'options' => ['0' => __('Any'), '1' => __('Specified')], - 'note' => __('Applies to Any of the Specified Order Statuses except canceled and pending orders') + 'note' => __('Applies to Any of the Specified Order Statuses except canceled orders') ], 'to' ); diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index d9ba0a654585d..fba7fc65870a5 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -159,7 +159,7 @@ Transactions,Transactions "Order View","Order View" Any,Any Specified,Specified -"Applies to Any of the Specified Order Statuses except canceled orders","Applies to Any of the Specified Order Statuses except canceled orders" +"Applies to Any of the Specified Order Statuses except canceled orders","Applies to Any of the Specified Order Statuses except canceled and pending orders" "Cart Price Rule","Cart Price Rule" Yes,Yes No,No From 6dab219ff74c148644867ca77099e442f3a9c519 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 23 Jan 2023 13:37:51 +0530 Subject: [PATCH 758/985] ACP2E-1477: Order reports show incorrect results --- app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php index 7b2dbccb20835..69391e07bbcde 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Report/Filter/Form.php @@ -16,7 +16,7 @@ class Form extends \Magento\Reports\Block\Adminhtml\Filter\Form { /** - * Order config for sales block + * Order config * * @var \Magento\Sales\Model\Order\ConfigFactory */ From e6fd1f8525363fffe3338f9731811a1aa523434d Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Fri, 6 Jan 2023 16:19:05 +0530 Subject: [PATCH 759/985] ACP2E-1478 : Bundle product import issue --- .../BundleImportExport/Model/Import/Product/Type/Bundle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php index d94413e8c2bb3..37bae5fe1bea7 100644 --- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php +++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php @@ -201,7 +201,7 @@ protected function parseSelections($rowData, $entityId) $this->_cachedOptions[$entityId][$option['name']] = $option; $this->_cachedOptions[$entityId][$option['name']]['selections'] = []; } - $this->_cachedOptions[$entityId][$option['name']]['selections'][] = $option; + $this->_cachedOptions[$entityId][$option['name']]['selections'][$option['sku']] = $option; $this->_cachedOptionSelectQuery[] = [(int)$entityId, $option['name']]; } } @@ -670,7 +670,7 @@ private function insertParentChildRelations() } } - $this->relationsDataSaver->saveProductRelations($productId, $childIds); + $this->relationsDataSaver->saveProductRelations($productId, array_unique($childIds)); } } From 5ca21c250bcb6875f779cbc94465227c4e000626 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 11 Jan 2023 01:05:24 +0530 Subject: [PATCH 760/985] ACP2E-1478 : Added MFTF test for ticket --- .../Test/Mftf/Data/ImportData.xml | 13 ++++ ...plicateBundleProductsWithoutImagesTest.xml | 78 +++++++++++++++++++ ...talog_import_duplicate_bundle_products.csv | 15 ++++ 3 files changed, 106 insertions(+) create mode 100644 app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml create mode 100644 dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/Data/ImportData.xml b/app/code/Magento/BundleImportExport/Test/Mftf/Data/ImportData.xml index af7fb0af4685d..4d8496def4772 100644 --- a/app/code/Magento/BundleImportExport/Test/Mftf/Data/ImportData.xml +++ b/app/code/Magento/BundleImportExport/Test/Mftf/Data/ImportData.xml @@ -127,4 +127,17 @@ <data key="bundleOption2Required">false</data> <data key="bundleOption2NumberOfProducts">1</data> </entity> + <entity name="ImportProduct_Bundle2" type="product"> + <data key="fileName">catalog_import_duplicate_bundle_products.csv</data> + <data key="name">import-product-bundle-with-duplicates</data> + <data key="sku">import-product-bundle2</data> + <data key="type_id">bundle</data> + <data key="attribute_set_id">4</data> + <data key="attributeSetText">Default</data> + <data key="urlKey">import-product-bundle2</data> + <data key="bundleOption1Title">Bundle Option A</data> + <data key="bundleOption1InputType">radio</data> + <data key="bundleOption1Required">true</data> + <data key="bundleOption1NumberOfProducts">2</data> + </entity> </entities> diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml b/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml new file mode 100644 index 0000000000000..d118c10073173 --- /dev/null +++ b/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminImportDuplicateBundleProductsWithoutImagesTest"> + <annotations> + <title value="Bundle product import issue"/> + <stories value="Asserting bundle product import functionality and verify data in product option "/> + <description value="The merchant is having issues with importing Bundled Products via CSV. When they import a CSV where the same SKU is duplicated, duplicated records are created for the product option."/> + <testCaseId value="ACP2E-1478"/> + <useCaseId value="ACSD-48739"/> + <features value="Sales"/> + <severity value="AVERAGE"/> + <group value="importExport"/> + <group value="Bundle"/> + </annotations> + <before> + <!-- Create Simple Product1 --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"> + <field key="name">SimpleProduct1</field> + <field key="sku">SimpleProduct1</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!-- Create Simple Product2 --> + <createData entity="SimpleProduct" stepKey="createSimpleProduct2"> + <field key="name">SimpleProduct2</field> + <field key="sku">SimpleProduct2</field> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!-- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + <deleteData url="/V1/products/{{ImportProduct_Bundle2.urlKey}}" stepKey="deleteImportedBundleProduct"/> + <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="navigateToAndResetProductGridToDefaultView"/> + <!-- Logout --> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + </after> + <!-- Import Bundle Product & Assert No Errors --> + <actionGroup ref="AdminNavigateToImportPageActionGroup" stepKey="navigateToImportPage"/> + <actionGroup ref="AdminFillImportFormActionGroup" stepKey="fillImportForm"> + <argument name="importFile" value="{{ImportProduct_Bundle2.fileName}}"/> + </actionGroup> + <actionGroup ref="AdminClickCheckDataImportActionGroup" stepKey="clickCheckData"/> + <see selector="{{AdminImportValidationMessagesSection.success}}" userInput="{{ImportCommonMessages.validFile}}" stepKey="seeCheckDataResultMessage"/> + <dontSeeElementInDOM selector="{{AdminImportValidationMessagesSection.importErrorList}}" stepKey="dontSeeErrorMessage"/> + <actionGroup ref="AdminClickImportActionGroup" stepKey="clickImport"/> + <see selector="{{AdminImportValidationMessagesSection.messageByType('success')}}" userInput="{{ImportCommonMessages.success}}" stepKey="seeImportMessage"/> + <dontSeeElementInDOM selector="{{AdminImportValidationMessagesSection.importErrorList}}" stepKey="dontSeeErrorMessage2"/> + <!-- Reindex --> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <!-- Admin: Verify Bundle Product Options Data on Edit Product Page --> + <actionGroup ref="NavigateToCreatedProductEditPageActionGroup" stepKey="goToBundleProductEditPage"> + <argument name="product" value="ImportProduct_Bundle2"/> + </actionGroup> + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> + <scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" stepKey="scrollUpABit"/> + <actionGroup ref="AdminVerifyBundleProductOptionActionGroup" stepKey="verifyBundleProductOption1"> + <argument name="optionTitle" value="{{ImportProduct_Bundle.bundleOption1Title}}"/> + <argument name="inputType" value="{{ImportProduct_Bundle.bundleOption1InputType}}"/> + <argument name="required" value="{{ImportProduct_Bundle.bundleOption1Required}}"/> + <argument name="numberOfProducts" value="{{ImportProduct_Bundle.bundleOption1NumberOfProducts}}"/> + <argument name="index" value="1"/> + </actionGroup> + </test> +</tests> diff --git a/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv b/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv new file mode 100644 index 0000000000000..43d5ef9eff0d5 --- /dev/null +++ b/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv @@ -0,0 +1,15 @@ +sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,deferred_stock_update,use_config_deferred_stock_update,related_skus,related_position,crosssell_skus,crosssell_position,upsell_skus,upsell_position,additional_images,additional_image_labels,hide_from_product_page,custom_options,giftcard_type,giftcard_allow_open_amount,giftcard_open_amount_min,giftcard_open_amount_max,giftcard_amount,use_config_is_redeemable,giftcard_is_redeemable,use_config_lifetime,giftcard_lifetime,use_config_allow_message,giftcard_allow_message,use_config_email_template,giftcard_email_template,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,bundle_shipment_type,configurable_variations,configurable_variation_labels,downloadable_links,downloadable_samples,associated_skus +import-product-bundle2,,Default,bundle,Default Category,base,import-product-bundle-with-duplicates,"<p>A well-rounded yoga workout takes more than a mat. The Sprite Yoga Companion Kit helps stock your studio with the basics you need for a full-range workout. The kit is composed of four best-selling Luma Sprite accessories in one easy bundle: statis ball, foam block, yoga strap, and foam roller. Choose sizes and colors and leave the rest to us. The kit includes:</p> +<ul> +<li> Sprite Statis Ball +<li> Sprite Foam Yoga Brick +<li> Sprite Yoga Strap +<li> Sprite Foam Roller +</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,,,,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, +import-product-bundle2,,Default,bundle,Default Category,base,import-product-bundle-with-duplicates,"<p>A well-rounded yoga workout takes more than a mat. The Sprite Yoga Companion Kit helps stock your studio with the basics you need for a full-range workout. The kit is composed of four best-selling Luma Sprite accessories in one easy bundle: statis ball, foam block, yoga strap, and foam roller. Choose sizes and colors and leave the rest to us. The kit includes:</p> +<ul> +<li> Sprite Statis Ball +<li> Sprite Foam Yoga Brick +<li> Sprite Yoga Strap +<li> Sprite Foam Roller +</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,,,,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, From 365ca44f328b235f367bafca5ae52e4a5c6bb5ae Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Wed, 11 Jan 2023 13:33:47 +0530 Subject: [PATCH 761/985] ACP2E-1478 : Removed banned words in csv --- .../_data/catalog_import_duplicate_bundle_products.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv b/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv index 43d5ef9eff0d5..ab71f02ab2aba 100644 --- a/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv +++ b/dev/tests/acceptance/tests/_data/catalog_import_duplicate_bundle_products.csv @@ -1,15 +1,15 @@ -sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,deferred_stock_update,use_config_deferred_stock_update,related_skus,related_position,crosssell_skus,crosssell_position,upsell_skus,upsell_position,additional_images,additional_image_labels,hide_from_product_page,custom_options,giftcard_type,giftcard_allow_open_amount,giftcard_open_amount_min,giftcard_open_amount_max,giftcard_amount,use_config_is_redeemable,giftcard_is_redeemable,use_config_lifetime,giftcard_lifetime,use_config_allow_message,giftcard_allow_message,use_config_email_template,giftcard_email_template,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,bundle_shipment_type,configurable_variations,configurable_variation_labels,downloadable_links,downloadable_samples,associated_skus +sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,deferred_stock_update,use_config_deferred_stock_update,related_skus,related_position,crosssell_skus,crosssell_position,upsell_skus,upsell_position,additional_images,additional_image_labels,hide_from_product_page,custom_options,use_config_is_redeemable,use_config_lifetime,use_config_allow_message,use_config_email_template,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,bundle_shipment_type,configurable_variations,configurable_variation_labels,downloadable_links,downloadable_samples,associated_skus import-product-bundle2,,Default,bundle,Default Category,base,import-product-bundle-with-duplicates,"<p>A well-rounded yoga workout takes more than a mat. The Sprite Yoga Companion Kit helps stock your studio with the basics you need for a full-range workout. The kit is composed of four best-selling Luma Sprite accessories in one easy bundle: statis ball, foam block, yoga strap, and foam roller. Choose sizes and colors and leave the rest to us. The kit includes:</p> <ul> <li> Sprite Statis Ball <li> Sprite Foam Yoga Brick <li> Sprite Yoga Strap <li> Sprite Foam Roller -</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,,,,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, +</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, import-product-bundle2,,Default,bundle,Default Category,base,import-product-bundle-with-duplicates,"<p>A well-rounded yoga workout takes more than a mat. The Sprite Yoga Companion Kit helps stock your studio with the basics you need for a full-range workout. The kit is composed of four best-selling Luma Sprite accessories in one easy bundle: statis ball, foam block, yoga strap, and foam roller. Choose sizes and colors and leave the rest to us. The kit includes:</p> <ul> <li> Sprite Statis Ball <li> Sprite Foam Yoga Brick <li> Sprite Yoga Strap <li> Sprite Foam Roller -</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,,,,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, +</ul>",,,1,Taxable Goods,"Catalog, Search",,,,,import-product-bundle2,,,,,,,,,,,,"10/25/22, 2:31 AM","10/25/22, 2:31 AM",,,Block after Info Column,,,,,,,,,,,Use config,,"activity=Yoga|Gym,category_gear=Exercise,gender=Men|Women|Unisex",0,0,1,0,0,1,1,1,10000,1,1,,1,0,1,1,0,1,0,0,0,0,1,,,,,,,,Image,,,,,,,dynamic,dynamic,Price range,dynamic,"name=Bundle Option A,type=radio,required=1,sku=SimpleProduct1,price=0.0000,default=1,default_qty=1.0000,price_type=fixed,can_change_qty=1|name=Bundle Option A,type=radio,required=1,sku=SimpleProduct2,price=0.0000,default=0,default_qty=1.0000,price_type=fixed,can_change_qty=1",together,,,,, \ No newline at end of file From dbce3a272630e182c4f35a1e673d4c2b91c18368 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Fri, 13 Jan 2023 13:16:23 +0530 Subject: [PATCH 762/985] ACP2E-1478 : added AC ticket --- .../BundleImportExport/Model/Import/Product/Type/Bundle.php | 2 +- .../AdminImportDuplicateBundleProductsWithoutImagesTest.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php index 37bae5fe1bea7..c6a6ba0eb05e5 100644 --- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php +++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php @@ -670,7 +670,7 @@ private function insertParentChildRelations() } } - $this->relationsDataSaver->saveProductRelations($productId, array_unique($childIds)); + $this->relationsDataSaver->saveProductRelations($productId, $childIds); } } diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml b/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml index d118c10073173..8796f16b27765 100644 --- a/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml +++ b/app/code/Magento/BundleImportExport/Test/Mftf/Test/AdminImportDuplicateBundleProductsWithoutImagesTest.xml @@ -13,8 +13,8 @@ <title value="Bundle product import issue"/> <stories value="Asserting bundle product import functionality and verify data in product option "/> <description value="The merchant is having issues with importing Bundled Products via CSV. When they import a CSV where the same SKU is duplicated, duplicated records are created for the product option."/> - <testCaseId value="ACP2E-1478"/> - <useCaseId value="ACSD-48739"/> + <testCaseId value="AC-7646"/> + <useCaseId value="ACP2E-1478"/> <features value="Sales"/> <severity value="AVERAGE"/> <group value="importExport"/> From cd2e3d307915fa2bf43e27c0b32e0d4b00cf222e Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 13:05:41 +0530 Subject: [PATCH 763/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- .../Sales/Model/Service/OrderService.php | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 12ff4adcc4d6a..8c8fb957f8a78 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -5,7 +5,9 @@ */ namespace Magento\Sales\Model\Service; +use Magento\Framework\App\ObjectManager; use Magento\Sales\Api\OrderManagementInterface; +use Magento\Sales\Model\OrderMutexInterface; use Magento\Payment\Gateway\Command\CommandException; use Psr\Log\LoggerInterface; @@ -59,6 +61,11 @@ class OrderService implements OrderManagementInterface */ private $logger; + /** + * @var OrderMutexInterface + */ + private $orderMutex; + /** * Constructor * @@ -71,6 +78,7 @@ class OrderService implements OrderManagementInterface * @param \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender * @param \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures * @param LoggerInterface $logger + * @param OrderMutexInterface|null $orderMutex */ public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, @@ -81,7 +89,8 @@ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender, \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures, - LoggerInterface $logger + LoggerInterface $logger, + ?OrderMutexInterface $orderMutex = null ) { $this->orderRepository = $orderRepository; $this->historyRepository = $historyRepository; @@ -92,6 +101,7 @@ public function __construct( $this->orderCommentSender = $orderCommentSender; $this->paymentFailures = $paymentFailures; $this->logger = $logger; + $this->orderMutex = $orderMutex ?: ObjectManager::getInstance()->get(OrderMutexInterface::class); } /** @@ -101,6 +111,19 @@ public function __construct( * @return bool */ public function cancel($id) + { + return $this->orderMutex->execute( + (int) $id, + \Closure::fromCallable([$this, 'cancelOrder']), + [$id] + ); + } + + /** + * @param $id + * @return bool + */ + private function cancelOrder($id): bool { $order = $this->orderRepository->get($id); if ($order->canCancel()) { From a1eed5a8d22b0a86078b10ce3f5dc88dd1847a0c Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 13:15:25 +0530 Subject: [PATCH 764/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- .../Sales/Model/Service/OrderService.php | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 8c8fb957f8a78..12ff4adcc4d6a 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -5,9 +5,7 @@ */ namespace Magento\Sales\Model\Service; -use Magento\Framework\App\ObjectManager; use Magento\Sales\Api\OrderManagementInterface; -use Magento\Sales\Model\OrderMutexInterface; use Magento\Payment\Gateway\Command\CommandException; use Psr\Log\LoggerInterface; @@ -61,11 +59,6 @@ class OrderService implements OrderManagementInterface */ private $logger; - /** - * @var OrderMutexInterface - */ - private $orderMutex; - /** * Constructor * @@ -78,7 +71,6 @@ class OrderService implements OrderManagementInterface * @param \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender * @param \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures * @param LoggerInterface $logger - * @param OrderMutexInterface|null $orderMutex */ public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, @@ -89,8 +81,7 @@ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender, \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures, - LoggerInterface $logger, - ?OrderMutexInterface $orderMutex = null + LoggerInterface $logger ) { $this->orderRepository = $orderRepository; $this->historyRepository = $historyRepository; @@ -101,7 +92,6 @@ public function __construct( $this->orderCommentSender = $orderCommentSender; $this->paymentFailures = $paymentFailures; $this->logger = $logger; - $this->orderMutex = $orderMutex ?: ObjectManager::getInstance()->get(OrderMutexInterface::class); } /** @@ -111,19 +101,6 @@ public function __construct( * @return bool */ public function cancel($id) - { - return $this->orderMutex->execute( - (int) $id, - \Closure::fromCallable([$this, 'cancelOrder']), - [$id] - ); - } - - /** - * @param $id - * @return bool - */ - private function cancelOrder($id): bool { $order = $this->orderRepository->get($id); if ($order->canCancel()) { From 87df0a5430c5dc5ecc0128b9174775a8916db80a Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 13:19:47 +0530 Subject: [PATCH 765/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- .../Sales/Model/Service/OrderService.php | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 12ff4adcc4d6a..86d4febcd9b52 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -5,8 +5,10 @@ */ namespace Magento\Sales\Model\Service; -use Magento\Sales\Api\OrderManagementInterface; +use Magento\Framework\App\ObjectManager; use Magento\Payment\Gateway\Command\CommandException; +use Magento\Sales\Api\OrderManagementInterface; +use Magento\Sales\Model\OrderMutexInterface; use Psr\Log\LoggerInterface; /** @@ -59,6 +61,11 @@ class OrderService implements OrderManagementInterface */ private $logger; + /** + * @var OrderMutexInterface + */ + private $orderMutex; + /** * Constructor * @@ -71,6 +78,7 @@ class OrderService implements OrderManagementInterface * @param \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender * @param \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures * @param LoggerInterface $logger + * @param OrderMutexInterface|null $orderMutex */ public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, @@ -81,7 +89,8 @@ public function __construct( \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender, \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures, - LoggerInterface $logger + LoggerInterface $logger, + ?OrderMutexInterface $orderMutex = null ) { $this->orderRepository = $orderRepository; $this->historyRepository = $historyRepository; @@ -92,6 +101,7 @@ public function __construct( $this->orderCommentSender = $orderCommentSender; $this->paymentFailures = $paymentFailures; $this->logger = $logger; + $this->orderMutex = $orderMutex ?: ObjectManager::getInstance()->get(OrderMutexInterface::class); } /** @@ -101,6 +111,19 @@ public function __construct( * @return bool */ public function cancel($id) + { + return $this->orderMutex->execute( + (int) $id, + \Closure::fromCallable([$this, 'cancelOrder']), + [$id] + ); + } + + /** + * @param $id + * @return bool + */ + private function cancelOrder($id): bool { $order = $this->orderRepository->get($id); if ($order->canCancel()) { From 4f1acfe35a1a1767b57258065ab9665a24bdf527 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 16:25:56 +0530 Subject: [PATCH 766/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- .../Sales/Model/Service/OrderService.php | 4 ++ .../Unit/Model/Service/OrderServiceTest.php | 71 ++++++++++++++++++- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 86d4febcd9b52..6ec83897ea7e8 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -79,6 +79,7 @@ class OrderService implements OrderManagementInterface * @param \Magento\Sales\Api\PaymentFailuresInterface $paymentFailures * @param LoggerInterface $logger * @param OrderMutexInterface|null $orderMutex + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, @@ -120,8 +121,11 @@ public function cancel($id) } /** + * Order cancel + * * @param $id * @return bool + * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ private function cancelOrder($id): bool { diff --git a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php index 28e4e763ed9a7..3adefc68ff22d 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php @@ -11,6 +11,9 @@ use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteria; use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\DB\Select; use Magento\Framework\Event\ManagerInterface; use Magento\Sales\Api\Data\OrderStatusHistorySearchResultInterface; use Magento\Sales\Api\OrderRepositoryInterface; @@ -19,7 +22,9 @@ use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Email\Sender\OrderCommentSender; use Magento\Sales\Model\Order\Status\History; +use Magento\Sales\Model\OrderMutex; use Magento\Sales\Model\OrderNotifier; +use Magento\Sales\Model\OrderMutexInterface; use Magento\Sales\Model\Service\OrderService; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -96,6 +101,21 @@ class OrderServiceTest extends TestCase */ protected $orderCommentSender; + /** + * @var MockObject|OrderMutexInterface + */ + private $orderMutexMock; + + /** + * @var MockObject|AdapterInterface + */ + private $adapterInterfaceMock; + + /** + * @var MockObject|ResourceConnection + */ + private $resourceConnectionMock; + protected function setUp(): void { $this->orderRepositoryMock = $this->getMockBuilder( @@ -165,6 +185,16 @@ protected function setUp(): void /** @var LoggerInterface|MockObject $logger */ $logger = $this->getMockForAbstractClass(LoggerInterface::class); + $this->orderMutexMock = $this->getMockForAbstractClass(OrderMutexInterface::class); + + $this->adapterInterfaceMock = $this->getMockBuilder(AdapterInterface::class) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + + $this->resourceConnectionMock = $this->getMockBuilder(ResourceConnection::class) + ->disableOriginalConstructor() + ->getMock(); + $this->orderService = new OrderService( $this->orderRepositoryMock, $this->orderStatusHistoryRepositoryMock, @@ -174,7 +204,8 @@ protected function setUp(): void $this->eventManagerMock, $this->orderCommentSender, $paymentFailures, - $logger + $logger, + new OrderMutex($this->resourceConnectionMock) ); } @@ -183,9 +214,11 @@ protected function setUp(): void */ public function testCancel() { + $orderId = 123; + $this->mockConnection($orderId); $this->orderRepositoryMock->expects($this->once()) ->method('get') - ->with(123) + ->with($orderId) ->willReturn($this->orderMock); $this->orderMock->expects($this->once()) ->method('cancel') @@ -201,9 +234,11 @@ public function testCancel() */ public function testCancelFailed() { + $orderId = 123; + $this->mockConnection($orderId); $this->orderRepositoryMock->expects($this->once()) ->method('get') - ->with(123) + ->with($orderId) ->willReturn($this->orderMock); $this->orderMock->expects($this->never()) ->method('cancel') @@ -324,4 +359,34 @@ public function testUnHold() ->willReturn($this->orderMock); $this->assertTrue($this->orderService->unHold(123)); } + + /** + * @param int $orderId + */ + private function mockConnection(int $orderId): void + { + $select = $this->createMock(Select::class); + $select->expects($this->once()) + ->method('from') + ->with('sales_order', 'entity_id') + ->willReturnSelf(); + $select->expects($this->once()) + ->method('where') + ->with('entity_id = ?', $orderId) + ->willReturnSelf(); + $select->expects($this->once()) + ->method('forUpdate') + ->with(true) + ->willReturnSelf(); + $this->adapterInterfaceMock->expects($this->once()) + ->method('select') + ->willReturn($select); + $this->resourceConnectionMock->expects($this->once()) + ->method('getConnection') + ->with('sales') + ->willReturn($this->adapterInterfaceMock); + $this->resourceConnectionMock->expects($this->once()) + ->method('getTableName') + ->willReturnArgument(0); + } } From 350b4840041bb184c1b18569c42ad5d4dce79ad3 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 18:35:45 +0530 Subject: [PATCH 767/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 4 ++-- .../Sales/Test/Unit/Model/Service/OrderServiceTest.php | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 6ec83897ea7e8..6583941f4e34b 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -123,11 +123,11 @@ public function cancel($id) /** * Order cancel * - * @param $id + * @param int $id * @return bool * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ - private function cancelOrder($id): bool + private function cancelOrder(int $id): bool { $order = $this->orderRepository->get($id); if ($order->canCancel()) { diff --git a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php index 3adefc68ff22d..09344ea068cc7 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php @@ -24,7 +24,6 @@ use Magento\Sales\Model\Order\Status\History; use Magento\Sales\Model\OrderMutex; use Magento\Sales\Model\OrderNotifier; -use Magento\Sales\Model\OrderMutexInterface; use Magento\Sales\Model\Service\OrderService; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -77,7 +76,7 @@ class OrderServiceTest extends TestCase protected $orderNotifierMock; /** - * @var MockObject|\Magento\Sales\Model\Order + * @var MockObject|Order */ protected $orderMock; @@ -101,11 +100,6 @@ class OrderServiceTest extends TestCase */ protected $orderCommentSender; - /** - * @var MockObject|OrderMutexInterface - */ - private $orderMutexMock; - /** * @var MockObject|AdapterInterface */ @@ -185,8 +179,6 @@ protected function setUp(): void /** @var LoggerInterface|MockObject $logger */ $logger = $this->getMockForAbstractClass(LoggerInterface::class); - $this->orderMutexMock = $this->getMockForAbstractClass(OrderMutexInterface::class); - $this->adapterInterfaceMock = $this->getMockBuilder(AdapterInterface::class) ->disableOriginalConstructor() ->getMockForAbstractClass(); From 9589d4789be696e36b5d1140f8d6102511b09293 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 20:43:18 +0530 Subject: [PATCH 768/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 6583941f4e34b..0b77a2aac532a 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -123,11 +123,11 @@ public function cancel($id) /** * Order cancel * - * @param int $id + * @param mixed $id * @return bool * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ - private function cancelOrder(int $id): bool + private function cancelOrder($id): bool { $order = $this->orderRepository->get($id); if ($order->canCancel()) { From 791854b144c0e8b70b51faac4164365aebed6a0a Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 13 Jan 2023 20:44:04 +0530 Subject: [PATCH 769/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 0b77a2aac532a..2234e8ed877d1 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -123,7 +123,7 @@ public function cancel($id) /** * Order cancel * - * @param mixed $id + * @param int $id * @return bool * @SuppressWarnings(PHPMD.UnusedPrivateMethod) */ From 96f6033d5b7a5aeb6d61a8287abbbda1e94090b0 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Mon, 16 Jan 2023 20:31:33 +0530 Subject: [PATCH 770/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 2234e8ed877d1..39cadd3ed0d2e 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -113,6 +113,7 @@ public function __construct( */ public function cancel($id) { + // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)" return $this->orderMutex->execute( (int) $id, \Closure::fromCallable([$this, 'cancelOrder']), From c48c8cbee76ffc56506321e0d169975fc4b584ae Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 17 Jan 2023 09:51:48 +0530 Subject: [PATCH 771/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 39cadd3ed0d2e..c03ee759f40f0 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -113,9 +113,9 @@ public function __construct( */ public function cancel($id) { - // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)" return $this->orderMutex->execute( (int) $id, + // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)" \Closure::fromCallable([$this, 'cancelOrder']), [$id] ); From 11605f56d480eacd0616e5c67ae5bc182c39810d Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 17 Jan 2023 11:26:44 +0530 Subject: [PATCH 772/985] ACP2E-1492: [Magento Cloud] Multi-source inventory duplicate entries for 'order_canceled' --- app/code/Magento/Sales/Model/Service/OrderService.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index c03ee759f40f0..2234e8ed877d1 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -115,7 +115,6 @@ public function cancel($id) { return $this->orderMutex->execute( (int) $id, - // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)" \Closure::fromCallable([$this, 'cancelOrder']), [$id] ); From 3e299211f5f64c52aef46c0051d0b87bdca0af8a Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Fri, 13 Jan 2023 21:44:00 +0530 Subject: [PATCH 773/985] ACP2E-1527: Country not updating properly in Tax Rate --- app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml index 0141101ef5a78..f0cee37ffe288 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml @@ -53,6 +53,9 @@ require([ value = ''; } dialogElement.find('[name="' + key + '"]').attr('value', value); + if (key === 'tax_country_id') { + $('#tax_country_id option[value="' + value + '"]').attr("selected", "selected"); + } }); }, updateItemRate: function() { From fd2c6383261a959d34b6726426cf7278d3a1d645 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Fri, 3 Feb 2023 10:02:23 -0600 Subject: [PATCH 774/985] ACP2E-1565: [Cloud] Import Product images issues --- .../Import/ImportWithNotExistImagesTest.php | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ImportWithNotExistImagesTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ImportWithNotExistImagesTest.php index c7e82bb628233..5ff276abb0c40 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ImportWithNotExistImagesTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ImportWithNotExistImagesTest.php @@ -109,10 +109,11 @@ protected function tearDown(): void /** * @magentoDataFixture Magento/Catalog/_files/product_with_image.php - * + * @dataProvider unexistingImagesDataProvider + * @param string $imagesPath * @return void */ - public function testImportWithUnexistingImages(): void + public function testImportWithUnexistingImages(string $imagesPath): void { $cache = $this->objectManager->get(\Magento\Framework\App\Cache::class); $cache->clean(); @@ -132,7 +133,7 @@ public function testImportWithUnexistingImages(): void $this->assertTrue($this->directory->isExist($this->filePath), 'Products were not imported to file'); $fileContent = $this->getCsvData($this->directory->getAbsolutePath($this->filePath)); $this->assertCount(2, $fileContent); - $this->updateFileImagesToInvalidValues(); + $this->updateFileImagesToInvalidValues($imagesPath); $mediaDirectory = $this->fileSystem->getDirectoryWrite(DirectoryList::MEDIA); $mediaDirectory->create('import'); $this->import->setParameters([ @@ -144,6 +145,17 @@ public function testImportWithUnexistingImages(): void $this->assertProductImages('/m/a/magento_image.jpg', 'simple'); } + /** + * @return array + */ + public function unexistingImagesDataProvider(): array + { + return [ + ['/m/a/invalid_image.jpg'], + ['http://127.0.0.1/pub/static/nonexistent_image.jpg'], + ]; + } + /** * Export products from queue to csv file * @@ -158,9 +170,10 @@ private function exportProducts(): void /** * Change image names in an export file * + * @param string $imagesPath * @return void */ - private function updateFileImagesToInvalidValues(): void + private function updateFileImagesToInvalidValues(string $imagesPath): void { $absolutePath = $this->directory->getAbsolutePath($this->filePath); $csv = $this->getCsvData($absolutePath); @@ -171,7 +184,7 @@ private function updateFileImagesToInvalidValues(): void } foreach ($imagesPositions as $imagesPosition) { - $csv[1][$imagesPosition] = '/m/a/invalid_image.jpg'; + $csv[1][$imagesPosition] = $imagesPath; } $this->appendCsvData($absolutePath, $csv); From a7a42d362862dd478c10e4fc39a365aba7b3c534 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 3 Feb 2023 21:39:41 +0530 Subject: [PATCH 775/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../Tax/view/adminhtml/templates/rule/edit.phtml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml index f0cee37ffe288..bb3640c378ac9 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml @@ -31,15 +31,17 @@ require([ this._getFormData(this.options.itemRateDefault); }, openModal: function() { - var zipIsRange = this.modal.find('#zip_is_range'); + var zipIsRange = this.modal.find('#zip_is_range'), + rate = this.options.itemRateDefault; - this._applyItem(this.options.itemRateDefault); if (this.options.itemRate && !$.isEmptyObject(this.options.itemRate)) { - this._applyItem(this.options.itemRate); + rate = {...rate, ...this.options.itemRate}; } + this._applyItem(rate); zipIsRange.attr('checked', zipIsRange.val() == 1); zipIsRange.trigger('change'); updater.update(); + this._applyItem(rate); this._super(); }, closeModal: function() { @@ -52,10 +54,7 @@ require([ if (!value) { value = ''; } - dialogElement.find('[name="' + key + '"]').attr('value', value); - if (key === 'tax_country_id') { - $('#tax_country_id option[value="' + value + '"]').attr("selected", "selected"); - } + dialogElement.find('[name="' + key + '"]').val(value); }); }, updateItemRate: function() { From b9ceb9e88dccbf63eb70ad0ceff3199a61dcfa24 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 23 Jan 2023 13:10:47 +0530 Subject: [PATCH 776/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../AdminReopenTaxRulePageActionGroup.xml | 29 ++++++++++ .../AdminUpdateTaxRulePageActionGroup.xml | 35 ++++++++++++ ...AssertCountryAndRegionValueActionGroup.xml | 27 +++++++++ .../Mftf/Section/AdminTaxRuleFormSection.xml | 1 + ...inUpdateTaxRateFormFromTaxRulePageTest.xml | 56 +++++++++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml create mode 100644 app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml new file mode 100644 index 0000000000000..58e6987c8beb6 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminReopenTaxRulePageActionGroup"> + <annotations> + <description>Open tax rule page.Update country and region value of tax rate popup.</description> + </annotations> + <arguments> + <argument name="code" type="string"/> + </arguments> + <fillField selector="{{AdminTaxRuleGridSection.code}}" userInput="{{code}}" stepKey="fillTaxRuleCode"/> + <click selector="{{AdminTaxRuleGridSection.search}}" stepKey="clickSearch"/> + <waitForPageLoad stepKey="waitForTaxRuleSearch"/> + <click selector="{{AdminTaxRuleGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> + <waitForPageLoad stepKey="waitForTaxRulePage"/> + <fillField selector="{{AdminTaxRuleFormSection.taxRateSearch}}" userInput="$$initialTaxRate.code$$" stepKey="fillTaxRateSearch"/> + <wait stepKey="waitForTaxRateSearch" time="5" /> + <click selector="{{AdminTaxRuleFormSection.taxRateOption($$initialTaxRate.code$$)}}" stepKey="selectNeededItem3" /> + <click selector="{{AdminTaxRuleFormSection.taxRateEditButton}}" stepKey="clickMultiSelectEdit"/> + <wait stepKey="waitForTaxRateModal" time="5" /> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml new file mode 100644 index 0000000000000..0ef08e71a5081 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminUpdateTaxRulePageActionGroup"> + <annotations> + <description>Open tax rule page.Update country and region value of tax rate popup.Verify successfully save message.</description> + </annotations> + <arguments> + <argument name="code" type="string"/> + <argument name="country" type="string"/> + <argument name="state" type="string"/> + </arguments> + <fillField selector="{{AdminTaxRuleFormSection.code}}" userInput="{{code}}" stepKey="fillTaxRuleCode"/> + <fillField selector="{{AdminTaxRuleFormSection.taxRateSearch}}" userInput="$$initialTaxRate.code$$" stepKey="fillTaxRateSearch"/> + <wait stepKey="waitForSearch" time="5" /> + <click selector="{{AdminTaxRuleFormSection.taxRateOption($$initialTaxRate.code$$)}}" stepKey="selectNeededItem" /> + <click selector="{{AdminTaxRuleFormSection.taxRateEditButton}}" stepKey="selectNeededItem2"/> + <selectOption selector="{{AdminTaxRateFormSection.country}}" userInput="{{country}}" stepKey="selectCountry1"/> + <selectOption selector="{{AdminTaxRateFormSection.state}}" userInput="{{state}}" stepKey="selectState" /> + <click selector="button.action-save.action-primary" stepKey="clickSave"/> + <waitForPageLoad stepKey="waitForTaxRateSaved" /> + <click selector="{{AdminTaxRuleFormSection.save}}" stepKey="saveTaxRule" /> + <waitForPageLoad stepKey="waitForTaxRuleSaved" /> + <!-- Verify we see success message --> + <see selector="{{AdminTaxRuleGridSection.successMessage}}" userInput="You saved the tax rule." stepKey="assertTaxRuleSuccessMessage" /> + + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml new file mode 100644 index 0000000000000..65a131ac656c3 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <!--Add Customer Tax Class--> + <actionGroup name="AssertCountryAndRegionValueActionGroup"> + <annotations> + <description>Verify country and state value.</description> + </annotations> + <arguments> + <argument name="value" type="string"/> + <argument name="expectedValue" type="string"/> + </arguments> + + <executeJS function="return document.getElementById("{{value}}").value;" stepKey="value"/> + <assertEquals stepKey="assertRegionValue"> + <actualResult type="variable">$value</actualResult> + <expectedResult type="string">{{expectedValue}}</expectedResult> + </assertEquals> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleFormSection.xml b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleFormSection.xml index 9df8125861921..2ada8547f78de 100644 --- a/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleFormSection.xml +++ b/app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRuleFormSection.xml @@ -27,5 +27,6 @@ <element name="priority" type="text" selector="#priority"/> <element name="sortOrder" type="text" selector="#position"/> <element name="calculateSubtotal" type="checkbox" selector="[name='calculate_subtotal']"/> + <element name="taxRateEditButton" type="button" selector="div.admin__field.field.field-tax_rate.required._required div.mselect-list-item .mselect-edit"/> </section> </sections> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml new file mode 100644 index 0000000000000..7c7002ea4b308 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminUpdateTaxRateFormFromTaxRulePageTest"> + <annotations> + <stories value="Country and region not updating properly in Tax Rate"/> + <title value="Country not updating properly in Tax Rate"/> + <description value="Tax Rate Country and region doesn't update when we try it through Tax Rule."/> + <testCaseId value="AC-7782"/> + <useCaseId value="ACP2E-1527"/> + <severity value="CRITICAL"/> + <group value="tax"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <createData entity="defaultTaxRate" stepKey="initialTaxRate"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + <after> + <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule"> + <argument name="taxRuleCode" value="{{SimpleTaxRule.code}}" /> + </actionGroup> + <deleteData stepKey="deleteTaxRate" createDataKey="initialTaxRate" /> + </after> + + <actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRuleIndex1"/> + <actionGroup ref="AdminClickAddTaxRuleButtonActionGroup" stepKey="clickAddNewTaxRuleButton"/> + <!-- Update a tax rate country and region value --> + <actionGroup ref="AdminUpdateTaxRulePageActionGroup" stepKey="updateTaxRateValue"> + <argument name="code" value="{{SimpleTaxRule.code}}"/> + <argument name="country" value="{{taxRateCustomRateCanada.tax_country_id}}"/> + <argument name="state" value="66"/> + </actionGroup> + <!-- open tax rule page and tax rate modal--> + <actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clickClearFilters2"/> + <actionGroup ref="AdminReopenTaxRulePageActionGroup" stepKey="reopenTaxRateModal"> + <argument name="code" value="{{SimpleTaxRule.code}}"/> + </actionGroup> + <!-- Verify we see success message --> + <actionGroup ref="AssertCountryAndRegionValueActionGroup" stepKey="verifyCountryValue"> + <argument name="value" value="tax_country_id"/> + <argument name="expectedValue" value="{{taxRateCustomRateCanada.tax_country_id}}"/> + </actionGroup> + <actionGroup ref="AssertCountryAndRegionValueActionGroup" stepKey="verifyRegionValue"> + <argument name="value" value="tax_region_id"/> + <argument name="expectedValue" value="66"/> + </actionGroup> + </test> +</tests> From 06c05da1ed5daa5c539394d72dc07a886fb80f1c Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Tue, 24 Jan 2023 00:32:56 +0530 Subject: [PATCH 777/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml index 7c7002ea4b308..b4e9f7624a9ef 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml @@ -17,7 +17,6 @@ <useCaseId value="ACP2E-1527"/> <severity value="CRITICAL"/> <group value="tax"/> - <group value="mtf_migrated"/> </annotations> <before> <createData entity="defaultTaxRate" stepKey="initialTaxRate"/> From 89df395ce7addd20a25bec0d037dc9a997c965dc Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 25 Jan 2023 22:04:14 +0530 Subject: [PATCH 778/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml | 2 +- .../ActionGroup/AssertCountryAndRegionValueActionGroup.xml | 3 +-- .../Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml index 58e6987c8beb6..61dd0d65b5785 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminReopenTaxRulePageActionGroup"> <annotations> - <description>Open tax rule page.Update country and region value of tax rate popup.</description> + <description>Open tax rule page to update country and region value of tax rate modal and verify successfully save message.</description> </annotations> <arguments> <argument name="code" type="string"/> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml index 65a131ac656c3..07ced4494bdf5 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AssertCountryAndRegionValueActionGroup.xml @@ -8,10 +8,9 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <!--Add Customer Tax Class--> <actionGroup name="AssertCountryAndRegionValueActionGroup"> <annotations> - <description>Verify country and state value.</description> + <description>Verify country and region values.</description> </annotations> <arguments> <argument name="value" type="string"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml index b4e9f7624a9ef..d419b58bef197 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminUpdateTaxRateFormFromTaxRulePageTest.xml @@ -10,9 +10,9 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="AdminUpdateTaxRateFormFromTaxRulePageTest"> <annotations> - <stories value="Country and region not updating properly in Tax Rate"/> - <title value="Country not updating properly in Tax Rate"/> - <description value="Tax Rate Country and region doesn't update when we try it through Tax Rule."/> + <stories value="Country and region updating properly in Tax Rate pop-up."/> + <title value="Country and region updating properly in Tax Rate."/> + <description value="Tax Rate country and region update when changed through Tax Rule."/> <testCaseId value="AC-7782"/> <useCaseId value="ACP2E-1527"/> <severity value="CRITICAL"/> From 5648a92fdb3adf1d98d7e46bd892bd9711311052 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 25 Jan 2023 22:08:07 +0530 Subject: [PATCH 779/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml index 61dd0d65b5785..11c89022428eb 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminReopenTaxRulePageActionGroup"> <annotations> - <description>Open tax rule page to update country and region value of tax rate modal and verify successfully save message.</description> + <description>Open1 tax rule page to update country and region value of tax rate modal and verify successfully save message.</description> </annotations> <arguments> <argument name="code" type="string"/> From e56184891f2e87276159ae831c9c20441d219d96 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 25 Jan 2023 22:11:08 +0530 Subject: [PATCH 780/985] ACP2E-1527: Country not updating properly in Tax Rate --- .../Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml | 2 +- .../Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml index 11c89022428eb..e2f966cd10868 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminReopenTaxRulePageActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminReopenTaxRulePageActionGroup"> <annotations> - <description>Open1 tax rule page to update country and region value of tax rate modal and verify successfully save message.</description> + <description>Open tax rule page. Update country and region value of tax rate modal.</description> </annotations> <arguments> <argument name="code" type="string"/> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml index 0ef08e71a5081..dcf3d3bf8ecde 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminUpdateTaxRulePageActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminUpdateTaxRulePageActionGroup"> <annotations> - <description>Open tax rule page.Update country and region value of tax rate popup.Verify successfully save message.</description> + <description>Open tax rule page to update country and region value of tax rate modal and verify successfully save message.</description> </annotations> <arguments> <argument name="code" type="string"/> From 29dbfce41d62fd524bc7c594a0e4ae9a81e83d45 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Thu, 5 Jan 2023 12:07:45 +0530 Subject: [PATCH 781/985] ACP2E-1496: [Magento Cloud] - One-time use coupon per customer becomes invalid even when order was cancelled --- app/code/Magento/SalesRule/Model/Coupon/UpdateCouponUsages.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Model/Coupon/UpdateCouponUsages.php b/app/code/Magento/SalesRule/Model/Coupon/UpdateCouponUsages.php index d664cf30f570e..2d4535120b1ea 100644 --- a/app/code/Magento/SalesRule/Model/Coupon/UpdateCouponUsages.php +++ b/app/code/Magento/SalesRule/Model/Coupon/UpdateCouponUsages.php @@ -8,6 +8,7 @@ namespace Magento\SalesRule\Model\Coupon; use Magento\Sales\Api\Data\OrderInterface; +use Magento\Sales\Model\Order; use Magento\SalesRule\Model\Coupon\Usage\Processor as CouponUsageProcessor; use Magento\SalesRule\Model\Coupon\Usage\UpdateInfo; use Magento\SalesRule\Model\Coupon\Usage\UpdateInfoFactory; @@ -59,7 +60,7 @@ public function execute(OrderInterface $subject, bool $increment): OrderInterfac $updateInfo->setCustomerId((int)$subject->getCustomerId()); $updateInfo->setIsIncrement($increment); - if ($subject->getOrigData('coupon_code') !== null) { + if ($subject->getOrigData('coupon_code') !== null && $subject->getStatus() !== Order::STATE_CANCELED) { $updateInfo->setCouponAlreadyApplied(true); } From 2b6fd31935825632a5317018d8584207ed7ab491 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Mon, 9 Jan 2023 14:12:04 +0530 Subject: [PATCH 782/985] ACP2E-1496: [Magento Cloud] - One-time use coupon per customer becomes invalid even when order was cancelled --- .../CreateCartPriceRuleActionGroup.xml | 26 ++++ ...tReuseCouponCodeAfterOrderCanceledTest.xml | 138 ++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/CreateCartPriceRuleActionGroup.xml create mode 100644 app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/CreateCartPriceRuleActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/CreateCartPriceRuleActionGroup.xml new file mode 100644 index 0000000000000..402d549b8c7b8 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/CreateCartPriceRuleActionGroup.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="CreateCartPriceRuleActionGroup"> + <annotations> + <description>Goes to the Admin Cart Price Rule grid page. Clicks on Add New Rule. Fills the provided Rule (Name). Selects websites menu.</description> + </annotations> + <arguments> + <argument name="ruleName" type="string" defaultValue="{{CatPriceRule.name}}"/> + <argument name="websiteName" type="string" defaultValue="{{CatPriceRule.websites}}"/> + </arguments> + + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> + <waitForPageLoad stepKey="waitForPriceList"/> + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ruleName}}" stepKey="fillRuleName"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{websiteName}}" stepKey="selectWebsites"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml new file mode 100644 index 0000000000000..e392c5308df52 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontReuseCouponCodeAfterOrderCanceledTest"> + <annotations> + <features value="SalesRule"/> + <stories value="One-time use coupon per customer becomes invalid even when order was cancelled"/> + <title value="[Magento Cloud] - One-time use coupon per customer becomes invalid even when order was cancelled"/> + <description value="[Magento Cloud] - One-time use coupon per customer becomes invalid even when order was cancelled."/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7591"/> + <useCaseId value="ACP2E-1496"/> + <group value="salesRule"/> + </annotations> + + <before> + <!-- Create customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <!-- Create simple product--> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> + <!-- Login as Admin --> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <!-- Delete the cart price rule we made during the test --> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Add new cart price rule --> + <actionGroup ref="CreateCartPriceRuleActionGroup" stepKey="createCartRule"> + <argument name="ruleName" value="{{CatPriceRule.name}}"/> + <argument name="websiteName" value="{{CatPriceRule.websites}}"/> + </actionGroup> + + <!-- Select custom customer group --> + <actionGroup ref="CatalogSelectCustomerGroupActionGroup" stepKey="selectCustomCustomerGroup"> + <argument name="customerGroupName" value="{{GeneralCustomerGroup.code}}"/> + </actionGroup> + + <!-- Cart Price Rule coupon info --> + <actionGroup ref="AdminCartPriceRuleFillCouponInfoActionGroup" stepKey="fillCartPriceRuleCouponInfo"> + <argument name="couponCode" value="{{CatPriceRule.coupon_code}}"/> + <argument name="userPerCoupon" value="1"/> + <argument name="userPerCustomer" value="1"/> + </actionGroup> + + <scrollTo selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="scrollToActionsHeader"/> + <!--Fill values for Action Section--> + <actionGroup ref="AdminCreateCartPriceRuleActionsSectionDiscountFieldsActionGroup" stepKey="createActiveCartPriceRuleActionsSection"> + <argument name="rule" value="CartPriceRuleConditionAndFreeShippingApplied"/> + </actionGroup> + + <scrollTo selector="{{AdminCartPriceRulesFormSection.labelsHeader}}" stepKey="scrollToLabelsHeader"/> + <!--Save Cart Price Rule--> + <actionGroup ref="AssertCartPriceRuleSuccessSaveMessageActionGroup" stepKey="seeAssertCartPriceRuleSuccessSaveMessage"/> + + <!--Login to Frontend--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$" /> + </actionGroup> + + <!-- Open the Product Page, add the product to Cart, go to Shopping Cart and Apply the same coupon code --> + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="openProductPage"/> + <waitForPageLoad stepKey="waitForPageLoad2"/> + <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartPriceRule"> + <argument name="product" value="$$createSimpleProduct$$"/> + <argument name="couponCode" value="{{CatPriceRule.coupon_code}}"/> + </actionGroup> + <waitForText userInput='You used coupon code "{{CatPriceRule.coupon_code}}"' stepKey="waitForText"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{{CatPriceRule.coupon_code}}"' stepKey="seeSuccessMessage1"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible"/> + + <!--Proceed to checkout for customer details--> + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> + <waitForElement selector="{{CheckoutShippingSection.shippingTab}}" stepKey="waitForCheckoutPage"/> + <actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/> + <actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"> + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> + </actionGroup> + <magentoCLI command="cron:run" stepKey="runCronAfterPlacingOrder"/> + + <!-- Get Order id --> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> + <!-- Assert Cart is Empty --> + <actionGroup ref="AssertShoppingCartIsEmptyActionGroup" stepKey="seeEmptyShoppingCartForFirstCustomer"/> + + <!--Assert Order is In Orders Grid --> + <actionGroup ref="AdminOrderFilterByOrderIdAndStatusActionGroup" stepKey="seeFirstOrder"> + <argument name="orderId" value="$grabOrderNumber"/> + <argument name="orderStatus" value="Pending"/> + </actionGroup> + + <!-- Navigate to admin order detail page --> + <amOnPage url="{{AdminOrderPage.url({$grabOrderNumber})}}" stepKey="navigateToOrderPage1"/> + <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage" after="navigateToOrderPage1"/> + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingStatus" after="seeViewOrderPage"/> + <!-- Cancel order --> + <actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/> + <waitForPageLoad stepKey="waitForOrderDetailsToLoad"/> + <magentoCLI command="cron:run" stepKey="runCronAfterCancelingOrder"/> + + <!-- Open My Account Page from Customer dropdown --> + <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/> + + <!-- Goto Orders tab from Sidebar menu in Storefront page --> + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu"> + <argument name="menu" value="My Orders"/> + </actionGroup> + + <!-- Clicking View Order from My Orders Grid --> + <actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/> + + <!-- Clicking on Reorder link from Order Details Tab --> + <click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/> + + <!-- Reuse coupon code --> + <click selector="{{DiscountSection.DiscountTab}}" stepKey="clickToDiscountTab"/> + <fillField selector="{{DiscountSection.CouponInput}}" userInput="{{CatPriceRule.coupon_code}}" stepKey="fillCouponCode"/> + <click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="applyCode"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <waitForText userInput='You used coupon code "{{CatPriceRule.coupon_code}}"' stepKey="waitForText2"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput='You used coupon code "{{CatPriceRule.coupon_code}}"' stepKey="seeSuccessMessage2"/> + <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" time="30" stepKey="waitForElementDiscountVisible1"/> + </test> +</tests> From 87d9c07c253d1bb862775840b695dad50ef9e24e Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Sat, 28 Jan 2023 09:55:10 +0530 Subject: [PATCH 783/985] ACP2E-1496: [Magento Cloud] - One-time use coupon per customer becomes invalid even when order was cancelled --- .../Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml index e392c5308df52..6e3ca918adfd4 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml @@ -31,6 +31,9 @@ <after> <!-- Delete the cart price rule we made during the test --> + <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule"> + <argument name="ruleName" value="{{CatPriceRule.name}}"/> + </actionGroup> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> From 925cbf00ad42b0258eb55c7897109e10c2100aed Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Tue, 27 Dec 2022 19:34:21 +0530 Subject: [PATCH 784/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index 97b57317851fc..96805fc62c064 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -232,7 +232,7 @@ private function handleImageRemoveError($postData, $productId) $expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount; $product = $this->productRepository->getById($productId); $images = $product->getMediaGallery('images'); - if (is_array($images) && $expectedImagesAmount != count($images)) { + if (is_array($images) && $expectedImagesAmount >= count(array_map('count', $images))) { $this->messageManager->addNoticeMessage( __('The image cannot be removed as it has been assigned to the other image role') ); From 08044dd7bb94a57a8f245424015b93103c55c047 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Wed, 28 Dec 2022 00:15:48 +0530 Subject: [PATCH 785/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index 96805fc62c064..5d4000407ebd4 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -295,6 +295,7 @@ private function copyToStore($data, $productId, $store) * * @return DataPersistorInterface|mixed * @deprecated 101.0.0 + * @see we don't recommend this approach anymore */ protected function getDataPersistor() { From 848042d153f634b32b1c55ddc0f59a51a45ace9a Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Fri, 30 Dec 2022 03:29:17 +0530 Subject: [PATCH 786/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- .../Test/AdminDeleteProductsImageTest.xml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml new file mode 100644 index 0000000000000..65e0d53c4d28a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminDeleteProductsImageTest"> + <annotations> + <stories value="Product with any custom option causes an error when deleting product images"/> + <features value="Catalog"/> + <title value="Error occurred while delete products image any custom option"/> + <description value="When a product is created with custom option and added images, then save the product after deleting the image, Magento shows a warming message."/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7556"/> + <useCaseId value="ACP2E-1479"/> + <group value="Catalog"/> + </annotations> + <before> + <!--Login as admin--> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <createData entity="SimpleProduct2" stepKey="createProduct"/> + <createData entity="SubCategory" stepKey="createSubCategory"/> + <createData entity="NewRootCategory" stepKey="createRootCategory"/> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="visitAdminProductPage"> + <argument name="productId" value="$$createProduct.id$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad0"/> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="['Default Category', $$createRootCategory.name$$, $$createSubCategory.name$$]" stepKey="fillCategory"/> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> + <!--Add images to the product--> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="visitAdminProductPage2"> + <argument name="productId" value="$$createProduct.id$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad1"/> + <actionGroup ref="AddProductImageActionGroup" stepKey="addImageToProduct"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="AddProductImageActionGroup" stepKey="addImage1ToProduct"> + <argument name="image" value="TestImageNew"/> + </actionGroup> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct1"/> + </before> + <after> + <deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="createRootCategory" stepKey="deleteRootCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + <!--Open product page on admin--> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> + <argument name="productId" value="$$createProduct.id$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad2"/> + <!--Remove product image and save--> + <actionGroup ref="RemoveProductImageByNameActionGroup" stepKey="removeProductImage"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct5"/> + <!--Assert notification and success messages--> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> + <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> + <!--Reopen image tab and see the image is not deleted--> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> + <waitForPageLoad stepKey="waitForImagesLoad"/> + <dontSeeElement selector="{{AdminProductImagesSection.imageFile(ProductImage.fileName)}}" stepKey="seeImageIsNotDeleted"/> + </test> +</tests> From 2a7a738fc2eef0f0cd5d6ee4cfe7a0b770cea12f Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Fri, 30 Dec 2022 22:59:14 +0530 Subject: [PATCH 787/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- ...eProductsImageInCaseOfMultipleStoresTest.xml | 2 +- ...DeleteProductsImageWithCustomOptionTest.xml} | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) rename app/code/Magento/Catalog/Test/Mftf/Test/{AdminDeleteProductsImageTest.xml => AdminDeleteProductsImageWithCustomOptionTest.xml} (82%) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml index 6712bf90c4700..8c1d98f2f0d6b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml @@ -154,7 +154,7 @@ <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct7"/> <!--Assert notification and success messages--> <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage2"/> - <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification2"/> + <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification2"/> <!--Reopen image tab and see the image is not deleted--> <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab2"/> <waitForPageLoad stepKey="waitForImagesLoad2"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml similarity index 82% rename from app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml index 65e0d53c4d28a..2189a5626fcbc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminDeleteProductsImageTest"> + <test name="AdminDeleteProductsImageWithCustomOptionTest"> <annotations> <stories value="Product with any custom option causes an error when deleting product images"/> <features value="Catalog"/> @@ -29,8 +29,6 @@ <argument name="productId" value="$$createProduct.id$$"/> </actionGroup> <waitForPageLoad stepKey="waitForProductPageLoad0"/> - <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="['Default Category', $$createRootCategory.name$$, $$createSubCategory.name$$]" stepKey="fillCategory"/> - <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> <!--Add images to the product--> <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="visitAdminProductPage2"> <argument name="productId" value="$$createProduct.id$$"/> @@ -39,9 +37,17 @@ <actionGroup ref="AddProductImageActionGroup" stepKey="addImageToProduct"> <argument name="image" value="ProductImage"/> </actionGroup> - <actionGroup ref="AddProductImageActionGroup" stepKey="addImage1ToProduct"> - <argument name="image" value="TestImageNew"/> + <!-- opens the custom option panel and clicks add options --> + <click stepKey="openCustomizableOptions" selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}"/> + <waitForPageLoad stepKey="waitForCustomOptionsOpen"/> + + <!-- Create a custom option with 2 values --> + <actionGroup ref="CreateCustomRadioOptionsActionGroup" stepKey="createCustomOption1"> + <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> + <argument name="productOption" value="ProductOptionField"/> + <argument name="productOption2" value="ProductOptionField2"/> </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad2"/> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct1"/> </before> <after> @@ -54,7 +60,6 @@ <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> <argument name="productId" value="$$createProduct.id$$"/> </actionGroup> - <waitForPageLoad stepKey="waitForProductPageLoad2"/> <!--Remove product image and save--> <actionGroup ref="RemoveProductImageByNameActionGroup" stepKey="removeProductImage"> <argument name="image" value="ProductImage"/> From b40dcad0e39b0b2c4937b93e72aeab978bbcba12 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Sat, 31 Dec 2022 02:49:52 +0530 Subject: [PATCH 788/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- .../Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml index 8c1d98f2f0d6b..6d58ebe5c61b2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml @@ -127,7 +127,7 @@ <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct5"/> <!--Assert notification and success messages--> <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> - <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> + <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> <!--Reopen image tab and see the image is not deleted--> <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> <waitForPageLoad stepKey="waitForImagesLoad"/> From 8b1debae90e8391bdb556587328294b470e8bec0 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Tue, 3 Jan 2023 17:18:17 +0530 Subject: [PATCH 789/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index 5d4000407ebd4..a6af80e559d58 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -232,7 +232,7 @@ private function handleImageRemoveError($postData, $productId) $expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount; $product = $this->productRepository->getById($productId); $images = $product->getMediaGallery('images'); - if (is_array($images) && $expectedImagesAmount >= count(array_map('count', $images))) { + if (is_array($images) && $expectedImagesAmount >= count($images)) { $this->messageManager->addNoticeMessage( __('The image cannot be removed as it has been assigned to the other image role') ); From 58d133817c3df821d2ec5ecfbe7d9178ec1ecdd8 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Tue, 3 Jan 2023 17:34:56 +0530 Subject: [PATCH 790/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- .../Catalog/Controller/Adminhtml/Product/Save.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index a6af80e559d58..ac79febc65686 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -223,16 +223,23 @@ private function handleImageRemoveError($postData, $productId) { if (isset($postData['product']['media_gallery']['images'])) { $removedImagesAmount = 0; + $removedImages = []; foreach ($postData['product']['media_gallery']['images'] as $image) { if (!empty($image['removed'])) { $removedImagesAmount++; + $removedImages[] = $image['value_id']; } } if ($removedImagesAmount) { $expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount; $product = $this->productRepository->getById($productId); $images = $product->getMediaGallery('images'); - if (is_array($images) && $expectedImagesAmount >= count($images)) { + foreach ($images as $key => $imageItem) { + if (in_array($imageItem['value_id'], $removedImages)) { + unset($images[$key]); + } + } + if (is_array($images) && $expectedImagesAmount != count($images)) { $this->messageManager->addNoticeMessage( __('The image cannot be removed as it has been assigned to the other image role') ); From ae0678ea17b5ce2511ee7fd9c1ff7746ffdd0285 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 9 Jan 2023 23:06:18 +0530 Subject: [PATCH 791/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- .../Catalog/Controller/Adminhtml/Product/Save.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index ac79febc65686..b1682a81d4bc6 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -141,6 +141,7 @@ public function execute() $originalSku = $product->getSku(); $canSaveCustomOptions = $product->getCanSaveCustomOptions(); $product->save(); + $this->handleImageRemoveError($data, $product->getId()); $productId = $product->getEntityId(); $productAttributeSetId = $product->getAttributeSetId(); @@ -213,7 +214,7 @@ public function execute() /** * Notify customer when image was not deleted in specific case. * - * TODO: temporary workaround must be eliminated in MAGETWO-45306 + * TODO: temporary workaround must be eliminated in MAGETNO-45306 * * @param array $postData * @param int $productId @@ -223,22 +224,15 @@ private function handleImageRemoveError($postData, $productId) { if (isset($postData['product']['media_gallery']['images'])) { $removedImagesAmount = 0; - $removedImages = []; foreach ($postData['product']['media_gallery']['images'] as $image) { if (!empty($image['removed'])) { $removedImagesAmount++; - $removedImages[] = $image['value_id']; } } if ($removedImagesAmount) { $expectedImagesAmount = count($postData['product']['media_gallery']['images']) - $removedImagesAmount; - $product = $this->productRepository->getById($productId); + $product = $this->productRepository->getById($productId, false, null, true); $images = $product->getMediaGallery('images'); - foreach ($images as $key => $imageItem) { - if (in_array($imageItem['value_id'], $removedImages)) { - unset($images[$key]); - } - } if (is_array($images) && $expectedImagesAmount != count($images)) { $this->messageManager->addNoticeMessage( __('The image cannot be removed as it has been assigned to the other image role') From b3bb42f02916b173dcebedea2460e43504d7f920 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 9 Jan 2023 23:09:03 +0530 Subject: [PATCH 792/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php index b1682a81d4bc6..5c0068ac06edf 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php @@ -141,7 +141,6 @@ public function execute() $originalSku = $product->getSku(); $canSaveCustomOptions = $product->getCanSaveCustomOptions(); $product->save(); - $this->handleImageRemoveError($data, $product->getId()); $productId = $product->getEntityId(); $productAttributeSetId = $product->getAttributeSetId(); @@ -214,7 +213,7 @@ public function execute() /** * Notify customer when image was not deleted in specific case. * - * TODO: temporary workaround must be eliminated in MAGETNO-45306 + * TODO: temporary workaround must be eliminated in MAGETWO-45306 * * @param array $postData * @param int $productId From 62b1bc8ae8f471930bb2118613ad79e5fd0db901 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 9 Jan 2023 23:11:04 +0530 Subject: [PATCH 793/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- .../AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml index 6d58ebe5c61b2..6712bf90c4700 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml @@ -127,7 +127,7 @@ <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct5"/> <!--Assert notification and success messages--> <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> - <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> + <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> <!--Reopen image tab and see the image is not deleted--> <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> <waitForPageLoad stepKey="waitForImagesLoad"/> @@ -154,7 +154,7 @@ <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct7"/> <!--Assert notification and success messages--> <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage2"/> - <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification2"/> + <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification2"/> <!--Reopen image tab and see the image is not deleted--> <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab2"/> <waitForPageLoad stepKey="waitForImagesLoad2"/> From c70c5472ca534b8b747dcf3bd6e84c3a4007d46c Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Fri, 13 Jan 2023 21:38:44 +0530 Subject: [PATCH 794/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- ...MessagesWithoutNotificationActionGroup.xml | 28 +++++++++++ ...eleteProductsImageWithCustomOptionTest.xml | 48 +++++++------------ 2 files changed, 45 insertions(+), 31 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml new file mode 100644 index 0000000000000..dc3ab74ca3942 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="VerifySuccessMessagesWithoutNotificationActionGroup"> + <annotations> + <description>Verify the success messages without notification post product save and see the product image is deleted.</description> + </annotations> + + <arguments> + <argument name="image" defaultValue="ProductImage"/> + </arguments> + <waitForPageLoad stepKey="waitForProductPageLoad1"/> + <!--Verify notification and success messages--> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> + <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> + <!--Reopen image tab and see the image is deleted--> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> + <waitForPageLoad stepKey="waitForImagesLoad"/> + <dontSeeElement selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeImageIsNotDeleted"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml index 2189a5626fcbc..ce117d361557f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml @@ -20,57 +20,43 @@ <group value="Catalog"/> </annotations> <before> - <!--Login as admin--> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <createData entity="SimpleProduct2" stepKey="createProduct"/> - <createData entity="SubCategory" stepKey="createSubCategory"/> - <createData entity="NewRootCategory" stepKey="createRootCategory"/> - <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="visitAdminProductPage"> - <argument name="productId" value="$$createProduct.id$$"/> - </actionGroup> - <waitForPageLoad stepKey="waitForProductPageLoad0"/> + <createData entity="ApiCategory" stepKey="category"/> + <!--Create product with small, base, and thumbnail image--> + <createData entity="ApiSimpleProduct" stepKey="productWithImages"> + <requiredEntity createDataKey="category"/> + </createData> + <updateData createDataKey="productWithImages" entity="productWithOptions2" stepKey="updateProductWithCustomOption"/> <!--Add images to the product--> <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="visitAdminProductPage2"> - <argument name="productId" value="$$createProduct.id$$"/> + <argument name="productId" value="$$productWithImages.id$$"/> </actionGroup> <waitForPageLoad stepKey="waitForProductPageLoad1"/> <actionGroup ref="AddProductImageActionGroup" stepKey="addImageToProduct"> <argument name="image" value="ProductImage"/> </actionGroup> - <!-- opens the custom option panel and clicks add options --> - <click stepKey="openCustomizableOptions" selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}"/> - <waitForPageLoad stepKey="waitForCustomOptionsOpen"/> - - <!-- Create a custom option with 2 values --> - <actionGroup ref="CreateCustomRadioOptionsActionGroup" stepKey="createCustomOption1"> - <argument name="customOptionName" value="ProductOptionRadiobutton.title"/> - <argument name="productOption" value="ProductOptionField"/> - <argument name="productOption2" value="ProductOptionField2"/> - </actionGroup> <waitForPageLoad stepKey="waitForProductPageLoad2"/> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct1"/> </before> <after> - <deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/> - <deleteData createDataKey="createRootCategory" stepKey="deleteRootCategory"/> - <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <!--Delete prerequisite entities--> + <deleteData createDataKey="category" stepKey="deleteCategory"/> + <deleteData createDataKey="productWithImages" stepKey="deleteProductWithImages"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open product page on admin--> <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> - <argument name="productId" value="$$createProduct.id$$"/> + <argument name="productId" value="$$productWithImages.id$$"/> </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad1"/> <!--Remove product image and save--> - <actionGroup ref="RemoveProductImageByNameActionGroup" stepKey="removeProductImage"> + <actionGroup ref="RemoveProductImageByNameActionGroup" stepKey="removeProductFromCart2"> <argument name="image" value="ProductImage"/> </actionGroup> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct5"/> - <!--Assert notification and success messages--> - <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> - <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> - <!--Reopen image tab and see the image is not deleted--> - <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> - <waitForPageLoad stepKey="waitForImagesLoad"/> - <dontSeeElement selector="{{AdminProductImagesSection.imageFile(ProductImage.fileName)}}" stepKey="seeImageIsNotDeleted"/> + <!--Verify the success messages without notification--> + <actionGroup ref="VerifySuccessMessagesWithoutNotificationActionGroup" stepKey="verifySuccessMessages"> + <argument name="image" value="ProductImage"/> + </actionGroup> </test> </tests> From 4741e5d8a925793bd1d9141dddee50f450e8eea5 Mon Sep 17 00:00:00 2001 From: "Chhandak.Barua" <chhandak.barua@BLR1-LMC-N73490.local> Date: Mon, 23 Jan 2023 23:29:02 +0530 Subject: [PATCH 795/985] ACP2E-1479: Product with any custom option causes an error when deleting product images --- ...> VerifySuccessMessagesWithoutWarningActionGroup.xml} | 9 +-------- .../AdminDeleteProductsImageWithCustomOptionTest.xml | 4 +++- 2 files changed, 4 insertions(+), 9 deletions(-) rename app/code/Magento/Catalog/Test/Mftf/ActionGroup/{VerifySuccessMessagesWithoutNotificationActionGroup.xml => VerifySuccessMessagesWithoutWarningActionGroup.xml} (60%) diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutWarningActionGroup.xml similarity index 60% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutWarningActionGroup.xml index dc3ab74ca3942..6bd7bf90491e1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutNotificationActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/VerifySuccessMessagesWithoutWarningActionGroup.xml @@ -8,21 +8,14 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="VerifySuccessMessagesWithoutNotificationActionGroup"> + <actionGroup name="VerifySuccessMessagesWithoutWarningActionGroup"> <annotations> <description>Verify the success messages without notification post product save and see the product image is deleted.</description> </annotations> - <arguments> - <argument name="image" defaultValue="ProductImage"/> - </arguments> <waitForPageLoad stepKey="waitForProductPageLoad1"/> <!--Verify notification and success messages--> <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> <dontSee selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> - <!--Reopen image tab and see the image is deleted--> - <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> - <waitForPageLoad stepKey="waitForImagesLoad"/> - <dontSeeElement selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeImageIsNotDeleted"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml index ce117d361557f..d363229d3f434 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageWithCustomOptionTest.xml @@ -55,7 +55,9 @@ </actionGroup> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct5"/> <!--Verify the success messages without notification--> - <actionGroup ref="VerifySuccessMessagesWithoutNotificationActionGroup" stepKey="verifySuccessMessages"> + <actionGroup ref="VerifySuccessMessagesWithoutWarningActionGroup" stepKey="verifySuccessMessages"/> + <!-- Assert product first image not in admin product form --> + <actionGroup ref="AssertProductImageNotInAdminProductPageActionGroup" stepKey="assertProductImageNotInAdminProductPage"> <argument name="image" value="ProductImage"/> </actionGroup> </test> From 8652b61c909482dc37425a39b862a7d47cb3716a Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 4 Jan 2023 03:26:26 +0530 Subject: [PATCH 796/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 77ff12e3d60b6..0d3614a89d2b9 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -98,6 +98,9 @@ public function execute() ->setPid($this->getRequest()->getParam('parent_id', false)) ->setRoleType(RoleGroup::ROLE_TYPE) ->setUserType(UserContextInterface::USER_TYPE_ADMIN); + if ($this->getRequest()->getParam('gws_is_all', false)) { + $role->setGwsWebsites(null)->setGwsStoreGroups(null); + } $this->_eventManager->dispatch( 'admin_permissions_role_prepare_save', ['object' => $role, 'request' => $this->getRequest()] From 16cebdb4ca751d6e451613fcc01147f7206ab593 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 4 Jan 2023 04:14:57 +0530 Subject: [PATCH 797/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 0d3614a89d2b9..9fa207d2fed3b 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -57,6 +57,7 @@ class SaveRole extends \Magento\User\Controller\Adminhtml\User\Role implements H * * @return SecurityCookie * @deprecated 100.1.0 + * @see no longer used */ private function getSecurityCookie() { From a870cb37c65ba893d71f58b95a07471a0b1ae455 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Tue, 10 Jan 2023 02:27:20 +0530 Subject: [PATCH 798/985] =?UTF-8?q?ACP2E-1490:=20websites=20and=20store=5F?= =?UTF-8?q?groups=20id=20store=20incorrectly=20in=20the=20authorization=5F?= =?UTF-8?q?role=20table=20=C2=A0while=20changing=20the=20scope=20for=20the?= =?UTF-8?q?=20user=20role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Adminhtml/User/Role/SaveRoleTest.php | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php new file mode 100644 index 0000000000000..c6e31a3709b78 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\User\Controller\Adminhtml\User\Role; + +use Magento\Framework\Registry; +use Magento\Store\Model\Store; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\User\Controller\Adminhtml\User\Role\SaveRole; + +/** + * Test class for \Magento\User\Controller\Adminhtml\User\Role\SaveRole. + * + * @magentoAppArea adminhtml + */ +class SaveRoleTest extends \Magento\TestFramework\TestCase\AbstractBackendController +{ + /** + * Test execute method for different scopes + * + * @magentoDataFixture Magento/User/_files/user_with_custom_role.php + * @magentoDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + */ + public function testExecuteWithDifferentScopes() + { + $objectManager = Bootstrap::getObjectManager(); + $store = $objectManager->get(Store::class); + $store->load('third_store_view', 'code'); + + /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ + $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); + $role = $roleFactory->create()->load('test_custom_role', 'role_name'); + $roleId = $role->getId(); + + $post = [ + 'role_id' => $roleId, + 'in_role_user_old'=> '', + 'in_role_user'=> '', + 'all' => 1, + 'current_password' => 'password1', + 'rolename' => $role->getRoleName(), + 'gws_is_all' => 0, + 'gws_websites' => [1, (int)$store->getWebsiteId()], + ]; + + $this->getRequest()->setPostValue($post); + + $model = $objectManager->create(SaveRole::class); + $model->execute(); + + /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ + $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); + $role = $roleFactory->create()->load($roleId); + $this->assertEquals(2, count($role->getGwsWebsites())); + + $post = [ + 'role_id' => $roleId, + 'in_role_user_old'=> '', + 'in_role_user'=> '', + 'all' => 1, + 'current_password' => 'password1', + 'rolename' => $role->getRoleName(), + 'gws_is_all' => 1, + ]; + + $this->getRequest()->setPostValue($post); + + $registry = $objectManager->get(Registry::class); + $registry->unregister('current_role'); + + $model = $objectManager->create(SaveRole::class); + $model->execute(); + + /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ + $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); + $role = $roleFactory->create()->load($roleId); + $this->assertNull($role->getGwsWebsites()); + } +} From 8f49a725dd221ea82597090f6710b45f7918e95b Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Tue, 17 Jan 2023 11:12:51 +0530 Subject: [PATCH 799/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php index c6e31a3709b78..3b5013fe97ab0 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php @@ -53,7 +53,6 @@ public function testExecuteWithDifferentScopes() $model = $objectManager->create(SaveRole::class); $model->execute(); - /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); $role = $roleFactory->create()->load($roleId); $this->assertEquals(2, count($role->getGwsWebsites())); From 15a03249ac8d67636e469d78ca1345c9b2371005 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Tue, 17 Jan 2023 21:03:33 +0530 Subject: [PATCH 800/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Adminhtml/User/Role/SaveRoleTest.php | 83 ------------------- 1 file changed, 83 deletions(-) delete mode 100644 dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php deleted file mode 100644 index 3b5013fe97ab0..0000000000000 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/User/Role/SaveRoleTest.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\User\Controller\Adminhtml\User\Role; - -use Magento\Framework\Registry; -use Magento\Store\Model\Store; -use Magento\TestFramework\Helper\Bootstrap; -use Magento\User\Controller\Adminhtml\User\Role\SaveRole; - -/** - * Test class for \Magento\User\Controller\Adminhtml\User\Role\SaveRole. - * - * @magentoAppArea adminhtml - */ -class SaveRoleTest extends \Magento\TestFramework\TestCase\AbstractBackendController -{ - /** - * Test execute method for different scopes - * - * @magentoDataFixture Magento/User/_files/user_with_custom_role.php - * @magentoDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php - */ - public function testExecuteWithDifferentScopes() - { - $objectManager = Bootstrap::getObjectManager(); - $store = $objectManager->get(Store::class); - $store->load('third_store_view', 'code'); - - /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ - $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); - $role = $roleFactory->create()->load('test_custom_role', 'role_name'); - $roleId = $role->getId(); - - $post = [ - 'role_id' => $roleId, - 'in_role_user_old'=> '', - 'in_role_user'=> '', - 'all' => 1, - 'current_password' => 'password1', - 'rolename' => $role->getRoleName(), - 'gws_is_all' => 0, - 'gws_websites' => [1, (int)$store->getWebsiteId()], - ]; - - $this->getRequest()->setPostValue($post); - - $model = $objectManager->create(SaveRole::class); - $model->execute(); - - $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); - $role = $roleFactory->create()->load($roleId); - $this->assertEquals(2, count($role->getGwsWebsites())); - - $post = [ - 'role_id' => $roleId, - 'in_role_user_old'=> '', - 'in_role_user'=> '', - 'all' => 1, - 'current_password' => 'password1', - 'rolename' => $role->getRoleName(), - 'gws_is_all' => 1, - ]; - - $this->getRequest()->setPostValue($post); - - $registry = $objectManager->get(Registry::class); - $registry->unregister('current_role'); - - $model = $objectManager->create(SaveRole::class); - $model->execute(); - - /** @var \Magento\Authorization\Model\RoleFactory $roleFactory */ - $roleFactory = $objectManager->create(\Magento\Authorization\Model\RoleFactory::class); - $role = $roleFactory->create()->load($roleId); - $this->assertNull($role->getGwsWebsites()); - } -} From 440e317888f679295d5cb0849dcb4db9e4a93294 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Wed, 18 Jan 2023 17:05:20 +0530 Subject: [PATCH 801/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 9fa207d2fed3b..2bb76d16ab095 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -57,7 +57,7 @@ class SaveRole extends \Magento\User\Controller\Adminhtml\User\Role implements H * * @return SecurityCookie * @deprecated 100.1.0 - * @see no longer used + * @see we don't recommend this approach anymore */ private function getSecurityCookie() { From 5345522edfaff88c200232e251f017de14833cb4 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Fri, 20 Jan 2023 21:49:00 +0530 Subject: [PATCH 802/985] ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 2bb76d16ab095..77ff12e3d60b6 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -57,7 +57,6 @@ class SaveRole extends \Magento\User\Controller\Adminhtml\User\Role implements H * * @return SecurityCookie * @deprecated 100.1.0 - * @see we don't recommend this approach anymore */ private function getSecurityCookie() { @@ -99,9 +98,6 @@ public function execute() ->setPid($this->getRequest()->getParam('parent_id', false)) ->setRoleType(RoleGroup::ROLE_TYPE) ->setUserType(UserContextInterface::USER_TYPE_ADMIN); - if ($this->getRequest()->getParam('gws_is_all', false)) { - $role->setGwsWebsites(null)->setGwsStoreGroups(null); - } $this->_eventManager->dispatch( 'admin_permissions_role_prepare_save', ['object' => $role, 'request' => $this->getRequest()] From e503625bd391424ca721feb8d0780c1190d4825f Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 23 Jan 2023 19:13:25 +0530 Subject: [PATCH 803/985] ACP2E-1274: Magento\Backend\Model\Dashboard\ChartTest::testGetByPeriodWithParam is failing during specific time --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 77ff12e3d60b6..0d3614a89d2b9 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -98,6 +98,9 @@ public function execute() ->setPid($this->getRequest()->getParam('parent_id', false)) ->setRoleType(RoleGroup::ROLE_TYPE) ->setUserType(UserContextInterface::USER_TYPE_ADMIN); + if ($this->getRequest()->getParam('gws_is_all', false)) { + $role->setGwsWebsites(null)->setGwsStoreGroups(null); + } $this->_eventManager->dispatch( 'admin_permissions_role_prepare_save', ['object' => $role, 'request' => $this->getRequest()] From 63ddcac12c569d4aedd2f1616a7ff3d9b9eb198a Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 23 Jan 2023 19:39:51 +0530 Subject: [PATCH 804/985] Revert "ACP2E-1490: websites and store_groups id store incorrectly in the authorization_role table while changing the scope for the user role" This reverts commit 4104677f8ceb6696bd630e99fee850a563d5e46b. --- .../Magento/User/Controller/Adminhtml/User/Role/SaveRole.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php index 0d3614a89d2b9..2bb76d16ab095 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php @@ -57,6 +57,7 @@ class SaveRole extends \Magento\User\Controller\Adminhtml\User\Role implements H * * @return SecurityCookie * @deprecated 100.1.0 + * @see we don't recommend this approach anymore */ private function getSecurityCookie() { From e88d25db5d782f429bbd2a1656f1f1695e8f861e Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 2 Feb 2023 16:02:08 -0600 Subject: [PATCH 805/985] B2B-2258: Add caching capability to the storeConfig GraphQl --- .../GraphQl/Store/StoreConfigCacheTest.php | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 6387f470d61a2..6b2d45676332c 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -83,15 +83,17 @@ public function testGetStoreConfig(): void // Query test store config $testStoreCode = 'test'; - $headerMap['Store'] = $testStoreCode; - $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', $headerMap); + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $testStoreCode]); $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); // Verify we obtain a cache MISS the first time $testStoreResponse = $this->assertCacheMissAndReturnResponse( $query, - [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] ); $this->assertArrayHasKey('storeConfig', $testStoreResponse['body']); $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; @@ -100,7 +102,10 @@ public function testGetStoreConfig(): void // Verify we obtain a cache HIT the second time $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, - [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] ); $this->assertArrayHasKey('storeConfig', $testStoreResponseHit['body']); $testStoreResponseHitResult = $testStoreResponseHit['body']['storeConfig']; @@ -127,7 +132,10 @@ public function testGetStoreConfig(): void // Verify we obtain a cache MISS the 3rd time $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( $query, - [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] ); $this->assertArrayHasKey('storeConfig', $testStoreResponseMiss['body']); $testStoreResponseMissResult = $testStoreResponseMiss['body']['storeConfig']; @@ -136,7 +144,10 @@ public function testGetStoreConfig(): void // Verify we obtain a cache HIT the 4th time $testStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( $query, - [CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId] + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] ); $this->assertArrayHasKey('storeConfig', $testStoreResponseHit2['body']); $testStoreResponseHit2Result = $testStoreResponseHit2['body']['storeConfig']; From cf6b9d0af248b8f7c8f2b0c65c6fd49236b28983 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Fri, 3 Feb 2023 17:45:21 -0600 Subject: [PATCH 806/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 186 +++++++++++++++--- .../Config/Model/ConfigStorage.php | 18 ++ 2 files changed, 172 insertions(+), 32 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 6b2d45676332c..dcb678cee7f5a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -15,33 +15,54 @@ use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Model\ScopeInterface; +use Magento\TestFramework\App\ApiMutableScopeConfig; +use Magento\TestFramework\Config\Model\ConfigStorage; use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\ObjectManager; /** * Test storeConfig query cache */ class StoreConfigCacheTest extends GraphQLPageCacheAbstract { - - /** @var ObjectManager */ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ private $objectManager; + /** + * @var ApiMutableScopeConfig + */ + private $config; + + /** + * @var ConfigStorage + */ + private $configStorage; + + /** + * @var array + */ + private $origConfigs = []; + + /** + * @var array + */ + private $notExistingOrigConfigs = []; + + /** + * @var StoreConfigInterface + */ + private $defaultStoreConfig; + /** * @inheritDoc */ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); - } + $this->configStorage = $this->objectManager->get(ConfigStorage::class); + $this->config = $this->objectManager->get(ApiMutableScopeConfig::class); - /** - * @magentoConfigFixture default/system/full_page_cache/caching_application 2 - * @magentoApiDataFixture Magento/Store/_files/store.php - * @throws NoSuchEntityException - */ - public function testGetStoreConfig(): void - { /** @var StoreConfigManagerInterface $storeConfigManager */ $storeConfigManager = $this->objectManager->get(StoreConfigManagerInterface::class); /** @var StoreResolverInterface $storeResolver */ @@ -52,15 +73,28 @@ public function testGetStoreConfig(): void $store = $storeRepository->getById($defaultStoreId); $defaultStoreCode = $store->getCode(); /** @var StoreConfigInterface $storeConfig */ - $storeConfig = current($storeConfigManager->getStoreConfigs([$defaultStoreCode])); - $defaultLocale = $storeConfig->getLocale(); + $this->defaultStoreConfig = current($storeConfigManager->getStoreConfigs([$defaultStoreCode])); + } + + /** + * storeConfig query is cached. + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/store.php + * @throws NoSuchEntityException + */ + public function testGetStoreConfig(): void + { + $defaultStoreId = $this->defaultStoreConfig->getId(); + $defaultStoreCode = $this->defaultStoreConfig->getCode(); + $defaultLocale = $this->defaultStoreConfig->getLocale(); $query = $this->getQuery(); // Query default store config $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; - // Verify we obtain a cache MISS the first time + // Verify we obtain a cache MISS the 1st time $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -70,7 +104,7 @@ public function testGetStoreConfig(): void $this->assertEquals($defaultStoreId, $defaultStoreResponseResult['id']); $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); - // Verify we obtain a cache HIT the second time + // Verify we obtain a cache HIT the 2nd time $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -87,7 +121,7 @@ public function testGetStoreConfig(): void $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); - // Verify we obtain a cache MISS the first time + // Verify we obtain a cache MISS the 1st time $testStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [ @@ -99,7 +133,7 @@ public function testGetStoreConfig(): void $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; $this->assertEquals($testStoreCode, $testStoreResponseResult['code']); $this->assertEquals($defaultLocale, $testStoreResponseResult['locale']); - // Verify we obtain a cache HIT the second time + // Verify we obtain a cache HIT the 2nd time $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [ @@ -111,13 +145,63 @@ public function testGetStoreConfig(): void $testStoreResponseHitResult = $testStoreResponseHit['body']['storeConfig']; $this->assertEquals($testStoreCode, $testStoreResponseHitResult['code']); $this->assertEquals($defaultLocale, $testStoreResponseHitResult['locale']); + } + + /** + * Store scoped config change triggers purging only the cache of the changed store. + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/store.php + * @throws NoSuchEntityException + */ + public function testCachePurgedWithStoreScopeConfigChange(): void + { + $defaultStoreId = $this->defaultStoreConfig->getId(); + $defaultStoreCode = $this->defaultStoreConfig->getCode(); + $defaultLocale = $this->defaultStoreConfig->getLocale(); + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); + + // Query test store config + $testStoreCode = 'test'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $testStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS the 1st time + $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $testStoreResponse['body']); + $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $testStoreResponseResult['locale']); // Change test store locale + $localeConfigPath = 'general/locale/code'; $newLocale = 'de_DE'; - $this->setConfig('general/locale/code', $newLocale, ScopeInterface::SCOPE_STORES, $testStoreCode); + $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_STORE, $testStoreCode); // Query default store config after test store config change - // Verify we obtain a cache HIT the 3rd time + // Verify we obtain a cache HIT the 2nd time, the cache is not purged $defaultStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -129,7 +213,7 @@ public function testGetStoreConfig(): void $this->assertEquals($defaultLocale, $defaultStoreResponseHit2Result['locale']); // Query test store config after test store config change - // Verify we obtain a cache MISS the 3rd time + // Verify we obtain a cache MISS the 2nd time, the cache is purged $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( $query, [ @@ -141,7 +225,7 @@ public function testGetStoreConfig(): void $testStoreResponseMissResult = $testStoreResponseMiss['body']['storeConfig']; $this->assertEquals($testStoreCode, $testStoreResponseMissResult['code']); $this->assertEquals($newLocale, $testStoreResponseMissResult['locale']); - // Verify we obtain a cache HIT the 4th time + // Verify we obtain a cache HIT the 3rd time $testStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( $query, [ @@ -198,25 +282,63 @@ private function getQuery(): string return $query; } + protected function tearDown(): void + { + $this->restoreConfig(); + parent::tearDown(); + } + /** * Set configuration * * @param string $path * @param string $value - * @param string|null $scope + * @param string $scopeType * @param string|null $scopeCode * @return void - * @throws \Magento\Framework\Exception\LocalizedException */ - private function setConfig(string $path, string $value, ?string $scope = null, ?string $scopeCode = null) : void + private function setConfig( + string $path, + string $value, + string $scopeType, + ?string $scopeCode = null + ): void { + if ($this->configStorage->checkIsRecordExist($path, $scopeType, $scopeCode)) { + $this->origConfigs[] = [ + 'path' => $path, + 'value' => $this->configStorage->getValueFromDb($path, $scopeType, $scopeCode), + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } else { + $this->notExistingOrigConfigs[] = [ + 'path' => $path, + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } + $this->config->setValue($path, $value, $scopeType, $scopeCode); + } + + private function restoreConfig() { - $options = ''; - $options .= $scope ? "--scope=$scope " : ''; - $options .= $scopeCode ? "--scope-code=$scopeCode " : ''; - $options .= "$path $value"; - $appDir = dirname(Bootstrap::getInstance()->getAppTempDir()); - $out = ''; - // phpcs:ignore Magento2.Security.InsecureFunction - exec("php -f {$appDir}/bin/magento config:set $options", $out); + foreach ($this->origConfigs as $origConfig) { + $this->config->setValue( + $origConfig['path'], + $origConfig['value'], + $origConfig['scopeType'], + $origConfig['scopeCode'] + ); + } + $this->origConfigs = []; + + foreach ($this->notExistingOrigConfigs as $notExistingOrigConfig) { + $this->configStorage->deleteConfigFromDb( + $notExistingOrigConfig['path'], + $notExistingOrigConfig['scopeType'], + $notExistingOrigConfig['scopeCode'] + ); + } + $this->notExistingOrigConfigs = []; } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php index 7fe25f3a6f61c..3ef5fe7d32be9 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php @@ -120,4 +120,22 @@ private function normalizeScope(string $scope): string return $scope; } + + /** + * Delete configuration from db + * + * @param string $path + * @param string $scope + * @param string|null $scopeCode + * @return void + */ + public function deleteConfigFromDb( + string $path, + string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, + ?string $scopeCode = null + ) { + $scope = $this->normalizeScope($scope); + $scopeId = $this->getIdByScope($scope, $scopeCode); + $this->configResource->deleteConfig($path, $scope, $scopeId); + } } From 782bb42703f8bf9ba2c61554f01b83e004e658be Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Sat, 4 Feb 2023 12:48:31 +0530 Subject: [PATCH 807/985] ACP2E-1551: Customer cannot use a distinct coupon code from the same Cart Price Rule. --- ...nCartPriceRuleMultiCustomerActionGroup.xml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleMultiCustomerActionGroup.xml diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleMultiCustomerActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleMultiCustomerActionGroup.xml new file mode 100644 index 0000000000000..98e763533c97f --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleMultiCustomerActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminCartPriceRuleMultiCustomerActionGroup"> + <annotations> + <description>Goes to the Admin Cart Price Rule grid page. Adds Rule Name, select Websites and Customer Groups.</description> + </annotations> + <arguments> + <argument name="ruleName"/> + </arguments> + + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> + <waitForPageLoad stepKey="waitForPriceList"/> + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> + <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.ruleName}}" stepKey="waitRuleNameFieldAppeared"/> + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ruleName.name}}" stepKey="fillRuleName"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{ruleName.websites}}" stepKey="selectWebsites"/> + <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{ruleName.customerGroups}}]" stepKey="selectCustomerGroup"/> + <wait time="3" stepKey="waitForCustomerGroups"/> + </actionGroup> +</actionGroups> From 7e02702f3462deb4f0d5fafd09ea2816f5f69ab6 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Mon, 6 Feb 2023 13:53:24 +0530 Subject: [PATCH 808/985] AC-7821:Extract ES8 module to a separate repository --- app/code/Magento/Elasticsearch/composer.json | 2 +- composer.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 9e6d4ceaf16e3..4e1a2ead9e42b 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "*", "magento/module-catalog-inventory": "*", "magento/framework": "*", - "elasticsearch/elasticsearch": "~7.17.0" + "elasticsearch/elasticsearch": "^7.17 || ^8.0" }, "suggest": { "magento/module-config": "*" diff --git a/composer.json b/composer.json index 9d7bf57da0865..813b2caabe816 100644 --- a/composer.json +++ b/composer.json @@ -166,7 +166,6 @@ "magento/module-open-search": "*", "magento/module-elasticsearch": "*", "magento/module-elasticsearch-7": "*", - "magento/module-elasticsearch-8": "*", "magento/module-email": "*", "magento/module-encryption-key": "*", "magento/module-fedex": "*", From e109b5992aad3b708106d9ede9daac16dc8f6ca1 Mon Sep 17 00:00:00 2001 From: AnujNehra <anujnehra@BLR1-LMC-N71227.local> Date: Mon, 6 Feb 2023 14:01:42 +0530 Subject: [PATCH 809/985] ACP2E-1529 fix --- .../Magento/Email/Model/Template/Filter.php | 3 +- .../Test/Unit/Model/Template/FilterTest.php | 39 ++++++++++++------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 18d41cb309f0b..4b74ab71b3419 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -8,6 +8,7 @@ namespace Magento\Email\Model\Template; use Exception; +use Magento\Backend\Model\Url as BackendModelUrl; use Magento\Cms\Block\Block; use Magento\Framework\App\Area; use Magento\Framework\App\Config\ScopeConfigInterface; @@ -588,7 +589,7 @@ public function storeDirective($construction) * Pass extra parameter to distinguish stores urls for property Magento\Framework\Url $cacheUrl * in multi-store environment */ - if ($construction[1] !== "store") { + if (!$this->urlModel instanceof BackendModelUrl) { $this->urlModel->setScope($this->_storeManager->getStore()); } $params['_escape_params'] = $this->_storeManager->getStore()->getCode(); diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php index d1d4a9e2b03d4..fc293b41e0f7c 100644 --- a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php +++ b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php @@ -8,6 +8,7 @@ namespace Magento\Email\Test\Unit\Model\Template; +use Magento\Backend\Model\Url as BackendModelUrl; use Magento\Backend\Model\UrlInterface; use Magento\Email\Model\Template\Css\Processor; use Magento\Email\Model\Template\Filter; @@ -576,35 +577,47 @@ public function testProtocolDirectiveWithInvalidSchema() } /** - * @dataProvider dataProviderCompanyRedirect + * @dataProvider dataProviderUrlModelCompanyRedirect */ - public function testStoreDirectiveForCompanyRedirect($construction, $expected, $code) + public function testStoreDirectiveForCompanyRedirect($className, $backendModelClass) { $this->storeManager->expects($this->any()) ->method('getStore') ->willReturn($this->store); - $this->store->expects($this->any())->method('getCode')->willReturn($code); + $this->store->expects($this->any())->method('getCode')->willReturn('frvw'); + + $this->backendUrlBuilder = $this->getMockBuilder($className) + ->onlyMethods(['setScope','getUrl']) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); $this->backendUrlBuilder->expects($this->once()) ->method('getUrl') - ->willReturn($expected); + ->willReturn('http://m246ceeeb2b.test/frvw/'); - $result = $this->getModel()->storeDirective($construction); - $this->assertEquals($expected, $result); + if ($backendModelClass) { + $this->backendUrlBuilder->expects($this->never())->method('setScope'); + } else { + $this->backendUrlBuilder->expects($this->once())->method('setScope')->willReturnSelf(); + } + $this->assertInstanceOf($className, $this->backendUrlBuilder); + $result = $this->getModel()->storeDirective(["{{store url=''}}",'store',"url=''"]); + $this->assertEquals('http://m246ceeeb2b.test/frvw/', $result); } - public function dataProviderCompanyRedirect() + /** + * @return array[] + */ + public function dataProviderUrlModelCompanyRedirect(): array { return [ [ - ["{{store url=''}}",'store',"url=''"], - 'http://m246ceeeb2b.french.test/frvw/', - 'frvw' + UrlInterface::class, + 0 ], [ - ["{{store url=''}}",'store_invalid',"url=''"], - 'http://m246ceeeb2b.test/default/', - 'default' + BackendModelUrl::class, + 1 ] ]; } From 471c8cf7c18792c89421133e4e0ffbf69b1d34a1 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Mon, 6 Feb 2023 15:27:46 +0530 Subject: [PATCH 810/985] ACP2E-1526 : Fixed existing unit test and added fix for single media entry API --- .../Product/Gallery/GalleryManagement.php | 2 + .../Product/Gallery/GalleryManagementTest.php | 112 +++++++++++++++++- .../Catalog/Api/GalleryManagementTest.php | 76 ++++++++++++ 3 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index df9e601f894c7..a252e07e1297d 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -243,6 +243,7 @@ public function remove($sku, $entryId) public function get($sku, $entryId) { try { + /** @var Product $product */ $product = $this->productRepository->get($sku); } catch (\Exception $exception) { throw new NoSuchEntityException(__("The product doesn't exist. Verify and try again.")); @@ -251,6 +252,7 @@ public function get($sku, $entryId) $mediaGalleryEntries = $product->getMediaGalleryEntries(); foreach ($mediaGalleryEntries as $entry) { if ($entry->getId() == $entryId) { + $entry->setContent($this->getImageContent($product, $entry)); return $entry; } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php index e5a315ac9ad86..dd729d2862c22 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php @@ -20,11 +20,15 @@ use Magento\Framework\Api\Data\ImageContentInterface; use Magento\Framework\Api\Data\ImageContentInterfaceFactory; use Magento\Framework\Api\ImageContentValidatorInterface; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Framework\Filesystem\Driver\File\Mime; +use Magento\Framework\Filesystem\DriverInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Magento\Framework\Filesystem\Io\File; +use Magento\Catalog\Model\Product\Media\ConfigInterface as MediaConfig; /** * Tests for \Magento\Catalog\Model\Product\Gallery\GalleryManagement. @@ -107,7 +111,9 @@ protected function setUp(): void $this->contentValidatorMock = $this->getMockForAbstractClass(ImageContentValidatorInterface::class); $this->productInterfaceFactory = $this->createMock(ProductInterfaceFactory::class); $this->deleteValidator = $this->createMock(DeleteValidator::class); - $this->imageContentInterface = $this->createMock(ImageContentInterfaceFactory::class); + $this->imageContentInterface = $this->getMockBuilder(ImageContentInterfaceFactory::class) + ->disableOriginalConstructor() + ->getMock(); $this->filesystem = $this->createMock(Filesystem::class); $this->mime = $this->createMock(Mime::class); $this->file = $this->createMock(File::class); @@ -121,7 +127,8 @@ protected function setUp(): void 'getCustomAttribute', 'getMediaGalleryEntries', 'setMediaGalleryEntries', - 'getMediaAttributes' + 'getMediaAttributes', + 'getMediaConfig' ] ); $this->mediaGalleryEntryMock = @@ -146,6 +153,7 @@ protected function setUp(): void ->willReturn($this->newProductMock); } + /** * @return void */ @@ -413,6 +421,55 @@ public function testGet(): void $existingEntryMock->expects($this->once())->method('getId')->willReturn(42); $this->productMock->expects($this->once())->method('getMediaGalleryEntries') ->willReturn([$existingEntryMock]); + $mediaConfigMock = $this->getMockBuilder(MediaConfig::class) + ->disableOriginalConstructor() + ->getMock(); + $mediaConfigMock->expects($this->once()) + ->method('getMediaPath') + ->willReturn("base/path/test123.jpg"); + $this->productMock->expects($this->once()) + ->method('getMediaConfig') + ->willReturn($mediaConfigMock); + $mediaDirectoryMock = $this->getMockBuilder(WriteInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->filesystem->expects($this->once()) + ->method('getDirectoryWrite') + ->with(DirectoryList::MEDIA) + ->willReturn($mediaDirectoryMock); + $mediaDirectoryMock->expects($this->once()) + ->method('getAbsolutePath') + ->with('base/path/test123.jpg') + ->willReturn('absolute/path/base/path/test123.jpg'); + $this->file->expects($this->any()) + ->method('getPathInfo') + ->willReturnCallback( + function ($path) { + return pathinfo($path); + } + ); + $driverMock = $this->getMockBuilder(DriverInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $mediaDirectoryMock->expects($this->any())->method('getDriver')->willReturn($driverMock); + $driverMock->expects($this->once()) + ->method('fileGetContents') + ->willReturn('0123456789abcdefghijklmnopqrstuvwxyz'); + $ImageContentInterface = $this->getMockBuilder(ImageContentInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $ImageContentInterface->expects($this->once()) + ->method('setName') + ->willReturnSelf(); + $ImageContentInterface->expects($this->once()) + ->method('setBase64EncodedData') + ->willReturnSelf(); + $ImageContentInterface->expects($this->once()) + ->method('setType') + ->willReturnSelf(); + $this->imageContentInterface->expects($this->once()) + ->method('create') + ->willReturn($ImageContentInterface); $this->assertEquals($existingEntryMock, $this->model->get($productSku, $imageId)); } @@ -427,6 +484,57 @@ public function testGetList(): void $entryMock = $this->getMockForAbstractClass(ProductAttributeMediaGalleryEntryInterface::class); $this->productMock->expects($this->once())->method('getMediaGalleryEntries') ->willReturn([$entryMock]); + $this->productMock->expects($this->once())->method('getMediaGalleryEntries') + ->willReturn([$entryMock]); + $mediaConfigMock = $this->getMockBuilder(MediaConfig::class) + ->disableOriginalConstructor() + ->getMock(); + $mediaConfigMock->expects($this->once()) + ->method('getMediaPath') + ->willReturn("base/path/test123.jpg"); + $this->productMock->expects($this->once()) + ->method('getMediaConfig') + ->willReturn($mediaConfigMock); + $mediaDirectoryMock = $this->getMockBuilder(WriteInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->filesystem->expects($this->once()) + ->method('getDirectoryWrite') + ->with(DirectoryList::MEDIA) + ->willReturn($mediaDirectoryMock); + $mediaDirectoryMock->expects($this->once()) + ->method('getAbsolutePath') + ->with('base/path/test123.jpg') + ->willReturn('absolute/path/base/path/test123.jpg'); + $this->file->expects($this->any()) + ->method('getPathInfo') + ->willReturnCallback( + function ($path) { + return pathinfo($path); + } + ); + $driverMock = $this->getMockBuilder(DriverInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $mediaDirectoryMock->expects($this->any())->method('getDriver')->willReturn($driverMock); + $driverMock->expects($this->once()) + ->method('fileGetContents') + ->willReturn('0123456789abcdefghijklmnopqrstuvwxyz'); + $ImageContentInterface = $this->getMockBuilder(ImageContentInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $ImageContentInterface->expects($this->once()) + ->method('setName') + ->willReturnSelf(); + $ImageContentInterface->expects($this->once()) + ->method('setBase64EncodedData') + ->willReturnSelf(); + $ImageContentInterface->expects($this->once()) + ->method('setType') + ->willReturnSelf(); + $this->imageContentInterface->expects($this->once()) + ->method('create') + ->willReturn($ImageContentInterface); $this->assertEquals([$entryMock], $this->model->getList($productSku)); } } diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php new file mode 100644 index 0000000000000..62c528bde457a --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php @@ -0,0 +1,76 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Api; + +use Magento\Catalog\Test\Fixture\Product as ProductFixture; +use Magento\Framework\Webapi\Rest\Request; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DataFixtureStorage; +use Magento\TestFramework\Fixture\DataFixtureStorageManager; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\WebapiAbstract; + +class GalleryManagementTest extends WebapiAbstract +{ + public const RESOURCE_PATH = '/V1/products/'; + + /** + * @var DataFixtureStorage + */ + private $fixtures; + + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage(); + } + + /** + * Check content attribute in getList method + * + * @return void + */ + #[ + DataFixture(ProductFixture::class, ['media_gallery_entries' => [['label' => 'image1']]], as: 'product'), + ] + public function testContentAttributeInGetList(): void + { + $productSku = $this->fixtures->get('product')->getSku(); + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH.$productSku."/media", + 'httpMethod' => Request::HTTP_METHOD_GET, + ], + ]; + $response = $this->_webApiCall($serviceInfo, []); + $this->assertArrayHasKey('content', $response[0]); + } + + /** + * Check content attribute in getList method + * + * @return void + */ + #[ + DataFixture(ProductFixture::class, ['media_gallery_entries' => [['label' => 'image1']]], as: 'product'), + ] + public function testContentAttributeInGet(): void + { + $product = $this->fixtures->get('product'); + $productSku = $product->getSku(); + $entryId = $product-> getMediaGalleryEntries()[0]->getId(); + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH.$productSku."/media/".$entryId, + 'httpMethod' => Request::HTTP_METHOD_GET, + ], + ]; + $response = $this->_webApiCall($serviceInfo, []); + $this->assertArrayHasKey('content', $response); + } +} From 4a7eef5b087d762135d9a5d438a9f1ab7f9802dc Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Mon, 6 Feb 2023 16:53:32 +0530 Subject: [PATCH 811/985] AC-6922::JSUnit test suite sometimes hangs when running chrome --- app/code/Magento/Ui/view/base/web/js/grid/data-storage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js index 56d524290280c..b489dbc9da747 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js @@ -215,6 +215,10 @@ define([ this.removeRequest(cached); } + if (data.showTotalRecords === undefined) { + data.showTotalRecords = 0; + } + this._requests.push({ ids: this.getIds(data.items), params: params, From 04ed15ca8cb6fd7311eeb56fb2a854dc29045f03 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Mon, 6 Feb 2023 18:05:51 +0530 Subject: [PATCH 812/985] AC-6922::JSUnit test suite sometimes hangs when running chrome --- app/code/Magento/Ui/view/base/web/js/grid/data-storage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js index b489dbc9da747..65c0429487768 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js @@ -186,6 +186,10 @@ define([ delay = this.cachedRequestDelay, result; + if (request.showTotalRecords === undefined) { + request.showTotalRecords = 0; + } + result = { items: this.getByIds(request.ids), totalRecords: request.totalRecords, From 08f98be423e3c83031499da4563c97736e26c2e4 Mon Sep 17 00:00:00 2001 From: SaurabhKumar <glo17680@adobe.com> Date: Mon, 6 Feb 2023 18:23:23 +0530 Subject: [PATCH 813/985] AC-6922::JSUnit test suite sometimes hangs when running chrome --- app/code/Magento/Ui/view/base/web/js/grid/data-storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js index 65c0429487768..c8d11b6cdf372 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js @@ -187,7 +187,7 @@ define([ result; if (request.showTotalRecords === undefined) { - request.showTotalRecords = 0; + request.showTotalRecords = true; } result = { @@ -220,7 +220,7 @@ define([ } if (data.showTotalRecords === undefined) { - data.showTotalRecords = 0; + data.showTotalRecords = true; } this._requests.push({ From 328d3d58ece67fcadbaed28a3265c22544b38db0 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Mon, 6 Feb 2023 18:53:51 +0530 Subject: [PATCH 814/985] Unable to Place Order via Admin - Unknown or expired payment_method_nonce --- .../Magento/Sales/view/adminhtml/web/order/create/scripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 12b25abe1dec6..d7daf73bd33d7 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -139,6 +139,7 @@ define([ $(this.getAreaId('header')).callback = 'setCustomerAfter'; $('back_order_top_button').hide(); $('reset_order_top_button').show(); + this.loadArea(['header', 'data'], true); }, setCustomerAfter: function () { From a92fa33fbb75da02992fe745148454a77ad51e59 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Mon, 6 Feb 2023 19:44:15 +0530 Subject: [PATCH 815/985] Deleted file --- ...frontMagentoApiSwaggerActionsExistTest.xml | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml diff --git a/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml b/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml deleted file mode 100644 index b63efe9a4dbd5..0000000000000 --- a/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml +++ /dev/null @@ -1,35 +0,0 @@ -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontMagentoApiSwaggerActionsExistTest"> - <annotations> - <features value="Swagger"/> - <stories value="Swagger via the Storefront"/> - <title value="Authorize and logout on Swagger page"/> - <description value="Authorize and logout on Swagger page use API Key"/> - <severity value="CRITICAL"/> - <group value="pr_exclude"/> - <group value="developer_mode_only"/> - </annotations> - <before> - <getOTP stepKey="getOtpCode"/> - <createData entity="adminApiToken" stepKey="createAdminToken"> - <field key="otp">{$getOtpCode}</field> - </createData> - </before> - <after></after> - <actionGroup ref="StorefrontGoToSwaggerPageActionGroup" stepKey="goToSwaggerPage"/> - <actionGroup ref="StorefrontApplyAdminTokenOnSwaggerPageActionGroup" stepKey="applyAdminToken"> - <argument name="token" value="$createAdminToken.return$"/> - </actionGroup> - <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('storeStoreRepositoryV1')}}" stepKey="assertTitleOfFirstAction"/> - <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('quoteCartRepositoryV1')}}" stepKey="assertTitleOfSecondAction"/> - <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('catalogProductRepositoryV1')}}" stepKey="assertTitleOfThirdAction"/> - <actionGroup ref="StorefrontSwaggerLogoutActionGroup" stepKey="swaggerLogout"/> - </test> -</tests> From ae7989b6e351789da9595a155fbbe1a5338637f7 Mon Sep 17 00:00:00 2001 From: "Ashish.Kumar18" <ashish.kumar18@BLR1-LMC-N71378.local> Date: Mon, 6 Feb 2023 19:51:54 +0530 Subject: [PATCH 816/985] Deleted file --- ...frontMagentoApiSwaggerActionsExistTest.xml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml diff --git a/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml b/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml new file mode 100644 index 0000000000000..9297121c7d6a9 --- /dev/null +++ b/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml @@ -0,0 +1,35 @@ +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontMagentoApiSwaggerActionsExistTest"> + <annotations> + <features value="Swagger"/> + <stories value="Swagger via the Storefront"/> + <title value="Authorize and logout on Swagger page"/> + <description value="Authorize and logout on Swagger page use API Key"/> + <severity value="CRITICAL"/> + <group value="pr_exclude"/> + <group value="developer_mode_only"/> + </annotations> + <before> + <getOTP stepKey="getOtpCode"/> + <createData entity="adminApiToken" stepKey="createAdminToken"> + <field key="otp">{$getOtpCode}</field> + </createData> + </before> + <after></after> + <actionGroup ref="StorefrontGoToSwaggerPageActionGroup" stepKey="goToSwaggerPage"/> + <actionGroup ref="StorefrontApplyAdminTokenOnSwaggerPageActionGroup" stepKey="applyAdminToken"> + <argument name="token" value="$createAdminToken.return$"/> + </actionGroup> + <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('storeStoreRepositoryV1')}}" stepKey="assertTitleOfFirstAction"/> + <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('quoteCartRepositoryV1')}}" stepKey="assertTitleOfSecondAction"/> + <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('catalogProductRepositoryV1')}}" stepKey="assertTitleOfThirdAction"/> + <actionGroup ref="StorefrontSwaggerLogoutActionGroup" stepKey="swaggerLogout"/> + </test> +</tests> \ No newline at end of file From 6162ae137ddc8fd8c88af1f98696b12ac73eee08 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Mon, 6 Feb 2023 19:59:34 +0530 Subject: [PATCH 817/985] ACP2E-1526 : Added Soap parameters --- .../Magento/Catalog/Api/GalleryManagementTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php index 62c528bde457a..462bcebb7faa7 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php @@ -19,6 +19,10 @@ class GalleryManagementTest extends WebapiAbstract { public const RESOURCE_PATH = '/V1/products/'; + public const SERVICE_NAME = 'catalogGalleryManagementV1'; + + public const SERVICE_VERSION = 'V1'; + /** * @var DataFixtureStorage */ @@ -46,6 +50,11 @@ public function testContentAttributeInGetList(): void 'resourcePath' => self::RESOURCE_PATH.$productSku."/media", 'httpMethod' => Request::HTTP_METHOD_GET, ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'getList', + ], ]; $response = $this->_webApiCall($serviceInfo, []); $this->assertArrayHasKey('content', $response[0]); @@ -69,6 +78,11 @@ public function testContentAttributeInGet(): void 'resourcePath' => self::RESOURCE_PATH.$productSku."/media/".$entryId, 'httpMethod' => Request::HTTP_METHOD_GET, ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'get', + ], ]; $response = $this->_webApiCall($serviceInfo, []); $this->assertArrayHasKey('content', $response); From ca13647db5507e3fb54aee1289db36f6989fe965 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 6 Feb 2023 20:05:42 +0530 Subject: [PATCH 818/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- app/code/Magento/Theme/Block/Html/Header.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index c70997dc0d32b..c1f8be7666136 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -57,8 +57,6 @@ public function getWelcome() \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - $this->_data['welcome'] = $this->escaper->escapeQuote($this->_data['welcome'], true); - // phpcs:ignore Magento2.Functions.DiscouragedFunction - return addslashes(__($this->_data['welcome'])); + $this->escaper->escapeQuote(__($this->_data['welcome'])->render(), true); } } From 56ca96d02175573593006ec946534900de80c1d1 Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 6 Feb 2023 20:32:47 +0530 Subject: [PATCH 819/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- app/code/Magento/Theme/Block/Html/Header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index c1f8be7666136..95c146253bae3 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -57,6 +57,6 @@ public function getWelcome() \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } - $this->escaper->escapeQuote(__($this->_data['welcome'])->render(), true); + return $this->escaper->escapeQuote(__($this->_data['welcome'])->render(), true); } } From 76b07587edab1fa440c510130e31c9980993aa3e Mon Sep 17 00:00:00 2001 From: Sarmistha Martha <glo23503@adobe.com> Date: Mon, 6 Feb 2023 22:54:40 +0530 Subject: [PATCH 820/985] ACP2E-1602: [Issue] Fixed the welcome message contains single quote character --- app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php b/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php index b4f31881fa096..b178262104276 100644 --- a/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php +++ b/app/code/Magento/Theme/Test/Unit/Block/Html/HeaderTest.php @@ -58,12 +58,12 @@ public function testGetWelcomeDefault() { $this->scopeConfig->expects($this->once())->method('getValue') ->with('design/header/welcome', ScopeInterface::SCOPE_STORE) - ->willReturn('Default welcome msg!'); + ->willReturn("Message d'accueil par défaut"); $this->escaper->expects($this->once()) ->method('escapeQuote') - ->with('Default welcome msg!', true) - ->willReturn("Message d'accueil par défaut"); + ->with("Message d'accueil par défaut", true) + ->willReturn("Message d\'accueil par défaut"); $this->assertEquals("Message d\'accueil par défaut", $this->unit->getWelcome()); } From 183d7c93d76a7813ac206d8bd27428ba8e07d3e9 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Mon, 6 Feb 2023 13:27:23 -0600 Subject: [PATCH 821/985] ACP2E-1541: There is a problem with the magento report order screen --- .../Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php index c7dc0b3cdd098..57006ff6c9bf6 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Grid/Column/Renderer/Currency.php @@ -140,8 +140,8 @@ private function getStoreCurrencyRate(string $currencyCode, DataObject $row): fl if (((int)$catalogPriceScope !== 0 && $adminCurrencyCode !== $currencyCode)) { - $storeCurrency = $this->currencyFactory->create()->load($currencyCode); - $currencyRate = $storeCurrency->getRate($adminCurrencyCode); + $currency = $this->currencyFactory->create()->load($adminCurrencyCode); + $currencyRate = $currency->getAnyRate($currencyCode); } else { $currencyRate = $this->_getRate($row); } From 83b898b6a1462db2c7ca83b77e010fdae54e984f Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Mon, 6 Feb 2023 13:41:51 -0600 Subject: [PATCH 822/985] ACP2E-1541: There is a problem with the magento report order screen --- .../Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php index 76a6c180bd0d2..bc5a40302bf25 100644 --- a/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php +++ b/app/code/Magento/Reports/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/CurrencyTest.php @@ -257,8 +257,8 @@ public function testRender( if ($needToGetRateFromModel) { $this->currencyMock->expects($this->once()) - ->method('getRate') - ->with($adminCurrencyCode) + ->method('getAnyRate') + ->with($storeCurrencyCode) ->willReturn($rate); } From 4241c65155210f594a862302837dbadebef1c53f Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Mon, 6 Feb 2023 13:43:33 -0600 Subject: [PATCH 823/985] ACP2E-1584: [Magento Cloud] Product Filter with datetime by using GraphQL is not working --- .../Model/Config/FilterAttributeReader.php | 1 + .../Config/FilterAttributeReaderTest.php | 162 ++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 app/code/Magento/CatalogGraphQl/Test/Unit/Model/Config/FilterAttributeReaderTest.php diff --git a/app/code/Magento/CatalogGraphQl/Model/Config/FilterAttributeReader.php b/app/code/Magento/CatalogGraphQl/Model/Config/FilterAttributeReader.php index 6976086e74890..fc46e5eeb212e 100644 --- a/app/code/Magento/CatalogGraphQl/Model/Config/FilterAttributeReader.php +++ b/app/code/Magento/CatalogGraphQl/Model/Config/FilterAttributeReader.php @@ -108,6 +108,7 @@ private function getFilterType(Attribute $attribute): string $filterTypeMap = [ 'price' => self::FILTER_RANGE_TYPE, 'date' => self::FILTER_RANGE_TYPE, + 'datetime' => self::FILTER_RANGE_TYPE, 'select' => self::FILTER_EQUAL_TYPE, 'multiselect' => self::FILTER_EQUAL_TYPE, 'boolean' => self::FILTER_EQUAL_TYPE, diff --git a/app/code/Magento/CatalogGraphQl/Test/Unit/Model/Config/FilterAttributeReaderTest.php b/app/code/Magento/CatalogGraphQl/Test/Unit/Model/Config/FilterAttributeReaderTest.php new file mode 100644 index 0000000000000..57c844ecfed6d --- /dev/null +++ b/app/code/Magento/CatalogGraphQl/Test/Unit/Model/Config/FilterAttributeReaderTest.php @@ -0,0 +1,162 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogGraphQl\Test\Unit\Model\Config; + +use Magento\Catalog\Model\ResourceModel\Eav\Attribute; +use Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection as AttributeCollection; +use Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory as AttributeCollectionFactory; +use Magento\CatalogGraphQl\Model\Config\FilterAttributeReader; +use Magento\Framework\GraphQl\Schema\Type\Entity\MapperInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class FilterAttributeReaderTest extends TestCase +{ + /** + * @var MapperInterface|MockObject + */ + private $mapperMock; + + /** + * @var CollectionFactory|MockObject + */ + private $collectionFactoryMock; + + /** + * @var FilterAttributeReader + */ + private $model; + + protected function setUp(): void + { + $this->mapperMock = $this->createMock(MapperInterface::class); + $this->collectionFactoryMock = $this->createMock(AttributeCollectionFactory::class); + $this->model = new FilterAttributeReader($this->mapperMock, $this->collectionFactoryMock); + } + + /** + * @dataProvider readDataProvider + * @param string $filterableAttrCode + * @param string $filterableAttrInput + * @param string $searchableAttrCode + * @param string $searchableAttrInput + * @param array $fieldsType + */ + public function testRead( + string $filterableAttrCode, + string $filterableAttrInput, + string $searchableAttrCode, + string $searchableAttrInput, + array $fieldsType + ): void { + $this->mapperMock->expects(self::once()) + ->method('getMappedTypes') + ->with('filter_attributes') + ->willReturn(['product_filter_attributes' => 'ProductAttributeFilterInput']); + + $filterableAttributeCollection = $this->createMock(AttributeCollection::class); + $filterableAttributeCollection->expects(self::once()) + ->method('addHasOptionsFilter') + ->willReturnSelf(); + $filterableAttributeCollection->expects(self::once()) + ->method('addIsFilterableFilter') + ->willReturnSelf(); + $filterableAttribute = $this->createMock(Attribute::class); + $filterableAttributeCollection->expects(self::once()) + ->method('getItems') + ->willReturn(array_filter([11 => $filterableAttribute])); + $searchableAttributeCollection = $this->createMock(AttributeCollection::class); + $searchableAttributeCollection->expects(self::once()) + ->method('addHasOptionsFilter') + ->willReturnSelf(); + $searchableAttributeCollection->expects(self::once()) + ->method('addIsSearchableFilter') + ->willReturnSelf(); + $searchableAttributeCollection->expects(self::once()) + ->method('addDisplayInAdvancedSearchFilter') + ->willReturnSelf(); + $searchableAttribute = $this->createMock(Attribute::class); + $searchableAttributeCollection->expects(self::once()) + ->method('getItems') + ->willReturn(array_filter([21 => $searchableAttribute])); + $this->collectionFactoryMock->expects(self::exactly(2)) + ->method('create') + ->willReturnOnConsecutiveCalls($filterableAttributeCollection, $searchableAttributeCollection); + + $filterableAttribute->method('getAttributeCode') + ->willReturn($filterableAttrCode); + $filterableAttribute->method('getFrontendInput') + ->willReturn($filterableAttrInput); + $searchableAttribute->method('getAttributeCode') + ->willReturn($searchableAttrCode); + $searchableAttribute->method('getFrontendInput') + ->willReturn($searchableAttrInput); + + $config = $this->model->read(); + self::assertNotEmpty($config['ProductAttributeFilterInput']); + self::assertCount(count($fieldsType), $config['ProductAttributeFilterInput']['fields']); + foreach ($fieldsType as $attrCode => $fieldType) { + self::assertEquals($fieldType, $config['ProductAttributeFilterInput']['fields'][$attrCode]['type']); + } + } + + public function readDataProvider(): array + { + return [ + [ + 'price', + 'price', + 'sku', + 'text', + [ + 'price' => 'FilterRangeTypeInput', + 'sku' => 'FilterEqualTypeInput', + ], + ], + [ + 'date_attr', + 'date', + 'datetime_attr', + 'datetime', + [ + 'date_attr' => 'FilterRangeTypeInput', + 'datetime_attr' => 'FilterRangeTypeInput', + ], + ], + [ + 'select_attr', + 'select', + 'multiselect_attr', + 'multiselect', + [ + 'select_attr' => 'FilterEqualTypeInput', + 'multiselect_attr' => 'FilterEqualTypeInput', + ], + ], + [ + 'text_attr', + 'text', + 'textarea_attr', + 'textarea', + [ + 'text_attr' => 'FilterMatchTypeInput', + 'textarea_attr' => 'FilterMatchTypeInput', + ], + ], + [ + 'boolean_attr', + 'boolean', + 'boolean_attr', + 'boolean', + [ + 'boolean_attr' => 'FilterEqualTypeInput', + ], + ], + ]; + } +} From ddd8e8503c4463604fae66e65224d00718570417 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 7 Feb 2023 12:07:58 +0530 Subject: [PATCH 824/985] Update StorefrontCustomerLoginSignUpSection.xml --- .../Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml index d224019885274..8132a785bf53d 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginSignUpSection.xml @@ -10,6 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCreateUserSection"> <element name="createAnAccountButton" type="button" selector="//div[contains(@class, 'block-new-customer')]//a/span[contains(.,'Create an Account')]"/> - <element name="createAnAccountButtonForCustomer" type="button" selector="//*[@class=‘block-content’]//a[@class=‘action create primary’]/span[contains(.,‘Create an Account’)]"/> + <element name="createAnAccountButtonForCustomer" type="button" selector="//*[@class='block-content']//a[@class='action create primary']/span[contains(.,'Create an Account')]"/> </section> </sections> From 1d1574ad60f45349f633209ff0ffec1b5fa1c2e8 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 7 Feb 2023 13:48:57 +0530 Subject: [PATCH 825/985] ACP2E-1526 : Fixed Soap service name issue --- .../Product/Gallery/GalleryManagementTest.php | 1 - .../Catalog/Api/GalleryManagementTest.php | 90 --------------- ...uteMediaGalleryManagementInterfaceTest.php | 108 ++++++++++++++---- 3 files changed, 84 insertions(+), 115 deletions(-) delete mode 100644 dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php index dd729d2862c22..2c794f631b68b 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php @@ -153,7 +153,6 @@ protected function setUp(): void ->willReturn($this->newProductMock); } - /** * @return void */ diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php deleted file mode 100644 index 462bcebb7faa7..0000000000000 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/GalleryManagementTest.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Catalog\Api; - -use Magento\Catalog\Test\Fixture\Product as ProductFixture; -use Magento\Framework\Webapi\Rest\Request; -use Magento\TestFramework\Fixture\DataFixture; -use Magento\TestFramework\Fixture\DataFixtureStorage; -use Magento\TestFramework\Fixture\DataFixtureStorageManager; -use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\TestCase\WebapiAbstract; - -class GalleryManagementTest extends WebapiAbstract -{ - public const RESOURCE_PATH = '/V1/products/'; - - public const SERVICE_NAME = 'catalogGalleryManagementV1'; - - public const SERVICE_VERSION = 'V1'; - - /** - * @var DataFixtureStorage - */ - private $fixtures; - - protected function setUp(): void - { - $this->objectManager = Bootstrap::getObjectManager(); - $this->fixtures = $this->objectManager->get(DataFixtureStorageManager::class)->getStorage(); - } - - /** - * Check content attribute in getList method - * - * @return void - */ - #[ - DataFixture(ProductFixture::class, ['media_gallery_entries' => [['label' => 'image1']]], as: 'product'), - ] - public function testContentAttributeInGetList(): void - { - $productSku = $this->fixtures->get('product')->getSku(); - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH.$productSku."/media", - 'httpMethod' => Request::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'getList', - ], - ]; - $response = $this->_webApiCall($serviceInfo, []); - $this->assertArrayHasKey('content', $response[0]); - } - - /** - * Check content attribute in getList method - * - * @return void - */ - #[ - DataFixture(ProductFixture::class, ['media_gallery_entries' => [['label' => 'image1']]], as: 'product'), - ] - public function testContentAttributeInGet(): void - { - $product = $this->fixtures->get('product'); - $productSku = $product->getSku(); - $entryId = $product-> getMediaGalleryEntries()[0]->getId(); - $serviceInfo = [ - 'rest' => [ - 'resourcePath' => self::RESOURCE_PATH.$productSku."/media/".$entryId, - 'httpMethod' => Request::HTTP_METHOD_GET, - ], - 'soap' => [ - 'service' => self::SERVICE_NAME, - 'serviceVersion' => self::SERVICE_VERSION, - 'operation' => self::SERVICE_NAME . 'get', - ], - ]; - $response = $this->_webApiCall($serviceInfo, []); - $this->assertArrayHasKey('content', $response); - } -} diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php index 70370bc93b9aa..7ec589ca6730c 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php @@ -8,7 +8,7 @@ namespace Magento\Catalog\Api; -use Magento\Catalog\Test\Fixture\Product; +use Magento\Catalog\Test\Fixture\Product as ProductFixture; use Magento\Framework\Api\Data\ImageContentInterface; use Magento\Store\Test\Fixture\Store as StoreFixture; use Magento\TestFramework\Fixture\DataFixture; @@ -27,6 +27,12 @@ */ class ProductAttributeMediaGalleryManagementInterfaceTest extends WebapiAbstract { + public const RESOURCE_PATH = '/V1/products/'; + + public const SERVICE_NAME = 'catalogProductAttributeMediaGalleryManagementV1'; + + public const SERVICE_VERSION = 'V1'; + /** * Default create service request information (product with SKU 'simple' is used) * @@ -72,25 +78,25 @@ protected function setUp(): void $this->createServiceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/products/simple/media', + 'resourcePath' => self::RESOURCE_PATH.'simple/media', 'httpMethod' => Request::HTTP_METHOD_POST, ], 'soap' => [ - 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Create', + 'service' => self::SERVICE_NAME , + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'Create', ], ]; $this->updateServiceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/products/simple/media', + 'resourcePath' => self::RESOURCE_PATH.'simple/media', 'httpMethod' => Request::HTTP_METHOD_PUT, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Update', + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'Update', ], ]; @@ -99,9 +105,9 @@ protected function setUp(): void 'httpMethod' => Request::HTTP_METHOD_DELETE, ], 'soap' => [ - 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Remove', + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'Remove', ], ]; @@ -641,7 +647,7 @@ public function testDeleteThrowsExceptionIfThereIsNoImageWithGivenId() #[ DataFixture(StoreFixture::class, as: 'store2'), - DataFixture(Product::class, ['media_gallery_entries' => [[], []]], as: 'product') + DataFixture(ProductFixture::class, ['media_gallery_entries' => [[], []]], as: 'product') ] public function testDeleteThrowsExceptionIfTheImageCannotBeRemoved(): void { @@ -692,13 +698,13 @@ public function testGet() $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/products/' . $productSku . '/media/' . $imageId, + 'resourcePath' => self::RESOURCE_PATH . $productSku . '/media/' . $imageId, 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ - 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Get', + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'Get', ], ]; $requestData = [ @@ -725,13 +731,13 @@ public function testGetList() $productSku = 'simple'; //from fixture $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/products/' . urlencode($productSku) . '/media', + 'resourcePath' => self::RESOURCE_PATH . urlencode($productSku) . '/media', 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ - 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1GetList', + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'GetList', ], ]; @@ -757,13 +763,13 @@ public function testGetListForAbsentSku() $productSku = 'absent_sku_' . time(); $serviceInfo = [ 'rest' => [ - 'resourcePath' => '/V1/products/' . urlencode($productSku) . '/media', + 'resourcePath' => self::RESOURCE_PATH . urlencode($productSku) . '/media', 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ - 'service' => 'catalogProductAttributeMediaGalleryManagementV1', - 'serviceVersion' => 'V1', - 'operation' => 'catalogProductAttributeMediaGalleryManagementV1GetList', + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME.'GetList', ], ]; @@ -828,4 +834,58 @@ public function testAddProductVideo() $this->assertStringStartsWith('/t/e/test_image', $updatedImage['file']); $this->assertEquals($videoContent, array_intersect_key($updatedImage, $videoContent)); } + + /** + * Check content attribute in getList method + * + * @return void + */ + #[ + DataFixture(ProductFixture::class, ['media_gallery_entries' => [[]]], as: 'product'), + ] + public function testContentAttributeInGetList(): void + { + $productSku = $this->fixtures->get('product')->getSku(); + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH.$productSku."/media", + 'httpMethod' => Request::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'getList', + ], + ]; + $response = $this->_webApiCall($serviceInfo, []); + $this->assertArrayHasKey('content', $response[0]); + } + + /** + * Check content attribute in getList method + * + * @return void + */ + #[ + DataFixture(ProductFixture::class, ['media_gallery_entries' => [[]]], as: 'product'), + ] + public function testContentAttributeInGet(): void + { + $product = $this->fixtures->get('product'); + $productSku = $product->getSku(); + $entryId = $product->getMediaGalleryEntries()[0]->getId(); + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => self::RESOURCE_PATH.$productSku."/media/".$entryId, + 'httpMethod' => Request::HTTP_METHOD_GET, + ], + 'soap' => [ + 'service' => self::SERVICE_NAME, + 'serviceVersion' => self::SERVICE_VERSION, + 'operation' => self::SERVICE_NAME . 'get', + ], + ]; + $response = $this->_webApiCall($serviceInfo, []); + $this->assertArrayHasKey('content', $response); + } } From 4439a6c0669a0f30c57b2ff3018e82b733a8bcfd Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 7 Feb 2023 15:52:04 +0530 Subject: [PATCH 826/985] ACP2E-1526 : Fixed Soap API errors --- ...ctAttributeMediaGalleryManagementInterfaceTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php index 7ec589ca6730c..05391ae635181 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php @@ -857,7 +857,10 @@ public function testContentAttributeInGetList(): void 'operation' => self::SERVICE_NAME . 'getList', ], ]; - $response = $this->_webApiCall($serviceInfo, []); + $requestData = [ + 'sku' => $productSku, + ]; + $response = $this->_webApiCall($serviceInfo, $requestData); $this->assertArrayHasKey('content', $response[0]); } @@ -885,7 +888,11 @@ public function testContentAttributeInGet(): void 'operation' => self::SERVICE_NAME . 'get', ], ]; - $response = $this->_webApiCall($serviceInfo, []); + $requestData = [ + 'sku' => $productSku, + 'entryId' => $entryId, + ]; + $response = $this->_webApiCall($serviceInfo, $requestData); $this->assertArrayHasKey('content', $response); } } From c2cb19445c930d06c2750e262f2d29751c35d3d0 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 7 Feb 2023 16:03:47 +0530 Subject: [PATCH 827/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index 9c226641b6e39..4e51426defcf5 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -10,7 +10,6 @@ use Magento\Catalog\Api\Data\ProductAttributeInterface; use Magento\Catalog\Api\ProductAttributeRepositoryInterface; -use Magento\Catalog\Model\Indexer\Product\Category\Action\Rows; use Magento\Catalog\Model\Indexer\Product\Price\Processor; use Magento\Catalog\Model\Product as ProductModel; use Magento\Catalog\Model\ResourceModel\Product as ProductResource; @@ -21,12 +20,9 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; use Magento\Framework\Indexer\ActionInterface; -use Magento\Framework\Indexer\IndexerRegistry; /** * Plugin product resource model - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product { @@ -56,14 +52,9 @@ class Product private $filterBuilder; /** - * @var IndexerRegistry - */ - private $indexerRegistry; - - /** - * @var Rows + * @var Processor */ - private $rowsAction; + private $priceIndexProcessor; /** * Initialize Product dependencies. @@ -73,8 +64,7 @@ class Product * @param ProductAttributeRepositoryInterface|null $productAttributeRepository * @param SearchCriteriaBuilder|null $searchCriteriaBuilder * @param FilterBuilder|null $filterBuilder - * @param IndexerRegistry|null $indexerRegistry - * @param Rows|null $rowsAction + * @param Processor|null $priceIndexProcessor */ public function __construct( Configurable $configurable, @@ -82,8 +72,7 @@ public function __construct( ProductAttributeRepositoryInterface $productAttributeRepository = null, ?SearchCriteriaBuilder $searchCriteriaBuilder = null, ?FilterBuilder $filterBuilder = null, - ?IndexerRegistry $indexerRegistry = null, - ?Rows $rowsAction = null + ?Processor $priceIndexProcessor = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; @@ -93,10 +82,8 @@ public function __construct( ->get(SearchCriteriaBuilder::class); $this->filterBuilder = $filterBuilder ?: ObjectManager::getInstance() ->get(FilterBuilder::class); - $this->indexerRegistry = $indexerRegistry ?: ObjectManager::getInstance() - ->get(IndexerRegistry::class); - $this->rowsAction = $rowsAction ?: ObjectManager::getInstance() - ->get(Rows::class); + $this->priceIndexProcessor = $priceIndexProcessor ?: ObjectManager::getInstance() + ->get(Processor::class); } /** @@ -134,11 +121,10 @@ public function afterSave( ProductResource $result, DataObject $object ): ProductResource { - $productId = $object->getId(); - $priceIndexer = $this->indexerRegistry->get(Processor::INDEXER_ID); - if ($priceIndexer->isScheduled() - && count($this->configurable->getParentIdsByChild($productId)) > 0) { - $this->rowsAction->execute([$productId]); + $configurableProductIds = $this->configurable->getParentIdsByChild($object->getId()); + if (count($configurableProductIds) > 0) { + $priceIndexer = $this->priceIndexProcessor->getIndexer(); + $priceIndexer->reindexList($configurableProductIds); } return $result; From e6ff98da7beaa606d1f5fce89a7ff85b354461ea Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 7 Feb 2023 16:42:49 +0530 Subject: [PATCH 828/985] AC-7865::Unable to Place Order via Admin - Unknown or expired payment_method_n --- .../templates/order/create/data.phtml | 2 + .../adminhtml/web/order/create/scripts.js | 51 +++---------------- 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml index ced1ea5e7b73a..9657bb73f7594 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml @@ -11,6 +11,8 @@ <?php $scriptString = <<<script require(["Magento_Sales/order/create/form"], function(){ order.setCurrencySymbol('{$block->escapeJs($block->getCurrencySymbol($block->getCurrentCurrencyCode()))}') + order.setCustomerId('{$block->escapeJs($block->getCustomerId())}'); + order.quoteId = '{$block->escapeJs($block->getQuote()->getId())}'; }); script; ?> diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index d7daf73bd33d7..033c9c5c622b7 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -139,26 +139,26 @@ define([ $(this.getAreaId('header')).callback = 'setCustomerAfter'; $('back_order_top_button').hide(); $('reset_order_top_button').show(); - this.loadArea(['header', 'data'], true); }, setCustomerAfter: function () { this.customerSelectorHide(); if (this.storeId) { $(this.getAreaId('data')).callback = 'dataLoaded'; - this.loadArea(['data'], true); + $(this.getAreaId('form')).callback = 'dataLoaded'; + this.loadArea(['data', 'form'], true); } else { this.storeSelectorShow(); } }, - setStoreId: function (id) { + setStoreId: function (id) { this.storeId = id; this.storeSelectorHide(); this.sidebarShow(); - //this.loadArea(['header', 'sidebar','data'], true); + this.loadArea(['header', 'sidebar','data'], true); this.dataShow(); - this.loadArea(['header', 'data'], true); + /// this.loadArea(['header', 'data', 'form'], true); }, setCurrencyId: function (id) { @@ -507,7 +507,7 @@ define([ this.loadArea(['card_validation'], true, data); }, - setPaymentMethod: function (method) { + setPaymentMethod: function (method) { if (this.paymentMethod && $('payment_form_' + this.paymentMethod)) { var form = 'payment_form_' + this.paymentMethod; [form + '_before', form, form + '_after'].each(function (el) { @@ -1164,42 +1164,7 @@ define([ } }, - loadArea: function (area, indicator, params) { - var deferred = new jQuery.Deferred(); - var url = this.loadBaseUrl; - if (area) { - area = this.prepareArea(area); - url += 'block/' + area; - } - if (indicator === true) indicator = 'html-body'; - params = this.prepareParams(params); - params.json = true; - if (!this.loadingAreas) this.loadingAreas = []; - if (indicator) { - this.loadingAreas = area; - new Ajax.Request(url, { - parameters: params, - loaderArea: indicator, - onSuccess: function (transport) { - var response = transport.responseText.evalJSON(); - this.loadAreaResponseHandler(response); - deferred.resolve(); - }.bind(this) - }); - } else { - new Ajax.Request(url, { - parameters: params, - loaderArea: indicator, - onSuccess: function (transport) { - deferred.resolve(); - } - }); - } - if (typeof productConfigure != 'undefined' && area instanceof Array && area.indexOf('items') != -1) { - productConfigure.clean('quote_items'); - } - return deferred.promise(); - }, + loadAreaResponseHandler: function (response) { if (response.error) { @@ -1273,7 +1238,7 @@ define([ return 'order-' + area; }, - prepareParams: function (params) { + prepareParams: function (params) { if (!params) { params = {}; } From df17f6a1ff1e2b6ec5cc760e61b46fd777e8fc2e Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 7 Feb 2023 16:48:19 +0530 Subject: [PATCH 829/985] AC-7865::Unable to Place Order via Admin - Unknown or expired payment_method_n --- .../adminhtml/web/order/create/scripts.js | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 033c9c5c622b7..9ebb27be5248b 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -145,20 +145,20 @@ define([ this.customerSelectorHide(); if (this.storeId) { $(this.getAreaId('data')).callback = 'dataLoaded'; - $(this.getAreaId('form')).callback = 'dataLoaded'; - this.loadArea(['data', 'form'], true); + this.loadArea(['data'], true); } else { this.storeSelectorShow(); } }, - setStoreId: function (id) { + setStoreId: function (id) { this.storeId = id; this.storeSelectorHide(); this.sidebarShow(); - this.loadArea(['header', 'sidebar','data'], true); + //this.loadArea(['header', 'sidebar','data'], true); this.dataShow(); - /// this.loadArea(['header', 'data', 'form'], true); + this.loadArea(['header', 'data'], true); + location.reload(true); }, setCurrencyId: function (id) { @@ -507,7 +507,7 @@ define([ this.loadArea(['card_validation'], true, data); }, - setPaymentMethod: function (method) { + setPaymentMethod: function (method) { if (this.paymentMethod && $('payment_form_' + this.paymentMethod)) { var form = 'payment_form_' + this.paymentMethod; [form + '_before', form, form + '_after'].each(function (el) { @@ -1164,7 +1164,42 @@ define([ } }, - + loadArea: function (area, indicator, params) { + var deferred = new jQuery.Deferred(); + var url = this.loadBaseUrl; + if (area) { + area = this.prepareArea(area); + url += 'block/' + area; + } + if (indicator === true) indicator = 'html-body'; + params = this.prepareParams(params); + params.json = true; + if (!this.loadingAreas) this.loadingAreas = []; + if (indicator) { + this.loadingAreas = area; + new Ajax.Request(url, { + parameters: params, + loaderArea: indicator, + onSuccess: function (transport) { + var response = transport.responseText.evalJSON(); + this.loadAreaResponseHandler(response); + deferred.resolve(); + }.bind(this) + }); + } else { + new Ajax.Request(url, { + parameters: params, + loaderArea: indicator, + onSuccess: function (transport) { + deferred.resolve(); + } + }); + } + if (typeof productConfigure != 'undefined' && area instanceof Array && area.indexOf('items') != -1) { + productConfigure.clean('quote_items'); + } + return deferred.promise(); + }, loadAreaResponseHandler: function (response) { if (response.error) { @@ -1238,7 +1273,7 @@ define([ return 'order-' + area; }, - prepareParams: function (params) { + prepareParams: function (params) { if (!params) { params = {}; } From d7161853766aa2fda5fb2d470dea31ea80bd0322 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 7 Feb 2023 16:51:04 +0530 Subject: [PATCH 830/985] AC-7865::Unable to Place Order via Admin - Unknown or expired payment_method_n --- .../Magento/Sales/view/adminhtml/web/order/create/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 9ebb27be5248b..922a7cbff37d5 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -3,7 +3,7 @@ * See COPYING.txt for license details. */ -define([ + define([ 'jquery', 'Magento_Ui/js/modal/confirm', 'Magento_Ui/js/modal/alert', From 74cbffeb67686ba186fe29a93983ed18f3ead8fa Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Tue, 7 Feb 2023 17:50:36 +0530 Subject: [PATCH 831/985] Fixed static test failure --- .../testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index df311a3aea1ff..ca1bb43dab2e1 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -38,7 +38,7 @@ parameters: - '#Constant T_[A-Z_]+ not found.#' includes: - - %rootDir%/../../../vendor/phpstan/phpstan-deprecation-rules/rules.neon + - %rootDir%/../phpstan-deprecation-rules/rules.neon services: - From 366e8d2a0f2591bc317634a2f89777f30effa072 Mon Sep 17 00:00:00 2001 From: ashishkumarpundeer <ashish@BLR1-LMC-N73497.local> Date: Tue, 7 Feb 2023 18:04:12 +0530 Subject: [PATCH 832/985] AC-7857:2.4.6-beta3/beta4-Composer Integration Test Failures With PHP8.1 & 8.2 (Broken) --- .../OnProductUpdate/ByProductRepository/ByStockDataTest.php | 4 ++-- .../OnProductUpdate/ByProductRepository/ByStockItemTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockDataTest.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockDataTest.php index e174cb33733ae..3fef30f96e36e 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockDataTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockDataTest.php @@ -43,7 +43,7 @@ protected function setUp(): void * Test saving of stock item on product save by 'setStockData' method (deprecated) via product repository * * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled */ public function testSaveBySetStockData() { @@ -60,7 +60,7 @@ public function testSaveBySetStockData() * via product repository * * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled */ public function testSaveBySetData() { diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockItemTest.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockItemTest.php index 7593d0e8b46df..55d1d09051c59 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockItemTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/StockItemSave/OnProductUpdate/ByProductRepository/ByStockItemTest.php @@ -65,7 +65,7 @@ protected function setUp(): void * Test saving of stock item by product data via product repository * * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled */ public function testSave() { @@ -83,7 +83,7 @@ public function testSave() * product repository * * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled */ public function testSaveManuallyCreatedStockItem() { @@ -104,7 +104,7 @@ public function testSaveManuallyCreatedStockItem() * product repository * * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @magentoDbIsolation disabled + * @magentoDbIsolation enabled */ public function testSaveManuallyUpdatedStockItem() { From e3c1373c839ffc2e557b7b202a3035f6d4aede45 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Tue, 7 Feb 2023 19:41:17 +0530 Subject: [PATCH 833/985] Fixed static test failure --- .../testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index ca1bb43dab2e1..ebe708257ca27 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -38,7 +38,7 @@ parameters: - '#Constant T_[A-Z_]+ not found.#' includes: - - %rootDir%/../phpstan-deprecation-rules/rules.neon + - %rootDir%/phpstan-deprecation-rules/rules.neon services: - From a0c66ff136b3f82599117ca1bf5382b75ce4449b Mon Sep 17 00:00:00 2001 From: ashishkumarpundeer <ashish@BLR1-LMC-N73497.local> Date: Tue, 7 Feb 2023 21:43:47 +0530 Subject: [PATCH 834/985] AC-7857:2.4.6-beta3/beta4/beta5-Composer Integration Test Failures With PHP8.1 & 8.2 (Broken) --- .../Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml b/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml index 9297121c7d6a9..b63efe9a4dbd5 100644 --- a/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml +++ b/app/code/Magento/Swagger/Test/Mftf/Test/StorefrontMagentoApiSwaggerActionsExistTest.xml @@ -32,4 +32,4 @@ <seeElement selector="{{SwaggerApiListSection.swaggerActionTitle('catalogProductRepositoryV1')}}" stepKey="assertTitleOfThirdAction"/> <actionGroup ref="StorefrontSwaggerLogoutActionGroup" stepKey="swaggerLogout"/> </test> -</tests> \ No newline at end of file +</tests> From c90a4ccef9ec92a5ef18914b1a6f7e2424d374b5 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Tue, 7 Feb 2023 23:22:10 +0530 Subject: [PATCH 835/985] AC-7865::Unable to Place Order via Admin - Unknown or expired payment_method_nonce --- ...gPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml index c29b2aa167ed7..cc1fc8d493143 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml @@ -57,7 +57,7 @@ </actionGroup> <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> - + <waitForPageLoad stepKey="waitForPageFullyLoad"/> <!-- Assert label with radio button presents after reload the page --> <actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertCheckMORadioButtonIsPresentAfterReload"/> <actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertBankTransferRadioButtonIsPresentAfterReload"> From c61b26b5eb414117517c0dcaa59609b929207799 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 8 Feb 2023 01:30:43 +0530 Subject: [PATCH 836/985] AC:7865::Unable to Place Order via Admin - Unknown or expired payment_method_nonce --- ...gPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml index cc1fc8d493143..c29b2aa167ed7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingPaymentMethodRadioButtonPresentAfterReloadOrderPageTest.xml @@ -57,7 +57,7 @@ </actionGroup> <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> - <waitForPageLoad stepKey="waitForPageFullyLoad"/> + <!-- Assert label with radio button presents after reload the page --> <actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertCheckMORadioButtonIsPresentAfterReload"/> <actionGroup ref="AssertAdminPaymentMethodRadioButtonExistsOnCreateOrderPageActionGroup" stepKey="assertBankTransferRadioButtonIsPresentAfterReload"> From 634882bbde664f8bc413b5ac9d700e53fc8f9ca4 Mon Sep 17 00:00:00 2001 From: glo82145 <glo82145@adobe.com> Date: Wed, 8 Feb 2023 01:37:15 +0530 Subject: [PATCH 837/985] AC:7865::Unable to Place Order via Admin - Unknown or expired payment_method_nonce --- .../Sales/view/adminhtml/templates/order/create/data.phtml | 2 -- .../Magento/Sales/view/adminhtml/web/order/create/scripts.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml index 9657bb73f7594..ced1ea5e7b73a 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml @@ -11,8 +11,6 @@ <?php $scriptString = <<<script require(["Magento_Sales/order/create/form"], function(){ order.setCurrencySymbol('{$block->escapeJs($block->getCurrencySymbol($block->getCurrentCurrencyCode()))}') - order.setCustomerId('{$block->escapeJs($block->getCustomerId())}'); - order.quoteId = '{$block->escapeJs($block->getQuote()->getId())}'; }); script; ?> diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 922a7cbff37d5..c09b9dfaa3d94 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -158,7 +158,7 @@ //this.loadArea(['header', 'sidebar','data'], true); this.dataShow(); this.loadArea(['header', 'data'], true); - location.reload(true); + location.reload(); }, setCurrencyId: function (id) { From afb1c363500357cde810c53117ee4b5776b7460c Mon Sep 17 00:00:00 2001 From: Ann Beeskau <abeeskau@adobe.com> Date: Tue, 7 Feb 2023 14:25:32 -0800 Subject: [PATCH 838/985] ACQP-3741: [ES8] Resolve Unit test failures - ensure base ES Unit tests are skipped when testing ES8 --- .../Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php index a48f65e1b6d75..6ffaa79f3c025 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php @@ -111,7 +111,7 @@ class ElasticsearchTest extends TestCase */ protected function setUp(): void { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } From cb820afb208725ae3e3647643d6dc8ca271f37bf Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 8 Feb 2023 07:55:52 +0530 Subject: [PATCH 839/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index 4e51426defcf5..ddce65e8c8812 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -10,7 +10,6 @@ use Magento\Catalog\Api\Data\ProductAttributeInterface; use Magento\Catalog\Api\ProductAttributeRepositoryInterface; -use Magento\Catalog\Model\Indexer\Product\Price\Processor; use Magento\Catalog\Model\Product as ProductModel; use Magento\Catalog\Model\ResourceModel\Product as ProductResource; use Magento\ConfigurableProduct\Api\Data\OptionInterface; @@ -20,9 +19,13 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; use Magento\Framework\Indexer\ActionInterface; +use Magento\Framework\Indexer\CacheContext; +use Magento\Indexer\Model\Indexer\DeferredCacheCleaner; /** * Plugin product resource model + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Product { @@ -52,9 +55,14 @@ class Product private $filterBuilder; /** - * @var Processor + * @var DeferredCacheCleaner + */ + private $cacheCleaner; + + /** + * @var CacheContext */ - private $priceIndexProcessor; + private $cacheContext; /** * Initialize Product dependencies. @@ -64,7 +72,8 @@ class Product * @param ProductAttributeRepositoryInterface|null $productAttributeRepository * @param SearchCriteriaBuilder|null $searchCriteriaBuilder * @param FilterBuilder|null $filterBuilder - * @param Processor|null $priceIndexProcessor + * @param DeferredCacheCleaner|null $cacheCleaner + * @param CacheContext|null $cacheContext */ public function __construct( Configurable $configurable, @@ -72,7 +81,8 @@ public function __construct( ProductAttributeRepositoryInterface $productAttributeRepository = null, ?SearchCriteriaBuilder $searchCriteriaBuilder = null, ?FilterBuilder $filterBuilder = null, - ?Processor $priceIndexProcessor = null + ?DeferredCacheCleaner $cacheCleaner = null, + ?CacheContext $cacheContext = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; @@ -82,8 +92,8 @@ public function __construct( ->get(SearchCriteriaBuilder::class); $this->filterBuilder = $filterBuilder ?: ObjectManager::getInstance() ->get(FilterBuilder::class); - $this->priceIndexProcessor = $priceIndexProcessor ?: ObjectManager::getInstance() - ->get(Processor::class); + $this->cacheCleaner = $cacheCleaner ?? ObjectManager::getInstance()->get(DeferredCacheCleaner::class); + $this->cacheContext = $cacheContext ?? ObjectManager::getInstance()->get(CacheContext::class); } /** @@ -123,8 +133,9 @@ public function afterSave( ): ProductResource { $configurableProductIds = $this->configurable->getParentIdsByChild($object->getId()); if (count($configurableProductIds) > 0) { - $priceIndexer = $this->priceIndexProcessor->getIndexer(); - $priceIndexer->reindexList($configurableProductIds); + $this->cacheCleaner->start(); + $this->cacheContext->registerEntities(ProductModel::CACHE_TAG, $configurableProductIds); + $this->cacheCleaner->flush(); } return $result; From 222e5debadcc863baef70ef1dfa29e65600c9b8b Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 8 Feb 2023 10:45:40 +0530 Subject: [PATCH 840/985] ACP2E-1524: Page Cache is not cleared for the parent product on the child product save --- .../Plugin/Model/ResourceModel/Product.php | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php index ddce65e8c8812..b213d38e2ba24 100644 --- a/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php +++ b/app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php @@ -16,11 +16,12 @@ use Magento\ConfigurableProduct\Model\Product\Type\Configurable; use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\App\CacheInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\DataObject; +use Magento\Framework\Event\Manager as EventManager; use Magento\Framework\Indexer\ActionInterface; use Magento\Framework\Indexer\CacheContext; -use Magento\Indexer\Model\Indexer\DeferredCacheCleaner; /** * Plugin product resource model @@ -55,14 +56,19 @@ class Product private $filterBuilder; /** - * @var DeferredCacheCleaner + * @var CacheContext */ - private $cacheCleaner; + private $cacheContext; /** - * @var CacheContext + * @var EventManager */ - private $cacheContext; + private $eventManager; + + /** + * @var CacheInterface + */ + private $appCache; /** * Initialize Product dependencies. @@ -72,8 +78,9 @@ class Product * @param ProductAttributeRepositoryInterface|null $productAttributeRepository * @param SearchCriteriaBuilder|null $searchCriteriaBuilder * @param FilterBuilder|null $filterBuilder - * @param DeferredCacheCleaner|null $cacheCleaner * @param CacheContext|null $cacheContext + * @param EventManager|null $eventManager + * @param CacheInterface|null $appCache */ public function __construct( Configurable $configurable, @@ -81,8 +88,9 @@ public function __construct( ProductAttributeRepositoryInterface $productAttributeRepository = null, ?SearchCriteriaBuilder $searchCriteriaBuilder = null, ?FilterBuilder $filterBuilder = null, - ?DeferredCacheCleaner $cacheCleaner = null, - ?CacheContext $cacheContext = null + ?CacheContext $cacheContext = null, + ?EventManager $eventManager = null, + ?CacheInterface $appCache = null ) { $this->configurable = $configurable; $this->productIndexer = $productIndexer; @@ -92,8 +100,9 @@ public function __construct( ->get(SearchCriteriaBuilder::class); $this->filterBuilder = $filterBuilder ?: ObjectManager::getInstance() ->get(FilterBuilder::class); - $this->cacheCleaner = $cacheCleaner ?? ObjectManager::getInstance()->get(DeferredCacheCleaner::class); $this->cacheContext = $cacheContext ?? ObjectManager::getInstance()->get(CacheContext::class); + $this->eventManager = $eventManager ?? ObjectManager::getInstance()->get(EventManager::class); + $this->appCache = $appCache ?? ObjectManager::getInstance()->get(CacheInterface::class); } /** @@ -133,9 +142,13 @@ public function afterSave( ): ProductResource { $configurableProductIds = $this->configurable->getParentIdsByChild($object->getId()); if (count($configurableProductIds) > 0) { - $this->cacheCleaner->start(); $this->cacheContext->registerEntities(ProductModel::CACHE_TAG, $configurableProductIds); - $this->cacheCleaner->flush(); + $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $this->cacheContext]); + $identities = $this->cacheContext->getIdentities(); + if (!empty($identities)) { + $this->appCache->clean($identities); + $this->cacheContext->flush(); + } } return $result; From 060327f6ec023c7310710b822516dc1dd595e2a4 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Wed, 8 Feb 2023 12:13:28 +0530 Subject: [PATCH 841/985] Fixed static test failure --- .../testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index ebe708257ca27..986e433934f9c 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -39,6 +39,7 @@ parameters: includes: - %rootDir%/phpstan-deprecation-rules/rules.neon + - /var/www/html/vendor/phpstan/phpstan-deprecation-rules/rules.neon services: - From 7c05a2f230e7af91874b326c2e3e82ab7e355404 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Wed, 8 Feb 2023 14:19:57 +0530 Subject: [PATCH 842/985] Fixed static test failure --- .../testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index 986e433934f9c..7bf03fbeeb8b5 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -38,7 +38,6 @@ parameters: - '#Constant T_[A-Z_]+ not found.#' includes: - - %rootDir%/phpstan-deprecation-rules/rules.neon - /var/www/html/vendor/phpstan/phpstan-deprecation-rules/rules.neon services: From 360f6f2742513c50bee6683e7f52a30e01f4dbbc Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Wed, 8 Feb 2023 18:11:18 +0530 Subject: [PATCH 843/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- ...nResetDefaultTaxDestinationActionGroup.xml | 28 +++++++++ ...minSetDefaultTaxDestinationActionGroup.xml | 39 ++++++++++++ .../StorefrontEstimateShippingTaxTest.xml | 59 +++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml new file mode 100644 index 0000000000000..e276e40e9d69b --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminResetDefaultTaxDestinationActionGroup"> + <annotations> + <description>Reset admin entries (country, state, postcode) for default tax destination calculation</description> + </annotations> + + <!-- navigate to the tax configuration page --> + <amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPageForReset"/> + <waitForPageLoad stepKey="waitForTaxConfigToReset"/> + <!-- reset tax destination calculation settings --> + <scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaultsForReset"/> + <checkOption selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}" stepKey="clickToResetDefaultCountry"/> + <checkOption selector="{{AdminConfigureTaxSection.systemValueDefaultState}}" stepKey="clickToResetDefaultState"/> + <fillField selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="" stepKey="fillToResetDefaultPostCode"/> + <scrollToTopOfPage stepKey="scrollToTop"/> + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChangesToReset"/> + <waitForText userInput='You saved the configuration.' stepKey="waitForTextAfterReset"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml new file mode 100644 index 0000000000000..919a56bbbd0c2 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminSetDefaultTaxDestinationActionGroup"> + <annotations> + <description>Set admin entries (country, state, postcode) for default tax destination calculation</description> + </annotations> + <arguments> + <argument name="country" type="string" defaultValue="{{US_Address_TX.country}}"/> + <argument name="state" type="string" defaultValue="*"/> + <argument name="postcode" type="string" defaultValue=""/> + </arguments> + + <!-- navigate to the tax configuration page --> + <amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPage"/> + <waitForPageLoad stepKey="waitForTaxConfigLoad"/> + <!-- change the Default Tax Destination Calculation Configurations --> + <scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaults"/> + + <!-- conditionalClick twice to fix some flaky behavior --> + <conditionalClick selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false" stepKey="clickCalculationSettings"/> + <uncheckOption selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}" stepKey="clickDefaultCountry"/> + <selectOption selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="{{country}}" stepKey="selectDefaultCountry"/> + <uncheckOption selector="{{AdminConfigureTaxSection.systemValueDefaultState}}" stepKey="clickDefaultState"/> + <selectOption selector="{{AdminConfigureTaxSection.dropdownDefaultState}}" userInput="{{state}}" stepKey="selectDefaultState"/> + <fillField selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="{{postcode}}" stepKey="fillDefaultPostCode"/> + <!-- Save the settings --> + <scrollToTopOfPage stepKey="scrollToTop"/> + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/> + <waitForText userInput='You saved the configuration.' stepKey="waitForText"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml new file mode 100644 index 0000000000000..51fdb4521aa38 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontEstimateShippingTaxTest"> + <annotations> + <features value="Checkout"/> + <stories value="Estimate Shipping Tax"/> + <title value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> + <description value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> + <severity value="CRITICAL"/> + <testCaseId value=""/> + <useCaseId value="ACP2E-1580"/> + <group value="checkout"/> + </annotations> + + <before> + <!-- Create simple product --> + <createData entity="SimpleProduct2" stepKey="createProduct"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <!-- Delete simple product --> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <!--Reset default tax destination calculation--> + <actionGroup ref="AdminResetDefaultTaxDestinationActionGroup" stepKey="resetDefaultTaxDestination"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> + </after> + + <actionGroup ref="AdminSetDefaultTaxDestinationActionGroup" stepKey="setDefaultTaxDestination"> + <argument name="country" value="{{US_Address_NY.country}}"/> + <argument name="state" value="{{US_Address_NY.state}}"/> + <argument name="postcode" value="{{US_Address_NY.postcode}}"/> + </actionGroup> + + <!-- Add simple product to cart as Guest --> + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> + <argument name="product" value="$$createProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Go to Checkout page --> + <actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/> + <actionGroup ref="AssertStorefrontCheckoutCartEstimateShippingAndTaxAddressActionGroup" stepKey="checkAddress"> + <argument name="country" value="{{US_Address_NY.country}}"/> + <argument name="state" value="{{US_Address_NY.state}}"/> + <argument name="postcode" value="{{US_Address_NY.postcode}}"/> + </actionGroup> + </test> +</tests> From 6e881fa93d5472e358b5052de7356bb189d37a33 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 8 Feb 2023 15:56:43 +0200 Subject: [PATCH 844/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code fixed multiple issues from mftf tests --- .../Magento/Store/App/Config/Source/RuntimeConfigSource.php | 2 +- app/code/Magento/Store/App/Config/Type/Scopes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php b/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php index b8b0ede43c70d..80aaa31b184fe 100644 --- a/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php +++ b/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php @@ -102,7 +102,7 @@ private function getEntities($table, $keyField) ); foreach ($entities as $entity) { - $data[$entity[$keyField]] = $entity; + $data[strtolower($entity[$keyField])] = $entity; } return $data; diff --git a/app/code/Magento/Store/App/Config/Type/Scopes.php b/app/code/Magento/Store/App/Config/Type/Scopes.php index ea1f86a2239ff..6bfed343f4c04 100644 --- a/app/code/Magento/Store/App/Config/Type/Scopes.php +++ b/app/code/Magento/Store/App/Config/Type/Scopes.php @@ -72,7 +72,7 @@ public function get($path = '') $path = $this->convertIdPathToCodePath($patchChunks); } - return $this->data->getData($path); + return $this->data->getData(strtolower($path)); } /** From 6e4ef8886c257f256cb354da35c93cfd156a3116 Mon Sep 17 00:00:00 2001 From: Indrani <82366947+Indraniks@users.noreply.github.com> Date: Wed, 8 Feb 2023 20:49:26 +0530 Subject: [PATCH 845/985] Delete phpstan.neon Removing https://github.com/magento/magento2/pull/36148 from this PR --- .../Test/Php/_files/phpstan/phpstan.neon | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon deleted file mode 100644 index 7bf03fbeeb8b5..0000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ /dev/null @@ -1,51 +0,0 @@ -parameters: - checkExplicitMixedMissingReturn: true - checkPhpDocMissingReturn: true - reportUnmatchedIgnoredErrors: false - excludePaths: - - %rootDir%/../../../lib/internal/Magento/Framework/ObjectManager/Test/Unit/* - - %rootDir%/../../../*/_files/* - - %rootDir%/../../../dev/tests/*/Fixtures/* - - %rootDir%/../../../dev/tests/*/tmp/* - - %rootDir%/../../../dev/tests/*/_generated/* - - %rootDir%/../../../pub/* - scanDirectories: - - %rootDir%/../../../dev/tests/static/framework/tests/unit/testsuite/Magento - - %rootDir%/../../../dev/tests/integration/framework/tests/unit/testsuite/Magento - - %rootDir%/../../../dev/tests/api-functional/_files/Magento - bootstrapFiles: - - %rootDir%/../../../dev/tests/static/framework/autoload.php - - %rootDir%/../../../dev/tests/integration/framework/autoload.php - - %rootDir%/../../../dev/tests/api-functional/framework/autoload.php - - %rootDir%/../../../dev/tests/setup-integration/framework/autoload.php - - %rootDir%/../../../dev/tests/static/framework/Magento/PhpStan/autoload.php - ignoreErrors: - # Ignore PHPStan\Rules\Classes\UnusedConstructorParametersRule - - '#Constructor of class [a-zA-Z0-9\\_]+ has an unused parameter#' - # Ignore setCustomErrorHandler function not found in bootstrap files - - '#Function setCustomErrorHandler not found#' - # Ignore 'return statement is missing' error when 'void' is present in return type list - - '#Method (?:.*?) should return (?:.*?)void(?:.*?) but return statement is missing.#' - # Ignore constants, defined dynamically. - - '#Constant TESTS_WEB_API_ADAPTER not found.#' - - '#Constant TESTS_BASE_URL not found.#' - - '#Constant TESTS_XDEBUG_ENABLED not found.#' - - '#Constant TESTS_XDEBUG_SESSION not found.#' - - '#Constant INTEGRATION_TESTS_DIR not found.#' - - '#Constant MAGENTO_MODULES_PATH not found.#' - - '#Constant TESTS_MODULES_PATH not found.#' - - '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#' - - '#Constant T_[A-Z_]+ not found.#' - -includes: - - /var/www/html/vendor/phpstan/phpstan-deprecation-rules/rules.neon - -services: - - - class: Magento\PhpStan\Reflection\Php\DataObjectClassReflectionExtension - tags: {phpstan.broker.methodsClassReflectionExtension: {priority: 100}} - - errorFormatter.filtered: - class: Magento\PhpStan\Formatters\FilteredErrorFormatter - arguments: - tableErrorFormatter: @errorFormatter.table From ca8d8f41c68011dce087946bc4f8e5962d20d966 Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Wed, 8 Feb 2023 21:01:33 +0530 Subject: [PATCH 846/985] Removing 36148 --- .../Test/Php/_files/phpstan/phpstan.neon | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon new file mode 100644 index 0000000000000..c6cf0a2a9c188 --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -0,0 +1,49 @@ +parameters: + checkExplicitMixedMissingReturn: true + checkPhpDocMissingReturn: true + reportUnmatchedIgnoredErrors: false + excludePaths: + - %rootDir%/../../../lib/internal/Magento/Framework/ObjectManager/Test/Unit/* + - %rootDir%/../../../*/_files/* + - %rootDir%/../../../dev/tests/*/Fixtures/* + - %rootDir%/../../../dev/tests/*/tmp/* + - %rootDir%/../../../dev/tests/*/_generated/* + - %rootDir%/../../../pub/* + scanDirectories: + - %rootDir%/../../../dev/tests/static/framework/tests/unit/testsuite/Magento + - %rootDir%/../../../dev/tests/integration/framework/tests/unit/testsuite/Magento + - %rootDir%/../../../dev/tests/api-functional/_files/Magento + bootstrapFiles: + - %rootDir%/../../../dev/tests/static/framework/autoload.php + - %rootDir%/../../../dev/tests/integration/framework/autoload.php + - %rootDir%/../../../dev/tests/api-functional/framework/autoload.php + - %rootDir%/../../../dev/tests/setup-integration/framework/autoload.php + - %rootDir%/../../../dev/tests/static/framework/Magento/PhpStan/autoload.php + ignoreErrors: + # Ignore PHPStan\Rules\Classes\UnusedConstructorParametersRule + - '#Constructor of class [a-zA-Z0-9\\_]+ has an unused parameter#' + # Ignore setCustomErrorHandler function not found in bootstrap files + - '#Function setCustomErrorHandler not found#' + # Ignore 'return statement is missing' error when 'void' is present in return type list + - '#Method (?:.*?) should return (?:.*?)void(?:.*?) but return statement is missing.#' + # Ignore constants, defined dynamically. + - '#Constant TESTS_WEB_API_ADAPTER not found.#' + - '#Constant TESTS_BASE_URL not found.#' + - '#Constant TESTS_XDEBUG_ENABLED not found.#' + - '#Constant TESTS_XDEBUG_SESSION not found.#' + - '#Constant INTEGRATION_TESTS_DIR not found.#' + - '#Constant MAGENTO_MODULES_PATH not found.#' + - '#Constant TESTS_MODULES_PATH not found.#' + - '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#' + - '#Constant T_[A-Z_]+ not found.#' + + +services: + - + class: Magento\PhpStan\Reflection\Php\DataObjectClassReflectionExtension + tags: {phpstan.broker.methodsClassReflectionExtension: {priority: 100}} + + errorFormatter.filtered: + class: Magento\PhpStan\Formatters\FilteredErrorFormatter + arguments: + tableErrorFormatter: @errorFormatter.table From aa15408456aaeeccd4f8604d2181b21b2585b2fa Mon Sep 17 00:00:00 2001 From: Indraniks <glo78764@adobe.com> Date: Wed, 8 Feb 2023 22:36:53 +0530 Subject: [PATCH 847/985] Removing 36148 --- composer.json | 1 - composer.lock | 50 -------------------------------------------------- 2 files changed, 51 deletions(-) diff --git a/composer.json b/composer.json index ff7bdfcaf6358..0c01c49b1ec77 100644 --- a/composer.json +++ b/composer.json @@ -99,7 +99,6 @@ "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.7", - "phpstan/phpstan-deprecation-rules": "^1.0", "phpunit/phpunit": "^9.5", "sebastian/phpcpd": "^6.0", "symfony/finder": "^5.4" diff --git a/composer.lock b/composer.lock index b816abe763b65..9f0fe11b93c5f 100644 --- a/composer.lock +++ b/composer.lock @@ -11609,56 +11609,6 @@ ], "time": "2022-06-03T14:12:23+00:00" }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", - "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0" - }, - "time": "2021-09-23T11:02:21+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "9.2.15", From 0c6d1a6bfd8adc4fa65a1a89f14fa6b8d2fa1dd9 Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Wed, 8 Feb 2023 13:26:36 -0600 Subject: [PATCH 848/985] ACQE-4573: Allure report Unknown error - update composer.lock --- composer.lock | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 25e61661acb45..57ea9592d7093 100644 --- a/composer.lock +++ b/composer.lock @@ -10683,16 +10683,16 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.0.1", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "daa28ec4aceec147479f8bf1f474873bbd890050" + "reference": "df56830b0230940f3398be5414a4ab5b7df2e057" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/daa28ec4aceec147479f8bf1f474873bbd890050", - "reference": "daa28ec4aceec147479f8bf1f474873bbd890050", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/df56830b0230940f3398be5414a4ab5b7df2e057", + "reference": "df56830b0230940f3398be5414a4ab5b7df2e057", "shasum": "" }, "require": { @@ -10705,6 +10705,7 @@ "codeception/module-webdriver": "^1.0", "composer/composer": "^1.9 || ^2.0, !=2.2.16", "csharpru/vault-php": "^4.2.1", + "doctrine/annotations": "^1.13", "ext-curl": "*", "ext-dom": "*", "ext-iconv": "*", @@ -10716,7 +10717,7 @@ "monolog/monolog": "^2.3", "mustache/mustache": "~2.5", "nikic/php-parser": "^4.4", - "php": ">=8.0", + "php": ">=8.1", "php-webdriver/webdriver": "^1.9.0", "spomky-labs/otphp": "^10.0", "symfony/console": "^4.4||^5.4", @@ -10771,9 +10772,9 @@ ], "support": { "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.0.1" + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.1.0" }, - "time": "2023-01-05T22:05:27+00:00" + "time": "2023-02-08T16:12:33+00:00" }, { "name": "mustache/mustache", From dcedc692bfa0b1b3318b8398f788522262e8c088 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Feb 2023 00:58:04 +0530 Subject: [PATCH 849/985] AC-7821::Extract ES8 module to a separate repository --- .../Test/Unit/Model/Adapter/ElasticsearchTest.php | 2 +- composer.json | 1 + .../Elasticsearch7/SearchAdapter/ConnectionManagerTest.php | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php index 6ffaa79f3c025..a48f65e1b6d75 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php @@ -111,7 +111,7 @@ class ElasticsearchTest extends TestCase */ protected function setUp(): void { - if (!class_exists(\Elasticsearch\ClientBuilder::class)) { + if (!class_exists(\Elasticsearch\Client::class)) { $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/composer.json b/composer.json index 9e2a47990d4fe..9eecfdfb3301a 100644 --- a/composer.json +++ b/composer.json @@ -166,6 +166,7 @@ "magento/module-open-search": "*", "magento/module-elasticsearch": "*", "magento/module-elasticsearch-7": "*", + "magento/module-elasticsearch-8": "*", "magento/module-email": "*", "magento/module-encryption-key": "*", "magento/module-fedex": "*", diff --git a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php index 3f4fc72e4258f..fbebf629ecb80 100644 --- a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php @@ -43,6 +43,10 @@ protected function setUp(): void */ public function testCorrectElasticsearchClientEs7() { + if (!class_exists(\Elasticsearch\Client::class)) { + $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); + } + $connection = $this->connectionManager->getConnection(); $this->assertInstanceOf(Elasticsearch::class, $connection); } From c381b4d7cf8b03a783fc49902d7a903a34a60cb5 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Wed, 8 Feb 2023 14:38:31 -0600 Subject: [PATCH 850/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Model/Import/Product.php | 21 +---------------- .../Model/Indexer/IndexBuilder.php | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 14c4a845e9f7b..b56e5d43e33a5 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -31,7 +31,6 @@ use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor; use Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface; use Magento\Framework\Stdlib\DateTime; -use Magento\Framework\Indexer\Config\DependencyInfoProviderInterface; use Magento\ImportExport\Model\Import; use Magento\ImportExport\Model\Import\Entity\AbstractEntity; use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingError; @@ -768,11 +767,6 @@ class Product extends AbstractEntity */ private $stockItemProcessor; - /** - * @var DependencyInfoProviderInterface - */ - private $dependencyInfoProvider; - /** * @param \Magento\Framework\Json\Helper\Data $jsonHelper * @param \Magento\ImportExport\Helper\Data $importExportData @@ -823,7 +817,6 @@ class Product extends AbstractEntity * @param LinkProcessor|null $linkProcessor * @param File|null $fileDriver * @param StockItemProcessorInterface|null $stockItemProcessor - * @param DependencyInfoProviderInterface|null $dependencyInfoProvider * @throws LocalizedException * @throws \Magento\Framework\Exception\FileSystemException * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -879,8 +872,7 @@ public function __construct( StockProcessor $stockProcessor = null, LinkProcessor $linkProcessor = null, ?File $fileDriver = null, - ?StockItemProcessorInterface $stockItemProcessor = null, - ?DependencyInfoProviderInterface $dependencyInfoProvider = null + ?StockItemProcessorInterface $stockItemProcessor = null ) { $this->_eventManager = $eventManager; $this->stockRegistry = $stockRegistry; @@ -946,8 +938,6 @@ public function __construct( ->get(ProductRepositoryInterface::class); $this->stockItemProcessor = $stockItemProcessor ?? ObjectManager::getInstance() ->get(StockItemProcessorInterface::class); - $this->dependencyInfoProvider = $dependencyInfoProvider ?? ObjectManager::getInstance() - ->get(DependencyInfoProviderInterface::class); } /** @@ -2483,15 +2473,6 @@ private function reindexProducts($productIdsToReindex = []) foreach ($indexersToReindex as $id) { $indexer = $this->indexerRegistry->get($id); if (!$indexer->isScheduled()) { - //trick for dependent indexers in scheduled mode - //related issue: AC-7851 - $idsToRunBefore = $this->dependencyInfoProvider->getIndexerIdsToRunBefore($id); - foreach ($idsToRunBefore as $dependentId) { - $dependentIndexer = $this->indexerRegistry->get($dependentId); - if ($dependentIndexer->isScheduled()) { - $dependentIndexer->reindexList($productIdsToReindex); - } - } $indexer->reindexList($productIdsToReindex); } } diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 7c570e2909916..50c313c8f9866 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -9,6 +9,8 @@ use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ProductFactory; use Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher; +use Magento\Catalog\Model\Indexer\Product\Price\Processor as PriceIndexProcessor; +use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; use Magento\CatalogRule\Model\Indexer\IndexBuilder\ProductLoader; use Magento\CatalogRule\Model\Indexer\IndexerTableSwapperInterface as TableSwapper; use Magento\CatalogRule\Model\ResourceModel\Rule\Collection as RuleCollection; @@ -18,6 +20,7 @@ use Magento\Framework\App\ObjectManager; use Magento\Framework\App\ResourceConnection; use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Indexer\IndexerRegistry; use Magento\Framework\Pricing\PriceCurrencyInterface; use Magento\Framework\Stdlib\DateTime; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; @@ -167,6 +170,11 @@ class IndexBuilder */ private $productLoader; + /** + * @var IndexerRegistry + */ + private $indexerRegistry; + /** * @param RuleCollectionFactory $ruleCollectionFactory * @param PriceCurrencyInterface $priceCurrency @@ -188,6 +196,7 @@ class IndexBuilder * @param ProductLoader|null $productLoader * @param TableSwapper|null $tableSwapper * @param TimezoneInterface|null $localeDate + * @param IndexerRegistry|null $indexerRegistry * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -211,7 +220,8 @@ public function __construct( ActiveTableSwitcher $activeTableSwitcher = null, ProductLoader $productLoader = null, TableSwapper $tableSwapper = null, - TimezoneInterface $localeDate = null + TimezoneInterface $localeDate = null, + IndexerRegistry $indexerRegistry = null ) { $this->resource = $resource; $this->connection = $resource->getConnection(); @@ -253,6 +263,8 @@ public function __construct( ObjectManager::getInstance()->get(TableSwapper::class); $this->localeDate = $localeDate ?? ObjectManager::getInstance()->get(TimezoneInterface::class); + $this->indexerRegistry = $indexerRegistry ?? + ObjectManager::getInstance()->get(IndexerRegistry::class); } /** @@ -323,6 +335,15 @@ protected function doReindexByIds($ids) $this->reindexRuleProductPrice->execute($this->batchCount, $productId); } + //the case was not handled via indexer dependency decorator or via mview configuration + $ruleIndexer = $this->indexerRegistry->get(RuleProductProcessor::INDEXER_ID); + if ($ruleIndexer->isScheduled()) { + $priceIndexer = $this->indexerRegistry->get(PriceIndexProcessor::INDEXER_ID); + if (!$priceIndexer->isScheduled()) { + $priceIndexer->reindexList($ids); + } + } + $this->reindexRuleGroupWebsite->execute(); } From 30c98b4200f708913c989eac50815f151c66df69 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 8 Feb 2023 15:10:40 -0600 Subject: [PATCH 851/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Magento/StoreGraphQl/Plugin/Store.php | 27 +++++++++++++ .../Magento/StoreGraphQl/Plugin/Website.php | 31 ++++++++++++++ app/code/Magento/StoreGraphQl/etc/di.xml | 6 +++ .../GraphQl/Store/StoreConfigCacheTest.php | 40 +++++++++---------- 4 files changed, 84 insertions(+), 20 deletions(-) create mode 100644 app/code/Magento/StoreGraphQl/Plugin/Store.php create mode 100644 app/code/Magento/StoreGraphQl/Plugin/Website.php diff --git a/app/code/Magento/StoreGraphQl/Plugin/Store.php b/app/code/Magento/StoreGraphQl/Plugin/Store.php new file mode 100644 index 0000000000000..a5e0c66770123 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Plugin/Store.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\StoreGraphQl\Plugin; + +use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; + +/** + * Store plugin + */ +class Store +{ + /** + * Add graphql store config tag to the store cache identities. + * + * @param \Magento\Store\Model\Store $subject + * @param array $result + * @return array + */ + public function afterGetIdentities(\Magento\Store\Model\Store $subject, array $result): array + { + return array_merge($result, [sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $subject->getId())]); + } +} diff --git a/app/code/Magento/StoreGraphQl/Plugin/Website.php b/app/code/Magento/StoreGraphQl/Plugin/Website.php new file mode 100644 index 0000000000000..6aeb0ef3b7afa --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Plugin/Website.php @@ -0,0 +1,31 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\StoreGraphQl\Plugin; + +use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; + +/** + * Website plugin + */ +class Website +{ + /** + * Add graphql store config tag to the website cache identities. + * + * @param \Magento\Store\Model\Website $subject + * @param array $result + * @return array + */ + public function afterGetIdentities(\Magento\Store\Model\Website $subject, array $result): array + { + $storeIds = $subject->getStoreIds(); + foreach ($storeIds as $storeId) { + $result[] = sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $storeId); + } + return $result; + } +} diff --git a/app/code/Magento/StoreGraphQl/etc/di.xml b/app/code/Magento/StoreGraphQl/etc/di.xml index 92d22932388d9..178daa417ce73 100644 --- a/app/code/Magento/StoreGraphQl/etc/di.xml +++ b/app/code/Magento/StoreGraphQl/etc/di.xml @@ -13,4 +13,10 @@ </argument> </arguments> </type> + <type name="Magento\Store\Model\Store"> + <plugin name="getIdentities" type="Magento\StoreGraphQl\Plugin\Store" /> + </type> + <type name="Magento\Store\Model\Website"> + <plugin name="getIdentities" type="Magento\StoreGraphQl\Plugin\Website" /> + </type> </config> diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index dcb678cee7f5a..7f53bfecac6d4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -94,7 +94,7 @@ public function testGetStoreConfig(): void $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; - // Verify we obtain a cache MISS the 1st time + // Verify we obtain a cache MISS at the 1st time $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -104,7 +104,7 @@ public function testGetStoreConfig(): void $this->assertEquals($defaultStoreId, $defaultStoreResponseResult['id']); $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); - // Verify we obtain a cache HIT the 2nd time + // Verify we obtain a cache HIT at the 2nd time $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -121,7 +121,7 @@ public function testGetStoreConfig(): void $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); - // Verify we obtain a cache MISS the 1st time + // Verify we obtain a cache MISS at the 1st time $testStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [ @@ -133,7 +133,7 @@ public function testGetStoreConfig(): void $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; $this->assertEquals($testStoreCode, $testStoreResponseResult['code']); $this->assertEquals($defaultLocale, $testStoreResponseResult['locale']); - // Verify we obtain a cache HIT the 2nd time + // Verify we obtain a cache HIT at the 2nd time $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [ @@ -165,7 +165,7 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; - // Verify we obtain a cache MISS the 1st time + // Verify we obtain a cache MISS at the 1st time $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] @@ -182,7 +182,7 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); - // Verify we obtain a cache MISS the 1st time + // Verify we obtain a cache MISS at the 1st time $testStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [ @@ -201,19 +201,19 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_STORE, $testStoreCode); // Query default store config after test store config change - // Verify we obtain a cache HIT the 2nd time, the cache is not purged - $defaultStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $defaultStoreResponseHit= $this->assertCacheHitAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] ); - $this->assertArrayHasKey('storeConfig', $defaultStoreResponseHit2['body']); - $defaultStoreResponseHit2Result = $defaultStoreResponseHit2['body']['storeConfig']; - $this->assertEquals($defaultStoreId, $defaultStoreResponseHit2Result['id']); - $this->assertEquals($defaultStoreCode, $defaultStoreResponseHit2Result['code']); - $this->assertEquals($defaultLocale, $defaultStoreResponseHit2Result['locale']); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseHitResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseHitResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseHitResult['locale']); // Query test store config after test store config change - // Verify we obtain a cache MISS the 2nd time, the cache is purged + // Verify we obtain a cache MISS at the 2nd time, the cache is purged $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( $query, [ @@ -225,18 +225,18 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $testStoreResponseMissResult = $testStoreResponseMiss['body']['storeConfig']; $this->assertEquals($testStoreCode, $testStoreResponseMissResult['code']); $this->assertEquals($newLocale, $testStoreResponseMissResult['locale']); - // Verify we obtain a cache HIT the 3rd time - $testStoreResponseHit2 = $this->assertCacheHitAndReturnResponse( + // Verify we obtain a cache HIT at the 3rd time + $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [ CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, 'Store' => $testStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $testStoreResponseHit2['body']); - $testStoreResponseHit2Result = $testStoreResponseHit2['body']['storeConfig']; - $this->assertEquals($testStoreCode, $testStoreResponseHit2Result['code']); - $this->assertEquals($newLocale, $testStoreResponseHit2Result['locale']); + $this->assertArrayHasKey('storeConfig', $testStoreResponseHit['body']); + $testStoreResponseHitResult = $testStoreResponseHit['body']['storeConfig']; + $this->assertEquals($testStoreCode, $testStoreResponseHitResult['code']); + $this->assertEquals($newLocale, $testStoreResponseHitResult['locale']); } /** From dfb6bcc639a3e815923c6ad8ff8331cb29dd354c Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 8 Feb 2023 17:43:20 -0600 Subject: [PATCH 852/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Magento/StoreGraphQl/Plugin/Store.php | 1 + .../Magento/StoreGraphQl/Plugin/Website.php | 1 + .../GraphQl/Store/StoreConfigCacheTest.php | 158 ++++++++++++++---- 3 files changed, 130 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/StoreGraphQl/Plugin/Store.php b/app/code/Magento/StoreGraphQl/Plugin/Store.php index a5e0c66770123..139af175107a7 100644 --- a/app/code/Magento/StoreGraphQl/Plugin/Store.php +++ b/app/code/Magento/StoreGraphQl/Plugin/Store.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\StoreGraphQl\Plugin; diff --git a/app/code/Magento/StoreGraphQl/Plugin/Website.php b/app/code/Magento/StoreGraphQl/Plugin/Website.php index 6aeb0ef3b7afa..51825cd318af9 100644 --- a/app/code/Magento/StoreGraphQl/Plugin/Website.php +++ b/app/code/Magento/StoreGraphQl/Plugin/Website.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\StoreGraphQl\Plugin; diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 7f53bfecac6d4..6302cba240a98 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -15,6 +15,7 @@ use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\Store; use Magento\TestFramework\App\ApiMutableScopeConfig; use Magento\TestFramework\Config\Model\ConfigStorage; use Magento\TestFramework\Helper\Bootstrap; @@ -151,7 +152,7 @@ public function testGetStoreConfig(): void * Store scoped config change triggers purging only the cache of the changed store. * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 - * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php * @throws NoSuchEntityException */ public function testCachePurgedWithStoreScopeConfigChange(): void @@ -177,30 +178,30 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); // Query test store config - $testStoreCode = 'test'; - $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $testStoreCode]); + $secondStoreCode = 'second_store_view'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); - $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; - $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + $secondStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); // Verify we obtain a cache MISS at the 1st time - $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( $query, [ - CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, - 'Store' => $testStoreCode + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $testStoreResponse['body']); - $testStoreResponseResult = $testStoreResponse['body']['storeConfig']; - $this->assertEquals($testStoreCode, $testStoreResponseResult['code']); - $this->assertEquals($defaultLocale, $testStoreResponseResult['locale']); + $this->assertArrayHasKey('storeConfig', $secondStoreResponse['body']); + $secondStoreResponseResult = $secondStoreResponse['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $secondStoreResponseResult['locale']); - // Change test store locale + // Change second store locale $localeConfigPath = 'general/locale/code'; $newLocale = 'de_DE'; - $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_STORE, $testStoreCode); + $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_STORE, $secondStoreCode); - // Query default store config after test store config change + // Query default store config after second store config is changed // Verify we obtain a cache HIT at the 2nd time, the cache is not purged $defaultStoreResponseHit= $this->assertCacheHitAndReturnResponse( $query, @@ -212,31 +213,128 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->assertEquals($defaultStoreCode, $defaultStoreResponseHitResult['code']); $this->assertEquals($defaultLocale, $defaultStoreResponseHitResult['locale']); - // Query test store config after test store config change + // Query second store config after second store config is changed // Verify we obtain a cache MISS at the 2nd time, the cache is purged - $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( $query, [ - CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, - 'Store' => $testStoreCode + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $testStoreResponseMiss['body']); - $testStoreResponseMissResult = $testStoreResponseMiss['body']['storeConfig']; - $this->assertEquals($testStoreCode, $testStoreResponseMissResult['code']); - $this->assertEquals($newLocale, $testStoreResponseMissResult['locale']); + $this->assertArrayHasKey('storeConfig', $secondStoreResponseMiss['body']); + $secondStoreResponseMissResult = $secondStoreResponseMiss['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseMissResult['code']); + $this->assertEquals($newLocale, $secondStoreResponseMissResult['locale']); // Verify we obtain a cache HIT at the 3rd time - $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $secondStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [ - CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, - 'Store' => $testStoreCode + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $testStoreResponseHit['body']); - $testStoreResponseHitResult = $testStoreResponseHit['body']['storeConfig']; - $this->assertEquals($testStoreCode, $testStoreResponseHitResult['code']); - $this->assertEquals($newLocale, $testStoreResponseHitResult['locale']); + $this->assertArrayHasKey('storeConfig', $secondStoreResponseHit['body']); + $secondStoreResponseHitResult = $secondStoreResponseHit['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseHitResult['code']); + $this->assertEquals($newLocale, $secondStoreResponseHitResult['locale']); + } + + /** + * Store change triggers purging only the cache of the changed store. + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @throws NoSuchEntityException + */ + public function testCachePurgedWithStoreChange(): void + { + $defaultStoreId = $this->defaultStoreConfig->getId(); + $defaultStoreCode = $this->defaultStoreConfig->getCode(); + $defaultLocale = $this->defaultStoreConfig->getLocale(); + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); + + // Query second store config + $secondStoreCode = 'second_store_view'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $secondStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $secondStoreResponse['body']); + $secondStoreResponseResult = $secondStoreResponse['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseResult['code']); + $secondStoreName = 'Second Store View'; + $this->assertEquals($secondStoreName, $secondStoreResponseResult['store_name']); + + // Change store name + /** @var Store $store */ + $store = $this->objectManager->create(Store::class); + $store->load($secondStoreCode, 'code'); + $secondStoreNewName = $secondStoreName . ' 2'; + $store->setName($secondStoreNewName); + $store->save(); + + // Query default store config after test store config change + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('storeConfig', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['storeConfig']; + $this->assertEquals($defaultStoreId, $defaultStoreResponseHitResult['id']); + $this->assertEquals($defaultStoreCode, $defaultStoreResponseHitResult['code']); + $this->assertEquals($defaultLocale, $defaultStoreResponseHitResult['locale']); + $this->assertEquals($defaultStoreResponseResult['store_name'], $defaultStoreResponseHitResult['store_name']); + + // Query second store config after second store config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $secondStoreResponseMiss['body']); + $secondStoreResponseMissResult = $secondStoreResponseMiss['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseMissResult['code']); + $this->assertEquals($secondStoreNewName, $secondStoreResponseMissResult['store_name']); + // Verify we obtain a cache HIT at the 3rd time + $secondStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $secondStoreResponseHit['body']); + $secondStoreResponseHitResult = $secondStoreResponseHit['body']['storeConfig']; + $this->assertEquals($secondStoreCode, $secondStoreResponseHitResult['code']); + $this->assertEquals($secondStoreNewName, $secondStoreResponseHitResult['store_name']); } /** From 6d2fde4cb1894011afbd5ab51e3c03d3f257a7bb Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Thu, 9 Feb 2023 12:24:52 +0530 Subject: [PATCH 853/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- .../Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml index 51fdb4521aa38..5a52e5843aa9a 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml @@ -5,7 +5,6 @@ * See COPYING.txt for license details. */ --> - <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="StorefrontEstimateShippingTaxTest"> From 0d40f001e4e72097537cf201f37ce0dff865fdb2 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 9 Feb 2023 13:53:19 +0530 Subject: [PATCH 854/985] AC-7821:Extract ES8 module to a separate repository --- composer.json | 3 +-- .../extension_dependencies_test/allowed_dependencies/ce.php | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9eecfdfb3301a..022f87e7643b1 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "elasticsearch/elasticsearch": "^7.17", + "elasticsearch/elasticsearch": "^7.17||^8.5", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", @@ -166,7 +166,6 @@ "magento/module-open-search": "*", "magento/module-elasticsearch": "*", "magento/module-elasticsearch-7": "*", - "magento/module-elasticsearch-8": "*", "magento/module-email": "*", "magento/module-encryption-key": "*", "magento/module-fedex": "*", diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/extension_dependencies_test/allowed_dependencies/ce.php b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/extension_dependencies_test/allowed_dependencies/ce.php index 278bff7f0abf3..b4506499d0044 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/extension_dependencies_test/allowed_dependencies/ce.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/extension_dependencies_test/allowed_dependencies/ce.php @@ -8,7 +8,6 @@ return [ 'Magento\Elasticsearch' => [ 'Magento\Elasticsearch7', - 'Magento\Elasticsearch8', 'Magento\OpenSearch' ] ]; From 1b5cef3611024ca57ea0f88380cb7f0f9c9e6d68 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Thu, 9 Feb 2023 15:16:33 +0530 Subject: [PATCH 855/985] ACP2E-1526 : added return in getImageContent DocBlock --- .../Magento/Catalog/Model/Product/Gallery/GalleryManagement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index a252e07e1297d..07ddd084601ee 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -279,6 +279,7 @@ public function getList($sku) * * @param Product $product * @param ProductAttributeMediaGalleryEntryInterface $entry + * @return ImageContentInterface * @throws FileSystemException */ private function getImageContent($product, $entry): ImageContentInterface From 0ab75862f18929c3dcb95c869d23f4064521a158 Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 9 Feb 2023 16:05:02 +0530 Subject: [PATCH 856/985] AC-7821:Extract ES8 module to a separate repository --- app/code/Magento/Elasticsearch/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 4e1a2ead9e42b..51f55ffc92c75 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "*", "magento/module-catalog-inventory": "*", "magento/framework": "*", - "elasticsearch/elasticsearch": "^7.17 || ^8.0" + "elasticsearch/elasticsearch": "^7.17 || ^8.5" }, "suggest": { "magento/module-config": "*" From e8162bc43d9845a8044f79fce408e0f9d3691cd0 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Thu, 9 Feb 2023 13:36:51 +0200 Subject: [PATCH 857/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code added unit test --- .../Config/Source/RuntimeConfigSourceTest.php | 69 +++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Store/Test/Unit/App/Config/Source/RuntimeConfigSourceTest.php b/app/code/Magento/Store/Test/Unit/App/Config/Source/RuntimeConfigSourceTest.php index 9645aa2d6b808..96990f72d6de1 100644 --- a/app/code/Magento/Store/Test/Unit/App/Config/Source/RuntimeConfigSourceTest.php +++ b/app/code/Magento/Store/Test/Unit/App/Config/Source/RuntimeConfigSourceTest.php @@ -68,12 +68,73 @@ public function testGet() ->getMock(); $selectMock->expects($this->any())->method('from')->willReturnSelf(); $this->connection->expects($this->any())->method('select')->willReturn($selectMock); - $this->connection->expects($this->any())->method('fetchAll')->willReturn([]); + $this->connection->expects($this->exactly(3))->method('fetchAll') + ->willReturnOnConsecutiveCalls( + [ + 'WebsiteCode' => [ + 'website_id' => '3', + 'code' => 'WebsiteCode', + 'name' => 'website', + 'sort_order' => '0', + 'default_group_id' => '4', + 'is_default' => '0' + ] + ], + [ + 0 => [ + 'group_id' => '4', + 'website_id' => '3', + 'name' => 'store', + 'root_category_id' => '2', + 'default_store_id' => '11', + 'code' => 'second_website' + ] + ], + [ + 'SecondWebsite' => [ + 'store_id' => '11', + 'code' => 'SECOND_WEBSITE', + 'website_id' => '3', + 'group_id' => '4', + 'name' => 'second', + 'sort_order' => '0', + 'is_active' => '1' + ] + ] + ); $this->assertEquals( [ - 'websites' => [], - 'groups' => [], - 'stores' => [], + 'websites' => [ + 'websitecode' => [ + 'website_id' => '3', + 'code' => 'WebsiteCode', + 'name' => 'website', + 'sort_order' => '0', + 'default_group_id' => '4', + 'is_default' => '0' + ] + ], + 'groups' => [ + 4 => [ + 'group_id' => '4', + 'website_id' => '3', + 'name' => 'store', + 'root_category_id' => '2', + 'default_store_id' => '11', + 'code' => 'second_website' + ] + ], + 'stores' => [ + 'second_website' => [ + 'store_id' => '11', + 'code' => 'SECOND_WEBSITE', + 'website_id' => '3', + 'group_id' => '4', + 'name' => 'second', + 'sort_order' => '0', + 'is_active' => '1' + ] + ], ], $this->configSource->get() ); From 5fcb4b93c204869958cf53faa62f494298a3084e Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Thu, 9 Feb 2023 17:58:22 +0530 Subject: [PATCH 858/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- .../Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml index 5a52e5843aa9a..709e551b04105 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml @@ -14,7 +14,7 @@ <title value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> <description value="Tax and Shipping Estimator in the Cart not reflecting default destination configuration."/> <severity value="CRITICAL"/> - <testCaseId value=""/> + <testCaseId value="AC-7922"/> <useCaseId value="ACP2E-1580"/> <group value="checkout"/> </annotations> From a3fbbfa1915bae8e1804cbecbafdead6193057bc Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 8 Feb 2023 18:10:57 -0600 Subject: [PATCH 859/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Magento/StoreGraphQl/Plugin/Group.php | 32 ++++ app/code/Magento/StoreGraphQl/etc/di.xml | 7 +- .../GraphQl/Store/StoreConfigCacheTest.php | 177 ++++++++++++++++-- ...ites_with_store_groups_stores_rollback.php | 14 ++ 4 files changed, 213 insertions(+), 17 deletions(-) create mode 100644 app/code/Magento/StoreGraphQl/Plugin/Group.php diff --git a/app/code/Magento/StoreGraphQl/Plugin/Group.php b/app/code/Magento/StoreGraphQl/Plugin/Group.php new file mode 100644 index 0000000000000..fa5711bafa981 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Plugin/Group.php @@ -0,0 +1,32 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\StoreGraphQl\Plugin; + +use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; + +/** + * Store group plugin + */ +class Group +{ + /** + * Add graphql store config tag to the store group cache identities. + * + * @param \Magento\Store\Model\Group $subject + * @param array $result + * @return array + */ + public function afterGetIdentities(\Magento\Store\Model\Group $subject, array $result): array + { + $storeIds = $subject->getStoreIds(); + foreach ($storeIds as $storeId) { + $result[] = sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $storeId); + } + return $result; + } +} diff --git a/app/code/Magento/StoreGraphQl/etc/di.xml b/app/code/Magento/StoreGraphQl/etc/di.xml index 178daa417ce73..0390fc860e832 100644 --- a/app/code/Magento/StoreGraphQl/etc/di.xml +++ b/app/code/Magento/StoreGraphQl/etc/di.xml @@ -14,9 +14,12 @@ </arguments> </type> <type name="Magento\Store\Model\Store"> - <plugin name="getIdentities" type="Magento\StoreGraphQl\Plugin\Store" /> + <plugin name="getStoreIdentities" type="Magento\StoreGraphQl\Plugin\Store" /> </type> <type name="Magento\Store\Model\Website"> - <plugin name="getIdentities" type="Magento\StoreGraphQl\Plugin\Website" /> + <plugin name="getWebsiteIdentities" type="Magento\StoreGraphQl\Plugin\Website" /> + </type> + <type name="Magento\Store\Model\Group"> + <plugin name="getGroupIdentities" type="Magento\StoreGraphQl\Plugin\Group" /> </type> </config> diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 6302cba240a98..d915cf52c0797 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -14,6 +14,7 @@ use Magento\Store\Api\StoreConfigManagerInterface; use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; +use Magento\Store\Model\Group; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\Store; use Magento\TestFramework\App\ApiMutableScopeConfig; @@ -152,7 +153,7 @@ public function testGetStoreConfig(): void * Store scoped config change triggers purging only the cache of the changed store. * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 - * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException */ public function testCachePurgedWithStoreScopeConfigChange(): void @@ -177,11 +178,11 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->assertEquals($defaultStoreCode, $defaultStoreResponseResult['code']); $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); - // Query test store config - $secondStoreCode = 'second_store_view'; - $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); - $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); - $secondStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Query second store config + $secondStoreCode = 'test'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseSecondStore['headers']); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); // Verify we obtain a cache MISS at the 1st time $secondStoreResponse = $this->assertCacheMissAndReturnResponse( @@ -244,7 +245,7 @@ public function testCachePurgedWithStoreScopeConfigChange(): void * Store change triggers purging only the cache of the changed store. * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 - * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException */ public function testCachePurgedWithStoreChange(): void @@ -270,10 +271,10 @@ public function testCachePurgedWithStoreChange(): void $this->assertEquals($defaultLocale, $defaultStoreResponseResult['locale']); // Query second store config - $secondStoreCode = 'second_store_view'; - $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); - $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); - $secondStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $secondStoreCode = 'test'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseSecondStore['headers']); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); // Verify we obtain a cache MISS at the 1st time $secondStoreResponse = $this->assertCacheMissAndReturnResponse( @@ -286,10 +287,10 @@ public function testCachePurgedWithStoreChange(): void $this->assertArrayHasKey('storeConfig', $secondStoreResponse['body']); $secondStoreResponseResult = $secondStoreResponse['body']['storeConfig']; $this->assertEquals($secondStoreCode, $secondStoreResponseResult['code']); - $secondStoreName = 'Second Store View'; + $secondStoreName = 'Test Store'; $this->assertEquals($secondStoreName, $secondStoreResponseResult['store_name']); - // Change store name + // Change second store name /** @var Store $store */ $store = $this->objectManager->create(Store::class); $store->load($secondStoreCode, 'code'); @@ -297,7 +298,7 @@ public function testCachePurgedWithStoreChange(): void $store->setName($secondStoreNewName); $store->save(); - // Query default store config after test store config change + // Query default store config after second store is changed // Verify we obtain a cache HIT at the 2nd time, the cache is not purged $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, @@ -310,7 +311,7 @@ public function testCachePurgedWithStoreChange(): void $this->assertEquals($defaultLocale, $defaultStoreResponseHitResult['locale']); $this->assertEquals($defaultStoreResponseResult['store_name'], $defaultStoreResponseHitResult['store_name']); - // Query second store config after second store config is changed + // Query second store config after second store is changed // Verify we obtain a cache MISS at the 2nd time, the cache is purged $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( $query, @@ -337,6 +338,152 @@ public function testCachePurgedWithStoreChange(): void $this->assertEquals($secondStoreNewName, $secondStoreResponseHitResult['store_name']); } + /** + * Store group change triggers purging only the cache of the stores associated with the changed store group. + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @throws NoSuchEntityException + */ + public function testCachePurgedWithStoreGroupChange(): void + { + $this->changeToOneWebsiteTwoStoreGroupsThreeStores(); + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseThirdStore['headers']); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $secondStoreResponse['body']); + $secondStoreResponseResult = $secondStoreResponse['body']['storeConfig']; + $secondStoreGroupName = 'Second store group'; + $this->assertEquals($secondStoreGroupName, $secondStoreResponseResult['store_group_name']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseThirdStore['headers']); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $thirdStoreResponse['body']); + $thirdStoreResponseResult = $thirdStoreResponse['body']['storeConfig']; + $this->assertEquals($secondStoreGroupName, $thirdStoreResponseResult['store_group_name']); + + // Change store group name + /** @var Group $storeGroup */ + $storeGroup = $this->objectManager->create(Group::class); + $storeGroup->load('second_store', 'code'); + $secondStoreGroupNewName = $secondStoreGroupName . ' 2'; + $storeGroup->setName($secondStoreGroupNewName); + $storeGroup->save(); + + // Query default store config after second store group is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config after its associated second store group is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $secondStoreResponseMiss['body']); + $secondStoreResponseMissResult = $secondStoreResponseMiss['body']['storeConfig']; + $this->assertEquals($secondStoreGroupNewName, $secondStoreResponseMissResult['store_group_name']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store config after its associated second store group is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertArrayHasKey('storeConfig', $thirdStoreResponseMiss['body']); + $thirdStoreResponseMissResult = $thirdStoreResponseMiss['body']['storeConfig']; + $this->assertEquals($secondStoreGroupNewName, $thirdStoreResponseMissResult['store_group_name']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + private function changeToOneWebsiteTwoStoreGroupsThreeStores() + { + // Change second store to the same website of the default store + /** @var Store $store2 */ + $store2 = $this->objectManager->create(Store::class); + $store2->load('second_store_view', 'code'); + $store2GroupId = $store2->getStoreGroupId(); + /** @var Group $store2Group */ + $store2Group = $this->objectManager->create(Group::class); + $store2Group->load($store2GroupId); + $store2Group->setWebsiteId(1)->save(); + $store2->setWebsiteId(1)->save(); + + // Change third store to the same store group and website of second store + /** @var Store $store3 */ + $store3 = $this->objectManager->create(Store::class); + $store3->load('third_store_view', 'code'); + $store3->setGroupId($store2GroupId)->setWebsiteId(1)->save(); + } + /** * Get query * diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php index 110c93b620330..f18253321bdca 100644 --- a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php @@ -23,6 +23,20 @@ $website2->delete(); } +/** Delete the second store groups **/ +$group = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group \Magento\Store\Model\Group */ +$groupId = $group->load('second_store', 'code')->getId(); +if ($groupId) { + $group->delete(); +} +$group2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group2 \Magento\Store\Model\Group */ +$groupId2 = $group2->load('third_store', 'code')->getId(); +if ($groupId2) { + $group2->delete(); +} + $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store->load('second_store_view', 'code')->getId()) { $store->delete(); From ae43c299fafc6a3932318f3775f8259bb1b6b81e Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 9 Feb 2023 19:26:05 +0530 Subject: [PATCH 860/985] AC-7821:Extract ES8 module to a separate repository - Fixed Unit/Static/Integration test failures --- .../Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php | 2 +- .../Test/Unit/Model/DataProvider/Base/SuggestionsTest.php | 2 +- .../Elasticsearch7/SearchAdapter/ConnectionManagerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php index a48f65e1b6d75..280284b7a7cb5 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php @@ -111,7 +111,7 @@ class ElasticsearchTest extends TestCase */ protected function setUp(): void { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php index 3dca34b09cb78..ab702e6441341 100644 --- a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php +++ b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php @@ -226,7 +226,7 @@ public function testGetItemsWithEnabledSearchSuggestion(): void */ public function testGetItemsException(): void { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php index fbebf629ecb80..a5728a58a5309 100644 --- a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php @@ -43,7 +43,7 @@ protected function setUp(): void */ public function testCorrectElasticsearchClientEs7() { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } From 7377726a0c300e6a806dcef63edf0b058a7bca64 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 3 Jan 2023 17:53:28 +0530 Subject: [PATCH 861/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the issue. --- .../RemoveCookiesWhenQuoteIsNullPlugin.php | 62 +++++++++++++++++++ app/code/Magento/Customer/etc/frontend/di.xml | 3 + 2 files changed, 65 insertions(+) create mode 100644 app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php diff --git a/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php b/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php new file mode 100644 index 0000000000000..01686ff94f4a9 --- /dev/null +++ b/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Customer\Model\Cart; + +use Magento\Checkout\Block\Cart\Sidebar; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Stdlib\Cookie\FailureToSendException; +use Magento\Framework\Stdlib\Cookie\PhpCookieManager; +use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory; +use Magento\Framework\Session\SessionManagerInterface; + +class RemoveCookiesWhenQuoteIsNullPlugin +{ + /** + * @var PhpCookieManager + */ + private $cookieManager; + + /** + * @var CookieMetadataFactory + */ + private $cookieMetadataFactory; + + /** + * @var SessionManagerInterface + */ + private $sessionManager; + + /** + * @param PhpCookieManager $cookieManager + * @param CookieMetadataFactory $cookieMetadataFactory + * @param SessionManagerInterface $sessionManager + */ + public function __construct( + PhpCookieManager $cookieManager, + CookieMetadataFactory $cookieMetadataFactory, + SessionManagerInterface $sessionManager + ) { + $this->cookieManager = $cookieManager; + $this->cookieMetadataFactory = $cookieMetadataFactory; + $this->sessionManager = $sessionManager; + } + + /** + * @param Sidebar $subject + * @return void + * @throws InputException + * @throws FailureToSendException + */ + public function beforeGetConfig(Sidebar $subject) + { + if ($subject->getQuote()->getItems() === null) { + $metadata = $this->cookieMetadataFactory->createCookieMetadata(); + $metadata->setPath($this->sessionManager->getCookiePath()); + $metadata->setDomain($this->sessionManager->getCookieDomain()); + $this->cookieManager->deleteCookie('mage-cache-sessid', $metadata); + } + } +} diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 31f3e11522e12..22a6a6fb22d97 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -57,6 +57,9 @@ <type name="Magento\Checkout\Block\Cart\Sidebar"> <plugin name="customer_cart" type="Magento\Customer\Model\Cart\ConfigPlugin" /> </type> + <type name="Magento\Checkout\Block\Cart\Sidebar"> + <plugin name="customer_remove_items_from_cart" type="Magento\Customer\Model\Cart\RemoveCookiesWhenQuoteIsNullPlugin" /> + </type> <type name="Magento\Framework\Session\SessionManagerInterface"> <plugin name="session_checker" type="Magento\Customer\CustomerData\Plugin\SessionChecker" /> </type> From 194d4853c3f1f6eff717eb0ae1b2bd549723fb66 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 6 Jan 2023 13:37:56 +0530 Subject: [PATCH 862/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the issue. --- .../RemoveCookiesWhenQuoteIsNullPlugin.php | 62 ------------------ .../Customer/ViewModel/Customer/Data.php | 63 +++++++++++++++++++ app/code/Magento/Customer/etc/frontend/di.xml | 3 - .../Customer/view/frontend/layout/default.xml | 6 +- .../frontend/templates/js/customer-data.phtml | 14 +++-- .../view/frontend/web/js/customer-data.js | 10 +++ 6 files changed, 87 insertions(+), 71 deletions(-) delete mode 100644 app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php create mode 100644 app/code/Magento/Customer/ViewModel/Customer/Data.php diff --git a/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php b/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php deleted file mode 100644 index 01686ff94f4a9..0000000000000 --- a/app/code/Magento/Customer/Model/Cart/RemoveCookiesWhenQuoteIsNullPlugin.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Customer\Model\Cart; - -use Magento\Checkout\Block\Cart\Sidebar; -use Magento\Framework\Exception\InputException; -use Magento\Framework\Stdlib\Cookie\FailureToSendException; -use Magento\Framework\Stdlib\Cookie\PhpCookieManager; -use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory; -use Magento\Framework\Session\SessionManagerInterface; - -class RemoveCookiesWhenQuoteIsNullPlugin -{ - /** - * @var PhpCookieManager - */ - private $cookieManager; - - /** - * @var CookieMetadataFactory - */ - private $cookieMetadataFactory; - - /** - * @var SessionManagerInterface - */ - private $sessionManager; - - /** - * @param PhpCookieManager $cookieManager - * @param CookieMetadataFactory $cookieMetadataFactory - * @param SessionManagerInterface $sessionManager - */ - public function __construct( - PhpCookieManager $cookieManager, - CookieMetadataFactory $cookieMetadataFactory, - SessionManagerInterface $sessionManager - ) { - $this->cookieManager = $cookieManager; - $this->cookieMetadataFactory = $cookieMetadataFactory; - $this->sessionManager = $sessionManager; - } - - /** - * @param Sidebar $subject - * @return void - * @throws InputException - * @throws FailureToSendException - */ - public function beforeGetConfig(Sidebar $subject) - { - if ($subject->getQuote()->getItems() === null) { - $metadata = $this->cookieMetadataFactory->createCookieMetadata(); - $metadata->setPath($this->sessionManager->getCookiePath()); - $metadata->setDomain($this->sessionManager->getCookieDomain()); - $this->cookieManager->deleteCookie('mage-cache-sessid', $metadata); - } - } -} diff --git a/app/code/Magento/Customer/ViewModel/Customer/Data.php b/app/code/Magento/Customer/ViewModel/Customer/Data.php new file mode 100644 index 0000000000000..8c285b368c961 --- /dev/null +++ b/app/code/Magento/Customer/ViewModel/Customer/Data.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\ViewModel\Customer; + +use Magento\Customer\Model\Context; +use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\Serialize\Serializer\Json as Json; +use Magento\Framework\View\Element\Block\ArgumentInterface; + +/** + * Customer's data view model + */ +class Data implements ArgumentInterface +{ + /** + * @var Json + */ + private $jsonEncoder; + + /** + * + * @var HttpContext + */ + private $httpContext; + + /** + * @param HttpContext $httpContext + * @param Json $jsonEncoder + */ + public function __construct( + HttpContext $httpContext, + Json $jsonEncoder + ) { + $this->httpContext = $httpContext; + $this->jsonEncoder = $jsonEncoder; + } + + /** + * Check is user login + * + * @return bool + */ + public function isLoggedIn() + { + return $this->httpContext->getValue(Context::CONTEXT_AUTH); + } + + /** + * Encode the mixed $valueToEncode into the JSON format + * + * @param mixed $valueToEncode + * @return string + */ + public function jsonEncode($valueToEncode) + { + return $this->jsonEncoder->serialize($valueToEncode); + } +} diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 22a6a6fb22d97..31f3e11522e12 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -57,9 +57,6 @@ <type name="Magento\Checkout\Block\Cart\Sidebar"> <plugin name="customer_cart" type="Magento\Customer\Model\Cart\ConfigPlugin" /> </type> - <type name="Magento\Checkout\Block\Cart\Sidebar"> - <plugin name="customer_remove_items_from_cart" type="Magento\Customer\Model\Cart\RemoveCookiesWhenQuoteIsNullPlugin" /> - </type> <type name="Magento\Framework\Session\SessionManagerInterface"> <plugin name="session_checker" type="Magento\Customer\CustomerData\Plugin\SessionChecker" /> </type> diff --git a/app/code/Magento/Customer/view/frontend/layout/default.xml b/app/code/Magento/Customer/view/frontend/layout/default.xml index b431373ca4125..eba504a12a1e5 100644 --- a/app/code/Magento/Customer/view/frontend/layout/default.xml +++ b/app/code/Magento/Customer/view/frontend/layout/default.xml @@ -48,7 +48,11 @@ </arguments> </block> <block name="customer.customer.data" class="Magento\Customer\Block\CustomerData" - template="Magento_Customer::js/customer-data.phtml"/> + template="Magento_Customer::js/customer-data.phtml"> + <arguments> + <argument name="view_model" xsi:type="object">Magento\Customer\ViewModel\Customer\Data</argument> + </arguments> + </block> <block name="customer.data.invalidation.rules" class="Magento\Customer\Block\CustomerScopeData" template="Magento_Customer::js/customer-data/invalidation-rules.phtml"/> </referenceContainer> diff --git a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml index eb50ea6454788..7031778a8d473 100644 --- a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml @@ -3,10 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +use Magento\Customer\ViewModel\Customer\Data; +use Magento\Framework\App\ObjectManager; /** @var \Magento\Customer\Block\CustomerData $block */ // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper +/** @var Data $viewModel */ +$viewModel = $block->getViewModel() ?? ObjectManager::getInstance()->get(Data::class); +$customerDataUrl = $block->getCustomerDataUrl('customer/account/updateSession'); +$expirableSectionNames = $block->getExpirableSectionNames(); ?> <script type="text/x-magento-init"> { @@ -14,12 +20,10 @@ "Magento_Customer/js/customer-data": { "sectionLoadUrl": "<?= $block->escapeJs($block->getCustomerDataUrl('customer/section/load')) ?>", "expirableSectionLifetime": <?= (int)$block->getExpirableSectionLifetime() ?>, - "expirableSectionNames": <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class) - ->jsonEncode($block->getExpirableSectionNames()) ?>, + "expirableSectionNames": <?= /* @noEscape */ $viewModel->jsonEncode($expirableSectionNames) ?>, "cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>", - "updateSessionUrl": "<?= $block->escapeJs( - $block->getCustomerDataUrl('customer/account/updateSession') - ) ?>" + "updateSessionUrl": "<?= $block->escapeJs($customerDataUrl) ?>", + "isLoggedIn": "<?= /* @noEscape */ $viewModel->isLoggedIn() ?>" } } } diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index 213aa105ba25b..33fa89a1a3cda 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -47,10 +47,20 @@ define([ * Invalidate Cache By Close Cookie Session */ invalidateCacheByCloseCookieSession = function () { + var isLoggedIn = parseInt(options.isLoggedIn, 10) || 0; + if (!$.cookieStorage.isSet('mage-cache-sessid')) { storage.removeAll(); } + if (!$.localStorage.isSet('mage-customer-login')) { + $.localStorage.set('mage-customer-login', isLoggedIn); + } + if ($.localStorage.get('mage-customer-login') !== isLoggedIn) { + $.localStorage.set('mage-customer-login', isLoggedIn); + storage.removeAll(); + } + $.cookieStorage.set('mage-cache-sessid', true); }; From ae65d78b117b9fcf61c5f3c1dbed519f0ee447fd Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 9 Jan 2023 15:05:34 +0530 Subject: [PATCH 863/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Added the test coverage. --- ...eMiniCartEmptyAfterClearingSessionTest.xml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml new file mode 100644 index 0000000000000..4696ae23e8297 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontValidateMiniCartEmptyAfterClearingSessionTest"> + <annotations> + <features value="Customer"/> + <stories value="Customer data in Local Storage not reset when session file lost"/> + <title value="Validate minicart is empty when customer session file lost."/> + <description value="Validate minicart is empty when customer session file lost."/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7590"/> + <useCaseId value="ACP2E-1445"/> + <group value="customer"/> + </annotations> + <before> + <!-- Create customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <!-- Create product --> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> + </before> + <after> + <!-- Delete customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + + <!-- Delete product --> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + </after> + <!-- Login to Frontend --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> + <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> + <argument name="path">var/session</argument> + </helper> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> + <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> + <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> + </test> +</tests> From 90d3ff5ceae86cc546ddccb55726aa75d5f21576 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Wed, 11 Jan 2023 19:18:57 +0530 Subject: [PATCH 864/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- .../StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index 4696ae23e8297..3a6e69671cc08 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -20,6 +20,7 @@ <group value="customer"/> </annotations> <before> + <magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/> <!-- Create customer --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> From 2b09c4e7fb873b30587806bfbec7890c41b17ebc Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Wed, 11 Jan 2023 19:22:55 +0530 Subject: [PATCH 865/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- .../StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index 3a6e69671cc08..36c5c069d694c 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -20,7 +20,7 @@ <group value="customer"/> </annotations> <before> - <magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/> + <magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/> <!-- Create customer --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> From 5390b109192d0b7f822b4d00aece3c4b3fd9cf9f Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Thu, 12 Jan 2023 11:25:11 +0530 Subject: [PATCH 866/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- ...eMiniCartEmptyAfterClearingSessionTest.xml | 54 ----------- ...eMinicartEmptyAfterClearingSessionTest.php | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 54 deletions(-) delete mode 100644 app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml deleted file mode 100644 index 36c5c069d694c..0000000000000 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontValidateMiniCartEmptyAfterClearingSessionTest"> - <annotations> - <features value="Customer"/> - <stories value="Customer data in Local Storage not reset when session file lost"/> - <title value="Validate minicart is empty when customer session file lost."/> - <description value="Validate minicart is empty when customer session file lost."/> - <severity value="AVERAGE"/> - <testCaseId value="AC-7590"/> - <useCaseId value="ACP2E-1445"/> - <group value="customer"/> - </annotations> - <before> - <magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/> - <!-- Create customer --> - <createData entity="Simple_US_Customer" stepKey="createCustomer"/> - - <!-- Create product --> - <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> - </before> - <after> - <!-- Delete customer --> - <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - - <!-- Delete product --> - <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - </after> - <!-- Login to Frontend --> - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> - <argument name="Customer" value="$$createCustomer$$"/> - </actionGroup> - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> - <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> - </actionGroup> - <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> - <argument name="path">var/session</argument> - </helper> - <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> - <argument name="tags" value=""/> - </actionGroup> - <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> - <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> - </test> -</tests> diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php new file mode 100644 index 0000000000000..e7cfd1b1f3d09 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Customer\Controller; + +use Magento\Checkout\Model\Session as CheckoutSession; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\StateException; +use Magento\Framework\Filesystem; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\ObjectManagerInterface; +use Magento\Quote\Api\CartManagementInterface; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Quote\Model\GetQuoteByReservedOrderId; + +class ValidateMinicartEmptyAfterClearingSessionTest extends \Magento\TestFramework\TestCase\AbstractController +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var Filesystem + */ + private $filesystem; + + /** + * @var CartManagementInterface + */ + private $cartManagement; + + /** + * @var GetQuoteByReservedOrderId + */ + private $getQuoteByReservedOrderId; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** @var CheckoutSession */ + private $checkoutSession; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->filesystem = $this->objectManager->get(Filesystem::class); + $this->getQuoteByReservedOrderId = $this->objectManager->get(GetQuoteByReservedOrderId::class); + $this->customerRepository = $this->objectManager->get(CustomerRepositoryInterface::class); + $this->cartManagement = $this->objectManager->get(CartManagementInterface::class); + $this->checkoutSession = $this->objectManager->get(CheckoutSession::class); + } + + /** + * @magentoDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php + * @magentoDataFixture Magento/Customer/_files/customer.php + * + * @return void + * @throws FileSystemException + * @throws LocalizedException + * @throws NoSuchEntityException + * @throws StateException + */ + public function testValidateEmptyMinicartAfterSessionClear(): void + { + $customer = $this->customerRepository->get('customer@example.com'); + $quote = $this->getQuoteByReservedOrderId->execute('test_order_with_simple_product_without_address'); + $result = $this->cartManagement->assignCustomer($quote->getId(), $customer->getId(), $customer->getStoreId()); + $this->assertTrue($result); + $customerQuote = $this->cartManagement->getCartForCustomer($customer->getId()); + $this->checkoutSession->setQuoteId($customerQuote->getId()); + $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR)->delete(DirectoryList::SESSION); + $this->dispatch('backend/admin/cache/flushAll'); + $this->assertEquals(0, $this->checkoutSession->getQuote()->getItemsCount()); + } +} From 53775133a6346a5fb9eb68432ff4f68bd3ece197 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Thu, 12 Jan 2023 13:25:45 +0530 Subject: [PATCH 867/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- ...eMiniCartEmptyAfterClearingSessionTest.xml | 53 +++++++++++ ...eMinicartEmptyAfterClearingSessionTest.php | 89 ------------------- 2 files changed, 53 insertions(+), 89 deletions(-) create mode 100644 app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml delete mode 100644 dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml new file mode 100644 index 0000000000000..4696ae23e8297 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontValidateMiniCartEmptyAfterClearingSessionTest"> + <annotations> + <features value="Customer"/> + <stories value="Customer data in Local Storage not reset when session file lost"/> + <title value="Validate minicart is empty when customer session file lost."/> + <description value="Validate minicart is empty when customer session file lost."/> + <severity value="AVERAGE"/> + <testCaseId value="AC-7590"/> + <useCaseId value="ACP2E-1445"/> + <group value="customer"/> + </annotations> + <before> + <!-- Create customer --> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + + <!-- Create product --> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> + </before> + <after> + <!-- Delete customer --> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + + <!-- Delete product --> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + </after> + <!-- Login to Frontend --> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> + <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> + <argument name="path">var/session</argument> + </helper> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> + <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> + <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> + </test> +</tests> diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php deleted file mode 100644 index e7cfd1b1f3d09..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/ValidateMinicartEmptyAfterClearingSessionTest.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Customer\Controller; - -use Magento\Checkout\Model\Session as CheckoutSession; -use Magento\Customer\Api\CustomerRepositoryInterface; -use Magento\Framework\Exception\FileSystemException; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Exception\StateException; -use Magento\Framework\Filesystem; -use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\ObjectManagerInterface; -use Magento\Quote\Api\CartManagementInterface; -use Magento\TestFramework\Helper\Bootstrap; -use Magento\TestFramework\Quote\Model\GetQuoteByReservedOrderId; - -class ValidateMinicartEmptyAfterClearingSessionTest extends \Magento\TestFramework\TestCase\AbstractController -{ - /** - * @var ObjectManagerInterface - */ - private $objectManager; - - /** - * @var Filesystem - */ - private $filesystem; - - /** - * @var CartManagementInterface - */ - private $cartManagement; - - /** - * @var GetQuoteByReservedOrderId - */ - private $getQuoteByReservedOrderId; - - /** - * @var CustomerRepositoryInterface - */ - private $customerRepository; - - /** @var CheckoutSession */ - private $checkoutSession; - - /** - * @inheritdoc - */ - protected function setUp(): void - { - parent::setUp(); - - $this->objectManager = Bootstrap::getObjectManager(); - $this->filesystem = $this->objectManager->get(Filesystem::class); - $this->getQuoteByReservedOrderId = $this->objectManager->get(GetQuoteByReservedOrderId::class); - $this->customerRepository = $this->objectManager->get(CustomerRepositoryInterface::class); - $this->cartManagement = $this->objectManager->get(CartManagementInterface::class); - $this->checkoutSession = $this->objectManager->get(CheckoutSession::class); - } - - /** - * @magentoDataFixture Magento/Checkout/_files/quote_with_simple_product_saved.php - * @magentoDataFixture Magento/Customer/_files/customer.php - * - * @return void - * @throws FileSystemException - * @throws LocalizedException - * @throws NoSuchEntityException - * @throws StateException - */ - public function testValidateEmptyMinicartAfterSessionClear(): void - { - $customer = $this->customerRepository->get('customer@example.com'); - $quote = $this->getQuoteByReservedOrderId->execute('test_order_with_simple_product_without_address'); - $result = $this->cartManagement->assignCustomer($quote->getId(), $customer->getId(), $customer->getStoreId()); - $this->assertTrue($result); - $customerQuote = $this->cartManagement->getCartForCustomer($customer->getId()); - $this->checkoutSession->setQuoteId($customerQuote->getId()); - $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR)->delete(DirectoryList::SESSION); - $this->dispatch('backend/admin/cache/flushAll'); - $this->assertEquals(0, $this->checkoutSession->getQuote()->getItemsCount()); - } -} From f090c7ed6be3959529641ddddfa2b9e2119a17ec Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 13 Jan 2023 11:17:01 +0530 Subject: [PATCH 868/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- ...frontValidateMiniCartEmptyAfterClearingSessionTest.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index 4696ae23e8297..3b50cd7fe18a7 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -41,12 +41,8 @@ <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> </actionGroup> <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> - <argument name="path">var/session</argument> - </helper> - <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> - <argument name="tags" value=""/> - </actionGroup> + <!--Reset cookies and refresh the page--> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> </test> From fee4f9ecf8e7dee1229f4f54a5f3118fe6df7e7b Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 16 Jan 2023 09:09:50 +0530 Subject: [PATCH 869/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments --- .../view/frontend/templates/cart/minicart.phtml | 1 + ...tValidateMiniCartEmptyAfterClearingSessionTest.xml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml index 24641ab049083..676be870ecfee 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml @@ -30,6 +30,7 @@ </a> <?php if ($block->getIsNeedToDisplaySideBar()):?> <div class="block block-minicart" + session="<?= session_save_path() ?>" data-role="dropdownDialog" data-mage-init='{"dropdownDialog":{ "appendTo":"[data-block=minicart]", diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index 3b50cd7fe18a7..ba49f7226978a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -41,8 +41,15 @@ <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> </actionGroup> <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> - <!--Reset cookies and refresh the page--> - <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> + <argument name="path">var/session/*</argument> + </helper> + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertVarSessionFolderExists"> + <argument name="path">var/session</argument> + </helper> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> </test> From 6ac08ea5c8f82573f65df618d6c4fa1687e155e3 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 16 Jan 2023 15:31:28 +0530 Subject: [PATCH 870/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- .../Checkout/view/frontend/templates/cart/minicart.phtml | 1 - ...torefrontValidateMiniCartEmptyAfterClearingSessionTest.xml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml index 676be870ecfee..24641ab049083 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml @@ -30,7 +30,6 @@ </a> <?php if ($block->getIsNeedToDisplaySideBar()):?> <div class="block block-minicart" - session="<?= session_save_path() ?>" data-role="dropdownDialog" data-mage-init='{"dropdownDialog":{ "appendTo":"[data-block=minicart]", diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index ba49f7226978a..d2c4274bfc842 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -42,10 +42,10 @@ </actionGroup> <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> - <argument name="path">var/session/*</argument> + <argument name="path">/tmp/*</argument> </helper> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertVarSessionFolderExists"> - <argument name="path">var/session</argument> + <argument name="path">/tmp</argument> </helper> <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> <argument name="tags" value=""/> From d7d744f87c8675f6b9e7f55a46d7a07c8a269756 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 16 Jan 2023 18:49:40 +0530 Subject: [PATCH 871/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the CR comments. --- ...torefrontValidateMiniCartEmptyAfterClearingSessionTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml index d2c4274bfc842..4a907525fa72a 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml @@ -42,10 +42,10 @@ </actionGroup> <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> - <argument name="path">/tmp/*</argument> + <argument name="path">var/tmp/*</argument> </helper> <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertVarSessionFolderExists"> - <argument name="path">/tmp</argument> + <argument name="path">var/tmp</argument> </helper> <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> <argument name="tags" value=""/> From 5142083a386d6e9c6ff342468f782d22f71da608 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Tue, 17 Jan 2023 20:30:40 +0530 Subject: [PATCH 872/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Removed the MFTF test coverage due to automation tests were not support for deleting magento session directory. --- ...eMiniCartEmptyAfterClearingSessionTest.xml | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml deleted file mode 100644 index 4a907525fa72a..0000000000000 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontValidateMiniCartEmptyAfterClearingSessionTest.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontValidateMiniCartEmptyAfterClearingSessionTest"> - <annotations> - <features value="Customer"/> - <stories value="Customer data in Local Storage not reset when session file lost"/> - <title value="Validate minicart is empty when customer session file lost."/> - <description value="Validate minicart is empty when customer session file lost."/> - <severity value="AVERAGE"/> - <testCaseId value="AC-7590"/> - <useCaseId value="ACP2E-1445"/> - <group value="customer"/> - </annotations> - <before> - <!-- Create customer --> - <createData entity="Simple_US_Customer" stepKey="createCustomer"/> - - <!-- Create product --> - <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> - </before> - <after> - <!-- Delete customer --> - <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - - <!-- Delete product --> - <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - </after> - <!-- Login to Frontend --> - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> - <argument name="Customer" value="$$createCustomer$$"/> - </actionGroup> - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> - <argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> - </actionGroup> - <actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteDirectory" stepKey="deleteLocalCacheDirectory"> - <argument name="path">var/tmp/*</argument> - </helper> - <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="assertDirectoryExists" stepKey="assertVarSessionFolderExists"> - <argument name="path">var/tmp</argument> - </helper> - <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> - <argument name="tags" value=""/> - </actionGroup> - <actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/> - <actionGroup ref="StorefrontCheckThatCartIsEmptyActionGroup" stepKey="checkThatCartIsEmpty"/> - </test> -</tests> From fd42a67335bb93649a3dfa517a7cadd4540746a5 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 30 Jan 2023 20:08:05 +0530 Subject: [PATCH 873/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the existing and QA comments. --- .../Magento/Customer/view/frontend/web/js/customer-data.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index 33fa89a1a3cda..fea29d299c02c 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -53,11 +53,7 @@ define([ storage.removeAll(); } - if (!$.localStorage.isSet('mage-customer-login')) { - $.localStorage.set('mage-customer-login', isLoggedIn); - } - if ($.localStorage.get('mage-customer-login') !== isLoggedIn) { - $.localStorage.set('mage-customer-login', isLoggedIn); + if (isLoggedIn === 0) { storage.removeAll(); } From 79e075c0d96922e0829d8ccfca2c0567432c3511 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Thu, 9 Feb 2023 20:06:50 +0530 Subject: [PATCH 874/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Fixed the session clear issue. --- .../view/frontend/web/js/customer-data.js | 6 ++++- .../App/FrontController/BuiltinPlugin.php | 22 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index fea29d299c02c..33fa89a1a3cda 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -53,7 +53,11 @@ define([ storage.removeAll(); } - if (isLoggedIn === 0) { + if (!$.localStorage.isSet('mage-customer-login')) { + $.localStorage.set('mage-customer-login', isLoggedIn); + } + if ($.localStorage.get('mage-customer-login') !== isLoggedIn) { + $.localStorage.set('mage-customer-login', isLoggedIn); storage.removeAll(); } diff --git a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php index 5340f5204e21e..350fabbc85152 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -6,6 +6,7 @@ namespace Magento\PageCache\Model\App\FrontController; use Magento\Framework\App\Response\Http as ResponseHttp; +use Magento\Customer\Model\Session; /** * Plugin for processing builtin cache @@ -32,6 +33,16 @@ class BuiltinPlugin */ protected $state; + /** + * @var ResponseHttp + */ + protected $responseHttp; + + /** + * @var Session + */ + private $session; + /** * Constructor * @@ -39,17 +50,23 @@ class BuiltinPlugin * @param \Magento\Framework\App\PageCache\Version $version * @param \Magento\Framework\App\PageCache\Kernel $kernel * @param \Magento\Framework\App\State $state + * @param ResponseHttp $responseHttp + * @param Session $session */ public function __construct( \Magento\PageCache\Model\Config $config, \Magento\Framework\App\PageCache\Version $version, \Magento\Framework\App\PageCache\Kernel $kernel, - \Magento\Framework\App\State $state + \Magento\Framework\App\State $state, + ResponseHttp $responseHttp, + Session $session ) { $this->config = $config; $this->version = $version; $this->kernel = $kernel; $this->state = $state; + $this->responseHttp = $responseHttp; + $this->session = $session; } /** @@ -66,6 +83,9 @@ public function aroundDispatch( \Closure $proceed, \Magento\Framework\App\RequestInterface $request ) { + if (!$this->session->getCustomerId()) { + $this->responseHttp->sendVary(); + } $this->version->process(); if (!$this->config->isEnabled() || $this->config->getType() !== \Magento\PageCache\Model\Config::BUILT_IN) { return $proceed($request); From 8a5c8829d6c031b913178c6ffdd14e95fe7c3a03 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 9 Feb 2023 09:21:36 -0600 Subject: [PATCH 875/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index d915cf52c0797..13145e3b8d47d 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -23,6 +23,8 @@ /** * Test storeConfig query cache + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class StoreConfigCacheTest extends GraphQLPageCacheAbstract { @@ -81,6 +83,11 @@ protected function setUp(): void /** * storeConfig query is cached. * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException @@ -152,6 +159,11 @@ public function testGetStoreConfig(): void /** * Store scoped config change triggers purging only the cache of the changed store. * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException @@ -244,6 +256,11 @@ public function testCachePurgedWithStoreScopeConfigChange(): void /** * Store change triggers purging only the cache of the changed store. * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/store.php * @throws NoSuchEntityException @@ -341,9 +358,16 @@ public function testCachePurgedWithStoreChange(): void /** * Store group change triggers purging only the cache of the stores associated with the changed store group. * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - base - second_store + * third_store_view - base - second_store + * * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testCachePurgedWithStoreGroupChange(): void { @@ -352,7 +376,6 @@ public function testCachePurgedWithStoreGroupChange(): void // Query default store config $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); - $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; // Verify we obtain a cache MISS at the 1st time $this->assertCacheMissAndReturnResponse( @@ -368,9 +391,7 @@ public function testCachePurgedWithStoreGroupChange(): void '', ['Store' => $secondStoreCode] ); - $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseThirdStore['headers']); $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; - $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); // Verify we obtain a cache MISS at the 1st time $secondStoreResponse = $this->assertCacheMissAndReturnResponse( $query, @@ -379,10 +400,8 @@ public function testCachePurgedWithStoreGroupChange(): void 'Store' => $secondStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $secondStoreResponse['body']); - $secondStoreResponseResult = $secondStoreResponse['body']['storeConfig']; $secondStoreGroupName = 'Second store group'; - $this->assertEquals($secondStoreGroupName, $secondStoreResponseResult['store_group_name']); + $this->assertEquals($secondStoreGroupName, $secondStoreResponse['body']['storeConfig']['store_group_name']); // Query third store config $thirdStoreCode = 'third_store_view'; @@ -392,7 +411,6 @@ public function testCachePurgedWithStoreGroupChange(): void '', ['Store' => $thirdStoreCode] ); - $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseThirdStore['headers']); $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; // Verify we obtain a cache MISS at the 1st time $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( @@ -402,9 +420,7 @@ public function testCachePurgedWithStoreGroupChange(): void 'Store' => $thirdStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $thirdStoreResponse['body']); - $thirdStoreResponseResult = $thirdStoreResponse['body']['storeConfig']; - $this->assertEquals($secondStoreGroupName, $thirdStoreResponseResult['store_group_name']); + $this->assertEquals($secondStoreGroupName, $thirdStoreResponse['body']['storeConfig']['store_group_name']); // Change store group name /** @var Group $storeGroup */ @@ -430,9 +446,10 @@ public function testCachePurgedWithStoreGroupChange(): void 'Store' => $secondStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $secondStoreResponseMiss['body']); - $secondStoreResponseMissResult = $secondStoreResponseMiss['body']['storeConfig']; - $this->assertEquals($secondStoreGroupNewName, $secondStoreResponseMissResult['store_group_name']); + $this->assertEquals( + $secondStoreGroupNewName, + $secondStoreResponseMiss['body']['storeConfig']['store_group_name'] + ); // Verify we obtain a cache HIT at the 3rd time $this->assertCacheHitAndReturnResponse( $query, @@ -451,9 +468,10 @@ public function testCachePurgedWithStoreGroupChange(): void 'Store' => $thirdStoreCode ] ); - $this->assertArrayHasKey('storeConfig', $thirdStoreResponseMiss['body']); - $thirdStoreResponseMissResult = $thirdStoreResponseMiss['body']['storeConfig']; - $this->assertEquals($secondStoreGroupNewName, $thirdStoreResponseMissResult['store_group_name']); + $this->assertEquals( + $secondStoreGroupNewName, + $thirdStoreResponseMiss['body']['storeConfig']['store_group_name'] + ); // Verify we obtain a cache HIT at the 3rd time $this->assertCacheHitAndReturnResponse( $query, From 246288cf02acc43b2bb1e1a4116f06ea7a7ccb26 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 9 Feb 2023 10:47:42 -0600 Subject: [PATCH 876/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 117 +++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 13145e3b8d47d..fb0e8e4380d5e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -17,6 +17,7 @@ use Magento\Store\Model\Group; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\Store; +use Magento\Store\Model\Website; use Magento\TestFramework\App\ApiMutableScopeConfig; use Magento\TestFramework\Config\Model\ConfigStorage; use Magento\TestFramework\Helper\Bootstrap; @@ -422,7 +423,7 @@ public function testCachePurgedWithStoreGroupChange(): void ); $this->assertEquals($secondStoreGroupName, $thirdStoreResponse['body']['storeConfig']['store_group_name']); - // Change store group name + // Change second store group name /** @var Group $storeGroup */ $storeGroup = $this->objectManager->create(Group::class); $storeGroup->load('second_store', 'code'); @@ -482,6 +483,120 @@ public function testCachePurgedWithStoreGroupChange(): void ); } + /** + * Store website change triggers purging only the cache of the stores associated with the changed store website. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithWebsiteChange(): void + { + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $secondStoreWebsiteName = 'Second Test Website'; + $this->assertEquals($secondStoreWebsiteName, $secondStoreResponse['body']['storeConfig']['website_name']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals('Third test Website', $thirdStoreResponse['body']['storeConfig']['website_name']); + + // Change second store website name + /** @var Website $website */ + $website = $this->objectManager->create(Website::class); + $website->load('second', 'code'); + $secondStoreWebsiteNewName = $secondStoreWebsiteName . ' 2'; + $website->setName($secondStoreWebsiteNewName); + $website->save(); + + // Query default store config after second store website is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config after its associated second store group is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals( + $secondStoreWebsiteNewName, + $secondStoreResponseMiss['body']['storeConfig']['website_name'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store config after second store website is changed + // Verify we obtain a cache HIT at the 2nd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + private function changeToOneWebsiteTwoStoreGroupsThreeStores() { // Change second store to the same website of the default store From 60f83cc827a6282ae479d54d11530c5929a17ba8 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Feb 2023 22:33:06 +0530 Subject: [PATCH 877/985] Revert "AC-7821:Extract ES8 module to a separate repository - Fixed Unit/Static/Integration test failures" This reverts commit ae43c299fafc6a3932318f3775f8259bb1b6b81e. --- .../Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php | 2 +- .../Test/Unit/Model/DataProvider/Base/SuggestionsTest.php | 2 +- .../Elasticsearch7/SearchAdapter/ConnectionManagerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php index 280284b7a7cb5..a48f65e1b6d75 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php @@ -111,7 +111,7 @@ class ElasticsearchTest extends TestCase */ protected function setUp(): void { - if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ + if (!class_exists(\Elasticsearch\Client::class)) { $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php index ab702e6441341..3dca34b09cb78 100644 --- a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php +++ b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php @@ -226,7 +226,7 @@ public function testGetItemsWithEnabledSearchSuggestion(): void */ public function testGetItemsException(): void { - if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ + if (!class_exists(\Elasticsearch\Client::class)) { $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php index a5728a58a5309..fbebf629ecb80 100644 --- a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php @@ -43,7 +43,7 @@ protected function setUp(): void */ public function testCorrectElasticsearchClientEs7() { - if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ + if (!class_exists(\Elasticsearch\Client::class)) { $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } From e81c28c87c5fafdfde5292170694c76ba17ed213 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Feb 2023 22:55:30 +0530 Subject: [PATCH 878/985] Revert "Revert "AC-7821:Extract ES8 module to a separate repository - Fixed Unit/Static/Integration test failures"" This reverts commit 60f83cc827a6282ae479d54d11530c5929a17ba8. --- .../Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php | 2 +- .../Test/Unit/Model/DataProvider/Base/SuggestionsTest.php | 2 +- .../Elasticsearch7/SearchAdapter/ConnectionManagerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php index a48f65e1b6d75..280284b7a7cb5 100644 --- a/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php +++ b/app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/ElasticsearchTest.php @@ -111,7 +111,7 @@ class ElasticsearchTest extends TestCase */ protected function setUp(): void { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php index 3dca34b09cb78..ab702e6441341 100644 --- a/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php +++ b/app/code/Magento/Elasticsearch7/Test/Unit/Model/DataProvider/Base/SuggestionsTest.php @@ -226,7 +226,7 @@ public function testGetItemsWithEnabledSearchSuggestion(): void */ public function testGetItemsException(): void { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } diff --git a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php index fbebf629ecb80..a5728a58a5309 100644 --- a/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Elasticsearch7/SearchAdapter/ConnectionManagerTest.php @@ -43,7 +43,7 @@ protected function setUp(): void */ public function testCorrectElasticsearchClientEs7() { - if (!class_exists(\Elasticsearch\Client::class)) { + if (!class_exists(\Elasticsearch\ClientBuilder::class)) { /** @phpstan-ignore-line */ $this->markTestSkipped('AC-6597: Skipped as Elasticsearch 8 is configured'); } From ec9502fe2e7f172c96a880422daf2ceee276be9d Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Feb 2023 23:05:33 +0530 Subject: [PATCH 879/985] AC-7821::Extract ES8 module to a separate repository,updated the dependency ES-8.5.0 --- app/code/Magento/Elasticsearch/composer.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 51f55ffc92c75..1c4b77e5e1d24 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "*", "magento/module-catalog-inventory": "*", "magento/framework": "*", - "elasticsearch/elasticsearch": "^7.17 || ^8.5" + "elasticsearch/elasticsearch": "^7.17 || ^8.5.0" }, "suggest": { "magento/module-config": "*" diff --git a/composer.json b/composer.json index 022f87e7643b1..6fc7094739634 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "elasticsearch/elasticsearch": "^7.17||^8.5", + "elasticsearch/elasticsearch": "^7.17||^8.5.0", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", From d91bdf567d84f0d8be31b7a62914a4c2501817a4 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Feb 2023 23:36:59 +0530 Subject: [PATCH 880/985] AC-7821::Extract ES8 module to a separate repository,updated the dependency ES-8.5.0 --- app/code/Magento/Elasticsearch/composer.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 1c4b77e5e1d24..1e722c1aea688 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "*", "magento/module-catalog-inventory": "*", "magento/framework": "*", - "elasticsearch/elasticsearch": "^7.17 || ^8.5.0" + "elasticsearch/elasticsearch": "^7.17 || ~8.5.0" }, "suggest": { "magento/module-config": "*" diff --git a/composer.json b/composer.json index 6fc7094739634..42ff424f956fe 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "elasticsearch/elasticsearch": "^7.17||^8.5.0", + "elasticsearch/elasticsearch": "^7.17||~8.5.0", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", From 13c7a1a967f3c54c231a173318d0df4c6ffa453b Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 9 Feb 2023 12:08:34 -0600 Subject: [PATCH 881/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../ProductIndexersInvalidationTest.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php new file mode 100644 index 0000000000000..21fc70a70b697 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php @@ -0,0 +1,45 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogImportExport\Model\Import\ProductTest; + +use Magento\Catalog\Model\Indexer\Product\Price\Processor as ProductPriceIndexer; +use Magento\CatalogSearch\Model\Indexer\Fulltext as FulltextIndexer; +use Magento\CatalogImportExport\Model\Import\ProductTestBase; +use Magento\Framework\Indexer\IndexerRegistry; +use Magento\TestFramework\Helper\Bootstrap as BootstrapHelper; + +/** + * @magentoAppArea adminhtml + * @magentoDbIsolation disabled + */ +class ProductIndexersInvalidationTest extends ProductTestBase +{ + /** + * Test for indexer state in update on save mode + * + * @magentoDataFixture Magento/Catalog/_files/multiple_products.php + */ + public function testIndexersState() + { + $indexerRegistry = BootstrapHelper::getObjectManager()->get(IndexerRegistry::class); + $fulltextIndexer = $indexerRegistry->get(FulltextIndexer::INDEXER_ID); + $priceIndexer = $indexerRegistry->get(ProductPriceIndexer::INDEXER_ID); + $fulltextIndexer->reindexAll(); + $priceIndexer->reindexAll(); + + $this->assertFalse($fulltextIndexer->isScheduled()); + $this->assertFalse($priceIndexer->isScheduled()); + $this->assertFalse($fulltextIndexer->isInvalid()); + $this->assertFalse($priceIndexer->isInvalid()); + + $this->importFile('products_to_import.csv'); + + $this->assertFalse($fulltextIndexer->isInvalid()); + $this->assertFalse($priceIndexer->isInvalid()); + } +} From ff6a42fa83e07bf3e998fb132b19655290089da8 Mon Sep 17 00:00:00 2001 From: Dmytro Yushkin <dyushkin@adobe.com> Date: Mon, 6 Feb 2023 11:53:21 -0600 Subject: [PATCH 882/985] ACP2E-1482: Upload Path for Export Option in Magento's Reports Section --- .../Report/Product/ExportDownloadsCsv.php | 16 ++++++++++---- .../Report/Product/ExportDownloadsExcel.php | 16 ++++++++++---- .../Report/Product/ExportDownloadsCsvTest.php | 22 +++++++++++++++++++ .../Product/ExportDownloadsExcelTest.php | 22 +++++++++++++++++++ 4 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsCsvTest.php create mode 100644 app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsExcelTest.php diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsCsv.php index 7ace2e63f1a51..f932c61cb4353 100644 --- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsCsv.php +++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsCsv.php @@ -1,21 +1,29 @@ <?php /** - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Reports\Controller\Adminhtml\Report\Product; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ResponseInterface; +use Magento\Reports\Controller\Adminhtml\Report\Product; -class ExportDownloadsCsv extends \Magento\Reports\Controller\Adminhtml\Report\Product +/** + * Exporting list of product in CVS format. + * + * @SuppressWarnings(PHPMD.AllPurposeAction) + */ +class ExportDownloadsCsv extends Product { /** * Authorization level of a basic admin session * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Reports::report_products'; + public const ADMIN_RESOURCE = 'Magento_Reports::report_products'; /** * Export products downloads report to CSV format @@ -31,6 +39,6 @@ public function execute() true )->getCsv(); - return $this->_fileFactory->create($fileName, $content); + return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR); } } diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsExcel.php index c6c6a78c7b8b6..7a87d0833f086 100644 --- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsExcel.php +++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportDownloadsExcel.php @@ -1,21 +1,29 @@ <?php /** - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Reports\Controller\Adminhtml\Report\Product; +use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ResponseInterface; +use Magento\Reports\Controller\Adminhtml\Report\Product; -class ExportDownloadsExcel extends \Magento\Reports\Controller\Adminhtml\Report\Product +/** + * Exporting list of product in Excel format. + * + * @SuppressWarnings(PHPMD.AllPurposeAction) + */ +class ExportDownloadsExcel extends Product { /** * Authorization level of a basic admin session * * @see _isAllowed() */ - const ADMIN_RESOURCE = 'Magento_Reports::report_products'; + public const ADMIN_RESOURCE = 'Magento_Reports::report_products'; /** * Export products downloads report to XLS format @@ -33,6 +41,6 @@ public function execute() $fileName ); - return $this->_fileFactory->create($fileName, $content); + return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR); } } diff --git a/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsCsvTest.php b/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsCsvTest.php new file mode 100644 index 0000000000000..8e22305f8da80 --- /dev/null +++ b/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsCsvTest.php @@ -0,0 +1,22 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Reports\Test\Integration\Controller\Adminhtml\Report\Product; + +use Magento\TestFramework\TestCase\AbstractBackendController; + +/** + * @magentoAppArea adminhtml + */ +class ExportDownloadsCsvTest extends AbstractBackendController +{ + public function testExecute() + { + $this->dispatch('backend/reports/report_product/exportDownloadsCsv'); + $this->assertEquals(302, $this->getResponse()->getHttpResponseCode()); + } +} diff --git a/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsExcelTest.php b/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsExcelTest.php new file mode 100644 index 0000000000000..901cb12821181 --- /dev/null +++ b/app/code/Magento/Reports/Test/Integration/Controller/Adminhtml/Report/Product/ExportDownloadsExcelTest.php @@ -0,0 +1,22 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Reports\Test\Integration\Controller\Adminhtml\Report\Product; + +use Magento\TestFramework\TestCase\AbstractBackendController; + +/** + * @magentoAppArea adminhtml + */ +class ExportDownloadsExcelTest extends AbstractBackendController +{ + public function testExecute() + { + $this->dispatch('backend/reports/report_product/exportDownloadsExcel'); + $this->assertEquals(302, $this->getResponse()->getHttpResponseCode()); + } +} From e5e271f8fbc89c7641b07e301db087fc0db7f886 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 9 Feb 2023 11:57:29 -0600 Subject: [PATCH 883/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index fb0e8e4380d5e..0a47f2affd3d1 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -254,6 +254,130 @@ public function testCachePurgedWithStoreScopeConfigChange(): void $this->assertEquals($newLocale, $secondStoreResponseHitResult['locale']); } + /** + * Website scope config change triggers purging only the cache of the stores associated with the changed website. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - second - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithWebsiteScopeConfigChange(): void + { + $this->changeToTwoWebsitesThreeStoreGroupsThreeStores(); + $defaultLocale = $this->defaultStoreConfig->getLocale(); + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals($defaultLocale, $secondStoreResponse['body']['storeConfig']['locale']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals($defaultLocale, $thirdStoreResponse['body']['storeConfig']['locale']); + + // Change second website locale + $localeConfigPath = 'general/locale/code'; + $newLocale = 'de_DE'; + $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_WEBSITES, 'second'); + + // Query default store config after second store group is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config after the config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals( + $newLocale, + $secondStoreResponseMiss['body']['storeConfig']['locale'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store config after the config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals( + $newLocale, + $thirdStoreResponseMiss['body']['storeConfig']['locale'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + /** * Store change triggers purging only the cache of the changed store. * @@ -617,6 +741,23 @@ private function changeToOneWebsiteTwoStoreGroupsThreeStores() $store3->setGroupId($store2GroupId)->setWebsiteId(1)->save(); } + private function changeToTwoWebsitesThreeStoreGroupsThreeStores() + { + /** @var $website2 \Magento\Store\Model\Website */ + $website2 = $this->objectManager->create(Website::class); + $website2Id = $website2->load('second', 'code')->getId(); + + // Change third store to the same website of second store + /** @var Store $store3 */ + $store3 = $this->objectManager->create(Store::class); + $store3->load('third_store_view', 'code'); + $store3GroupId = $store3->getStoreGroupId(); + /** @var Group $store3Group */ + $store3Group = $this->objectManager->create(Group::class); + $store3Group->load($store3GroupId)->setWebsiteId($website2Id)->save(); + $store3->setWebsiteId($website2Id)->save(); + } + /** * Get query * From aa4eff0c61eaf03b6b540a5403e2b78e23a3ff63 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Fri, 10 Feb 2023 00:19:35 +0530 Subject: [PATCH 884/985] AC-7821::Extract ES8 module to a separate repository,allow plugin php-http/discovery --- app/code/Magento/Elasticsearch/composer.json | 2 +- composer.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json index 1e722c1aea688..714890fd5f452 100644 --- a/app/code/Magento/Elasticsearch/composer.json +++ b/app/code/Magento/Elasticsearch/composer.json @@ -12,7 +12,7 @@ "magento/module-store": "*", "magento/module-catalog-inventory": "*", "magento/framework": "*", - "elasticsearch/elasticsearch": "^7.17 || ~8.5.0" + "elasticsearch/elasticsearch": "~7.17.0 || ~8.5.0" }, "suggest": { "magento/module-config": "*" diff --git a/composer.json b/composer.json index 42ff424f956fe..1f8e978b3f2d8 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "magento/*": true + "magento/*": true, + "php-http/discovery": true }, "preferred-install": "dist", "sort-packages": true @@ -38,7 +39,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", - "elasticsearch/elasticsearch": "^7.17||~8.5.0", + "elasticsearch/elasticsearch": "~7.17.0 || ~8.5.0", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "laminas/laminas-captcha": "^2.12", From 677b38413d97780462490253ca1b6c07b8535cbd Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 9 Feb 2023 14:14:52 -0600 Subject: [PATCH 885/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php index 3169fdb25ff11..5d1f91f962834 100644 --- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php +++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php @@ -202,8 +202,8 @@ class IndexBuilder * @param ProductLoader|null $productLoader * @param TableSwapper|null $tableSwapper * @param TimezoneInterface|null $localeDate - * @param IndexerRegistry|null $indexerRegistry * @param ProductCollectionFactory|null $productCollectionFactory + * @param IndexerRegistry|null $indexerRegistry * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -228,8 +228,8 @@ public function __construct( ProductLoader $productLoader = null, TableSwapper $tableSwapper = null, TimezoneInterface $localeDate = null, - IndexerRegistry $indexerRegistry = null, - ProductCollectionFactory $productCollectionFactory = null + ProductCollectionFactory $productCollectionFactory = null, + IndexerRegistry $indexerRegistry = null ) { $this->resource = $resource; $this->connection = $resource->getConnection(); From 7a78b1691a2e7322ce1562af182950112d65dccc Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 9 Feb 2023 14:29:12 -0600 Subject: [PATCH 886/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../GraphQl/Store/StoreConfigCacheTest.php | 135 +++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index 0a47f2affd3d1..e3122fa6c3133 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -7,6 +7,7 @@ namespace Magento\GraphQl\Store; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\Exception\NoSuchEntityException; use Magento\GraphQl\PageCache\GraphQLPageCacheAbstract; use Magento\GraphQlCache\Model\CacheId\CacheIdCalculator; @@ -326,7 +327,7 @@ public function testCachePurgedWithWebsiteScopeConfigChange(): void $newLocale = 'de_DE'; $this->setConfig($localeConfigPath, $newLocale, ScopeInterface::SCOPE_WEBSITES, 'second'); - // Query default store config after second store group is changed + // Query default store config after the config of the second website is changed // Verify we obtain a cache HIT at the 2nd time, the cache is not purged $this->assertCacheHitAndReturnResponse( $query, @@ -378,6 +379,138 @@ public function testCachePurgedWithWebsiteScopeConfigChange(): void ); } + /** + * Default scope config change triggers purging the cache of all stores. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @throws NoSuchEntityException + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithDefaultScopeConfigChange(): void + { + $defaultLocale = $this->defaultStoreConfig->getLocale(); + $query = $this->getQuery(); + + // Query default store config + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals($defaultLocale, $secondStoreResponse['body']['storeConfig']['locale']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals($defaultLocale, $thirdStoreResponse['body']['storeConfig']['locale']); + + // Change default locale + $localeConfigPath = 'general/locale/code'; + $newLocale = 'de_DE'; + $this->setConfig($localeConfigPath, $newLocale, ScopeConfigInterface::SCOPE_TYPE_DEFAULT); + + // Query default store config after the default config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $defaultStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertEquals( + $newLocale, + $defaultStoreResponseMiss['body']['storeConfig']['locale'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store config after the default config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals( + $newLocale, + $secondStoreResponseMiss['body']['storeConfig']['locale'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store config after the default config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals( + $newLocale, + $thirdStoreResponseMiss['body']['storeConfig']['locale'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + /** * Store change triggers purging only the cache of the changed store. * From ff461e602e2e8fba29b5866344f1ce923c7f47ab Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Thu, 9 Feb 2023 15:44:34 -0600 Subject: [PATCH 887/985] ACQE-4573: Allure report Unknown error - added doctrine to composer. --- composer.json | 1 + composer.lock | 400 +++++++++++++++++++++++++------------------------- 2 files changed, 203 insertions(+), 198 deletions(-) diff --git a/composer.json b/composer.json index 92057cef40e2a..c525c1d8e6e9d 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ "colinmollenhour/credis": "^1.13", "colinmollenhour/php-redis-session-abstract": "^1.5", "composer/composer": "^2.0, !=2.2.16", + "doctrine/annotations": "^1.13", "elasticsearch/elasticsearch": "^7.17||^8.5", "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", diff --git a/composer.lock b/composer.lock index 57ea9592d7093..f0880e4e6486e 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": "205c66f1f11f7a3dffb85b24c7480e01", + "content-hash": "6bf50057f1bf211775a7988d00b59f76", "packages": [ { "name": "aws/aws-crt-php", @@ -963,6 +963,158 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.14.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1 || ^2", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.3" + }, + "time": "2023-02-01T09:20:38+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "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": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" + }, { "name": "elasticsearch/elasticsearch", "version": "v7.17.1", @@ -5532,6 +5684,55 @@ ], "time": "2022-12-17T18:26:50+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "psr/container", "version": "1.1.2", @@ -9998,78 +10199,6 @@ }, "time": "2022-09-13T17:27:26+00:00" }, - { - "name": "doctrine/annotations", - "version": "1.13.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "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": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" - }, - "time": "2021-08-05T19:00:23+00:00" - }, { "name": "doctrine/instantiator", "version": "1.4.1", @@ -10140,82 +10269,6 @@ ], "time": "2022-03-03T08:28:38+00:00" }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "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": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" - }, { "name": "friendsofphp/php-cs-fixer", "version": "v3.8.0", @@ -12067,55 +12120,6 @@ ], "time": "2022-04-01T12:37:26+00:00" }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, { "name": "rector/rector", "version": "0.15.11", From bc665c1c65992f699e047e53a2b09729db5cd7cc Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 10 Feb 2023 11:28:30 +0530 Subject: [PATCH 888/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- .../ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml index 919a56bbbd0c2..322629896e8bb 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml @@ -24,7 +24,7 @@ <!-- change the Default Tax Destination Calculation Configurations --> <scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaults"/> - <!-- conditionalClick twice to fix some flaky behavior --> + <!-- Set default tax destination calculation --> <conditionalClick selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false" stepKey="clickCalculationSettings"/> <uncheckOption selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}" stepKey="clickDefaultCountry"/> <selectOption selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="{{country}}" stepKey="selectDefaultCountry"/> From 84fbf69668b9cbb17c078fed1f7bd4f48bb85b3b Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Fri, 10 Feb 2023 14:45:37 +0530 Subject: [PATCH 889/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- .../Checkout/view/frontend/web/js/model/new-customer-address.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js b/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js index 80ee139bb0503..e5509761b1ab9 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js @@ -29,8 +29,6 @@ define([ /* eslint-enable */ ) { regionId = window.checkoutConfig.defaultRegionId || undefined; - } else if (!addressData['region_id']) { - regionId = undefined; } return { From bc17c0fabd947959e8c09dd1633ab25f082f8b14 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Fri, 10 Feb 2023 18:40:49 +0530 Subject: [PATCH 890/985] #AC-7900:Unable to create Shipping Label for Dutiable shipments in DHL shipping method-Schema updated for ShipmentRequest label creation --- app/code/Magento/Dhl/Model/Carrier.php | 67 +++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 200ee62720755..f4bfe7aa130f9 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1398,6 +1398,7 @@ protected function getCountryParams($countryCode) */ protected function _doShipmentRequest(\Magento\Framework\DataObject $request) { + $this->_prepareShipmentRequest($request); $this->_mapRequestToShipment($request); $this->setRequest($request); @@ -1658,8 +1659,11 @@ protected function _doRequest() $baseCurrencyCode = $this->_storeManager->getWebsite($rawRequest->getWebsiteId())->getBaseCurrencyCode(); $nodeDutiable->addChild('DeclaredCurrency', $baseCurrencyCode); $nodeDutiable->addChild('TermsOfTrade', 'DAP'); - } + /** Export Declaration */ + $this->getExportDeclaration($xml, $rawRequest); + + } /** * Reference * This element identifies the reference information. It is an optional field in the @@ -2183,4 +2187,65 @@ private function getGatewayURL(): string return (string)$this->getConfigData('gateway_url'); } } + + /** + * Generating Export Declaration Details + * + * @param \Magento\Shipping\Model\Simplexml\Element $xml + * @param RateRequest $rawRequest + * @return void + */ + private function getExportDeclaration($xml, $rawRequest) + { + $nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', ''); + $nodeExportDeclaration->addChild( + 'InvoiceNumber', + $rawRequest->getOrderShipment()->getOrder()->hasInvoices() ? + $this->getInvoiceNumbers($rawRequest) : + $rawRequest->getOrderShipment()->getOrder()->getIncrementId() + ); + $nodeExportDeclaration->addChild('InvoiceDate', date( + "Y-m-d", + strtotime($rawRequest->getOrderShipment()->getOrder()->getCreatedAt()) + )); + $exportItems = $rawRequest->getPackages(); + foreach ($exportItems as $exportItem) { + $itemWeightUnit = $exportItem['params']['weight_units'] ? substr( + $exportItem['params']['weight_units'], + 0, + 1 + ) : 'L'; + foreach ($exportItem['items'] as $itemNo => $itemData) { + $nodeExportItem = $nodeExportDeclaration->addChild('ExportLineItem', '', ''); + $nodeExportItem->addChild('LineNumber', $itemNo); + $nodeExportItem->addChild('Quantity', $itemData['qty']); + $nodeExportItem->addChild('QuantityUnit', 'PCS'); + $nodeExportItem->addChild('Description', $itemData['name']); + $nodeExportItem->addChild('Value', $itemData['price']); + $nodeItemWeight = $nodeExportItem->addChild('Weight', '', ''); + $nodeItemWeight->addChild('Weight', $itemData['weight']); + $nodeItemWeight->addChild('WeightUnit', $itemWeightUnit); + $nodeItemGrossWeight = $nodeExportItem->addChild('GrossWeight'); + $nodeItemGrossWeight->addChild('Weight', $itemData['weight']); + $nodeItemGrossWeight->addChild('WeightUnit', $itemWeightUnit); + $nodeExportItem->addChild('ManufactureCountryCode', 'US'); + } + } + } + + /** + * Fetching Shipment Order Invoice No + * + * @param RateRequest $rawRequest + * @return string + */ + private function getInvoiceNumbers($rawRequest) + { + $invoiceNumbers = []; + $order = $rawRequest->getOrderShipment()->getOrder(); + foreach ($order->getInvoiceCollection() as $invoice) { + $invoiceNumbers[] = $invoice->getIncrementId(); + } + return implode(',', $invoiceNumbers); + } } From 71c943ba903d45947a8c4b6f015f625389500939 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Fri, 10 Feb 2023 18:59:34 +0530 Subject: [PATCH 891/985] #AC-7900:Unable to create Shipping Label for Dutiable shipments in DHL shipping method-Method name updated as per review --- app/code/Magento/Dhl/Model/Carrier.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index f4bfe7aa130f9..d1418998a251a 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1661,7 +1661,7 @@ protected function _doRequest() $nodeDutiable->addChild('TermsOfTrade', 'DAP'); /** Export Declaration */ - $this->getExportDeclaration($xml, $rawRequest); + $this->addExportDeclaration($xml, $rawRequest); } /** @@ -2195,7 +2195,7 @@ private function getGatewayURL(): string * @param RateRequest $rawRequest * @return void */ - private function getExportDeclaration($xml, $rawRequest) + private function addExportDeclaration($xml, $rawRequest) { $nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', ''); $nodeExportDeclaration->addChild( @@ -2228,7 +2228,7 @@ private function getExportDeclaration($xml, $rawRequest) $nodeItemGrossWeight = $nodeExportItem->addChild('GrossWeight'); $nodeItemGrossWeight->addChild('Weight', $itemData['weight']); $nodeItemGrossWeight->addChild('WeightUnit', $itemWeightUnit); - $nodeExportItem->addChild('ManufactureCountryCode', 'US'); + $nodeExportItem->addChild('ManufactureCountryCode', $rawRequest->getShipperAddressCountryCode()); } } } From 314271590eee7dcba05d6dcf636efb75578fccd7 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Fri, 10 Feb 2023 11:30:38 +0530 Subject: [PATCH 892/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Implemented the new solution approach. --- ...DeleteCookieWhenCustomerNotExistPlugin.php | 55 +++++++++++++++++++ app/code/Magento/Customer/etc/frontend/di.xml | 3 + .../App/FrontController/BuiltinPlugin.php | 22 +------- 3 files changed, 59 insertions(+), 21 deletions(-) create mode 100644 app/code/Magento/Customer/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPlugin.php diff --git a/app/code/Magento/Customer/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPlugin.php b/app/code/Magento/Customer/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPlugin.php new file mode 100644 index 0000000000000..53e170f6026f8 --- /dev/null +++ b/app/code/Magento/Customer/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPlugin.php @@ -0,0 +1,55 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Model\App\FrontController; + +use Magento\Framework\App\Response\Http as ResponseHttp; +use Magento\Customer\Model\Session; + +/** + * Plugin for delete the cookie when the customer is not exist. + * + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) + */ +class DeleteCookieWhenCustomerNotExistPlugin +{ + /** + * @var ResponseHttp + */ + private $responseHttp; + + /** + * @var Session + */ + private $session; + + /** + * Constructor + * + * @param ResponseHttp $responseHttp + * @param Session $session + */ + public function __construct( + ResponseHttp $responseHttp, + Session $session + ) { + $this->responseHttp = $responseHttp; + $this->session = $session; + } + + /** + * Delete the cookie when the customer is not exist before dispatch the front controller. + * + * @return void + */ + public function beforeDispatch(): void + { + if (!$this->session->getCustomerId()) { + $this->responseHttp->sendVary(); + } + } +} diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 31f3e11522e12..04ffc5d684b1a 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -127,4 +127,7 @@ </argument> </arguments> </type> + <type name="Magento\Framework\App\FrontControllerInterface"> + <plugin name="delete-cookie-when-customer-not-exist" type="Magento\Customer\Model\App\FrontController\DeleteCookieWhenCustomerNotExistPlugin"/> + </type> </config> diff --git a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php index 350fabbc85152..5340f5204e21e 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php @@ -6,7 +6,6 @@ namespace Magento\PageCache\Model\App\FrontController; use Magento\Framework\App\Response\Http as ResponseHttp; -use Magento\Customer\Model\Session; /** * Plugin for processing builtin cache @@ -33,16 +32,6 @@ class BuiltinPlugin */ protected $state; - /** - * @var ResponseHttp - */ - protected $responseHttp; - - /** - * @var Session - */ - private $session; - /** * Constructor * @@ -50,23 +39,17 @@ class BuiltinPlugin * @param \Magento\Framework\App\PageCache\Version $version * @param \Magento\Framework\App\PageCache\Kernel $kernel * @param \Magento\Framework\App\State $state - * @param ResponseHttp $responseHttp - * @param Session $session */ public function __construct( \Magento\PageCache\Model\Config $config, \Magento\Framework\App\PageCache\Version $version, \Magento\Framework\App\PageCache\Kernel $kernel, - \Magento\Framework\App\State $state, - ResponseHttp $responseHttp, - Session $session + \Magento\Framework\App\State $state ) { $this->config = $config; $this->version = $version; $this->kernel = $kernel; $this->state = $state; - $this->responseHttp = $responseHttp; - $this->session = $session; } /** @@ -83,9 +66,6 @@ public function aroundDispatch( \Closure $proceed, \Magento\Framework\App\RequestInterface $request ) { - if (!$this->session->getCustomerId()) { - $this->responseHttp->sendVary(); - } $this->version->process(); if (!$this->config->isEnabled() || $this->config->getType() !== \Magento\PageCache\Model\Config::BUILT_IN) { return $proceed($request); From e40d2d221cbfa021011251cc7f0f3cd18f1159be Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Fri, 10 Feb 2023 18:59:34 +0530 Subject: [PATCH 893/985] #AC-7900:Unable to create Shipping Label for Dutiable shipments in DHL shipping method-Method name updated as per review --- app/code/Magento/Dhl/Model/Carrier.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index f4bfe7aa130f9..9f7bb096a9dc7 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1661,7 +1661,7 @@ protected function _doRequest() $nodeDutiable->addChild('TermsOfTrade', 'DAP'); /** Export Declaration */ - $this->getExportDeclaration($xml, $rawRequest); + $this->addExportDeclaration($xml, $rawRequest); } /** @@ -2195,7 +2195,7 @@ private function getGatewayURL(): string * @param RateRequest $rawRequest * @return void */ - private function getExportDeclaration($xml, $rawRequest) + private function addExportDeclaration(\Magento\Shipping\Model\Simplexml\Element $xml, RateRequest $rawRequest) { $nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', ''); $nodeExportDeclaration->addChild( @@ -2228,7 +2228,7 @@ private function getExportDeclaration($xml, $rawRequest) $nodeItemGrossWeight = $nodeExportItem->addChild('GrossWeight'); $nodeItemGrossWeight->addChild('Weight', $itemData['weight']); $nodeItemGrossWeight->addChild('WeightUnit', $itemWeightUnit); - $nodeExportItem->addChild('ManufactureCountryCode', 'US'); + $nodeExportItem->addChild('ManufactureCountryCode', $rawRequest->getShipperAddressCountryCode()); } } } @@ -2239,7 +2239,7 @@ private function getExportDeclaration($xml, $rawRequest) * @param RateRequest $rawRequest * @return string */ - private function getInvoiceNumbers($rawRequest) + private function getInvoiceNumbers(RateRequest $rawRequest) { $invoiceNumbers = []; $order = $rawRequest->getOrderShipment()->getOrder(); From f39f434612a89479467c359cfc237551d6ded9d4 Mon Sep 17 00:00:00 2001 From: glo5363 <glo05363@adobe.com> Date: Fri, 10 Feb 2023 18:59:34 +0530 Subject: [PATCH 894/985] #AC-7900:Unable to create Shipping Label for Dutiable shipments in DHL shipping method-Method name updated as per review --- app/code/Magento/Dhl/Model/Carrier.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index f4bfe7aa130f9..8f0080b69b7db 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -1661,7 +1661,7 @@ protected function _doRequest() $nodeDutiable->addChild('TermsOfTrade', 'DAP'); /** Export Declaration */ - $this->getExportDeclaration($xml, $rawRequest); + $this->addExportDeclaration($xml, $rawRequest); } /** @@ -2195,7 +2195,7 @@ private function getGatewayURL(): string * @param RateRequest $rawRequest * @return void */ - private function getExportDeclaration($xml, $rawRequest) + private function addExportDeclaration(\Magento\Shipping\Model\Simplexml\Element $xml, RateRequest $rawRequest): void { $nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', ''); $nodeExportDeclaration->addChild( @@ -2228,7 +2228,7 @@ private function getExportDeclaration($xml, $rawRequest) $nodeItemGrossWeight = $nodeExportItem->addChild('GrossWeight'); $nodeItemGrossWeight->addChild('Weight', $itemData['weight']); $nodeItemGrossWeight->addChild('WeightUnit', $itemWeightUnit); - $nodeExportItem->addChild('ManufactureCountryCode', 'US'); + $nodeExportItem->addChild('ManufactureCountryCode', $rawRequest->getShipperAddressCountryCode()); } } } @@ -2239,7 +2239,7 @@ private function getExportDeclaration($xml, $rawRequest) * @param RateRequest $rawRequest * @return string */ - private function getInvoiceNumbers($rawRequest) + private function getInvoiceNumbers(RateRequest $rawRequest): string { $invoiceNumbers = []; $order = $rawRequest->getOrderShipment()->getOrder(); From 93cb6e8c23a7f7e1c2fb67c23a116acba2073bb2 Mon Sep 17 00:00:00 2001 From: Sachin Admane <sadmane@adobe.com> Date: Fri, 10 Feb 2023 09:35:53 -0600 Subject: [PATCH 895/985] AC-1271: Fix static test. --- .../GraphQl/Model/Backpressure/BackpressureFieldValidator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php index a88a71832777f..5edbf4e207c91 100644 --- a/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php +++ b/app/code/Magento/GraphQl/Model/Backpressure/BackpressureFieldValidator.php @@ -47,6 +47,7 @@ public function __construct( * @param array $args * @return void * @throws GraphQlTooManyRequestsException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function validate(Field $field, $args): void { From 8972621c877f8acc0ad1079cade64d0c4927f138 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Fri, 10 Feb 2023 13:48:45 -0600 Subject: [PATCH 896/985] AC-7900: Unable to create Shipping Label for Dutiable shipments in DHL shipping method --- app/code/Magento/Dhl/Model/Carrier.php | 320 ++++++++++-------- .../Magento/Dhl/Model/CarrierTest.php | 8 + .../Magento/Dhl/_files/shipment_request.xml | 20 ++ 3 files changed, 204 insertions(+), 144 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 8f0080b69b7db..8de7084ff30c5 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -6,28 +6,61 @@ namespace Magento\Dhl\Model; +use Exception; use Laminas\Http\Request as HttpRequest; use Magento\Catalog\Model\Product\Type; +use Magento\CatalogInventory\Api\StockRegistryInterface; use Magento\Dhl\Model\Validator\XmlValidator; +use Magento\Directory\Helper\Data; +use Magento\Directory\Model\CountryFactory; +use Magento\Directory\Model\Currency; +use Magento\Directory\Model\CurrencyFactory; +use Magento\Directory\Model\RegionFactory; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\App\ProductMetadataInterface; use Magento\Framework\Async\CallbackDeferred; +use Magento\Framework\DataObject; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Filesystem\Directory\ReadFactory; use Magento\Framework\HTTP\AsyncClient\HttpException; use Magento\Framework\HTTP\AsyncClient\HttpResponseDeferredInterface; use Magento\Framework\HTTP\AsyncClient\Request; use Magento\Framework\HTTP\AsyncClientInterface; use Magento\Framework\HTTP\LaminasClient; +use Magento\Framework\HTTP\LaminasClientFactory; +use Magento\Framework\Math\Division; use Magento\Framework\Measure\Length; use Magento\Framework\Measure\Weight; +use Magento\Framework\Model\AbstractModel; use Magento\Framework\Module\Dir; +use Magento\Framework\Module\Dir\Reader; +use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\Stdlib\StringUtils; use Magento\Framework\Xml\Security; use Magento\Quote\Model\Quote\Address\RateRequest; use Magento\Quote\Model\Quote\Address\RateResult\Error; +use Magento\Quote\Model\Quote\Address\RateResult\Method; +use Magento\Quote\Model\Quote\Address\RateResult\MethodFactory; use Magento\Sales\Exception\DocumentValidationException; use Magento\Sales\Model\Order\Shipment; use Magento\Shipping\Model\Carrier\AbstractCarrier; +use Magento\Shipping\Model\Carrier\CarrierInterface; use Magento\Shipping\Model\Rate\Result; use Magento\Shipping\Model\Rate\Result\ProxyDeferredFactory; +use Magento\Shipping\Model\Shipment\Request as ShipmentRequest; +use Magento\Shipping\Model\Simplexml\Element; +use Magento\Shipping\Model\Simplexml\ElementFactory; +use Magento\Shipping\Model\Tracking\Result\ErrorFactory; +use Magento\Shipping\Model\Tracking\Result\StatusFactory; +use Magento\Shipping\Model\Tracking\ResultFactory; +use Magento\Store\Model\Information; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; +use Psr\Log\LoggerInterface; +use SimpleXMLElement; +use Throwable; +use const DATE_RFC3339; /** * DHL International (API v1.4) @@ -35,7 +68,7 @@ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shipping\Model\Carrier\CarrierInterface +class Carrier extends AbstractDhl implements CarrierInterface { /**#@+ * Carrier Product indicator @@ -92,7 +125,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin /** * Countries parameters data * - * @var \Magento\Shipping\Model\Simplexml\Element|null + * @var Element|null */ protected $_countryParams; @@ -165,7 +198,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin /** * Core string * - * @var \Magento\Framework\Stdlib\StringUtils + * @var StringUtils */ protected $string; @@ -180,32 +213,32 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin protected $_coreDate; /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $_storeManager; /** - * @var \Magento\Framework\Module\Dir\Reader + * @var Reader */ protected $_configReader; /** - * @var \Magento\Framework\Math\Division + * @var Division */ protected $mathDivision; /** - * @var \Magento\Framework\Filesystem\Directory\ReadFactory + * @var ReadFactory */ protected $readFactory; /** - * @var \Magento\Framework\Stdlib\DateTime + * @var DateTime */ protected $_dateTime; /** - * @var \Magento\Framework\HTTP\LaminasClientFactory + * @var LaminasClientFactory * phpcs:ignore Magento2.Commenting.ClassAndInterfacePHPDocFormatting * @deprecated Use asynchronous client. * @see $httpClient @@ -222,7 +255,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin /** * Xml response validator * - * @var \Magento\Dhl\Model\Validator\XmlValidator + * @var XmlValidator */ private $xmlValidator; @@ -242,67 +275,67 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin private $proxyDeferredFactory; /** - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param ScopeConfigInterface $scopeConfig * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Psr\Log\LoggerInterface $logger + * @param LoggerInterface $logger * @param Security $xmlSecurity - * @param \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory + * @param ElementFactory $xmlElFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory - * @param \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory - * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory - * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory - * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory - * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Directory\Model\CountryFactory $countryFactory - * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory - * @param \Magento\Directory\Helper\Data $directoryData - * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry + * @param MethodFactory $rateMethodFactory + * @param ResultFactory $trackFactory + * @param ErrorFactory $trackErrorFactory + * @param StatusFactory $trackStatusFactory + * @param RegionFactory $regionFactory + * @param CountryFactory $countryFactory + * @param CurrencyFactory $currencyFactory + * @param Data $directoryData + * @param StockRegistryInterface $stockRegistry * @param \Magento\Shipping\Helper\Carrier $carrierHelper * @param \Magento\Framework\Stdlib\DateTime\DateTime $coreDate - * @param \Magento\Framework\Module\Dir\Reader $configReader - * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\Stdlib\StringUtils $string - * @param \Magento\Framework\Math\Division $mathDivision - * @param \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory - * @param \Magento\Framework\Stdlib\DateTime $dateTime - * @param \Magento\Framework\HTTP\LaminasClientFactory $httpClientFactory + * @param Reader $configReader + * @param StoreManagerInterface $storeManager + * @param StringUtils $string + * @param Division $mathDivision + * @param ReadFactory $readFactory + * @param DateTime $dateTime + * @param LaminasClientFactory $httpClientFactory * @param array $data - * @param \Magento\Dhl\Model\Validator\XmlValidator|null $xmlValidator + * @param XmlValidator|null $xmlValidator * @param ProductMetadataInterface|null $productMetadata * @param AsyncClientInterface|null $httpClient * @param ProxyDeferredFactory|null $proxyDeferredFactory * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + ScopeConfigInterface $scopeConfig, \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Psr\Log\LoggerInterface $logger, + LoggerInterface $logger, Security $xmlSecurity, - \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory, + ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, - \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, - \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory, - \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory, - \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory, - \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Directory\Model\CountryFactory $countryFactory, - \Magento\Directory\Model\CurrencyFactory $currencyFactory, - \Magento\Directory\Helper\Data $directoryData, - \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, - \Magento\Shipping\Helper\Carrier $carrierHelper, - \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, - \Magento\Framework\Module\Dir\Reader $configReader, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\Stdlib\StringUtils $string, - \Magento\Framework\Math\Division $mathDivision, - \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory, - \Magento\Framework\Stdlib\DateTime $dateTime, - \Magento\Framework\HTTP\LaminasClientFactory $httpClientFactory, - array $data = [], - \Magento\Dhl\Model\Validator\XmlValidator $xmlValidator = null, - ProductMetadataInterface $productMetadata = null, - ?AsyncClientInterface $httpClient = null, - ?ProxyDeferredFactory $proxyDeferredFactory = null + MethodFactory $rateMethodFactory, + ResultFactory $trackFactory, + ErrorFactory $trackErrorFactory, + StatusFactory $trackStatusFactory, + RegionFactory $regionFactory, + CountryFactory $countryFactory, + CurrencyFactory $currencyFactory, + Data $directoryData, + StockRegistryInterface $stockRegistry, + \Magento\Shipping\Helper\Carrier $carrierHelper, + \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, + Reader $configReader, + StoreManagerInterface $storeManager, + StringUtils $string, + Division $mathDivision, + ReadFactory $readFactory, + DateTime $dateTime, + LaminasClientFactory $httpClientFactory, + array $data = [], + XmlValidator $xmlValidator = null, + ProductMetadataInterface $productMetadata = null, + ?AsyncClientInterface $httpClient = null, + ?ProxyDeferredFactory $proxyDeferredFactory = null ) { $this->readFactory = $readFactory; $this->_carrierHelper = $carrierHelper; @@ -353,7 +386,7 @@ protected function _getDefaultValue($origValue, $pathToValue) if (!$origValue) { $origValue = $this->_scopeConfig->getValue( $pathToValue, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $this->getStore() ); } @@ -377,7 +410,7 @@ public function collectRates(RateRequest $request) $this->setStore($requestDhl->getStoreId()); $origCompanyName = $this->_getDefaultValue( $requestDhl->getOrigCompanyName(), - \Magento\Store\Model\Information::XML_PATH_STORE_INFO_NAME + Information::XML_PATH_STORE_INFO_NAME ); $origCountryId = $this->_getDefaultValue($requestDhl->getOrigCountryId(), Shipment::XML_PATH_STORE_COUNTRY_ID); $origState = $this->_getDefaultValue($requestDhl->getOrigState(), Shipment::XML_PATH_STORE_REGION_ID); @@ -434,10 +467,10 @@ public function getResult() /** * Fills request object with Dhl config parameters * - * @param \Magento\Framework\DataObject $requestObject - * @return \Magento\Framework\DataObject + * @param DataObject $requestObject + * @return DataObject */ - protected function _addParams(\Magento\Framework\DataObject $requestObject) + protected function _addParams(DataObject $requestObject) { foreach ($this->_requestVariables as $code => $objectCode) { if ($this->_request->getDhlId()) { @@ -454,17 +487,17 @@ protected function _addParams(\Magento\Framework\DataObject $requestObject) /** * Prepare and set request in property of current instance * - * @param \Magento\Framework\DataObject $request + * @param DataObject $request * @return $this * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function setRequest(\Magento\Framework\DataObject $request) + public function setRequest(DataObject $request) { $this->_request = $request; $this->setStore($request->getStoreId()); - $requestObject = new \Magento\Framework\DataObject(); + $requestObject = new DataObject(); $requestObject->setIsGenerateLabelReturn($request->getIsGenerateLabelReturn()); @@ -502,7 +535,7 @@ public function setRequest(\Magento\Framework\DataObject $request) ->setOrigEmail( $this->_scopeConfig->getValue( 'trans_email/ident_general/email', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $requestObject->getStoreId() ) ) @@ -515,7 +548,7 @@ public function setRequest(\Magento\Framework\DataObject $request) $originStreet2 = $this->_scopeConfig->getValue( Shipment::XML_PATH_STORE_ADDRESS2, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $requestObject->getStoreId() ); @@ -562,7 +595,7 @@ public function setRequest(\Magento\Framework\DataObject $request) * Get allowed shipping methods * * @return string[] - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function getAllowedMethods() { @@ -582,7 +615,7 @@ public function getAllowedMethods() $allowedMethods = explode(',', $this->getConfigData('nondoc_methods') ?? ''); break; default: - throw new \Magento\Framework\Exception\LocalizedException(__('Wrong Content Type')); + throw new LocalizedException(__('Wrong Content Type')); } } $methods = []; @@ -842,11 +875,11 @@ protected function _getAllItems() /** * Make pieces * - * @param \Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails + * @param Element $nodeBkgDetails * @return void * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ - protected function _makePieces(\Magento\Shipping\Model\Simplexml\Element $nodeBkgDetails) + protected function _makePieces(Element $nodeBkgDetails) { $divideOrderWeight = (string)$this->getConfigData('divide_order_weight'); $nodePieces = $nodeBkgDetails->addChild('Pieces', '', ''); @@ -951,7 +984,7 @@ protected function _getDimension($dimension, $configWeightUnit = false) /** * Add dimension to piece * - * @param \Magento\Shipping\Model\Simplexml\Element $nodePiece + * @param Element $nodePiece * @return void */ protected function _addDimension($nodePiece) @@ -1003,7 +1036,7 @@ function (array $a, array $b): int { ); $unavailable = true; } - } catch (\Throwable $exception) { + } catch (Throwable $exception) { //Failed to read response $unavailable = true; $this->_errors[$exception->getCode()] = $exception->getMessage(); @@ -1026,7 +1059,7 @@ function (array $a, array $b): int { /** * Get shipping quotes * - * @return \Magento\Framework\Model\AbstractModel|Result + * @return AbstractModel|Result */ protected function _getQuotes() { @@ -1114,7 +1147,7 @@ protected function _getQuotesFromServer($request) /** * Build quotes request XML object * - * @return \SimpleXMLElement + * @return SimpleXMLElement */ protected function _buildQuotesRequestXml() { @@ -1152,7 +1185,7 @@ protected function _buildQuotesRequestXml() $nodeBkgDetails->addChild('PaymentCountryCode', $rawRequest->getOrigCountryId()); $nodeBkgDetails->addChild( 'Date', - (new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT) + (new \DateTime())->format(DateTime::DATETIME_PHP_FORMAT) ); $nodeBkgDetails->addChild('ReadyTime', 'PT' . (int)(string)$this->getConfigData('ready_time') . 'H00M'); @@ -1185,11 +1218,11 @@ protected function _buildQuotesRequestXml() /** * Set pick-up date in request XML object * - * @param \SimpleXMLElement $requestXml + * @param SimpleXMLElement $requestXml * @param string $date - * @return \SimpleXMLElement + * @return SimpleXMLElement */ - protected function _setQuotesRequestXmlDate(\SimpleXMLElement $requestXml, $date) + protected function _setQuotesRequestXmlDate(SimpleXMLElement $requestXml, $date) { $requestXml->GetQuote->BkgDetails->Date = $date; @@ -1200,8 +1233,8 @@ protected function _setQuotesRequestXmlDate(\SimpleXMLElement $requestXml, $date * Parse response from DHL web service * * @param string $response - * @return bool|\Magento\Framework\DataObject|Result|Error - * @throws \Magento\Framework\Exception\LocalizedException + * @return bool|DataObject|Result|Error + * @throws LocalizedException * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _parseResponse($response) @@ -1232,7 +1265,7 @@ protected function _parseResponse($response) foreach ($this->_rates as $rate) { $method = $rate['service']; $data = $rate['data']; - /* @var $rate \Magento\Quote\Model\Quote\Address\RateResult\Method */ + /* @var $rate Method */ $rate = $this->_rateMethodFactory->create(); $rate->setCarrier(self::CODE); $rate->setCarrierTitle($this->getConfigData('title')); @@ -1245,7 +1278,7 @@ protected function _parseResponse($response) } else { if (!empty($this->_errors)) { if ($this->_isShippingLabelFlag) { - throw new \Magento\Framework\Exception\LocalizedException($responseError); + throw new LocalizedException($responseError); } $this->debugErrors($this->_errors); } @@ -1258,11 +1291,11 @@ protected function _parseResponse($response) /** * Add rate to DHL rates array * - * @param \SimpleXMLElement $shipmentDetails + * @param SimpleXMLElement $shipmentDetails * @return $this * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ - protected function _addRate(\SimpleXMLElement $shipmentDetails) + protected function _addRate(SimpleXMLElement $shipmentDetails) { if (isset($shipmentDetails->ProductShortName) && isset($shipmentDetails->ShippingCharge) @@ -1279,7 +1312,7 @@ protected function _addRate(\SimpleXMLElement $shipmentDetails) $dhlProductDescription = $this->getDhlProductTitle($dhlProduct); if ($currencyCode != $baseCurrencyCode) { - /* @var $currency \Magento\Directory\Model\Currency */ + /* @var $currency Currency */ $currency = $this->_currencyFactory->create(); $rates = $currency->getCurrencyRates($currencyCode, [$baseCurrencyCode]); if (!empty($rates) && isset($rates[$baseCurrencyCode])) { @@ -1334,14 +1367,14 @@ protected function _addRate(\SimpleXMLElement $shipmentDetails) * Returns dimension unit (cm or inch) * * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ protected function _getDimensionUnit() { $countryId = $this->_rawRequest->getOrigCountryId(); $measureUnit = $this->getCountryParams($countryId)->getMeasureUnit(); if (empty($measureUnit)) { - throw new \Magento\Framework\Exception\LocalizedException( + throw new LocalizedException( __("Cannot identify measure unit for %1", $countryId) ); } @@ -1353,14 +1386,14 @@ protected function _getDimensionUnit() * Returns weight unit (kg or pound) * * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ protected function _getWeightUnit() { $countryId = $this->_rawRequest->getOrigCountryId(); $weightUnit = $this->getCountryParams($countryId)->getWeightUnit(); if (empty($weightUnit)) { - throw new \Magento\Framework\Exception\LocalizedException( + throw new LocalizedException( __("Cannot identify weight unit for %1", $countryId) ); } @@ -1372,7 +1405,7 @@ protected function _getWeightUnit() * Get Country Params by Country Code * * @param string $countryCode - * @return \Magento\Framework\DataObject + * @return DataObject * * @see $countryCode ISO 3166 Codes (Countries) A2 */ @@ -1385,18 +1418,18 @@ protected function getCountryParams($countryCode) $this->_countryParams = $this->_xmlElFactory->create(['data' => $countriesXml]); } if (isset($this->_countryParams->{$countryCode})) { - $countryParams = new \Magento\Framework\DataObject($this->_countryParams->{$countryCode}->asArray()); + $countryParams = new DataObject($this->_countryParams->{$countryCode}->asArray()); } - return $countryParams ?? new \Magento\Framework\DataObject(); + return $countryParams ?? new DataObject(); } /** * Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response * - * @param \Magento\Framework\DataObject $request - * @return \Magento\Framework\DataObject + * @param DataObject $request + * @return DataObject */ - protected function _doShipmentRequest(\Magento\Framework\DataObject $request) + protected function _doShipmentRequest(DataObject $request) { $this->_prepareShipmentRequest($request); @@ -1409,13 +1442,13 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request) /** * Processing additional validation to check is carrier applicable. * - * @param \Magento\Framework\DataObject $request - * @return $this|\Magento\Framework\DataObject|boolean + * @param DataObject $request + * @return $this|DataObject|boolean * phpcs:disable Magento2.Annotation.MethodAnnotationStructure * @deprecated 100.2.3 * @see use processAdditionalValidation method instead */ - public function proccessAdditionalValidation(\Magento\Framework\DataObject $request) + public function proccessAdditionalValidation(DataObject $request) { return $this->processAdditionalValidation($request); } @@ -1423,10 +1456,10 @@ public function proccessAdditionalValidation(\Magento\Framework\DataObject $requ /** * Processing additional validation to check is carrier applicable. * - * @param \Magento\Framework\DataObject $request - * @return $this|\Magento\Framework\DataObject|boolean + * @param DataObject $request + * @return $this|DataObject|boolean */ - public function processAdditionalValidation(\Magento\Framework\DataObject $request) + public function processAdditionalValidation(DataObject $request) { //Skip by item validation if there is no items in request if (empty($this->getAllItems($request))) { @@ -1436,7 +1469,7 @@ public function processAdditionalValidation(\Magento\Framework\DataObject $reque $countryParams = $this->getCountryParams( $this->_scopeConfig->getValue( Shipment::XML_PATH_STORE_COUNTRY_ID, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $request->getStoreId() ) ); @@ -1456,11 +1489,11 @@ public function processAdditionalValidation(\Magento\Framework\DataObject $reque /** * Return container types of carrier * - * @param \Magento\Framework\DataObject|null $params + * @param DataObject|null $params * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getContainerTypes(\Magento\Framework\DataObject $params = null) + public function getContainerTypes(DataObject $params = null) { return [ self::DHL_CONTENT_TYPE_DOC => __('Documents'), @@ -1471,11 +1504,11 @@ public function getContainerTypes(\Magento\Framework\DataObject $params = null) /** * Map request to shipment * - * @param \Magento\Framework\DataObject $request + * @param DataObject $request * @return void - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ - protected function _mapRequestToShipment(\Magento\Framework\DataObject $request) + protected function _mapRequestToShipment(DataObject $request) { $request->setOrigCountryId($request->getShipperAddressCountryCode()); $this->setRawRequest($request); @@ -1488,7 +1521,7 @@ protected function _mapRequestToShipment(\Magento\Framework\DataObject $request) $minValue = $this->_getMinDimension($params['dimension_units']); if ($params['width'] < $minValue || $params['length'] < $minValue || $params['height'] < $minValue) { $message = __('Height, width and length should be equal or greater than %1', $minValue); - throw new \Magento\Framework\Exception\LocalizedException($message); + throw new LocalizedException($message); } } @@ -1526,8 +1559,8 @@ protected function _getMinDimension($dimensionUnit) /** * Do rate request and handle errors * - * @return Result|\Magento\Framework\DataObject - * @throws \Magento\Framework\Exception\LocalizedException + * @return Result|DataObject + * @throws LocalizedException * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) @@ -1563,7 +1596,7 @@ protected function _doRequest() $originRegion = $this->getCountryParams( $this->_scopeConfig->getValue( Shipment::XML_PATH_STORE_COUNTRY_ID, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $this->getStore() ) )->getRegion(); @@ -1662,7 +1695,6 @@ protected function _doRequest() /** Export Declaration */ $this->addExportDeclaration($xml, $rawRequest); - } /** * Reference @@ -1738,7 +1770,7 @@ protected function _doRequest() $responseBody = mb_convert_encoding($response->get()->getBody(), 'ISO-8859-1', 'UTF-8'); $debugData['result'] = $this->filterDebugData($responseBody); $this->_setCachedQuotes($request, $responseBody); - } catch (\Exception $e) { + } catch (Exception $e) { $this->_errors[$e->getCode()] = $e->getMessage(); $responseBody = ''; } @@ -1751,7 +1783,7 @@ protected function _doRequest() /** * Generation Shipment Details Node according to origin region * - * @param \Magento\Shipping\Model\Simplexml\Element $xml + * @param Element $xml * @param RateRequest $rawRequest * @param string $originRegion * @return void @@ -1901,7 +1933,7 @@ protected function _getXMLTracking($trackings) $responseBody = $response->get()->getBody(); $debugData['result'] = $this->filterDebugData($responseBody); $this->_setCachedQuotes($request, $responseBody); - } catch (\Exception $e) { + } catch (Exception $e) { $this->_errors[$e->getCode()] = $e->getMessage(); $responseBody = ''; } @@ -1926,7 +1958,7 @@ protected function _parseXmlTrackingResponse($trackings, $response) $resultArr = []; if (!empty(trim($response))) { - $xml = $this->parseXml($response, \Magento\Shipping\Model\Simplexml\Element::class); + $xml = $this->parseXml($response, Element::class); if (!is_object($xml)) { $errorTitle = __('Response is in the wrong format'); } @@ -2025,19 +2057,19 @@ protected function _getPerpackagePrice($cost, $handlingType, $handlingFee) /** * Do request to shipment * - * @param \Magento\Shipping\Model\Shipment\Request $request - * @return array|\Magento\Framework\DataObject - * @throws \Magento\Framework\Exception\LocalizedException + * @param ShipmentRequest $request + * @return array|DataObject + * @throws LocalizedException */ public function requestToShipment($request) { $packages = $request->getPackages(); if (!is_array($packages) || !$packages) { - throw new \Magento\Framework\Exception\LocalizedException(__('No packages for request')); + throw new LocalizedException(__('No packages for request')); } $result = $this->_doShipmentRequest($request); - $response = new \Magento\Framework\DataObject( + $response = new DataObject( [ 'info' => [ [ @@ -2082,23 +2114,23 @@ protected function _checkDomesticStatus($origCountryCode, $destCountryCode) /** * Prepare shipping label data * - * @param \SimpleXMLElement $xml - * @return \Magento\Framework\DataObject - * @throws \Magento\Framework\Exception\LocalizedException + * @param SimpleXMLElement $xml + * @return DataObject + * @throws LocalizedException */ - protected function _prepareShippingLabelContent(\SimpleXMLElement $xml) + protected function _prepareShippingLabelContent(SimpleXMLElement $xml) { - $result = new \Magento\Framework\DataObject(); + $result = new DataObject(); try { if (!isset($xml->AirwayBillNumber) || !isset($xml->LabelImage->OutputImage)) { - throw new \Magento\Framework\Exception\LocalizedException(__('Unable to retrieve shipping label')); + throw new LocalizedException(__('Unable to retrieve shipping label')); } $result->setTrackingNumber((string)$xml->AirwayBillNumber); $labelContent = (string)$xml->LabelImage->OutputImage; // phpcs:ignore Magento2.Functions.DiscouragedFunction $result->setShippingLabelContent(base64_decode($labelContent)); - } catch (\Exception $e) { - throw new \Magento\Framework\Exception\LocalizedException(__($e->getMessage())); + } catch (Exception $e) { + throw new LocalizedException(__($e->getMessage())); } return $result; @@ -2127,7 +2159,7 @@ protected function isDutiable($origCountryId, $destCountryId): bool */ private function buildMessageTimestamp(string $datetime = null): string { - return $this->_coreDate->date(\DATE_RFC3339, $datetime); + return $this->_coreDate->date(DATE_RFC3339, $datetime); } /** @@ -2135,7 +2167,7 @@ private function buildMessageTimestamp(string $datetime = null): string * * @param string $servicePrefix * @return string - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ private function buildMessageReference(string $servicePrefix): string { @@ -2146,7 +2178,7 @@ private function buildMessageReference(string $servicePrefix): string ]; if (!in_array($servicePrefix, $validPrefixes)) { - throw new \Magento\Framework\Exception\LocalizedException( + throw new LocalizedException( __("Invalid service prefix \"$servicePrefix\" provided while attempting to build MessageReference") ); } @@ -2191,23 +2223,23 @@ private function getGatewayURL(): string /** * Generating Export Declaration Details * - * @param \Magento\Shipping\Model\Simplexml\Element $xml - * @param RateRequest $rawRequest + * @param Element $xml + * @param ShipmentRequest $rawRequest * @return void */ - private function addExportDeclaration(\Magento\Shipping\Model\Simplexml\Element $xml, RateRequest $rawRequest): void + private function addExportDeclaration(Element $xml, ShipmentRequest $rawRequest): void { $nodeExportDeclaration = $xml->addChild('ExportDeclaration', '', ''); $nodeExportDeclaration->addChild( 'InvoiceNumber', - $rawRequest->getOrderShipment()->getOrder()->hasInvoices() ? - $this->getInvoiceNumbers($rawRequest) : - $rawRequest->getOrderShipment()->getOrder()->getIncrementId() + $rawRequest->getOrderShipment()->getOrder()->hasInvoices() + ? $this->getInvoiceNumbers($rawRequest) + : $rawRequest->getOrderShipment()->getOrder()->getIncrementId() + ); + $nodeExportDeclaration->addChild( + 'InvoiceDate', + date("Y-m-d", strtotime((string)$rawRequest->getOrderShipment()->getOrder()->getCreatedAt())) ); - $nodeExportDeclaration->addChild('InvoiceDate', date( - "Y-m-d", - strtotime($rawRequest->getOrderShipment()->getOrder()->getCreatedAt()) - )); $exportItems = $rawRequest->getPackages(); foreach ($exportItems as $exportItem) { $itemWeightUnit = $exportItem['params']['weight_units'] ? substr( @@ -2236,10 +2268,10 @@ private function addExportDeclaration(\Magento\Shipping\Model\Simplexml\Element /** * Fetching Shipment Order Invoice No * - * @param RateRequest $rawRequest + * @param ShipmentRequest $rawRequest * @return string */ - private function getInvoiceNumbers(RateRequest $rawRequest): string + private function getInvoiceNumbers(ShipmentRequest $rawRequest): string { $invoiceNumbers = []; $order = $rawRequest->getOrderShipment()->getOrder(); diff --git a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php index 1e38c0a58d573..41414c2b5f9f6 100644 --- a/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php +++ b/dev/tests/integration/testsuite/Magento/Dhl/Model/CarrierTest.php @@ -316,6 +316,9 @@ public function testRequestToShip( 'items' => [ 'item1' => [ 'name' => $productName, + 'qty' => 1, + 'weight' => '0.454000000001', + 'price' => '10.00', ], ], ], @@ -422,8 +425,13 @@ private function getExpectedLabelRequestXml( $expectedRequestElement->Shipper->CountryName = $countryNames[$origCountryId]; $expectedRequestElement->RegionCode = $regionCode; + if ($origCountryId !== $destCountryId) { + $expectedRequestElement->ExportDeclaration->ExportLineItem->ManufactureCountryCode = $origCountryId; + } + if ($isProductNameContainsSpecialChars) { $expectedRequestElement->ShipmentDetails->Pieces->Piece->PieceContents = self::PRODUCT_NAME_SPECIAL_CHARS; + $expectedRequestElement->ExportDeclaration->ExportLineItem->Description = self::PRODUCT_NAME_SPECIAL_CHARS; } return $expectedRequestElement->asXML(); diff --git a/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml b/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml index 8cdeaa6018119..9a0d6a4fd46db 100644 --- a/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml +++ b/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml @@ -48,6 +48,26 @@ <DeclaredCurrency>USD</DeclaredCurrency> <TermsOfTrade>DAP</TermsOfTrade> </Dutiable> + <ExportDeclaration> + <InvoiceNumber/> + <InvoiceDate>1970-01-01</InvoiceDate> + <ExportLineItem> + <LineNumber>item1</LineNumber> + <Quantity>1</Quantity> + <QuantityUnit>PCS</QuantityUnit> + <Description>item_name</Description> + <Value>10.00</Value> + <Weight> + <Weight>0.454000000001</Weight> + <WeightUnit>K</WeightUnit> + </Weight> + <GrossWeight> + <Weight>0.454000000001</Weight> + <WeightUnit>K</WeightUnit> + </GrossWeight> + <ManufactureCountryCode>GB</ManufactureCountryCode> + </ExportLineItem> + </ExportDeclaration> <Reference xmlns=""> <ReferenceID>shipment reference</ReferenceID> <ReferenceType>St</ReferenceType> From 7ff24dce0c991370f474fce0a73920ec42303ad8 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov <sidolov@adobe.com> Date: Fri, 10 Feb 2023 13:50:19 -0600 Subject: [PATCH 897/985] AC-7900: Unable to create Shipping Label for Dutiable shipments in DHL shipping method --- app/code/Magento/Dhl/Model/Carrier.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 8de7084ff30c5..76d91f924fd39 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -322,20 +322,20 @@ public function __construct( CurrencyFactory $currencyFactory, Data $directoryData, StockRegistryInterface $stockRegistry, - \Magento\Shipping\Helper\Carrier $carrierHelper, - \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, - Reader $configReader, - StoreManagerInterface $storeManager, - StringUtils $string, - Division $mathDivision, + \Magento\Shipping\Helper\Carrier $carrierHelper, + \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, + Reader $configReader, + StoreManagerInterface $storeManager, + StringUtils $string, + Division $mathDivision, ReadFactory $readFactory, - DateTime $dateTime, - LaminasClientFactory $httpClientFactory, - array $data = [], - XmlValidator $xmlValidator = null, - ProductMetadataInterface $productMetadata = null, - ?AsyncClientInterface $httpClient = null, - ?ProxyDeferredFactory $proxyDeferredFactory = null + DateTime $dateTime, + LaminasClientFactory $httpClientFactory, + array $data = [], + XmlValidator $xmlValidator = null, + ProductMetadataInterface $productMetadata = null, + ?AsyncClientInterface $httpClient = null, + ?ProxyDeferredFactory $proxyDeferredFactory = null ) { $this->readFactory = $readFactory; $this->_carrierHelper = $carrierHelper; From b232c2d9831f2e07fd989d53a1b7d74500eee949 Mon Sep 17 00:00:00 2001 From: Arularasan <glo02433@adobe.com> Date: Mon, 13 Feb 2023 10:44:29 +0530 Subject: [PATCH 898/985] ACP2E-1445: Customer data in Local Storage not reset when session file lost - Added the test coverage. --- ...teCookieWhenCustomerNotExistPluginTest.php | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php new file mode 100644 index 0000000000000..fd06dbf6b8004 --- /dev/null +++ b/app/code/Magento/Customer/Test/Unit/Model/App/FrontController/DeleteCookieWhenCustomerNotExistPluginTest.php @@ -0,0 +1,56 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Test\Unit\Model\App\FrontController; + +use Magento\Customer\Model\App\FrontController\DeleteCookieWhenCustomerNotExistPlugin; +use Magento\Framework\App\Response\Http as ResponseHttp; +use Magento\Customer\Model\Session; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Tests \Magento\Customer\Model\App\FrontController\DeleteCookieWhenCustomerNotExistPluginTest. + */ +class DeleteCookieWhenCustomerNotExistPluginTest extends TestCase +{ + /** + * @var DeleteCookieWhenCustomerNotExistPlugin + */ + protected DeleteCookieWhenCustomerNotExistPlugin $plugin; + + /** + * @var ResponseHttp|MockObject + */ + protected ResponseHttp|MockObject $responseHttpMock; + + /** + * @var Session|MockObject + */ + protected MockObject|Session $customerSessionMock; + + /** + * Set up + */ + protected function setUp(): void + { + $this->customerSessionMock = $this->createMock(Session::class); + $this->responseHttpMock = $this->createMock(ResponseHttp::class); + $this->plugin = new DeleteCookieWhenCustomerNotExistPlugin( + $this->responseHttpMock, + $this->customerSessionMock + ); + } + + public function testBeforeDispatch() + { + $this->customerSessionMock->expects($this->once()) + ->method('getCustomerId') + ->willReturn(0); + $this->plugin->beforeDispatch(); + } +} From d73e805f491ccf48b9f931bd0cc58731ecec279f Mon Sep 17 00:00:00 2001 From: Anupam Bhatt <51681435+engcom-Echo@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:09:47 +0530 Subject: [PATCH 899/985] Update validation.js to properly indicate required fields for accessibility --- lib/web/mage/validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 41626d5a4d92d..c2d661b56f907 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1936,7 +1936,7 @@ define([ this.element .find('.field.required') .find('.control') - .find('input.required-entry, select.required-entry, textarea.required-entry') + .find('input.required-entry, select.required-entry, textarea.required-entry, input.required, select.required, textarea.required')//eslint-disable-line max-len .attr('aria-required', 'true'); this._listenFormValidate(); From d3d4b33e472e0b93bed013ad0e05752eee137adf Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Mon, 13 Feb 2023 12:42:48 +0200 Subject: [PATCH 900/985] ACP2E-1369: improved mftf --- .../AdminOrderCheckCommentsHistoryTest.xml | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml index 5aec50679e42a..0baa30bbb3473 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml @@ -20,51 +20,49 @@ <group value="sales"/> </annotations> <before> - + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="_defaultCategory" stepKey="createCategory"/> <createData entity="SimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - - <!-- Customer is created --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> - <!-- Login to Admin --> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - </before> <after> <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> - <!-- Delete products --> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - - <!-- Delete Category --> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - - <!-- Delete Customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> </after> - <!-- Create new customer order --> - <comment userInput="Create new customer order" stepKey="createNewCustomerOrderComment"/> - <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer"> - <argument name="customer" value="$$createCustomer$$"/> - </actionGroup> - <!-- Add Simple product to order --> - <comment userInput="Add Simple product to order" stepKey="addSimpleProductToOrderComment"/> - <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToTheOrder"> - <argument name="product" value="$$createProduct$$"/> + <!-- Create order, invoice, shipment and credit memo --> + <createData entity="CustomerCart" stepKey="createCustomerCart"> + <requiredEntity createDataKey="createCustomer"/> + </createData> + <createData entity="CustomerCartItem" stepKey="addCartItem"> + <requiredEntity createDataKey="createCustomerCart"/> + <requiredEntity createDataKey="createProduct"/> + </createData> + <createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress"> + <requiredEntity createDataKey="createCustomerCart"/> + </createData> + <updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="createFirstOrder"> + <requiredEntity createDataKey="createCustomerCart"/> + </updateData> + <createData entity="Invoice" stepKey="invoiceOrder"> + <requiredEntity createDataKey="createCustomerCart"/> + </createData> + <createData entity="Shipment" stepKey="createShipment"> + <requiredEntity createDataKey="createCustomerCart"/> + </createData> + <createData entity="CreditMemo" stepKey="createCreditMemo"> + <requiredEntity createDataKey="createCustomerCart"/> + </createData> + + <!-- Open Admin Order page --> + <actionGroup ref="AdminOpenOrderViewPageByOrderIdActionGroup" stepKey="openOrder"> + <argument name="orderId" value="$createCustomerCart.return$"/> </actionGroup> - <!-- Select FlatRate shipping method --> - <comment userInput="Select FlatRate shipping method" stepKey="selectFlatRateShippingMethodComment"/> - <actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> - <!-- Submit order --> - <comment userInput="Submit order" stepKey="submitOrderComment"/> - <actionGroup ref="AdminOrderClickSubmitOrderActionGroup" stepKey="submitOrder" /> - <!-- Verify order information --> - <comment userInput="Verify order information" stepKey="verifyOrderInformationComment"/> - <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/> - <comment userInput="BIC workaround" stepKey="orderId"/> - <grabTextFrom selector="|Order # (\d+)|" stepKey="orderNumber"/> <!--Go to Comments history and switch to Information --> <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory1"/> @@ -74,8 +72,7 @@ <!--Go to Comments history and don't see the error message --> <click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory2"/> <waitForPageLoad stepKey="waitForCommentsHistoryPage"/> - <see userInput="Order Placed by Store Administrator" stepKey="seeMessageOrderCreatedByAdmin"/> + <see userInput="Notes for this Order" stepKey="seeMessageNotesForThisOrder"/> <dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessageTwo"/> - </test> </tests> From 8b57109974b665c8e4e76326ab1bb380452bdb69 Mon Sep 17 00:00:00 2001 From: abhattGlo <glo36217@adobe.com> Date: Mon, 13 Feb 2023 16:45:54 +0530 Subject: [PATCH 901/985] Fixed static tests failures --- app/code/Magento/Bundle/Model/Plugin/PriceBackend.php | 2 ++ .../Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php | 2 ++ app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php index bed74f8d239aa..c55500b8461f3 100644 --- a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php +++ b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php @@ -14,6 +14,8 @@ class PriceBackend { /** + * Around validate + * * @param \Magento\Catalog\Model\Product\Attribute\Backend\Price $subject * @param \Closure $proceed * @param \Magento\Catalog\Model\Product|\Magento\Framework\DataObject $object diff --git a/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php b/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php index a20212c74fbe7..d4b33aa36c044 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php +++ b/app/code/Magento/ConfigurableProduct/Model/Plugin/PriceBackend.php @@ -16,6 +16,8 @@ class PriceBackend { /** + * Around validate + * * @param \Magento\Catalog\Model\Product\Attribute\Backend\Price $subject * @param \Closure $proceed * @param \Magento\Catalog\Model\Product|\Magento\Framework\DataObject $object diff --git a/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php b/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php index 7f50dfe6b629d..7a5bd777efe6b 100644 --- a/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php +++ b/app/code/Magento/Widget/Model/ResourceModel/Layout/Plugin.php @@ -24,6 +24,8 @@ public function __construct(Update $update) } /** + * Around update + * * @param \Magento\Framework\View\Model\Layout\Merge $subject * @param callable $proceed * @param string $handle From 1451e4d847c21d01b9e2ad8d9e610e69624b3089 Mon Sep 17 00:00:00 2001 From: Anupam Bhatt <51681435+engcom-Echo@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:46:33 +0530 Subject: [PATCH 902/985] Update validation.js to properly indicate required fields for accessibility --- lib/web/mage/validation.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index c2d661b56f907..9e69cfb594709 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1936,9 +1936,15 @@ define([ this.element .find('.field.required') .find('.control') - .find('input.required-entry, select.required-entry, textarea.required-entry, input.required, select.required, textarea.required')//eslint-disable-line max-len + .find('input, select, textarea') .attr('aria-required', 'true'); - + + this.element + .find('.field.additional') + .find('.control') + .find('input, select, textarea') + .removeAttr('aria-required'); + this._listenFormValidate(); }, From a110e88387df37d2a07ae9c9bd00b57cac7deef1 Mon Sep 17 00:00:00 2001 From: Anupam Bhatt <51681435+engcom-Echo@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:53:30 +0530 Subject: [PATCH 903/985] Fixed static test failures --- app/code/Magento/Customer/Model/Customer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php index 74d1189c46568..42b0f86ec6cbb 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -1026,6 +1026,7 @@ public function setStore(\Magento\Store\Model\Store $store) * Validate customer attribute values. * * @deprecated 100.1.0 + * @see \Magento\Customer\Model\AccountManagement::validate() * @return bool */ public function validate() From dd38f810b89b3fb8ac70559548bd6a296c4212f0 Mon Sep 17 00:00:00 2001 From: Sergio Vera <sergio.vera@gmail.com> Date: Mon, 13 Feb 2023 15:14:55 +0100 Subject: [PATCH 904/985] LYNX-84: Moved newsletter_enabled query from PWA --- .../NewsletterGraphQl/etc/graphql/di.xml | 7 +++ .../NewsletterGraphQl/etc/schema.graphqls | 4 ++ .../Newsletter/NewsletterIsEnabledTest.php | 59 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/NewsletterIsEnabledTest.php diff --git a/app/code/Magento/NewsletterGraphQl/etc/graphql/di.xml b/app/code/Magento/NewsletterGraphQl/etc/graphql/di.xml index 302a562ec4700..814913202f1a2 100644 --- a/app/code/Magento/NewsletterGraphQl/etc/graphql/di.xml +++ b/app/code/Magento/NewsletterGraphQl/etc/graphql/di.xml @@ -18,4 +18,11 @@ </argument> </arguments> </type> + <type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider"> + <arguments> + <argument name="extendedConfigData" xsi:type="array"> + <item name="newsletter_enabled" xsi:type="string">newsletter/general/active</item> + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/NewsletterGraphQl/etc/schema.graphqls b/app/code/Magento/NewsletterGraphQl/etc/schema.graphqls index 7c2d5ca6b26bc..bd1323b5c4933 100644 --- a/app/code/Magento/NewsletterGraphQl/etc/schema.graphqls +++ b/app/code/Magento/NewsletterGraphQl/etc/schema.graphqls @@ -15,3 +15,7 @@ enum SubscriptionStatusesEnum @doc(description: "Indicates the status of the req UNSUBSCRIBED UNCONFIRMED } + +type StoreConfig { + newsletter_enabled: Boolean! @doc(description: "Indicates whether newsletters are enabled.") +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/NewsletterIsEnabledTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/NewsletterIsEnabledTest.php new file mode 100644 index 0000000000000..28ee09b5002f5 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Newsletter/NewsletterIsEnabledTest.php @@ -0,0 +1,59 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Newsletter; + +use Magento\TestFramework\Fixture\Config; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Test newsletter enabled query + */ +class NewsletterIsEnabledTest extends GraphQlAbstract +{ + private const QUERY = <<<QRY +{ + storeConfig { + newsletter_enabled + } +} +QRY; + + #[ + Config('newsletter/general/active', 1), + ] + public function testNewsletterIsEnabled() + { + $this->assertEquals( + [ + 'storeConfig' => [ + 'newsletter_enabled' => true + ] + ], + $this->graphQlQuery( + self::QUERY + ) + ); + } + + #[ + Config('newsletter/general/active', 0), + ] + public function testNewsletterIsDisabled() + { + $this->assertEquals( + [ + 'storeConfig' => [ + 'newsletter_enabled' => false + ] + ], + $this->graphQlQuery( + self::QUERY + ) + ); + } +} From 88969220e2efa26ac0314cbd738dbbb1d36348b9 Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Mon, 13 Feb 2023 13:55:21 -0600 Subject: [PATCH 905/985] ACQE-4594: Create MFTF 4.2.0 - version bump in lock file --- composer.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index f0880e4e6486e..c8ec698864c61 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": "6bf50057f1bf211775a7988d00b59f76", + "content-hash": "025e34e2353487f8a4a29c1eacf3704f", "packages": [ { "name": "aws/aws-crt-php", @@ -10736,20 +10736,20 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.1.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "df56830b0230940f3398be5414a4ab5b7df2e057" + "reference": "062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/df56830b0230940f3398be5414a4ab5b7df2e057", - "reference": "df56830b0230940f3398be5414a4ab5b7df2e057", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5", + "reference": "062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5", "shasum": "" }, "require": { - "allure-framework/allure-codeception": "^1.4", + "allure-framework/allure-codeception": "^1.5", "allure-framework/allure-phpunit": "^2", "aws/aws-sdk-php": "^3.132", "codeception/codeception": "^4.1", @@ -10825,9 +10825,9 @@ ], "support": { "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.1.0" + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.2.0" }, - "time": "2023-02-08T16:12:33+00:00" + "time": "2023-02-13T18:01:18+00:00" }, { "name": "mustache/mustache", From 68e09a1322e43553e2897c1146037b7962058bdb Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Mon, 13 Feb 2023 17:12:10 -0800 Subject: [PATCH 906/985] ACP2E-1311: Magento forms can be submitted before the Google Recaptcha appears in the form --- .../Magento/Customer/Block/Form/LoginTest.php | 16 +++++- .../Customer/Block/Form/RegisterTest.php | 51 ++++++++++++++----- 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php index 54126e11b9939..c3d7e432df74c 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/LoginTest.php @@ -47,9 +47,23 @@ protected function setUp(): void { $this->objectManager = Bootstrap::getObjectManager(); $this->layout = $this->objectManager->get(LayoutInterface::class); + + $code = 'customer_login_form_submit'; + $buttonLock = $this->getMockBuilder(\Magento\ReCaptchaUi\Model\ButtonLock::class) + ->disableOriginalConstructor() + ->disableAutoload() + ->setMethods(['isDisabled', 'getCode']) + ->getMock(); + $buttonLock->expects($this->any())->method('getCode')->willReturn($code); + $buttonLock->expects($this->any())->method('isDisabled')->willReturn(false); + $buttonLockManager = $this->objectManager->create( + ButtonLockManager::class, + ['buttonLockPool' => [$code => $buttonLock]] + ); + $this->block = $this->layout->createBlock(Login::class); $this->block->setTemplate('Magento_Customer::form/login.phtml'); - $this->block->setButtonLockManager($this->objectManager->get(ButtonLockManager::class)); + $this->block->setButtonLockManager($buttonLockManager); parent::setUp(); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php index f336d68603002..25cacd8961d72 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Form/RegisterTest.php @@ -28,10 +28,10 @@ public function testCompanyDefault(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringContainsString('title="Company"', $block->toHtml()); } @@ -46,10 +46,10 @@ public function testTelephoneDefault(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringContainsString('title="Phone Number"', $block->toHtml()); } @@ -64,10 +64,10 @@ public function testFaxDefault(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringNotContainsString('title="Fax"', $block->toHtml()); } @@ -89,10 +89,10 @@ public function testCompanyDisabled(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringNotContainsString('title="Company"', $block->toHtml()); } @@ -114,10 +114,10 @@ public function testTelephoneDisabled(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringNotContainsString('title="Phone Number"', $block->toHtml()); } @@ -139,10 +139,10 @@ public function testFaxEnabled(): void /** @var \Magento\Customer\Block\Widget\Company $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringContainsString('title="Fax"', $block->toHtml()); } @@ -155,10 +155,10 @@ public function testCityWithStoreLabel(): void /** @var \Magento\Customer\Block\Form\Register $block */ $block = Bootstrap::getObjectManager()->create(Register::class) ->setTemplate('Magento_Customer::form/register.phtml') - ->setShowAddressFields(true) - ->setButtonLockManager(Bootstrap::getObjectManager()->create(ButtonLockManager::class)); + ->setShowAddressFields(true); $this->setAttributeDataProvider($block); $this->setRegionProvider($block); + $this->setButtonLockManager($block); $this->assertStringNotContainsString('title="City"', $block->toHtml()); $this->assertStringContainsString('title="Suburb"', $block->toHtml()); @@ -197,4 +197,27 @@ private function setRegionProvider(Template $block): void $regionProvider = Bootstrap::getObjectManager()->create(RegionProvider::class); $block->setRegionProvider($regionProvider); } + + /** + * Set Button Lock Manager View Model + * + * @param Template $block + * @return void + */ + private function setButtonLockManager(Template $block): void + { + $code = 'customer_create_form_submit'; + $buttonLock = $this->getMockBuilder(\Magento\ReCaptchaUi\Model\ButtonLock::class) + ->disableOriginalConstructor() + ->disableAutoload() + ->setMethods(['isDisabled', 'getCode']) + ->getMock(); + $buttonLock->expects($this->any())->method('getCode')->willReturn($code); + $buttonLock->expects($this->any())->method('isDisabled')->willReturn(false); + $buttonLockManager = Bootstrap::getObjectManager()->create( + ButtonLockManager::class, + ['buttonLockPool' => [$code => $buttonLock]] + ); + $block->setButtonLockManager($buttonLockManager); + } } From e794929e171acff2a83f314b8181f121b0ff7122 Mon Sep 17 00:00:00 2001 From: Anupam Bhatt <51681435+engcom-Echo@users.noreply.github.com> Date: Tue, 14 Feb 2023 10:24:27 +0530 Subject: [PATCH 907/985] Fixed static test failure --- lib/web/mage/validation.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 9e69cfb594709..471ddd220edd5 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1937,14 +1937,12 @@ define([ .find('.field.required') .find('.control') .find('input, select, textarea') - .attr('aria-required', 'true'); - + .attr('aria-required', 'true'); this.element .find('.field.additional') .find('.control') .find('input, select, textarea') - .removeAttr('aria-required'); - + .removeAttr('aria-required'); this._listenFormValidate(); }, From db2d7c76f407d9f8d117b7a5bc9af3eec2c1ca8d Mon Sep 17 00:00:00 2001 From: Anupam Bhatt <51681435+engcom-Echo@users.noreply.github.com> Date: Tue, 14 Feb 2023 11:09:52 +0530 Subject: [PATCH 908/985] Fixed static tests remove trailing spaces --- lib/web/mage/validation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js index 471ddd220edd5..3c8be4967418d 100644 --- a/lib/web/mage/validation.js +++ b/lib/web/mage/validation.js @@ -1937,12 +1937,12 @@ define([ .find('.field.required') .find('.control') .find('input, select, textarea') - .attr('aria-required', 'true'); + .attr('aria-required', 'true'); this.element .find('.field.additional') .find('.control') .find('input, select, textarea') - .removeAttr('aria-required'); + .removeAttr('aria-required'); this._listenFormValidate(); }, From 50e3360fb1186f6b89acdedcb70db50cc28656ec Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Tue, 14 Feb 2023 12:20:08 +0530 Subject: [PATCH 909/985] Fixed static test failures --- app/code/Magento/Swatches/Helper/Data.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Swatches/Helper/Data.php b/app/code/Magento/Swatches/Helper/Data.php index f122a02c70f86..ede204a5e21b8 100644 --- a/app/code/Magento/Swatches/Helper/Data.php +++ b/app/code/Magento/Swatches/Helper/Data.php @@ -30,12 +30,12 @@ class Data /** * When we init media gallery empty image types contain this value. */ - const EMPTY_IMAGE_VALUE = 'no_selection'; + public const EMPTY_IMAGE_VALUE = 'no_selection'; /** * The int value of the Default store ID */ - const DEFAULT_STORE_ID = 0; + public const DEFAULT_STORE_ID = 0; /** * @var CollectionFactory From f7a0a6c945067aee77bb91709ff95dd97e9cbaa5 Mon Sep 17 00:00:00 2001 From: pradeep1819 <pradeep05.pro@gmail.com> Date: Tue, 14 Feb 2023 18:10:12 +0530 Subject: [PATCH 910/985] ACP2E-1580: Tax and Shipping Estimator in the Cart not reflecting default destination configuration --- ...AssertDefaultTaxDestinationActionGroup.xml | 30 ++++++++++++++ ...nResetDefaultTaxDestinationActionGroup.xml | 28 ------------- ...minSetDefaultTaxDestinationActionGroup.xml | 39 ------------------- .../StorefrontEstimateShippingTaxTest.xml | 17 ++++++-- .../Sales/Test/Mftf/Data/ConfigData.xml | 12 ++++++ 5 files changed, 55 insertions(+), 71 deletions(-) create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminAssertDefaultTaxDestinationActionGroup.xml delete mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml delete mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminAssertDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminAssertDefaultTaxDestinationActionGroup.xml new file mode 100644 index 0000000000000..3f0af46dd5cf9 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminAssertDefaultTaxDestinationActionGroup.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAssertDefaultTaxDestinationActionGroup"> + <annotations> + <description>Assert admin settings (country, state, postcode) for default tax destination calculation</description> + </annotations> + <arguments> + <argument name="country" type="string" defaultValue="{{US_Address_TX.country}}"/> + <argument name="state" type="string" defaultValue="*"/> + <argument name="postcode" type="string" defaultValue=""/> + </arguments> + + <!-- Navigate to the tax configuration page --> + <amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPage"/> + <waitForPageLoad stepKey="waitForTaxConfigLoad"/> + <!-- Verify default tax destination calculation settings--> + <conditionalClick selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false" stepKey="clickCalculationSettings"/> + <seeOptionIsSelected selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="{{country}}" stepKey="assertDefaultCountry"/> + <seeOptionIsSelected selector="{{AdminConfigureTaxSection.dropdownDefaultState}}" userInput="{{state}}" stepKey="assertDefaultRegion"/> + <seeInField selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="{{postcode}}" stepKey="assertDefaultPostCode"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml deleted file mode 100644 index e276e40e9d69b..0000000000000 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminResetDefaultTaxDestinationActionGroup.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AdminResetDefaultTaxDestinationActionGroup"> - <annotations> - <description>Reset admin entries (country, state, postcode) for default tax destination calculation</description> - </annotations> - - <!-- navigate to the tax configuration page --> - <amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPageForReset"/> - <waitForPageLoad stepKey="waitForTaxConfigToReset"/> - <!-- reset tax destination calculation settings --> - <scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaultsForReset"/> - <checkOption selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}" stepKey="clickToResetDefaultCountry"/> - <checkOption selector="{{AdminConfigureTaxSection.systemValueDefaultState}}" stepKey="clickToResetDefaultState"/> - <fillField selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="" stepKey="fillToResetDefaultPostCode"/> - <scrollToTopOfPage stepKey="scrollToTop"/> - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChangesToReset"/> - <waitForText userInput='You saved the configuration.' stepKey="waitForTextAfterReset"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml deleted file mode 100644 index 322629896e8bb..0000000000000 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/AdminSetDefaultTaxDestinationActionGroup.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AdminSetDefaultTaxDestinationActionGroup"> - <annotations> - <description>Set admin entries (country, state, postcode) for default tax destination calculation</description> - </annotations> - <arguments> - <argument name="country" type="string" defaultValue="{{US_Address_TX.country}}"/> - <argument name="state" type="string" defaultValue="*"/> - <argument name="postcode" type="string" defaultValue=""/> - </arguments> - - <!-- navigate to the tax configuration page --> - <amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="goToAdminTaxPage"/> - <waitForPageLoad stepKey="waitForTaxConfigLoad"/> - <!-- change the Default Tax Destination Calculation Configurations --> - <scrollTo selector="#tax_defaults-head" x="0" y="-80" stepKey="scrollToTaxDefaults"/> - - <!-- Set default tax destination calculation --> - <conditionalClick selector="{{AdminConfigureTaxSection.defaultDestination}}" dependentSelector="#tax_defaults" visible="false" stepKey="clickCalculationSettings"/> - <uncheckOption selector="{{AdminConfigureTaxSection.systemValueDefaultCountry}}" stepKey="clickDefaultCountry"/> - <selectOption selector="{{AdminConfigureTaxSection.dropdownDefaultCountry}}" userInput="{{country}}" stepKey="selectDefaultCountry"/> - <uncheckOption selector="{{AdminConfigureTaxSection.systemValueDefaultState}}" stepKey="clickDefaultState"/> - <selectOption selector="{{AdminConfigureTaxSection.dropdownDefaultState}}" userInput="{{state}}" stepKey="selectDefaultState"/> - <fillField selector="{{AdminConfigureTaxSection.defaultPostCode}}" userInput="{{postcode}}" stepKey="fillDefaultPostCode"/> - <!-- Save the settings --> - <scrollToTopOfPage stepKey="scrollToTop"/> - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveChanges"/> - <waitForText userInput='You saved the configuration.' stepKey="waitForText"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml index 709e551b04105..9c17074e0b9d8 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontEstimateShippingTaxTest.xml @@ -20,22 +20,31 @@ </annotations> <before> + <!--Change default tax destination calculation settings--> + <magentoCLI command="config:set {{DefaultTaxDestinationCountry.path}} {{US_Address_NY.country_id}}" stepKey="selectDefaultCountry"/> + <magentoCLI command="config:set {{DefaultTaxDestinationRegion.path}} {{RegionNY.region_id}}" stepKey="selectDefaultState"/> + <magentoCLI command="config:set {{DefaultTaxDestinationPostcode.path}} {{US_Address_NY.postcode}}" stepKey="fillDefaultPostCode"/> + <!-- Create simple product --> <createData entity="SimpleProduct2" stepKey="createProduct"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> + <!--Reset default tax destination calculation settings--> + <magentoCLI command="config:set {{DefaultTaxDestinationCountry.path}} {{DefaultTaxDestinationCountry.value}}" stepKey="resetDefaultCountry"/> + <magentoCLI command="config:set {{DefaultTaxDestinationRegion.path}} {{DefaultTaxDestinationRegion.value}}" stepKey="resetDefaultState"/> + <magentoCLI command="config:set {{DefaultTaxDestinationPostcode.path}} {{DefaultTaxDestinationPostcode.value}}" stepKey="resetDefaultPostCode"/> + <!-- Delete simple product --> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <!--Reset default tax destination calculation--> - <actionGroup ref="AdminResetDefaultTaxDestinationActionGroup" stepKey="resetDefaultTaxDestination"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> - <actionGroup ref="AdminSetDefaultTaxDestinationActionGroup" stepKey="setDefaultTaxDestination"> + <!--Verify the admin setting for default tac and destination calculation--> + <actionGroup ref="AdminAssertDefaultTaxDestinationActionGroup" stepKey="sssertDefaultTaxDestination"> <argument name="country" value="{{US_Address_NY.country}}"/> - <argument name="state" value="{{US_Address_NY.state}}"/> + <argument name="state" value="{{RegionNY.region}}"/> <argument name="postcode" value="{{US_Address_NY.postcode}}"/> </actionGroup> diff --git a/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml index b41745596d05c..9a2dd0b83e2aa 100644 --- a/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml +++ b/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml @@ -32,4 +32,16 @@ <data key="path">payment/checkmo/title</data> <data key="value">Test</data> </entity> + <entity name="DefaultTaxDestinationCountry"> + <data key="path">tax/defaults/country</data> + <data key="value">US</data> + </entity> + <entity name="DefaultTaxDestinationRegion"> + <data key="path">tax/defaults/region</data> + <data key="value">*</data> + </entity> + <entity name="DefaultTaxDestinationPostcode"> + <data key="path">tax/defaults/postcode</data> + <data key="value">''</data> + </entity> </entities> From 4c325de7a8a3182d3fde9ee2040df1279c67431f Mon Sep 17 00:00:00 2001 From: Anna Bukatar <abukatar@magento.com> Date: Tue, 14 Feb 2023 08:06:49 -0800 Subject: [PATCH 911/985] ACP2E-1612: Gift Cart product update in a Cart by using GraphQL --- .../Model/Cart/CreateBuyRequest.php | 35 +++++++--- .../CreateBuyRequestDataProviderInterface.php | 19 ++++++ .../CartItem/CartItemsUidArgsProcessor.php | 17 ++++- .../CustomizableOptionUidArgsProcessor.php | 64 +++++++++++++++++++ .../Magento/QuoteGraphQl/etc/schema.graphqls | 3 +- 5 files changed, 126 insertions(+), 12 deletions(-) create mode 100644 app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequestDataProviderInterface.php create mode 100644 app/code/Magento/QuoteGraphQl/Model/CartItem/CustomizableOptionUidArgsProcessor.php diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequest.php b/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequest.php index e15b7324ce24b..7fdce5245b475 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequest.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequest.php @@ -20,13 +20,21 @@ class CreateBuyRequest */ private $dataObjectFactory; + /** + * @var CreateBuyRequestDataProviderInterface[] + */ + private $providers; + /** * @param DataObjectFactory $dataObjectFactory + * @param array $providers */ public function __construct( - DataObjectFactory $dataObjectFactory + DataObjectFactory $dataObjectFactory, + array $providers = [] ) { $this->dataObjectFactory = $dataObjectFactory; + $this->providers = $providers; } /** @@ -39,21 +47,30 @@ public function __construct( public function execute(float $qty, array $customizableOptionsData): DataObject { $customizableOptions = []; + $enteredOptions = []; foreach ($customizableOptionsData as $customizableOption) { if (isset($customizableOption['value_string'])) { - $customizableOptions[$customizableOption['id']] = $this->convertCustomOptionValue( - $customizableOption['value_string'] - ); + if (!is_numeric($customizableOption['id'])) { + $enteredOptions[$customizableOption['id']] = $customizableOption['value_string']; + } else { + $customizableOptions[$customizableOption['id']] = $this->convertCustomOptionValue( + $customizableOption['value_string'] + ); + } } } - $dataArray = [ - 'data' => [ + $requestData = [ + [ 'qty' => $qty, - 'options' => $customizableOptions, - ], + 'options' => $customizableOptions + ] ]; - return $this->dataObjectFactory->create($dataArray); + foreach ($this->providers as $provider) { + $requestData[] = $provider->execute($enteredOptions); + } + + return $this->dataObjectFactory->create(['data' => array_merge([], ...$requestData)]); } /** diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequestDataProviderInterface.php b/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequestDataProviderInterface.php new file mode 100644 index 0000000000000..af52c2869e907 --- /dev/null +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/CreateBuyRequestDataProviderInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\QuoteGraphQl\Model\Cart; + +interface CreateBuyRequestDataProviderInterface +{ + /** + * Create buy request data that can be used for working with cart items + * + * @param array $cartItemData + * @return array + */ + public function execute(array $cartItemData): array; +} diff --git a/app/code/Magento/QuoteGraphQl/Model/CartItem/CartItemsUidArgsProcessor.php b/app/code/Magento/QuoteGraphQl/Model/CartItem/CartItemsUidArgsProcessor.php index 85e744c026c43..b0d68aa634399 100644 --- a/app/code/Magento/QuoteGraphQl/Model/CartItem/CartItemsUidArgsProcessor.php +++ b/app/code/Magento/QuoteGraphQl/Model/CartItem/CartItemsUidArgsProcessor.php @@ -10,6 +10,7 @@ use Magento\Framework\GraphQl\Exception\GraphQlInputException; use Magento\Framework\GraphQl\Query\Resolver\ArgumentsProcessorInterface; use Magento\Framework\GraphQl\Query\Uid; +use Magento\Framework\App\ObjectManager; /** * Category UID processor class for category uid and category id arguments @@ -23,18 +24,26 @@ class CartItemsUidArgsProcessor implements ArgumentsProcessorInterface /** @var Uid */ private $uidEncoder; + /** + * @var CustomizableOptionUidArgsProcessor + */ + private $optionUidArgsProcessor; + /** * @param Uid $uidEncoder + * @param CustomizableOptionUidArgsProcessor|null $optionUidArgsProcessor */ - public function __construct(Uid $uidEncoder) + public function __construct(Uid $uidEncoder, ?CustomizableOptionUidArgsProcessor $optionUidArgsProcessor = null) { $this->uidEncoder = $uidEncoder; + $this->optionUidArgsProcessor = + $optionUidArgsProcessor ?: ObjectManager::getInstance()->get(CustomizableOptionUidArgsProcessor::class); } /** * Process the updateCartItems arguments for cart uids * - * @param string $fieldName, + * @param string $fieldName * @param array $args * @return array * @throws GraphQlInputException @@ -58,6 +67,10 @@ public function process( $args[$filterKey]['cart_items'][$key][self::ID] = $this->uidEncoder->decode((string)$uidFilter); unset($args[$filterKey]['cart_items'][$key][self::UID]); } + if (!empty($cartItem['customizable_options'])) { + $args[$filterKey]['cart_items'][$key]['customizable_options'] = + $this->optionUidArgsProcessor->process($fieldName, $cartItem['customizable_options']); + } } } return $args; diff --git a/app/code/Magento/QuoteGraphQl/Model/CartItem/CustomizableOptionUidArgsProcessor.php b/app/code/Magento/QuoteGraphQl/Model/CartItem/CustomizableOptionUidArgsProcessor.php new file mode 100644 index 0000000000000..278239bba54fa --- /dev/null +++ b/app/code/Magento/QuoteGraphQl/Model/CartItem/CustomizableOptionUidArgsProcessor.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\QuoteGraphQl\Model\CartItem; + +use Magento\Framework\GraphQl\Exception\GraphQlInputException; +use Magento\Framework\GraphQl\Query\Resolver\ArgumentsProcessorInterface; +use Magento\Framework\GraphQl\Query\Uid; + +/** + * Category UID processor class for category uid and category id arguments + */ +class CustomizableOptionUidArgsProcessor implements ArgumentsProcessorInterface +{ + private const ID = 'id'; + + private const UID = 'uid'; + + /** @var Uid */ + private $uidEncoder; + + /** + * @param Uid $uidEncoder + */ + public function __construct(Uid $uidEncoder) + { + $this->uidEncoder = $uidEncoder; + } + + /** + * Process the customizable options for updateCartItems arguments for uids + * + * @param string $fieldName + * @param array $customizableOptions + * @return array + * @throws GraphQlInputException + */ + public function process(string $fieldName, array $customizableOptions): array + { + foreach ($customizableOptions as $key => $option) { + $idFilter = $option[self::ID] ?? []; + $uidFilter = $option[self::UID] ?? []; + + if (!empty($idFilter) + && !empty($uidFilter) + && $fieldName === 'updateCartItems') { + throw new GraphQlInputException( + __( + '`%1` and `%2` can\'t be used for CustomizableOptionInput object at the same time.', + [self::ID, self::UID] + ) + ); + } elseif (!empty($uidFilter)) { + $customizableOptions[$key][self::ID] = $this->uidEncoder->decode((string)$uidFilter); + unset($customizableOptions[$key][self::UID]); + } + } + return $customizableOptions; + } +} diff --git a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls index 27433a30f3c92..022aaa86de50d 100644 --- a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls +++ b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls @@ -62,7 +62,8 @@ input CartItemInput @doc(description: "Defines an item to be added to the cart." } input CustomizableOptionInput @doc(description: "Defines a customizable option.") { - id: Int @doc(description: "The customizable option ID of the product.") + uid: ID @doc(description: "The unique ID for a `CartItemInterface` object.") + id: Int @deprecated(reason: "Use `uid` instead.") @doc(description: "The customizable option ID of the product.") value_string: String! @doc(description: "The string value of the option.") } From 29064b9297744381b635210d74603ccb755a3742 Mon Sep 17 00:00:00 2001 From: Rimple Saini <glo62131@adobe.com> Date: Tue, 14 Feb 2023 22:07:13 +0530 Subject: [PATCH 912/985] AC-7766::Upgrade testing failing while doing upgrade from 2.4.5 to 2.4.6-beta7 - Added laminas-dependency-plugin into allow-plugin --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 692cfbbdb919f..6de5c9d7f07f8 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, + "laminas/laminas-dependency-plugin": true, "magento/*": true, "php-http/discovery": true }, From 9d0d48b6ba53725d877b8705a5e6867399f60494 Mon Sep 17 00:00:00 2001 From: lakshmana <lakshmana.katragadda@globallogic.com> Date: Tue, 14 Feb 2023 23:19:36 +0530 Subject: [PATCH 913/985] ACP2E-1526 : Addressed CR comments --- .../Catalog/Model/Product/Gallery/GalleryManagement.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index 07ddd084601ee..4034c75f7373c 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -55,24 +55,24 @@ class GalleryManagement implements \Magento\Catalog\Api\ProductAttributeMediaGal /** * @var ImageContentInterfaceFactory */ - protected $imageContentInterface; + private $imageContentInterface; /** * Filesystem facade * * @var Filesystem */ - protected $filesystem; + private $filesystem; /** * @var Mime */ - protected $mime; + private $mime; /** * @var File */ - protected $file; + private $file; /** * @param ProductRepositoryInterface $productRepository From d24c28f6f6bdd3748596eb5e37edcb8ebd258375 Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Tue, 14 Feb 2023 14:43:16 -0600 Subject: [PATCH 914/985] ACP2E-1458: Product is not visible on the Storefront after a staging update enabling it is applied --- app/etc/di.xml | 1 + ...siteSubscriptionStatementPostprocessor.php | 36 +++++++++++++++++++ .../Framework/Mview/View/Subscription.php | 16 +++++++-- ...riptionStatementPostprocessorInterface.php | 21 +++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 lib/internal/Magento/Framework/Mview/View/CompositeSubscriptionStatementPostprocessor.php create mode 100644 lib/internal/Magento/Framework/Mview/View/SubscriptionStatementPostprocessorInterface.php diff --git a/app/etc/di.xml b/app/etc/di.xml index 6056a54c66468..ea3da96fe0afd 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -212,6 +212,7 @@ <preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" /> <preference for="Magento\Framework\Interception\ConfigLoaderInterface" type="Magento\Framework\Interception\PluginListGenerator" /> <preference for="Magento\Framework\Interception\ConfigWriterInterface" type="Magento\Framework\Interception\PluginListGenerator" /> + <preference for="Magento\Framework\Mview\View\SubscriptionStatementPostprocessorInterface" type="Magento\Framework\Mview\View\CompositeSubscriptionStatementPostprocessor" /> <type name="Magento\Framework\Model\ResourceModel\Db\TransactionManager" shared="false" /> <type name="Magento\Framework\Acl\Data\Cache"> <arguments> diff --git a/lib/internal/Magento/Framework/Mview/View/CompositeSubscriptionStatementPostprocessor.php b/lib/internal/Magento/Framework/Mview/View/CompositeSubscriptionStatementPostprocessor.php new file mode 100644 index 0000000000000..ba6fdbdd2b220 --- /dev/null +++ b/lib/internal/Magento/Framework/Mview/View/CompositeSubscriptionStatementPostprocessor.php @@ -0,0 +1,36 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Mview\View; + +class CompositeSubscriptionStatementPostprocessor implements SubscriptionStatementPostprocessorInterface +{ + /** + * @var SubscriptionStatementPostprocessorInterface[] + */ + private $postprocessors; + + /** + * @param SubscriptionStatementPostprocessorInterface[] $postprocessors + */ + public function __construct(array $postprocessors = []) + { + $this->postprocessors = $postprocessors; + } + + /** + * @inheritdoc + */ + public function process(string $tableName, string $event, string $statement): string + { + foreach ($this->postprocessors as $postprocessor) { + $statement = $postprocessor->process($tableName, $event, $statement); + } + + return $statement; + } +} diff --git a/lib/internal/Magento/Framework/Mview/View/Subscription.php b/lib/internal/Magento/Framework/Mview/View/Subscription.php index 933d075b35f75..68c72c3e76fda 100644 --- a/lib/internal/Magento/Framework/Mview/View/Subscription.php +++ b/lib/internal/Magento/Framework/Mview/View/Subscription.php @@ -87,6 +87,11 @@ class Subscription implements SubscriptionInterface, SubscriptionTriggersInterfa */ private $mviewConfig; + /** + * @var SubscriptionStatementPostprocessorInterface + */ + private $statementPostprocessor; + /** * @var Trigger[] */ @@ -102,6 +107,7 @@ class Subscription implements SubscriptionInterface, SubscriptionTriggersInterfa * @param array $ignoredUpdateColumns * @param array $ignoredUpdateColumnsBySubscription * @param Config|null $mviewConfig + * @param SubscriptionStatementPostprocessorInterface|null $statementPostprocessor */ public function __construct( ResourceConnection $resource, @@ -112,7 +118,8 @@ public function __construct( $columnName, $ignoredUpdateColumns = [], $ignoredUpdateColumnsBySubscription = [], - Config $mviewConfig = null + ?Config $mviewConfig = null, + ?SubscriptionStatementPostprocessorInterface $statementPostprocessor = null ) { $this->connection = $resource->getConnection(); $this->triggerFactory = $triggerFactory; @@ -124,6 +131,8 @@ public function __construct( $this->ignoredUpdateColumns = $ignoredUpdateColumns; $this->ignoredUpdateColumnsBySubscription = $ignoredUpdateColumnsBySubscription; $this->mviewConfig = $mviewConfig ?? ObjectManager::getInstance()->get(Config::class); + $this->statementPostprocessor = $statementPostprocessor + ?? ObjectManager::getInstance()->get(SubscriptionStatementPostprocessorInterface::class); } /** @@ -324,13 +333,16 @@ protected function buildStatement(string $event, ViewInterface $view): string } $columns = $this->prepareColumns($view, $event); - return sprintf( + $statement = sprintf( $trigger, $this->getProcessor()->getPreStatements(), $this->connection->quoteIdentifier($this->resource->getTableName($changelog->getName())), implode(', ', $columns['column_names']), implode(', ', $columns['column_values']) ); + $statement = $this->statementPostprocessor->process($this->getTableName(), $event, $statement); + + return $statement; } /** diff --git a/lib/internal/Magento/Framework/Mview/View/SubscriptionStatementPostprocessorInterface.php b/lib/internal/Magento/Framework/Mview/View/SubscriptionStatementPostprocessorInterface.php new file mode 100644 index 0000000000000..288eb16f0222d --- /dev/null +++ b/lib/internal/Magento/Framework/Mview/View/SubscriptionStatementPostprocessorInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Mview\View; + +interface SubscriptionStatementPostprocessorInterface +{ + /** + * Postprocess subscription statement. + * + * @param string $tableName + * @param string $event + * @param string $statement + * @return string + */ + public function process(string $tableName, string $event, string $statement): string; +} From 8812b701a49c8d4f0918fd84b38634f15ea4756a Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 14 Feb 2023 15:53:45 -0600 Subject: [PATCH 915/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../Model/Cache/Tag/Strategy/Currency.php | 34 ++++++++++++++ .../Cache/Tag/Strategy/CurrencyConfig.php | 47 +++++++++++++++++++ .../Model/Resolver/Currency/Identity.php | 23 +++++++++ .../DirectoryGraphQl/Plugin/Currency.php | 45 ++++++++++++++++++ app/code/Magento/DirectoryGraphQl/etc/di.xml | 20 ++++++++ .../DirectoryGraphQl/etc/schema.graphqls | 2 +- 6 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php create mode 100644 app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php create mode 100644 app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php create mode 100644 app/code/Magento/DirectoryGraphQl/Plugin/Currency.php create mode 100644 app/code/Magento/DirectoryGraphQl/etc/di.xml diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php new file mode 100644 index 0000000000000..2040e8327042f --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; + +use Magento\Directory\Model\Currency as CurrencyModel; +use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; +use Magento\Framework\App\Cache\Tag\StrategyInterface; + +/** + * Produce cache tags for currency object. + */ +class Currency implements StrategyInterface +{ + /** + * @inheritdoc + */ + public function getTags($object): array + { + if (!is_object($object)) { + throw new \InvalidArgumentException('Provided argument is not an object'); + } + + if ($object instanceof CurrencyModel) { + return [Identity::CACHE_TAG]; + } + + return []; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php new file mode 100644 index 0000000000000..12ea8f5b163b9 --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php @@ -0,0 +1,47 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; + +use Magento\CurrencySymbol\Model\System\Currencysymbol; +use Magento\Directory\Model\Currency; +use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; +use Magento\Framework\App\Cache\Tag\StrategyInterface; +use Magento\Framework\App\Config\ValueInterface; + +/** + * Produce cache tags for currency config. + */ +class CurrencyConfig implements StrategyInterface +{ + private $currencyConfigPaths = [ + Currency::XML_PATH_CURRENCY_BASE, + Currency::XML_PATH_CURRENCY_DEFAULT, + Currency::XML_PATH_CURRENCY_ALLOW, + Currencysymbol::XML_PATH_CUSTOM_CURRENCY_SYMBOL + ]; + + /** + * @inheritdoc + */ + public function getTags($object): array + { + if (!is_object($object)) { + throw new \InvalidArgumentException('Provided argument is not an object'); + } + + if ( + $object instanceof ValueInterface + && in_array($object->getPath(), $this->currencyConfigPaths) + && $object->isValueChanged() + ) { + return [Identity::CACHE_TAG]; + } + + return []; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php new file mode 100644 index 0000000000000..5b57069f6e793 --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Model\Resolver\Currency; + +use Magento\Framework\GraphQl\Query\Resolver\IdentityInterface; + +class Identity implements IdentityInterface +{ + /** + * @var string + */ + public const CACHE_TAG = 'gql_currency'; + + public function getIdentities(array $resolvedData): array + { + return [self::CACHE_TAG]; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php new file mode 100644 index 0000000000000..9fb3338c7454d --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php @@ -0,0 +1,45 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Plugin; + +use Magento\Framework\Event\ManagerInterface; +use Magento\Directory\Model\Currency as CurrencyModel; + +/** + * Currency plugin + */ +class Currency +{ + /** + * Application Event Dispatcher + * + * @var ManagerInterface + */ + private $eventManager; + + /** + * @param ManagerInterface $eventManager + */ + public function __construct(ManagerInterface $eventManager) + { + $this->eventManager = $eventManager; + } + + /** + * Add graphql store config tag to the store group cache identities. + * + * @param CurrencyModel $subject + * @param CurrencyModel $result + * @return CurrencyModel + */ + public function afterSaveRates(CurrencyModel $subject, CurrencyModel $result): CurrencyModel + { + $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $this]); + return $result; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml new file mode 100644 index 0000000000000..2f4c667f6993c --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> + <arguments> + <argument name="customStrategies" xsi:type="array"> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object">\Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CurrencyConfig</item> + <item name="Magento\Directory\Model\Currency" xsi:type="object">\Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Currency</item> + </argument> + </arguments> + </type> + <type name="Magento\Directory\Model\Currency"> + <plugin name="afterSaveRate" type="Magento\DirectoryGraphQl\Plugin\Currency" /> + </type> +</config> diff --git a/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls b/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls index ed16732f3dcc5..7b7f1b6eb47ac 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls +++ b/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls @@ -2,7 +2,7 @@ # See COPYING.txt for license details. type Query { - currency: Currency @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Currency") @doc(description: "Return information about the store's currency.") @cache(cacheable: false) + currency: Currency @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Currency") @doc(description: "Return information about the store's currency.") @cache(cacheIdentity: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Currency\\Identity") countries: [Country] @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Countries") @doc(description: "The countries query provides information for all countries.") @cache(cacheable: false) country (id: String): Country @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country") @doc(description: "The countries query provides information for a single country.") @cache(cacheable: false) } From 4f93f7b23bd20a98b721c5ba036234620648601d Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Tue, 14 Feb 2023 17:11:44 -0600 Subject: [PATCH 916/985] ACP2E-1458: Product is not visible on the Storefront after a staging update enabling it is applied --- .../Mview/Test/Unit/View/SubscriptionTest.php | 13 +++++++++++-- .../Magento/Framework/Mview/View/Subscription.php | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Mview/Test/Unit/View/SubscriptionTest.php b/lib/internal/Magento/Framework/Mview/Test/Unit/View/SubscriptionTest.php index f3ed80330e021..ed5bde9840117 100644 --- a/lib/internal/Magento/Framework/Mview/Test/Unit/View/SubscriptionTest.php +++ b/lib/internal/Magento/Framework/Mview/Test/Unit/View/SubscriptionTest.php @@ -18,6 +18,7 @@ use Magento\Framework\Mview\View\CollectionInterface; use Magento\Framework\Mview\View\StateInterface; use Magento\Framework\Mview\View\Subscription; +use Magento\Framework\Mview\View\SubscriptionStatementPostprocessorInterface; use Magento\Framework\Mview\ViewInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -127,6 +128,9 @@ protected function setUp(): void ] ] ]); + $statementPostprocessorMock = $this->createMock(SubscriptionStatementPostprocessorInterface::class); + $statementPostprocessorMock->method('process') + ->willReturnArgument(2); $this->model = new Subscription( $this->resourceMock, $this->triggerFactoryMock, @@ -136,7 +140,8 @@ protected function setUp(): void 'columnName', [], [], - $mviewConfigMock + $mviewConfigMock, + $statementPostprocessorMock ); } @@ -417,6 +422,9 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void ] ] ]); + $statementPostprocessorMock = $this->createMock(SubscriptionStatementPostprocessorInterface::class); + $statementPostprocessorMock->method('process') + ->willReturnArgument(2); $this->connectionMock->expects($this->any()) ->method('isTableExists') @@ -464,7 +472,8 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void 'columnName', [], $ignoredData, - $mviewConfigMock + $mviewConfigMock, + $statementPostprocessorMock ); $method = new ReflectionMethod($model, 'buildStatement'); diff --git a/lib/internal/Magento/Framework/Mview/View/Subscription.php b/lib/internal/Magento/Framework/Mview/View/Subscription.php index 68c72c3e76fda..4c96495aba767 100644 --- a/lib/internal/Magento/Framework/Mview/View/Subscription.php +++ b/lib/internal/Magento/Framework/Mview/View/Subscription.php @@ -108,6 +108,7 @@ class Subscription implements SubscriptionInterface, SubscriptionTriggersInterfa * @param array $ignoredUpdateColumnsBySubscription * @param Config|null $mviewConfig * @param SubscriptionStatementPostprocessorInterface|null $statementPostprocessor + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( ResourceConnection $resource, From 5a512541edfeeb3c37e334f6e747f3d452e38bf0 Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Wed, 15 Feb 2023 12:20:29 +0530 Subject: [PATCH 917/985] 36422: Only Update Indexer Mode When Required --- .../Adminhtml/Indexer/MassChangelog.php | 17 ++++++++++++++--- .../Adminhtml/Indexer/MassOnTheFly.php | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php index 8909fa999528a..84f651766195c 100644 --- a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php +++ b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php @@ -24,16 +24,27 @@ public function execute() if (!is_array($indexerIds)) { $this->messageManager->addErrorMessage(__('Please select indexers.')); } else { + $updatedIndexersCount = 0; + try { foreach ($indexerIds as $indexerId) { /** @var \Magento\Framework\Indexer\IndexerInterface $model */ $model = $this->_objectManager->get( \Magento\Framework\Indexer\IndexerRegistry::class )->get($indexerId); - $model->setScheduled(true); + + if (!$model->isScheduled()) { + $model->setScheduled(true); + $updatedIndexersCount++; + } } - $this->messageManager->addSuccess( - __('%1 indexer(s) are in "Update by Schedule" mode.', count($indexerIds)) + + $this->messageManager->addSuccessMessage( + __( + '%1 indexer(s) have been updated to "Update by Schedule" mode. %2 skipped because there was nothing to change.', + $updatedIndexersCount, + count($indexerIds) - $updatedIndexersCount + ) ); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addErrorMessage($e->getMessage()); diff --git a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php index f8c3c58f5413b..ae90924faf05c 100644 --- a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php +++ b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php @@ -24,16 +24,27 @@ public function execute() if (!is_array($indexerIds)) { $this->messageManager->addErrorMessage(__('Please select indexers.')); } else { + $updatedIndexersCount = 0; + try { foreach ($indexerIds as $indexerId) { /** @var \Magento\Framework\Indexer\IndexerInterface $model */ $model = $this->_objectManager->get( \Magento\Framework\Indexer\IndexerRegistry::class )->get($indexerId); - $model->setScheduled(false); + + if ($model->isScheduled()) { + $model->setScheduled(false); + $updatedIndexersCount++; + } } - $this->messageManager->addSuccess( - __('%1 indexer(s) are in "Update on Save" mode.', count($indexerIds)) + + $this->messageManager->addSuccessMessage( + __( + '%1 indexer(s) have been updated to "Update on Save" mode. %2 skipped because there was nothing to change.', + $updatedIndexersCount, + count($indexerIds) - $updatedIndexersCount + ) ); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addErrorMessage($e->getMessage()); From 83fc1db36a6a6d7381cf2cec6ffb2061b297fd56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 11:30:35 +0000 Subject: [PATCH 918/985] Bump symfony/http-kernel from 5.4.10 to 6.0.20 Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 5.4.10 to 6.0.20. - [Release notes](https://github.com/symfony/http-kernel/releases) - [Changelog](https://github.com/symfony/http-kernel/blob/6.2/CHANGELOG.md) - [Commits](https://github.com/symfony/http-kernel/compare/v5.4.10...v6.0.20) --- updated-dependencies: - dependency-name: symfony/http-kernel dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 214 +++++++++++++++++++++++++------------------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/composer.lock b/composer.lock index 9f0fe11b93c5f..f0cd4e630a62d 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": "f91ab9524a6e074f7d04ce6f536d6f6e", + "content-hash": "b8146107f5215900d0c6a26fb71a630a", "packages": [ { "name": "aws/aws-crt-php", @@ -6749,27 +6749,27 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.9", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c116cda1f51c678782768dce89a45f13c949455d" + "reference": "0092696af0be8e6124b042fbe2890ca1788d7b28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c116cda1f51c678782768dce89a45f13c949455d", - "reference": "c116cda1f51c678782768dce89a45f13c949455d", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/0092696af0be8e6124b042fbe2890ca1788d7b28", + "reference": "0092696af0be8e6124b042fbe2890ca1788d7b28", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -6800,7 +6800,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.9" + "source": "https://github.com/symfony/error-handler/tree/v6.2.5" }, "funding": [ { @@ -6816,20 +6816,20 @@ "type": "tidelift" } ], - "time": "2022-05-21T13:57:48+00:00" + "time": "2023-01-01T08:38:09+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.9", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" + "reference": "abf49cc084c087d94b4cb939c3f3672971784e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abf49cc084c087d94b4cb939c3f3672971784e0c", + "reference": "abf49cc084c087d94b4cb939c3f3672971784e0c", "shasum": "" }, "require": { @@ -6885,7 +6885,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.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.19" }, "funding": [ { @@ -6901,20 +6901,20 @@ "type": "tidelift" } ], - "time": "2022-05-05T16:45:39+00:00" + "time": "2023-01-01T08:32:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", "shasum": "" }, "require": { @@ -6927,7 +6927,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -6964,7 +6964,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" }, "funding": [ { @@ -6980,7 +6980,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/filesystem", @@ -7111,16 +7111,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.10", + "version": "v5.4.20", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0435363362a47c14e9cf50663cb8ffbf491875a", + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a", "shasum": "" }, "require": { @@ -7132,8 +7132,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -7164,7 +7167,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.10" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.20" }, "funding": [ { @@ -7180,67 +7183,64 @@ "type": "tidelift" } ], - "time": "2022-06-19T13:13:40+00:00" + "time": "2023-01-29T11:11:52+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.10", + "version": "v6.0.20", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948" + "reference": "6dc70833fd0ef5e861e17c7854c12d7d86679349" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/255ae3b0a488d78fbb34da23d3e0c059874b5948", - "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6dc70833fd0ef5e861e17c7854c12d7d86679349", + "reference": "6dc70833fd0ef5e861e17c7854c12d7d86679349", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "psr/log": "^1|^2|^3", + "symfony/error-handler": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", + "symfony/cache": "<5.4", + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", "twig/twig": "^2.13|^3.0.4" }, @@ -7276,7 +7276,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.10" + "source": "https://github.com/symfony/http-kernel/tree/v6.0.20" }, "funding": [ { @@ -7292,7 +7292,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:57:59+00:00" + "time": "2023-02-01T08:22:55+00:00" }, { "name": "symfony/intl", @@ -7547,16 +7547,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -7570,7 +7570,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7614,7 +7614,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -7630,7 +7630,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -7801,16 +7801,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -7819,7 +7819,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -7857,7 +7857,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -7873,7 +7873,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", @@ -8349,32 +8349,31 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.9", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "af52239a330fafd192c773795520dc2dd62b5657" + "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/af52239a330fafd192c773795520dc2dd62b5657", - "reference": "af52239a330fafd192c773795520dc2dd62b5657", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/44b7b81749fd20c1bdf4946c041050e22bc8da27", + "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27", "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": { "phpunit/phpunit": "<5.4.3", - "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/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -8418,7 +8417,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.9" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.5" }, "funding": [ { @@ -8434,7 +8433,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T10:24:18+00:00" + "time": "2023-01-20T17:45:48+00:00" }, { "name": "tedivm/jshrink", @@ -13368,16 +13367,16 @@ }, { "name": "symfony/mime", - "version": "v5.4.10", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc" + "reference": "a858429a9c704edc53fe057228cf9ca282ba48eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/02265e1e5111c3cd7480387af25e82378b7ab9cc", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc", + "url": "https://api.github.com/repos/symfony/mime/zipball/a858429a9c704edc53fe057228cf9ca282ba48eb", + "reference": "a858429a9c704edc53fe057228cf9ca282ba48eb", "shasum": "" }, "require": { @@ -13391,15 +13390,16 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<4.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", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "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.2|^6.0" + "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" }, "type": "library", "autoload": { @@ -13431,7 +13431,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.10" + "source": "https://github.com/symfony/mime/tree/v5.4.19" }, "funding": [ { @@ -13447,7 +13447,7 @@ "type": "tidelift" } ], - "time": "2022-06-09T12:22:40+00:00" + "time": "2023-01-09T05:43:46+00:00" }, { "name": "symfony/options-resolver", @@ -13915,5 +13915,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From b14d01a19e61116ffb0f57550ba7746c418a20fd Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Wed, 15 Feb 2023 19:24:28 +0530 Subject: [PATCH 919/985] AC-7943:Cancel Button is not working on the Admin Panel --- .../Sales/view/adminhtml/web/order/view/post-wrapper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/view/post-wrapper.js b/app/code/Magento/Sales/view/adminhtml/web/order/view/post-wrapper.js index a1155dd436d49..07ba2ad319487 100644 --- a/app/code/Magento/Sales/view/adminhtml/web/order/view/post-wrapper.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/view/post-wrapper.js @@ -25,7 +25,7 @@ define([ })); } - $('#order-view-cancel-button').on('click', function () { + $(document).on('click', '#order-view-cancel-button', function () { var msg = $.mage.__('Are you sure you want to cancel this order?'), url = $('#order-view-cancel-button').data('url'); @@ -45,13 +45,13 @@ define([ return false; }); - $('#order-view-hold-button').on('click', function () { + $(document).on('click', '#order-view-hold-button', function () { var url = $('#order-view-hold-button').data('url'); getForm(url).appendTo('body').trigger('submit'); }); - $('#order-view-unhold-button').on('click', function () { + $(document).on('click', '#order-view-unhold-button', function () { var url = $('#order-view-unhold-button').data('url'); getForm(url).appendTo('body').trigger('submit'); From 7bfe22b4186878ed101820698ced2ec3183637dc Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 15 Feb 2023 09:05:42 -0600 Subject: [PATCH 920/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Model/Resolver/Store/ConfigIdentity.php | 10 ++++------ .../Magento/GraphQl/Store/StoreConfigCacheTest.php | 2 +- ...iple_websites_with_store_groups_stores_rollback.php | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php index b678cf3ab4999..cee8556cdb208 100644 --- a/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php +++ b/app/code/Magento/StoreGraphQl/Model/Resolver/Store/ConfigIdentity.php @@ -21,11 +21,9 @@ class ConfigIdentity implements IdentityInterface */ public function getIdentities(array $resolvedData): array { - $data["id"] = empty($resolvedData) ? [] : $resolvedData["id"]; - $ids = empty($resolvedData) ? - [] : array_merge([self::CACHE_TAG], array_map(function ($key) { - return sprintf('%s_%s', self::CACHE_TAG, $key); - }, $data)); - return $ids; + if (!isset($resolvedData['id'])) { + return []; + } + return [self::CACHE_TAG, sprintf('%s_%s', self::CACHE_TAG, $resolvedData['id'])]; } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php index e3122fa6c3133..feafaa4f7a059 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Store/StoreConfigCacheTest.php @@ -218,7 +218,7 @@ public function testCachePurgedWithStoreScopeConfigChange(): void // Query default store config after second store config is changed // Verify we obtain a cache HIT at the 2nd time, the cache is not purged - $defaultStoreResponseHit= $this->assertCacheHitAndReturnResponse( + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( $query, [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] ); diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php index f18253321bdca..6b9e234c63a96 100644 --- a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php @@ -16,6 +16,8 @@ if ($websiteId) { $website->delete(); } + +/** Delete the third website **/ $website2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Website::class); /** @var $website \Magento\Store\Model\Website */ $websiteId2 = $website2->load('third', 'code')->getId(); @@ -30,6 +32,8 @@ if ($groupId) { $group->delete(); } + +/** Delete the third store groups **/ $group2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); /** @var $group2 \Magento\Store\Model\Group */ $groupId2 = $group2->load('third_store', 'code')->getId(); @@ -37,11 +41,13 @@ $group2->delete(); } +/** Delete the second store **/ $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store->load('second_store_view', 'code')->getId()) { $store->delete(); } +/** Delete the third store **/ $store2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store2->load('third_store_view', 'code')->getId()) { $store2->delete(); From 9a2bb63aeca3a7e3921c5bb152d42699ab5a2e8c Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 15 Feb 2023 08:09:07 -0600 Subject: [PATCH 921/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../Model/Cache/Tag/Strategy/CurrencyConfig.php | 16 ++++++++-------- .../Model/Resolver/Currency/Identity.php | 4 ++++ .../Magento/DirectoryGraphQl/Plugin/Currency.php | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php index 12ea8f5b163b9..875de71f8c3fe 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php @@ -7,8 +7,6 @@ namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; -use Magento\CurrencySymbol\Model\System\Currencysymbol; -use Magento\Directory\Model\Currency; use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; @@ -18,11 +16,14 @@ */ class CurrencyConfig implements StrategyInterface { + /** + * @var string[] + */ private $currencyConfigPaths = [ - Currency::XML_PATH_CURRENCY_BASE, - Currency::XML_PATH_CURRENCY_DEFAULT, - Currency::XML_PATH_CURRENCY_ALLOW, - Currencysymbol::XML_PATH_CUSTOM_CURRENCY_SYMBOL + 'currency/options/base', + 'currency/options/default', + 'currency/options/allow', + 'currency/options/customsymbol' ]; /** @@ -34,8 +35,7 @@ public function getTags($object): array throw new \InvalidArgumentException('Provided argument is not an object'); } - if ( - $object instanceof ValueInterface + if ($object instanceof ValueInterface && in_array($object->getPath(), $this->currencyConfigPaths) && $object->isValueChanged() ) { diff --git a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php index 5b57069f6e793..858c264fa6d78 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php @@ -16,6 +16,10 @@ class Identity implements IdentityInterface */ public const CACHE_TAG = 'gql_currency'; + /** + * @inheritdoc + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function getIdentities(array $resolvedData): array { return [self::CACHE_TAG]; diff --git a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php index 9fb3338c7454d..a30a76d48d93b 100644 --- a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php +++ b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php @@ -36,6 +36,7 @@ public function __construct(ManagerInterface $eventManager) * @param CurrencyModel $subject * @param CurrencyModel $result * @return CurrencyModel + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterSaveRates(CurrencyModel $subject, CurrencyModel $result): CurrencyModel { From 03ebf081514e2ccbbf6cb27f18460b86b646b57b Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Wed, 15 Feb 2023 14:01:59 -0600 Subject: [PATCH 922/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Model/Indexer/IndexerBuilderTest.php | 52 ++++++++++++++++++- .../_files/set_indexer_to_scheduled_mode.php | 13 +++++ ...set_indexer_to_scheduled_mode_rollback.php | 12 +++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php create mode 100644 dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php index 1a3696c02ac52..8e7c034a77a6f 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php @@ -7,11 +7,15 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Indexer\Product\Price\Processor; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; +use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; use Magento\Framework\App\ResourceConnection; +use Magento\Framework\App\Area; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DbIsolation; +use Magento\TestFramework\Fixture\AppArea; use Magento\TestFramework\Helper\Bootstrap; #[ @@ -65,6 +69,16 @@ class IndexerBuilderTest extends \PHPUnit\Framework\TestCase */ private $indexProductProcessor; + /** + * @var RuleProductProcessor + */ + private $ruleProductProcessor; + + /** + * @var CollectionFactory + */ + private $productCollectionFactory; + protected function setUp(): void { $this->indexerBuilder = Bootstrap::getObjectManager()->get( @@ -76,6 +90,8 @@ protected function setUp(): void $this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class); $this->connection = Bootstrap::getObjectManager()->get(ResourceConnection::class); $this->indexProductProcessor = Bootstrap::getObjectManager()->get(Processor::class); + $this->ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); + $this->productCollectionFactory = Bootstrap::getObjectManager()->get(CollectionFactory::class); } protected function tearDown(): void @@ -251,7 +267,7 @@ private function getTriggersCount(string $tableName): int { return count( $this->connection->getConnection() - ->query('SHOW TRIGGERS LIKE \''. $tableName . '\'') + ->query('SHOW TRIGGERS LIKE \'' . $tableName . '\'') ->fetchAll() ); } @@ -271,4 +287,38 @@ protected function prepareProducts() ->setData('test_attribute', 'NO_test_attribute_value') ->save(); } + + #[ + AppArea(Area::AREA_FRONTEND), + DataFixture('Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php'), + DataFixture('Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php'), + ] + public function testReindexOfDependentIndexer(): void + { + $productId = $this->productRepository->get('simple')->getId(); + + $productCollection = $this->productCollectionFactory->create(); + $productCollection->addIdFilter($productId); + //$productCollection->addPriceData(); + $productCollection->load(); + echo (string)$productCollection->getSelect(); + $product = $productCollection->getFirstItem(); + echo "\n\n" . $product->getId() . '='; + //$product = $productCollection->getItemByColumnValue('sku', 'simple'); + //$product = $this->productRepository->get('simple'); + //print_r($product->getPriceInfo()); + echo $product->getFinalPrice(); + echo ' * '; + $product->setPrice(500); + $this->productRepository->save($product); + $product = $this->productRepository->get('simple'); + echo $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue(); + $product->setPrice(50); + $this->productRepository->save($product); + + $this->indexProductProcessor->getIndexer()->setScheduled(false); + $this->ruleProductProcessor->getIndexer()->setScheduled(false); + + $this->indexerBuilder->reindexFull(); + } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php new file mode 100644 index 0000000000000..a7a254797a84a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; + +$ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); +$indexer = $ruleProductProcessor->getIndexer(); +$indexer->reindexAll(); +$indexer->setScheduled(true); diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php new file mode 100644 index 0000000000000..6b70e9e1999ca --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php @@ -0,0 +1,12 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; + +$ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); +$indexer = $ruleProductProcessor->getIndexer(); +$indexer->setScheduled(false); From 047e50901b62806ad73c977285a8eab536223b30 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 15 Feb 2023 16:10:09 -0600 Subject: [PATCH 923/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../Cache/Tag/Strategy/CurrencyConfig.php | 30 +++++++++++- .../Model/Resolver/Currency/Identity.php | 17 ++++++- .../DirectoryGraphQl/Plugin/Currency.php | 2 +- .../GraphQl/Directory/CurrencyTest.php | 49 +++++++++++++++---- 4 files changed, 86 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php index 875de71f8c3fe..e15ea0384f62a 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php @@ -10,6 +10,8 @@ use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; /** * Produce cache tags for currency config. @@ -26,6 +28,20 @@ class CurrencyConfig implements StrategyInterface 'currency/options/customsymbol' ]; + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct( + StoreManagerInterface $storeManager + ) { + $this->storeManager = $storeManager; + } + /** * @inheritdoc */ @@ -39,7 +55,19 @@ public function getTags($object): array && in_array($object->getPath(), $this->currencyConfigPaths) && $object->isValueChanged() ) { - return [Identity::CACHE_TAG]; + if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($object->getScopeId()); + $storeIds = $website->getStoreIds(); + } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$object->getScopeId()]; + } else { + $storeIds = array_keys($this->storeManager->getStores()); + } + $ids = []; + foreach ($storeIds as $storeId) { + $ids[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); + } + return $ids; } return []; diff --git a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php index 858c264fa6d78..a07ae587cef38 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php @@ -8,6 +8,7 @@ namespace Magento\DirectoryGraphQl\Model\Resolver\Currency; use Magento\Framework\GraphQl\Query\Resolver\IdentityInterface; +use Magento\Store\Model\StoreManagerInterface; class Identity implements IdentityInterface { @@ -16,12 +17,26 @@ class Identity implements IdentityInterface */ public const CACHE_TAG = 'gql_currency'; + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct(StoreManagerInterface $storeManager) + { + $this->storeManager = $storeManager; + } + /** * @inheritdoc * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdentities(array $resolvedData): array { - return [self::CACHE_TAG]; + $storeId = $this->storeManager->getStore()->getId(); + return [self::CACHE_TAG, sprintf('%s_%s', self::CACHE_TAG, $storeId)]; } } diff --git a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php index a30a76d48d93b..07dcc2737fbb9 100644 --- a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php +++ b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php @@ -40,7 +40,7 @@ public function __construct(ManagerInterface $eventManager) */ public function afterSaveRates(CurrencyModel $subject, CurrencyModel $result): CurrencyModel { - $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $this]); + $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $result]); return $result; } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php index ad5d71cb08605..ab9d83acf051f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php @@ -14,7 +14,46 @@ */ class CurrencyTest extends GraphQlAbstract { + /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture test_store currency/options/base USD + * @magentoConfigFixture test_store currency/options/default CNY + * @magentoConfigFixture test_store currency/options/allow CNY,USD + * @magentoDataFixture Magento/Directory/_files/usd_cny_rate.php + */ public function testGetCurrency() + { + $result = $this->graphQlQuery($this->getQuery()); + $this->assertArrayHasKey('currency', $result); + $this->assertEquals('USD', $result['currency']['base_currency_code']); + $this->assertEquals('USD', $result['currency']['default_display_currency_code']); + $this->assertEquals(['USD'], $result['currency']['available_currency_codes']); + $this->assertEquals('USD', $result['currency']['exchange_rates'][0]['currency_to']); + $this->assertEquals(1, $result['currency']['exchange_rates'][0]['rate']); + + $result = $this->graphQlQuery( + $this->getQuery(), + [], + '', + ['Store' => 'test'] + ); + $this->assertArrayHasKey('currency', $result); + $this->assertEquals('USD', $result['currency']['base_currency_code']); + $this->assertEquals('CNY', $result['currency']['default_display_currency_code']); + $this->assertEquals(['CNY','USD'], $result['currency']['available_currency_codes']); + } + + /** + * Get query + * + * @return string + */ + private function getQuery(): string { $query = <<<QUERY query { @@ -31,14 +70,6 @@ public function testGetCurrency() } } QUERY; - - $result = $this->graphQlQuery($query); - $this->assertArrayHasKey('currency', $result); - $this->assertArrayHasKey('base_currency_code', $result['currency']); - $this->assertArrayHasKey('base_currency_symbol', $result['currency']); - $this->assertArrayHasKey('default_display_currency_code', $result['currency']); - $this->assertArrayHasKey('default_display_currency_symbol', $result['currency']); - $this->assertArrayHasKey('available_currency_codes', $result['currency']); - $this->assertArrayHasKey('exchange_rates', $result['currency']); + return $query; } } From 60a75646bea0b91728ab917ddf94c7bd4870ef1b Mon Sep 17 00:00:00 2001 From: Faizan Shaikh <glo88465@adobe.com> Date: Thu, 16 Feb 2023 12:27:02 +0530 Subject: [PATCH 924/985] AC-7966-Need to update beta dependencies in composer.lock file with stable versions --- composer.json | 4 ++-- composer.lock | 36 +++++++++++++++++------------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 6de5c9d7f07f8..dcfaccf444125 100644 --- a/composer.json +++ b/composer.json @@ -68,9 +68,9 @@ "laminas/laminas-validator": "^2.23", "league/flysystem": "^2.4", "league/flysystem-aws-s3-v3": "^2.4", - "magento/composer": "^1.9.0-beta2", + "magento/composer": "^1.9.0", "magento/composer-dependency-version-audit-plugin": "^0.1", - "magento/magento-composer-installer": ">=0.4.0-beta1", + "magento/magento-composer-installer": ">=0.4.0", "magento/zend-cache": "^1.16", "magento/zend-db": "^1.16", "magento/zend-pdf": "^1.16", diff --git a/composer.lock b/composer.lock index f0880e4e6486e..68e4c11cea584 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": "6bf50057f1bf211775a7988d00b59f76", + "content-hash": "e311d5a0ac66042f5d4c839f64996e87", "packages": [ { "name": "aws/aws-crt-php", @@ -4422,16 +4422,16 @@ }, { "name": "magento/composer", - "version": "1.9.0-beta2", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/magento/composer.git", - "reference": "660389b85207e20d25710d5d4c96421a7261fde3" + "reference": "71274ccec4abc54c42c5fc8f59d91401defbc99c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/composer/zipball/660389b85207e20d25710d5d4c96421a7261fde3", - "reference": "660389b85207e20d25710d5d4c96421a7261fde3", + "url": "https://api.github.com/repos/magento/composer/zipball/71274ccec4abc54c42c5fc8f59d91401defbc99c", + "reference": "71274ccec4abc54c42c5fc8f59d91401defbc99c", "shasum": "" }, "require": { @@ -4456,9 +4456,9 @@ "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "support": { "issues": "https://github.com/magento/composer/issues", - "source": "https://github.com/magento/composer/tree/1.9.0-beta2" + "source": "https://github.com/magento/composer/tree/1.9.0" }, - "time": "2023-01-04T19:41:18+00:00" + "time": "2023-02-15T20:41:53+00:00" }, { "name": "magento/composer-dependency-version-audit-plugin", @@ -4504,21 +4504,22 @@ }, { "name": "magento/magento-composer-installer", - "version": "0.4.0-beta1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/magento/magento-composer-installer.git", - "reference": "dc7065e47acec3338f282ea679d9ee815cd807ac" + "reference": "85496104b065f5a7b8d824f37017c53dbbb93a44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/dc7065e47acec3338f282ea679d9ee815cd807ac", - "reference": "dc7065e47acec3338f282ea679d9ee815cd807ac", + "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/85496104b065f5a7b8d824f37017c53dbbb93a44", + "reference": "85496104b065f5a7b8d824f37017c53dbbb93a44", "shasum": "" }, "require": { "composer-plugin-api": "^1.1 || ^2.0", - "composer/composer": "^1.9 || ^2.0" + "composer/composer": "^1.9 || ^2.0", + "laminas/laminas-stdlib": "^3.11.0" }, "replace": { "magento-hackathon/magento-composer-installer": "*" @@ -4578,9 +4579,9 @@ "magento" ], "support": { - "source": "https://github.com/magento/magento-composer-installer/tree/0.4.0-beta1" + "source": "https://github.com/magento/magento-composer-installer/tree/0.4.0" }, - "time": "2022-06-27T21:45:22+00:00" + "time": "2022-12-01T15:21:32+00:00" }, { "name": "magento/zend-cache", @@ -13925,10 +13926,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "magento/composer": 10, - "magento/magento-composer-installer": 10 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -13952,5 +13950,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From 0724c0c780299c7a3c932109df72c8e4e7efcd53 Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Thu, 16 Feb 2023 18:30:17 +0530 Subject: [PATCH 925/985] Fixed failed test --- .../Indexer/Controller/Adminhtml/Indexer/MassChangelog.php | 3 ++- .../Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php | 3 ++- .../AdminSwitchAllIndexerToActionModeActionGroup.xml | 4 +++- .../ActionGroup/AdminSwitchIndexerToActionModeActionGroup.xml | 2 +- .../Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php index 84f651766195c..eedd7797c01f8 100644 --- a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php +++ b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassChangelog.php @@ -41,7 +41,8 @@ public function execute() $this->messageManager->addSuccessMessage( __( - '%1 indexer(s) have been updated to "Update by Schedule" mode. %2 skipped because there was nothing to change.', + '%1 indexer(s) have been updated to "Update by Schedule" mode. + %2 skipped because there was nothing to change.', $updatedIndexersCount, count($indexerIds) - $updatedIndexersCount ) diff --git a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php index ae90924faf05c..19b62817df8a0 100644 --- a/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php +++ b/app/code/Magento/Indexer/Controller/Adminhtml/Indexer/MassOnTheFly.php @@ -41,7 +41,8 @@ public function execute() $this->messageManager->addSuccessMessage( __( - '%1 indexer(s) have been updated to "Update on Save" mode. %2 skipped because there was nothing to change.', + '%1 indexer(s) have been updated to "Update on Save" mode. + %2 skipped because there was nothing to change.', $updatedIndexersCount, count($indexerIds) - $updatedIndexersCount ) diff --git a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchAllIndexerToActionModeActionGroup.xml b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchAllIndexerToActionModeActionGroup.xml index a8aa089a389e6..6ed57a1be98b4 100644 --- a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchAllIndexerToActionModeActionGroup.xml +++ b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchAllIndexerToActionModeActionGroup.xml @@ -11,13 +11,15 @@ <actionGroup name="AdminSwitchAllIndexerToActionModeActionGroup"> <arguments> <argument name="action" type="string" defaultValue="Update by Schedule"/> + <!-- <argument name="count" type="string" defaultValue="10"/> --> </arguments> <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="onIndexManagement"/> <waitForPageLoad stepKey="waitForManagementPage"/> <selectOption userInput="selectAll" selector="{{AdminIndexManagementSection.selectMassAction}}" stepKey="checkIndexer"/> <selectOption userInput="{{action}}" selector="{{AdminIndexManagementSection.massActionSelect}}" stepKey="selectAction"/> + <grabValueFrom selector="{{AdminIndexManagementSection.massIndexSelectionCount}}" stepKey="selectCount"/> <click selector="{{AdminIndexManagementSection.massActionSubmit}}" stepKey="clickSubmit"/> <waitForPageLoad stepKey="waitForSubmit"/> - <see userInput="indexer(s) are in "{{action}}" mode." stepKey="seeMessage"/> + <see userInput="{$selectCount} indexer(s) have been updated to "{{action}}" mode. 0 skipped because there was nothing to change." stepKey="seeMessage"/> </actionGroup> </actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchIndexerToActionModeActionGroup.xml b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchIndexerToActionModeActionGroup.xml index 7b77af08614cf..b5fc423bbb747 100644 --- a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchIndexerToActionModeActionGroup.xml +++ b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/AdminSwitchIndexerToActionModeActionGroup.xml @@ -17,6 +17,6 @@ <selectOption userInput="{{action}}" selector="{{AdminIndexManagementSection.massActionSelect}}" stepKey="selectAction"/> <click selector="{{AdminIndexManagementSection.massActionSubmit}}" stepKey="clickSubmit"/> <waitForPageLoad stepKey="waitForSubmit"/> - <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="1 indexer(s) are in "{{action}}" mode." stepKey="seeMessage"/> + <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="1 indexer(s) have been updated to "{{action}}" mode. 0 skipped because there was nothing to change." stepKey="seeMessage"/> </actionGroup> </actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml b/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml index 825358e74f2af..c4593f269c184 100644 --- a/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml +++ b/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml @@ -19,5 +19,6 @@ <element name="selectMassAction" type="select" selector="#gridIndexer_massaction-mass-select"/> <element name="columnScheduleStatus" type="text" selector="//th[contains(@class, 'col-indexer_schedule_status')]"/> <element name="indexerScheduleStatus" type="text" selector="//tr[contains(.,'{{var1}}')]//td[contains(@class,'col-indexer_schedule_status')]" parameterized="true"/> + <element name="massIndexSelectionCount" type="text" selector="#gridIndexer-total-count"/> </section> </sections> From 40ca1d4606d77f2106ad6e205215ec84312f8b3f Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 16 Feb 2023 08:57:30 -0600 Subject: [PATCH 926/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../TestFramework/TestCase/GraphQlAbstract.php | 14 ++++++++++++++ .../Magento/GraphQl/Directory/CurrencyTest.php | 3 +++ 2 files changed, 17 insertions(+) diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php index c86f0a2c773db..ae7bc04f4fb2d 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php @@ -206,4 +206,18 @@ protected function assertResponseFields($actualResponse, $assertionMap) ); } } + + /** + * Tear down test and flush page cache + * + * @return void + */ + protected function tearDown(): void + { + parent::tearDown(); + $appDir = dirname(Bootstrap::getInstance()->getAppTempDir()); + $out = ''; + // phpcs:ignore Magento2.Security.InsecureFunction + exec("php -f {$appDir}/bin/magento cache:flush full_page", $out); + } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php index ab9d83acf051f..9341c0205b2c9 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php @@ -21,6 +21,9 @@ class CurrencyTest extends GraphQlAbstract * test - base - main_website_store * * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/currency/options/base USD + * @magentoConfigFixture default/currency/options/default USD + * @magentoConfigFixture default/currency/options/allow USD * @magentoConfigFixture test_store currency/options/base USD * @magentoConfigFixture test_store currency/options/default CNY * @magentoConfigFixture test_store currency/options/allow CNY,USD From c8fb91020625556248b522980c030162f66734e1 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 16 Feb 2023 10:37:25 -0600 Subject: [PATCH 927/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../IndexerBuilderInScheduledModeTest.php | 84 +++++++++++++++++++ .../Model/Indexer/IndexerBuilderTest.php | 36 -------- 2 files changed, 84 insertions(+), 36 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php new file mode 100644 index 0000000000000..c6e3bfd47b5c1 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogRule\Model\Indexer; + +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; +use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; +use Magento\Framework\DataObject; +use Magento\TestFramework\Fixture\AppIsolation; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DbIsolation; +use Magento\TestFramework\Helper\Bootstrap; + +class IndexerBuilderInScheduledModeTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var RuleProductProcessor + */ + private $ruleProductProcessor; + + /** + * @var CollectionFactory + */ + private $productCollectionFactory; + + /** + * @var ProductRepositoryInterface + */ + private $productRepository; + + protected function setUp(): void + { + $this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class); + $this->ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); + $this->productCollectionFactory = Bootstrap::getObjectManager()->get(CollectionFactory::class); + } + + #[ + DbIsolation(false), + AppIsolation(true), + DataFixture('Magento/Catalog/_files/product_with_options.php'), + DataFixture('Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php'), + DataFixture('Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php'), + ] + public function testReindexOfDependentIndexer(): void + { + $product = $this->productRepository->get('simple'); + $productId = (int)$product->getId(); + + $product = $this->getProductFromCollection($productId); + $this->assertEquals(9, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()); + + $product->setPrice(100); + $this->productRepository->save($product); + + $product = $this->getProductFromCollection($productId); + $this->assertEquals(9, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()); + + $this->ruleProductProcessor->getIndexer()->reindexList([$productId]); + + $product = $this->getProductFromCollection($productId); + $this->assertEquals(90, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()); + } + + /** + * Get the product from the product collection + * + * @param int $productId + * @return DataObject + */ + private function getProductFromCollection(int $productId) : DataObject + { + $productCollection = $this->productCollectionFactory->create(); + $productCollection->addIdFilter($productId); + $productCollection->addPriceData(); + $productCollection->load(); + return $productCollection->getFirstItem(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php index 8e7c034a77a6f..3e7c8d3815af3 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php @@ -10,12 +10,10 @@ use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; use Magento\Framework\App\ResourceConnection; -use Magento\Framework\App\Area; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Fixture\AppIsolation; use Magento\TestFramework\Fixture\DataFixture; use Magento\TestFramework\Fixture\DbIsolation; -use Magento\TestFramework\Fixture\AppArea; use Magento\TestFramework\Helper\Bootstrap; #[ @@ -287,38 +285,4 @@ protected function prepareProducts() ->setData('test_attribute', 'NO_test_attribute_value') ->save(); } - - #[ - AppArea(Area::AREA_FRONTEND), - DataFixture('Magento/CatalogRule/_files/simple_product_with_catalog_rule_50_percent_off.php'), - DataFixture('Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php'), - ] - public function testReindexOfDependentIndexer(): void - { - $productId = $this->productRepository->get('simple')->getId(); - - $productCollection = $this->productCollectionFactory->create(); - $productCollection->addIdFilter($productId); - //$productCollection->addPriceData(); - $productCollection->load(); - echo (string)$productCollection->getSelect(); - $product = $productCollection->getFirstItem(); - echo "\n\n" . $product->getId() . '='; - //$product = $productCollection->getItemByColumnValue('sku', 'simple'); - //$product = $this->productRepository->get('simple'); - //print_r($product->getPriceInfo()); - echo $product->getFinalPrice(); - echo ' * '; - $product->setPrice(500); - $this->productRepository->save($product); - $product = $this->productRepository->get('simple'); - echo $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue(); - $product->setPrice(50); - $this->productRepository->save($product); - - $this->indexProductProcessor->getIndexer()->setScheduled(false); - $this->ruleProductProcessor->getIndexer()->setScheduled(false); - - $this->indexerBuilder->reindexFull(); - } } From b047042ffc3d57cc40127733af3de74b1c3d379e Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 16 Feb 2023 10:39:53 -0600 Subject: [PATCH 928/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Model/Indexer/IndexerBuilderTest.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php index 3e7c8d3815af3..1a3696c02ac52 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php @@ -7,8 +7,6 @@ use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Indexer\Product\Price\Processor; -use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; -use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; use Magento\Framework\App\ResourceConnection; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Fixture\AppIsolation; @@ -67,16 +65,6 @@ class IndexerBuilderTest extends \PHPUnit\Framework\TestCase */ private $indexProductProcessor; - /** - * @var RuleProductProcessor - */ - private $ruleProductProcessor; - - /** - * @var CollectionFactory - */ - private $productCollectionFactory; - protected function setUp(): void { $this->indexerBuilder = Bootstrap::getObjectManager()->get( @@ -88,8 +76,6 @@ protected function setUp(): void $this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class); $this->connection = Bootstrap::getObjectManager()->get(ResourceConnection::class); $this->indexProductProcessor = Bootstrap::getObjectManager()->get(Processor::class); - $this->ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); - $this->productCollectionFactory = Bootstrap::getObjectManager()->get(CollectionFactory::class); } protected function tearDown(): void @@ -265,7 +251,7 @@ private function getTriggersCount(string $tableName): int { return count( $this->connection->getConnection() - ->query('SHOW TRIGGERS LIKE \'' . $tableName . '\'') + ->query('SHOW TRIGGERS LIKE \''. $tableName . '\'') ->fetchAll() ); } From 73f3d242f6554506c5b22c347a0f1cea4be4e674 Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 16 Feb 2023 11:23:24 -0600 Subject: [PATCH 929/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../ProductIndexersInvalidationTest.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php index 21fc70a70b697..7a214fc733054 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest/ProductIndexersInvalidationTest.php @@ -10,21 +10,23 @@ use Magento\Catalog\Model\Indexer\Product\Price\Processor as ProductPriceIndexer; use Magento\CatalogSearch\Model\Indexer\Fulltext as FulltextIndexer; use Magento\CatalogImportExport\Model\Import\ProductTestBase; +use Magento\Framework\App\Area; use Magento\Framework\Indexer\IndexerRegistry; +use Magento\TestFramework\Fixture\AppArea; +use Magento\TestFramework\Fixture\DataFixture; +use Magento\TestFramework\Fixture\DbIsolation; use Magento\TestFramework\Helper\Bootstrap as BootstrapHelper; -/** - * @magentoAppArea adminhtml - * @magentoDbIsolation disabled - */ +#[ + AppArea(Area::AREA_ADMINHTML), + DbIsolation(false), +] class ProductIndexersInvalidationTest extends ProductTestBase { - /** - * Test for indexer state in update on save mode - * - * @magentoDataFixture Magento/Catalog/_files/multiple_products.php - */ - public function testIndexersState() + #[ + DataFixture('Magento/Catalog/_files/multiple_products.php'), + ] + public function testIndexersState() : void { $indexerRegistry = BootstrapHelper::getObjectManager()->get(IndexerRegistry::class); $fulltextIndexer = $indexerRegistry->get(FulltextIndexer::INDEXER_ID); From fff8f223199f1654281f3234d30893523cf043ab Mon Sep 17 00:00:00 2001 From: Oleksandr Iegorov <oiegorov@adobe.com> Date: Thu, 16 Feb 2023 11:46:50 -0600 Subject: [PATCH 930/985] ACP2E-1569: Elasticsearch Indexer document version changes version when new/existing products are imported --- .../Indexer/IndexerBuilderInScheduledModeTest.php | 9 +++++++-- .../_files/set_indexer_to_scheduled_mode.php | 13 ------------- .../set_indexer_to_scheduled_mode_rollback.php | 12 ------------ 3 files changed, 7 insertions(+), 27 deletions(-) delete mode 100644 dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php delete mode 100644 dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php index c6e3bfd47b5c1..e7a02f2531fcc 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderInScheduledModeTest.php @@ -45,10 +45,13 @@ protected function setUp(): void AppIsolation(true), DataFixture('Magento/Catalog/_files/product_with_options.php'), DataFixture('Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php'), - DataFixture('Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php'), ] public function testReindexOfDependentIndexer(): void { + $indexer = $this->ruleProductProcessor->getIndexer(); + $indexer->reindexAll(); + $indexer->setScheduled(true); + $product = $this->productRepository->get('simple'); $productId = (int)$product->getId(); @@ -61,10 +64,12 @@ public function testReindexOfDependentIndexer(): void $product = $this->getProductFromCollection($productId); $this->assertEquals(9, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()); - $this->ruleProductProcessor->getIndexer()->reindexList([$productId]); + $indexer->reindexList([$productId]); $product = $this->getProductFromCollection($productId); $this->assertEquals(90, $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()); + + $indexer->setScheduled(false); } /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php deleted file mode 100644 index a7a254797a84a..0000000000000 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -use Magento\TestFramework\Helper\Bootstrap; -use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; - -$ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); -$indexer = $ruleProductProcessor->getIndexer(); -$indexer->reindexAll(); -$indexer->setScheduled(true); diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php deleted file mode 100644 index 6b70e9e1999ca..0000000000000 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/set_indexer_to_scheduled_mode_rollback.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -use Magento\TestFramework\Helper\Bootstrap; -use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor; - -$ruleProductProcessor = Bootstrap::getObjectManager()->get(RuleProductProcessor::class); -$indexer = $ruleProductProcessor->getIndexer(); -$indexer->setScheduled(false); From 2f0067c007ed384cace315356416bd910d9e92fa Mon Sep 17 00:00:00 2001 From: Dmytro Horytskyi <dhorytskyi@magento.com> Date: Thu, 16 Feb 2023 14:49:02 -0600 Subject: [PATCH 931/985] ACP2E-1458: Product is not visible on the Storefront after a staging update enabling it is applied --- app/code/Magento/Indexer/etc/di.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Indexer/etc/di.xml b/app/code/Magento/Indexer/etc/di.xml index 482ca591811b7..e609f9eace9bb 100644 --- a/app/code/Magento/Indexer/etc/di.xml +++ b/app/code/Magento/Indexer/etc/di.xml @@ -37,6 +37,9 @@ <type name="Magento\Framework\Mview\View\Subscription"> <arguments> <argument name="viewCollection" xsi:type="object" shared="false">Magento\Framework\Mview\View\CollectionInterface</argument> + <argument name="ignoredUpdateColumns" xsi:type="array"> + <item name="updated_at" xsi:type="string">updated_at</item> + </argument> </arguments> </type> <type name="Magento\Indexer\Model\Processor"> From 789e08f42446766e976a969aff84a649526d806b Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 16 Feb 2023 11:58:58 -0600 Subject: [PATCH 932/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../Model/Cache/Tag/Strategy/Currency.php | 34 - .../DirectoryGraphQl/Plugin/Currency.php | 14 +- app/code/Magento/DirectoryGraphQl/etc/di.xml | 1 - .../GraphQl/Directory/CurrencyCacheTest.php | 712 ++++++++++++++++++ .../Config/Model/ConfigStorage.php | 18 + ...ites_with_store_groups_stores_rollback.php | 20 + 6 files changed, 762 insertions(+), 37 deletions(-) delete mode 100644 app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php deleted file mode 100644 index 2040e8327042f..0000000000000 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Currency.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; - -use Magento\Directory\Model\Currency as CurrencyModel; -use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; -use Magento\Framework\App\Cache\Tag\StrategyInterface; - -/** - * Produce cache tags for currency object. - */ -class Currency implements StrategyInterface -{ - /** - * @inheritdoc - */ - public function getTags($object): array - { - if (!is_object($object)) { - throw new \InvalidArgumentException('Provided argument is not an object'); - } - - if ($object instanceof CurrencyModel) { - return [Identity::CACHE_TAG]; - } - - return []; - } -} diff --git a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php index 07dcc2737fbb9..6de9380892aac 100644 --- a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php +++ b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php @@ -7,13 +7,15 @@ namespace Magento\DirectoryGraphQl\Plugin; +use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; +use Magento\Framework\DataObject\IdentityInterface; use Magento\Framework\Event\ManagerInterface; use Magento\Directory\Model\Currency as CurrencyModel; /** * Currency plugin */ -class Currency +class Currency implements IdentityInterface { /** * Application Event Dispatcher @@ -40,7 +42,15 @@ public function __construct(ManagerInterface $eventManager) */ public function afterSaveRates(CurrencyModel $subject, CurrencyModel $result): CurrencyModel { - $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $result]); + $this->eventManager->dispatch('clean_cache_by_tags', ['object' => $this]); return $result; } + + /** + * @inheritdoc + */ + public function getIdentities() + { + return [Identity::CACHE_TAG]; + } } diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml index 2f4c667f6993c..493e2c9e0fd26 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/di.xml +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -10,7 +10,6 @@ <arguments> <argument name="customStrategies" xsi:type="array"> <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object">\Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CurrencyConfig</item> - <item name="Magento\Directory\Model\Currency" xsi:type="object">\Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Currency</item> </argument> </arguments> </type> diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php new file mode 100644 index 0000000000000..259e5c1e6f2ab --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php @@ -0,0 +1,712 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Directory; + +use Magento\Directory\Model\Currency; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\GraphQl\PageCache\GraphQLPageCacheAbstract; +use Magento\GraphQlCache\Model\CacheId\CacheIdCalculator; +use Magento\Store\Model\Group; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\Website; +use Magento\TestFramework\App\ApiMutableScopeConfig; +use Magento\TestFramework\Config\Model\ConfigStorage; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Test currency query cache + */ +class CurrencyCacheTest extends GraphQLPageCacheAbstract +{ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var ApiMutableScopeConfig + */ + private $config; + + /** + * @var ConfigStorage + */ + private $configStorage; + + /** + * @var array + */ + private $origConfigs = []; + + /** + * @var array + */ + private $notExistingOrigConfigs = []; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->configStorage = $this->objectManager->get(ConfigStorage::class); + $this->config = $this->objectManager->get(ApiMutableScopeConfig::class); + } + + /** + * currency query is cached + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoConfigFixture default/currency/options/base USD + * @magentoConfigFixture default/currency/options/default USD + * @magentoConfigFixture default/currency/options/allow USD + * @magentoConfigFixture test_store currency/options/base USD + * @magentoConfigFixture test_store currency/options/default CNY + * @magentoConfigFixture test_store currency/options/allow CNY,USD + * @magentoDataFixture Magento/Directory/_files/usd_cny_rate.php + */ + public function testGetCurrency() + { + $query = $this->getQuery(); + + // Query default store currency + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('currency', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['currency']; + $this->assertEquals('USD', $defaultStoreResponseResult['base_currency_code']); + $this->assertEquals('USD', $defaultStoreResponseResult['default_display_currency_code']); + $this->assertEquals(['USD'], $defaultStoreResponseResult['available_currency_codes']); + $this->assertEquals('USD', $defaultStoreResponseResult['exchange_rates'][0]['currency_to']); + $this->assertEquals(1, $defaultStoreResponseResult['exchange_rates'][0]['rate']); + // Verify we obtain a cache HIT at the 2nd time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('currency', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['currency']; + $this->assertEquals('USD', $defaultStoreResponseHitResult['base_currency_code']); + $this->assertEquals('USD', $defaultStoreResponseHitResult['default_display_currency_code']); + $this->assertEquals(['USD'], $defaultStoreResponseHitResult['available_currency_codes']); + $this->assertEquals('USD', $defaultStoreResponseHitResult['exchange_rates'][0]['currency_to']); + $this->assertEquals(1, $defaultStoreResponseHitResult['exchange_rates'][0]['rate']); + + // Query test store currency + $testStoreCode = 'test'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $testStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('currency', $testStoreResponse['body']); + $testStoreResponseResult = $testStoreResponse['body']['currency']; + $this->assertEquals('USD', $testStoreResponseResult['base_currency_code']); + $this->assertEquals('CNY', $testStoreResponseResult['default_display_currency_code']); + $this->assertEquals(['CNY','USD'], $testStoreResponseResult['available_currency_codes']); + // Verify we obtain a cache HIT at the 2nd time + $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('currency', $testStoreResponseHit['body']); + $testStoreResponseHitResult = $testStoreResponse['body']['currency']; + $this->assertEquals('USD', $testStoreResponseHitResult['base_currency_code']); + $this->assertEquals('CNY', $testStoreResponseHitResult['default_display_currency_code']); + $this->assertEquals(['CNY','USD'], $testStoreResponseHitResult['available_currency_codes']); + } + + /** + * Store scoped currency change triggers purging only the cache of the changed store. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/currency/options/allow USD + */ + public function testCachePurgedWithStoreScopeCurrencyConfigChange(): void + { + $query = $this->getQuery(); + + // Query default store currency + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('currency', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['currency']; + $this->assertEquals(['USD'], $defaultStoreResponseResult['available_currency_codes']); + + // Query second store currency + $secondStoreCode = 'test'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders($query, [], '', ['Store' => $secondStoreCode]); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseSecondStore['headers']); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($secondStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('currency', $secondStoreResponse['body']); + $secondStoreResponseResult = $secondStoreResponse['body']['currency']; + $this->assertEquals(['USD'], $secondStoreResponseResult['available_currency_codes']); + + // Change second store allowed currency + $this->setConfig('currency/options/allow', 'CNY,USD', ScopeInterface::SCOPE_STORE, $secondStoreCode); + + // Query default store currency after second store currency config is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('currency', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['currency']; + $this->assertEquals(['USD'], $defaultStoreResponseHitResult['available_currency_codes']); + + // Query second store currency after second store currency config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('currency', $secondStoreResponseMiss['body']); + $secondStoreResponseMissResult = $secondStoreResponseMiss['body']['currency']; + $this->assertEquals(['CNY','USD'], $secondStoreResponseMissResult['available_currency_codes']); + // Verify we obtain a cache HIT at the 3rd time + $secondStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('currency', $secondStoreResponseHit['body']); + $secondStoreResponseHitResult = $secondStoreResponseHit['body']['currency']; + $this->assertEquals(['CNY','USD'], $secondStoreResponseHitResult['available_currency_codes']); + } + + /** + * Website scope currency config change triggers purging only the cache of the stores + * associated with the changed website. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - second - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/currency/options/allow USD + */ + public function testCachePurgedWithWebsiteScopeCurrencyConfigChange(): void + { + $this->changeToTwoWebsitesThreeStoreGroupsThreeStores(); + $query = $this->getQuery(); + + // Query default store currency + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals(['USD'], $secondStoreResponse['body']['currency']['available_currency_codes']); + + // Query third store currency + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals(['USD'], $thirdStoreResponse['body']['currency']['available_currency_codes']); + + // Change second website allowed currency + $this->setConfig('currency/options/allow', 'CNY,USD', ScopeInterface::SCOPE_WEBSITES, 'second'); + + // Query default store currency after the currency config of the second website is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency after the currency config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals( + ['CNY','USD'], + $secondStoreResponseMiss['body']['currency']['available_currency_codes'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store currency after the currency config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals( + ['CNY','USD'], + $thirdStoreResponseMiss['body']['currency']['available_currency_codes'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + /** + * Default scope currency config change triggers purging the cache of all stores. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/currency/options/allow USD + */ + public function testCachePurgedWithDefaultScopeCurrencyConfigChange(): void + { + $query = $this->getQuery(); + + // Query default store currency + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals(['USD'], $secondStoreResponse['body']['currency']['available_currency_codes']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals(['USD'], $thirdStoreResponse['body']['currency']['available_currency_codes']); + + // Change default allowed currency + $this->setConfig('currency/options/allow', 'CNY,USD', ScopeConfigInterface::SCOPE_TYPE_DEFAULT); + + // Query default store currency after the default currency config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $defaultStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertEquals(['CNY','USD'], $defaultStoreResponseMiss['body']['currency']['available_currency_codes']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency after the default currency config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals(['CNY','USD'], $secondStoreResponseMiss['body']['currency']['available_currency_codes']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store currency after the default currency config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals(['CNY','USD'], $thirdStoreResponseMiss['body']['currency']['available_currency_codes']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + /** + * Exchange rate change triggers purging the cache of all stores. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/currency/options/allow CNY,USD + * @magentoDataFixture Magento/Directory/_files/usd_cny_rate.php + */ + public function testCachePurgedWithExchangeRateChange(): void + { + $query = $this->getQuery(); + + // Query default store currency + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency + $secondStoreCode = 'second_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals('CNY', $secondStoreResponse['body']['currency']['exchange_rates'][0]['currency_to']); + $this->assertEquals(7, $secondStoreResponse['body']['currency']['exchange_rates'][0]['rate']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals('CNY', $thirdStoreResponse['body']['currency']['exchange_rates'][0]['currency_to']); + $this->assertEquals(7, $thirdStoreResponse['body']['currency']['exchange_rates'][0]['rate']); + + // Change USD to CNY exchange rate + $newUsdToCnyRate = '6.5000'; + $currencyModel = $this->objectManager->create(Currency::class); + $currencyModel->saveRates(['USD' => ['CNY' => $newUsdToCnyRate]]); + + // Query default store currency after the exchange rate is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $defaultStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertEquals( + 'CNY', + $defaultStoreResponseMiss['body']['currency']['exchange_rates'][0]['currency_to'] + ); + $this->assertEquals( + $newUsdToCnyRate, + $defaultStoreResponseMiss['body']['currency']['exchange_rates'][0]['rate'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store currency after the exchange rate is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertEquals( + 'CNY', + $secondStoreResponseMiss['body']['currency']['exchange_rates'][0]['currency_to'] + ); + $this->assertEquals( + $newUsdToCnyRate, + $secondStoreResponseMiss['body']['currency']['exchange_rates'][0]['rate'] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store currency after the exchange rate is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertEquals('CNY', $thirdStoreResponseMiss['body']['currency']['exchange_rates'][0]['currency_to']); + $this->assertEquals($newUsdToCnyRate, $thirdStoreResponseMiss['body']['currency']['exchange_rates'][0]['rate']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + private function changeToTwoWebsitesThreeStoreGroupsThreeStores() + { + /** @var $website2 \Magento\Store\Model\Website */ + $website2 = $this->objectManager->create(Website::class); + $website2Id = $website2->load('second', 'code')->getId(); + + // Change third store to the same website of second store + /** @var Store $store3 */ + $store3 = $this->objectManager->create(Store::class); + $store3->load('third_store_view', 'code'); + $store3GroupId = $store3->getStoreGroupId(); + /** @var Group $store3Group */ + $store3Group = $this->objectManager->create(Group::class); + $store3Group->load($store3GroupId)->setWebsiteId($website2Id)->save(); + $store3->setWebsiteId($website2Id)->save(); + } + + /** + * Get query + * + * @return string + */ + private function getQuery(): string + { + $query = <<<QUERY +query { + currency { + base_currency_code + base_currency_symbol + default_display_currency_code + default_display_currency_symbol + available_currency_codes + exchange_rates { + currency_to + rate + } + } +} +QUERY; + return $query; + } + + protected function tearDown(): void + { + $this->restoreConfig(); + parent::tearDown(); + } + + /** + * Set configuration + * + * @param string $path + * @param string $value + * @param string $scopeType + * @param string|null $scopeCode + * @return void + */ + private function setConfig( + string $path, + string $value, + string $scopeType, + ?string $scopeCode = null + ): void { + if ($this->configStorage->checkIsRecordExist($path, $scopeType, $scopeCode)) { + $this->origConfigs[] = [ + 'path' => $path, + 'value' => $this->configStorage->getValueFromDb($path, $scopeType, $scopeCode), + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } else { + $this->notExistingOrigConfigs[] = [ + 'path' => $path, + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } + $this->config->setValue($path, $value, $scopeType, $scopeCode); + } + + private function restoreConfig() + { + foreach ($this->origConfigs as $origConfig) { + $this->config->setValue( + $origConfig['path'], + $origConfig['value'], + $origConfig['scopeType'], + $origConfig['scopeCode'] + ); + } + $this->origConfigs = []; + + foreach ($this->notExistingOrigConfigs as $notExistingOrigConfig) { + $this->configStorage->deleteConfigFromDb( + $notExistingOrigConfig['path'], + $notExistingOrigConfig['scopeType'], + $notExistingOrigConfig['scopeCode'] + ); + } + $this->notExistingOrigConfigs = []; + } +} diff --git a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php index 7fe25f3a6f61c..3ef5fe7d32be9 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php @@ -120,4 +120,22 @@ private function normalizeScope(string $scope): string return $scope; } + + /** + * Delete configuration from db + * + * @param string $path + * @param string $scope + * @param string|null $scopeCode + * @return void + */ + public function deleteConfigFromDb( + string $path, + string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, + ?string $scopeCode = null + ) { + $scope = $this->normalizeScope($scope); + $scopeId = $this->getIdByScope($scope, $scopeCode); + $this->configResource->deleteConfig($path, $scope, $scopeId); + } } diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php index 110c93b620330..6b9e234c63a96 100644 --- a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php @@ -16,6 +16,8 @@ if ($websiteId) { $website->delete(); } + +/** Delete the third website **/ $website2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Website::class); /** @var $website \Magento\Store\Model\Website */ $websiteId2 = $website2->load('third', 'code')->getId(); @@ -23,11 +25,29 @@ $website2->delete(); } +/** Delete the second store groups **/ +$group = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group \Magento\Store\Model\Group */ +$groupId = $group->load('second_store', 'code')->getId(); +if ($groupId) { + $group->delete(); +} + +/** Delete the third store groups **/ +$group2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group2 \Magento\Store\Model\Group */ +$groupId2 = $group2->load('third_store', 'code')->getId(); +if ($groupId2) { + $group2->delete(); +} + +/** Delete the second store **/ $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store->load('second_store_view', 'code')->getId()) { $store->delete(); } +/** Delete the third store **/ $store2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store2->load('third_store_view', 'code')->getId()) { $store2->delete(); From c42f950bff920a4f790e597695a31f3c7a096f66 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Fri, 17 Feb 2023 08:27:43 -0600 Subject: [PATCH 933/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php index 259e5c1e6f2ab..f164d228b9015 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php @@ -242,6 +242,7 @@ public function testCachePurgedWithStoreScopeCurrencyConfigChange(): void * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php * @magentoConfigFixture default/currency/options/allow USD + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testCachePurgedWithWebsiteScopeCurrencyConfigChange(): void { @@ -362,6 +363,7 @@ public function testCachePurgedWithWebsiteScopeCurrencyConfigChange(): void * @magentoConfigFixture default/system/full_page_cache/caching_application 2 * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php * @magentoConfigFixture default/currency/options/allow USD + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testCachePurgedWithDefaultScopeCurrencyConfigChange(): void { @@ -482,6 +484,7 @@ public function testCachePurgedWithDefaultScopeCurrencyConfigChange(): void * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php * @magentoConfigFixture default/currency/options/allow CNY,USD * @magentoDataFixture Magento/Directory/_files/usd_cny_rate.php + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testCachePurgedWithExchangeRateChange(): void { From 9f62fc907385b6ddf546dae933519bd4da81e984 Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 21 Feb 2023 11:19:37 +0200 Subject: [PATCH 934/985] ACP2E-1648: fix magnifier loading --- lib/web/magnifier/magnifier.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/web/magnifier/magnifier.js b/lib/web/magnifier/magnifier.js index 29726688f4d5f..8b525b2e047b8 100644 --- a/lib/web/magnifier/magnifier.js +++ b/lib/web/magnifier/magnifier.js @@ -541,11 +541,9 @@ showWrapper = false; $(thumbObj).on('load', function () { - if (data.length > 0) { + if (data.hasOwnProperty(idx)) { data[idx].status = 1; - $(largeObj).on('load', function () { - if (largeObj.width > largeWrapper.width() || largeObj.height > largeWrapper.height()) { showWrapper = true; bindEvents(eventType, thumb); @@ -559,7 +557,6 @@ updateLensOnLoad(idx, thumb, largeObj, largeWrapper); } }); - largeObj.src = data[idx].largeUrl; } }); From 4f46aa445963ae3953c888f7e48dae7b90b7562d Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 21 Feb 2023 12:54:51 +0200 Subject: [PATCH 935/985] ACP2E-1367: update mftf to avoid random failure --- .../AdminCreateOrdersAndCheckGridsTest.xml | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index 64d996b14ca33..d2d78d2d541df 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -46,7 +46,7 @@ <requiredEntity createDataKey="createGuestCartOne"/> </updateData> - <magentoCLI command="cron:run" stepKey="runCronOne"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronOne"/> <createData entity="Invoice" stepKey="invoiceOrderOne"> <requiredEntity createDataKey="createGuestCartOne"/> @@ -68,7 +68,7 @@ <requiredEntity createDataKey="createGuestCartOne"/> </createData> - <magentoCLI command="cron:run" stepKey="runCronTwo"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronTwo"/> <createData entity="GuestCart" stepKey="createGuestCartThree"/> <createData entity="SimpleCartItem" stepKey="addCartItemThree"> @@ -94,7 +94,7 @@ <requiredEntity createDataKey="createGuestCartTwo"/> </createData> - <magentoCLI command="cron:run" stepKey="runCronThree"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronThree"/> <createData entity="Invoice" stepKey="invoiceOrderTwo"> <requiredEntity createDataKey="createGuestCartTwo"/> @@ -108,15 +108,17 @@ <requiredEntity createDataKey="createGuestCartTwo"/> </createData> - <magentoCLI command="cron:run" stepKey="runCronFour"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronFour"/> <createData entity="CreditMemo" stepKey="refundOrderThree"> <requiredEntity createDataKey="createGuestCartThree"/> </createData> - <magentoCLI command="cron:run" stepKey="runCronFive"/> - <magentoCLI command="cron:run" stepKey="runCronSix"/> - <magentoCLI command="cron:run" stepKey="runCronSeven"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronFive"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronSix"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronSeven"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronEight"/> + <magentoCLI command="cron:run --group=default" stepKey="runCronNine"/> <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> @@ -132,6 +134,8 @@ <argument name="entityId" value="$createGuestCartOne.return$"/> </actionGroup> + <waitForPageLoad time="30" stepKey="waitForPageLoadOne"/> + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageOne"/> <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask1" after="openInvoicesTabOrdersPageOne"/> <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedOne"/> @@ -145,6 +149,8 @@ <argument name="entityId" value="$createGuestCartTwo.return$"/> </actionGroup> + <waitForPageLoad time="30" stepKey="waitForPageLoadTwo"/> + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageTwo"/> <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask2" after="openInvoicesTabOrdersPageTwo"/> <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedTwo"/> @@ -158,6 +164,8 @@ <argument name="entityId" value="$createGuestCartThree.return$"/> </actionGroup> + <waitForPageLoad time="30" stepKey="waitForPageLoadThree"/> + <actionGroup ref="AdminOpenInvoiceTabFromOrderPageActionGroup" stepKey="openInvoicesTabOrdersPageThree"/> <waitForLoadingMaskToDisappear stepKey="waitForInvoiceGridLoadingMask3" after="openInvoicesTabOrdersPageThree"/> <waitForElementVisible selector="{{AdminOrderInvoicesTabSection.viewInvoice}}" stepKey="waitForInvoicesTabOpenedThree"/> From 6e3c713f5d1fdc48eb7fc9743be31ca47d764cbb Mon Sep 17 00:00:00 2001 From: Alexandra Zota <zota@adobe.com> Date: Tue, 21 Feb 2023 14:57:42 +0200 Subject: [PATCH 936/985] ACP2E-1367: update mftf to avoid random failure --- .../Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml index d2d78d2d541df..d7049ba6b8a69 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrdersAndCheckGridsTest.xml @@ -18,7 +18,8 @@ <group value="sales"/> </annotations> <before> - <magentoCLI command="config:set dev/grid/async_indexing 1" stepKey="enableAsyncIndexing"/> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <magentoCLI command="config:set {{AsyncGridsIndexingConfigData.enable_option}}" stepKey="enableAsyncIndexing"/> <magentoCLI command="cache:clean" stepKey="cacheCleanBefore"/> <createData entity="ApiCategory" stepKey="createCategory"/> <createData entity="defaultSimpleProduct" stepKey="createSimpleProduct"> @@ -27,7 +28,7 @@ </before> <after> - <magentoCLI command="config:set dev/grid/async_indexing 0" stepKey="disableAsyncIndexing"/> + <magentoCLI command="config:set {{AsyncGridsIndexingConfigData.disable_option}}" stepKey="disableAsyncIndexing"/> <magentoCLI command="cache:clean" stepKey="cacheCleanAfter"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> From b73558863678ff574c423fb945c90050dd59f4f1 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 21 Feb 2023 10:11:47 -0600 Subject: [PATCH 937/985] B2B-2255: "Currency" GraphQl query has no cache identity --- .../DirectoryGraphQl/Model/Resolver/Currency/Identity.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php index a07ae587cef38..a5eed66cb3f40 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Currency/Identity.php @@ -32,10 +32,12 @@ public function __construct(StoreManagerInterface $storeManager) /** * @inheritdoc - * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getIdentities(array $resolvedData): array { + if (empty($resolvedData)) { + return []; + } $storeId = $this->storeManager->getStore()->getId(); return [self::CACHE_TAG, sprintf('%s_%s', self::CACHE_TAG, $storeId)]; } From 3a9095047a94893b192b97c02f749b4c71f93c15 Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Wed, 22 Feb 2023 13:12:05 +0530 Subject: [PATCH 938/985] Fixed the issue of mage-cache-storage --- .../view/frontend/web/js/customer-data.js | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js index cd842d5bee5f6..5ff83bbb9b14d 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js +++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js @@ -30,20 +30,6 @@ define([ url.setBaseUrl(window.BASE_URL); options.sectionLoadUrl = url.build('customer/section/load'); - function initStorage() { - if (options.cookieLifeTime !== 'undefined') { - $.cookieStorage.setConf({ - path: '/', - expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) - }); - storage = $.initNamespaceStorage('mage-cache-storage').localStorage; - storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; - } - } - - // Initialize storage with default parameters to prevent JS errors while component still not initialized - initStorage(); - /** * @param {Object} invalidateOptions */ @@ -241,7 +227,14 @@ define([ /** * Storage init */ - initStorage: initStorage, + initStorage: function () { + $.cookieStorage.setConf({ + path: '/', + expires: new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000) + }); + storage = $.initNamespaceStorage('mage-cache-storage').localStorage; + storageInvalidation = $.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage; + }, /** * Retrieve the list of sections that has expired since last page reload. @@ -269,7 +262,9 @@ define([ // process sections that can expire due to storage information inconsistency _.each(cookieSectionTimestamps, function (cookieSectionTimestamp, sectionName) { - sectionData = storage.get(sectionName); + if (storage !== undefined) { + sectionData = storage.get(sectionName); + } if (typeof sectionData === 'undefined' || typeof sectionData === 'object' && @@ -406,10 +401,6 @@ define([ */ 'Magento_Customer/js/customer-data': function (settings) { options = settings; - - // re-init storage with a new settings - customerData.initStorage(); - customerData.initStorage(); invalidateCacheBySessionTimeOut(settings); invalidateCacheByCloseCookieSession(); From 657506bf1751896c5a98410fbb5ce7cecaf624cd Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Wed, 22 Feb 2023 16:50:57 +0530 Subject: [PATCH 939/985] Fixed failed unit test --- .../Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php index 649db0282d12d..5091ac037096d 100644 --- a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php @@ -223,6 +223,8 @@ public function testExecute($indexerIds, $exception, $expectsExceptionValues) ->willReturn($indexerInterface); if ($exception !== null) { + $indexerInterface->expects($this->any()) + ->method('isScheduled')->willReturn(true); $indexerInterface->expects($this->any()) ->method('setScheduled')->with(false)->willThrowException($exception); } else { From b98e6237ac89c73e4a666a8601c20081b3c36e11 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 22 Feb 2023 10:05:38 -0600 Subject: [PATCH 940/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../Cache/Tag/Strategy/CountryConfig.php | 75 +++++++++++++++++++ .../Model/Resolver/Country/Identity.php | 44 +++++++++++ app/code/Magento/DirectoryGraphQl/etc/di.xml | 18 +++++ .../DirectoryGraphQl/etc/schema.graphqls | 4 +- .../Config/Model/ConfigStorage.php | 18 +++++ ...ites_with_store_groups_stores_rollback.php | 20 +++++ 6 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php create mode 100644 app/code/Magento/DirectoryGraphQl/Model/Resolver/Country/Identity.php create mode 100644 app/code/Magento/DirectoryGraphQl/etc/di.xml diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php new file mode 100644 index 0000000000000..09176b7832a02 --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php @@ -0,0 +1,75 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; + +use Magento\DirectoryGraphQl\Model\Resolver\Country\Identity; +use Magento\Framework\App\Cache\Tag\StrategyInterface; +use Magento\Framework\App\Config\ValueInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; + +/** + * Produce cache tags for country config. + */ +class CountryConfig implements StrategyInterface +{ + /** + * @var string[] + */ + private $countryConfigPaths = [ + 'general/locale/code', + 'general/country/allow', + 'general/region/display_all', + 'general/region/state_required' + ]; + + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct( + StoreManagerInterface $storeManager + ) { + $this->storeManager = $storeManager; + } + + /** + * @inheritdoc + */ + public function getTags($object): array + { + if (!is_object($object)) { + throw new \InvalidArgumentException('Provided argument is not an object'); + } + + if ($object instanceof ValueInterface + && in_array($object->getPath(), $this->countryConfigPaths) + && $object->isValueChanged() + ) { + if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($object->getScopeId()); + $storeIds = $website->getStoreIds(); + } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$object->getScopeId()]; + } else { + $storeIds = array_keys($this->storeManager->getStores()); + } + $ids = []; + foreach ($storeIds as $storeId) { + $ids[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); + } + return $ids; + } + + return []; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/Model/Resolver/Country/Identity.php b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Country/Identity.php new file mode 100644 index 0000000000000..bc905b57b622e --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/Model/Resolver/Country/Identity.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\DirectoryGraphQl\Model\Resolver\Country; + +use Magento\Framework\GraphQl\Query\Resolver\IdentityInterface; +use Magento\Store\Model\StoreManagerInterface; + +class Identity implements IdentityInterface +{ + /** + * @var string + */ + public const CACHE_TAG = 'gql_country'; + + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct(StoreManagerInterface $storeManager) + { + $this->storeManager = $storeManager; + } + + /** + * @inheritdoc + */ + public function getIdentities(array $resolvedData): array + { + if (empty($resolvedData)) { + return []; + } + $storeId = $this->storeManager->getStore()->getId(); + return [self::CACHE_TAG, sprintf('%s_%s', self::CACHE_TAG, $storeId)]; + } +} diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml new file mode 100644 index 0000000000000..0f3a0c7428673 --- /dev/null +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> + <arguments> + <argument name="customStrategies" xsi:type="array"> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> + Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CountryConfig + </item> + </argument> + </arguments> + </type> +</config> diff --git a/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls b/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls index ed16732f3dcc5..6fef40064fb1a 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls +++ b/app/code/Magento/DirectoryGraphQl/etc/schema.graphqls @@ -3,8 +3,8 @@ type Query { currency: Currency @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Currency") @doc(description: "Return information about the store's currency.") @cache(cacheable: false) - countries: [Country] @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Countries") @doc(description: "The countries query provides information for all countries.") @cache(cacheable: false) - country (id: String): Country @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country") @doc(description: "The countries query provides information for a single country.") @cache(cacheable: false) + countries: [Country] @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Countries") @doc(description: "The countries query provides information for all countries.") @cache(cacheIdentity: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country\\Identity") + country (id: String): Country @resolver(class: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country") @doc(description: "The countries query provides information for a single country.") @cache(cacheIdentity: "Magento\\DirectoryGraphQl\\Model\\Resolver\\Country\\Identity") } type Currency { diff --git a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php index 7fe25f3a6f61c..3ef5fe7d32be9 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Config/Model/ConfigStorage.php @@ -120,4 +120,22 @@ private function normalizeScope(string $scope): string return $scope; } + + /** + * Delete configuration from db + * + * @param string $path + * @param string $scope + * @param string|null $scopeCode + * @return void + */ + public function deleteConfigFromDb( + string $path, + string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, + ?string $scopeCode = null + ) { + $scope = $this->normalizeScope($scope); + $scopeId = $this->getIdByScope($scope, $scopeCode); + $this->configResource->deleteConfig($path, $scope, $scopeId); + } } diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php index 110c93b620330..6b9e234c63a96 100644 --- a/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Store/_files/multiple_websites_with_store_groups_stores_rollback.php @@ -16,6 +16,8 @@ if ($websiteId) { $website->delete(); } + +/** Delete the third website **/ $website2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Website::class); /** @var $website \Magento\Store\Model\Website */ $websiteId2 = $website2->load('third', 'code')->getId(); @@ -23,11 +25,29 @@ $website2->delete(); } +/** Delete the second store groups **/ +$group = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group \Magento\Store\Model\Group */ +$groupId = $group->load('second_store', 'code')->getId(); +if ($groupId) { + $group->delete(); +} + +/** Delete the third store groups **/ +$group2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Group::class); +/** @var $group2 \Magento\Store\Model\Group */ +$groupId2 = $group2->load('third_store', 'code')->getId(); +if ($groupId2) { + $group2->delete(); +} + +/** Delete the second store **/ $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store->load('second_store_view', 'code')->getId()) { $store->delete(); } +/** Delete the third store **/ $store2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); if ($store2->load('third_store_view', 'code')->getId()) { $store2->delete(); From 1e38b5cd23faea3febcb162d22eaa62f6584c086 Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Wed, 22 Feb 2023 10:44:01 -0600 Subject: [PATCH 941/985] ACQE-4594: Create MFTF 4.2.0 - change constraint --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 692cfbbdb919f..11424dd92630c 100644 --- a/composer.json +++ b/composer.json @@ -97,7 +97,7 @@ "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "^4.0", + "magento/magento2-functional-testing-framework": "4.2", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.9", From cf84928d85a9ed13a8e22adf76f27634e5473194 Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Wed, 22 Feb 2023 10:46:08 -0600 Subject: [PATCH 942/985] ACQE-4594: Create MFTF 4.2.0 - composer version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 11424dd92630c..2a928ff73380e 100644 --- a/composer.json +++ b/composer.json @@ -97,7 +97,7 @@ "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "4.2", + "magento/magento2-functional-testing-framework": "^4.2", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.9", From c8b44586a1afab5298d6d87db3fa6ab417b1d67c Mon Sep 17 00:00:00 2001 From: Kevin Kozan <kkozan@magento.com> Date: Wed, 22 Feb 2023 12:20:57 -0600 Subject: [PATCH 943/985] ACQE-4594: Create MFTF 4.2.0 - version bump in json and lock --- composer.json | 2 +- composer.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index f39af88c91d26..8d961b68fa205 100644 --- a/composer.json +++ b/composer.json @@ -98,7 +98,7 @@ "friendsofphp/php-cs-fixer": "^3.8", "lusitanian/oauth": "^0.8", "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "^4.2", + "magento/magento2-functional-testing-framework": "^4.2.1", "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.9", diff --git a/composer.lock b/composer.lock index e685c4e77f914..ae048f0928223 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": "e311d5a0ac66042f5d4c839f64996e87", + "content-hash": "bd4b64caee2131de1c4337fb3f8211a5", "packages": [ { "name": "aws/aws-crt-php", @@ -10737,16 +10737,16 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5" + "reference": "9ba3321df1dbfebd4bf2e502f76880d05fa38a57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5", - "reference": "062c1bbabbe8f6bc1aba2f5fc84751997c36f7f5", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/9ba3321df1dbfebd4bf2e502f76880d05fa38a57", + "reference": "9ba3321df1dbfebd4bf2e502f76880d05fa38a57", "shasum": "" }, "require": { @@ -10772,7 +10772,7 @@ "mustache/mustache": "~2.5", "nikic/php-parser": "^4.4", "php": ">=8.1", - "php-webdriver/webdriver": "^1.9.0", + "php-webdriver/webdriver": "^1.9.0 <1.14.0", "spomky-labs/otphp": "^10.0", "symfony/console": "^4.4||^5.4", "symfony/dotenv": "^5.3", @@ -10826,9 +10826,9 @@ ], "support": { "issues": "https://github.com/magento/magento2-functional-testing-framework/issues", - "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.2.0" + "source": "https://github.com/magento/magento2-functional-testing-framework/tree/4.2.1" }, - "time": "2023-02-13T18:01:18+00:00" + "time": "2023-02-22T18:01:48+00:00" }, { "name": "mustache/mustache", @@ -13950,5 +13950,5 @@ "lib-libxml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From 50607798ee0eac806853f1e7a2165a8ea5e10386 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 22 Feb 2023 15:45:48 -0600 Subject: [PATCH 944/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../Model/Cache/Tag/Strategy/CountryConfig.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php index 09176b7832a02..db010f6b2ead3 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php @@ -23,9 +23,7 @@ class CountryConfig implements StrategyInterface */ private $countryConfigPaths = [ 'general/locale/code', - 'general/country/allow', - 'general/region/display_all', - 'general/region/state_required' + 'general/country/allow' ]; /** From 8fdd2c01961eff94c6cd5544020963f556f6bc61 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 22 Feb 2023 16:38:46 -0600 Subject: [PATCH 945/985] B2B-2255: "Currency" GraphQl query has no cache identity --- app/code/Magento/DirectoryGraphQl/Plugin/Currency.php | 4 ++-- app/code/Magento/DirectoryGraphQl/etc/di.xml | 4 +++- .../testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php index 6de9380892aac..d990fbc681d95 100644 --- a/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php +++ b/app/code/Magento/DirectoryGraphQl/Plugin/Currency.php @@ -13,7 +13,7 @@ use Magento\Directory\Model\Currency as CurrencyModel; /** - * Currency plugin + * Currency plugin triggers clean page cache and provides currency cache identities */ class Currency implements IdentityInterface { @@ -33,7 +33,7 @@ public function __construct(ManagerInterface $eventManager) } /** - * Add graphql store config tag to the store group cache identities. + * Trigger clean cache by tags after save rates * * @param CurrencyModel $subject * @param CurrencyModel $result diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml index 493e2c9e0fd26..99306f57bfa29 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/di.xml +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -9,7 +9,9 @@ <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> <arguments> <argument name="customStrategies" xsi:type="array"> - <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object">\Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CurrencyConfig</item> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> + Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CurrencyConfig + </item> </argument> </arguments> </type> diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php index f164d228b9015..28dc43dc695ec 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyCacheTest.php @@ -501,13 +501,13 @@ public function testCachePurgedWithExchangeRateChange(): void // Query second store currency $secondStoreCode = 'second_store_view'; - $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $responseSecondStore = $this->graphQlQueryWithResponseHeaders( $query, [], '', ['Store' => $secondStoreCode] ); - $secondStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; // Verify we obtain a cache MISS at the 1st time $secondStoreResponse = $this->assertCacheMissAndReturnResponse( $query, From 08db5a1d9cb24f911e7007d73a846165e8de5d2e Mon Sep 17 00:00:00 2001 From: engcom-Charlie <engcom-vendorworker-charlie@adobe.com> Date: Thu, 23 Feb 2023 12:09:11 +0530 Subject: [PATCH 946/985] Fixed failed static test --- .../Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php index 5091ac037096d..11345aa988631 100644 --- a/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Controller/Adminhtml/Indexer/MassOnTheFlyTest.php @@ -82,7 +82,7 @@ class MassOnTheFlyTest extends TestCase protected $indexReg; /** - * @return ResponseInterface + * @var ResponseInterface */ protected $response; From e33486da81d2638f2dde775f82bd4266ef4d5504 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 22 Feb 2023 16:25:56 -0600 Subject: [PATCH 947/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../GraphQl/Directory/CountriesTest.php | 63 +++++---- .../Magento/GraphQl/Directory/CountryTest.php | 132 ++++++++++++------ 2 files changed, 126 insertions(+), 69 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php index 09db8564f9e0a..8f045ca0ae07c 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php @@ -14,38 +14,57 @@ */ class CountriesTest extends GraphQlAbstract { + /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + */ public function testGetCountries() { - $query = <<<QUERY -query { - countries { - id - two_letter_abbreviation - three_letter_abbreviation - full_name_locale - full_name_english - available_regions { - id - code - name - } - } -} -QUERY; - - $result = $this->graphQlQuery($query); + $result = $this->graphQlQuery($this->getQuery()); $this->assertArrayHasKey('countries', $result); + $this->assertCount(1, $result['countries']); $this->assertArrayHasKey('id', $result['countries'][0]); $this->assertArrayHasKey('two_letter_abbreviation', $result['countries'][0]); $this->assertArrayHasKey('three_letter_abbreviation', $result['countries'][0]); $this->assertArrayHasKey('full_name_locale', $result['countries'][0]); $this->assertArrayHasKey('full_name_english', $result['countries'][0]); $this->assertArrayHasKey('available_regions', $result['countries'][0]); + + $testStoreResult = $this->graphQlQuery( + $this->getQuery(), + [], + '', + ['Store' => 'test'] + ); + $this->assertArrayHasKey('countries', $testStoreResult); + $this->assertCount(2, $testStoreResult['countries']); } public function testCheckCountriesForNullLocale() { - $query = <<<QUERY + $result = $this->graphQlQuery($this->getQuery()); + $count = count($result['countries']); + for ($i=0; $i < $count; $i++) { + $this->assertNotNull($result['countries'][$i]['full_name_locale']); + } + } + + /** + * Get query + * + * @return string + */ + private function getQuery(): string + { + return <<<QUERY query { countries { id @@ -61,11 +80,5 @@ public function testCheckCountriesForNullLocale() } } QUERY; - - $result = $this->graphQlQuery($query); - $count = count($result['countries']); - for ($i=0; $i < $count; $i++) { - $this->assertNotNull($result['countries'][$i]['full_name_locale']); - } } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php index 55966fc0bce60..f5d9c2b15d4ab 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php @@ -14,67 +14,85 @@ */ class CountryTest extends GraphQlAbstract { - public function testGetCountry() + /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + */ + public function testGetDefaultStoreUSCountry() { - $query = <<<QUERY -query { - country(id: "US") { - id - two_letter_abbreviation - three_letter_abbreviation - full_name_locale - full_name_english - available_regions { - id - code - name - } + $result = $this->graphQlQuery($this->getQuery('US')); + $this->assertArrayHasKey('country', $result); + $this->assertEquals('US', $result['country']['id']); + $this->assertEquals('US', $result['country']['two_letter_abbreviation']); + $this->assertEquals('USA', $result['country']['three_letter_abbreviation']); + $this->assertEquals('United States', $result['country']['full_name_locale']); + $this->assertEquals('United States', $result['country']['full_name_english']); + $this->assertCount(65, $result['country']['available_regions']); + $this->assertArrayHasKey('id', $result['country']['available_regions'][0]); + $this->assertArrayHasKey('code', $result['country']['available_regions'][0]); + $this->assertArrayHasKey('name', $result['country']['available_regions'][0]); } -} -QUERY; - $result = $this->graphQlQuery($query); + /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + */ + public function testGetTestStoreDECountry() + { + $result = $this->graphQlQuery( + $this->getQuery('DE'), + [], + '', + ['Store' => 'test'] + ); $this->assertArrayHasKey('country', $result); - $this->assertArrayHasKey('id', $result['country']); - $this->assertArrayHasKey('two_letter_abbreviation', $result['country']); - $this->assertArrayHasKey('three_letter_abbreviation', $result['country']); - $this->assertArrayHasKey('full_name_locale', $result['country']); - $this->assertArrayHasKey('full_name_english', $result['country']); - $this->assertArrayHasKey('available_regions', $result['country']); + $this->assertEquals('DE', $result['country']['id']); + $this->assertEquals('DE', $result['country']['two_letter_abbreviation']); + $this->assertEquals('DEU', $result['country']['three_letter_abbreviation']); + $this->assertEquals('Germany', $result['country']['full_name_locale']); + $this->assertEquals('Germany', $result['country']['full_name_english']); + $this->assertCount(16, $result['country']['available_regions']); $this->assertArrayHasKey('id', $result['country']['available_regions'][0]); $this->assertArrayHasKey('code', $result['country']['available_regions'][0]); $this->assertArrayHasKey('name', $result['country']['available_regions'][0]); } /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE */ - public function testGetCountryNotFoundException() + public function testGetDefaultStoreDECountryNotFoundException() { $this->expectException(\Exception::class); $this->expectExceptionMessage('GraphQL response contains errors: The country isn\'t available.'); - $query = <<<QUERY -query { - country(id: "BLAH") { - id - two_letter_abbreviation - three_letter_abbreviation - full_name_locale - full_name_english - available_regions { - id - code - name - } + $this->graphQlQuery($this->getQuery('DE')); } -} -QUERY; - $this->graphQlQuery($query); - } - - /** - */ public function testMissedInputParameterException() { $this->expectException(\Exception::class); @@ -94,4 +112,30 @@ public function testMissedInputParameterException() $this->graphQlQuery($query); } + + /** + * Get query + * + * @param string $countryId + * @return string + */ + private function getQuery(string $countryId): string + { + return <<<QUERY +query { + country(id: {$countryId}) { + id + two_letter_abbreviation + three_letter_abbreviation + full_name_locale + full_name_english + available_regions { + id + code + name + } + } +} +QUERY; + } } From 7220299bc7740d756e4b755f914163e84c2bce4f Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 27 Feb 2023 12:26:58 +0530 Subject: [PATCH 948/985] AC-8030::Sync 2.4.6-develop with 2.4-develop --- app/code/Magento/Elasticsearch8/README.md | 0 .../StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml | 0 app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/code/Magento/Elasticsearch8/README.md delete mode 100644 app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml delete mode 100644 app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml diff --git a/app/code/Magento/Elasticsearch8/README.md b/app/code/Magento/Elasticsearch8/README.md deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml b/app/code/Magento/Elasticsearch8/Test/Mftf/Test/StorefrontQuickSearchUsingElasticSearch8ByProductSkuTest.xml deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch8/etc/adminhtml/system.xml deleted file mode 100644 index e69de29bb2d1d..0000000000000 From 814769a7f646f8308b773786170247585a88bb0a Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Fri, 24 Feb 2023 10:40:44 -0600 Subject: [PATCH 949/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../TestCase/GraphQlAbstract.php | 14 + .../GraphQl/Directory/CountriesCacheTest.php | 566 ++++++++++++++ .../GraphQl/Directory/CountryCacheTest.php | 703 ++++++++++++++++++ 3 files changed, 1283 insertions(+) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php index c86f0a2c773db..ae7bc04f4fb2d 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php @@ -206,4 +206,18 @@ protected function assertResponseFields($actualResponse, $assertionMap) ); } } + + /** + * Tear down test and flush page cache + * + * @return void + */ + protected function tearDown(): void + { + parent::tearDown(); + $appDir = dirname(Bootstrap::getInstance()->getAppTempDir()); + $out = ''; + // phpcs:ignore Magento2.Security.InsecureFunction + exec("php -f {$appDir}/bin/magento cache:flush full_page", $out); + } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php new file mode 100644 index 0000000000000..6c095b6603f6c --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php @@ -0,0 +1,566 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Directory; + +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\GraphQl\PageCache\GraphQLPageCacheAbstract; +use Magento\GraphQlCache\Model\CacheId\CacheIdCalculator; +use Magento\Store\Model\Group; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\Website; +use Magento\TestFramework\App\ApiMutableScopeConfig; +use Magento\TestFramework\Config\Model\ConfigStorage; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Test Coutries query cache + */ +class CountriesCacheTest extends GraphQLPageCacheAbstract +{ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var ApiMutableScopeConfig + */ + private $config; + + /** + * @var ConfigStorage + */ + private $configStorage; + + /** + * @var array + */ + private $origConfigs = []; + + /** + * @var array + */ + private $notExistingOrigConfigs = []; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->configStorage = $this->objectManager->get(ConfigStorage::class); + $this->config = $this->objectManager->get(ApiMutableScopeConfig::class); + } + + /** + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + */ + public function testGetCountries() + { + // Query default store countries + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($this->getQuery()); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery(), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('countries', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['countries']; + $this->assertCount(1, $defaultStoreResponseResult); + $this->assertEquals('US', $defaultStoreResponseResult[0]['id']); + // Verify we obtain a cache HIT at the 2nd time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery(), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('countries', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['countries']; + $this->assertCount(1, $defaultStoreResponseHitResult); + $this->assertEquals('US', $defaultStoreResponseHitResult[0]['id']); + + // Query test store countries + $testStoreCode = 'test'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders( + $this->getQuery(), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery(), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('countries', $testStoreResponse['body']); + $testStoreResponseResult = $testStoreResponse['body']['countries']; + $this->assertCount(2, $testStoreResponseResult); + // Verify we obtain a cache HIT at the 2nd time + $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery(), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('countries', $testStoreResponseHit['body']); + $testStoreResponseHitResult = $testStoreResponseHit['body']['countries']; + $this->assertCount(2, $testStoreResponseHitResult); + } + + /** + * Store scoped country config change triggers purging only the cache of the changed store. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + */ + public function testCachePurgedWithStoreScopeCountryConfigChange() + { + // Query default store countries + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($this->getQuery()); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery(), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('countries', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['countries']; + $this->assertCount(1, $defaultStoreResponseResult); + $this->assertEquals('US', $defaultStoreResponseResult[0]['id']); + + // Query test store countries + $testStoreCode = 'test'; + $responseTestStore = $this->graphQlQueryWithResponseHeaders( + $this->getQuery(), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStore['headers']); + $testStoreCacheId = $responseTestStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $testStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery(), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('countries', $testStoreResponse['body']); + $testStoreResponseResult = $testStoreResponse['body']['countries']; + $this->assertCount(2, $testStoreResponseResult); + + // Change test store allowed country + $this->setConfig('general/country/allow', 'DE', ScopeInterface::SCOPE_STORE, $testStoreCode); + + // Query default store countries after test store country config is changed + // Verify we obtain a cache HIT at the 2nd time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery(), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('countries', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['countries']; + $this->assertCount(1, $defaultStoreResponseHitResult); + $this->assertArrayHasKey('US', $defaultStoreResponseHitResult[0]['id']); + + // Query test store countries after test store country config is changed + // Verify we obtain a cache MISS at the 2nd time + $testStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $this->getQuery(), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('countries', $testStoreResponseMiss['body']); + $testStoreResponseMissResult = $testStoreResponseMiss['body']['countries']; + $this->assertCount(1, $testStoreResponseMissResult); + // Verify we obtain a cache HIT at the 3rd time + $testStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery(), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('countries', $testStoreResponseHit['body']); + $testStoreResponseHitResult = $testStoreResponseHit['body']['countries']; + $this->assertCount(1, $testStoreResponseHitResult); + } + + /** + * Website scope country config change triggers purging only the cache of the stores + * associated with the changed website. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - second - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithWebsiteScopeCountryConfigChange(): void + { + $this->changeToTwoWebsitesThreeStoreGroupsThreeStores(); + $query = $this->getQuery(); + + // Query default store countries + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries + $secondStoreCode = 'second_store_view'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertCount(1, $secondStoreResponse['body']['countries']); + + // Query third store countries + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertCount(1, $thirdStoreResponse['body']['countries']); + + // Change second website allowed country + $this->setConfig('general/country/allow', 'US,DE', ScopeInterface::SCOPE_WEBSITES, 'second'); + + // Query default store countries after the country config of the second website is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries after the country config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertCount(2, $secondStoreResponseMiss['body']['countries']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store countries after the country config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertCount(2, $thirdStoreResponseMiss['body']['countries']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + /** + * Default scope country config change triggers purging the cache of all stores. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithDefaultScopeCountryConfigChange(): void + { + $query = $this->getQuery(); + + // Query default store countries + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries + $secondStoreCode = 'second_store_view'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $secondStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertCount(1, $secondStoreResponse['body']['countries']); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $thirdStoreResponse = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertCount(1, $thirdStoreResponse['body']['countries']); + + // Change default allowed country + $this->setConfig('general/country/allow', 'US,DE', ScopeConfigInterface::SCOPE_TYPE_DEFAULT); + + // Query default store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $defaultStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertCount(2, $defaultStoreResponseMiss['body']['countries']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $secondStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertCount(2, $secondStoreResponseMiss['body']['countries']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $thirdStoreResponseMiss = $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertCount(2, $thirdStoreResponseMiss['body']['countries']); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + private function changeToTwoWebsitesThreeStoreGroupsThreeStores() + { + /** @var $website2 \Magento\Store\Model\Website */ + $website2 = $this->objectManager->create(Website::class); + $website2Id = $website2->load('second', 'code')->getId(); + + // Change third store to the same website of second store + /** @var Store $store3 */ + $store3 = $this->objectManager->create(Store::class); + $store3->load('third_store_view', 'code'); + $store3GroupId = $store3->getStoreGroupId(); + /** @var Group $store3Group */ + $store3Group = $this->objectManager->create(Group::class); + $store3Group->load($store3GroupId)->setWebsiteId($website2Id)->save(); + $store3->setWebsiteId($website2Id)->save(); + } + + /** + * Get query + * + * @return string + */ + private function getQuery(): string + { + return <<<QUERY +query { + countries { + id + two_letter_abbreviation + three_letter_abbreviation + full_name_locale + full_name_english + available_regions { + id + code + name + } + } +} +QUERY; + } + + protected function tearDown(): void + { + $this->restoreConfig(); + parent::tearDown(); + } + + /** + * Set configuration + * + * @param string $path + * @param string $value + * @param string $scopeType + * @param string|null $scopeCode + * @return void + */ + private function setConfig( + string $path, + string $value, + string $scopeType, + ?string $scopeCode = null + ): void { + if ($this->configStorage->checkIsRecordExist($path, $scopeType, $scopeCode)) { + $this->origConfigs[] = [ + 'path' => $path, + 'value' => $this->configStorage->getValueFromDb($path, $scopeType, $scopeCode), + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } else { + $this->notExistingOrigConfigs[] = [ + 'path' => $path, + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } + $this->config->setValue($path, $value, $scopeType, $scopeCode); + } + + private function restoreConfig() + { + foreach ($this->origConfigs as $origConfig) { + $this->config->setValue( + $origConfig['path'], + $origConfig['value'], + $origConfig['scopeType'], + $origConfig['scopeCode'] + ); + } + $this->origConfigs = []; + + foreach ($this->notExistingOrigConfigs as $notExistingOrigConfig) { + $this->configStorage->deleteConfigFromDb( + $notExistingOrigConfig['path'], + $notExistingOrigConfig['scopeType'], + $notExistingOrigConfig['scopeCode'] + ); + } + $this->notExistingOrigConfigs = []; + } +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php new file mode 100644 index 0000000000000..21c2da61c479d --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php @@ -0,0 +1,703 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\Directory; + +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\GraphQl\PageCache\GraphQLPageCacheAbstract; +use Magento\GraphQlCache\Model\CacheId\CacheIdCalculator; +use Magento\Store\Model\Group; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\Website; +use Magento\TestFramework\App\ApiMutableScopeConfig; +use Magento\TestFramework\Config\Model\ConfigStorage; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Test Country query cache + */ +class CountryCacheTest extends GraphQLPageCacheAbstract +{ + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + private $objectManager; + + /** + * @var ApiMutableScopeConfig + */ + private $config; + + /** + * @var ConfigStorage + */ + private $configStorage; + + /** + * @var array + */ + private $origConfigs = []; + + /** + * @var array + */ + private $notExistingOrigConfigs = []; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->configStorage = $this->objectManager->get(ConfigStorage::class); + $this->config = $this->objectManager->get(ApiMutableScopeConfig::class); + } + + /** + * Country query is cached + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testGetCountry() + { + // Query default store US country + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($this->getQuery('US')); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('US'), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('country', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['country']; + $this->assertEquals('US', $defaultStoreResponseResult['id']); + $this->assertEquals('US', $defaultStoreResponseResult['two_letter_abbreviation']); + $this->assertEquals('USA', $defaultStoreResponseResult['three_letter_abbreviation']); + $this->assertEquals('United States', $defaultStoreResponseResult['full_name_locale']); + $this->assertEquals('United States', $defaultStoreResponseResult['full_name_english']); + $this->assertCount(65, $defaultStoreResponseResult['available_regions']); + $this->assertArrayHasKey('id', $defaultStoreResponseResult['available_regions'][0]); + $this->assertArrayHasKey('code', $defaultStoreResponseResult['available_regions'][0]); + $this->assertArrayHasKey('name', $defaultStoreResponseResult['available_regions'][0]); + // Verify we obtain a cache HIT at the 2nd time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('US'), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('country', $defaultStoreResponse['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['country']; + $this->assertEquals('US', $defaultStoreResponseHitResult['id']); + $this->assertEquals('US', $defaultStoreResponseHitResult['two_letter_abbreviation']); + $this->assertEquals('USA', $defaultStoreResponseHitResult['three_letter_abbreviation']); + $this->assertEquals('United States', $defaultStoreResponseHitResult['full_name_locale']); + $this->assertEquals('United States', $defaultStoreResponseHitResult['full_name_english']); + $this->assertCount(65, $defaultStoreResponseHitResult['available_regions']); + $this->assertArrayHasKey('id', $defaultStoreResponseHitResult['available_regions'][0]); + $this->assertArrayHasKey('code', $defaultStoreResponseHitResult['available_regions'][0]); + $this->assertArrayHasKey('name', $defaultStoreResponseHitResult['available_regions'][0]); + + // Query test store US country + $testStoreCode = 'test'; + $responseTestStoreUsCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('US'), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStoreUsCountry['headers']); + $testStoreUsCountryCacheId = $responseTestStoreUsCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreUsCountryCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $testStoreUsCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('US'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreUsCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreUsCountryResponse['body']); + $testStoreUsCountryResponseResult = $testStoreUsCountryResponse['body']['country']; + $this->assertEquals('US', $testStoreUsCountryResponseResult['id']); + // Verify we obtain a cache HIT at the 2nd time + $testStoreUsCountryResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('US'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreUsCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreUsCountryResponseHit['body']); + $testStoreUsCountryResponseHitResult = $testStoreUsCountryResponseHit['body']['country']; + $this->assertEquals('US', $testStoreUsCountryResponseHitResult['id']); + + // Query test store DE country + $responseTestStoreDeCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('DE'), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStoreDeCountry['headers']); + $testStoreDeCountryCacheId = $responseTestStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $testStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreDeCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreDeCountryResponse['body']); + $testStoreDeCountryResponseResult = $testStoreDeCountryResponse['body']['country']; + $this->assertEquals('DE', $testStoreDeCountryResponseResult['id']); + $this->assertCount(16, $testStoreDeCountryResponseResult['available_regions']); + // Verify we obtain a cache HIT at the 2nd time + $testStoreDeCountryResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreDeCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreDeCountryResponseHit['body']); + $testStoreDeCountryResponseHitResult = $testStoreDeCountryResponseHit['body']['country']; + $this->assertEquals('DE', $testStoreDeCountryResponseHitResult['id']); + $this->assertCount(16, $testStoreDeCountryResponseHitResult['available_regions']); + } + + /** + * Store scoped country config change triggers purging only the cache of the changed store. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * test - base - main_website_store + * + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @magentoConfigFixture test_store general/locale/code en_US + * @magentoConfigFixture test_store general/country/allow US,DE + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithStoreScopeCountryConfigChange() + { + // Query default store US country + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($this->getQuery('US')); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseDefaultStore['headers']); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $defaultStoreResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('US'), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('country', $defaultStoreResponse['body']); + $defaultStoreResponseResult = $defaultStoreResponse['body']['country']; + $this->assertEquals('US', $defaultStoreResponseResult['id']); + + // Query test store US country + $testStoreCode = 'test'; + $responseTestStoreUsCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('US'), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStoreUsCountry['headers']); + $testStoreCacheId = $responseTestStoreUsCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $this->assertNotEquals($testStoreCacheId, $defaultStoreCacheId); + // Verify we obtain a cache MISS at the 1st time + $testStoreUsCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery("US"), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreUsCountryResponse['body']); + $testStoreUsCountryResponseResult = $testStoreUsCountryResponse['body']['country']; + $this->assertEquals('US', $testStoreUsCountryResponseResult['id']); + + // Query test store DE country + $responseTestStoreDeCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('DE'), + [], + '', + ['Store' => $testStoreCode] + ); + $this->assertArrayHasKey(CacheIdCalculator::CACHE_ID_HEADER, $responseTestStoreDeCountry['headers']); + $testStoreDeCountryCacheId = $responseTestStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $testStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery("DE"), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreDeCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreDeCountryResponse['body']); + $testStoreDeCountryResponseResult = $testStoreDeCountryResponse['body']['country']; + $this->assertEquals('DE', $testStoreDeCountryResponseResult['id']); + + // Change test store allowed country + $this->setConfig('general/country/allow', 'DE', ScopeInterface::SCOPE_STORE, $testStoreCode); + + // Query default store countries after test store country config is changed + // Verify we obtain a cache HIT at the 2nd time + $defaultStoreResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('US'), + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + $this->assertArrayHasKey('country', $defaultStoreResponseHit['body']); + $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['country']; + $this->assertArrayHasKey('US', $defaultStoreResponseHitResult['id']); + + // Query test store DE country after test store country config is changed + // Verify we obtain a cache MISS at the 2nd time + $testStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery("DE"), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreDeCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreDeCountryResponse['body']); + $testStoreDeCountryResponseResult = $testStoreDeCountryResponse['body']['country']; + $this->assertEquals('DE', $testStoreDeCountryResponseResult['id']); + // Verify we obtain a cache HIT at the 3rd time + $testStoreDeCountryResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery("DE"), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreDeCountryCacheId, + 'Store' => $testStoreCode + ] + ); + $this->assertArrayHasKey('country', $testStoreDeCountryResponseHit['body']); + $testStoreDeCountryResponseHitResult = $testStoreDeCountryResponseHit['body']['country']; + $this->assertEquals('DE', $testStoreDeCountryResponseHitResult['id']); + + // Query test store US country after test store country config is changed + // Verify we obtain a cache MISS at the 2nd time + $this->expectException(\Exception::class); + $this->expectExceptionMessage('GraphQL response contains errors: The country isn\'t available.'); + $this->assertCacheMissAndReturnResponse( + $this->getQuery('US'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $testStoreCacheId, + 'Store' => $testStoreCode + ] + ); + } + + /** + * Website scope country config change triggers purging only the cache of the stores + * associated with the changed website. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - second - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithWebsiteScopeCountryConfigChange(): void + { + $this->changeToTwoWebsitesThreeStoreGroupsThreeStores(); + $query = $this->getQuery('US'); + + // Query default store US country + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store US country + $secondStoreCode = 'second_store_view'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store US country + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + + // Change second website allowed country + $this->setConfig('general/country/allow', 'US,DE', ScopeInterface::SCOPE_WEBSITES, 'second'); + + // Query default store countries after the country config of the second website is changed + // Verify we obtain a cache HIT at the 2nd time, the cache is not purged + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store US country after the country config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query second store DE country after the country config of its associated second website is changed + $responsesecondStoreDeCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('DE'), + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreDeCountryCacheId = $responsesecondStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time, the cache is purged + $secondStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreDeCountryCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('country', $secondStoreDeCountryResponse['body']); + $secondStoreDeCountryResponseResult = $secondStoreDeCountryResponse['body']['country']; + $this->assertEquals('DE', $secondStoreDeCountryResponseResult['id']); + // Verify we obtain a cache HIT at the 2nd time + $secondStoreDeCountryResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreDeCountryCacheId, + 'Store' => $secondStoreCode + ] + ); + $this->assertArrayHasKey('country', $secondStoreDeCountryResponseHit['body']); + $secondStoreDeCountryResponseHitResult = $secondStoreDeCountryResponseHit['body']['country']; + $this->assertEquals('DE', $secondStoreDeCountryResponseHitResult['id']); + + // Query third store US country after the country config of its associated second website is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + + // Query third store DE country after the country config of its associated second website is changed + $responseThirdStoreDeCountry = $this->graphQlQueryWithResponseHeaders( + $this->getQuery('DE'), + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreDeCountryCacheId = $responseThirdStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time, the cache is purged + $thirdStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreDeCountryCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertArrayHasKey('country', $thirdStoreDeCountryResponse['body']); + $thirdStoreDeCountryResponseResult = $thirdStoreDeCountryResponse['body']['country']; + $this->assertEquals('DE', $thirdStoreDeCountryResponseResult['id']); + // Verify we obtain a cache HIT at the 2nd time + $thirdStoreDeCountryResponseHit = $this->assertCacheHitAndReturnResponse( + $this->getQuery('DE'), + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreDeCountryCacheId, + 'Store' => $thirdStoreCode + ] + ); + $this->assertArrayHasKey('country', $thirdStoreDeCountryResponseHit['body']); + $thirdStoreDeCountryResponseHitResult = $thirdStoreDeCountryResponseHit['body']['country']; + $this->assertEquals('DE', $thirdStoreDeCountryResponseHitResult['id']); + } + + /** + * Default scope country config change triggers purging the cache of all stores. + * + * Test stores set up: + * STORE - WEBSITE - STORE GROUP + * default - base - main_website_store + * second_store_view - second - second_store + * third_store_view - third - third_store + * + * @magentoConfigFixture default/system/full_page_cache/caching_application 2 + * @magentoApiDataFixture Magento/Store/_files/multiple_websites_with_store_groups_stores.php + * @magentoConfigFixture default/general/locale/code en_US + * @magentoConfigFixture default/general/country/allow US + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testCachePurgedWithDefaultScopeCountryConfigChange(): void + { + $query = $this->getQuery('US'); + + // Query default store countries + $responseDefaultStore = $this->graphQlQueryWithResponseHeaders($query); + $defaultStoreCacheId = $responseDefaultStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries + $secondStoreCode = 'second_store_view'; + $responseSecondStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $secondStoreCode] + ); + $secondStoreCacheId = $responseSecondStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store config + $thirdStoreCode = 'third_store_view'; + $responseThirdStore = $this->graphQlQueryWithResponseHeaders( + $query, + [], + '', + ['Store' => $thirdStoreCode] + ); + $thirdStoreCacheId = $responseThirdStore['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + // Verify we obtain a cache MISS at the 1st time + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + + // Change default allowed country + $this->setConfig('general/country/allow', 'US,DE', ScopeConfigInterface::SCOPE_TYPE_DEFAULT); + + // Query default store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $this->assertCacheMissAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [CacheIdCalculator::CACHE_ID_HEADER => $defaultStoreCacheId] + ); + + // Query second store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $secondStoreCacheId, + 'Store' => $secondStoreCode + ] + ); + + // Query third store countries after the default country config is changed + // Verify we obtain a cache MISS at the 2nd time, the cache is purged + $this->assertCacheMissAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + // Verify we obtain a cache HIT at the 3rd time + $this->assertCacheHitAndReturnResponse( + $query, + [ + CacheIdCalculator::CACHE_ID_HEADER => $thirdStoreCacheId, + 'Store' => $thirdStoreCode + ] + ); + } + + private function changeToTwoWebsitesThreeStoreGroupsThreeStores() + { + /** @var $website2 \Magento\Store\Model\Website */ + $website2 = $this->objectManager->create(Website::class); + $website2Id = $website2->load('second', 'code')->getId(); + + // Change third store to the same website of second store + /** @var Store $store3 */ + $store3 = $this->objectManager->create(Store::class); + $store3->load('third_store_view', 'code'); + $store3GroupId = $store3->getStoreGroupId(); + /** @var Group $store3Group */ + $store3Group = $this->objectManager->create(Group::class); + $store3Group->load($store3GroupId)->setWebsiteId($website2Id)->save(); + $store3->setWebsiteId($website2Id)->save(); + } + + /** + * Get query + * + * @param string $countryId + * @return string + */ + private function getQuery(string $countryId): string + { + return <<<QUERY +query { + country(id: {$countryId}) { + id + two_letter_abbreviation + three_letter_abbreviation + full_name_locale + full_name_english + available_regions { + id + code + name + } + } +} +QUERY; + } + + protected function tearDown(): void + { + $this->restoreConfig(); + parent::tearDown(); + } + + /** + * Set configuration + * + * @param string $path + * @param string $value + * @param string $scopeType + * @param string|null $scopeCode + * @return void + */ + private function setConfig( + string $path, + string $value, + string $scopeType, + ?string $scopeCode = null + ): void { + if ($this->configStorage->checkIsRecordExist($path, $scopeType, $scopeCode)) { + $this->origConfigs[] = [ + 'path' => $path, + 'value' => $this->configStorage->getValueFromDb($path, $scopeType, $scopeCode), + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } else { + $this->notExistingOrigConfigs[] = [ + 'path' => $path, + 'scopeType' => $scopeType, + 'scopeCode' => $scopeCode + ]; + } + $this->config->setValue($path, $value, $scopeType, $scopeCode); + } + + private function restoreConfig() + { + foreach ($this->origConfigs as $origConfig) { + $this->config->setValue( + $origConfig['path'], + $origConfig['value'], + $origConfig['scopeType'], + $origConfig['scopeCode'] + ); + } + $this->origConfigs = []; + + foreach ($this->notExistingOrigConfigs as $notExistingOrigConfig) { + $this->configStorage->deleteConfigFromDb( + $notExistingOrigConfig['path'], + $notExistingOrigConfig['scopeType'], + $notExistingOrigConfig['scopeCode'] + ); + } + $this->notExistingOrigConfigs = []; + } +} From 5df3908445ad491267c3e3c24e1e5429e713be32 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 28 Feb 2023 10:25:50 -0600 Subject: [PATCH 950/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php | 2 +- .../testsuite/Magento/GraphQl/Directory/CountryCacheTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php index 6c095b6603f6c..d14f3a299a9d8 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php @@ -197,7 +197,7 @@ public function testCachePurgedWithStoreScopeCountryConfigChange() $this->assertArrayHasKey('countries', $defaultStoreResponseHit['body']); $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['countries']; $this->assertCount(1, $defaultStoreResponseHitResult); - $this->assertArrayHasKey('US', $defaultStoreResponseHitResult[0]['id']); + $this->assertEquals('US', $defaultStoreResponseHitResult[0]['id']); // Query test store countries after test store country config is changed // Verify we obtain a cache MISS at the 2nd time diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php index 21c2da61c479d..cba43be7275bf 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php @@ -268,7 +268,7 @@ public function testCachePurgedWithStoreScopeCountryConfigChange() ); $this->assertArrayHasKey('country', $defaultStoreResponseHit['body']); $defaultStoreResponseHitResult = $defaultStoreResponseHit['body']['country']; - $this->assertArrayHasKey('US', $defaultStoreResponseHitResult['id']); + $this->assertEquals('US', $defaultStoreResponseHitResult['id']); // Query test store DE country after test store country config is changed // Verify we obtain a cache MISS at the 2nd time From a529382813dadeac61c116d1c73cc11c47db83b8 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 28 Feb 2023 12:08:55 -0600 Subject: [PATCH 951/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../CurrencyTagGenerator.php} | 34 +++++------- app/code/Magento/DirectoryGraphQl/etc/di.xml | 8 +-- .../Tag/Strategy/CompositeTagGenerator.php | 42 +++++++++++++++ .../Tag/Strategy/TagGeneratorInterface.php | 24 +++++++++ .../Cache/Tag/Strategy/ConfigTagGenerator.php | 54 +++++++++++++++++++ .../Model/Cache/Tag/Strategy/StoreConfig.php | 30 +++-------- app/code/Magento/StoreGraphQl/etc/di.xml | 20 ++++++- 7 files changed, 163 insertions(+), 49 deletions(-) rename app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/{CurrencyConfig.php => Config/CurrencyTagGenerator.php} (55%) create mode 100644 app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php create mode 100644 app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/TagGeneratorInterface.php create mode 100644 app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/ConfigTagGenerator.php diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CurrencyTagGenerator.php similarity index 55% rename from app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php rename to app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CurrencyTagGenerator.php index e15ea0384f62a..cbadda1b2e453 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CurrencyConfig.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CurrencyTagGenerator.php @@ -5,18 +5,18 @@ */ declare(strict_types=1); -namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; +namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Config; use Magento\DirectoryGraphQl\Model\Resolver\Currency\Identity; -use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; +use Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface; /** - * Produce cache tags for currency config. + * Generator that generates cache tags for currency configuration */ -class CurrencyConfig implements StrategyInterface +class CurrencyTagGenerator implements TagGeneratorInterface { /** * @var string[] @@ -45,31 +45,23 @@ public function __construct( /** * @inheritdoc */ - public function getTags($object): array + public function generateTags(ValueInterface $config): array { - if (!is_object($object)) { - throw new \InvalidArgumentException('Provided argument is not an object'); - } - - if ($object instanceof ValueInterface - && in_array($object->getPath(), $this->currencyConfigPaths) - && $object->isValueChanged() - ) { - if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { - $website = $this->storeManager->getWebsite($object->getScopeId()); + if (in_array($config->getPath(), $this->currencyConfigPaths)) { + if ($config->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($config->getScopeId()); $storeIds = $website->getStoreIds(); - } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { - $storeIds = [$object->getScopeId()]; + } elseif ($config->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$config->getScopeId()]; } else { $storeIds = array_keys($this->storeManager->getStores()); } - $ids = []; + $tags = []; foreach ($storeIds as $storeId) { - $ids[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); + $tags[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); } - return $ids; + return $tags; } - return []; } } diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml index 99306f57bfa29..3513eeeed2443 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/di.xml +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -6,11 +6,11 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> - <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> + <type name="Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator"> <arguments> - <argument name="customStrategies" xsi:type="array"> - <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> - Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CurrencyConfig + <argument name="tagGenerators" xsi:type="array"> + <item name="currency_tag_generator" xsi:type="object"> + Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Config\CurrencyTagGenerator </item> </argument> </arguments> diff --git a/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php new file mode 100644 index 0000000000000..91e7742ed3348 --- /dev/null +++ b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php @@ -0,0 +1,42 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Store\Model\Config\Cache\Tag\Strategy; + +use Magento\Framework\App\Config\ValueInterface; + +/** + * Composite tag generator that generates cache tags for store configurations. + */ +class CompositeTagGenerator implements TagGeneratorInterface +{ + /** + * @var TagGeneratorInterface[] + */ + private $tagGenerators; + + /** + * @param TagGeneratorInterface[] $tagGenerators + */ + public function __construct( + array $tagGenerators + ) { + $this->tagGenerators = $tagGenerators; + } + + /** + * @inheritdoc + */ + public function generateTags(ValueInterface $config): array + { + $tags = []; + foreach ($this->tagGenerators as $tagGenerator) { + $tags = array_merge($tags, $tagGenerator->generateTags($config)); + } + return $tags; + } +} diff --git a/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/TagGeneratorInterface.php b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/TagGeneratorInterface.php new file mode 100644 index 0000000000000..ef7342eb61c05 --- /dev/null +++ b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/TagGeneratorInterface.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Store\Model\Config\Cache\Tag\Strategy; + +use Magento\Framework\App\Config\ValueInterface; + +/** + * Store configuration cache tag generator interface + */ +interface TagGeneratorInterface +{ + /** + * Generate cache tags with given store configuration + * + * @param ValueInterface $config + * @return array + */ + public function generateTags(ValueInterface $config): array; +} diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/ConfigTagGenerator.php b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/ConfigTagGenerator.php new file mode 100644 index 0000000000000..505d1965c4504 --- /dev/null +++ b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/ConfigTagGenerator.php @@ -0,0 +1,54 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\StoreGraphQl\Model\Cache\Tag\Strategy; + +use Magento\Framework\App\Config\ValueInterface; +use Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; + +/** + * Generator that generates cache tags for store configuration. + */ +class ConfigTagGenerator implements TagGeneratorInterface +{ + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @param StoreManagerInterface $storeManager + */ + public function __construct( + StoreManagerInterface $storeManager + ) { + $this->storeManager = $storeManager; + } + + /** + * @inheritdoc + */ + public function generateTags(ValueInterface $config): array + { + if ($config->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($config->getScopeId()); + $storeIds = $website->getStoreIds(); + } elseif ($config->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$config->getScopeId()]; + } else { + $storeIds = array_keys($this->storeManager->getStores()); + } + $tags = []; + foreach ($storeIds as $storeId) { + $tags[] = sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $storeId); + } + return $tags; + } +} diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php index 9e027be40500f..4fd92306720a9 100644 --- a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php +++ b/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php @@ -9,9 +9,7 @@ use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; -use Magento\Store\Model\ScopeInterface; -use Magento\Store\Model\StoreManagerInterface; -use Magento\StoreGraphQl\Model\Resolver\Store\ConfigIdentity; +use Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface; /** * Produce cache tags for store config. @@ -19,18 +17,16 @@ class StoreConfig implements StrategyInterface { /** - * @var StoreManagerInterface + * @var \Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface */ - private $storeManager; + private $tagGenerator; - /** - * @param StoreManagerInterface $storeManager - */ public function __construct( - StoreManagerInterface $storeManager + TagGeneratorInterface $tagGenerator ) { - $this->storeManager = $storeManager; + $this->tagGenerator = $tagGenerator; } + /** * @inheritdoc */ @@ -41,19 +37,7 @@ public function getTags($object): array } if ($object instanceof ValueInterface && $object->isValueChanged()) { - if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { - $website = $this->storeManager->getWebsite($object->getScopeId()); - $storeIds = $website->getStoreIds(); - } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { - $storeIds = [$object->getScopeId()]; - } else { - $storeIds = array_keys($this->storeManager->getStores()); - } - $ids = []; - foreach ($storeIds as $storeId) { - $ids[] = sprintf('%s_%s', ConfigIdentity::CACHE_TAG, $storeId); - } - return $ids; + return $this->tagGenerator->generateTags($object); } return []; diff --git a/app/code/Magento/StoreGraphQl/etc/di.xml b/app/code/Magento/StoreGraphQl/etc/di.xml index 0390fc860e832..634cef661df5c 100644 --- a/app/code/Magento/StoreGraphQl/etc/di.xml +++ b/app/code/Magento/StoreGraphQl/etc/di.xml @@ -9,7 +9,25 @@ <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> <arguments> <argument name="customStrategies" xsi:type="array"> - <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object">Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig</item> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> + Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig + </item> + </argument> + </arguments> + </type> + <type name="Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig"> + <arguments> + <argument name="tagGenerator" xsi:type="object"> + Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator + </argument> + </arguments> + </type> + <type name="Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator"> + <arguments> + <argument name="tagGenerators" xsi:type="array"> + <item name="store_config_tag_generator" xsi:type="object"> + Magento\StoreGraphQl\Model\Cache\Tag\Strategy\ConfigTagGenerator + </item> </argument> </arguments> </type> From 4115913e42284a7bb8db800b35506863d8ad5082 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Tue, 28 Feb 2023 14:20:59 -0600 Subject: [PATCH 952/985] B2B-2258: Add caching capability to the storeConfig GraphQl query --- .../Cache/Tag/Strategy/CompositeTagGenerator.php | 6 +++--- .../Config}/Cache/Tag/Strategy/StoreConfig.php | 8 +++++--- app/code/Magento/Store/etc/di.xml | 16 ++++++++++++++++ app/code/Magento/StoreGraphQl/etc/di.xml | 16 ---------------- 4 files changed, 24 insertions(+), 22 deletions(-) rename app/code/Magento/{StoreGraphQl/Model => Store/Model/Config}/Cache/Tag/Strategy/StoreConfig.php (81%) diff --git a/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php index 91e7742ed3348..61c21d4087025 100644 --- a/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php +++ b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/CompositeTagGenerator.php @@ -33,10 +33,10 @@ public function __construct( */ public function generateTags(ValueInterface $config): array { - $tags = []; + $tagsArray = []; foreach ($this->tagGenerators as $tagGenerator) { - $tags = array_merge($tags, $tagGenerator->generateTags($config)); + $tagsArray[] = $tagGenerator->generateTags($config); } - return $tags; + return array_merge(...$tagsArray); } } diff --git a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/StoreConfig.php similarity index 81% rename from app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php rename to app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/StoreConfig.php index 4fd92306720a9..1498308213532 100644 --- a/app/code/Magento/StoreGraphQl/Model/Cache/Tag/Strategy/StoreConfig.php +++ b/app/code/Magento/Store/Model/Config/Cache/Tag/Strategy/StoreConfig.php @@ -5,11 +5,10 @@ */ declare(strict_types=1); -namespace Magento\StoreGraphQl\Model\Cache\Tag\Strategy; +namespace Magento\Store\Model\Config\Cache\Tag\Strategy; use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; -use Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface; /** * Produce cache tags for store config. @@ -17,10 +16,13 @@ class StoreConfig implements StrategyInterface { /** - * @var \Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface + * @var TagGeneratorInterface */ private $tagGenerator; + /** + * @param TagGeneratorInterface $tagGenerator + */ public function __construct( TagGeneratorInterface $tagGenerator ) { diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 984a16eb34965..0698795753964 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -457,4 +457,20 @@ </argument> </arguments> </type> + <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> + <arguments> + <argument name="customStrategies" xsi:type="array"> + <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> + Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig + </item> + </argument> + </arguments> + </type> + <type name="Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig"> + <arguments> + <argument name="tagGenerator" xsi:type="object"> + Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/StoreGraphQl/etc/di.xml b/app/code/Magento/StoreGraphQl/etc/di.xml index 634cef661df5c..2405641e9476b 100644 --- a/app/code/Magento/StoreGraphQl/etc/di.xml +++ b/app/code/Magento/StoreGraphQl/etc/di.xml @@ -6,22 +6,6 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> - <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> - <arguments> - <argument name="customStrategies" xsi:type="array"> - <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> - Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig - </item> - </argument> - </arguments> - </type> - <type name="Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig"> - <arguments> - <argument name="tagGenerator" xsi:type="object"> - Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator - </argument> - </arguments> - </type> <type name="Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator"> <arguments> <argument name="tagGenerators" xsi:type="array"> From 9a83d264b6528cd25a791eea6ec1c287a33a3eb8 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 1 Mar 2023 09:16:24 -0600 Subject: [PATCH 953/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../CountryTagGenerator.php} | 34 +++++++------------ app/code/Magento/DirectoryGraphQl/etc/di.xml | 10 ++---- 2 files changed, 15 insertions(+), 29 deletions(-) rename app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/{CountryConfig.php => Config/CountryTagGenerator.php} (53%) diff --git a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CountryTagGenerator.php similarity index 53% rename from app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php rename to app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CountryTagGenerator.php index db010f6b2ead3..16ba9dcab769b 100644 --- a/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/CountryConfig.php +++ b/app/code/Magento/DirectoryGraphQl/Model/Cache/Tag/Strategy/Config/CountryTagGenerator.php @@ -5,18 +5,18 @@ */ declare(strict_types=1); -namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy; +namespace Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Config; use Magento\DirectoryGraphQl\Model\Resolver\Country\Identity; -use Magento\Framework\App\Cache\Tag\StrategyInterface; use Magento\Framework\App\Config\ValueInterface; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; +use Magento\Store\Model\Config\Cache\Tag\Strategy\TagGeneratorInterface; /** - * Produce cache tags for country config. + * Generator that generates cache tags for country configuration */ -class CountryConfig implements StrategyInterface +class CountryTagGenerator implements TagGeneratorInterface { /** * @var string[] @@ -43,31 +43,23 @@ public function __construct( /** * @inheritdoc */ - public function getTags($object): array + public function generateTags(ValueInterface $config): array { - if (!is_object($object)) { - throw new \InvalidArgumentException('Provided argument is not an object'); - } - - if ($object instanceof ValueInterface - && in_array($object->getPath(), $this->countryConfigPaths) - && $object->isValueChanged() - ) { - if ($object->getScope() == ScopeInterface::SCOPE_WEBSITES) { - $website = $this->storeManager->getWebsite($object->getScopeId()); + if (in_array($config->getPath(), $this->countryConfigPaths)) { + if ($config->getScope() == ScopeInterface::SCOPE_WEBSITES) { + $website = $this->storeManager->getWebsite($config->getScopeId()); $storeIds = $website->getStoreIds(); - } elseif ($object->getScope() == ScopeInterface::SCOPE_STORES) { - $storeIds = [$object->getScopeId()]; + } elseif ($config->getScope() == ScopeInterface::SCOPE_STORES) { + $storeIds = [$config->getScopeId()]; } else { $storeIds = array_keys($this->storeManager->getStores()); } - $ids = []; + $tags = []; foreach ($storeIds as $storeId) { - $ids[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); + $tags[] = sprintf('%s_%s', Identity::CACHE_TAG, $storeId); } - return $ids; + return $tags; } - return []; } } diff --git a/app/code/Magento/DirectoryGraphQl/etc/di.xml b/app/code/Magento/DirectoryGraphQl/etc/di.xml index 708f47fd0bdb7..19b8495c66b67 100644 --- a/app/code/Magento/DirectoryGraphQl/etc/di.xml +++ b/app/code/Magento/DirectoryGraphQl/etc/di.xml @@ -12,14 +12,8 @@ <item name="currency_tag_generator" xsi:type="object"> Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Config\CurrencyTagGenerator </item> - </argument> - </arguments> - </type> - <type name="Magento\Framework\App\Cache\Tag\Strategy\Factory"> - <arguments> - <argument name="customStrategies" xsi:type="array"> - <item name="Magento\Framework\App\Config\ValueInterface" xsi:type="object"> - Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\CountryConfig + <item name="country_tag_generator" xsi:type="object"> + Magento\DirectoryGraphQl\Model\Cache\Tag\Strategy\Config\CountryTagGenerator </item> </argument> </arguments> From d861e54befa9bb8ac90670b67a20c4d725eae8e4 Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Wed, 1 Mar 2023 15:12:08 -0600 Subject: [PATCH 954/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../Magento/GraphQl/Directory/CountriesCacheTest.php | 2 +- .../testsuite/Magento/GraphQl/Directory/CountryCacheTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php index d14f3a299a9d8..c36208f28a73f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesCacheTest.php @@ -19,7 +19,7 @@ use Magento\TestFramework\Helper\Bootstrap; /** - * Test Coutries query cache + * Test Countries query cache */ class CountriesCacheTest extends GraphQLPageCacheAbstract { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php index cba43be7275bf..447bcd19cc359 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryCacheTest.php @@ -402,13 +402,13 @@ public function testCachePurgedWithWebsiteScopeCountryConfigChange(): void ); // Query second store DE country after the country config of its associated second website is changed - $responsesecondStoreDeCountry = $this->graphQlQueryWithResponseHeaders( + $responseSecondStoreDeCountry = $this->graphQlQueryWithResponseHeaders( $this->getQuery('DE'), [], '', ['Store' => $secondStoreCode] ); - $secondStoreDeCountryCacheId = $responsesecondStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; + $secondStoreDeCountryCacheId = $responseSecondStoreDeCountry['headers'][CacheIdCalculator::CACHE_ID_HEADER]; // Verify we obtain a cache MISS at the 1st time, the cache is purged $secondStoreDeCountryResponse = $this->assertCacheMissAndReturnResponse( $this->getQuery('DE'), From eb49dab856fd9e09ecb1b319040813b9caad8a1c Mon Sep 17 00:00:00 2001 From: Joan He <johe@adobe.com> Date: Thu, 2 Mar 2023 09:20:53 -0600 Subject: [PATCH 955/985] B2B-2256: "countries" and "country" GraphQl query has no cache identity --- .../testsuite/Magento/GraphQl/Directory/CountriesTest.php | 2 +- .../testsuite/Magento/GraphQl/Directory/CountryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php index 8f045ca0ae07c..15f1c4d12c855 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountriesTest.php @@ -10,7 +10,7 @@ use Magento\TestFramework\TestCase\GraphQlAbstract; /** - * Test the GraphQL endpoint's Coutries query + * Test the GraphQL endpoint's Countries query */ class CountriesTest extends GraphQlAbstract { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php index f5d9c2b15d4ab..2552c96c5b482 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CountryTest.php @@ -10,7 +10,7 @@ use Magento\TestFramework\TestCase\GraphQlAbstract; /** - * Test the GraphQL endpoint's Coutries query + * Test the GraphQL endpoint's Countries query */ class CountryTest extends GraphQlAbstract { From 586ae9db64c8480022680852c3d29b75d8411841 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 9 Feb 2023 10:22:13 +0530 Subject: [PATCH 956/985] ACQE-4569 --- .../AttributePropertiesSection.xml | 2 +- ...SavingCustomAttributeValuesUsingUITest.xml | 116 ++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributePropertiesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributePropertiesSection.xml index aa86573044279..021057e06e7ef 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributePropertiesSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributePropertiesSection.xml @@ -25,7 +25,7 @@ <element name="addSwatch" type="button" selector="#add_new_swatch_text_option_button"/> <element name="dropdownAddOptions" type="button" selector="#add_new_option_button" timeout="30"/> <element name="storefrontProperties" type="text" selector="//*[@id='product_attribute_tabs_front']/span[1]"/> - + <element name="useInSearchResultsLayeredNavigation" type="select" selector="#is_filterable_in_search"/> <!-- Manage Options nth child--> <element name="dropdownNthOptionIsDefault" type="checkbox" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) .input-radio" parameterized="true"/> <element name="dropdownNthOptionAdmin" type="textarea" selector="tbody[data-role='options-container'] tr:nth-child({{var}}) td:nth-child(3) input" parameterized="true"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml new file mode 100644 index 0000000000000..3deddfecf9d7a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="SavingCustomAttributeValuesUsingUITest"> + <annotations> + <group value="Custom Attribute"/> + <stories value="Create Customer Attribute with Multi Select Input Type"/> + <title value="Saving custom attribute values using UI"/> + <description value="Saving custom attribute values using UI"/> + <severity value="MAJOR"/> + <testCaseId value="AC-7325"/> + </annotations> + + <before> + <!--Login as admin--> + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> + <!-- Create Simple Product --> + <createData entity="SimpleProduct" stepKey="createSimpleProduct"/> + <!--Navigate to Stores > Attributes > Product.--> + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> + + <!--Create new Product Attribute as TextField, with code and default value.--> + <actionGroup ref="CreateProductAttributeActionGroup" stepKey="createAttribute"> + <argument name="attribute" value="multiselectProductAttribute"/> + </actionGroup> + + <!--Navigate to Product Attribute, add Product Options and Save - 1--> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage1"> + <argument name="ProductAttribute" value="{{multiselectProductAttribute.attribute_code}}"/> + </actionGroup> + <actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption1"> + <argument name="adminName" value="{{multiselectProductAttribute.option1_admin}}"/> + <argument name="frontName" value="{{multiselectProductAttribute.option1_frontend}}"/> + <argument name="row" value="1"/> + </actionGroup> + <actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption2"> + <argument name="adminName" value="{{multiselectProductAttribute.option2_admin}}"/> + <argument name="frontName" value="{{multiselectProductAttribute.option2_frontend}}"/> + <argument name="row" value="2"/> + </actionGroup> + <actionGroup ref="CreateAttributeDropdownNthOptionActionGroup" stepKey="createOption3"> + <argument name="adminName" value="{{multiselectProductAttribute.option3_admin}}"/> + <argument name="frontName" value="{{multiselectProductAttribute.option3_frontend}}"/> + <argument name="row" value="3"/> + </actionGroup> + + <actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setDropdownUseInLayeredNavigationNoResults"> + <argument name="useInLayeredNavigationValue" value="Filterable (with results)"/> + </actionGroup> + <selectOption selector="{{AttributePropertiesSection.useInSearchResultsLayeredNavigation}}" userInput="Yes" stepKey="selectUseInLayeredNavigationOption"/> + <click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/> + + <magentoCron groups="index" stepKey="reindex"/> + </before> + <after> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteFirstProduct"/> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> + <argument name="ProductAttribute" value="{{multiselectProductAttribute.attribute_code}}"/> + </actionGroup> + <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> + <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> + <waitForPageLoad stepKey="waitForDeletion"/> + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> + <argument name="indices" value=""/> + </actionGroup> + <!--Log out--> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> + </after> + + <!-- Open created product for edit --> + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> + <argument name="productId" value="$createSimpleProduct.id$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickAddAttributeBtn"/> + <waitForPageLoad stepKey="waitForAttributeAdded"/> + <!-- Filter By Attribute Label on Add Attribute Page --> + <click selector="{{AdminProductFiltersSection.filter}}" stepKey="clickOnFilter"/> + <fillField selector="{{AdminProductAddAttributeModalSection.attributeCodeFilter}}" userInput="{{multiselectProductAttribute.attribute_code}}" stepKey="fillAttrCodeField" /> + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" /> + <click stepKey="clickonFirstRow" selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}"/> + <click stepKey="clickOnAddSelected" selector="{{AdminProductAttributeGridSection.addSelected}}"/> + <waitForPageLoad stepKey="waitForAttributeAdded2"/> + + <!--<actionGroup ref="FilterProductAttributeByAttributeCodeActionGroup" stepKey="filterByAttributeCode"> + <argument name="ProductAttributeCode" value="$$createAttribute.attribute_code$$"/> + </actionGroup>--> + <!-- Expand 'Attributes' tab --> + <actionGroup ref="AdminExpandProductAttributesTabActionGroup" stepKey="expandAttributesTab"/> + <!-- Check created attribute presents in the 'Attributes' tab --> + <seeElement selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" stepKey="assertAttributeIsPresentInTab"/> + <!-- Select attribute options --> + <!--<selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" parameterArray="multiselectProductAttribute.option1_admin" stepKey="selectAttributeOptions"/>--> + <selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" userInput="{{multiselectProductAttribute.option1_admin}}" stepKey="selectProduct1AttributeOption"/> + <!-- Save product --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> + + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToFrontPage"/> + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> + <argument name="phrase" value="$createSimpleProduct.name$"/> + </actionGroup> + <waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" stepKey="waitForAttributeVisible"/> + <conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandAttribute"/> + <waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForAttributeOptionsVisible"/> + <wait time="90" stepKey="Wait"/> + <see selector="{{StorefrontCategorySidebarSection.filterOption}}" userInput="{{multiselectProductAttribute.option1_frontend}}" stepKey="seeOption2"/> + </test> +</tests> From 1039f375c169d67621b4ac883baefc53941e4a72 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Thu, 9 Feb 2023 11:33:51 +0530 Subject: [PATCH 957/985] ACQE-4569 --- .../Mftf/Section/AdminProductAttributeGridSection.xml | 1 + .../Test/SavingCustomAttributeValuesUsingUITest.xml | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml index e4b33ac795559..455cde4c1d70c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductAttributeGridSection.xml @@ -23,6 +23,7 @@ <element name="scopeColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_global')]"/> <element name="isSearchableColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_searchable')]"/> <element name="isComparableColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_comparable')]"/> + <element name="addSelected" type="button" selector="//*[contains(text(),'Add Selected')]" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml index 3deddfecf9d7a..bb59482dbc782 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/SavingCustomAttributeValuesUsingUITest.xml @@ -89,28 +89,24 @@ <click stepKey="clickonFirstRow" selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}"/> <click stepKey="clickOnAddSelected" selector="{{AdminProductAttributeGridSection.addSelected}}"/> <waitForPageLoad stepKey="waitForAttributeAdded2"/> - - <!--<actionGroup ref="FilterProductAttributeByAttributeCodeActionGroup" stepKey="filterByAttributeCode"> - <argument name="ProductAttributeCode" value="$$createAttribute.attribute_code$$"/> - </actionGroup>--> <!-- Expand 'Attributes' tab --> <actionGroup ref="AdminExpandProductAttributesTabActionGroup" stepKey="expandAttributesTab"/> <!-- Check created attribute presents in the 'Attributes' tab --> <seeElement selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" stepKey="assertAttributeIsPresentInTab"/> <!-- Select attribute options --> - <!--<selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" parameterArray="multiselectProductAttribute.option1_admin" stepKey="selectAttributeOptions"/>--> <selectOption selector="{{AdminProductAttributesSection.attributeDropdownByCode(multiselectProductAttribute.attribute_code)}}" userInput="{{multiselectProductAttribute.option1_admin}}" stepKey="selectProduct1AttributeOption"/> <!-- Save product --> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> - + <!-- Go to Storefront and search for product--> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToFrontPage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> <argument name="phrase" value="$createSimpleProduct.name$"/> </actionGroup> + <!-- Assert custom Attribute in Layered Navigation--> <waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" stepKey="waitForAttributeVisible"/> <conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle(multiselectProductAttribute.attribute_code)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandAttribute"/> <waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForAttributeOptionsVisible"/> - <wait time="90" stepKey="Wait"/> + <wait time="10" stepKey="Wait"/> <see selector="{{StorefrontCategorySidebarSection.filterOption}}" userInput="{{multiselectProductAttribute.option1_frontend}}" stepKey="seeOption2"/> </test> </tests> From f0d90da7f6761165a976c05b00cd1e31ecf86cc5 Mon Sep 17 00:00:00 2001 From: shanthi <shanthi@BLR1-LMC-N71382.local> Date: Tue, 31 Jan 2023 13:48:06 +0530 Subject: [PATCH 958/985] ACQE-4558 --- .../Test/Mftf/Section/AdminCustomerAccountInformationSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml index 1752cb6d04c3d..0eabfecb47aef 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml @@ -38,5 +38,6 @@ <element name="customerAttribute" type="input" selector="//input[contains(@name,'{{attributeCode}}')]" parameterized="true"/> <element name="attributeImage" type="block" selector="//div[contains(concat(' ',normalize-space(@class),' '),' file-uploader-preview ')]//img"/> <element name="dateOfBirthValidationErrorField" type="text" selector="input[name='customer[dob]'] ~ label.admin__field-error"/> + <element name="customerAttributeNew" type="input" selector="(//input[contains(@name,'{{attributeCode}}')])[{{index}}]" parameterized="true"/> </section> </sections> From e1f276dcc2382955a689d6ee5b738f158217d7db Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:39:00 +0530 Subject: [PATCH 959/985] Update AdminDeleteUserViaCurlActionGroup.xml --- .../Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml index 516fe9ebac09d..c508e08a30067 100644 --- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml @@ -14,7 +14,6 @@ <amOnPage stepKey="amOnAdminUsersPage" url="{{AdminUsersPage.url}}"/> <waitForPageLoad stepKey="waitForAdminUserPageLoad"/> <click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" /> - <scrollTo selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="scrollToUserId"></scrollTo> <waitForElementVisible selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="waitForUserIdVisible"></waitForElementVisible> <grabTextFrom selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="userId" /> From 15c92b0744eff43d64fb365bf9e5faff6321d14f Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:39:58 +0530 Subject: [PATCH 960/985] Update AdminUserLockWhenEditingUserTest.xml --- .../Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml index 30f112a4ecc3a..5b4f38ae30566 100644 --- a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml +++ b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml @@ -18,7 +18,6 @@ <testCaseId value="MC-14372" /> <group value="security"/> <group value="mtf_migrated"/> - <group value="pr_exclude"/> </annotations> <before> <createData entity="NewAdminUser" stepKey="user" /> From afc89f8d62cb9fe455d435ac1a72b57688146b7c Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 28 Feb 2023 09:33:45 +0530 Subject: [PATCH 961/985] Update AdminLoginAsCustomerLoggingTest.xml --- .../Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml index d96a6d377a9e0..6ae6ddfeccb47 100644 --- a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml +++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml @@ -18,7 +18,6 @@ value="Verify that 'Login as customer Log' record information about using 'Login as Customer' functionality properly"/> <severity value="MAJOR"/> <group value="login_as_customer"/> - <group value="pr_exclude"/> </annotations> <before> <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1" From b9c15bb0399d8001639529e12fe162ff3ea00896 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:22:37 +0530 Subject: [PATCH 962/985] Update AdminLoginAsCustomerLoggingTest.xml --- .../Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml index 6ae6ddfeccb47..d96a6d377a9e0 100644 --- a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml +++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/AdminLoginAsCustomerLoggingTest.xml @@ -18,6 +18,7 @@ value="Verify that 'Login as customer Log' record information about using 'Login as Customer' functionality properly"/> <severity value="MAJOR"/> <group value="login_as_customer"/> + <group value="pr_exclude"/> </annotations> <before> <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1" From 300353b1345e354ee9e258cb71430bf279a4fee4 Mon Sep 17 00:00:00 2001 From: mohit-adobe <84013331+mohit-adobe@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:23:32 +0530 Subject: [PATCH 963/985] Update AdminUserLockWhenEditingUserTest.xml --- .../Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml index 5b4f38ae30566..30f112a4ecc3a 100644 --- a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml +++ b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml @@ -18,6 +18,7 @@ <testCaseId value="MC-14372" /> <group value="security"/> <group value="mtf_migrated"/> + <group value="pr_exclude"/> </annotations> <before> <createData entity="NewAdminUser" stepKey="user" /> From 8352846513d7cec13368fa945a20f446de4dea86 Mon Sep 17 00:00:00 2001 From: sharuksyed <glo74186@adobe.com> Date: Fri, 25 Nov 2022 17:28:52 +0530 Subject: [PATCH 964/985] AC-4166 : Persistent data for Registered Customer with default addresses (virtual quote) --- ...eckoutFillNewBillingAddressActionGroup.xml | 21 ++++ .../Mftf/Section/CheckoutShippingSection.xml | 1 + ...RegisteredCustomerWithVirtualQuoteTest.xml | 103 ++++++++++++++++++ .../Customer/Test/Mftf/Data/AddressData.xml | 15 +++ 4 files changed, 140 insertions(+) create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/Test/StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest.xml diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml new file mode 100644 index 0000000000000..910efcdc720b3 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="CustomerLoggedInCheckoutFillNewBillingAddressActionGroup" extends="LoggedInCheckoutFillNewBillingAddressActionGroup"> + <annotations> + <description>EXTENDS: LoggedInCheckoutFillNewBillingAddressActionGroup. Removes 'selectCountry' and 'selectState' to fill state after country.</description> + </annotations> + + <remove keyForRemoval="selectCountry"/> + <remove keyForRemoval="selectState"/> + <selectOption stepKey="selectCountry1" selector="{{classPrefix}} {{CheckoutShippingSection.country}}" userInput="{{Address.country_id}}"/> + <selectOption stepKey="selectState2" selector="{{classPrefix}} {{CheckoutShippingSection.region}}" userInput="{{Address.state}}"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml index 581c0976e6d71..d83b1df2a2494 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml @@ -51,5 +51,6 @@ <element name="stateProvince" type="text" selector="//div[@name='shippingAddress.region_id']//span[contains(text(),'State/Province')]" timeout="30"/> <element name="stateProvinceWithoutAsterisk" type="text" selector="//div[@class='field' and @name='shippingAddress.region_id']" timeout="30"/> <element name="stateProvinceWithAsterisk" type="text" selector="//div[@class='field _required' and @name='shippingAddress.region_id']" timeout="30"/> + <element name="selectCountry" type="select" selector="//div[@class='billing-address-form']//select[@name='country_id']"/> </section> </sections> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest.xml new file mode 100644 index 0000000000000..af3e3c0ed045f --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest"> + <annotations> + <features value="Checkout"/> + <stories value="Checkout via register customer"/> + <title value="Persistent Data for register Customer with virtual quote"/> + <description value="One can use Persistent Data for register Customer with virtual quote"/> + <severity value="MAJOR"/> + <testCaseId value="AC-4166"/> + <group value="checkout"/> + </annotations> + <before> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="VirtualProduct" stepKey="createVirtualProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> + <magentoCLI command="config:set {{EnablePaymentCheckMOConfigData.path}} {{EnablePaymentCheckMOConfigData.value}}" stepKey="enableCheckMoneyOrderPayment"/> + <magentoCLI command="cache:clean config" stepKey="flushCache"/> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> + <executeJS function="window.localStorage.clear();" stepKey="clearLocalStorage"/> + </before> + <after> + <!-- delete created data --> + <deleteData createDataKey="createVirtualProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> + <magentoCLI command="config:set {{DisableCheckMoneyOrderPaymentMethod.path}} {{DisableCheckMoneyOrderPaymentMethod.value}}" stepKey="disableCheckMoneyOrderPaymentMethod"/> + </after> + <!-- Login as Customer Login from Customer page --> + <!--Login to Frontend--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> + <argument name="Customer" value="$$createCustomer$$" /> + </actionGroup> + <!-- Add default address --> + <actionGroup ref="StorefrontAddCustomerDefaultAddressActionGroup" stepKey="addNewDefaultAddress"> + <argument name="Address" value="US_Address_California"/> + </actionGroup> + <!--Add product to cart.--> + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> + <argument name="product" value="$createVirtualProduct$"/> + </actionGroup> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCart"/> + <click selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="openEstimateTaxSection"/> + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="United States" stepKey="assertCountryFieldInCartEstimateShippingAndTaxSection"/> + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="California" stepKey="assertStateProvinceInCartEstimateShippingAndTaxSection"/> + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="90230" stepKey="assertZipPostalCodeInCartEstimateShippingAndTaxSection"/> + <selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="United Kingdom" stepKey="selectCountry"/> + <waitForLoadingMaskToDisappear stepKey="waitForCountryLoadingMaskDisappear"/> + <fillField selector="{{CheckoutShippingGuestInfoSection.regionInput}}" userInput="" stepKey="changeStateProvinceField"/> + <fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="KW1 7NQ" stepKey="fillZipPostalCodeField"/> + <waitForLoadingMaskToDisappear stepKey="waitForZipLoadingMaskDisappear"/> + <dontSeeJsError stepKey="verifyThatThereIsNoJSErrors"/> + <reloadPage stepKey="refreshPage"/> + <waitForPageLoad stepKey="waitForpageload"/> + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="United Kingdom" stepKey="assertCountryFieldInCartEstimateShippingSection"/> + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="" stepKey="assertStateProvinceInCartEstimateShippingSection"/> + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="KW1 7NQ" stepKey="assertZipPostalCodeInCartEstimateShippingSection"/> + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/> + <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="checkBillingAddressOnBillingPage"> + <argument name="customerVar" value="$$createCustomer$$" /> + <argument name="customerAddressVar" value="US_Address_California" /> + </actionGroup> + <conditionalClick selector="{{CheckoutShippingSection.editActiveAddressButton}}" dependentSelector="{{CheckoutShippingSection.editActiveAddressButton}}" visible="true" stepKey="clickEditButton"/> + <waitForPageLoad stepKey="waitForLoadingMask"/> + <click selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="editAddress"/> + <waitForElementVisible selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/> + <selectOption selector="{{CheckoutShippingSection.addressDropdown}}" userInput="New Address" stepKey="addAddress"/> + <waitForPageLoad stepKey="waitForMaskLoading"/> + <seeInField stepKey="fillFirstName" selector="{{CheckoutShippingSection.firstName}}" userInput="John"/> + <seeInField stepKey="fillLastName" selector="{{CheckoutShippingSection.lastName}}" userInput="Doe"/> + <wait time="10" stepKey="waitForSelectCountry"/> + <seeOptionIsSelected selector="{{CheckoutShippingSection.selectCountry}}" userInput="{{UK_Address.country}}" stepKey="seeCountryIsUnitedKingdom"/> + <seeInField stepKey="fillZip" selector="{{CheckoutShippingSection.postcode}}" userInput="KW1 7NQ"/> + <actionGroup ref="CustomerLoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeBillingAddress"> + <argument name="Address" value="Switzerland_Address"/> + <argument name="classPrefix" value="[aria-hidden=false]"/> + </actionGroup> + <!-- Check order summary in checkout --> + <actionGroup ref="StorefrontClickUpdateAddressInCheckoutActionGroup" stepKey="clickToUpdate"/> + <comment userInput="BIC workaround" stepKey="waitForPageLoading"/> + <reloadPage stepKey="againRefreshPage1"/> + <wait time="10" stepKey="waitForPageLoad"/> + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="AgainGoToShoppingCart"/> + <dontSeeJsError stepKey="againVerifyThatThereIsNoJSErrors"/> + <conditionalClick selector="{{CheckoutShippingSection.editActiveAddressButton}}" dependentSelector="{{CheckoutShippingSection.editActiveAddressButton}}" visible="true" stepKey="againClickEditButton"/> + <waitForPageLoad stepKey="againWaitForLoadingMask"/> + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="{{Switzerland_Address.country}}" stepKey="againAssertCountryFieldInCartEstimateShippingAndTaxSection"/> + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="{{Switzerland_Address.state}}" stepKey="againAssertStateProvinceInCartEstimateShippingAndTaxSection"/> + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{Switzerland_Address.postcode}}" stepKey="againAssertZipPostalCodeInCartEstimateShippingAndTaxSection"/> + </test> +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml index d47409cb0953d..2bc9f4a61ba11 100644 --- a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml @@ -478,4 +478,19 @@ <data key="default_billing">true</data> <data key="telephone">613-582-4782</data> </entity> + <entity name="Switzerland_Address"> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="company">Magento</data> + <array key="street"> + <item>Kapelle St.</item> + <item>Niklaus 3</item> + </array> + <data key="city">Baden</data> + <data key="country_id">CH</data> + <data key="country">Switzerland</data> + <data key="state">Aargau</data> + <data key="postcode">5555</data> + <data key="telephone">555-55-555-55</data> + </entity> </entities> From a9ede3a07a8ad1180220a74dd6e4980162653155 Mon Sep 17 00:00:00 2001 From: sharuksyed <glo74186@adobe.com> Date: Fri, 25 Nov 2022 17:31:42 +0530 Subject: [PATCH 965/985] stepkey changed --- ...omerLoggedInCheckoutFillNewBillingAddressActionGroup.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml index 910efcdc720b3..91b91e0e439b9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CustomerLoggedInCheckoutFillNewBillingAddressActionGroup.xml @@ -10,12 +10,12 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="CustomerLoggedInCheckoutFillNewBillingAddressActionGroup" extends="LoggedInCheckoutFillNewBillingAddressActionGroup"> <annotations> - <description>EXTENDS: LoggedInCheckoutFillNewBillingAddressActionGroup. Removes 'selectCountry' and 'selectState' to fill state after country.</description> + <description>EXTENDS: LoggedInCheckoutFillNewBillingAddressActionGroup. Removes 'selectCountry' and 'selectState' to select state after country.</description> </annotations> <remove keyForRemoval="selectCountry"/> <remove keyForRemoval="selectState"/> - <selectOption stepKey="selectCountry1" selector="{{classPrefix}} {{CheckoutShippingSection.country}}" userInput="{{Address.country_id}}"/> - <selectOption stepKey="selectState2" selector="{{classPrefix}} {{CheckoutShippingSection.region}}" userInput="{{Address.state}}"/> + <selectOption stepKey="selectCountryOption" selector="{{classPrefix}} {{CheckoutShippingSection.country}}" userInput="{{Address.country_id}}"/> + <selectOption stepKey="selectStateOption" selector="{{classPrefix}} {{CheckoutShippingSection.region}}" userInput="{{Address.state}}"/> </actionGroup> </actionGroups> From 31c2a62849134517ac56c9df2c514ecd8dbddc97 Mon Sep 17 00:00:00 2001 From: Shanthi <103998768+glo25731@users.noreply.github.com> Date: Tue, 28 Feb 2023 16:20:46 +0530 Subject: [PATCH 966/985] Update StorefrontDropdownAttributeInLayeredNavigationTest.xml --- .../Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml index 6e256d3b2c7df..dc9c93b131590 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml @@ -18,7 +18,6 @@ <testCaseId value="MC-36326"/> <group value="layeredNavigation"/> <group value="catalog"/> - <group value="SearchEngine"/> <group value="pr_exclude"/> </annotations> <before> From 8721ec607444e370aa222feb476dddb701edf05f Mon Sep 17 00:00:00 2001 From: Shanthi <103998768+glo25731@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:39:26 +0530 Subject: [PATCH 967/985] Update StorefrontDropdownAttributeInLayeredNavigationTest.xml --- .../Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml index dc9c93b131590..e051cda887535 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml @@ -17,6 +17,7 @@ <severity value="CRITICAL"/> <testCaseId value="MC-36326"/> <group value="layeredNavigation"/> + <group value="layeredNavigationEnabled"/> <group value="catalog"/> <group value="pr_exclude"/> </annotations> From f2f5f12a20f12ba3dab8332a0f3d6c3e8815dcc8 Mon Sep 17 00:00:00 2001 From: nithyaparamas <87164696+nithyaparamas@users.noreply.github.com> Date: Tue, 28 Feb 2023 18:34:48 +0530 Subject: [PATCH 968/985] Update StorefrontDropdownAttributeInLayeredNavigationTest.xml --- .../StorefrontDropdownAttributeInLayeredNavigationTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml index e051cda887535..f0e02cdf540fd 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml @@ -17,8 +17,9 @@ <severity value="CRITICAL"/> <testCaseId value="MC-36326"/> <group value="layeredNavigation"/> - <group value="layeredNavigationEnabled"/> + <group value="layeredNavigationAttribute"/> <group value="catalog"/> + <group value="SearchEngine"/> <group value="pr_exclude"/> </annotations> <before> From 388acf77a012243069a27aaef00c267b9fa477ac Mon Sep 17 00:00:00 2001 From: nithyaparamas <87164696+nithyaparamas@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:13:18 +0530 Subject: [PATCH 969/985] Update ProductAttributeData.xml --- .../Test/Mftf/Data/ProductAttributeData.xml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml index 98085011dbc1c..fa1505257793a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml @@ -31,6 +31,29 @@ <data key="used_for_sort_by">true</data> <requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity> </entity> + <entity name="productAttributeLayered" type="ProductAttribute"> + <data key="attribute_code" unique="suffix">attribute</data> + <data key="frontend_input">textarea</data> + <data key="scope">global</data> + <data key="is_required">false</data> + <data key="is_unique">false</data> + <data key="is_searchable">true</data> + <data key="is_visible">true</data> + <data key="backend_type">text</data> + <data key="is_wysiwyg_enabled">true</data> + <data key="is_visible_in_advanced_search">true</data> + <data key="is_visible_on_front">true</data> + <data key="is_filterable">true</data> + <data key="is_filterable_in_search">true</data> + <data key="used_in_product_listing">true</data> + <data key="is_used_for_promo_rules">true</data> + <data key="is_comparable">true</data> + <data key="is_used_in_grid">true</data> + <data key="is_visible_in_grid">true</data> + <data key="is_filterable_in_grid">true</data> + <data key="used_for_sort_by">true</data> + <requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity> + </entity> <entity name="productAttributeWithTwoOptions" type="ProductAttribute"> <data key="attribute_code" unique="suffix">attribute</data> <data key="frontend_input">select</data> @@ -299,7 +322,7 @@ <data key="frontend_input">date</data> <data key="is_required_admin">No</data> </entity> - <entity name="dropdownProductAttribute" extends="productAttributeWysiwyg" type="ProductAttribute"> + <entity name="dropdownProductAttribute" extends="productAttributeLayered" type="ProductAttribute"> <data key="frontend_input">select</data> <data key="frontend_input_admin">Dropdown</data> <data key="is_required_admin">No</data> From ced3737aadb168bd00cdbebbdb5ad83b0c2f2a9e Mon Sep 17 00:00:00 2001 From: nithyaparamas <87164696+nithyaparamas@users.noreply.github.com> Date: Wed, 1 Mar 2023 11:14:57 +0530 Subject: [PATCH 970/985] Update StorefrontDropdownAttributeInLayeredNavigationTest.xml --- .../Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml index f0e02cdf540fd..6e256d3b2c7df 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontDropdownAttributeInLayeredNavigationTest.xml @@ -17,7 +17,6 @@ <severity value="CRITICAL"/> <testCaseId value="MC-36326"/> <group value="layeredNavigation"/> - <group value="layeredNavigationAttribute"/> <group value="catalog"/> <group value="SearchEngine"/> <group value="pr_exclude"/> From 8d19deabfb460824647e8c8f98cc5a00016a1421 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Mon, 6 Mar 2023 12:04:41 +0530 Subject: [PATCH 971/985] Update AdminDeleteUserViaCurlActionGroup.xml --- .../Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml index c508e08a30067..516fe9ebac09d 100644 --- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml +++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteUserViaCurlActionGroup.xml @@ -14,6 +14,7 @@ <amOnPage stepKey="amOnAdminUsersPage" url="{{AdminUsersPage.url}}"/> <waitForPageLoad stepKey="waitForAdminUserPageLoad"/> <click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" /> + <scrollTo selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="scrollToUserId"></scrollTo> <waitForElementVisible selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="waitForUserIdVisible"></waitForElementVisible> <grabTextFrom selector="{{AdminLegacyDataGridTableSection.columnTemplateStrict(user.username, 'user_id')}}" stepKey="userId" /> From 9439af6b3ce94deda926115bb6f679764a593404 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:48:43 +0530 Subject: [PATCH 972/985] Update StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml --- ...ldApplyToGroupedProductWithInvisibleIndividualProductTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml index 3e86cdf17767d..b50c13c3ceaa8 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml @@ -18,6 +18,7 @@ <group value="SalesRule"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="ApiCategory" stepKey="createCategoryOne"/> <createData entity="ApiSimpleProduct" stepKey="createFirstSimpleProduct"> <field key ="price">100</field> From 5cc11b4e621a449da8923f4758a03fcff3d59be4 Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:49:49 +0530 Subject: [PATCH 973/985] Update StorefrontApplyCartPriceRuleToBundleChildProductTest.xml --- .../StorefrontApplyCartPriceRuleToBundleChildProductTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontApplyCartPriceRuleToBundleChildProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontApplyCartPriceRuleToBundleChildProductTest.xml index 80eb79d9cc6f0..caef72212174c 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontApplyCartPriceRuleToBundleChildProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontApplyCartPriceRuleToBundleChildProductTest.xml @@ -19,6 +19,7 @@ <group value="salesRule"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <createData entity="SimpleProduct2" stepKey="createSimpleProduct1"> <field key="price">5.00</field> </createData> From 3b0a79ca02daf11beb00250eaa645f98a3348ece Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:51:13 +0530 Subject: [PATCH 974/985] Update StorefrontTaxQuoteCartLoggedInVirtualTest.xml --- .../StorefrontTaxQuoteCartLoggedInVirtualTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml index 1593f91945b97..9065efa54ea66 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml @@ -18,6 +18,7 @@ <group value="Tax"/> </annotations> <before> + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <createData entity="VirtualProduct" stepKey="virtualProduct1"/> From dc7f39dfab312015c759d47032cc4408644b0fd1 Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Tue, 18 Oct 2022 20:10:09 +0530 Subject: [PATCH 975/985] Section been changed --- .../Mftf/Section/AdminCategoryProductsGridSection.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml index 6618b0e1a48d8..42c322e06d0b4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml @@ -18,5 +18,14 @@ <element name="productVisibility" type="select" selector="//*[@name='product[visibility]']"/> <element name="productSelectAll" type="checkbox" selector="input.admin__control-checkbox"/> <element name="productsGridEmpty" type="text" selector="#catalog_category_products_table .data-grid-tr-no-data .empty-text"/> + <element name="addProducts" type="button" selector="//button[@class='action-default scalable secondary add-products']"/> + <element name="filtersButton" type="button" selector="//div[@class='data-grid-filters-actions-wrap']//button"/> + <element name="clearAllButton" type="button" selector="//button[contains(text(),'Clear all')]"/> + <element name="downArrow" type="button" selector="//button[@class='action-multicheck-toggle']"/> + <element name="selectAllOnThisPage" type="select" selector="//span[contains(text(),'Select All on This Page')]"/> + <element name="saveAndClose" type="button" selector="//button[@name='add_products_save_button']"/> + <element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/> + <element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/> </section> </sections> + From c9d47b6ffd6ddce3780f16985b1d02b61378b1aa Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Tue, 18 Oct 2022 20:11:12 +0530 Subject: [PATCH 976/985] removed space --- .../Test/Mftf/Section/AdminCategoryProductsGridSection.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml index 42c322e06d0b4..7e5676c27457e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml @@ -28,4 +28,3 @@ <element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/> </section> </sections> - From 31df36180d00ee70c9d800a51f26e796d44d9284 Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Wed, 19 Oct 2022 14:48:59 +0530 Subject: [PATCH 977/985] removed some code --- .../Test/Mftf/Section/AdminCategoryProductsGridSection.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml index 7e5676c27457e..9c05679f1ebcc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml @@ -18,12 +18,6 @@ <element name="productVisibility" type="select" selector="//*[@name='product[visibility]']"/> <element name="productSelectAll" type="checkbox" selector="input.admin__control-checkbox"/> <element name="productsGridEmpty" type="text" selector="#catalog_category_products_table .data-grid-tr-no-data .empty-text"/> - <element name="addProducts" type="button" selector="//button[@class='action-default scalable secondary add-products']"/> - <element name="filtersButton" type="button" selector="//div[@class='data-grid-filters-actions-wrap']//button"/> - <element name="clearAllButton" type="button" selector="//button[contains(text(),'Clear all')]"/> - <element name="downArrow" type="button" selector="//button[@class='action-multicheck-toggle']"/> - <element name="selectAllOnThisPage" type="select" selector="//span[contains(text(),'Select All on This Page')]"/> - <element name="saveAndClose" type="button" selector="//button[@name='add_products_save_button']"/> <element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/> <element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/> </section> From d851a0823a77417cf344c943c0f168d73df768f1 Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Wed, 19 Oct 2022 18:39:59 +0530 Subject: [PATCH 978/985] Final changes done --- .../Test/Mftf/Section/AdminCategoryProductsGridSection.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml index 9c05679f1ebcc..6618b0e1a48d8 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsGridSection.xml @@ -18,7 +18,5 @@ <element name="productVisibility" type="select" selector="//*[@name='product[visibility]']"/> <element name="productSelectAll" type="checkbox" selector="input.admin__control-checkbox"/> <element name="productsGridEmpty" type="text" selector="#catalog_category_products_table .data-grid-tr-no-data .empty-text"/> - <element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/> - <element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/> </section> </sections> From 967dca98a3bb021477c81c4effb9bcc1d947ddff Mon Sep 17 00:00:00 2001 From: "Sahil.kumar" <sahil.kumar@BLR1-LMC-N71387.local> Date: Tue, 15 Nov 2022 22:30:02 +0530 Subject: [PATCH 979/985] Changed Category name --- .../Test/Mftf/Section/AdminCategorySidebarTreeSection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml index c22677f0e0f5f..8b1a25adb267c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml @@ -23,7 +23,7 @@ <element name="expandRootCategoryByName" type="button" selector="//div[@class='x-tree-root-node']/li/div/a/span[contains(., '{{categoryName}}')]/../../img[contains(@class, 'x-tree-elbow-end-plus')]" parameterized="true" timeout="30"/> <element name="categoryByName" type="text" selector="//div[contains(@class, 'categories-side-col')]//a/span[contains(text(), '{{categoryName}}')]" parameterized="true" timeout="30"/> <element name="expandCategoryByName" type="text" selector="//span[contains(text(),'{{categoryName}}')]/ancestor::div[contains(@class,'x-tree-node-el')]//img[contains(@class,'x-tree-elbow-end-plus') or contains(@class,'x-tree-elbow-plus')]" parameterized="true" timeout="30"/> - <element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/> + <element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SubCat') and contains(text(),'({{productCount}})')]" parameterized="true"/> <element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/> </section> </sections> From 303f29f3dbc7d3552b1dd8da2079020097a78f6e Mon Sep 17 00:00:00 2001 From: manjusha729 <93243302+manjusha729@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:18:54 +0530 Subject: [PATCH 980/985] Update CategoryData.xml --- app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml index e5b6efbd6373a..57d5103a87a7e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml @@ -31,6 +31,13 @@ <data key="is_active">true</data> <data key="include_in_menu">true</data> </entity> + <entity name="SimpleSubCat" type="category"> + <data key="name" unique="suffix">SubCat</data> + <data key="name_lwr" unique="suffix">simplesubcategory</data> + <data key="urlKey" unique="suffix">simplesubcategory</data> + <data key="is_active">true</data> + <data key="include_in_menu">true</data> + </entity> <entity name="NewRootCategory" type="category"> <data key="name" unique="suffix">NewRootCategory</data> <data key="name_lwr" unique="suffix">newrootcategory</data> @@ -309,4 +316,4 @@ <var key="category_id" entityKey="id" entityType="category"/> <var key="sku" entityKey="sku" entityType="product"/> </entity> -</entities> \ No newline at end of file +</entities> From 78f98441f2663964fcdc2df6be928856fd8af0ed Mon Sep 17 00:00:00 2001 From: Marc Ginesta <loginesta@gmail.com> Date: Wed, 8 Mar 2023 12:56:34 +0100 Subject: [PATCH 981/985] Refactor: Update CustomerGroup fixture to be able to use different customer groups on single scenarios (#89) --- .../Customer/Test/Fixture/CustomerGroup.php | 56 ++++++++----------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php b/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php index a9a96e42a5d2a..b3649b0546c47 100644 --- a/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php +++ b/app/code/Magento/Customer/Test/Fixture/CustomerGroup.php @@ -3,20 +3,17 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - declare(strict_types=1); namespace Magento\Customer\Test\Fixture; use Magento\Customer\Api\Data\GroupInterface; use Magento\Customer\Api\GroupRepositoryInterface; -use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\DataObject; use Magento\Framework\EntityManager\Hydrator; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Tax\Api\TaxClassRepositoryInterface; +use Magento\TestFramework\Fixture\Api\DataMerger; use Magento\TestFramework\Fixture\Api\ServiceFactory; +use Magento\TestFramework\Fixture\Data\ProcessorInterface; use Magento\TestFramework\Fixture\RevertibleDataFixtureInterface; /** @@ -35,50 +32,46 @@ class CustomerGroup implements RevertibleDataFixtureInterface private ServiceFactory $serviceFactory; /** - * @var TaxClassRepositoryInterface + * @var Hydrator */ - private TaxClassRepositoryInterface $taxClassRepository; - - /** @var Hydrator */ private Hydrator $hydrator; + /** + * @var DataMerger + */ + private DataMerger $dataMerger; + + /** + * @var ProcessorInterface + */ + private ProcessorInterface $dataProcessor; + /** * @param ServiceFactory $serviceFactory - * @param TaxClassRepositoryInterface $taxClassRepository - * @param SearchCriteriaBuilder $searchCriteriaBuilder * @param Hydrator $hydrator + * @param DataMerger $dataMerger + * @param ProcessorInterface $dataProcessor */ public function __construct( ServiceFactory $serviceFactory, - TaxClassRepositoryInterface $taxClassRepository, - Hydrator $hydrator + Hydrator $hydrator, + DataMerger $dataMerger, + ProcessorInterface $dataProcessor ) { $this->serviceFactory = $serviceFactory; - $this->taxClassRepository = $taxClassRepository; $this->hydrator = $hydrator; + $this->dataMerger = $dataMerger; + $this->dataProcessor = $dataProcessor; } /** - * {@inheritdoc} - * @param array $data Parameters. Same format as Customer::DEFAULT_DATA. - * @return DataObject|null - * @throws LocalizedException - * @throws NoSuchEntityException + * @inheritdoc */ public function apply(array $data = []): ?DataObject { - $customerGroupSaveService = $this->serviceFactory->create( - GroupRepositoryInterface::class, - 'save' - ); - $data = self::DEFAULT_DATA; - if (!empty($data['tax_class_id'])) { - $data[GroupInterface::TAX_CLASS_ID] = $this->taxClassRepository->get($data['tax_class_id'])->getClassId(); - } - - $customerGroup = $customerGroupSaveService->execute( + $customerGroup = $this->serviceFactory->create(GroupRepositoryInterface::class, 'save')->execute( [ - 'group' => $data, + 'group' => $this->dataProcessor->process($this, $this->dataMerger->merge(self::DEFAULT_DATA, $data)) ] ); @@ -90,8 +83,7 @@ public function apply(array $data = []): ?DataObject */ public function revert(DataObject $data): void { - $service = $this->serviceFactory->create(GroupRepositoryInterface::class, 'deleteById'); - $service->execute( + $this->serviceFactory->create(GroupRepositoryInterface::class, 'deleteById')->execute( [ 'id' => $data->getId() ] From 7aa156812fc5ab7cf5b68e4522bcb929cd5350f6 Mon Sep 17 00:00:00 2001 From: aplapana <aplapana@adobe.com> Date: Wed, 8 Mar 2023 17:15:02 +0200 Subject: [PATCH 982/985] ACP2E-1512: Env variable config not working for store views with capital letters in the code covered env setting issue --- .../Store/Model/Config/Processor/Fallback.php | 13 +++++++++++++ .../Unit/Model/Config/Processor/FallbackTest.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Store/Model/Config/Processor/Fallback.php b/app/code/Magento/Store/Model/Config/Processor/Fallback.php index 91d0d33a3e30e..1b1afaae6c009 100644 --- a/app/code/Magento/Store/Model/Config/Processor/Fallback.php +++ b/app/code/Magento/Store/Model/Config/Processor/Fallback.php @@ -111,6 +111,13 @@ private function prepareWebsitesConfig( array $websitesConfig ) { $result = []; + + foreach ($websitesConfig as $websiteCode => $webConfiguration) { + if (!isset($websitesConfig[strtolower($websiteCode)])) { + $websitesConfig[strtolower($websiteCode)] = $webConfiguration; + unset($websitesConfig[$websiteCode]); + } + } foreach ((array)$this->websiteData as $website) { $code = $website['code']; $id = $website['website_id']; @@ -136,6 +143,12 @@ private function prepareStoresConfig( ) { $result = []; + foreach ($storesConfig as $storeCode => $storeConfiguration) { + if (!isset($storesConfig[strtolower($storeCode)])) { + $storesConfig[strtolower($storeCode)] = $storeConfiguration; + unset($storesConfig[$storeCode]); + } + } foreach ((array)$this->storeData as $store) { $code = $store['code']; $id = $store['store_id']; diff --git a/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php b/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php index 602494acd07bb..7846186f42970 100644 --- a/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/Config/Processor/FallbackTest.php @@ -78,7 +78,7 @@ public function testProcessWithStoreCodeCapitalLetters() $result = $this->fallback->process( [ 'stores' => [ - 'two' => [ + 'TWO' => [ 'checkout' => [ 'options' => ['guest_checkout' => 0] ] From 9950e087ef204c51c0fe0efbc572699e86d959b1 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Thu, 9 Mar 2023 12:17:50 +0530 Subject: [PATCH 983/985] AC-8030::Need to fix Unit test failures in Sync 2.4.6-develop with 2.4-develop --- .../Customer/Test/Unit/Controller/Account/ConfirmTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php index 528e1927d0df3..f30fd7facebbe 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/ConfirmTest.php @@ -211,7 +211,8 @@ protected function setUp(): void 'customerRepository' => $this->customerRepositoryMock, 'addressHelper' => $this->addressHelperMock, 'urlFactory' => $urlFactoryMock, - 'customerLogger' => $this->customerLoggerMock + 'customerLogger' => $this->customerLoggerMock, + 'cookieMetadataManager' => $objectManagerHelper->getObject(PhpCookieManager::class), ] ); } From c1a93c38247668d94dd0fe307cb01f7388de3df4 Mon Sep 17 00:00:00 2001 From: Rafal Janicki <rjanicki@adobe.com> Date: Thu, 9 Mar 2023 09:37:10 +0000 Subject: [PATCH 984/985] LYNX-86: Move functionality from ContactGraphQlPwa to ContractGraphQl (new module) (#86) --- .../Model/ContactUsValidator.php | 52 +++++++ .../Model/Resolver/ContactUs.php | 95 ++++++++++++ app/code/Magento/ContactGraphQl/README.md | 3 + app/code/Magento/ContactGraphQl/composer.json | 28 ++++ .../Magento/ContactGraphQl/etc/graphql/di.xml | 16 ++ .../Magento/ContactGraphQl/etc/module.xml | 10 ++ .../ContactGraphQl/etc/schema.graphqls | 23 +++ .../Magento/ContactGraphQl/registration.php | 10 ++ composer.json | 1 + .../GraphQl/ContactUs/ContactUsTest.php | 146 ++++++++++++++++++ 10 files changed, 384 insertions(+) create mode 100644 app/code/Magento/ContactGraphQl/Model/ContactUsValidator.php create mode 100644 app/code/Magento/ContactGraphQl/Model/Resolver/ContactUs.php create mode 100644 app/code/Magento/ContactGraphQl/README.md create mode 100644 app/code/Magento/ContactGraphQl/composer.json create mode 100644 app/code/Magento/ContactGraphQl/etc/graphql/di.xml create mode 100644 app/code/Magento/ContactGraphQl/etc/module.xml create mode 100644 app/code/Magento/ContactGraphQl/etc/schema.graphqls create mode 100644 app/code/Magento/ContactGraphQl/registration.php create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/ContactUs/ContactUsTest.php diff --git a/app/code/Magento/ContactGraphQl/Model/ContactUsValidator.php b/app/code/Magento/ContactGraphQl/Model/ContactUsValidator.php new file mode 100644 index 0000000000000..e608df9db8b2d --- /dev/null +++ b/app/code/Magento/ContactGraphQl/Model/ContactUsValidator.php @@ -0,0 +1,52 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\ContactGraphQl\Model; + +use Magento\Framework\GraphQl\Exception\GraphQlInputException; +use Magento\Framework\Validator\EmailAddress; + +class ContactUsValidator +{ + /** + * @var EmailAddress + */ + private EmailAddress $emailValidator; + + /** + * @param EmailAddress $emailValidator + */ + public function __construct( + EmailAddress $emailValidator + ) { + $this->emailValidator = $emailValidator; + } + + /** + * Validate input data + * + * @param string[] $input + * @return void + * @throws GraphQlInputException + */ + public function execute(array $input): void + { + if (!$this->emailValidator->isValid($input['email'])) { + throw new GraphQlInputException( + __('The email address is invalid. Verify the email address and try again.') + ); + } + + if ($input['name'] === '') { + throw new GraphQlInputException(__('Name field is required.')); + } + + if ($input['comment'] === '') { + throw new GraphQlInputException(__('Comment field is required.')); + } + } +} diff --git a/app/code/Magento/ContactGraphQl/Model/Resolver/ContactUs.php b/app/code/Magento/ContactGraphQl/Model/Resolver/ContactUs.php new file mode 100644 index 0000000000000..eb6e852358579 --- /dev/null +++ b/app/code/Magento/ContactGraphQl/Model/Resolver/ContactUs.php @@ -0,0 +1,95 @@ +<?php + +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\ContactGraphQl\Model\Resolver; + +use Magento\Contact\Model\ConfigInterface; +use Magento\Contact\Model\MailInterface; +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\GraphQl\Exception\GraphQlInputException; +use Magento\Framework\GraphQl\Query\ResolverInterface; +use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; +use Psr\Log\LoggerInterface; +use Magento\ContactGraphQl\Model\ContactUsValidator; + +class ContactUs implements ResolverInterface +{ + /** + * @var MailInterface + */ + private MailInterface $mail; + + /** + * @var ConfigInterface + */ + private ConfigInterface $contactConfig; + + /** + * @var LoggerInterface + */ + private LoggerInterface $logger; + + /** + * @var ContactUsValidator + */ + private ContactUsValidator $validator; + + /** + * @param MailInterface $mail + * @param ConfigInterface $contactConfig + * @param LoggerInterface $logger + * @param ContactUsValidator $validator + */ + public function __construct( + MailInterface $mail, + ConfigInterface $contactConfig, + LoggerInterface $logger, + ContactUsValidator $validator + ) { + $this->mail = $mail; + $this->contactConfig = $contactConfig; + $this->logger = $logger; + $this->validator = $validator; + } + + /** + * @inheritDoc + */ + public function resolve( + Field $field, + $context, + ResolveInfo $info, + array $value = null, + array $args = null + ) { + if (!$this->contactConfig->isEnabled()) { + throw new GraphQlInputException( + __('The contact form is unavailable.') + ); + } + + $input = array_map(function ($field) { + return $field === null ? '' : trim($field); + }, $args['input']); + $this->validator->execute($input); + + try { + $this->mail->send($input['email'], ['data' => $input]); + } catch (\Exception $e) { + $this->logger->critical($e); + throw new GraphQlInputException( + __('An error occurred while processing your form. Please try again later.') + ); + } + + return [ + 'status' => true + ]; + } +} diff --git a/app/code/Magento/ContactGraphQl/README.md b/app/code/Magento/ContactGraphQl/README.md new file mode 100644 index 0000000000000..0d983ddf4a4e4 --- /dev/null +++ b/app/code/Magento/ContactGraphQl/README.md @@ -0,0 +1,3 @@ +# ContactGraphQlPwa + +**ContactGraphQlPwa** provides GraphQL support for `magento/module-contact`. diff --git a/app/code/Magento/ContactGraphQl/composer.json b/app/code/Magento/ContactGraphQl/composer.json new file mode 100644 index 0000000000000..9c08ecbb16758 --- /dev/null +++ b/app/code/Magento/ContactGraphQl/composer.json @@ -0,0 +1,28 @@ +{ + "name": "magento/module-contact-graph-ql", + "description": "N/A", + "type": "magento2-module", + "config": { + "sort-packages": true + }, + "require": { + "php": "~8.1.0||~8.2.0", + "magento/framework": "*", + "magento/module-contact": "*" + }, + "suggest": { + "magento/module-graph-ql": "*" + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\ContactGraphQl\\": "" + } + } +} diff --git a/app/code/Magento/ContactGraphQl/etc/graphql/di.xml b/app/code/Magento/ContactGraphQl/etc/graphql/di.xml new file mode 100644 index 0000000000000..b46225b07eede --- /dev/null +++ b/app/code/Magento/ContactGraphQl/etc/graphql/di.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> + <type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider"> + <arguments> + <argument name="extendedConfigData" xsi:type="array"> + <item name="contact_enabled" xsi:type="string">contact/contact/enabled</item> + </argument> + </arguments> + </type> +</config> diff --git a/app/code/Magento/ContactGraphQl/etc/module.xml b/app/code/Magento/ContactGraphQl/etc/module.xml new file mode 100644 index 0000000000000..801683ba43618 --- /dev/null +++ b/app/code/Magento/ContactGraphQl/etc/module.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> + <module name="Magento_ContactGraphQl" /> +</config> diff --git a/app/code/Magento/ContactGraphQl/etc/schema.graphqls b/app/code/Magento/ContactGraphQl/etc/schema.graphqls new file mode 100644 index 0000000000000..400c5471d942f --- /dev/null +++ b/app/code/Magento/ContactGraphQl/etc/schema.graphqls @@ -0,0 +1,23 @@ +# Copyright © Magento, Inc. All rights reserved. +# See COPYING.txt for license details. + +type Mutation { + contactUs( + input: ContactUsInput! @doc(description: "An input object that defines shopper information.") + ): ContactUsOutput @doc(description: "Send a 'Contact Us' email to the merchant.") @resolver(class: "Magento\\ContactGraphQl\\Model\\Resolver\\ContactUs") +} + +input ContactUsInput { + email: String! @doc(description: "The email address of the shopper.") + name: String! @doc(description: "The full name of the shopper.") + telephone: String @doc(description: "The shopper's telephone number.") + comment: String! @doc(description: "The shopper's comment to the merchant.") +} + +type ContactUsOutput @doc(description: "Contains the status of the request."){ + status: Boolean! @doc(description: "Indicates whether the request was successful.") +} + +type StoreConfig { + contact_enabled: Boolean! @doc(description: "Indicates whether the Contact Us form in enabled.") +} diff --git a/app/code/Magento/ContactGraphQl/registration.php b/app/code/Magento/ContactGraphQl/registration.php new file mode 100644 index 0000000000000..27782c62d7966 --- /dev/null +++ b/app/code/Magento/ContactGraphQl/registration.php @@ -0,0 +1,10 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Framework\Component\ComponentRegistrar; + +ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_ContactGraphQl', __DIR__); diff --git a/composer.json b/composer.json index 0c01c49b1ec77..b3e2482b9e961 100644 --- a/composer.json +++ b/composer.json @@ -148,6 +148,7 @@ "magento/module-configurable-product": "*", "magento/module-configurable-product-sales": "*", "magento/module-contact": "*", + "magento/module-contact-graph-ql": "*", "magento/module-cookie": "*", "magento/module-cron": "*", "magento/module-currency-symbol": "*", diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/ContactUs/ContactUsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/ContactUs/ContactUsTest.php new file mode 100644 index 0000000000000..a49d33e7468d2 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/ContactUs/ContactUsTest.php @@ -0,0 +1,146 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\ContactUs; + +use Magento\TestFramework\Fixture\Config; +use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; +use Magento\TestFramework\TestCase\GraphQlAbstract; + +#[ + Config("contact/contact/enabled", "1") +] +class ContactUsTest extends GraphQlAbstract +{ + /** + * Successfuly send contact us form + */ + public function testContactUsSuccess() + { + $query = <<<MUTATION +mutation { + contactUs(input: { + comment:"Test Contact Us", + email:"test@adobe.com", + name:"John Doe", + telephone:"1111111111" + }) + { + status + } +} +MUTATION; + + $expected = [ + "contactUs" => [ + "status" => true + ] + ]; + $response = $this->graphQlMutation($query, [], '', []); + $this->assertEquals($expected, $response, "Contact Us form can not be send"); + } + + /** + * Failed send contact us form - missing email + */ + public function testContactUsBadEmail() + { + $query = <<<MUTATION +mutation { + contactUs(input: { + comment:"Test Contact Us", + name:"John Doe", + email:"adobe.com", + telephone:"1111111111" + }) + { + status + } +} +MUTATION; + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage( + 'GraphQL response contains errors: The email address is invalid. Verify the email address and try again.' + ); + $this->graphQlMutation($query, [], '', []); + } + + /** + * Failed send contact us form - missing name + */ + public function testContactUsMissingName() + { + $query = <<<MUTATION +mutation { + contactUs(input: { + comment:"Test Contact Us", + email:"test@adobe.com", + telephone:"1111111111" + }) + { + status + } +} +MUTATION; + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage( + 'GraphQL response contains errors: Field ContactUsInput.name of required type String! was not provided.' + ); + $this->graphQlMutation($query, [], '', []); + } + + /** + * Failed send contact us form - missing name + */ + public function testContactUsMissingComment() + { + $query = <<<MUTATION +mutation { + contactUs(input: { + email:"test@adobe.com", + name:"John Doe", + telephone:"1111111111" + }) + { + status + } +} +MUTATION; + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage( + 'GraphQL response contains errors: Field ContactUsInput.comment of required type String! was not provided.' + ); + $this->graphQlMutation($query, [], '', []); + } + + /** + * Failed send contact us form - missing name + */ + #[ + Config("contact/contact/enabled", "0") + ] + public function testContactUsDisabled() + { + $query = <<<MUTATION +mutation { + contactUs(input: { + comment:"Test Contact Us", + email:"test@adobe.com", + name:"John Doe", + telephone:"1111111111" + }) + { + status + } +} +MUTATION; + + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage('GraphQL response contains errors: The contact form is unavailable.'); + $this->graphQlMutation($query, [], '', []); + } +} From bfef50e4deeafe3847c07fb7ac5141c02aad50a0 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar <glo71317@adobe.com> Date: Mon, 13 Mar 2023 15:03:00 +0530 Subject: [PATCH 985/985] AC-8030::Sync 2.4.6-develop with 2.4-develop --- .../Test/Unit/Model/ResourceModel/Order/CollectionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php index 50398d42a7019..07c5da9c6f7ba 100644 --- a/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php +++ b/app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Order/CollectionTest.php @@ -466,7 +466,7 @@ public function firstPartDateRangeDataProvider(): array return [ ['', '', '', '0 0 0 23:59:59'], ['24h', '', '', '0 0 1 0:0:0'], - ['7d', '', '', '0 0 6 23:59:59'] + ['7d', '', '', '0 0 6 22:59:59'] ]; }